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

            pub(crate) mod global_constants {
                # ! [doc = "This module contains types related to the API class [`GlobalConstants`][super::GlobalConstants]."] pub (crate) mod private { # [doc = "`core singleton class GlobalConstants` (reference-counted)"] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_globalconstants.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = ""] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GlobalConstants { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GlobalConstants ; # [doc = "Constants"] # [allow (non_upper_case_globals)] impl GlobalConstants { pub const KEY_MODIFIER_MASK : i64 = - 16777216i64 ; pub const JOY_INVALID_OPTION : i64 = - 1i64 ; pub const CORNER_TOP_LEFT : i64 = 0i64 ; pub const HALIGN_LEFT : i64 = 0i64 ; pub const HORIZONTAL : i64 = 0i64 ; pub const JOY_ANALOG_LX : i64 = 0i64 ; pub const JOY_AXIS_0 : i64 = 0i64 ; pub const JOY_BUTTON_0 : i64 = 0i64 ; pub const JOY_DS_B : i64 = 0i64 ; pub const JOY_OPENVR_TOUCHPADX : i64 = 0i64 ; pub const JOY_SONY_X : i64 = 0i64 ; pub const JOY_XBOX_A : i64 = 0i64 ; pub const MARGIN_LEFT : i64 = 0i64 ; pub const OK : i64 = 0i64 ; pub const OP_EQUAL : i64 = 0i64 ; pub const PROPERTY_HINT_NONE : i64 = 0i64 ; pub const TYPE_NIL : i64 = 0i64 ; pub const VALIGN_TOP : i64 = 0i64 ; pub const BUTTON_LEFT : i64 = 1i64 ; pub const BUTTON_MASK_LEFT : i64 = 1i64 ; pub const CORNER_TOP_RIGHT : i64 = 1i64 ; pub const FAILED : i64 = 1i64 ; pub const HALIGN_CENTER : i64 = 1i64 ; pub const JOY_ANALOG_LY : i64 = 1i64 ; pub const JOY_AXIS_1 : i64 = 1i64 ; pub const JOY_BUTTON_1 : i64 = 1i64 ; pub const JOY_DS_A : i64 = 1i64 ; pub const JOY_OCULUS_BY : i64 = 1i64 ; pub const JOY_OPENVR_MENU : i64 = 1i64 ; pub const JOY_OPENVR_TOUCHPADY : i64 = 1i64 ; pub const JOY_SONY_CIRCLE : i64 = 1i64 ; pub const JOY_XBOX_B : i64 = 1i64 ; pub const MARGIN_TOP : i64 = 1i64 ; pub const METHOD_FLAGS_DEFAULT : i64 = 1i64 ; pub const METHOD_FLAG_NORMAL : i64 = 1i64 ; pub const OP_NOT_EQUAL : i64 = 1i64 ; pub const PROPERTY_HINT_RANGE : i64 = 1i64 ; pub const PROPERTY_USAGE_STORAGE : i64 = 1i64 ; pub const TYPE_BOOL : i64 = 1i64 ; pub const VALIGN_CENTER : i64 = 1i64 ; pub const VERTICAL : i64 = 1i64 ; pub const BUTTON_MASK_RIGHT : i64 = 2i64 ; pub const BUTTON_RIGHT : i64 = 2i64 ; pub const CORNER_BOTTOM_RIGHT : i64 = 2i64 ; pub const ERR_UNAVAILABLE : i64 = 2i64 ; pub const HALIGN_RIGHT : i64 = 2i64 ; pub const JOY_ANALOG_RX : i64 = 2i64 ; pub const JOY_AXIS_2 : i64 = 2i64 ; pub const JOY_BUTTON_2 : i64 = 2i64 ; pub const JOY_DS_Y : i64 = 2i64 ; pub const JOY_SONY_SQUARE : i64 = 2i64 ; pub const JOY_VR_ANALOG_TRIGGER : i64 = 2i64 ; pub const JOY_VR_GRIP : i64 = 2i64 ; pub const JOY_XBOX_X : i64 = 2i64 ; pub const MARGIN_RIGHT : i64 = 2i64 ; pub const METHOD_FLAG_EDITOR : i64 = 2i64 ; pub const OP_LESS : i64 = 2i64 ; pub const PROPERTY_HINT_EXP_RANGE : i64 = 2i64 ; pub const PROPERTY_USAGE_EDITOR : i64 = 2i64 ; pub const TYPE_INT : i64 = 2i64 ; pub const VALIGN_BOTTOM : i64 = 2i64 ; pub const BUTTON_MIDDLE : i64 = 3i64 ; pub const CORNER_BOTTOM_LEFT : i64 = 3i64 ; pub const ERR_UNCONFIGURED : i64 = 3i64 ; pub const JOY_ANALOG_RY : i64 = 3i64 ; pub const JOY_AXIS_3 : i64 = 3i64 ; pub const JOY_BUTTON_3 : i64 = 3i64 ; pub const JOY_DS_X : i64 = 3i64 ; pub const JOY_OCULUS_MENU : i64 = 3i64 ; pub const JOY_SONY_TRIANGLE : i64 = 3i64 ; pub const JOY_XBOX_Y : i64 = 3i64 ; pub const MARGIN_BOTTOM : i64 = 3i64 ; pub const OP_LESS_EQUAL : i64 = 3i64 ; pub const PROPERTY_HINT_ENUM : i64 = 3i64 ; pub const TYPE_REAL : i64 = 3i64 ; pub const BUTTON_MASK_MIDDLE : i64 = 4i64 ; pub const BUTTON_WHEEL_UP : i64 = 4i64 ; pub const ERR_UNAUTHORIZED : i64 = 4i64 ; pub const JOY_AXIS_4 : i64 = 4i64 ; pub const JOY_BUTTON_4 : i64 = 4i64 ; pub const JOY_L : i64 = 4i64 ; pub const JOY_VR_ANALOG_GRIP : i64 = 4i64 ; pub const METHOD_FLAG_NOSCRIPT : i64 = 4i64 ; pub const OP_GREATER : i64 = 4i64 ; pub const PROPERTY_HINT_EXP_EASING : i64 = 4i64 ; pub const PROPERTY_USAGE_NETWORK : i64 = 4i64 ; pub const TYPE_STRING : i64 = 4i64 ; pub const BUTTON_WHEEL_DOWN : i64 = 5i64 ; pub const ERR_PARAMETER_RANGE_ERROR : i64 = 5i64 ; pub const JOY_AXIS_5 : i64 = 5i64 ; pub const JOY_BUTTON_5 : i64 = 5i64 ; pub const JOY_R : i64 = 5i64 ; pub const OP_GREATER_EQUAL : i64 = 5i64 ; pub const PROPERTY_HINT_LENGTH : i64 = 5i64 ; pub const PROPERTY_USAGE_NOEDITOR : i64 = 5i64 ; pub const TYPE_VECTOR2 : i64 = 5i64 ; pub const BUTTON_WHEEL_LEFT : i64 = 6i64 ; pub const ERR_OUT_OF_MEMORY : i64 = 6i64 ; pub const JOY_ANALOG_L2 : i64 = 6i64 ; pub const JOY_AXIS_6 : i64 = 6i64 ; pub const JOY_BUTTON_6 : i64 = 6i64 ; pub const JOY_L2 : i64 = 6i64 ; pub const OP_ADD : i64 = 6i64 ; pub const TYPE_RECT2 : i64 = 6i64 ; pub const BUTTON_WHEEL_RIGHT : i64 = 7i64 ; pub const ERR_FILE_NOT_FOUND : i64 = 7i64 ; pub const JOY_ANALOG_R2 : i64 = 7i64 ; pub const JOY_AXIS_7 : i64 = 7i64 ; pub const JOY_BUTTON_7 : i64 = 7i64 ; pub const JOY_OCULUS_AX : i64 = 7i64 ; pub const JOY_R2 : i64 = 7i64 ; pub const OP_SUBTRACT : i64 = 7i64 ; pub const PROPERTY_HINT_KEY_ACCEL : i64 = 7i64 ; pub const PROPERTY_USAGE_DEFAULT : i64 = 7i64 ; pub const TYPE_VECTOR3 : i64 = 7i64 ; pub const BUTTON_XBUTTON1 : i64 = 8i64 ; pub const ERR_FILE_BAD_DRIVE : i64 = 8i64 ; pub const JOY_AXIS_8 : i64 = 8i64 ; pub const JOY_BUTTON_8 : i64 = 8i64 ; pub const JOY_L3 : i64 = 8i64 ; pub const METHOD_FLAG_CONST : i64 = 8i64 ; pub const MIDI_MESSAGE_NOTE_OFF : i64 = 8i64 ; pub const OP_MULTIPLY : i64 = 8i64 ; pub const PROPERTY_HINT_FLAGS : i64 = 8i64 ; pub const PROPERTY_USAGE_EDITOR_HELPER : i64 = 8i64 ; pub const TYPE_TRANSFORM2D : i64 = 8i64 ; pub const BUTTON_XBUTTON2 : i64 = 9i64 ; pub const ERR_FILE_BAD_PATH : i64 = 9i64 ; pub const JOY_AXIS_9 : i64 = 9i64 ; pub const JOY_BUTTON_9 : i64 = 9i64 ; pub const JOY_R3 : i64 = 9i64 ; pub const MIDI_MESSAGE_NOTE_ON : i64 = 9i64 ; pub const OP_DIVIDE : i64 = 9i64 ; pub const PROPERTY_HINT_LAYERS_2D_RENDER : i64 = 9i64 ; pub const TYPE_PLANE : i64 = 9i64 ; pub const ERR_FILE_NO_PERMISSION : i64 = 10i64 ; pub const JOY_AXIS_MAX : i64 = 10i64 ; pub const JOY_BUTTON_10 : i64 = 10i64 ; pub const JOY_SELECT : i64 = 10i64 ; pub const MIDI_MESSAGE_AFTERTOUCH : i64 = 10i64 ; pub const OP_NEGATE : i64 = 10i64 ; pub const PROPERTY_HINT_LAYERS_2D_PHYSICS : i64 = 10i64 ; pub const TYPE_QUAT : i64 = 10i64 ; pub const ERR_FILE_ALREADY_IN_USE : i64 = 11i64 ; pub const JOY_BUTTON_11 : i64 = 11i64 ; pub const JOY_START : i64 = 11i64 ; pub const MIDI_MESSAGE_CONTROL_CHANGE : i64 = 11i64 ; pub const OP_POSITIVE : i64 = 11i64 ; pub const PROPERTY_HINT_LAYERS_2D_NAVIGATION : i64 = 11i64 ; pub const TYPE_AABB : i64 = 11i64 ; pub const ERR_FILE_CANT_OPEN : i64 = 12i64 ; pub const JOY_BUTTON_12 : i64 = 12i64 ; pub const JOY_DPAD_UP : i64 = 12i64 ; pub const MIDI_MESSAGE_PROGRAM_CHANGE : i64 = 12i64 ; pub const OP_MODULE : i64 = 12i64 ; pub const PROPERTY_HINT_LAYERS_3D_RENDER : i64 = 12i64 ; pub const TYPE_BASIS : i64 = 12i64 ; pub const ERR_FILE_CANT_WRITE : i64 = 13i64 ; pub const JOY_BUTTON_13 : i64 = 13i64 ; pub const JOY_DPAD_DOWN : i64 = 13i64 ; pub const MIDI_MESSAGE_CHANNEL_PRESSURE : i64 = 13i64 ; pub const OP_STRING_CONCAT : i64 = 13i64 ; pub const PROPERTY_HINT_LAYERS_3D_PHYSICS : i64 = 13i64 ; pub const TYPE_TRANSFORM : i64 = 13i64 ; pub const ERR_FILE_CANT_READ : i64 = 14i64 ; pub const JOY_BUTTON_14 : i64 = 14i64 ; pub const JOY_DPAD_LEFT : i64 = 14i64 ; pub const JOY_VR_PAD : i64 = 14i64 ; pub const MIDI_MESSAGE_PITCH_BEND : i64 = 14i64 ; pub const OP_SHIFT_LEFT : i64 = 14i64 ; pub const PROPERTY_HINT_LAYERS_3D_NAVIGATION : i64 = 14i64 ; pub const TYPE_COLOR : i64 = 14i64 ; pub const ERR_FILE_UNRECOGNIZED : i64 = 15i64 ; pub const JOY_BUTTON_15 : i64 = 15i64 ; pub const JOY_DPAD_RIGHT : i64 = 15i64 ; pub const JOY_VR_TRIGGER : i64 = 15i64 ; pub const OP_SHIFT_RIGHT : i64 = 15i64 ; pub const PROPERTY_HINT_FILE : i64 = 15i64 ; pub const TYPE_NODE_PATH : i64 = 15i64 ; pub const ERR_FILE_CORRUPT : i64 = 16i64 ; pub const JOY_BUTTON_16 : i64 = 16i64 ; pub const JOY_GUIDE : i64 = 16i64 ; pub const METHOD_FLAG_REVERSE : i64 = 16i64 ; pub const OP_BIT_AND : i64 = 16i64 ; pub const PROPERTY_HINT_DIR : i64 = 16i64 ; pub const PROPERTY_USAGE_CHECKABLE : i64 = 16i64 ; pub const TYPE_RID : i64 = 16i64 ; pub const ERR_FILE_MISSING_DEPENDENCIES : i64 = 17i64 ; pub const JOY_BUTTON_17 : i64 = 17i64 ; pub const JOY_MISC1 : i64 = 17i64 ; pub const OP_BIT_OR : i64 = 17i64 ; pub const PROPERTY_HINT_GLOBAL_FILE : i64 = 17i64 ; pub const TYPE_OBJECT : i64 = 17i64 ; pub const ERR_FILE_EOF : i64 = 18i64 ; pub const JOY_BUTTON_18 : i64 = 18i64 ; pub const JOY_PADDLE1 : i64 = 18i64 ; pub const OP_BIT_XOR : i64 = 18i64 ; pub const PROPERTY_HINT_GLOBAL_DIR : i64 = 18i64 ; pub const TYPE_DICTIONARY : i64 = 18i64 ; pub const ERR_CANT_OPEN : i64 = 19i64 ; pub const JOY_BUTTON_19 : i64 = 19i64 ; pub const JOY_PADDLE2 : i64 = 19i64 ; pub const OP_BIT_NEGATE : i64 = 19i64 ; pub const PROPERTY_HINT_RESOURCE_TYPE : i64 = 19i64 ; pub const TYPE_ARRAY : i64 = 19i64 ; pub const ERR_CANT_CREATE : i64 = 20i64 ; pub const JOY_BUTTON_20 : i64 = 20i64 ; pub const JOY_PADDLE3 : i64 = 20i64 ; pub const OP_AND : i64 = 20i64 ; pub const PROPERTY_HINT_MULTILINE_TEXT : i64 = 20i64 ; pub const TYPE_RAW_ARRAY : i64 = 20i64 ; pub const ERR_QUERY_FAILED : i64 = 21i64 ; pub const JOY_BUTTON_21 : i64 = 21i64 ; pub const JOY_PADDLE4 : i64 = 21i64 ; pub const OP_OR : i64 = 21i64 ; pub const PROPERTY_HINT_PLACEHOLDER_TEXT : i64 = 21i64 ; pub const TYPE_INT_ARRAY : i64 = 21i64 ; pub const ERR_ALREADY_IN_USE : i64 = 22i64 ; pub const JOY_BUTTON_22 : i64 = 22i64 ; pub const JOY_TOUCHPAD : i64 = 22i64 ; pub const OP_XOR : i64 = 22i64 ; pub const PROPERTY_HINT_COLOR_NO_ALPHA : i64 = 22i64 ; pub const TYPE_REAL_ARRAY : i64 = 22i64 ; pub const ERR_LOCKED : i64 = 23i64 ; pub const OP_NOT : i64 = 23i64 ; pub const PROPERTY_HINT_IMAGE_COMPRESS_LOSSY : i64 = 23i64 ; pub const TYPE_STRING_ARRAY : i64 = 23i64 ; pub const ERR_TIMEOUT : i64 = 24i64 ; pub const OP_IN : i64 = 24i64 ; pub const PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS : i64 = 24i64 ; pub const TYPE_VECTOR2_ARRAY : i64 = 24i64 ; pub const ERR_CANT_CONNECT : i64 = 25i64 ; pub const OP_MAX : i64 = 25i64 ; pub const TYPE_VECTOR3_ARRAY : i64 = 25i64 ; pub const ERR_CANT_RESOLVE : i64 = 26i64 ; pub const TYPE_COLOR_ARRAY : i64 = 26i64 ; pub const ERR_CONNECTION_ERROR : i64 = 27i64 ; pub const TYPE_MAX : i64 = 27i64 ; pub const ERR_CANT_ACQUIRE_RESOURCE : i64 = 28i64 ; pub const ERR_CANT_FORK : i64 = 29i64 ; pub const ERR_INVALID_DATA : i64 = 30i64 ; pub const ERR_INVALID_PARAMETER : i64 = 31i64 ; pub const ERR_ALREADY_EXISTS : i64 = 32i64 ; pub const KEY_SPACE : i64 = 32i64 ; pub const METHOD_FLAG_VIRTUAL : i64 = 32i64 ; pub const PROPERTY_USAGE_CHECKED : i64 = 32i64 ; pub const ERR_DOES_NOT_EXIST : i64 = 33i64 ; pub const KEY_EXCLAM : i64 = 33i64 ; pub const ERR_DATABASE_CANT_READ : i64 = 34i64 ; pub const KEY_QUOTEDBL : i64 = 34i64 ; pub const ERR_DATABASE_CANT_WRITE : i64 = 35i64 ; pub const KEY_NUMBERSIGN : i64 = 35i64 ; pub const ERR_COMPILATION_FAILED : i64 = 36i64 ; pub const KEY_DOLLAR : i64 = 36i64 ; pub const ERR_METHOD_NOT_FOUND : i64 = 37i64 ; pub const KEY_PERCENT : i64 = 37i64 ; pub const ERR_LINK_FAILED : i64 = 38i64 ; pub const KEY_AMPERSAND : i64 = 38i64 ; pub const ERR_SCRIPT_FAILED : i64 = 39i64 ; pub const KEY_APOSTROPHE : i64 = 39i64 ; pub const PROPERTY_HINT_ENUM_SUGGESTION : i64 = 39i64 ; pub const ERR_CYCLIC_LINK : i64 = 40i64 ; pub const KEY_PARENLEFT : i64 = 40i64 ; pub const ERR_INVALID_DECLARATION : i64 = 41i64 ; pub const KEY_PARENRIGHT : i64 = 41i64 ; pub const ERR_DUPLICATE_SYMBOL : i64 = 42i64 ; pub const KEY_ASTERISK : i64 = 42i64 ; pub const ERR_PARSE_ERROR : i64 = 43i64 ; pub const KEY_PLUS : i64 = 43i64 ; pub const ERR_BUSY : i64 = 44i64 ; pub const KEY_COMMA : i64 = 44i64 ; pub const ERR_SKIP : i64 = 45i64 ; pub const KEY_MINUS : i64 = 45i64 ; pub const ERR_HELP : i64 = 46i64 ; pub const KEY_PERIOD : i64 = 46i64 ; pub const ERR_BUG : i64 = 47i64 ; pub const KEY_SLASH : i64 = 47i64 ; pub const ERR_PRINTER_ON_FIRE : i64 = 48i64 ; pub const KEY_0 : i64 = 48i64 ; pub const KEY_1 : i64 = 49i64 ; pub const KEY_2 : i64 = 50i64 ; pub const KEY_3 : i64 = 51i64 ; pub const KEY_4 : i64 = 52i64 ; pub const KEY_5 : i64 = 53i64 ; pub const KEY_6 : i64 = 54i64 ; pub const KEY_7 : i64 = 55i64 ; pub const KEY_8 : i64 = 56i64 ; pub const KEY_9 : i64 = 57i64 ; pub const KEY_COLON : i64 = 58i64 ; pub const KEY_SEMICOLON : i64 = 59i64 ; pub const KEY_LESS : i64 = 60i64 ; pub const KEY_EQUAL : i64 = 61i64 ; pub const KEY_GREATER : i64 = 62i64 ; pub const KEY_QUESTION : i64 = 63i64 ; pub const KEY_AT : i64 = 64i64 ; pub const METHOD_FLAG_FROM_SCRIPT : i64 = 64i64 ; pub const PROPERTY_USAGE_INTERNATIONALIZED : i64 = 64i64 ; pub const KEY_A : i64 = 65i64 ; pub const KEY_B : i64 = 66i64 ; pub const KEY_C : i64 = 67i64 ; pub const KEY_D : i64 = 68i64 ; pub const KEY_E : i64 = 69i64 ; pub const KEY_F : i64 = 70i64 ; pub const KEY_G : i64 = 71i64 ; pub const PROPERTY_USAGE_DEFAULT_INTL : i64 = 71i64 ; pub const KEY_H : i64 = 72i64 ; pub const KEY_I : i64 = 73i64 ; pub const KEY_J : i64 = 74i64 ; pub const KEY_K : i64 = 75i64 ; pub const KEY_L : i64 = 76i64 ; pub const KEY_M : i64 = 77i64 ; pub const KEY_N : i64 = 78i64 ; pub const KEY_O : i64 = 79i64 ; pub const KEY_P : i64 = 80i64 ; pub const KEY_Q : i64 = 81i64 ; pub const KEY_R : i64 = 82i64 ; pub const KEY_S : i64 = 83i64 ; pub const KEY_T : i64 = 84i64 ; pub const KEY_U : i64 = 85i64 ; pub const KEY_V : i64 = 86i64 ; pub const KEY_W : i64 = 87i64 ; pub const KEY_X : i64 = 88i64 ; pub const KEY_Y : i64 = 89i64 ; pub const KEY_Z : i64 = 90i64 ; pub const KEY_BRACKETLEFT : i64 = 91i64 ; pub const KEY_BACKSLASH : i64 = 92i64 ; pub const KEY_BRACKETRIGHT : i64 = 93i64 ; pub const KEY_ASCIICIRCUM : i64 = 94i64 ; pub const KEY_UNDERSCORE : i64 = 95i64 ; pub const KEY_QUOTELEFT : i64 = 96i64 ; pub const KEY_BRACELEFT : i64 = 123i64 ; pub const KEY_BAR : i64 = 124i64 ; pub const KEY_BRACERIGHT : i64 = 125i64 ; pub const KEY_ASCIITILDE : i64 = 126i64 ; pub const BUTTON_MASK_XBUTTON1 : i64 = 128i64 ; pub const JOY_BUTTON_MAX : i64 = 128i64 ; pub const METHOD_FLAG_VARARG : i64 = 128i64 ; pub const PROPERTY_USAGE_GROUP : i64 = 128i64 ; pub const KEY_NOBREAKSPACE : i64 = 160i64 ; pub const KEY_EXCLAMDOWN : i64 = 161i64 ; pub const KEY_CENT : i64 = 162i64 ; pub const KEY_STERLING : i64 = 163i64 ; pub const KEY_CURRENCY : i64 = 164i64 ; pub const KEY_YEN : i64 = 165i64 ; pub const KEY_BROKENBAR : i64 = 166i64 ; pub const KEY_SECTION : i64 = 167i64 ; pub const KEY_DIAERESIS : i64 = 168i64 ; pub const KEY_COPYRIGHT : i64 = 169i64 ; pub const KEY_ORDFEMININE : i64 = 170i64 ; pub const KEY_GUILLEMOTLEFT : i64 = 171i64 ; pub const KEY_NOTSIGN : i64 = 172i64 ; pub const KEY_HYPHEN : i64 = 173i64 ; pub const KEY_REGISTERED : i64 = 174i64 ; pub const KEY_MACRON : i64 = 175i64 ; pub const KEY_DEGREE : i64 = 176i64 ; pub const KEY_PLUSMINUS : i64 = 177i64 ; pub const KEY_TWOSUPERIOR : i64 = 178i64 ; pub const KEY_THREESUPERIOR : i64 = 179i64 ; pub const KEY_ACUTE : i64 = 180i64 ; pub const KEY_MU : i64 = 181i64 ; pub const KEY_PARAGRAPH : i64 = 182i64 ; pub const KEY_PERIODCENTERED : i64 = 183i64 ; pub const KEY_CEDILLA : i64 = 184i64 ; pub const KEY_ONESUPERIOR : i64 = 185i64 ; pub const KEY_MASCULINE : i64 = 186i64 ; pub const KEY_GUILLEMOTRIGHT : i64 = 187i64 ; pub const KEY_ONEQUARTER : i64 = 188i64 ; pub const KEY_ONEHALF : i64 = 189i64 ; pub const KEY_THREEQUARTERS : i64 = 190i64 ; pub const KEY_QUESTIONDOWN : i64 = 191i64 ; pub const KEY_AGRAVE : i64 = 192i64 ; pub const KEY_AACUTE : i64 = 193i64 ; pub const KEY_ACIRCUMFLEX : i64 = 194i64 ; pub const KEY_ATILDE : i64 = 195i64 ; pub const KEY_ADIAERESIS : i64 = 196i64 ; pub const KEY_ARING : i64 = 197i64 ; pub const KEY_AE : i64 = 198i64 ; pub const KEY_CCEDILLA : i64 = 199i64 ; pub const KEY_EGRAVE : i64 = 200i64 ; pub const KEY_EACUTE : i64 = 201i64 ; pub const KEY_ECIRCUMFLEX : i64 = 202i64 ; pub const KEY_EDIAERESIS : i64 = 203i64 ; pub const KEY_IGRAVE : i64 = 204i64 ; pub const KEY_IACUTE : i64 = 205i64 ; pub const KEY_ICIRCUMFLEX : i64 = 206i64 ; pub const KEY_IDIAERESIS : i64 = 207i64 ; pub const KEY_ETH : i64 = 208i64 ; pub const KEY_NTILDE : i64 = 209i64 ; pub const KEY_OGRAVE : i64 = 210i64 ; pub const KEY_OACUTE : i64 = 211i64 ; pub const KEY_OCIRCUMFLEX : i64 = 212i64 ; pub const KEY_OTILDE : i64 = 213i64 ; pub const KEY_ODIAERESIS : i64 = 214i64 ; pub const KEY_MULTIPLY : i64 = 215i64 ; pub const KEY_OOBLIQUE : i64 = 216i64 ; pub const KEY_UGRAVE : i64 = 217i64 ; pub const KEY_UACUTE : i64 = 218i64 ; pub const KEY_UCIRCUMFLEX : i64 = 219i64 ; pub const KEY_UDIAERESIS : i64 = 220i64 ; pub const KEY_YACUTE : i64 = 221i64 ; pub const KEY_THORN : i64 = 222i64 ; pub const KEY_SSHARP : i64 = 223i64 ; pub const MIDI_MESSAGE_SYSTEM_EXCLUSIVE : i64 = 240i64 ; pub const MIDI_MESSAGE_QUARTER_FRAME : i64 = 241i64 ; pub const MIDI_MESSAGE_SONG_POSITION_POINTER : i64 = 242i64 ; pub const MIDI_MESSAGE_SONG_SELECT : i64 = 243i64 ; pub const MIDI_MESSAGE_TUNE_REQUEST : i64 = 246i64 ; pub const KEY_DIVISION : i64 = 247i64 ; pub const MIDI_MESSAGE_TIMING_CLOCK : i64 = 248i64 ; pub const MIDI_MESSAGE_START : i64 = 250i64 ; pub const MIDI_MESSAGE_CONTINUE : i64 = 251i64 ; pub const MIDI_MESSAGE_STOP : i64 = 252i64 ; pub const MIDI_MESSAGE_ACTIVE_SENSING : i64 = 254i64 ; pub const KEY_YDIAERESIS : i64 = 255i64 ; pub const MIDI_MESSAGE_SYSTEM_RESET : i64 = 255i64 ; pub const BUTTON_MASK_XBUTTON2 : i64 = 256i64 ; pub const PROPERTY_USAGE_CATEGORY : i64 = 256i64 ; pub const PROPERTY_USAGE_NO_INSTANCE_STATE : i64 = 2048i64 ; pub const PROPERTY_USAGE_RESTART_IF_CHANGED : i64 = 4096i64 ; pub const PROPERTY_USAGE_SCRIPT_VARIABLE : i64 = 8192i64 ; pub const SPKEY : i64 = 16777216i64 ; pub const KEY_ESCAPE : i64 = 16777217i64 ; pub const KEY_TAB : i64 = 16777218i64 ; pub const KEY_BACKTAB : i64 = 16777219i64 ; pub const KEY_BACKSPACE : i64 = 16777220i64 ; pub const KEY_ENTER : i64 = 16777221i64 ; pub const KEY_KP_ENTER : i64 = 16777222i64 ; pub const KEY_INSERT : i64 = 16777223i64 ; pub const KEY_DELETE : i64 = 16777224i64 ; pub const KEY_PAUSE : i64 = 16777225i64 ; pub const KEY_PRINT : i64 = 16777226i64 ; pub const KEY_SYSREQ : i64 = 16777227i64 ; pub const KEY_CLEAR : i64 = 16777228i64 ; pub const KEY_HOME : i64 = 16777229i64 ; pub const KEY_END : i64 = 16777230i64 ; pub const KEY_LEFT : i64 = 16777231i64 ; pub const KEY_UP : i64 = 16777232i64 ; pub const KEY_RIGHT : i64 = 16777233i64 ; pub const KEY_DOWN : i64 = 16777234i64 ; pub const KEY_PAGEUP : i64 = 16777235i64 ; pub const KEY_PAGEDOWN : i64 = 16777236i64 ; pub const KEY_SHIFT : i64 = 16777237i64 ; pub const KEY_CONTROL : i64 = 16777238i64 ; pub const KEY_META : i64 = 16777239i64 ; pub const KEY_ALT : i64 = 16777240i64 ; pub const KEY_CAPSLOCK : i64 = 16777241i64 ; pub const KEY_NUMLOCK : i64 = 16777242i64 ; pub const KEY_SCROLLLOCK : i64 = 16777243i64 ; pub const KEY_F1 : i64 = 16777244i64 ; pub const KEY_F2 : i64 = 16777245i64 ; pub const KEY_F3 : i64 = 16777246i64 ; pub const KEY_F4 : i64 = 16777247i64 ; pub const KEY_F5 : i64 = 16777248i64 ; pub const KEY_F6 : i64 = 16777249i64 ; pub const KEY_F7 : i64 = 16777250i64 ; pub const KEY_F8 : i64 = 16777251i64 ; pub const KEY_F9 : i64 = 16777252i64 ; pub const KEY_F10 : i64 = 16777253i64 ; pub const KEY_F11 : i64 = 16777254i64 ; pub const KEY_F12 : i64 = 16777255i64 ; pub const KEY_F13 : i64 = 16777256i64 ; pub const KEY_F14 : i64 = 16777257i64 ; pub const KEY_F15 : i64 = 16777258i64 ; pub const KEY_F16 : i64 = 16777259i64 ; pub const KEY_SUPER_L : i64 = 16777260i64 ; pub const KEY_SUPER_R : i64 = 16777261i64 ; pub const KEY_MENU : i64 = 16777262i64 ; pub const KEY_HYPER_L : i64 = 16777263i64 ; pub const KEY_HYPER_R : i64 = 16777264i64 ; pub const KEY_HELP : i64 = 16777265i64 ; pub const KEY_DIRECTION_L : i64 = 16777266i64 ; pub const KEY_DIRECTION_R : i64 = 16777267i64 ; pub const KEY_BACK : i64 = 16777280i64 ; pub const KEY_FORWARD : i64 = 16777281i64 ; pub const KEY_STOP : i64 = 16777282i64 ; pub const KEY_REFRESH : i64 = 16777283i64 ; pub const KEY_VOLUMEDOWN : i64 = 16777284i64 ; pub const KEY_VOLUMEMUTE : i64 = 16777285i64 ; pub const KEY_VOLUMEUP : i64 = 16777286i64 ; pub const KEY_BASSBOOST : i64 = 16777287i64 ; pub const KEY_BASSUP : i64 = 16777288i64 ; pub const KEY_BASSDOWN : i64 = 16777289i64 ; pub const KEY_TREBLEUP : i64 = 16777290i64 ; pub const KEY_TREBLEDOWN : i64 = 16777291i64 ; pub const KEY_MEDIAPLAY : i64 = 16777292i64 ; pub const KEY_MEDIASTOP : i64 = 16777293i64 ; pub const KEY_MEDIAPREVIOUS : i64 = 16777294i64 ; pub const KEY_MEDIANEXT : i64 = 16777295i64 ; pub const KEY_MEDIARECORD : i64 = 16777296i64 ; pub const KEY_HOMEPAGE : i64 = 16777297i64 ; pub const KEY_FAVORITES : i64 = 16777298i64 ; pub const KEY_SEARCH : i64 = 16777299i64 ; pub const KEY_STANDBY : i64 = 16777300i64 ; pub const KEY_OPENURL : i64 = 16777301i64 ; pub const KEY_LAUNCHMAIL : i64 = 16777302i64 ; pub const KEY_LAUNCHMEDIA : i64 = 16777303i64 ; pub const KEY_LAUNCH0 : i64 = 16777304i64 ; pub const KEY_LAUNCH1 : i64 = 16777305i64 ; pub const KEY_LAUNCH2 : i64 = 16777306i64 ; pub const KEY_LAUNCH3 : i64 = 16777307i64 ; pub const KEY_LAUNCH4 : i64 = 16777308i64 ; pub const KEY_LAUNCH5 : i64 = 16777309i64 ; pub const KEY_LAUNCH6 : i64 = 16777310i64 ; pub const KEY_LAUNCH7 : i64 = 16777311i64 ; pub const KEY_LAUNCH8 : i64 = 16777312i64 ; pub const KEY_LAUNCH9 : i64 = 16777313i64 ; pub const KEY_LAUNCHA : i64 = 16777314i64 ; pub const KEY_LAUNCHB : i64 = 16777315i64 ; pub const KEY_LAUNCHC : i64 = 16777316i64 ; pub const KEY_LAUNCHD : i64 = 16777317i64 ; pub const KEY_LAUNCHE : i64 = 16777318i64 ; pub const KEY_LAUNCHF : i64 = 16777319i64 ; pub const KEY_KP_MULTIPLY : i64 = 16777345i64 ; pub const KEY_KP_DIVIDE : i64 = 16777346i64 ; pub const KEY_KP_SUBTRACT : i64 = 16777347i64 ; pub const KEY_KP_PERIOD : i64 = 16777348i64 ; pub const KEY_KP_ADD : i64 = 16777349i64 ; pub const KEY_KP_0 : i64 = 16777350i64 ; pub const KEY_KP_1 : i64 = 16777351i64 ; pub const KEY_KP_2 : i64 = 16777352i64 ; pub const KEY_KP_3 : i64 = 16777353i64 ; pub const KEY_KP_4 : i64 = 16777354i64 ; pub const KEY_KP_5 : i64 = 16777355i64 ; pub const KEY_KP_6 : i64 = 16777356i64 ; pub const KEY_KP_7 : i64 = 16777357i64 ; pub const KEY_KP_8 : i64 = 16777358i64 ; pub const KEY_KP_9 : i64 = 16777359i64 ; pub const KEY_CODE_MASK : i64 = 33554431i64 ; pub const KEY_UNKNOWN : i64 = 33554431i64 ; pub const KEY_MASK_SHIFT : i64 = 33554432i64 ; pub const KEY_MASK_ALT : i64 = 67108864i64 ; pub const KEY_MASK_META : i64 = 134217728i64 ; pub const KEY_MASK_CMD : i64 = 268435456i64 ; pub const KEY_MASK_CTRL : i64 = 268435456i64 ; pub const KEY_MASK_KPAD : i64 = 536870912i64 ; pub const KEY_MASK_GROUP_SWITCH : i64 = 1073741824i64 ; } impl GlobalConstants { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("GlobalConstants\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } } impl gdnative_core :: private :: godot_object :: Sealed for GlobalConstants { } unsafe impl GodotObject for GlobalConstants { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GlobalConstants" } } unsafe impl Send for GlobalConstants { } unsafe impl Sync for GlobalConstants { }
                use super::*;
            }
            pub use crate::generated::global_constants::private::GlobalConstants;
            
            pub mod aes_context {
                # ! [doc = "This module contains types related to the API class [`AESContext`][super::AESContext]."] pub (crate) mod private { # [doc = "`core class AESContext` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`aes_context`][super::aes_context] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_aescontext.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAESContext inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AESContext { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AESContext ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const ECB_ENCRYPT : Mode = Mode (0i64) ; pub const ECB_DECRYPT : Mode = Mode (1i64) ; pub const CBC_ENCRYPT : Mode = Mode (2i64) ; pub const CBC_DECRYPT : Mode = Mode (3i64) ; pub const MAX : Mode = Mode (4i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } impl FromVariant for Mode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AESContext { pub const MODE_ECB_ENCRYPT : i64 = 0i64 ; pub const MODE_ECB_DECRYPT : i64 = 1i64 ; pub const MODE_CBC_ENCRYPT : i64 = 2i64 ; pub const MODE_CBC_DECRYPT : i64 = 3i64 ; pub const MODE_MAX : i64 = 4i64 ; } impl AESContext { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AESContextMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Close this AES context so it can be started again. See [`start`][Self::start]."] # [doc = ""] # [inline] pub fn finish (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AESContextMethodTable :: get (get_api ()) . finish ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Get the current IV state for this context (IV gets updated when calling [`update`][Self::update]). You normally don't need this function.\n**Note:** This function only makes sense when the context is started with [`MODE_CBC_ENCRYPT`][Self::MODE_CBC_ENCRYPT] or [`MODE_CBC_DECRYPT`][Self::MODE_CBC_DECRYPT]."] # [doc = ""] # [inline] pub fn get_iv_state (& self) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = AESContextMethodTable :: get (get_api ()) . get_iv_state ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Start the AES context in the given `mode`. A `key` of either 16 or 32 bytes must always be provided, while an `iv` (initialization vector) of exactly 16 bytes, is only needed when `mode` is either [`MODE_CBC_ENCRYPT`][Self::MODE_CBC_ENCRYPT] or [`MODE_CBC_DECRYPT`][Self::MODE_CBC_DECRYPT].\n# Default Arguments\n* `iv` - `PoolByteArray(  )`"] # [doc = ""] # [inline] pub fn start (& self , mode : i64 , key : PoolArray < u8 > , iv : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = AESContextMethodTable :: get (get_api ()) . start ; let ret = crate :: icalls :: icallvar__i64_bytearr_bytearr (method_bind , self . this . sys () . as_ptr () , mode as _ , key , iv) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Run the desired operation for this AES context. Will return a [`PoolByteArray`][PoolArray<u8>] containing the result of encrypting (or decrypting) the given `src`. See [`start`][Self::start] for mode of operation.\n**Note:** The size of `src` must be a multiple of 16. Apply some padding if needed."] # [doc = ""] # [inline] pub fn update (& self , src : PoolArray < u8 >) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = AESContextMethodTable :: get (get_api ()) . update ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , src) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for AESContext { } unsafe impl GodotObject for AESContext { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AESContext" } } impl std :: ops :: Deref for AESContext { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AESContext { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for AESContext { } unsafe impl SubClass < crate :: generated :: Object > for AESContext { } impl Instanciable for AESContext { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AESContext :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AESContextMethodTable { pub class_constructor : sys :: godot_class_constructor , pub finish : * mut sys :: godot_method_bind , pub get_iv_state : * mut sys :: godot_method_bind , pub start : * mut sys :: godot_method_bind , pub update : * mut sys :: godot_method_bind } impl AESContextMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AESContextMethodTable = AESContextMethodTable { class_constructor : None , finish : 0 as * mut sys :: godot_method_bind , get_iv_state : 0 as * mut sys :: godot_method_bind , start : 0 as * mut sys :: godot_method_bind , update : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AESContextMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AESContext\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . finish = (gd_api . godot_method_bind_get_method) (class_name , "finish\0" . as_ptr () as * const c_char) ; table . get_iv_state = (gd_api . godot_method_bind_get_method) (class_name , "get_iv_state\0" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\0" . as_ptr () as * const c_char) ; table . update = (gd_api . godot_method_bind_get_method) (class_name , "update\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::aes_context::private::AESContext;
            
            pub(crate) mod arvr_anchor {
                # ! [doc = "This module contains types related to the API class [`ARVRAnchor`][super::ARVRAnchor]."] pub (crate) mod private { # [doc = "`core class ARVRAnchor` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_arvranchor.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ARVRAnchor` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ARVRAnchor>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nARVRAnchor inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ARVRAnchor { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ARVRAnchor ; impl ARVRAnchor { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ARVRAnchorMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The anchor's ID. You can set this before the anchor itself exists. The first anchor gets an ID of `1`, the second an ID of `2`, etc. When anchors get removed, the engine can then assign the corresponding ID to new anchors. The most common situation where anchors \"disappear\" is when the AR server identifies that two anchors represent different parts of the same plane and merges them."] # [doc = ""] # [inline] pub fn anchor_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRAnchorMethodTable :: get (get_api ()) . get_anchor_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the name given to this anchor."] # [doc = ""] # [inline] pub fn get_anchor_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRAnchorMethodTable :: get (get_api ()) . get_anchor_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the anchor is being tracked and `false` if no anchor with this ID is currently known."] # [doc = ""] # [inline] pub fn get_is_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRAnchorMethodTable :: get (get_api ()) . get_is_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If provided by the [`ARVRInterface`][ARVRInterface], this returns a mesh object for the anchor. For an anchor, this can be a shape related to the object being tracked or it can be a mesh that provides topology related to the anchor and can be used to create shadows/reflections on surfaces or for generating collision shapes."] # [doc = ""] # [inline] pub fn get_mesh (& self) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRAnchorMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a plane aligned with our anchor; handy for intersection testing."] # [doc = ""] # [inline] pub fn get_plane (& self) -> Plane { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRAnchorMethodTable :: get (get_api ()) . get_plane ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Plane > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the estimated size of the plane that was detected. Say when the anchor relates to a table in the real world, this is the estimated size of the surface of that table."] # [doc = ""] # [inline] pub fn get_size (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRAnchorMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The anchor's ID. You can set this before the anchor itself exists. The first anchor gets an ID of `1`, the second an ID of `2`, etc. When anchors get removed, the engine can then assign the corresponding ID to new anchors. The most common situation where anchors \"disappear\" is when the AR server identifies that two anchors represent different parts of the same plane and merges them."] # [doc = ""] # [inline] pub fn set_anchor_id (& self , anchor_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRAnchorMethodTable :: get (get_api ()) . set_anchor_id ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , anchor_id as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRAnchor { } unsafe impl GodotObject for ARVRAnchor { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ARVRAnchor" } } impl QueueFree for ARVRAnchor { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ARVRAnchor { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRAnchor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for ARVRAnchor { } unsafe impl SubClass < crate :: generated :: Node > for ARVRAnchor { } unsafe impl SubClass < crate :: generated :: Object > for ARVRAnchor { } impl Instanciable for ARVRAnchor { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ARVRAnchor :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ARVRAnchorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_anchor_id : * mut sys :: godot_method_bind , pub get_anchor_name : * mut sys :: godot_method_bind , pub get_is_active : * mut sys :: godot_method_bind , pub get_mesh : * mut sys :: godot_method_bind , pub get_plane : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub set_anchor_id : * mut sys :: godot_method_bind } impl ARVRAnchorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ARVRAnchorMethodTable = ARVRAnchorMethodTable { class_constructor : None , get_anchor_id : 0 as * mut sys :: godot_method_bind , get_anchor_name : 0 as * mut sys :: godot_method_bind , get_is_active : 0 as * mut sys :: godot_method_bind , get_mesh : 0 as * mut sys :: godot_method_bind , get_plane : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , set_anchor_id : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ARVRAnchorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ARVRAnchor\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_anchor_id = (gd_api . godot_method_bind_get_method) (class_name , "get_anchor_id\0" . as_ptr () as * const c_char) ; table . get_anchor_name = (gd_api . godot_method_bind_get_method) (class_name , "get_anchor_name\0" . as_ptr () as * const c_char) ; table . get_is_active = (gd_api . godot_method_bind_get_method) (class_name , "get_is_active\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_plane = (gd_api . godot_method_bind_get_method) (class_name , "get_plane\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . set_anchor_id = (gd_api . godot_method_bind_get_method) (class_name , "set_anchor_id\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::arvr_anchor::private::ARVRAnchor;
            
            pub(crate) mod arvr_camera {
                # ! [doc = "This module contains types related to the API class [`ARVRCamera`][super::ARVRCamera]."] pub (crate) mod private { # [doc = "`core class ARVRCamera` inherits `Camera` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_arvrcamera.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ARVRCamera` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ARVRCamera>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nARVRCamera inherits methods from:\n - [Camera](struct.Camera.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ARVRCamera { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ARVRCamera ; impl ARVRCamera { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ARVRCameraMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRCamera { } unsafe impl GodotObject for ARVRCamera { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ARVRCamera" } } impl QueueFree for ARVRCamera { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ARVRCamera { type Target = crate :: generated :: Camera ; # [inline] fn deref (& self) -> & crate :: generated :: Camera { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRCamera { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Camera { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Camera > for ARVRCamera { } unsafe impl SubClass < crate :: generated :: Spatial > for ARVRCamera { } unsafe impl SubClass < crate :: generated :: Node > for ARVRCamera { } unsafe impl SubClass < crate :: generated :: Object > for ARVRCamera { } impl Instanciable for ARVRCamera { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ARVRCamera :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ARVRCameraMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl ARVRCameraMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ARVRCameraMethodTable = ARVRCameraMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ARVRCameraMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ARVRCamera\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::arvr_camera::private::ARVRCamera;
            
            pub(crate) mod arvr_controller {
                # ! [doc = "This module contains types related to the API class [`ARVRController`][super::ARVRController]."] pub (crate) mod private { # [doc = "`core class ARVRController` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_arvrcontroller.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ARVRController` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ARVRController>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nARVRController inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ARVRController { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ARVRController ; impl ARVRController { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ARVRControllerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The controller's ID.\nA controller ID of 0 is unbound and will always result in an inactive node. Controller ID 1 is reserved for the first controller that identifies itself as the left-hand controller and ID 2 is reserved for the first controller that identifies itself as the right-hand controller.\nFor any other controller that the [`ARVRServer`][ARVRServer] detects, we continue with controller ID 3.\nWhen a controller is turned off, its slot is freed. This ensures controllers will keep the same ID even when controllers with lower IDs are turned off."] # [doc = ""] # [inline] pub fn controller_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRControllerMethodTable :: get (get_api ()) . get_controller_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If active, returns the name of the associated controller if provided by the AR/VR SDK used."] # [doc = ""] # [inline] pub fn get_controller_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRControllerMethodTable :: get (get_api ()) . get_controller_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the hand holding this controller, if known. See [enum ARVRPositionalTracker.TrackerHand]."] # [doc = ""] # [inline] pub fn get_hand (& self) -> crate :: generated :: arvr_positional_tracker :: TrackerHand { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRControllerMethodTable :: get (get_api ()) . get_hand ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: arvr_positional_tracker :: TrackerHand > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the bound controller is active. ARVR systems attempt to track active controllers."] # [doc = ""] # [inline] pub fn get_is_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRControllerMethodTable :: get (get_api ()) . get_is_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the value of the given axis for things like triggers, touchpads, etc. that are embedded into the controller."] # [doc = ""] # [inline] pub fn get_joystick_axis (& self , axis : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRControllerMethodTable :: get (get_api ()) . get_joystick_axis ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , axis as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the ID of the joystick object bound to this. Every controller tracked by the [`ARVRServer`][ARVRServer] that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry."] # [doc = ""] # [inline] pub fn get_joystick_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRControllerMethodTable :: get (get_api ()) . get_joystick_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If provided by the [`ARVRInterface`][ARVRInterface], this returns a mesh associated with the controller. This can be used to visualize the controller."] # [doc = ""] # [inline] pub fn get_mesh (& self) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRControllerMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The degree to which the controller vibrates. Ranges from `0.0` to `1.0`. If changed, updates [`ARVRPositionalTracker.rumble`][ARVRPositionalTracker::rumble] accordingly.\nThis is a useful property to animate if you want the controller to vibrate for a limited duration."] # [doc = ""] # [inline] pub fn rumble (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRControllerMethodTable :: get (get_api ()) . get_rumble ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the button at index `button` is pressed. See [`JoystickList`][JoystickList], in particular the `JOY_VR_*` constants."] # [doc = ""] # [inline] pub fn is_button_pressed (& self , button : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRControllerMethodTable :: get (get_api ()) . is_button_pressed ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , button as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The controller's ID.\nA controller ID of 0 is unbound and will always result in an inactive node. Controller ID 1 is reserved for the first controller that identifies itself as the left-hand controller and ID 2 is reserved for the first controller that identifies itself as the right-hand controller.\nFor any other controller that the [`ARVRServer`][ARVRServer] detects, we continue with controller ID 3.\nWhen a controller is turned off, its slot is freed. This ensures controllers will keep the same ID even when controllers with lower IDs are turned off."] # [doc = ""] # [inline] pub fn set_controller_id (& self , controller_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRControllerMethodTable :: get (get_api ()) . set_controller_id ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , controller_id as _) ; } } # [doc = "The degree to which the controller vibrates. Ranges from `0.0` to `1.0`. If changed, updates [`ARVRPositionalTracker.rumble`][ARVRPositionalTracker::rumble] accordingly.\nThis is a useful property to animate if you want the controller to vibrate for a limited duration."] # [doc = ""] # [inline] pub fn set_rumble (& self , rumble : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRControllerMethodTable :: get (get_api ()) . set_rumble ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , rumble as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRController { } unsafe impl GodotObject for ARVRController { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ARVRController" } } impl QueueFree for ARVRController { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ARVRController { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRController { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for ARVRController { } unsafe impl SubClass < crate :: generated :: Node > for ARVRController { } unsafe impl SubClass < crate :: generated :: Object > for ARVRController { } impl Instanciable for ARVRController { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ARVRController :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ARVRControllerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_controller_id : * mut sys :: godot_method_bind , pub get_controller_name : * mut sys :: godot_method_bind , pub get_hand : * mut sys :: godot_method_bind , pub get_is_active : * mut sys :: godot_method_bind , pub get_joystick_axis : * mut sys :: godot_method_bind , pub get_joystick_id : * mut sys :: godot_method_bind , pub get_mesh : * mut sys :: godot_method_bind , pub get_rumble : * mut sys :: godot_method_bind , pub is_button_pressed : * mut sys :: godot_method_bind , pub set_controller_id : * mut sys :: godot_method_bind , pub set_rumble : * mut sys :: godot_method_bind } impl ARVRControllerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ARVRControllerMethodTable = ARVRControllerMethodTable { class_constructor : None , get_controller_id : 0 as * mut sys :: godot_method_bind , get_controller_name : 0 as * mut sys :: godot_method_bind , get_hand : 0 as * mut sys :: godot_method_bind , get_is_active : 0 as * mut sys :: godot_method_bind , get_joystick_axis : 0 as * mut sys :: godot_method_bind , get_joystick_id : 0 as * mut sys :: godot_method_bind , get_mesh : 0 as * mut sys :: godot_method_bind , get_rumble : 0 as * mut sys :: godot_method_bind , is_button_pressed : 0 as * mut sys :: godot_method_bind , set_controller_id : 0 as * mut sys :: godot_method_bind , set_rumble : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ARVRControllerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ARVRController\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_controller_id = (gd_api . godot_method_bind_get_method) (class_name , "get_controller_id\0" . as_ptr () as * const c_char) ; table . get_controller_name = (gd_api . godot_method_bind_get_method) (class_name , "get_controller_name\0" . as_ptr () as * const c_char) ; table . get_hand = (gd_api . godot_method_bind_get_method) (class_name , "get_hand\0" . as_ptr () as * const c_char) ; table . get_is_active = (gd_api . godot_method_bind_get_method) (class_name , "get_is_active\0" . as_ptr () as * const c_char) ; table . get_joystick_axis = (gd_api . godot_method_bind_get_method) (class_name , "get_joystick_axis\0" . as_ptr () as * const c_char) ; table . get_joystick_id = (gd_api . godot_method_bind_get_method) (class_name , "get_joystick_id\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_rumble = (gd_api . godot_method_bind_get_method) (class_name , "get_rumble\0" . as_ptr () as * const c_char) ; table . is_button_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_button_pressed\0" . as_ptr () as * const c_char) ; table . set_controller_id = (gd_api . godot_method_bind_get_method) (class_name , "set_controller_id\0" . as_ptr () as * const c_char) ; table . set_rumble = (gd_api . godot_method_bind_get_method) (class_name , "set_rumble\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::arvr_controller::private::ARVRController;
            
            pub mod arvr_interface {
                # ! [doc = "This module contains types related to the API class [`ARVRInterface`][super::ARVRInterface]."] pub (crate) mod private { # [doc = "`core class ARVRInterface` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`arvr_interface`][super::arvr_interface] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_arvrinterface.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nARVRInterface inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ARVRInterface { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ARVRInterface ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Capabilities (pub i64) ; impl Capabilities { pub const NONE : Capabilities = Capabilities (0i64) ; pub const MONO : Capabilities = Capabilities (1i64) ; pub const STEREO : Capabilities = Capabilities (2i64) ; pub const AR : Capabilities = Capabilities (4i64) ; pub const EXTERNAL : Capabilities = Capabilities (8i64) ; } impl From < i64 > for Capabilities { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Capabilities > for i64 { # [inline] fn from (v : Capabilities) -> Self { v . 0 } } impl FromVariant for Capabilities { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Eyes (pub i64) ; impl Eyes { pub const MONO : Eyes = Eyes (0i64) ; pub const LEFT : Eyes = Eyes (1i64) ; pub const RIGHT : Eyes = Eyes (2i64) ; } impl From < i64 > for Eyes { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Eyes > for i64 { # [inline] fn from (v : Eyes) -> Self { v . 0 } } impl FromVariant for Eyes { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TrackingStatus (pub i64) ; impl TrackingStatus { pub const NORMAL_TRACKING : TrackingStatus = TrackingStatus (0i64) ; pub const EXCESSIVE_MOTION : TrackingStatus = TrackingStatus (1i64) ; pub const INSUFFICIENT_FEATURES : TrackingStatus = TrackingStatus (2i64) ; pub const UNKNOWN_TRACKING : TrackingStatus = TrackingStatus (3i64) ; pub const NOT_TRACKING : TrackingStatus = TrackingStatus (4i64) ; } impl From < i64 > for TrackingStatus { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TrackingStatus > for i64 { # [inline] fn from (v : TrackingStatus) -> Self { v . 0 } } impl FromVariant for TrackingStatus { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ARVRInterface { pub const ARVR_NONE : i64 = 0i64 ; pub const ARVR_NORMAL_TRACKING : i64 = 0i64 ; pub const EYE_MONO : i64 = 0i64 ; pub const ARVR_EXCESSIVE_MOTION : i64 = 1i64 ; pub const ARVR_MONO : i64 = 1i64 ; pub const EYE_LEFT : i64 = 1i64 ; pub const ARVR_INSUFFICIENT_FEATURES : i64 = 2i64 ; pub const ARVR_STEREO : i64 = 2i64 ; pub const EYE_RIGHT : i64 = 2i64 ; pub const ARVR_UNKNOWN_TRACKING : i64 = 3i64 ; pub const ARVR_AR : i64 = 4i64 ; pub const ARVR_NOT_TRACKING : i64 = 4i64 ; pub const ARVR_EXTERNAL : i64 = 8i64 ; } impl ARVRInterface { # [doc = "On an AR interface, `true` if anchor detection is enabled."] # [doc = ""] # [inline] pub fn anchor_detection_is_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . get_anchor_detection_is_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If this is an AR interface that requires displaying a camera feed as the background, this method returns the feed ID in the [`CameraServer`][CameraServer] for this interface."] # [doc = ""] # [inline] pub fn get_camera_feed_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . get_camera_feed_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a combination of [`Capabilities`][Capabilities] flags providing information about the capabilities of this interface."] # [doc = ""] # [inline] pub fn get_capabilities (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . get_capabilities ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc)."] # [doc = ""] # [inline] pub fn get_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . get_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform."] # [doc = ""] # [inline] pub fn get_render_targetsize (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . get_render_targetsize ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking."] # [doc = ""] # [inline] pub fn get_tracking_status (& self) -> crate :: generated :: arvr_interface :: TrackingStatus { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . get_tracking_status ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: arvr_interface :: TrackingStatus > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output.\nAfter initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence.\n**Note:** You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR.\nIf you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport. It will be used to output to the HMD, leaving you free to do anything you like in the main window, such as using a separate camera as a spectator camera or rendering something completely different.\nWhile currently not used, you can activate additional interfaces. You may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD."] # [doc = ""] # [inline] pub fn initialize (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . initialize ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "`true` if this interface been initialized."] # [doc = ""] # [inline] pub fn is_initialized (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . is_initialized ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "`true` if this is the primary interface."] # [doc = ""] # [inline] pub fn is_primary (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . is_primary ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the current output of this interface is in stereo."] # [doc = ""] # [inline] pub fn is_stereo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . is_stereo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "On an AR interface, `true` if anchor detection is enabled."] # [doc = ""] # [inline] pub fn set_anchor_detection_is_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . set_anchor_detection_is_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "`true` if this interface been initialized."] # [doc = ""] # [inline] pub fn set_is_initialized (& self , initialized : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . set_is_initialized ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , initialized as _) ; } } # [doc = "`true` if this is the primary interface."] # [doc = ""] # [inline] pub fn set_is_primary (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . set_is_primary ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Turns the interface off."] # [doc = ""] # [inline] pub fn uninitialize (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRInterfaceMethodTable :: get (get_api ()) . uninitialize ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRInterface { } unsafe impl GodotObject for ARVRInterface { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ARVRInterface" } } impl std :: ops :: Deref for ARVRInterface { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRInterface { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for ARVRInterface { } unsafe impl SubClass < crate :: generated :: Object > for ARVRInterface { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ARVRInterfaceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_anchor_detection_is_enabled : * mut sys :: godot_method_bind , pub get_camera_feed_id : * mut sys :: godot_method_bind , pub get_capabilities : * mut sys :: godot_method_bind , pub get_name : * mut sys :: godot_method_bind , pub get_render_targetsize : * mut sys :: godot_method_bind , pub get_tracking_status : * mut sys :: godot_method_bind , pub initialize : * mut sys :: godot_method_bind , pub is_initialized : * mut sys :: godot_method_bind , pub is_primary : * mut sys :: godot_method_bind , pub is_stereo : * mut sys :: godot_method_bind , pub set_anchor_detection_is_enabled : * mut sys :: godot_method_bind , pub set_is_initialized : * mut sys :: godot_method_bind , pub set_is_primary : * mut sys :: godot_method_bind , pub uninitialize : * mut sys :: godot_method_bind } impl ARVRInterfaceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ARVRInterfaceMethodTable = ARVRInterfaceMethodTable { class_constructor : None , get_anchor_detection_is_enabled : 0 as * mut sys :: godot_method_bind , get_camera_feed_id : 0 as * mut sys :: godot_method_bind , get_capabilities : 0 as * mut sys :: godot_method_bind , get_name : 0 as * mut sys :: godot_method_bind , get_render_targetsize : 0 as * mut sys :: godot_method_bind , get_tracking_status : 0 as * mut sys :: godot_method_bind , initialize : 0 as * mut sys :: godot_method_bind , is_initialized : 0 as * mut sys :: godot_method_bind , is_primary : 0 as * mut sys :: godot_method_bind , is_stereo : 0 as * mut sys :: godot_method_bind , set_anchor_detection_is_enabled : 0 as * mut sys :: godot_method_bind , set_is_initialized : 0 as * mut sys :: godot_method_bind , set_is_primary : 0 as * mut sys :: godot_method_bind , uninitialize : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ARVRInterfaceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ARVRInterface\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_anchor_detection_is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_anchor_detection_is_enabled\0" . as_ptr () as * const c_char) ; table . get_camera_feed_id = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_feed_id\0" . as_ptr () as * const c_char) ; table . get_capabilities = (gd_api . godot_method_bind_get_method) (class_name , "get_capabilities\0" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\0" . as_ptr () as * const c_char) ; table . get_render_targetsize = (gd_api . godot_method_bind_get_method) (class_name , "get_render_targetsize\0" . as_ptr () as * const c_char) ; table . get_tracking_status = (gd_api . godot_method_bind_get_method) (class_name , "get_tracking_status\0" . as_ptr () as * const c_char) ; table . initialize = (gd_api . godot_method_bind_get_method) (class_name , "initialize\0" . as_ptr () as * const c_char) ; table . is_initialized = (gd_api . godot_method_bind_get_method) (class_name , "is_initialized\0" . as_ptr () as * const c_char) ; table . is_primary = (gd_api . godot_method_bind_get_method) (class_name , "is_primary\0" . as_ptr () as * const c_char) ; table . is_stereo = (gd_api . godot_method_bind_get_method) (class_name , "is_stereo\0" . as_ptr () as * const c_char) ; table . set_anchor_detection_is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_anchor_detection_is_enabled\0" . as_ptr () as * const c_char) ; table . set_is_initialized = (gd_api . godot_method_bind_get_method) (class_name , "set_is_initialized\0" . as_ptr () as * const c_char) ; table . set_is_primary = (gd_api . godot_method_bind_get_method) (class_name , "set_is_primary\0" . as_ptr () as * const c_char) ; table . uninitialize = (gd_api . godot_method_bind_get_method) (class_name , "uninitialize\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::arvr_interface::private::ARVRInterface;
            
            pub(crate) mod arvr_interface_gdnative {
                # ! [doc = "This module contains types related to the API class [`ARVRInterfaceGDNative`][super::ARVRInterfaceGDNative]."] pub (crate) mod private { # [doc = "`core class ARVRInterfaceGDNative` inherits `ARVRInterface` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_arvrinterfacegdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nARVRInterfaceGDNative inherits methods from:\n - [ARVRInterface](struct.ARVRInterface.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ARVRInterfaceGDNative { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ARVRInterfaceGDNative ; impl ARVRInterfaceGDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ARVRInterfaceGDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRInterfaceGDNative { } unsafe impl GodotObject for ARVRInterfaceGDNative { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ARVRInterfaceGDNative" } } impl std :: ops :: Deref for ARVRInterfaceGDNative { type Target = crate :: generated :: ARVRInterface ; # [inline] fn deref (& self) -> & crate :: generated :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRInterfaceGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: ARVRInterface > for ARVRInterfaceGDNative { } unsafe impl SubClass < crate :: generated :: Reference > for ARVRInterfaceGDNative { } unsafe impl SubClass < crate :: generated :: Object > for ARVRInterfaceGDNative { } impl Instanciable for ARVRInterfaceGDNative { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ARVRInterfaceGDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ARVRInterfaceGDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl ARVRInterfaceGDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ARVRInterfaceGDNativeMethodTable = ARVRInterfaceGDNativeMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ARVRInterfaceGDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ARVRInterfaceGDNative\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::arvr_interface_gdnative::private::ARVRInterfaceGDNative;
            
            pub(crate) mod arvr_origin {
                # ! [doc = "This module contains types related to the API class [`ARVROrigin`][super::ARVROrigin]."] pub (crate) mod private { # [doc = "`core class ARVROrigin` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_arvrorigin.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ARVROrigin` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ARVROrigin>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nARVROrigin inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ARVROrigin { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ARVROrigin ; impl ARVROrigin { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ARVROriginMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter.\n**Note:** This method is a passthrough to the [`ARVRServer`][ARVRServer] itself."] # [doc = ""] # [inline] pub fn world_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVROriginMethodTable :: get (get_api ()) . get_world_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter.\n**Note:** This method is a passthrough to the [`ARVRServer`][ARVRServer] itself."] # [doc = ""] # [inline] pub fn set_world_scale (& self , world_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVROriginMethodTable :: get (get_api ()) . set_world_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , world_scale as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVROrigin { } unsafe impl GodotObject for ARVROrigin { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ARVROrigin" } } impl QueueFree for ARVROrigin { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ARVROrigin { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVROrigin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for ARVROrigin { } unsafe impl SubClass < crate :: generated :: Node > for ARVROrigin { } unsafe impl SubClass < crate :: generated :: Object > for ARVROrigin { } impl Instanciable for ARVROrigin { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ARVROrigin :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ARVROriginMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_world_scale : * mut sys :: godot_method_bind , pub set_world_scale : * mut sys :: godot_method_bind } impl ARVROriginMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ARVROriginMethodTable = ARVROriginMethodTable { class_constructor : None , get_world_scale : 0 as * mut sys :: godot_method_bind , set_world_scale : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ARVROriginMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ARVROrigin\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_world_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_world_scale\0" . as_ptr () as * const c_char) ; table . set_world_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_world_scale\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::arvr_origin::private::ARVROrigin;
            
            pub mod arvr_positional_tracker {
                # ! [doc = "This module contains types related to the API class [`ARVRPositionalTracker`][super::ARVRPositionalTracker]."] pub (crate) mod private { # [doc = "`core class ARVRPositionalTracker` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`arvr_positional_tracker`][super::arvr_positional_tracker] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_arvrpositionaltracker.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nARVRPositionalTracker inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ARVRPositionalTracker { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ARVRPositionalTracker ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TrackerHand (pub i64) ; impl TrackerHand { pub const HAND_UNKNOWN : TrackerHand = TrackerHand (0i64) ; pub const LEFT_HAND : TrackerHand = TrackerHand (1i64) ; pub const RIGHT_HAND : TrackerHand = TrackerHand (2i64) ; } impl From < i64 > for TrackerHand { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TrackerHand > for i64 { # [inline] fn from (v : TrackerHand) -> Self { v . 0 } } impl FromVariant for TrackerHand { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ARVRPositionalTracker { pub const TRACKER_HAND_UNKNOWN : i64 = 0i64 ; pub const TRACKER_LEFT_HAND : i64 = 1i64 ; pub const TRACKER_RIGHT_HAND : i64 = 2i64 ; } impl ARVRPositionalTracker { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ARVRPositionalTrackerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the hand holding this tracker, if known. See [`TrackerHand`][TrackerHand] constants."] # [doc = ""] # [inline] pub fn get_hand (& self) -> crate :: generated :: arvr_positional_tracker :: TrackerHand { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRPositionalTrackerMethodTable :: get (get_api ()) . get_hand ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: arvr_positional_tracker :: TrackerHand > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If this is a controller that is being tracked, the controller will also be represented by a joystick entry with this ID."] # [doc = ""] # [inline] pub fn get_joy_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRPositionalTrackerMethodTable :: get (get_api ()) . get_joy_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the mesh related to a controller or anchor point if one is available."] # [doc = ""] # [inline] pub fn get_mesh (& self) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRPositionalTrackerMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the controller or anchor point's name if available."] # [doc = ""] # [inline] pub fn get_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRPositionalTrackerMethodTable :: get (get_api ()) . get_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the controller's orientation matrix."] # [doc = ""] # [inline] pub fn get_orientation (& self) -> Basis { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRPositionalTrackerMethodTable :: get (get_api ()) . get_orientation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Basis > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the world-space controller position."] # [doc = ""] # [inline] pub fn get_position (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRPositionalTrackerMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The degree to which the tracker rumbles. Ranges from `0.0` to `1.0` with precision `.01`."] # [doc = ""] # [inline] pub fn rumble (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRPositionalTrackerMethodTable :: get (get_api ()) . get_rumble ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the internal tracker ID. This uniquely identifies the tracker per tracker type and matches the ID you need to specify for nodes such as the [`ARVRController`][ARVRController] and [`ARVRAnchor`][ARVRAnchor] nodes."] # [doc = ""] # [inline] pub fn get_tracker_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRPositionalTrackerMethodTable :: get (get_api ()) . get_tracker_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this device tracks orientation."] # [doc = ""] # [inline] pub fn get_tracks_orientation (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRPositionalTrackerMethodTable :: get (get_api ()) . get_tracks_orientation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this device tracks position."] # [doc = ""] # [inline] pub fn get_tracks_position (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRPositionalTrackerMethodTable :: get (get_api ()) . get_tracks_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the transform combining this device's orientation and position."] # [doc = ""] # [inline] pub fn get_transform (& self , adjust_by_reference_frame : bool) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRPositionalTrackerMethodTable :: get (get_api ()) . get_transform ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , adjust_by_reference_frame as _) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tracker's type."] # [doc = ""] # [inline] pub fn get_type (& self) -> crate :: generated :: arvr_server :: TrackerType { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRPositionalTrackerMethodTable :: get (get_api ()) . get_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: arvr_server :: TrackerType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The degree to which the tracker rumbles. Ranges from `0.0` to `1.0` with precision `.01`."] # [doc = ""] # [inline] pub fn set_rumble (& self , rumble : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRPositionalTrackerMethodTable :: get (get_api ()) . set_rumble ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , rumble as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRPositionalTracker { } unsafe impl GodotObject for ARVRPositionalTracker { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ARVRPositionalTracker" } } impl std :: ops :: Deref for ARVRPositionalTracker { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRPositionalTracker { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for ARVRPositionalTracker { } unsafe impl SubClass < crate :: generated :: Object > for ARVRPositionalTracker { } impl Instanciable for ARVRPositionalTracker { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ARVRPositionalTracker :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ARVRPositionalTrackerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_hand : * mut sys :: godot_method_bind , pub get_joy_id : * mut sys :: godot_method_bind , pub get_mesh : * mut sys :: godot_method_bind , pub get_name : * mut sys :: godot_method_bind , pub get_orientation : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub get_rumble : * mut sys :: godot_method_bind , pub get_tracker_id : * mut sys :: godot_method_bind , pub get_tracks_orientation : * mut sys :: godot_method_bind , pub get_tracks_position : * mut sys :: godot_method_bind , pub get_transform : * mut sys :: godot_method_bind , pub get_type : * mut sys :: godot_method_bind , pub set_rumble : * mut sys :: godot_method_bind } impl ARVRPositionalTrackerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ARVRPositionalTrackerMethodTable = ARVRPositionalTrackerMethodTable { class_constructor : None , get_hand : 0 as * mut sys :: godot_method_bind , get_joy_id : 0 as * mut sys :: godot_method_bind , get_mesh : 0 as * mut sys :: godot_method_bind , get_name : 0 as * mut sys :: godot_method_bind , get_orientation : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , get_rumble : 0 as * mut sys :: godot_method_bind , get_tracker_id : 0 as * mut sys :: godot_method_bind , get_tracks_orientation : 0 as * mut sys :: godot_method_bind , get_tracks_position : 0 as * mut sys :: godot_method_bind , get_transform : 0 as * mut sys :: godot_method_bind , get_type : 0 as * mut sys :: godot_method_bind , set_rumble : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ARVRPositionalTrackerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ARVRPositionalTracker\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_hand = (gd_api . godot_method_bind_get_method) (class_name , "get_hand\0" . as_ptr () as * const c_char) ; table . get_joy_id = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_id\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\0" . as_ptr () as * const c_char) ; table . get_orientation = (gd_api . godot_method_bind_get_method) (class_name , "get_orientation\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_rumble = (gd_api . godot_method_bind_get_method) (class_name , "get_rumble\0" . as_ptr () as * const c_char) ; table . get_tracker_id = (gd_api . godot_method_bind_get_method) (class_name , "get_tracker_id\0" . as_ptr () as * const c_char) ; table . get_tracks_orientation = (gd_api . godot_method_bind_get_method) (class_name , "get_tracks_orientation\0" . as_ptr () as * const c_char) ; table . get_tracks_position = (gd_api . godot_method_bind_get_method) (class_name , "get_tracks_position\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . get_type = (gd_api . godot_method_bind_get_method) (class_name , "get_type\0" . as_ptr () as * const c_char) ; table . set_rumble = (gd_api . godot_method_bind_get_method) (class_name , "set_rumble\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::arvr_positional_tracker::private::ARVRPositionalTracker;
            
            pub mod arvr_server {
                # ! [doc = "This module contains types related to the API class [`ARVRServer`][super::ARVRServer]."] pub (crate) mod private { # [doc = "`core singleton class ARVRServer` inherits `Object` (manually managed).\n\nThis class has related types in the [`arvr_server`][super::arvr_server] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_arvrserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nARVRServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ARVRServer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ARVRServer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct RotationMode (pub i64) ; impl RotationMode { pub const RESET_FULL_ROTATION : RotationMode = RotationMode (0i64) ; pub const RESET_BUT_KEEP_TILT : RotationMode = RotationMode (1i64) ; pub const DONT_RESET_ROTATION : RotationMode = RotationMode (2i64) ; } impl From < i64 > for RotationMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < RotationMode > for i64 { # [inline] fn from (v : RotationMode) -> Self { v . 0 } } impl FromVariant for RotationMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TrackerType (pub i64) ; impl TrackerType { pub const CONTROLLER : TrackerType = TrackerType (1i64) ; pub const BASESTATION : TrackerType = TrackerType (2i64) ; pub const ANCHOR : TrackerType = TrackerType (4i64) ; pub const ANY_KNOWN : TrackerType = TrackerType (127i64) ; pub const UNKNOWN : TrackerType = TrackerType (128i64) ; pub const ANY : TrackerType = TrackerType (255i64) ; } impl From < i64 > for TrackerType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TrackerType > for i64 { # [inline] fn from (v : TrackerType) -> Self { v . 0 } } impl FromVariant for TrackerType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ARVRServer { pub const RESET_FULL_ROTATION : i64 = 0i64 ; pub const RESET_BUT_KEEP_TILT : i64 = 1i64 ; pub const TRACKER_CONTROLLER : i64 = 1i64 ; pub const DONT_RESET_ROTATION : i64 = 2i64 ; pub const TRACKER_BASESTATION : i64 = 2i64 ; pub const TRACKER_ANCHOR : i64 = 4i64 ; pub const TRACKER_ANY_KNOWN : i64 = 127i64 ; pub const TRACKER_UNKNOWN : i64 = 128i64 ; pub const TRACKER_ANY : i64 = 255i64 ; } impl ARVRServer { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("ARVRServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Registers an [`ARVRInterface`][ARVRInterface] object."] # [doc = ""] # [inline] pub fn add_interface (& self , interface : impl AsArg < crate :: generated :: ARVRInterface >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . add_interface ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , interface . as_arg_ptr ()) ; } } # [doc = "Registers a new [`ARVRPositionalTracker`][ARVRPositionalTracker] that tracks a spatial location in real space."] # [doc = ""] # [inline] pub fn add_tracker (& self , tracker : impl AsArg < crate :: generated :: ARVRPositionalTracker >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . add_tracker ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , tracker . as_arg_ptr ()) ; } } # [doc = "This is an important function to understand correctly. AR and VR platforms all handle positioning slightly differently.\nFor platforms that do not offer spatial tracking, our origin point (0,0,0) is the location of our HMD, but you have little control over the direction the player is facing in the real world.\nFor platforms that do offer spatial tracking, our origin point depends very much on the system. For OpenVR, our origin point is usually the center of the tracking space, on the ground. For other platforms, it's often the location of the tracking camera.\nThis method allows you to center your tracker on the location of the HMD. It will take the current location of the HMD and use that to adjust all your tracking data; in essence, realigning the real world to your player's current position in the game world.\nFor this method to produce usable results, tracking information must be available. This often takes a few frames after starting your game.\nYou should call this method after a few seconds have passed. For instance, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism."] # [doc = ""] # [inline] pub fn center_on_hmd (& self , rotation_mode : i64 , keep_height : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . center_on_hmd ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , rotation_mode as _ , keep_height as _) ; } } # [doc = "Clears our current primary interface if it is set to the provided interface."] # [doc = ""] # [inline] pub fn clear_primary_interface_if (& self , interface : impl AsArg < crate :: generated :: ARVRInterface >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . clear_primary_interface_if ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , interface . as_arg_ptr ()) ; } } # [doc = "Finds an interface by its name. For instance, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it."] # [doc = ""] # [inline] pub fn find_interface (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: ARVRInterface , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . find_interface ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Option < Ref < crate :: generated :: ARVRInterface , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the primary interface's transformation."] # [doc = ""] # [inline] pub fn get_hmd_transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_hmd_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the interface registered at a given index in our list of interfaces."] # [doc = ""] # [inline] pub fn get_interface (& self , idx : i64) -> Option < Ref < crate :: generated :: ARVRInterface , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_interface ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: ARVRInterface , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of interfaces currently registered with the AR/VR server. If your project supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try to initialize each interface and use the first one that returns `true`."] # [doc = ""] # [inline] pub fn get_interface_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_interface_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a list of available interfaces the ID and name of each interface."] # [doc = ""] # [inline] pub fn get_interfaces (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_interfaces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the absolute timestamp (in μs) of the last [`ARVRServer`][ARVRServer] commit of the AR/VR eyes to [`VisualServer`][VisualServer]. The value comes from an internal call to [`OS.get_ticks_usec`][OS::get_ticks_usec]."] # [doc = ""] # [inline] pub fn get_last_commit_usec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_last_commit_usec ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the duration (in μs) of the last frame. This is computed as the difference between [`get_last_commit_usec`][Self::get_last_commit_usec] and [`get_last_process_usec`][Self::get_last_process_usec] when committing."] # [doc = ""] # [inline] pub fn get_last_frame_usec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_last_frame_usec ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the absolute timestamp (in μs) of the last [`ARVRServer`][ARVRServer] process callback. The value comes from an internal call to [`OS.get_ticks_usec`][OS::get_ticks_usec]."] # [doc = ""] # [inline] pub fn get_last_process_usec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_last_process_usec ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The primary [`ARVRInterface`][ARVRInterface] currently bound to the [`ARVRServer`][ARVRServer]."] # [doc = ""] # [inline] pub fn primary_interface (& self) -> Option < Ref < crate :: generated :: ARVRInterface , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_primary_interface ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: ARVRInterface , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the reference frame transform. Mostly used internally and exposed for GDNative build interfaces."] # [doc = ""] # [inline] pub fn get_reference_frame (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_reference_frame ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the positional tracker at the given ID."] # [doc = ""] # [inline] pub fn get_tracker (& self , idx : i64) -> Option < Ref < crate :: generated :: ARVRPositionalTracker , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_tracker ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: ARVRPositionalTracker , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of trackers currently registered."] # [doc = ""] # [inline] pub fn get_tracker_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_tracker_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter."] # [doc = ""] # [inline] pub fn world_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . get_world_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Removes this interface."] # [doc = ""] # [inline] pub fn remove_interface (& self , interface : impl AsArg < crate :: generated :: ARVRInterface >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . remove_interface ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , interface . as_arg_ptr ()) ; } } # [doc = "Removes this positional tracker."] # [doc = ""] # [inline] pub fn remove_tracker (& self , tracker : impl AsArg < crate :: generated :: ARVRPositionalTracker >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . remove_tracker ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , tracker . as_arg_ptr ()) ; } } # [doc = "The primary [`ARVRInterface`][ARVRInterface] currently bound to the [`ARVRServer`][ARVRServer]."] # [doc = ""] # [inline] pub fn set_primary_interface (& self , interface : impl AsArg < crate :: generated :: ARVRInterface >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . set_primary_interface ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , interface . as_arg_ptr ()) ; } } # [doc = "Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter."] # [doc = ""] # [inline] pub fn set_world_scale (& self , world_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ARVRServerMethodTable :: get (get_api ()) . set_world_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , world_scale as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ARVRServer { } unsafe impl GodotObject for ARVRServer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ARVRServer" } } impl std :: ops :: Deref for ARVRServer { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ARVRServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for ARVRServer { } unsafe impl Send for ARVRServer { } unsafe impl Sync for ARVRServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ARVRServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_interface : * mut sys :: godot_method_bind , pub add_tracker : * mut sys :: godot_method_bind , pub center_on_hmd : * mut sys :: godot_method_bind , pub clear_primary_interface_if : * mut sys :: godot_method_bind , pub find_interface : * mut sys :: godot_method_bind , pub get_hmd_transform : * mut sys :: godot_method_bind , pub get_interface : * mut sys :: godot_method_bind , pub get_interface_count : * mut sys :: godot_method_bind , pub get_interfaces : * mut sys :: godot_method_bind , pub get_last_commit_usec : * mut sys :: godot_method_bind , pub get_last_frame_usec : * mut sys :: godot_method_bind , pub get_last_process_usec : * mut sys :: godot_method_bind , pub get_primary_interface : * mut sys :: godot_method_bind , pub get_reference_frame : * mut sys :: godot_method_bind , pub get_tracker : * mut sys :: godot_method_bind , pub get_tracker_count : * mut sys :: godot_method_bind , pub get_world_scale : * mut sys :: godot_method_bind , pub remove_interface : * mut sys :: godot_method_bind , pub remove_tracker : * mut sys :: godot_method_bind , pub set_primary_interface : * mut sys :: godot_method_bind , pub set_world_scale : * mut sys :: godot_method_bind } impl ARVRServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ARVRServerMethodTable = ARVRServerMethodTable { class_constructor : None , add_interface : 0 as * mut sys :: godot_method_bind , add_tracker : 0 as * mut sys :: godot_method_bind , center_on_hmd : 0 as * mut sys :: godot_method_bind , clear_primary_interface_if : 0 as * mut sys :: godot_method_bind , find_interface : 0 as * mut sys :: godot_method_bind , get_hmd_transform : 0 as * mut sys :: godot_method_bind , get_interface : 0 as * mut sys :: godot_method_bind , get_interface_count : 0 as * mut sys :: godot_method_bind , get_interfaces : 0 as * mut sys :: godot_method_bind , get_last_commit_usec : 0 as * mut sys :: godot_method_bind , get_last_frame_usec : 0 as * mut sys :: godot_method_bind , get_last_process_usec : 0 as * mut sys :: godot_method_bind , get_primary_interface : 0 as * mut sys :: godot_method_bind , get_reference_frame : 0 as * mut sys :: godot_method_bind , get_tracker : 0 as * mut sys :: godot_method_bind , get_tracker_count : 0 as * mut sys :: godot_method_bind , get_world_scale : 0 as * mut sys :: godot_method_bind , remove_interface : 0 as * mut sys :: godot_method_bind , remove_tracker : 0 as * mut sys :: godot_method_bind , set_primary_interface : 0 as * mut sys :: godot_method_bind , set_world_scale : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ARVRServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ARVRServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_interface = (gd_api . godot_method_bind_get_method) (class_name , "add_interface\0" . as_ptr () as * const c_char) ; table . add_tracker = (gd_api . godot_method_bind_get_method) (class_name , "add_tracker\0" . as_ptr () as * const c_char) ; table . center_on_hmd = (gd_api . godot_method_bind_get_method) (class_name , "center_on_hmd\0" . as_ptr () as * const c_char) ; table . clear_primary_interface_if = (gd_api . godot_method_bind_get_method) (class_name , "clear_primary_interface_if\0" . as_ptr () as * const c_char) ; table . find_interface = (gd_api . godot_method_bind_get_method) (class_name , "find_interface\0" . as_ptr () as * const c_char) ; table . get_hmd_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_hmd_transform\0" . as_ptr () as * const c_char) ; table . get_interface = (gd_api . godot_method_bind_get_method) (class_name , "get_interface\0" . as_ptr () as * const c_char) ; table . get_interface_count = (gd_api . godot_method_bind_get_method) (class_name , "get_interface_count\0" . as_ptr () as * const c_char) ; table . get_interfaces = (gd_api . godot_method_bind_get_method) (class_name , "get_interfaces\0" . as_ptr () as * const c_char) ; table . get_last_commit_usec = (gd_api . godot_method_bind_get_method) (class_name , "get_last_commit_usec\0" . as_ptr () as * const c_char) ; table . get_last_frame_usec = (gd_api . godot_method_bind_get_method) (class_name , "get_last_frame_usec\0" . as_ptr () as * const c_char) ; table . get_last_process_usec = (gd_api . godot_method_bind_get_method) (class_name , "get_last_process_usec\0" . as_ptr () as * const c_char) ; table . get_primary_interface = (gd_api . godot_method_bind_get_method) (class_name , "get_primary_interface\0" . as_ptr () as * const c_char) ; table . get_reference_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_reference_frame\0" . as_ptr () as * const c_char) ; table . get_tracker = (gd_api . godot_method_bind_get_method) (class_name , "get_tracker\0" . as_ptr () as * const c_char) ; table . get_tracker_count = (gd_api . godot_method_bind_get_method) (class_name , "get_tracker_count\0" . as_ptr () as * const c_char) ; table . get_world_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_world_scale\0" . as_ptr () as * const c_char) ; table . remove_interface = (gd_api . godot_method_bind_get_method) (class_name , "remove_interface\0" . as_ptr () as * const c_char) ; table . remove_tracker = (gd_api . godot_method_bind_get_method) (class_name , "remove_tracker\0" . as_ptr () as * const c_char) ; table . set_primary_interface = (gd_api . godot_method_bind_get_method) (class_name , "set_primary_interface\0" . as_ptr () as * const c_char) ; table . set_world_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_world_scale\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::arvr_server::private::ARVRServer;
            
            pub(crate) mod astar {
                # ! [doc = "This module contains types related to the API class [`AStar`][super::AStar]."] pub (crate) mod private { # [doc = "`core class AStar` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_astar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAStar inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AStar { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AStar ; impl AStar { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AStarMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nAdds a new point at the given position with the given identifier. The `id` must be 0 or larger, and the `weight_scale` must be 0.0 or greater.\nThe `weight_scale` is multiplied by the result of [`_compute_cost`][Self::_compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower `weight_scale`s to form a path.\n```gdscript\nvar astar = AStar.new()\nastar.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with weight_scale 4 and id 1\n```\nIf there already exists a point for the given `id`, its position and weight scale are updated to the given values.\n# Default Arguments\n* `weight_scale` - `1.0`"] # [doc = ""] # [inline] pub fn add_point (& self , id : i64 , position : Vector3 , weight_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . add_point ; let ret = crate :: icalls :: icallvar__i64_vec3_f64 (method_bind , self . this . sys () . as_ptr () , id as _ , position , weight_scale as _) ; } } # [doc = "Returns whether the two given points are directly connected by a segment. If `bidirectional` is `false`, returns whether movement from `id` to `to_id` is possible through this segment.\n# Default Arguments\n* `bidirectional` - `true`"] # [doc = ""] # [inline] pub fn are_points_connected (& self , id : i64 , to_id : i64 , bidirectional : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . are_points_connected ; let ret = crate :: icalls :: icallvar__i64_i64_bool (method_bind , self . this . sys () . as_ptr () , id as _ , to_id as _ , bidirectional as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Clears all the points and segments."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCreates a segment between the given points. If `bidirectional` is `false`, only movement from `id` to `to_id` is allowed, not the reverse direction.\n```gdscript\nvar astar = AStar.new()\nastar.add_point(1, Vector3(1, 1, 0))\nastar.add_point(2, Vector3(0, 5, 0))\nastar.connect_points(1, 2, false)\n```\n# Default Arguments\n* `bidirectional` - `true`"] # [doc = ""] # [inline] pub fn connect_points (& self , id : i64 , to_id : i64 , bidirectional : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . connect_points ; let ret = crate :: icalls :: icallvar__i64_i64_bool (method_bind , self . this . sys () . as_ptr () , id as _ , to_id as _ , bidirectional as _) ; } } # [doc = "Deletes the segment between the given points. If `bidirectional` is `false`, only movement from `id` to `to_id` is prevented, and a unidirectional segment possibly remains.\n# Default Arguments\n* `bidirectional` - `true`"] # [doc = ""] # [inline] pub fn disconnect_points (& self , id : i64 , to_id : i64 , bidirectional : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . disconnect_points ; let ret = crate :: icalls :: icallvar__i64_i64_bool (method_bind , self . this . sys () . as_ptr () , id as _ , to_id as _ , bidirectional as _) ; } } # [doc = "Returns the next available point ID with no point associated to it."] # [doc = ""] # [inline] pub fn get_available_point_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . get_available_point_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the ID of the closest point to `to_position`, optionally taking disabled points into account. Returns `-1` if there are no points in the points pool.\n**Note:** If several points are the closest to `to_position`, the one with the smallest ID will be returned, ensuring a deterministic result.\n# Default Arguments\n* `include_disabled` - `false`"] # [doc = ""] # [inline] pub fn get_closest_point (& self , to_position : Vector3 , include_disabled : bool) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . get_closest_point ; let ret = crate :: icalls :: icallvar__vec3_bool (method_bind , self . this . sys () . as_ptr () , to_position , include_disabled as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the closest position to `to_position` that resides inside a segment between two connected points.\n```gdscript\nvar astar = AStar.new()\nastar.add_point(1, Vector3(0, 0, 0))\nastar.add_point(2, Vector3(0, 5, 0))\nastar.connect_points(1, 2)\nvar res = astar.get_closest_position_in_segment(Vector3(3, 3, 0)) # Returns (0, 3, 0)\n```\nThe result is in the segment that goes from `y = 0` to `y = 5`. It's the closest position in the segment to the given point."] # [doc = ""] # [inline] pub fn get_closest_position_in_segment (& self , to_position : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . get_closest_position_in_segment ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , to_position) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns an array with the IDs of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path.\n```gdscript\nvar astar = AStar.new()\nastar.add_point(1, Vector3(0, 0, 0))\nastar.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1\nastar.add_point(3, Vector3(1, 1, 0))\nastar.add_point(4, Vector3(2, 0, 0))\n\nastar.connect_points(1, 2, false)\nastar.connect_points(2, 3, false)\nastar.connect_points(4, 3, false)\nastar.connect_points(1, 4, false)\n\nvar res = astar.get_id_path(1, 3) # Returns [1, 2, 3]\n```\nIf you change the 2nd point's weight to 3, then the result will be `[1, 4, 3]` instead, because now even though the distance is longer, it's \"easier\" to get through point 4 than through point 2."] # [doc = ""] # [inline] pub fn get_id_path (& self , from_id : i64 , to_id : i64) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . get_id_path ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , from_id as _ , to_id as _) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the capacity of the structure backing the points, useful in conjunction with `reserve_space`."] # [doc = ""] # [inline] pub fn get_point_capacity (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . get_point_capacity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns an array with the IDs of the points that form the connection with the given point.\n```gdscript\nvar astar = AStar.new()\nastar.add_point(1, Vector3(0, 0, 0))\nastar.add_point(2, Vector3(0, 1, 0))\nastar.add_point(3, Vector3(1, 1, 0))\nastar.add_point(4, Vector3(2, 0, 0))\n\nastar.connect_points(1, 2, true)\nastar.connect_points(1, 3, true)\n\nvar neighbors = astar.get_point_connections(1) # Returns [2, 3]\n```"] # [doc = ""] # [inline] pub fn get_point_connections (& self , id : i64) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . get_point_connections ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of points currently in the points pool."] # [doc = ""] # [inline] pub fn get_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . get_point_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an array with the points that are in the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path.\n**Note:** This method is not thread-safe. If called from a [`Thread`][Thread], it will return an empty [`PoolVector3Array`][PoolArray<Vector3>] and will print an error message."] # [doc = ""] # [inline] pub fn get_point_path (& self , from_id : i64 , to_id : i64) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . get_point_path ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , from_id as _ , to_id as _) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position of the point associated with the given `id`."] # [doc = ""] # [inline] pub fn get_point_position (& self , id : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . get_point_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the weight scale of the point associated with the given `id`."] # [doc = ""] # [inline] pub fn get_point_weight_scale (& self , id : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . get_point_weight_scale ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an array of all points."] # [doc = ""] # [inline] pub fn get_points (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . get_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns whether a point associated with the given `id` exists."] # [doc = ""] # [inline] pub fn has_point (& self , id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . has_point ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether a point is disabled or not for pathfinding. By default, all points are enabled."] # [doc = ""] # [inline] pub fn is_point_disabled (& self , id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . is_point_disabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes the point associated with the given `id` from the points pool."] # [doc = ""] # [inline] pub fn remove_point (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . remove_point ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; } } # [doc = "Reserves space internally for `num_nodes` points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity."] # [doc = ""] # [inline] pub fn reserve_space (& self , num_nodes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . reserve_space ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , num_nodes as _) ; } } # [doc = "Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.\n# Default Arguments\n* `disabled` - `true`"] # [doc = ""] # [inline] pub fn set_point_disabled (& self , id : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . set_point_disabled ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , id as _ , disabled as _) ; } } # [doc = "Sets the `position` for the point with the given `id`."] # [doc = ""] # [inline] pub fn set_point_position (& self , id : i64 , position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . set_point_position ; let ret = crate :: icalls :: icallvar__i64_vec3 (method_bind , self . this . sys () . as_ptr () , id as _ , position) ; } } # [doc = "Sets the `weight_scale` for the point with the given `id`. The `weight_scale` is multiplied by the result of [`_compute_cost`][Self::_compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point."] # [doc = ""] # [inline] pub fn set_point_weight_scale (& self , id : i64 , weight_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStarMethodTable :: get (get_api ()) . set_point_weight_scale ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , id as _ , weight_scale as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AStar { } unsafe impl GodotObject for AStar { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AStar" } } impl std :: ops :: Deref for AStar { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AStar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for AStar { } unsafe impl SubClass < crate :: generated :: Object > for AStar { } impl Instanciable for AStar { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AStar :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AStarMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_point : * mut sys :: godot_method_bind , pub are_points_connected : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub connect_points : * mut sys :: godot_method_bind , pub disconnect_points : * mut sys :: godot_method_bind , pub get_available_point_id : * mut sys :: godot_method_bind , pub get_closest_point : * mut sys :: godot_method_bind , pub get_closest_position_in_segment : * mut sys :: godot_method_bind , pub get_id_path : * mut sys :: godot_method_bind , pub get_point_capacity : * mut sys :: godot_method_bind , pub get_point_connections : * mut sys :: godot_method_bind , pub get_point_count : * mut sys :: godot_method_bind , pub get_point_path : * mut sys :: godot_method_bind , pub get_point_position : * mut sys :: godot_method_bind , pub get_point_weight_scale : * mut sys :: godot_method_bind , pub get_points : * mut sys :: godot_method_bind , pub has_point : * mut sys :: godot_method_bind , pub is_point_disabled : * mut sys :: godot_method_bind , pub remove_point : * mut sys :: godot_method_bind , pub reserve_space : * mut sys :: godot_method_bind , pub set_point_disabled : * mut sys :: godot_method_bind , pub set_point_position : * mut sys :: godot_method_bind , pub set_point_weight_scale : * mut sys :: godot_method_bind } impl AStarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AStarMethodTable = AStarMethodTable { class_constructor : None , add_point : 0 as * mut sys :: godot_method_bind , are_points_connected : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , connect_points : 0 as * mut sys :: godot_method_bind , disconnect_points : 0 as * mut sys :: godot_method_bind , get_available_point_id : 0 as * mut sys :: godot_method_bind , get_closest_point : 0 as * mut sys :: godot_method_bind , get_closest_position_in_segment : 0 as * mut sys :: godot_method_bind , get_id_path : 0 as * mut sys :: godot_method_bind , get_point_capacity : 0 as * mut sys :: godot_method_bind , get_point_connections : 0 as * mut sys :: godot_method_bind , get_point_count : 0 as * mut sys :: godot_method_bind , get_point_path : 0 as * mut sys :: godot_method_bind , get_point_position : 0 as * mut sys :: godot_method_bind , get_point_weight_scale : 0 as * mut sys :: godot_method_bind , get_points : 0 as * mut sys :: godot_method_bind , has_point : 0 as * mut sys :: godot_method_bind , is_point_disabled : 0 as * mut sys :: godot_method_bind , remove_point : 0 as * mut sys :: godot_method_bind , reserve_space : 0 as * mut sys :: godot_method_bind , set_point_disabled : 0 as * mut sys :: godot_method_bind , set_point_position : 0 as * mut sys :: godot_method_bind , set_point_weight_scale : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AStarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AStar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_point = (gd_api . godot_method_bind_get_method) (class_name , "add_point\0" . as_ptr () as * const c_char) ; table . are_points_connected = (gd_api . godot_method_bind_get_method) (class_name , "are_points_connected\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . connect_points = (gd_api . godot_method_bind_get_method) (class_name , "connect_points\0" . as_ptr () as * const c_char) ; table . disconnect_points = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_points\0" . as_ptr () as * const c_char) ; table . get_available_point_id = (gd_api . godot_method_bind_get_method) (class_name , "get_available_point_id\0" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\0" . as_ptr () as * const c_char) ; table . get_closest_position_in_segment = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_position_in_segment\0" . as_ptr () as * const c_char) ; table . get_id_path = (gd_api . godot_method_bind_get_method) (class_name , "get_id_path\0" . as_ptr () as * const c_char) ; table . get_point_capacity = (gd_api . godot_method_bind_get_method) (class_name , "get_point_capacity\0" . as_ptr () as * const c_char) ; table . get_point_connections = (gd_api . godot_method_bind_get_method) (class_name , "get_point_connections\0" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\0" . as_ptr () as * const c_char) ; table . get_point_path = (gd_api . godot_method_bind_get_method) (class_name , "get_point_path\0" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\0" . as_ptr () as * const c_char) ; table . get_point_weight_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_point_weight_scale\0" . as_ptr () as * const c_char) ; table . get_points = (gd_api . godot_method_bind_get_method) (class_name , "get_points\0" . as_ptr () as * const c_char) ; table . has_point = (gd_api . godot_method_bind_get_method) (class_name , "has_point\0" . as_ptr () as * const c_char) ; table . is_point_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_point_disabled\0" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\0" . as_ptr () as * const c_char) ; table . reserve_space = (gd_api . godot_method_bind_get_method) (class_name , "reserve_space\0" . as_ptr () as * const c_char) ; table . set_point_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_point_disabled\0" . as_ptr () as * const c_char) ; table . set_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_point_position\0" . as_ptr () as * const c_char) ; table . set_point_weight_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_point_weight_scale\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::astar::private::AStar;
            
            pub(crate) mod astar_2d {
                # ! [doc = "This module contains types related to the API class [`AStar2D`][super::AStar2D]."] pub (crate) mod private { # [doc = "`core class AStar2D` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_astar2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAStar2D inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AStar2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AStar2D ; impl AStar2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AStar2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nAdds a new point at the given position with the given identifier. The `id` must be 0 or larger, and the `weight_scale` must be 0.0 or greater.\nThe `weight_scale` is multiplied by the result of [`_compute_cost`][Self::_compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower `weight_scale`s to form a path.\n```gdscript\nvar astar = AStar2D.new()\nastar.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with weight_scale 4 and id 1\n```\nIf there already exists a point for the given `id`, its position and weight scale are updated to the given values.\n# Default Arguments\n* `weight_scale` - `1.0`"] # [doc = ""] # [inline] pub fn add_point (& self , id : i64 , position : Vector2 , weight_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . add_point ; let ret = crate :: icalls :: icallvar__i64_vec2_f64 (method_bind , self . this . sys () . as_ptr () , id as _ , position , weight_scale as _) ; } } # [doc = "Returns whether there is a connection/segment between the given points. If `bidirectional` is `false`, returns whether movement from `id` to `to_id` is possible through this segment.\n# Default Arguments\n* `bidirectional` - `true`"] # [doc = ""] # [inline] pub fn are_points_connected (& self , id : i64 , to_id : i64 , bidirectional : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . are_points_connected ; let ret = crate :: icalls :: icallvar__i64_i64_bool (method_bind , self . this . sys () . as_ptr () , id as _ , to_id as _ , bidirectional as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Clears all the points and segments."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCreates a segment between the given points. If `bidirectional` is `false`, only movement from `id` to `to_id` is allowed, not the reverse direction.\n```gdscript\nvar astar = AStar2D.new()\nastar.add_point(1, Vector2(1, 1))\nastar.add_point(2, Vector2(0, 5))\nastar.connect_points(1, 2, false)\n```\n# Default Arguments\n* `bidirectional` - `true`"] # [doc = ""] # [inline] pub fn connect_points (& self , id : i64 , to_id : i64 , bidirectional : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . connect_points ; let ret = crate :: icalls :: icallvar__i64_i64_bool (method_bind , self . this . sys () . as_ptr () , id as _ , to_id as _ , bidirectional as _) ; } } # [doc = "Deletes the segment between the given points. If `bidirectional` is `false`, only movement from `id` to `to_id` is prevented, and a unidirectional segment possibly remains.\n# Default Arguments\n* `bidirectional` - `true`"] # [doc = ""] # [inline] pub fn disconnect_points (& self , id : i64 , to_id : i64 , bidirectional : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . disconnect_points ; let ret = crate :: icalls :: icallvar__i64_i64_bool (method_bind , self . this . sys () . as_ptr () , id as _ , to_id as _ , bidirectional as _) ; } } # [doc = "Returns the next available point ID with no point associated to it."] # [doc = ""] # [inline] pub fn get_available_point_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_available_point_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the ID of the closest point to `to_position`, optionally taking disabled points into account. Returns `-1` if there are no points in the points pool.\n**Note:** If several points are the closest to `to_position`, the one with the smallest ID will be returned, ensuring a deterministic result.\n# Default Arguments\n* `include_disabled` - `false`"] # [doc = ""] # [inline] pub fn get_closest_point (& self , to_position : Vector2 , include_disabled : bool) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_closest_point ; let ret = crate :: icalls :: icallvar__vec2_bool (method_bind , self . this . sys () . as_ptr () , to_position , include_disabled as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the closest position to `to_position` that resides inside a segment between two connected points.\n```gdscript\nvar astar = AStar2D.new()\nastar.add_point(1, Vector2(0, 0))\nastar.add_point(2, Vector2(0, 5))\nastar.connect_points(1, 2)\nvar res = astar.get_closest_position_in_segment(Vector2(3, 3)) # Returns (0, 3)\n```\nThe result is in the segment that goes from `y = 0` to `y = 5`. It's the closest position in the segment to the given point."] # [doc = ""] # [inline] pub fn get_closest_position_in_segment (& self , to_position : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_closest_position_in_segment ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , to_position) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.\n```gdscript\nvar astar = AStar2D.new()\nastar.add_point(1, Vector2(0, 0))\nastar.add_point(2, Vector2(0, 1), 1) # Default weight is 1\nastar.add_point(3, Vector2(1, 1))\nastar.add_point(4, Vector2(2, 0))\n\nastar.connect_points(1, 2, false)\nastar.connect_points(2, 3, false)\nastar.connect_points(4, 3, false)\nastar.connect_points(1, 4, false)\n\nvar res = astar.get_id_path(1, 3) # Returns [1, 2, 3]\n```\nIf you change the 2nd point's weight to 3, then the result will be `[1, 4, 3]` instead, because now even though the distance is longer, it's \"easier\" to get through point 4 than through point 2."] # [doc = ""] # [inline] pub fn get_id_path (& self , from_id : i64 , to_id : i64) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_id_path ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , from_id as _ , to_id as _) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the capacity of the structure backing the points, useful in conjunction with `reserve_space`."] # [doc = ""] # [inline] pub fn get_point_capacity (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_point_capacity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns an array with the IDs of the points that form the connection with the given point.\n```gdscript\nvar astar = AStar2D.new()\nastar.add_point(1, Vector2(0, 0))\nastar.add_point(2, Vector2(0, 1))\nastar.add_point(3, Vector2(1, 1))\nastar.add_point(4, Vector2(2, 0))\n\nastar.connect_points(1, 2, true)\nastar.connect_points(1, 3, true)\n\nvar neighbors = astar.get_point_connections(1) # Returns [2, 3]\n```"] # [doc = ""] # [inline] pub fn get_point_connections (& self , id : i64) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_point_connections ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of points currently in the points pool."] # [doc = ""] # [inline] pub fn get_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_point_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.\n**Note:** This method is not thread-safe. If called from a [`Thread`][Thread], it will return an empty [`PoolVector2Array`][PoolArray<Vector2>] and will print an error message."] # [doc = ""] # [inline] pub fn get_point_path (& self , from_id : i64 , to_id : i64) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_point_path ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , from_id as _ , to_id as _) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position of the point associated with the given `id`."] # [doc = ""] # [inline] pub fn get_point_position (& self , id : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_point_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the weight scale of the point associated with the given `id`."] # [doc = ""] # [inline] pub fn get_point_weight_scale (& self , id : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_point_weight_scale ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an array of all points."] # [doc = ""] # [inline] pub fn get_points (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . get_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns whether a point associated with the given `id` exists."] # [doc = ""] # [inline] pub fn has_point (& self , id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . has_point ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether a point is disabled or not for pathfinding. By default, all points are enabled."] # [doc = ""] # [inline] pub fn is_point_disabled (& self , id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . is_point_disabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes the point associated with the given `id` from the points pool."] # [doc = ""] # [inline] pub fn remove_point (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . remove_point ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; } } # [doc = "Reserves space internally for `num_nodes` points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity."] # [doc = ""] # [inline] pub fn reserve_space (& self , num_nodes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . reserve_space ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , num_nodes as _) ; } } # [doc = "Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle.\n# Default Arguments\n* `disabled` - `true`"] # [doc = ""] # [inline] pub fn set_point_disabled (& self , id : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . set_point_disabled ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , id as _ , disabled as _) ; } } # [doc = "Sets the `position` for the point with the given `id`."] # [doc = ""] # [inline] pub fn set_point_position (& self , id : i64 , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . set_point_position ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , id as _ , position) ; } } # [doc = "Sets the `weight_scale` for the point with the given `id`. The `weight_scale` is multiplied by the result of [`_compute_cost`][Self::_compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point."] # [doc = ""] # [inline] pub fn set_point_weight_scale (& self , id : i64 , weight_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AStar2DMethodTable :: get (get_api ()) . set_point_weight_scale ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , id as _ , weight_scale as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AStar2D { } unsafe impl GodotObject for AStar2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AStar2D" } } impl std :: ops :: Deref for AStar2D { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AStar2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for AStar2D { } unsafe impl SubClass < crate :: generated :: Object > for AStar2D { } impl Instanciable for AStar2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AStar2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AStar2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_point : * mut sys :: godot_method_bind , pub are_points_connected : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub connect_points : * mut sys :: godot_method_bind , pub disconnect_points : * mut sys :: godot_method_bind , pub get_available_point_id : * mut sys :: godot_method_bind , pub get_closest_point : * mut sys :: godot_method_bind , pub get_closest_position_in_segment : * mut sys :: godot_method_bind , pub get_id_path : * mut sys :: godot_method_bind , pub get_point_capacity : * mut sys :: godot_method_bind , pub get_point_connections : * mut sys :: godot_method_bind , pub get_point_count : * mut sys :: godot_method_bind , pub get_point_path : * mut sys :: godot_method_bind , pub get_point_position : * mut sys :: godot_method_bind , pub get_point_weight_scale : * mut sys :: godot_method_bind , pub get_points : * mut sys :: godot_method_bind , pub has_point : * mut sys :: godot_method_bind , pub is_point_disabled : * mut sys :: godot_method_bind , pub remove_point : * mut sys :: godot_method_bind , pub reserve_space : * mut sys :: godot_method_bind , pub set_point_disabled : * mut sys :: godot_method_bind , pub set_point_position : * mut sys :: godot_method_bind , pub set_point_weight_scale : * mut sys :: godot_method_bind } impl AStar2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AStar2DMethodTable = AStar2DMethodTable { class_constructor : None , add_point : 0 as * mut sys :: godot_method_bind , are_points_connected : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , connect_points : 0 as * mut sys :: godot_method_bind , disconnect_points : 0 as * mut sys :: godot_method_bind , get_available_point_id : 0 as * mut sys :: godot_method_bind , get_closest_point : 0 as * mut sys :: godot_method_bind , get_closest_position_in_segment : 0 as * mut sys :: godot_method_bind , get_id_path : 0 as * mut sys :: godot_method_bind , get_point_capacity : 0 as * mut sys :: godot_method_bind , get_point_connections : 0 as * mut sys :: godot_method_bind , get_point_count : 0 as * mut sys :: godot_method_bind , get_point_path : 0 as * mut sys :: godot_method_bind , get_point_position : 0 as * mut sys :: godot_method_bind , get_point_weight_scale : 0 as * mut sys :: godot_method_bind , get_points : 0 as * mut sys :: godot_method_bind , has_point : 0 as * mut sys :: godot_method_bind , is_point_disabled : 0 as * mut sys :: godot_method_bind , remove_point : 0 as * mut sys :: godot_method_bind , reserve_space : 0 as * mut sys :: godot_method_bind , set_point_disabled : 0 as * mut sys :: godot_method_bind , set_point_position : 0 as * mut sys :: godot_method_bind , set_point_weight_scale : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AStar2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AStar2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_point = (gd_api . godot_method_bind_get_method) (class_name , "add_point\0" . as_ptr () as * const c_char) ; table . are_points_connected = (gd_api . godot_method_bind_get_method) (class_name , "are_points_connected\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . connect_points = (gd_api . godot_method_bind_get_method) (class_name , "connect_points\0" . as_ptr () as * const c_char) ; table . disconnect_points = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_points\0" . as_ptr () as * const c_char) ; table . get_available_point_id = (gd_api . godot_method_bind_get_method) (class_name , "get_available_point_id\0" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\0" . as_ptr () as * const c_char) ; table . get_closest_position_in_segment = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_position_in_segment\0" . as_ptr () as * const c_char) ; table . get_id_path = (gd_api . godot_method_bind_get_method) (class_name , "get_id_path\0" . as_ptr () as * const c_char) ; table . get_point_capacity = (gd_api . godot_method_bind_get_method) (class_name , "get_point_capacity\0" . as_ptr () as * const c_char) ; table . get_point_connections = (gd_api . godot_method_bind_get_method) (class_name , "get_point_connections\0" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\0" . as_ptr () as * const c_char) ; table . get_point_path = (gd_api . godot_method_bind_get_method) (class_name , "get_point_path\0" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\0" . as_ptr () as * const c_char) ; table . get_point_weight_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_point_weight_scale\0" . as_ptr () as * const c_char) ; table . get_points = (gd_api . godot_method_bind_get_method) (class_name , "get_points\0" . as_ptr () as * const c_char) ; table . has_point = (gd_api . godot_method_bind_get_method) (class_name , "has_point\0" . as_ptr () as * const c_char) ; table . is_point_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_point_disabled\0" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\0" . as_ptr () as * const c_char) ; table . reserve_space = (gd_api . godot_method_bind_get_method) (class_name , "reserve_space\0" . as_ptr () as * const c_char) ; table . set_point_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_point_disabled\0" . as_ptr () as * const c_char) ; table . set_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_point_position\0" . as_ptr () as * const c_char) ; table . set_point_weight_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_point_weight_scale\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::astar_2d::private::AStar2D;
            
            pub(crate) mod accept_dialog {
                # ! [doc = "This module contains types related to the API class [`AcceptDialog`][super::AcceptDialog]."] pub (crate) mod private { # [doc = "`core class AcceptDialog` inherits `WindowDialog` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_acceptdialog.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`AcceptDialog` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<AcceptDialog>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAcceptDialog inherits methods from:\n - [WindowDialog](struct.WindowDialog.html)\n - [Popup](struct.Popup.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AcceptDialog { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AcceptDialog ; impl AcceptDialog { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AcceptDialogMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a button with label `text` and a custom `action` to the dialog and returns the created button. `action` will be passed to the `custom_action` signal when pressed.\nIf `true`, `right` will place the button to the right of any sibling buttons.\nYou can use [`remove_button`][Self::remove_button] method to remove a button created with this method from the dialog.\n# Default Arguments\n* `right` - `false`\n* `action` - `\"\"`"] # [doc = ""] # [inline] pub fn add_button (& self , text : impl Into < GodotString > , right : bool , action : impl Into < GodotString >) -> Option < Ref < crate :: generated :: Button , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . add_button ; let ret = crate :: icalls :: icallvar__str_bool_str (method_bind , self . this . sys () . as_ptr () , text . into () , right as _ , action . into ()) ; < Option < Ref < crate :: generated :: Button , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Adds a button with label `name` and a cancel action to the dialog and returns the created button.\nYou can use [`remove_button`][Self::remove_button] method to remove a button created with this method from the dialog."] # [doc = ""] # [inline] pub fn add_cancel (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: Button , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . add_cancel ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Option < Ref < crate :: generated :: Button , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the dialog is hidden when the OK button is pressed. You can set it to `false` if you want to do e.g. input validation when receiving the `confirmed` signal, and handle hiding the dialog in your own logic.\n**Note:** Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example [`FileDialog`][FileDialog] defaults to `false`, and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such, this property can't be used in [`FileDialog`][FileDialog] to disable hiding the dialog when pressing OK."] # [doc = ""] # [inline] pub fn hide_on_ok (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . get_hide_on_ok ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the label used for built-in text.\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_label (& self) -> Option < Ref < crate :: generated :: Label , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . get_label ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Label , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the OK [`Button`][Button] instance.\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_ok (& self) -> Option < Ref < crate :: generated :: Button , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . get_ok ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Button , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The text displayed by the dialog."] # [doc = ""] # [inline] pub fn text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . get_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets autowrapping for the text in the dialog."] # [doc = ""] # [inline] pub fn has_autowrap (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . has_autowrap ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Registers a [`LineEdit`][LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted."] # [doc = ""] # [inline] pub fn register_text_enter (& self , line_edit : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . register_text_enter ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , line_edit . as_arg_ptr ()) ; } } # [doc = "Removes the `button` from the dialog. Does NOT free the `button`. The `button` must be a [`Button`][Button] added with [`add_button`][Self::add_button] or [`add_cancel`][Self::add_cancel] method. After removal, pressing the `button` will no longer emit this dialog's `custom_action` signal or cancel this dialog."] # [doc = ""] # [inline] pub fn remove_button (& self , button : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . remove_button ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , button . as_arg_ptr ()) ; } } # [doc = "Sets autowrapping for the text in the dialog."] # [doc = ""] # [inline] pub fn set_autowrap (& self , autowrap : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . set_autowrap ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , autowrap as _) ; } } # [doc = "If `true`, the dialog is hidden when the OK button is pressed. You can set it to `false` if you want to do e.g. input validation when receiving the `confirmed` signal, and handle hiding the dialog in your own logic.\n**Note:** Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example [`FileDialog`][FileDialog] defaults to `false`, and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such, this property can't be used in [`FileDialog`][FileDialog] to disable hiding the dialog when pressing OK."] # [doc = ""] # [inline] pub fn set_hide_on_ok (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . set_hide_on_ok ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The text displayed by the dialog."] # [doc = ""] # [inline] pub fn set_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AcceptDialogMethodTable :: get (get_api ()) . set_text ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AcceptDialog { } unsafe impl GodotObject for AcceptDialog { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AcceptDialog" } } impl QueueFree for AcceptDialog { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for AcceptDialog { type Target = crate :: generated :: WindowDialog ; # [inline] fn deref (& self) -> & crate :: generated :: WindowDialog { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AcceptDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: WindowDialog { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: WindowDialog > for AcceptDialog { } unsafe impl SubClass < crate :: generated :: Popup > for AcceptDialog { } unsafe impl SubClass < crate :: generated :: Control > for AcceptDialog { } unsafe impl SubClass < crate :: generated :: CanvasItem > for AcceptDialog { } unsafe impl SubClass < crate :: generated :: Node > for AcceptDialog { } unsafe impl SubClass < crate :: generated :: Object > for AcceptDialog { } impl Instanciable for AcceptDialog { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AcceptDialog :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AcceptDialogMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_button : * mut sys :: godot_method_bind , pub add_cancel : * mut sys :: godot_method_bind , pub get_hide_on_ok : * mut sys :: godot_method_bind , pub get_label : * mut sys :: godot_method_bind , pub get_ok : * mut sys :: godot_method_bind , pub get_text : * mut sys :: godot_method_bind , pub has_autowrap : * mut sys :: godot_method_bind , pub register_text_enter : * mut sys :: godot_method_bind , pub remove_button : * mut sys :: godot_method_bind , pub set_autowrap : * mut sys :: godot_method_bind , pub set_hide_on_ok : * mut sys :: godot_method_bind , pub set_text : * mut sys :: godot_method_bind } impl AcceptDialogMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AcceptDialogMethodTable = AcceptDialogMethodTable { class_constructor : None , add_button : 0 as * mut sys :: godot_method_bind , add_cancel : 0 as * mut sys :: godot_method_bind , get_hide_on_ok : 0 as * mut sys :: godot_method_bind , get_label : 0 as * mut sys :: godot_method_bind , get_ok : 0 as * mut sys :: godot_method_bind , get_text : 0 as * mut sys :: godot_method_bind , has_autowrap : 0 as * mut sys :: godot_method_bind , register_text_enter : 0 as * mut sys :: godot_method_bind , remove_button : 0 as * mut sys :: godot_method_bind , set_autowrap : 0 as * mut sys :: godot_method_bind , set_hide_on_ok : 0 as * mut sys :: godot_method_bind , set_text : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AcceptDialogMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AcceptDialog\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_button = (gd_api . godot_method_bind_get_method) (class_name , "add_button\0" . as_ptr () as * const c_char) ; table . add_cancel = (gd_api . godot_method_bind_get_method) (class_name , "add_cancel\0" . as_ptr () as * const c_char) ; table . get_hide_on_ok = (gd_api . godot_method_bind_get_method) (class_name , "get_hide_on_ok\0" . as_ptr () as * const c_char) ; table . get_label = (gd_api . godot_method_bind_get_method) (class_name , "get_label\0" . as_ptr () as * const c_char) ; table . get_ok = (gd_api . godot_method_bind_get_method) (class_name , "get_ok\0" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . has_autowrap = (gd_api . godot_method_bind_get_method) (class_name , "has_autowrap\0" . as_ptr () as * const c_char) ; table . register_text_enter = (gd_api . godot_method_bind_get_method) (class_name , "register_text_enter\0" . as_ptr () as * const c_char) ; table . remove_button = (gd_api . godot_method_bind_get_method) (class_name , "remove_button\0" . as_ptr () as * const c_char) ; table . set_autowrap = (gd_api . godot_method_bind_get_method) (class_name , "set_autowrap\0" . as_ptr () as * const c_char) ; table . set_hide_on_ok = (gd_api . godot_method_bind_get_method) (class_name , "set_hide_on_ok\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::accept_dialog::private::AcceptDialog;
            
            pub(crate) mod animated_sprite {
                # ! [doc = "This module contains types related to the API class [`AnimatedSprite`][super::AnimatedSprite]."] pub (crate) mod private { # [doc = "`core class AnimatedSprite` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animatedsprite.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`AnimatedSprite` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<AnimatedSprite>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAnimatedSprite inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimatedSprite { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimatedSprite ; impl AnimatedSprite { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimatedSpriteMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The current animation from the [`frames`][Self::frames] resource. If this value changes, the `frame` counter is reset."] # [doc = ""] # [inline] pub fn animation (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_animation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The displayed animation frame's index."] # [doc = ""] # [inline] pub fn frame (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_frame ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The texture's drawing offset."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The animation speed is multiplied by this value."] # [doc = ""] # [inline] pub fn speed_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_speed_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The [`SpriteFrames`][SpriteFrames] resource containing the animation(s). Allows you the option to load, edit, clear, make unique and save the states of the [`SpriteFrames`][SpriteFrames] resource."] # [doc = ""] # [inline] pub fn sprite_frames (& self) -> Option < Ref < crate :: generated :: SpriteFrames , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . get_sprite_frames ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: SpriteFrames , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, texture will be centered."] # [doc = ""] # [inline] pub fn is_centered (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . is_centered ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn is_flipped_h (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . is_flipped_h ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn is_flipped_v (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . is_flipped_v ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the [`animation`][Self::animation] is currently playing."] # [doc = ""] # [inline] pub fn is_playing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . is_playing ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Plays the animation named `anim`. If no `anim` is provided, the current animation is played. If `backwards` is `true`, the animation will be played in reverse.\n# Default Arguments\n* `anim` - `\"\"`\n* `backwards` - `false`"] # [doc = ""] # [inline] pub fn play (& self , anim : impl Into < GodotString > , backwards : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . play ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , anim . into () , backwards as _) ; } } # [doc = "The current animation from the [`frames`][Self::frames] resource. If this value changes, the `frame` counter is reset."] # [doc = ""] # [inline] pub fn set_animation (& self , animation : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_animation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , animation . into ()) ; } } # [doc = "If `true`, texture will be centered."] # [doc = ""] # [inline] pub fn set_centered (& self , centered : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_centered ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , centered as _) ; } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn set_flip_h (& self , flip_h : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_flip_h ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , flip_h as _) ; } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn set_flip_v (& self , flip_v : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_flip_v ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , flip_v as _) ; } } # [doc = "The displayed animation frame's index."] # [doc = ""] # [inline] pub fn set_frame (& self , frame : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_frame ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , frame as _) ; } } # [doc = "The texture's drawing offset."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "If `true`, the [`animation`][Self::animation] is currently playing."] # [doc = ""] # [inline] pub fn set_playing (& self , playing : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_playing ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , playing as _) ; } } # [doc = "The animation speed is multiplied by this value."] # [doc = ""] # [inline] pub fn set_speed_scale (& self , speed_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_speed_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , speed_scale as _) ; } } # [doc = "The [`SpriteFrames`][SpriteFrames] resource containing the animation(s). Allows you the option to load, edit, clear, make unique and save the states of the [`SpriteFrames`][SpriteFrames] resource."] # [doc = ""] # [inline] pub fn set_sprite_frames (& self , sprite_frames : impl AsArg < crate :: generated :: SpriteFrames >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . set_sprite_frames ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , sprite_frames . as_arg_ptr ()) ; } } # [doc = "Stops the current animation (does not reset the frame counter)."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSpriteMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimatedSprite { } unsafe impl GodotObject for AnimatedSprite { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AnimatedSprite" } } impl QueueFree for AnimatedSprite { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for AnimatedSprite { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimatedSprite { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for AnimatedSprite { } unsafe impl SubClass < crate :: generated :: CanvasItem > for AnimatedSprite { } unsafe impl SubClass < crate :: generated :: Node > for AnimatedSprite { } unsafe impl SubClass < crate :: generated :: Object > for AnimatedSprite { } impl Instanciable for AnimatedSprite { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimatedSprite :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimatedSpriteMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_animation : * mut sys :: godot_method_bind , pub get_frame : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_speed_scale : * mut sys :: godot_method_bind , pub get_sprite_frames : * mut sys :: godot_method_bind , pub is_centered : * mut sys :: godot_method_bind , pub is_flipped_h : * mut sys :: godot_method_bind , pub is_flipped_v : * mut sys :: godot_method_bind , pub is_playing : * mut sys :: godot_method_bind , pub play : * mut sys :: godot_method_bind , pub set_animation : * mut sys :: godot_method_bind , pub set_centered : * mut sys :: godot_method_bind , pub set_flip_h : * mut sys :: godot_method_bind , pub set_flip_v : * mut sys :: godot_method_bind , pub set_frame : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_playing : * mut sys :: godot_method_bind , pub set_speed_scale : * mut sys :: godot_method_bind , pub set_sprite_frames : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl AnimatedSpriteMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimatedSpriteMethodTable = AnimatedSpriteMethodTable { class_constructor : None , get_animation : 0 as * mut sys :: godot_method_bind , get_frame : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_speed_scale : 0 as * mut sys :: godot_method_bind , get_sprite_frames : 0 as * mut sys :: godot_method_bind , is_centered : 0 as * mut sys :: godot_method_bind , is_flipped_h : 0 as * mut sys :: godot_method_bind , is_flipped_v : 0 as * mut sys :: godot_method_bind , is_playing : 0 as * mut sys :: godot_method_bind , play : 0 as * mut sys :: godot_method_bind , set_animation : 0 as * mut sys :: godot_method_bind , set_centered : 0 as * mut sys :: godot_method_bind , set_flip_h : 0 as * mut sys :: godot_method_bind , set_flip_v : 0 as * mut sys :: godot_method_bind , set_frame : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_playing : 0 as * mut sys :: godot_method_bind , set_speed_scale : 0 as * mut sys :: godot_method_bind , set_sprite_frames : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimatedSpriteMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimatedSprite\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_animation\0" . as_ptr () as * const c_char) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\0" . as_ptr () as * const c_char) ; table . get_sprite_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_sprite_frames\0" . as_ptr () as * const c_char) ; table . is_centered = (gd_api . godot_method_bind_get_method) (class_name , "is_centered\0" . as_ptr () as * const c_char) ; table . is_flipped_h = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_h\0" . as_ptr () as * const c_char) ; table . is_flipped_v = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_v\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . set_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_animation\0" . as_ptr () as * const c_char) ; table . set_centered = (gd_api . godot_method_bind_get_method) (class_name , "set_centered\0" . as_ptr () as * const c_char) ; table . set_flip_h = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_h\0" . as_ptr () as * const c_char) ; table . set_flip_v = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_v\0" . as_ptr () as * const c_char) ; table . set_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_frame\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_playing = (gd_api . godot_method_bind_get_method) (class_name , "set_playing\0" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\0" . as_ptr () as * const c_char) ; table . set_sprite_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_sprite_frames\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animated_sprite::private::AnimatedSprite;
            
            pub(crate) mod animated_sprite_3d {
                # ! [doc = "This module contains types related to the API class [`AnimatedSprite3D`][super::AnimatedSprite3D]."] pub (crate) mod private { # [doc = "`core class AnimatedSprite3D` inherits `SpriteBase3D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animatedsprite3d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`AnimatedSprite3D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<AnimatedSprite3D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAnimatedSprite3D inherits methods from:\n - [SpriteBase3D](struct.SpriteBase3D.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimatedSprite3D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimatedSprite3D ; impl AnimatedSprite3D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimatedSprite3DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The current animation from the `frames` resource. If this value changes, the `frame` counter is reset."] # [doc = ""] # [inline] pub fn animation (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSprite3DMethodTable :: get (get_api ()) . get_animation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The displayed animation frame's index."] # [doc = ""] # [inline] pub fn frame (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSprite3DMethodTable :: get (get_api ()) . get_frame ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The [`SpriteFrames`][SpriteFrames] resource containing the animation(s)."] # [doc = ""] # [inline] pub fn sprite_frames (& self) -> Option < Ref < crate :: generated :: SpriteFrames , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSprite3DMethodTable :: get (get_api ()) . get_sprite_frames ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: SpriteFrames , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if an animation is currently being played."] # [doc = ""] # [inline] pub fn is_playing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSprite3DMethodTable :: get (get_api ()) . is_playing ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Plays the animation named `anim`. If no `anim` is provided, the current animation is played.\n# Default Arguments\n* `anim` - `\"\"`"] # [doc = ""] # [inline] pub fn play (& self , anim : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSprite3DMethodTable :: get (get_api ()) . play ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; } } # [doc = "The current animation from the `frames` resource. If this value changes, the `frame` counter is reset."] # [doc = ""] # [inline] pub fn set_animation (& self , animation : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSprite3DMethodTable :: get (get_api ()) . set_animation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , animation . into ()) ; } } # [doc = "The displayed animation frame's index."] # [doc = ""] # [inline] pub fn set_frame (& self , frame : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSprite3DMethodTable :: get (get_api ()) . set_frame ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , frame as _) ; } } # [doc = "The [`SpriteFrames`][SpriteFrames] resource containing the animation(s)."] # [doc = ""] # [inline] pub fn set_sprite_frames (& self , sprite_frames : impl AsArg < crate :: generated :: SpriteFrames >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSprite3DMethodTable :: get (get_api ()) . set_sprite_frames ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , sprite_frames . as_arg_ptr ()) ; } } # [doc = "Stops the current animation (does not reset the frame counter)."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedSprite3DMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimatedSprite3D { } unsafe impl GodotObject for AnimatedSprite3D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AnimatedSprite3D" } } impl QueueFree for AnimatedSprite3D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for AnimatedSprite3D { type Target = crate :: generated :: SpriteBase3D ; # [inline] fn deref (& self) -> & crate :: generated :: SpriteBase3D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimatedSprite3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: SpriteBase3D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: SpriteBase3D > for AnimatedSprite3D { } unsafe impl SubClass < crate :: generated :: GeometryInstance > for AnimatedSprite3D { } unsafe impl SubClass < crate :: generated :: VisualInstance > for AnimatedSprite3D { } unsafe impl SubClass < crate :: generated :: CullInstance > for AnimatedSprite3D { } unsafe impl SubClass < crate :: generated :: Spatial > for AnimatedSprite3D { } unsafe impl SubClass < crate :: generated :: Node > for AnimatedSprite3D { } unsafe impl SubClass < crate :: generated :: Object > for AnimatedSprite3D { } impl Instanciable for AnimatedSprite3D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimatedSprite3D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimatedSprite3DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_animation : * mut sys :: godot_method_bind , pub get_frame : * mut sys :: godot_method_bind , pub get_sprite_frames : * mut sys :: godot_method_bind , pub is_playing : * mut sys :: godot_method_bind , pub play : * mut sys :: godot_method_bind , pub set_animation : * mut sys :: godot_method_bind , pub set_frame : * mut sys :: godot_method_bind , pub set_sprite_frames : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl AnimatedSprite3DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimatedSprite3DMethodTable = AnimatedSprite3DMethodTable { class_constructor : None , get_animation : 0 as * mut sys :: godot_method_bind , get_frame : 0 as * mut sys :: godot_method_bind , get_sprite_frames : 0 as * mut sys :: godot_method_bind , is_playing : 0 as * mut sys :: godot_method_bind , play : 0 as * mut sys :: godot_method_bind , set_animation : 0 as * mut sys :: godot_method_bind , set_frame : 0 as * mut sys :: godot_method_bind , set_sprite_frames : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimatedSprite3DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimatedSprite3D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_animation\0" . as_ptr () as * const c_char) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\0" . as_ptr () as * const c_char) ; table . get_sprite_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_sprite_frames\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . set_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_animation\0" . as_ptr () as * const c_char) ; table . set_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_frame\0" . as_ptr () as * const c_char) ; table . set_sprite_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_sprite_frames\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animated_sprite_3d::private::AnimatedSprite3D;
            
            pub(crate) mod animated_texture {
                # ! [doc = "This module contains types related to the API class [`AnimatedTexture`][super::AnimatedTexture]."] pub (crate) mod private { # [doc = "`core class AnimatedTexture` inherits `Texture` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animatedtexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimatedTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimatedTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimatedTexture ; # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimatedTexture { pub const MAX_FRAMES : i64 = 256i64 ; } impl AnimatedTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimatedTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Sets the currently visible frame of the texture."] # [doc = ""] # [inline] pub fn current_frame (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . get_current_frame ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [`frames`][Self::frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [`set_frame_delay`][Self::set_frame_delay]).\nFor example, an animation with 8 frames, no frame delay and a `fps` value of 2 will run for 4 seconds, with each frame lasting 0.5 seconds."] # [doc = ""] # [inline] pub fn fps (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . get_fps ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the given frame's delay value."] # [doc = ""] # [inline] pub fn frame_delay (& self , frame : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . get_frame_delay ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , frame as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the given frame's [`Texture`][Texture]."] # [doc = ""] # [inline] pub fn frame_texture (& self , frame : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . get_frame_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , frame as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Number of frames to use in the animation. While you can create the frames independently with [`set_frame_texture`][Self::set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [`MAX_FRAMES`][Self::MAX_FRAMES]."] # [doc = ""] # [inline] pub fn frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . get_frames ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the animation will only play once and will not loop back to the first frame after reaching the end. Note that reaching the end will not set [`pause`][Self::pause] to `true`."] # [doc = ""] # [inline] pub fn oneshot (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . get_oneshot ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the animation will pause where it currently is (i.e. at [`current_frame`][Self::current_frame]). The animation will continue from where it was paused when changing this property to `false`."] # [doc = ""] # [inline] pub fn pause (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . get_pause ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets the currently visible frame of the texture."] # [doc = ""] # [inline] pub fn set_current_frame (& self , frame : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . set_current_frame ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , frame as _) ; } } # [doc = "Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [`frames`][Self::frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [`set_frame_delay`][Self::set_frame_delay]).\nFor example, an animation with 8 frames, no frame delay and a `fps` value of 2 will run for 4 seconds, with each frame lasting 0.5 seconds."] # [doc = ""] # [inline] pub fn set_fps (& self , fps : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . set_fps ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , fps as _) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets an additional delay (in seconds) between this frame and the next one, that will be added to the time interval defined by [`fps`][Self::fps]. By default, frames have no delay defined. If a delay value is defined, the final time interval between this frame and the next will be `1.0 / fps + delay`.\nFor example, for an animation with 3 frames, 2 FPS and a frame delay on the second frame of 1.2, the resulting playback will be:\n```gdscript\nFrame 0: 0.5 s (1 / fps)\nFrame 1: 1.7 s (1 / fps + 1.2)\nFrame 2: 0.5 s (1 / fps)\nTotal duration: 2.7 s\n```"] # [doc = ""] # [inline] pub fn set_frame_delay (& self , frame : i64 , delay : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . set_frame_delay ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , frame as _ , delay as _) ; } } # [doc = "Assigns a [`Texture`][Texture] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [`frames`][Self::frames] - 1.\nYou can define any number of textures up to [`MAX_FRAMES`][Self::MAX_FRAMES], but keep in mind that only frames from 0 to [`frames`][Self::frames] - 1 will be part of the animation."] # [doc = ""] # [inline] pub fn set_frame_texture (& self , frame : i64 , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . set_frame_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , frame as _ , texture . as_arg_ptr ()) ; } } # [doc = "Number of frames to use in the animation. While you can create the frames independently with [`set_frame_texture`][Self::set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [`MAX_FRAMES`][Self::MAX_FRAMES]."] # [doc = ""] # [inline] pub fn set_frames (& self , frames : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . set_frames ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , frames as _) ; } } # [doc = "If `true`, the animation will only play once and will not loop back to the first frame after reaching the end. Note that reaching the end will not set [`pause`][Self::pause] to `true`."] # [doc = ""] # [inline] pub fn set_oneshot (& self , oneshot : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . set_oneshot ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , oneshot as _) ; } } # [doc = "If `true`, the animation will pause where it currently is (i.e. at [`current_frame`][Self::current_frame]). The animation will continue from where it was paused when changing this property to `false`."] # [doc = ""] # [inline] pub fn set_pause (& self , pause : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimatedTextureMethodTable :: get (get_api ()) . set_pause ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , pause as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimatedTexture { } unsafe impl GodotObject for AnimatedTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimatedTexture" } } impl std :: ops :: Deref for AnimatedTexture { type Target = crate :: generated :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimatedTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Texture > for AnimatedTexture { } unsafe impl SubClass < crate :: generated :: Resource > for AnimatedTexture { } unsafe impl SubClass < crate :: generated :: Reference > for AnimatedTexture { } unsafe impl SubClass < crate :: generated :: Object > for AnimatedTexture { } impl Instanciable for AnimatedTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimatedTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimatedTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_current_frame : * mut sys :: godot_method_bind , pub get_fps : * mut sys :: godot_method_bind , pub get_frame_delay : * mut sys :: godot_method_bind , pub get_frame_texture : * mut sys :: godot_method_bind , pub get_frames : * mut sys :: godot_method_bind , pub get_oneshot : * mut sys :: godot_method_bind , pub get_pause : * mut sys :: godot_method_bind , pub set_current_frame : * mut sys :: godot_method_bind , pub set_fps : * mut sys :: godot_method_bind , pub set_frame_delay : * mut sys :: godot_method_bind , pub set_frame_texture : * mut sys :: godot_method_bind , pub set_frames : * mut sys :: godot_method_bind , pub set_oneshot : * mut sys :: godot_method_bind , pub set_pause : * mut sys :: godot_method_bind } impl AnimatedTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimatedTextureMethodTable = AnimatedTextureMethodTable { class_constructor : None , get_current_frame : 0 as * mut sys :: godot_method_bind , get_fps : 0 as * mut sys :: godot_method_bind , get_frame_delay : 0 as * mut sys :: godot_method_bind , get_frame_texture : 0 as * mut sys :: godot_method_bind , get_frames : 0 as * mut sys :: godot_method_bind , get_oneshot : 0 as * mut sys :: godot_method_bind , get_pause : 0 as * mut sys :: godot_method_bind , set_current_frame : 0 as * mut sys :: godot_method_bind , set_fps : 0 as * mut sys :: godot_method_bind , set_frame_delay : 0 as * mut sys :: godot_method_bind , set_frame_texture : 0 as * mut sys :: godot_method_bind , set_frames : 0 as * mut sys :: godot_method_bind , set_oneshot : 0 as * mut sys :: godot_method_bind , set_pause : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimatedTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimatedTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_current_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_current_frame\0" . as_ptr () as * const c_char) ; table . get_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_fps\0" . as_ptr () as * const c_char) ; table . get_frame_delay = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_delay\0" . as_ptr () as * const c_char) ; table . get_frame_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_texture\0" . as_ptr () as * const c_char) ; table . get_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_frames\0" . as_ptr () as * const c_char) ; table . get_oneshot = (gd_api . godot_method_bind_get_method) (class_name , "get_oneshot\0" . as_ptr () as * const c_char) ; table . get_pause = (gd_api . godot_method_bind_get_method) (class_name , "get_pause\0" . as_ptr () as * const c_char) ; table . set_current_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_current_frame\0" . as_ptr () as * const c_char) ; table . set_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_fps\0" . as_ptr () as * const c_char) ; table . set_frame_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_frame_delay\0" . as_ptr () as * const c_char) ; table . set_frame_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_frame_texture\0" . as_ptr () as * const c_char) ; table . set_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_frames\0" . as_ptr () as * const c_char) ; table . set_oneshot = (gd_api . godot_method_bind_get_method) (class_name , "set_oneshot\0" . as_ptr () as * const c_char) ; table . set_pause = (gd_api . godot_method_bind_get_method) (class_name , "set_pause\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animated_texture::private::AnimatedTexture;
            
            pub mod animation {
                # ! [doc = "This module contains types related to the API class [`Animation`][super::Animation]."] pub (crate) mod private { # [doc = "`core class Animation` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`animation`][super::animation] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animation.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimation inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Animation { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Animation ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct InterpolationType (pub i64) ; impl InterpolationType { pub const NEAREST : InterpolationType = InterpolationType (0i64) ; pub const LINEAR : InterpolationType = InterpolationType (1i64) ; pub const CUBIC : InterpolationType = InterpolationType (2i64) ; } impl From < i64 > for InterpolationType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < InterpolationType > for i64 { # [inline] fn from (v : InterpolationType) -> Self { v . 0 } } impl FromVariant for InterpolationType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TrackType (pub i64) ; impl TrackType { pub const VALUE : TrackType = TrackType (0i64) ; pub const TRANSFORM : TrackType = TrackType (1i64) ; pub const METHOD : TrackType = TrackType (2i64) ; pub const BEZIER : TrackType = TrackType (3i64) ; pub const AUDIO : TrackType = TrackType (4i64) ; pub const ANIMATION : TrackType = TrackType (5i64) ; } impl From < i64 > for TrackType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TrackType > for i64 { # [inline] fn from (v : TrackType) -> Self { v . 0 } } impl FromVariant for TrackType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct UpdateMode (pub i64) ; impl UpdateMode { pub const CONTINUOUS : UpdateMode = UpdateMode (0i64) ; pub const DISCRETE : UpdateMode = UpdateMode (1i64) ; pub const TRIGGER : UpdateMode = UpdateMode (2i64) ; pub const CAPTURE : UpdateMode = UpdateMode (3i64) ; } impl From < i64 > for UpdateMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < UpdateMode > for i64 { # [inline] fn from (v : UpdateMode) -> Self { v . 0 } } impl FromVariant for UpdateMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Animation { pub const INTERPOLATION_NEAREST : i64 = 0i64 ; pub const TYPE_VALUE : i64 = 0i64 ; pub const UPDATE_CONTINUOUS : i64 = 0i64 ; pub const INTERPOLATION_LINEAR : i64 = 1i64 ; pub const TYPE_TRANSFORM : i64 = 1i64 ; pub const UPDATE_DISCRETE : i64 = 1i64 ; pub const INTERPOLATION_CUBIC : i64 = 2i64 ; pub const TYPE_METHOD : i64 = 2i64 ; pub const UPDATE_TRIGGER : i64 = 2i64 ; pub const TYPE_BEZIER : i64 = 3i64 ; pub const UPDATE_CAPTURE : i64 = 3i64 ; pub const TYPE_AUDIO : i64 = 4i64 ; pub const TYPE_ANIMATION : i64 = 5i64 ; } impl Animation { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a track to the Animation.\n# Default Arguments\n* `at_position` - `-1`"] # [doc = ""] # [inline] pub fn add_track (& self , type_ : i64 , at_position : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . add_track ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , type_ as _ , at_position as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the animation name at the key identified by `key_idx`. The `track_idx` must be the index of an Animation Track."] # [doc = ""] # [inline] pub fn animation_track_get_key_animation (& self , track_idx : i64 , key_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . animation_track_get_key_animation ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Inserts a key with value `animation` at the given `time` (in seconds). The `track_idx` must be the index of an Animation Track."] # [doc = ""] # [inline] pub fn animation_track_insert_key (& self , track_idx : i64 , time : f64 , animation : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . animation_track_insert_key ; let ret = crate :: icalls :: icallvar__i64_f64_str (method_bind , self . this . sys () . as_ptr () , track_idx as _ , time as _ , animation . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the key identified by `key_idx` to value `animation`. The `track_idx` must be the index of an Animation Track."] # [doc = ""] # [inline] pub fn animation_track_set_key_animation (& self , track_idx : i64 , key_idx : i64 , animation : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . animation_track_set_key_animation ; let ret = crate :: icalls :: icallvar__i64_i64_str (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _ , animation . into ()) ; } } # [doc = "Returns the end offset of the key identified by `key_idx`. The `track_idx` must be the index of an Audio Track.\nEnd offset is the number of seconds cut off at the ending of the audio stream."] # [doc = ""] # [inline] pub fn audio_track_get_key_end_offset (& self , track_idx : i64 , key_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_get_key_end_offset ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the start offset of the key identified by `key_idx`. The `track_idx` must be the index of an Audio Track.\nStart offset is the number of seconds cut off at the beginning of the audio stream."] # [doc = ""] # [inline] pub fn audio_track_get_key_start_offset (& self , track_idx : i64 , key_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_get_key_start_offset ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the audio stream of the key identified by `key_idx`. The `track_idx` must be the index of an Audio Track."] # [doc = ""] # [inline] pub fn audio_track_get_key_stream (& self , track_idx : i64 , key_idx : i64) -> Option < Ref < crate :: generated :: Resource , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_get_key_stream ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _) ; < Option < Ref < crate :: generated :: Resource , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Inserts an Audio Track key at the given `time` in seconds. The `track_idx` must be the index of an Audio Track.\n`stream` is the [`AudioStream`][AudioStream] resource to play. `start_offset` is the number of seconds cut off at the beginning of the audio stream, while `end_offset` is at the ending.\n# Default Arguments\n* `start_offset` - `0`\n* `end_offset` - `0`"] # [doc = ""] # [inline] pub fn audio_track_insert_key (& self , track_idx : i64 , time : f64 , stream : impl AsArg < crate :: generated :: Resource > , start_offset : f64 , end_offset : f64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_insert_key ; let ret = crate :: icalls :: icallvar__i64_f64_obj_f64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , time as _ , stream . as_arg_ptr () , start_offset as _ , end_offset as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the end offset of the key identified by `key_idx` to value `offset`. The `track_idx` must be the index of an Audio Track."] # [doc = ""] # [inline] pub fn audio_track_set_key_end_offset (& self , track_idx : i64 , key_idx : i64 , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_set_key_end_offset ; let ret = crate :: icalls :: icallvar__i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _ , offset as _) ; } } # [doc = "Sets the start offset of the key identified by `key_idx` to value `offset`. The `track_idx` must be the index of an Audio Track."] # [doc = ""] # [inline] pub fn audio_track_set_key_start_offset (& self , track_idx : i64 , key_idx : i64 , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_set_key_start_offset ; let ret = crate :: icalls :: icallvar__i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _ , offset as _) ; } } # [doc = "Sets the stream of the key identified by `key_idx` to value `stream`. The `track_idx` must be the index of an Audio Track."] # [doc = ""] # [inline] pub fn audio_track_set_key_stream (& self , track_idx : i64 , key_idx : i64 , stream : impl AsArg < crate :: generated :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . audio_track_set_key_stream ; let ret = crate :: icalls :: icallvar__i64_i64_obj (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _ , stream . as_arg_ptr ()) ; } } # [doc = "Returns the in handle of the key identified by `key_idx`. The `track_idx` must be the index of a Bezier Track."] # [doc = ""] # [inline] pub fn bezier_track_get_key_in_handle (& self , track_idx : i64 , key_idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_get_key_in_handle ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the out handle of the key identified by `key_idx`. The `track_idx` must be the index of a Bezier Track."] # [doc = ""] # [inline] pub fn bezier_track_get_key_out_handle (& self , track_idx : i64 , key_idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_get_key_out_handle ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the value of the key identified by `key_idx`. The `track_idx` must be the index of a Bezier Track."] # [doc = ""] # [inline] pub fn bezier_track_get_key_value (& self , track_idx : i64 , key_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_get_key_value ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Inserts a Bezier Track key at the given `time` in seconds. The `track_idx` must be the index of a Bezier Track.\n`in_handle` is the left-side weight of the added Bezier curve point, `out_handle` is the right-side one, while `value` is the actual value at this point.\n# Default Arguments\n* `in_handle` - `Vector2( 0, 0 )`\n* `out_handle` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn bezier_track_insert_key (& self , track_idx : i64 , time : f64 , value : f64 , in_handle : Vector2 , out_handle : Vector2) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_insert_key ; let ret = crate :: icalls :: icallvar__i64_f64_f64_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , time as _ , value as _ , in_handle , out_handle) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the interpolated value at the given `time` (in seconds). The `track_idx` must be the index of a Bezier Track."] # [doc = ""] # [inline] pub fn bezier_track_interpolate (& self , track_idx : i64 , time : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_interpolate ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , time as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the in handle of the key identified by `key_idx` to value `in_handle`. The `track_idx` must be the index of a Bezier Track."] # [doc = ""] # [inline] pub fn bezier_track_set_key_in_handle (& self , track_idx : i64 , key_idx : i64 , in_handle : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_set_key_in_handle ; let ret = crate :: icalls :: icallvar__i64_i64_vec2 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _ , in_handle) ; } } # [doc = "Sets the out handle of the key identified by `key_idx` to value `out_handle`. The `track_idx` must be the index of a Bezier Track."] # [doc = ""] # [inline] pub fn bezier_track_set_key_out_handle (& self , track_idx : i64 , key_idx : i64 , out_handle : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_set_key_out_handle ; let ret = crate :: icalls :: icallvar__i64_i64_vec2 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _ , out_handle) ; } } # [doc = "Sets the value of the key identified by `key_idx` to the given value. The `track_idx` must be the index of a Bezier Track."] # [doc = ""] # [inline] pub fn bezier_track_set_key_value (& self , track_idx : i64 , key_idx : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . bezier_track_set_key_value ; let ret = crate :: icalls :: icallvar__i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _ , value as _) ; } } # [doc = "Clear the animation (clear all tracks and reset all)."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a new track that is a copy of the given track from `to_animation`."] # [doc = ""] # [inline] pub fn copy_track (& self , track_idx : i64 , to_animation : impl AsArg < crate :: generated :: Animation >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . copy_track ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , track_idx as _ , to_animation . as_arg_ptr ()) ; } } # [doc = "Returns the index of the specified track. If the track is not found, return -1."] # [doc = ""] # [inline] pub fn find_track (& self , path : impl Into < NodePath >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . find_track ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The total length of the animation (in seconds).\n**Note:** Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping."] # [doc = ""] # [inline] pub fn length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . get_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The animation step value."] # [doc = ""] # [inline] pub fn step (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . get_step ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the amount of tracks in the animation."] # [doc = ""] # [inline] pub fn get_track_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . get_track_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "A flag indicating that the animation must loop. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation."] # [doc = ""] # [inline] pub fn has_loop (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . has_loop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns all the key indices of a method track, given a position and delta time."] # [doc = ""] # [inline] pub fn method_track_get_key_indices (& self , track_idx : i64 , time_sec : f64 , delta : f64) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . method_track_get_key_indices ; let ret = crate :: icalls :: icallvar__i64_f64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , time_sec as _ , delta as _) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the method name of a method track."] # [doc = ""] # [inline] pub fn method_track_get_name (& self , track_idx : i64 , key_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . method_track_get_name ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the arguments values to be called on a method track for a given key in a given track."] # [doc = ""] # [inline] pub fn method_track_get_params (& self , track_idx : i64 , key_idx : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . method_track_get_params ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Removes a track by specifying the track index."] # [doc = ""] # [inline] pub fn remove_track (& self , track_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . remove_track ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _) ; } } # [doc = "The total length of the animation (in seconds).\n**Note:** Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping."] # [doc = ""] # [inline] pub fn set_length (& self , time_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . set_length ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , time_sec as _) ; } } # [doc = "A flag indicating that the animation must loop. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation."] # [doc = ""] # [inline] pub fn set_loop (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . set_loop ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The animation step value."] # [doc = ""] # [inline] pub fn set_step (& self , size_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . set_step ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , size_sec as _) ; } } # [doc = "Finds the key index by time in a given track. Optionally, only find it if the exact time is given.\n# Default Arguments\n* `exact` - `false`"] # [doc = ""] # [inline] pub fn track_find_key (& self , track_idx : i64 , time : f64 , exact : bool) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_find_key ; let ret = crate :: icalls :: icallvar__i64_f64_bool (method_bind , self . this . sys () . as_ptr () , track_idx as _ , time as _ , exact as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the track at `idx` wraps the interpolation loop. New tracks wrap the interpolation loop by default."] # [doc = ""] # [inline] pub fn track_get_interpolation_loop_wrap (& self , track_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_interpolation_loop_wrap ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the interpolation type of a given track."] # [doc = ""] # [inline] pub fn track_get_interpolation_type (& self , track_idx : i64) -> crate :: generated :: animation :: InterpolationType { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_interpolation_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _) ; < crate :: generated :: animation :: InterpolationType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the amount of keys in a given track."] # [doc = ""] # [inline] pub fn track_get_key_count (& self , track_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_key_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the time at which the key is located."] # [doc = ""] # [inline] pub fn track_get_key_time (& self , track_idx : i64 , key_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_key_time ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease])."] # [doc = ""] # [inline] pub fn track_get_key_transition (& self , track_idx : i64 , key_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_key_transition ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the value of a given key in a given track."] # [doc = ""] # [inline] pub fn track_get_key_value (& self , track_idx : i64 , key_idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_key_value ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the path of a track. For more information on the path format, see [`track_set_path`][Self::track_set_path]."] # [doc = ""] # [inline] pub fn track_get_path (& self , track_idx : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_path ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the type of a track."] # [doc = ""] # [inline] pub fn track_get_type (& self , track_idx : i64) -> crate :: generated :: animation :: TrackType { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_get_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _) ; < crate :: generated :: animation :: TrackType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Insert a generic key in a given track.\n# Default Arguments\n* `transition` - `1`"] # [doc = ""] # [inline] pub fn track_insert_key (& self , track_idx : i64 , time : f64 , key : impl OwnedToVariant , transition : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_insert_key ; let ret = crate :: icalls :: icallvar__i64_f64_var_f64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , time as _ , key . owned_to_variant () , transition as _) ; } } # [doc = "Returns `true` if the track at index `idx` is enabled."] # [doc = ""] # [inline] pub fn track_is_enabled (& self , track_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_is_enabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given track is imported. Else, return `false`."] # [doc = ""] # [inline] pub fn track_is_imported (& self , track_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_is_imported ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Moves a track down."] # [doc = ""] # [inline] pub fn track_move_down (& self , track_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_move_down ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _) ; } } # [doc = "Changes the index position of track `idx` to the one defined in `to_idx`."] # [doc = ""] # [inline] pub fn track_move_to (& self , track_idx : i64 , to_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_move_to ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , to_idx as _) ; } } # [doc = "Moves a track up."] # [doc = ""] # [inline] pub fn track_move_up (& self , track_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_move_up ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _) ; } } # [doc = "Removes a key by index in a given track."] # [doc = ""] # [inline] pub fn track_remove_key (& self , track_idx : i64 , key_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_remove_key ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _) ; } } # [doc = "Removes a key by position (seconds) in a given track."] # [doc = ""] # [inline] pub fn track_remove_key_at_position (& self , track_idx : i64 , position : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_remove_key_at_position ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , position as _) ; } } # [doc = "Enables/disables the given track. Tracks are enabled by default."] # [doc = ""] # [inline] pub fn track_set_enabled (& self , track_idx : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_enabled ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , track_idx as _ , enabled as _) ; } } # [doc = "Sets the given track as imported or not."] # [doc = ""] # [inline] pub fn track_set_imported (& self , track_idx : i64 , imported : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_imported ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , track_idx as _ , imported as _) ; } } # [doc = "If `true`, the track at `idx` wraps the interpolation loop."] # [doc = ""] # [inline] pub fn track_set_interpolation_loop_wrap (& self , track_idx : i64 , interpolation : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_interpolation_loop_wrap ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , track_idx as _ , interpolation as _) ; } } # [doc = "Sets the interpolation type of a given track."] # [doc = ""] # [inline] pub fn track_set_interpolation_type (& self , track_idx : i64 , interpolation : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_interpolation_type ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , interpolation as _) ; } } # [doc = "Sets the time of an existing key."] # [doc = ""] # [inline] pub fn track_set_key_time (& self , track_idx : i64 , key_idx : i64 , time : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_key_time ; let ret = crate :: icalls :: icallvar__i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _ , time as _) ; } } # [doc = "Sets the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease])."] # [doc = ""] # [inline] pub fn track_set_key_transition (& self , track_idx : i64 , key_idx : i64 , transition : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_key_transition ; let ret = crate :: icalls :: icallvar__i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key_idx as _ , transition as _) ; } } # [doc = "Sets the value of an existing key."] # [doc = ""] # [inline] pub fn track_set_key_value (& self , track_idx : i64 , key : i64 , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_key_value ; let ret = crate :: icalls :: icallvar__i64_i64_var (method_bind , self . this . sys () . as_ptr () , track_idx as _ , key as _ , value . owned_to_variant ()) ; } } # [doc = "Sets the path of a track. Paths must be valid scene-tree paths to a node and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by `\":\"`.\nFor example, `\"character/skeleton:ankle\"` or `\"character/mesh:transform/local\"`."] # [doc = ""] # [inline] pub fn track_set_path (& self , track_idx : i64 , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_set_path ; let ret = crate :: icalls :: icallvar__i64_nodepath (method_bind , self . this . sys () . as_ptr () , track_idx as _ , path . into ()) ; } } # [doc = "Swaps the track `idx`'s index position with the track `with_idx`."] # [doc = ""] # [inline] pub fn track_swap (& self , track_idx : i64 , with_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . track_swap ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , with_idx as _) ; } } # [doc = "Insert a transform key for a transform track."] # [doc = ""] # [inline] pub fn transform_track_insert_key (& self , track_idx : i64 , time : f64 , location : Vector3 , rotation : Quat , scale : Vector3) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . transform_track_insert_key ; let ret = crate :: icalls :: icallvar__i64_f64_vec3_quat_vec3 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , time as _ , location , rotation , scale) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([`Vector3`][Vector3]), rotation ([`Quat`][Quat]) and scale ([`Vector3`][Vector3])."] # [doc = ""] # [inline] pub fn transform_track_interpolate (& self , track_idx : i64 , time_sec : f64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . transform_track_interpolate ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , time_sec as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all the key indices of a value track, given a position and delta time."] # [doc = ""] # [inline] pub fn value_track_get_key_indices (& self , track_idx : i64 , time_sec : f64 , delta : f64) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . value_track_get_key_indices ; let ret = crate :: icalls :: icallvar__i64_f64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , time_sec as _ , delta as _) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the update mode of a value track."] # [doc = ""] # [inline] pub fn value_track_get_update_mode (& self , track_idx : i64) -> crate :: generated :: animation :: UpdateMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . value_track_get_update_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _) ; < crate :: generated :: animation :: UpdateMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the interpolated value at the given time (in seconds). The `track_idx` must be the index of a value track."] # [doc = ""] # [inline] pub fn value_track_interpolate (& self , track_idx : i64 , time_sec : f64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . value_track_interpolate ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , time_sec as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the update mode (see [`UpdateMode`][UpdateMode]) of a value track."] # [doc = ""] # [inline] pub fn value_track_set_update_mode (& self , track_idx : i64 , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationMethodTable :: get (get_api ()) . value_track_set_update_mode ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , track_idx as _ , mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Animation { } unsafe impl GodotObject for Animation { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Animation" } } impl std :: ops :: Deref for Animation { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Animation { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Animation { } unsafe impl SubClass < crate :: generated :: Reference > for Animation { } unsafe impl SubClass < crate :: generated :: Object > for Animation { } impl Instanciable for Animation { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Animation :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_track : * mut sys :: godot_method_bind , pub animation_track_get_key_animation : * mut sys :: godot_method_bind , pub animation_track_insert_key : * mut sys :: godot_method_bind , pub animation_track_set_key_animation : * mut sys :: godot_method_bind , pub audio_track_get_key_end_offset : * mut sys :: godot_method_bind , pub audio_track_get_key_start_offset : * mut sys :: godot_method_bind , pub audio_track_get_key_stream : * mut sys :: godot_method_bind , pub audio_track_insert_key : * mut sys :: godot_method_bind , pub audio_track_set_key_end_offset : * mut sys :: godot_method_bind , pub audio_track_set_key_start_offset : * mut sys :: godot_method_bind , pub audio_track_set_key_stream : * mut sys :: godot_method_bind , pub bezier_track_get_key_in_handle : * mut sys :: godot_method_bind , pub bezier_track_get_key_out_handle : * mut sys :: godot_method_bind , pub bezier_track_get_key_value : * mut sys :: godot_method_bind , pub bezier_track_insert_key : * mut sys :: godot_method_bind , pub bezier_track_interpolate : * mut sys :: godot_method_bind , pub bezier_track_set_key_in_handle : * mut sys :: godot_method_bind , pub bezier_track_set_key_out_handle : * mut sys :: godot_method_bind , pub bezier_track_set_key_value : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub copy_track : * mut sys :: godot_method_bind , pub find_track : * mut sys :: godot_method_bind , pub get_length : * mut sys :: godot_method_bind , pub get_step : * mut sys :: godot_method_bind , pub get_track_count : * mut sys :: godot_method_bind , pub has_loop : * mut sys :: godot_method_bind , pub method_track_get_key_indices : * mut sys :: godot_method_bind , pub method_track_get_name : * mut sys :: godot_method_bind , pub method_track_get_params : * mut sys :: godot_method_bind , pub remove_track : * mut sys :: godot_method_bind , pub set_length : * mut sys :: godot_method_bind , pub set_loop : * mut sys :: godot_method_bind , pub set_step : * mut sys :: godot_method_bind , pub track_find_key : * mut sys :: godot_method_bind , pub track_get_interpolation_loop_wrap : * mut sys :: godot_method_bind , pub track_get_interpolation_type : * mut sys :: godot_method_bind , pub track_get_key_count : * mut sys :: godot_method_bind , pub track_get_key_time : * mut sys :: godot_method_bind , pub track_get_key_transition : * mut sys :: godot_method_bind , pub track_get_key_value : * mut sys :: godot_method_bind , pub track_get_path : * mut sys :: godot_method_bind , pub track_get_type : * mut sys :: godot_method_bind , pub track_insert_key : * mut sys :: godot_method_bind , pub track_is_enabled : * mut sys :: godot_method_bind , pub track_is_imported : * mut sys :: godot_method_bind , pub track_move_down : * mut sys :: godot_method_bind , pub track_move_to : * mut sys :: godot_method_bind , pub track_move_up : * mut sys :: godot_method_bind , pub track_remove_key : * mut sys :: godot_method_bind , pub track_remove_key_at_position : * mut sys :: godot_method_bind , pub track_set_enabled : * mut sys :: godot_method_bind , pub track_set_imported : * mut sys :: godot_method_bind , pub track_set_interpolation_loop_wrap : * mut sys :: godot_method_bind , pub track_set_interpolation_type : * mut sys :: godot_method_bind , pub track_set_key_time : * mut sys :: godot_method_bind , pub track_set_key_transition : * mut sys :: godot_method_bind , pub track_set_key_value : * mut sys :: godot_method_bind , pub track_set_path : * mut sys :: godot_method_bind , pub track_swap : * mut sys :: godot_method_bind , pub transform_track_insert_key : * mut sys :: godot_method_bind , pub transform_track_interpolate : * mut sys :: godot_method_bind , pub value_track_get_key_indices : * mut sys :: godot_method_bind , pub value_track_get_update_mode : * mut sys :: godot_method_bind , pub value_track_interpolate : * mut sys :: godot_method_bind , pub value_track_set_update_mode : * mut sys :: godot_method_bind } impl AnimationMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationMethodTable = AnimationMethodTable { class_constructor : None , add_track : 0 as * mut sys :: godot_method_bind , animation_track_get_key_animation : 0 as * mut sys :: godot_method_bind , animation_track_insert_key : 0 as * mut sys :: godot_method_bind , animation_track_set_key_animation : 0 as * mut sys :: godot_method_bind , audio_track_get_key_end_offset : 0 as * mut sys :: godot_method_bind , audio_track_get_key_start_offset : 0 as * mut sys :: godot_method_bind , audio_track_get_key_stream : 0 as * mut sys :: godot_method_bind , audio_track_insert_key : 0 as * mut sys :: godot_method_bind , audio_track_set_key_end_offset : 0 as * mut sys :: godot_method_bind , audio_track_set_key_start_offset : 0 as * mut sys :: godot_method_bind , audio_track_set_key_stream : 0 as * mut sys :: godot_method_bind , bezier_track_get_key_in_handle : 0 as * mut sys :: godot_method_bind , bezier_track_get_key_out_handle : 0 as * mut sys :: godot_method_bind , bezier_track_get_key_value : 0 as * mut sys :: godot_method_bind , bezier_track_insert_key : 0 as * mut sys :: godot_method_bind , bezier_track_interpolate : 0 as * mut sys :: godot_method_bind , bezier_track_set_key_in_handle : 0 as * mut sys :: godot_method_bind , bezier_track_set_key_out_handle : 0 as * mut sys :: godot_method_bind , bezier_track_set_key_value : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , copy_track : 0 as * mut sys :: godot_method_bind , find_track : 0 as * mut sys :: godot_method_bind , get_length : 0 as * mut sys :: godot_method_bind , get_step : 0 as * mut sys :: godot_method_bind , get_track_count : 0 as * mut sys :: godot_method_bind , has_loop : 0 as * mut sys :: godot_method_bind , method_track_get_key_indices : 0 as * mut sys :: godot_method_bind , method_track_get_name : 0 as * mut sys :: godot_method_bind , method_track_get_params : 0 as * mut sys :: godot_method_bind , remove_track : 0 as * mut sys :: godot_method_bind , set_length : 0 as * mut sys :: godot_method_bind , set_loop : 0 as * mut sys :: godot_method_bind , set_step : 0 as * mut sys :: godot_method_bind , track_find_key : 0 as * mut sys :: godot_method_bind , track_get_interpolation_loop_wrap : 0 as * mut sys :: godot_method_bind , track_get_interpolation_type : 0 as * mut sys :: godot_method_bind , track_get_key_count : 0 as * mut sys :: godot_method_bind , track_get_key_time : 0 as * mut sys :: godot_method_bind , track_get_key_transition : 0 as * mut sys :: godot_method_bind , track_get_key_value : 0 as * mut sys :: godot_method_bind , track_get_path : 0 as * mut sys :: godot_method_bind , track_get_type : 0 as * mut sys :: godot_method_bind , track_insert_key : 0 as * mut sys :: godot_method_bind , track_is_enabled : 0 as * mut sys :: godot_method_bind , track_is_imported : 0 as * mut sys :: godot_method_bind , track_move_down : 0 as * mut sys :: godot_method_bind , track_move_to : 0 as * mut sys :: godot_method_bind , track_move_up : 0 as * mut sys :: godot_method_bind , track_remove_key : 0 as * mut sys :: godot_method_bind , track_remove_key_at_position : 0 as * mut sys :: godot_method_bind , track_set_enabled : 0 as * mut sys :: godot_method_bind , track_set_imported : 0 as * mut sys :: godot_method_bind , track_set_interpolation_loop_wrap : 0 as * mut sys :: godot_method_bind , track_set_interpolation_type : 0 as * mut sys :: godot_method_bind , track_set_key_time : 0 as * mut sys :: godot_method_bind , track_set_key_transition : 0 as * mut sys :: godot_method_bind , track_set_key_value : 0 as * mut sys :: godot_method_bind , track_set_path : 0 as * mut sys :: godot_method_bind , track_swap : 0 as * mut sys :: godot_method_bind , transform_track_insert_key : 0 as * mut sys :: godot_method_bind , transform_track_interpolate : 0 as * mut sys :: godot_method_bind , value_track_get_key_indices : 0 as * mut sys :: godot_method_bind , value_track_get_update_mode : 0 as * mut sys :: godot_method_bind , value_track_interpolate : 0 as * mut sys :: godot_method_bind , value_track_set_update_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Animation\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_track = (gd_api . godot_method_bind_get_method) (class_name , "add_track\0" . as_ptr () as * const c_char) ; table . animation_track_get_key_animation = (gd_api . godot_method_bind_get_method) (class_name , "animation_track_get_key_animation\0" . as_ptr () as * const c_char) ; table . animation_track_insert_key = (gd_api . godot_method_bind_get_method) (class_name , "animation_track_insert_key\0" . as_ptr () as * const c_char) ; table . animation_track_set_key_animation = (gd_api . godot_method_bind_get_method) (class_name , "animation_track_set_key_animation\0" . as_ptr () as * const c_char) ; table . audio_track_get_key_end_offset = (gd_api . godot_method_bind_get_method) (class_name , "audio_track_get_key_end_offset\0" . as_ptr () as * const c_char) ; table . audio_track_get_key_start_offset = (gd_api . godot_method_bind_get_method) (class_name , "audio_track_get_key_start_offset\0" . as_ptr () as * const c_char) ; table . audio_track_get_key_stream = (gd_api . godot_method_bind_get_method) (class_name , "audio_track_get_key_stream\0" . as_ptr () as * const c_char) ; table . audio_track_insert_key = (gd_api . godot_method_bind_get_method) (class_name , "audio_track_insert_key\0" . as_ptr () as * const c_char) ; table . audio_track_set_key_end_offset = (gd_api . godot_method_bind_get_method) (class_name , "audio_track_set_key_end_offset\0" . as_ptr () as * const c_char) ; table . audio_track_set_key_start_offset = (gd_api . godot_method_bind_get_method) (class_name , "audio_track_set_key_start_offset\0" . as_ptr () as * const c_char) ; table . audio_track_set_key_stream = (gd_api . godot_method_bind_get_method) (class_name , "audio_track_set_key_stream\0" . as_ptr () as * const c_char) ; table . bezier_track_get_key_in_handle = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_get_key_in_handle\0" . as_ptr () as * const c_char) ; table . bezier_track_get_key_out_handle = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_get_key_out_handle\0" . as_ptr () as * const c_char) ; table . bezier_track_get_key_value = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_get_key_value\0" . as_ptr () as * const c_char) ; table . bezier_track_insert_key = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_insert_key\0" . as_ptr () as * const c_char) ; table . bezier_track_interpolate = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_interpolate\0" . as_ptr () as * const c_char) ; table . bezier_track_set_key_in_handle = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_set_key_in_handle\0" . as_ptr () as * const c_char) ; table . bezier_track_set_key_out_handle = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_set_key_out_handle\0" . as_ptr () as * const c_char) ; table . bezier_track_set_key_value = (gd_api . godot_method_bind_get_method) (class_name , "bezier_track_set_key_value\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . copy_track = (gd_api . godot_method_bind_get_method) (class_name , "copy_track\0" . as_ptr () as * const c_char) ; table . find_track = (gd_api . godot_method_bind_get_method) (class_name , "find_track\0" . as_ptr () as * const c_char) ; table . get_length = (gd_api . godot_method_bind_get_method) (class_name , "get_length\0" . as_ptr () as * const c_char) ; table . get_step = (gd_api . godot_method_bind_get_method) (class_name , "get_step\0" . as_ptr () as * const c_char) ; table . get_track_count = (gd_api . godot_method_bind_get_method) (class_name , "get_track_count\0" . as_ptr () as * const c_char) ; table . has_loop = (gd_api . godot_method_bind_get_method) (class_name , "has_loop\0" . as_ptr () as * const c_char) ; table . method_track_get_key_indices = (gd_api . godot_method_bind_get_method) (class_name , "method_track_get_key_indices\0" . as_ptr () as * const c_char) ; table . method_track_get_name = (gd_api . godot_method_bind_get_method) (class_name , "method_track_get_name\0" . as_ptr () as * const c_char) ; table . method_track_get_params = (gd_api . godot_method_bind_get_method) (class_name , "method_track_get_params\0" . as_ptr () as * const c_char) ; table . remove_track = (gd_api . godot_method_bind_get_method) (class_name , "remove_track\0" . as_ptr () as * const c_char) ; table . set_length = (gd_api . godot_method_bind_get_method) (class_name , "set_length\0" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\0" . as_ptr () as * const c_char) ; table . set_step = (gd_api . godot_method_bind_get_method) (class_name , "set_step\0" . as_ptr () as * const c_char) ; table . track_find_key = (gd_api . godot_method_bind_get_method) (class_name , "track_find_key\0" . as_ptr () as * const c_char) ; table . track_get_interpolation_loop_wrap = (gd_api . godot_method_bind_get_method) (class_name , "track_get_interpolation_loop_wrap\0" . as_ptr () as * const c_char) ; table . track_get_interpolation_type = (gd_api . godot_method_bind_get_method) (class_name , "track_get_interpolation_type\0" . as_ptr () as * const c_char) ; table . track_get_key_count = (gd_api . godot_method_bind_get_method) (class_name , "track_get_key_count\0" . as_ptr () as * const c_char) ; table . track_get_key_time = (gd_api . godot_method_bind_get_method) (class_name , "track_get_key_time\0" . as_ptr () as * const c_char) ; table . track_get_key_transition = (gd_api . godot_method_bind_get_method) (class_name , "track_get_key_transition\0" . as_ptr () as * const c_char) ; table . track_get_key_value = (gd_api . godot_method_bind_get_method) (class_name , "track_get_key_value\0" . as_ptr () as * const c_char) ; table . track_get_path = (gd_api . godot_method_bind_get_method) (class_name , "track_get_path\0" . as_ptr () as * const c_char) ; table . track_get_type = (gd_api . godot_method_bind_get_method) (class_name , "track_get_type\0" . as_ptr () as * const c_char) ; table . track_insert_key = (gd_api . godot_method_bind_get_method) (class_name , "track_insert_key\0" . as_ptr () as * const c_char) ; table . track_is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "track_is_enabled\0" . as_ptr () as * const c_char) ; table . track_is_imported = (gd_api . godot_method_bind_get_method) (class_name , "track_is_imported\0" . as_ptr () as * const c_char) ; table . track_move_down = (gd_api . godot_method_bind_get_method) (class_name , "track_move_down\0" . as_ptr () as * const c_char) ; table . track_move_to = (gd_api . godot_method_bind_get_method) (class_name , "track_move_to\0" . as_ptr () as * const c_char) ; table . track_move_up = (gd_api . godot_method_bind_get_method) (class_name , "track_move_up\0" . as_ptr () as * const c_char) ; table . track_remove_key = (gd_api . godot_method_bind_get_method) (class_name , "track_remove_key\0" . as_ptr () as * const c_char) ; table . track_remove_key_at_position = (gd_api . godot_method_bind_get_method) (class_name , "track_remove_key_at_position\0" . as_ptr () as * const c_char) ; table . track_set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "track_set_enabled\0" . as_ptr () as * const c_char) ; table . track_set_imported = (gd_api . godot_method_bind_get_method) (class_name , "track_set_imported\0" . as_ptr () as * const c_char) ; table . track_set_interpolation_loop_wrap = (gd_api . godot_method_bind_get_method) (class_name , "track_set_interpolation_loop_wrap\0" . as_ptr () as * const c_char) ; table . track_set_interpolation_type = (gd_api . godot_method_bind_get_method) (class_name , "track_set_interpolation_type\0" . as_ptr () as * const c_char) ; table . track_set_key_time = (gd_api . godot_method_bind_get_method) (class_name , "track_set_key_time\0" . as_ptr () as * const c_char) ; table . track_set_key_transition = (gd_api . godot_method_bind_get_method) (class_name , "track_set_key_transition\0" . as_ptr () as * const c_char) ; table . track_set_key_value = (gd_api . godot_method_bind_get_method) (class_name , "track_set_key_value\0" . as_ptr () as * const c_char) ; table . track_set_path = (gd_api . godot_method_bind_get_method) (class_name , "track_set_path\0" . as_ptr () as * const c_char) ; table . track_swap = (gd_api . godot_method_bind_get_method) (class_name , "track_swap\0" . as_ptr () as * const c_char) ; table . transform_track_insert_key = (gd_api . godot_method_bind_get_method) (class_name , "transform_track_insert_key\0" . as_ptr () as * const c_char) ; table . transform_track_interpolate = (gd_api . godot_method_bind_get_method) (class_name , "transform_track_interpolate\0" . as_ptr () as * const c_char) ; table . value_track_get_key_indices = (gd_api . godot_method_bind_get_method) (class_name , "value_track_get_key_indices\0" . as_ptr () as * const c_char) ; table . value_track_get_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "value_track_get_update_mode\0" . as_ptr () as * const c_char) ; table . value_track_interpolate = (gd_api . godot_method_bind_get_method) (class_name , "value_track_interpolate\0" . as_ptr () as * const c_char) ; table . value_track_set_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "value_track_set_update_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation::private::Animation;
            
            pub mod animation_node {
                # ! [doc = "This module contains types related to the API class [`AnimationNode`][super::AnimationNode]."] pub (crate) mod private { # [doc = "`core class AnimationNode` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`animation_node`][super::animation_node] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnode.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNode inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNode { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNode ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct FilterAction (pub i64) ; impl FilterAction { pub const IGNORE : FilterAction = FilterAction (0i64) ; pub const PASS : FilterAction = FilterAction (1i64) ; pub const STOP : FilterAction = FilterAction (2i64) ; pub const BLEND : FilterAction = FilterAction (3i64) ; } impl From < i64 > for FilterAction { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < FilterAction > for i64 { # [inline] fn from (v : FilterAction) -> Self { v . 0 } } impl FromVariant for FilterAction { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationNode { pub const FILTER_IGNORE : i64 = 0i64 ; pub const FILTER_PASS : i64 = 1i64 ; pub const FILTER_STOP : i64 = 2i64 ; pub const FILTER_BLEND : i64 = 3i64 ; } impl AnimationNode { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds an input to the node. This is only useful for nodes created for use in an [`AnimationNodeBlendTree`][AnimationNodeBlendTree]."] # [doc = ""] # [inline] pub fn add_input (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeMethodTable :: get (get_api ()) . add_input ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Blend an animation by `blend` amount (name must be valid in the linked [`AnimationPlayer`][AnimationPlayer]). A `time` and `delta` may be passed, as well as whether `seek` happened."] # [doc = ""] # [inline] pub fn blend_animation (& self , animation : impl Into < GodotString > , time : f64 , delta : f64 , seeked : bool , blend : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeMethodTable :: get (get_api ()) . blend_animation ; let ret = crate :: icalls :: icallvar__str_f64_f64_bool_f64 (method_bind , self . this . sys () . as_ptr () , animation . into () , time as _ , delta as _ , seeked as _ , blend as _) ; } } # [doc = "Blend an input. This is only useful for nodes created for an [`AnimationNodeBlendTree`][AnimationNodeBlendTree]. The `time` parameter is a relative delta, unless `seek` is `true`, in which case it is absolute. A filter mode may be optionally passed (see [`FilterAction`][FilterAction] for options).\n# Default Arguments\n* `filter` - `0`\n* `optimize` - `true`"] # [doc = ""] # [inline] pub fn blend_input (& self , input_index : i64 , time : f64 , seek : bool , blend : f64 , filter : i64 , optimize : bool) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeMethodTable :: get (get_api ()) . blend_input ; let ret = crate :: icalls :: icallvar__i64_f64_bool_f64_i64_bool (method_bind , self . this . sys () . as_ptr () , input_index as _ , time as _ , seek as _ , blend as _ , filter as _ , optimize as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from [`AnimationRootNode`][AnimationRootNode] instead, else editors will not display your node for addition.\n# Default Arguments\n* `filter` - `0`\n* `optimize` - `true`"] # [doc = ""] # [inline] pub fn blend_node (& self , name : impl Into < GodotString > , node : impl AsArg < crate :: generated :: AnimationNode > , time : f64 , seek : bool , blend : f64 , filter : i64 , optimize : bool) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeMethodTable :: get (get_api ()) . blend_node ; let ret = crate :: icalls :: icallvar__str_obj_f64_bool_f64_i64_bool (method_bind , self . this . sys () . as_ptr () , name . into () , node . as_arg_ptr () , time as _ , seek as _ , blend as _ , filter as _ , optimize as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Amount of inputs in this node, only useful for nodes that go into [`AnimationNodeBlendTree`][AnimationNodeBlendTree]."] # [doc = ""] # [inline] pub fn get_input_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeMethodTable :: get (get_api ()) . get_input_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets the name of an input by index."] # [doc = ""] # [inline] pub fn get_input_name (& self , input : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeMethodTable :: get (get_api ()) . get_input_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , input as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees."] # [doc = ""] # [inline] pub fn get_parameter (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeMethodTable :: get (get_api ()) . get_parameter ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, filtering is enabled."] # [doc = ""] # [inline] pub fn is_filter_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeMethodTable :: get (get_api ()) . is_filter_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether the given path is filtered."] # [doc = ""] # [inline] pub fn is_path_filtered (& self , path : impl Into < NodePath >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeMethodTable :: get (get_api ()) . is_path_filtered ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes an input, call this only when inactive."] # [doc = ""] # [inline] pub fn remove_input (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeMethodTable :: get (get_api ()) . remove_input ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } # [doc = "If `true`, filtering is enabled."] # [doc = ""] # [inline] pub fn set_filter_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeMethodTable :: get (get_api ()) . set_filter_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Adds or removes a path for the filter."] # [doc = ""] # [inline] pub fn set_filter_path (& self , path : impl Into < NodePath > , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeMethodTable :: get (get_api ()) . set_filter_path ; let ret = crate :: icalls :: icallvar__nodepath_bool (method_bind , self . this . sys () . as_ptr () , path . into () , enable as _) ; } } # [doc = "Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes."] # [doc = ""] # [inline] pub fn set_parameter (& self , name : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeMethodTable :: get (get_api ()) . set_parameter ; let ret = crate :: icalls :: icallvar__str_var (method_bind , self . this . sys () . as_ptr () , name . into () , value . owned_to_variant ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNode { } unsafe impl GodotObject for AnimationNode { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNode" } } impl std :: ops :: Deref for AnimationNode { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNode { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNode { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNode { } impl Instanciable for AnimationNode { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNode :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_input : * mut sys :: godot_method_bind , pub blend_animation : * mut sys :: godot_method_bind , pub blend_input : * mut sys :: godot_method_bind , pub blend_node : * mut sys :: godot_method_bind , pub get_input_count : * mut sys :: godot_method_bind , pub get_input_name : * mut sys :: godot_method_bind , pub get_parameter : * mut sys :: godot_method_bind , pub is_filter_enabled : * mut sys :: godot_method_bind , pub is_path_filtered : * mut sys :: godot_method_bind , pub remove_input : * mut sys :: godot_method_bind , pub set_filter_enabled : * mut sys :: godot_method_bind , pub set_filter_path : * mut sys :: godot_method_bind , pub set_parameter : * mut sys :: godot_method_bind } impl AnimationNodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeMethodTable = AnimationNodeMethodTable { class_constructor : None , add_input : 0 as * mut sys :: godot_method_bind , blend_animation : 0 as * mut sys :: godot_method_bind , blend_input : 0 as * mut sys :: godot_method_bind , blend_node : 0 as * mut sys :: godot_method_bind , get_input_count : 0 as * mut sys :: godot_method_bind , get_input_name : 0 as * mut sys :: godot_method_bind , get_parameter : 0 as * mut sys :: godot_method_bind , is_filter_enabled : 0 as * mut sys :: godot_method_bind , is_path_filtered : 0 as * mut sys :: godot_method_bind , remove_input : 0 as * mut sys :: godot_method_bind , set_filter_enabled : 0 as * mut sys :: godot_method_bind , set_filter_path : 0 as * mut sys :: godot_method_bind , set_parameter : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNode\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_input = (gd_api . godot_method_bind_get_method) (class_name , "add_input\0" . as_ptr () as * const c_char) ; table . blend_animation = (gd_api . godot_method_bind_get_method) (class_name , "blend_animation\0" . as_ptr () as * const c_char) ; table . blend_input = (gd_api . godot_method_bind_get_method) (class_name , "blend_input\0" . as_ptr () as * const c_char) ; table . blend_node = (gd_api . godot_method_bind_get_method) (class_name , "blend_node\0" . as_ptr () as * const c_char) ; table . get_input_count = (gd_api . godot_method_bind_get_method) (class_name , "get_input_count\0" . as_ptr () as * const c_char) ; table . get_input_name = (gd_api . godot_method_bind_get_method) (class_name , "get_input_name\0" . as_ptr () as * const c_char) ; table . get_parameter = (gd_api . godot_method_bind_get_method) (class_name , "get_parameter\0" . as_ptr () as * const c_char) ; table . is_filter_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_filter_enabled\0" . as_ptr () as * const c_char) ; table . is_path_filtered = (gd_api . godot_method_bind_get_method) (class_name , "is_path_filtered\0" . as_ptr () as * const c_char) ; table . remove_input = (gd_api . godot_method_bind_get_method) (class_name , "remove_input\0" . as_ptr () as * const c_char) ; table . set_filter_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_enabled\0" . as_ptr () as * const c_char) ; table . set_filter_path = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_path\0" . as_ptr () as * const c_char) ; table . set_parameter = (gd_api . godot_method_bind_get_method) (class_name , "set_parameter\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node::private::AnimationNode;
            
            pub(crate) mod animation_node_add_2 {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeAdd2`][super::AnimationNodeAdd2]."] pub (crate) mod private { # [doc = "`core class AnimationNodeAdd2` inherits `AnimationNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodeadd2.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeAdd2 inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeAdd2 { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeAdd2 ; impl AnimationNodeAdd2 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeAdd2MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, sets the `optimization` to `false` when calling [`AnimationNode.blend_input`][AnimationNode::blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn is_using_sync (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeAdd2MethodTable :: get (get_api ()) . is_using_sync ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, sets the `optimization` to `false` when calling [`AnimationNode.blend_input`][AnimationNode::blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn set_use_sync (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeAdd2MethodTable :: get (get_api ()) . set_use_sync ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeAdd2 { } unsafe impl GodotObject for AnimationNodeAdd2 { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeAdd2" } } impl std :: ops :: Deref for AnimationNodeAdd2 { type Target = crate :: generated :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeAdd2 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AnimationNode > for AnimationNodeAdd2 { } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeAdd2 { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeAdd2 { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeAdd2 { } impl Instanciable for AnimationNodeAdd2 { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeAdd2 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeAdd2MethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_using_sync : * mut sys :: godot_method_bind , pub set_use_sync : * mut sys :: godot_method_bind } impl AnimationNodeAdd2MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeAdd2MethodTable = AnimationNodeAdd2MethodTable { class_constructor : None , is_using_sync : 0 as * mut sys :: godot_method_bind , set_use_sync : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeAdd2MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeAdd2\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_using_sync = (gd_api . godot_method_bind_get_method) (class_name , "is_using_sync\0" . as_ptr () as * const c_char) ; table . set_use_sync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_sync\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_add_2::private::AnimationNodeAdd2;
            
            pub(crate) mod animation_node_add_3 {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeAdd3`][super::AnimationNodeAdd3]."] pub (crate) mod private { # [doc = "`core class AnimationNodeAdd3` inherits `AnimationNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodeadd3.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeAdd3 inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeAdd3 { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeAdd3 ; impl AnimationNodeAdd3 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeAdd3MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, sets the `optimization` to `false` when calling [`AnimationNode.blend_input`][AnimationNode::blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn is_using_sync (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeAdd3MethodTable :: get (get_api ()) . is_using_sync ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, sets the `optimization` to `false` when calling [`AnimationNode.blend_input`][AnimationNode::blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn set_use_sync (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeAdd3MethodTable :: get (get_api ()) . set_use_sync ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeAdd3 { } unsafe impl GodotObject for AnimationNodeAdd3 { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeAdd3" } } impl std :: ops :: Deref for AnimationNodeAdd3 { type Target = crate :: generated :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeAdd3 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AnimationNode > for AnimationNodeAdd3 { } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeAdd3 { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeAdd3 { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeAdd3 { } impl Instanciable for AnimationNodeAdd3 { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeAdd3 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeAdd3MethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_using_sync : * mut sys :: godot_method_bind , pub set_use_sync : * mut sys :: godot_method_bind } impl AnimationNodeAdd3MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeAdd3MethodTable = AnimationNodeAdd3MethodTable { class_constructor : None , is_using_sync : 0 as * mut sys :: godot_method_bind , set_use_sync : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeAdd3MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeAdd3\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_using_sync = (gd_api . godot_method_bind_get_method) (class_name , "is_using_sync\0" . as_ptr () as * const c_char) ; table . set_use_sync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_sync\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_add_3::private::AnimationNodeAdd3;
            
            pub(crate) mod animation_node_animation {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeAnimation`][super::AnimationNodeAnimation]."] pub (crate) mod private { # [doc = "`core class AnimationNodeAnimation` inherits `AnimationRootNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodeanimation.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeAnimation inherits methods from:\n - [AnimationRootNode](struct.AnimationRootNode.html)\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeAnimation { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeAnimation ; impl AnimationNodeAnimation { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeAnimationMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Animation to use as an output. It is one of the animations provided by [`AnimationTree.anim_player`][AnimationTree::anim_player]."] # [doc = ""] # [inline] pub fn animation (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeAnimationMethodTable :: get (get_api ()) . get_animation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Animation to use as an output. It is one of the animations provided by [`AnimationTree.anim_player`][AnimationTree::anim_player]."] # [doc = ""] # [inline] pub fn set_animation (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeAnimationMethodTable :: get (get_api ()) . set_animation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeAnimation { } unsafe impl GodotObject for AnimationNodeAnimation { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeAnimation" } } impl std :: ops :: Deref for AnimationNodeAnimation { type Target = crate :: generated :: AnimationRootNode ; # [inline] fn deref (& self) -> & crate :: generated :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeAnimation { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AnimationRootNode > for AnimationNodeAnimation { } unsafe impl SubClass < crate :: generated :: AnimationNode > for AnimationNodeAnimation { } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeAnimation { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeAnimation { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeAnimation { } impl Instanciable for AnimationNodeAnimation { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeAnimation :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeAnimationMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_animation : * mut sys :: godot_method_bind , pub set_animation : * mut sys :: godot_method_bind } impl AnimationNodeAnimationMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeAnimationMethodTable = AnimationNodeAnimationMethodTable { class_constructor : None , get_animation : 0 as * mut sys :: godot_method_bind , set_animation : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeAnimationMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeAnimation\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_animation\0" . as_ptr () as * const c_char) ; table . set_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_animation\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_animation::private::AnimationNodeAnimation;
            
            pub(crate) mod animation_node_blend_2 {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeBlend2`][super::AnimationNodeBlend2]."] pub (crate) mod private { # [doc = "`core class AnimationNodeBlend2` inherits `AnimationNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodeblend2.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeBlend2 inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeBlend2 { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeBlend2 ; impl AnimationNodeBlend2 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeBlend2MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, sets the `optimization` to `false` when calling [`AnimationNode.blend_input`][AnimationNode::blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn is_using_sync (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlend2MethodTable :: get (get_api ()) . is_using_sync ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, sets the `optimization` to `false` when calling [`AnimationNode.blend_input`][AnimationNode::blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn set_use_sync (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlend2MethodTable :: get (get_api ()) . set_use_sync ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeBlend2 { } unsafe impl GodotObject for AnimationNodeBlend2 { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlend2" } } impl std :: ops :: Deref for AnimationNodeBlend2 { type Target = crate :: generated :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlend2 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AnimationNode > for AnimationNodeBlend2 { } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeBlend2 { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeBlend2 { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeBlend2 { } impl Instanciable for AnimationNodeBlend2 { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeBlend2 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeBlend2MethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_using_sync : * mut sys :: godot_method_bind , pub set_use_sync : * mut sys :: godot_method_bind } impl AnimationNodeBlend2MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeBlend2MethodTable = AnimationNodeBlend2MethodTable { class_constructor : None , is_using_sync : 0 as * mut sys :: godot_method_bind , set_use_sync : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeBlend2MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeBlend2\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_using_sync = (gd_api . godot_method_bind_get_method) (class_name , "is_using_sync\0" . as_ptr () as * const c_char) ; table . set_use_sync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_sync\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_blend_2::private::AnimationNodeBlend2;
            
            pub(crate) mod animation_node_blend_3 {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeBlend3`][super::AnimationNodeBlend3]."] pub (crate) mod private { # [doc = "`core class AnimationNodeBlend3` inherits `AnimationNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodeblend3.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeBlend3 inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeBlend3 { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeBlend3 ; impl AnimationNodeBlend3 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeBlend3MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, sets the `optimization` to `false` when calling [`AnimationNode.blend_input`][AnimationNode::blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn is_using_sync (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlend3MethodTable :: get (get_api ()) . is_using_sync ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, sets the `optimization` to `false` when calling [`AnimationNode.blend_input`][AnimationNode::blend_input], forcing the blended animations to update every frame."] # [doc = ""] # [inline] pub fn set_use_sync (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlend3MethodTable :: get (get_api ()) . set_use_sync ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeBlend3 { } unsafe impl GodotObject for AnimationNodeBlend3 { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlend3" } } impl std :: ops :: Deref for AnimationNodeBlend3 { type Target = crate :: generated :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlend3 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AnimationNode > for AnimationNodeBlend3 { } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeBlend3 { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeBlend3 { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeBlend3 { } impl Instanciable for AnimationNodeBlend3 { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeBlend3 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeBlend3MethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_using_sync : * mut sys :: godot_method_bind , pub set_use_sync : * mut sys :: godot_method_bind } impl AnimationNodeBlend3MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeBlend3MethodTable = AnimationNodeBlend3MethodTable { class_constructor : None , is_using_sync : 0 as * mut sys :: godot_method_bind , set_use_sync : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeBlend3MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeBlend3\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_using_sync = (gd_api . godot_method_bind_get_method) (class_name , "is_using_sync\0" . as_ptr () as * const c_char) ; table . set_use_sync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_sync\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_blend_3::private::AnimationNodeBlend3;
            
            pub(crate) mod animation_node_blend_space_1d {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeBlendSpace1D`][super::AnimationNodeBlendSpace1D]."] pub (crate) mod private { # [doc = "`core class AnimationNodeBlendSpace1D` inherits `AnimationRootNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodeblendspace1d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeBlendSpace1D inherits methods from:\n - [AnimationRootNode](struct.AnimationRootNode.html)\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeBlendSpace1D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeBlendSpace1D ; impl AnimationNodeBlendSpace1D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeBlendSpace1DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a new point that represents a `node` on the virtual axis at a given position set by `pos`. You can insert it at a specific index using the `at_index` argument. If you use the default value for `at_index`, the point is inserted at the end of the blend points array.\n# Default Arguments\n* `at_index` - `-1`"] # [doc = ""] # [inline] pub fn add_blend_point (& self , node : impl AsArg < crate :: generated :: AnimationRootNode > , pos : f64 , at_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . add_blend_point ; let ret = crate :: icalls :: icallvar__obj_f64_i64 (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr () , pos as _ , at_index as _) ; } } # [doc = "Returns the number of points on the blend axis."] # [doc = ""] # [inline] pub fn get_blend_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . get_blend_point_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`AnimationNode`][AnimationNode] referenced by the point at index `point`."] # [doc = ""] # [inline] pub fn blend_point_node (& self , point : i64) -> Option < Ref < crate :: generated :: AnimationRootNode , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . get_blend_point_node ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , point as _) ; < Option < Ref < crate :: generated :: AnimationRootNode , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position of the point at index `point`."] # [doc = ""] # [inline] pub fn blend_point_position (& self , point : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . get_blend_point_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , point as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The blend space's axis's upper limit for the points' position. See [`add_blend_point`][Self::add_blend_point]."] # [doc = ""] # [inline] pub fn max_space (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . get_max_space ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The blend space's axis's lower limit for the points' position. See [`add_blend_point`][Self::add_blend_point]."] # [doc = ""] # [inline] pub fn min_space (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . get_min_space ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Position increment to snap to when moving a point on the axis."] # [doc = ""] # [inline] pub fn snap (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . get_snap ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Label of the virtual axis of the blend space."] # [doc = ""] # [inline] pub fn value_label (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . get_value_label ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Removes the point at index `point` from the blend axis."] # [doc = ""] # [inline] pub fn remove_blend_point (& self , point : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . remove_blend_point ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , point as _) ; } } # [doc = "Changes the [`AnimationNode`][AnimationNode] referenced by the point at index `point`."] # [doc = ""] # [inline] pub fn set_blend_point_node (& self , point : i64 , node : impl AsArg < crate :: generated :: AnimationRootNode >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . set_blend_point_node ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , point as _ , node . as_arg_ptr ()) ; } } # [doc = "Updates the position of the point at index `point` on the blend axis."] # [doc = ""] # [inline] pub fn set_blend_point_position (& self , point : i64 , pos : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . set_blend_point_position ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , point as _ , pos as _) ; } } # [doc = "The blend space's axis's upper limit for the points' position. See [`add_blend_point`][Self::add_blend_point]."] # [doc = ""] # [inline] pub fn set_max_space (& self , max_space : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . set_max_space ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , max_space as _) ; } } # [doc = "The blend space's axis's lower limit for the points' position. See [`add_blend_point`][Self::add_blend_point]."] # [doc = ""] # [inline] pub fn set_min_space (& self , min_space : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . set_min_space ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , min_space as _) ; } } # [doc = "Position increment to snap to when moving a point on the axis."] # [doc = ""] # [inline] pub fn set_snap (& self , snap : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . set_snap ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , snap as _) ; } } # [doc = "Label of the virtual axis of the blend space."] # [doc = ""] # [inline] pub fn set_value_label (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace1DMethodTable :: get (get_api ()) . set_value_label ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeBlendSpace1D { } unsafe impl GodotObject for AnimationNodeBlendSpace1D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlendSpace1D" } } impl std :: ops :: Deref for AnimationNodeBlendSpace1D { type Target = crate :: generated :: AnimationRootNode ; # [inline] fn deref (& self) -> & crate :: generated :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlendSpace1D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AnimationRootNode > for AnimationNodeBlendSpace1D { } unsafe impl SubClass < crate :: generated :: AnimationNode > for AnimationNodeBlendSpace1D { } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeBlendSpace1D { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeBlendSpace1D { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeBlendSpace1D { } impl Instanciable for AnimationNodeBlendSpace1D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeBlendSpace1D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeBlendSpace1DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_blend_point : * mut sys :: godot_method_bind , pub get_blend_point_count : * mut sys :: godot_method_bind , pub get_blend_point_node : * mut sys :: godot_method_bind , pub get_blend_point_position : * mut sys :: godot_method_bind , pub get_max_space : * mut sys :: godot_method_bind , pub get_min_space : * mut sys :: godot_method_bind , pub get_snap : * mut sys :: godot_method_bind , pub get_value_label : * mut sys :: godot_method_bind , pub remove_blend_point : * mut sys :: godot_method_bind , pub set_blend_point_node : * mut sys :: godot_method_bind , pub set_blend_point_position : * mut sys :: godot_method_bind , pub set_max_space : * mut sys :: godot_method_bind , pub set_min_space : * mut sys :: godot_method_bind , pub set_snap : * mut sys :: godot_method_bind , pub set_value_label : * mut sys :: godot_method_bind } impl AnimationNodeBlendSpace1DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeBlendSpace1DMethodTable = AnimationNodeBlendSpace1DMethodTable { class_constructor : None , add_blend_point : 0 as * mut sys :: godot_method_bind , get_blend_point_count : 0 as * mut sys :: godot_method_bind , get_blend_point_node : 0 as * mut sys :: godot_method_bind , get_blend_point_position : 0 as * mut sys :: godot_method_bind , get_max_space : 0 as * mut sys :: godot_method_bind , get_min_space : 0 as * mut sys :: godot_method_bind , get_snap : 0 as * mut sys :: godot_method_bind , get_value_label : 0 as * mut sys :: godot_method_bind , remove_blend_point : 0 as * mut sys :: godot_method_bind , set_blend_point_node : 0 as * mut sys :: godot_method_bind , set_blend_point_position : 0 as * mut sys :: godot_method_bind , set_max_space : 0 as * mut sys :: godot_method_bind , set_min_space : 0 as * mut sys :: godot_method_bind , set_snap : 0 as * mut sys :: godot_method_bind , set_value_label : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeBlendSpace1DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeBlendSpace1D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_blend_point = (gd_api . godot_method_bind_get_method) (class_name , "add_blend_point\0" . as_ptr () as * const c_char) ; table . get_blend_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_count\0" . as_ptr () as * const c_char) ; table . get_blend_point_node = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_node\0" . as_ptr () as * const c_char) ; table . get_blend_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_position\0" . as_ptr () as * const c_char) ; table . get_max_space = (gd_api . godot_method_bind_get_method) (class_name , "get_max_space\0" . as_ptr () as * const c_char) ; table . get_min_space = (gd_api . godot_method_bind_get_method) (class_name , "get_min_space\0" . as_ptr () as * const c_char) ; table . get_snap = (gd_api . godot_method_bind_get_method) (class_name , "get_snap\0" . as_ptr () as * const c_char) ; table . get_value_label = (gd_api . godot_method_bind_get_method) (class_name , "get_value_label\0" . as_ptr () as * const c_char) ; table . remove_blend_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_blend_point\0" . as_ptr () as * const c_char) ; table . set_blend_point_node = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_point_node\0" . as_ptr () as * const c_char) ; table . set_blend_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_point_position\0" . as_ptr () as * const c_char) ; table . set_max_space = (gd_api . godot_method_bind_get_method) (class_name , "set_max_space\0" . as_ptr () as * const c_char) ; table . set_min_space = (gd_api . godot_method_bind_get_method) (class_name , "set_min_space\0" . as_ptr () as * const c_char) ; table . set_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_snap\0" . as_ptr () as * const c_char) ; table . set_value_label = (gd_api . godot_method_bind_get_method) (class_name , "set_value_label\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_blend_space_1d::private::AnimationNodeBlendSpace1D;
            
            pub mod animation_node_blend_space_2d {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeBlendSpace2D`][super::AnimationNodeBlendSpace2D]."] pub (crate) mod private { # [doc = "`core class AnimationNodeBlendSpace2D` inherits `AnimationRootNode` (reference-counted).\n\nThis class has related types in the [`animation_node_blend_space_2d`][super::animation_node_blend_space_2d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodeblendspace2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeBlendSpace2D inherits methods from:\n - [AnimationRootNode](struct.AnimationRootNode.html)\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeBlendSpace2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeBlendSpace2D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BlendMode (pub i64) ; impl BlendMode { pub const INTERPOLATED : BlendMode = BlendMode (0i64) ; pub const DISCRETE : BlendMode = BlendMode (1i64) ; pub const DISCRETE_CARRY : BlendMode = BlendMode (2i64) ; } impl From < i64 > for BlendMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BlendMode > for i64 { # [inline] fn from (v : BlendMode) -> Self { v . 0 } } impl FromVariant for BlendMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationNodeBlendSpace2D { pub const BLEND_MODE_INTERPOLATED : i64 = 0i64 ; pub const BLEND_MODE_DISCRETE : i64 = 1i64 ; pub const BLEND_MODE_DISCRETE_CARRY : i64 = 2i64 ; } impl AnimationNodeBlendSpace2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeBlendSpace2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a new point that represents a `node` at the position set by `pos`. You can insert it at a specific index using the `at_index` argument. If you use the default value for `at_index`, the point is inserted at the end of the blend points array.\n# Default Arguments\n* `at_index` - `-1`"] # [doc = ""] # [inline] pub fn add_blend_point (& self , node : impl AsArg < crate :: generated :: AnimationRootNode > , pos : Vector2 , at_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . add_blend_point ; let ret = crate :: icalls :: icallvar__obj_vec2_i64 (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr () , pos , at_index as _) ; } } # [doc = "Creates a new triangle using three points `x`, `y`, and `z`. Triangles can overlap. You can insert the triangle at a specific index using the `at_index` argument. If you use the default value for `at_index`, the point is inserted at the end of the blend points array.\n# Default Arguments\n* `at_index` - `-1`"] # [doc = ""] # [inline] pub fn add_triangle (& self , x : i64 , y : i64 , z : i64 , at_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . add_triangle ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x as _ , y as _ , z as _ , at_index as _) ; } } # [doc = "If `true`, the blend space is triangulated automatically. The mesh updates every time you add or remove points with [`add_blend_point`][Self::add_blend_point] and [`remove_blend_point`][Self::remove_blend_point]."] # [doc = ""] # [inline] pub fn auto_triangles (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_auto_triangles ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Controls the interpolation between animations. See [`BlendMode`][BlendMode] constants."] # [doc = ""] # [inline] pub fn blend_mode (& self) -> crate :: generated :: animation_node_blend_space_2d :: BlendMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_blend_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: animation_node_blend_space_2d :: BlendMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of points in the blend space."] # [doc = ""] # [inline] pub fn get_blend_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_blend_point_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`AnimationRootNode`][AnimationRootNode] referenced by the point at index `point`."] # [doc = ""] # [inline] pub fn blend_point_node (& self , point : i64) -> Option < Ref < crate :: generated :: AnimationRootNode , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_blend_point_node ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , point as _) ; < Option < Ref < crate :: generated :: AnimationRootNode , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position of the point at index `point`."] # [doc = ""] # [inline] pub fn blend_point_position (& self , point : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_blend_point_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , point as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The blend space's X and Y axes' upper limit for the points' position. See [`add_blend_point`][Self::add_blend_point]."] # [doc = ""] # [inline] pub fn max_space (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_max_space ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The blend space's X and Y axes' lower limit for the points' position. See [`add_blend_point`][Self::add_blend_point]."] # [doc = ""] # [inline] pub fn min_space (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_min_space ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Position increment to snap to when moving a point."] # [doc = ""] # [inline] pub fn snap (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_snap ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of triangles in the blend space."] # [doc = ""] # [inline] pub fn get_triangle_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_triangle_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the position of the point at index `point` in the triangle of index `triangle`."] # [doc = ""] # [inline] pub fn get_triangle_point (& self , triangle : i64 , point : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_triangle_point ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , triangle as _ , point as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Name of the blend space's X axis."] # [doc = ""] # [inline] pub fn x_label (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_x_label ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Name of the blend space's Y axis."] # [doc = ""] # [inline] pub fn y_label (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . get_y_label ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Removes the point at index `point` from the blend space."] # [doc = ""] # [inline] pub fn remove_blend_point (& self , point : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . remove_blend_point ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , point as _) ; } } # [doc = "Removes the triangle at index `triangle` from the blend space."] # [doc = ""] # [inline] pub fn remove_triangle (& self , triangle : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . remove_triangle ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , triangle as _) ; } } # [doc = "If `true`, the blend space is triangulated automatically. The mesh updates every time you add or remove points with [`add_blend_point`][Self::add_blend_point] and [`remove_blend_point`][Self::remove_blend_point]."] # [doc = ""] # [inline] pub fn set_auto_triangles (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_auto_triangles ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Controls the interpolation between animations. See [`BlendMode`][BlendMode] constants."] # [doc = ""] # [inline] pub fn set_blend_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_blend_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Changes the [`AnimationNode`][AnimationNode] referenced by the point at index `point`."] # [doc = ""] # [inline] pub fn set_blend_point_node (& self , point : i64 , node : impl AsArg < crate :: generated :: AnimationRootNode >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_blend_point_node ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , point as _ , node . as_arg_ptr ()) ; } } # [doc = "Updates the position of the point at index `point` on the blend axis."] # [doc = ""] # [inline] pub fn set_blend_point_position (& self , point : i64 , pos : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_blend_point_position ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , point as _ , pos) ; } } # [doc = "The blend space's X and Y axes' upper limit for the points' position. See [`add_blend_point`][Self::add_blend_point]."] # [doc = ""] # [inline] pub fn set_max_space (& self , max_space : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_max_space ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , max_space) ; } } # [doc = "The blend space's X and Y axes' lower limit for the points' position. See [`add_blend_point`][Self::add_blend_point]."] # [doc = ""] # [inline] pub fn set_min_space (& self , min_space : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_min_space ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , min_space) ; } } # [doc = "Position increment to snap to when moving a point."] # [doc = ""] # [inline] pub fn set_snap (& self , snap : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_snap ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , snap) ; } } # [doc = "Name of the blend space's X axis."] # [doc = ""] # [inline] pub fn set_x_label (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_x_label ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Name of the blend space's Y axis."] # [doc = ""] # [inline] pub fn set_y_label (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendSpace2DMethodTable :: get (get_api ()) . set_y_label ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeBlendSpace2D { } unsafe impl GodotObject for AnimationNodeBlendSpace2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlendSpace2D" } } impl std :: ops :: Deref for AnimationNodeBlendSpace2D { type Target = crate :: generated :: AnimationRootNode ; # [inline] fn deref (& self) -> & crate :: generated :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlendSpace2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AnimationRootNode > for AnimationNodeBlendSpace2D { } unsafe impl SubClass < crate :: generated :: AnimationNode > for AnimationNodeBlendSpace2D { } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeBlendSpace2D { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeBlendSpace2D { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeBlendSpace2D { } impl Instanciable for AnimationNodeBlendSpace2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeBlendSpace2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeBlendSpace2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_blend_point : * mut sys :: godot_method_bind , pub add_triangle : * mut sys :: godot_method_bind , pub get_auto_triangles : * mut sys :: godot_method_bind , pub get_blend_mode : * mut sys :: godot_method_bind , pub get_blend_point_count : * mut sys :: godot_method_bind , pub get_blend_point_node : * mut sys :: godot_method_bind , pub get_blend_point_position : * mut sys :: godot_method_bind , pub get_max_space : * mut sys :: godot_method_bind , pub get_min_space : * mut sys :: godot_method_bind , pub get_snap : * mut sys :: godot_method_bind , pub get_triangle_count : * mut sys :: godot_method_bind , pub get_triangle_point : * mut sys :: godot_method_bind , pub get_x_label : * mut sys :: godot_method_bind , pub get_y_label : * mut sys :: godot_method_bind , pub remove_blend_point : * mut sys :: godot_method_bind , pub remove_triangle : * mut sys :: godot_method_bind , pub set_auto_triangles : * mut sys :: godot_method_bind , pub set_blend_mode : * mut sys :: godot_method_bind , pub set_blend_point_node : * mut sys :: godot_method_bind , pub set_blend_point_position : * mut sys :: godot_method_bind , pub set_max_space : * mut sys :: godot_method_bind , pub set_min_space : * mut sys :: godot_method_bind , pub set_snap : * mut sys :: godot_method_bind , pub set_x_label : * mut sys :: godot_method_bind , pub set_y_label : * mut sys :: godot_method_bind } impl AnimationNodeBlendSpace2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeBlendSpace2DMethodTable = AnimationNodeBlendSpace2DMethodTable { class_constructor : None , add_blend_point : 0 as * mut sys :: godot_method_bind , add_triangle : 0 as * mut sys :: godot_method_bind , get_auto_triangles : 0 as * mut sys :: godot_method_bind , get_blend_mode : 0 as * mut sys :: godot_method_bind , get_blend_point_count : 0 as * mut sys :: godot_method_bind , get_blend_point_node : 0 as * mut sys :: godot_method_bind , get_blend_point_position : 0 as * mut sys :: godot_method_bind , get_max_space : 0 as * mut sys :: godot_method_bind , get_min_space : 0 as * mut sys :: godot_method_bind , get_snap : 0 as * mut sys :: godot_method_bind , get_triangle_count : 0 as * mut sys :: godot_method_bind , get_triangle_point : 0 as * mut sys :: godot_method_bind , get_x_label : 0 as * mut sys :: godot_method_bind , get_y_label : 0 as * mut sys :: godot_method_bind , remove_blend_point : 0 as * mut sys :: godot_method_bind , remove_triangle : 0 as * mut sys :: godot_method_bind , set_auto_triangles : 0 as * mut sys :: godot_method_bind , set_blend_mode : 0 as * mut sys :: godot_method_bind , set_blend_point_node : 0 as * mut sys :: godot_method_bind , set_blend_point_position : 0 as * mut sys :: godot_method_bind , set_max_space : 0 as * mut sys :: godot_method_bind , set_min_space : 0 as * mut sys :: godot_method_bind , set_snap : 0 as * mut sys :: godot_method_bind , set_x_label : 0 as * mut sys :: godot_method_bind , set_y_label : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeBlendSpace2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeBlendSpace2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_blend_point = (gd_api . godot_method_bind_get_method) (class_name , "add_blend_point\0" . as_ptr () as * const c_char) ; table . add_triangle = (gd_api . godot_method_bind_get_method) (class_name , "add_triangle\0" . as_ptr () as * const c_char) ; table . get_auto_triangles = (gd_api . godot_method_bind_get_method) (class_name , "get_auto_triangles\0" . as_ptr () as * const c_char) ; table . get_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_mode\0" . as_ptr () as * const c_char) ; table . get_blend_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_count\0" . as_ptr () as * const c_char) ; table . get_blend_point_node = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_node\0" . as_ptr () as * const c_char) ; table . get_blend_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_point_position\0" . as_ptr () as * const c_char) ; table . get_max_space = (gd_api . godot_method_bind_get_method) (class_name , "get_max_space\0" . as_ptr () as * const c_char) ; table . get_min_space = (gd_api . godot_method_bind_get_method) (class_name , "get_min_space\0" . as_ptr () as * const c_char) ; table . get_snap = (gd_api . godot_method_bind_get_method) (class_name , "get_snap\0" . as_ptr () as * const c_char) ; table . get_triangle_count = (gd_api . godot_method_bind_get_method) (class_name , "get_triangle_count\0" . as_ptr () as * const c_char) ; table . get_triangle_point = (gd_api . godot_method_bind_get_method) (class_name , "get_triangle_point\0" . as_ptr () as * const c_char) ; table . get_x_label = (gd_api . godot_method_bind_get_method) (class_name , "get_x_label\0" . as_ptr () as * const c_char) ; table . get_y_label = (gd_api . godot_method_bind_get_method) (class_name , "get_y_label\0" . as_ptr () as * const c_char) ; table . remove_blend_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_blend_point\0" . as_ptr () as * const c_char) ; table . remove_triangle = (gd_api . godot_method_bind_get_method) (class_name , "remove_triangle\0" . as_ptr () as * const c_char) ; table . set_auto_triangles = (gd_api . godot_method_bind_get_method) (class_name , "set_auto_triangles\0" . as_ptr () as * const c_char) ; table . set_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_mode\0" . as_ptr () as * const c_char) ; table . set_blend_point_node = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_point_node\0" . as_ptr () as * const c_char) ; table . set_blend_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_point_position\0" . as_ptr () as * const c_char) ; table . set_max_space = (gd_api . godot_method_bind_get_method) (class_name , "set_max_space\0" . as_ptr () as * const c_char) ; table . set_min_space = (gd_api . godot_method_bind_get_method) (class_name , "set_min_space\0" . as_ptr () as * const c_char) ; table . set_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_snap\0" . as_ptr () as * const c_char) ; table . set_x_label = (gd_api . godot_method_bind_get_method) (class_name , "set_x_label\0" . as_ptr () as * const c_char) ; table . set_y_label = (gd_api . godot_method_bind_get_method) (class_name , "set_y_label\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_blend_space_2d::private::AnimationNodeBlendSpace2D;
            
            pub(crate) mod animation_node_blend_tree {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeBlendTree`][super::AnimationNodeBlendTree]."] pub (crate) mod private { # [doc = "`core class AnimationNodeBlendTree` inherits `AnimationRootNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodeblendtree.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeBlendTree inherits methods from:\n - [AnimationRootNode](struct.AnimationRootNode.html)\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeBlendTree { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeBlendTree ; # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationNodeBlendTree { pub const CONNECTION_OK : i64 = 0i64 ; pub const CONNECTION_ERROR_NO_INPUT : i64 = 1i64 ; pub const CONNECTION_ERROR_NO_INPUT_INDEX : i64 = 2i64 ; pub const CONNECTION_ERROR_NO_OUTPUT : i64 = 3i64 ; pub const CONNECTION_ERROR_SAME_NODE : i64 = 4i64 ; pub const CONNECTION_ERROR_CONNECTION_EXISTS : i64 = 5i64 ; } impl AnimationNodeBlendTree { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeBlendTreeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds an [`AnimationNode`][AnimationNode] at the given `position`. The `name` is used to identify the created sub-node later.\n# Default Arguments\n* `position` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn add_node (& self , name : impl Into < GodotString > , node : impl AsArg < crate :: generated :: AnimationNode > , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . add_node ; let ret = crate :: icalls :: icallvar__str_obj_vec2 (method_bind , self . this . sys () . as_ptr () , name . into () , node . as_arg_ptr () , position) ; } } # [doc = "Connects the output of an [`AnimationNode`][AnimationNode] as input for another [`AnimationNode`][AnimationNode], at the input port specified by `input_index`."] # [doc = ""] # [inline] pub fn connect_node (& self , input_node : impl Into < GodotString > , input_index : i64 , output_node : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . connect_node ; let ret = crate :: icalls :: icallvar__str_i64_str (method_bind , self . this . sys () . as_ptr () , input_node . into () , input_index as _ , output_node . into ()) ; } } # [doc = "Disconnects the node connected to the specified input."] # [doc = ""] # [inline] pub fn disconnect_node (& self , input_node : impl Into < GodotString > , input_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . disconnect_node ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , input_node . into () , input_index as _) ; } } # [doc = "The global offset of all sub-nodes."] # [doc = ""] # [inline] pub fn graph_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . get_graph_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the sub-node with the specified `name`."] # [doc = ""] # [inline] pub fn get_node (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: AnimationNode , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . get_node ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Option < Ref < crate :: generated :: AnimationNode , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position of the sub-node with the specified `name`."] # [doc = ""] # [inline] pub fn get_node_position (& self , name : impl Into < GodotString >) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . get_node_position ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if a sub-node with specified `name` exists."] # [doc = ""] # [inline] pub fn has_node (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . has_node ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes a sub-node."] # [doc = ""] # [inline] pub fn remove_node (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . remove_node ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Changes the name of a sub-node."] # [doc = ""] # [inline] pub fn rename_node (& self , name : impl Into < GodotString > , new_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . rename_node ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , new_name . into ()) ; } } # [doc = "The global offset of all sub-nodes."] # [doc = ""] # [inline] pub fn set_graph_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . set_graph_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Modifies the position of a sub-node."] # [doc = ""] # [inline] pub fn set_node_position (& self , name : impl Into < GodotString > , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeBlendTreeMethodTable :: get (get_api ()) . set_node_position ; let ret = crate :: icalls :: icallvar__str_vec2 (method_bind , self . this . sys () . as_ptr () , name . into () , position) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeBlendTree { } unsafe impl GodotObject for AnimationNodeBlendTree { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeBlendTree" } } impl std :: ops :: Deref for AnimationNodeBlendTree { type Target = crate :: generated :: AnimationRootNode ; # [inline] fn deref (& self) -> & crate :: generated :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeBlendTree { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AnimationRootNode > for AnimationNodeBlendTree { } unsafe impl SubClass < crate :: generated :: AnimationNode > for AnimationNodeBlendTree { } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeBlendTree { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeBlendTree { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeBlendTree { } impl Instanciable for AnimationNodeBlendTree { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeBlendTree :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeBlendTreeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_node : * mut sys :: godot_method_bind , pub connect_node : * mut sys :: godot_method_bind , pub disconnect_node : * mut sys :: godot_method_bind , pub get_graph_offset : * mut sys :: godot_method_bind , pub get_node : * mut sys :: godot_method_bind , pub get_node_position : * mut sys :: godot_method_bind , pub has_node : * mut sys :: godot_method_bind , pub remove_node : * mut sys :: godot_method_bind , pub rename_node : * mut sys :: godot_method_bind , pub set_graph_offset : * mut sys :: godot_method_bind , pub set_node_position : * mut sys :: godot_method_bind } impl AnimationNodeBlendTreeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeBlendTreeMethodTable = AnimationNodeBlendTreeMethodTable { class_constructor : None , add_node : 0 as * mut sys :: godot_method_bind , connect_node : 0 as * mut sys :: godot_method_bind , disconnect_node : 0 as * mut sys :: godot_method_bind , get_graph_offset : 0 as * mut sys :: godot_method_bind , get_node : 0 as * mut sys :: godot_method_bind , get_node_position : 0 as * mut sys :: godot_method_bind , has_node : 0 as * mut sys :: godot_method_bind , remove_node : 0 as * mut sys :: godot_method_bind , rename_node : 0 as * mut sys :: godot_method_bind , set_graph_offset : 0 as * mut sys :: godot_method_bind , set_node_position : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeBlendTreeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeBlendTree\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_node = (gd_api . godot_method_bind_get_method) (class_name , "add_node\0" . as_ptr () as * const c_char) ; table . connect_node = (gd_api . godot_method_bind_get_method) (class_name , "connect_node\0" . as_ptr () as * const c_char) ; table . disconnect_node = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_node\0" . as_ptr () as * const c_char) ; table . get_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_graph_offset\0" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\0" . as_ptr () as * const c_char) ; table . get_node_position = (gd_api . godot_method_bind_get_method) (class_name , "get_node_position\0" . as_ptr () as * const c_char) ; table . has_node = (gd_api . godot_method_bind_get_method) (class_name , "has_node\0" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\0" . as_ptr () as * const c_char) ; table . rename_node = (gd_api . godot_method_bind_get_method) (class_name , "rename_node\0" . as_ptr () as * const c_char) ; table . set_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_graph_offset\0" . as_ptr () as * const c_char) ; table . set_node_position = (gd_api . godot_method_bind_get_method) (class_name , "set_node_position\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_blend_tree::private::AnimationNodeBlendTree;
            
            pub mod animation_node_one_shot {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeOneShot`][super::AnimationNodeOneShot]."] pub (crate) mod private { # [doc = "`core class AnimationNodeOneShot` inherits `AnimationNode` (reference-counted).\n\nThis class has related types in the [`animation_node_one_shot`][super::animation_node_one_shot] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodeoneshot.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeOneShot inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeOneShot { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeOneShot ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MixMode (pub i64) ; impl MixMode { pub const BLEND : MixMode = MixMode (0i64) ; pub const ADD : MixMode = MixMode (1i64) ; } impl From < i64 > for MixMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MixMode > for i64 { # [inline] fn from (v : MixMode) -> Self { v . 0 } } impl FromVariant for MixMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationNodeOneShot { pub const MIX_MODE_BLEND : i64 = 0i64 ; pub const MIX_MODE_ADD : i64 = 1i64 ; } impl AnimationNodeOneShot { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeOneShotMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The delay after which the automatic restart is triggered, in seconds."] # [doc = ""] # [inline] pub fn autorestart_delay (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeOneShotMethodTable :: get (get_api ()) . get_autorestart_delay ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If [`autorestart`][Self::autorestart] is `true`, a random additional delay (in seconds) between 0 and this value will be added to [`autorestart_delay`][Self::autorestart_delay]."] # [doc = ""] # [inline] pub fn autorestart_random_delay (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeOneShotMethodTable :: get (get_api ()) . get_autorestart_random_delay ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn fadein_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeOneShotMethodTable :: get (get_api ()) . get_fadein_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn fadeout_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeOneShotMethodTable :: get (get_api ()) . get_fadeout_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn mix_mode (& self) -> crate :: generated :: animation_node_one_shot :: MixMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeOneShotMethodTable :: get (get_api ()) . get_mix_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: animation_node_one_shot :: MixMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the sub-animation will restart automatically after finishing."] # [doc = ""] # [inline] pub fn has_autorestart (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeOneShotMethodTable :: get (get_api ()) . has_autorestart ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_using_sync (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeOneShotMethodTable :: get (get_api ()) . is_using_sync ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the sub-animation will restart automatically after finishing."] # [doc = ""] # [inline] pub fn set_autorestart (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeOneShotMethodTable :: get (get_api ()) . set_autorestart ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The delay after which the automatic restart is triggered, in seconds."] # [doc = ""] # [inline] pub fn set_autorestart_delay (& self , enable : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeOneShotMethodTable :: get (get_api ()) . set_autorestart_delay ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If [`autorestart`][Self::autorestart] is `true`, a random additional delay (in seconds) between 0 and this value will be added to [`autorestart_delay`][Self::autorestart_delay]."] # [doc = ""] # [inline] pub fn set_autorestart_random_delay (& self , enable : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeOneShotMethodTable :: get (get_api ()) . set_autorestart_random_delay ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_fadein_time (& self , time : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeOneShotMethodTable :: get (get_api ()) . set_fadein_time ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , time as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_fadeout_time (& self , time : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeOneShotMethodTable :: get (get_api ()) . set_fadeout_time ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , time as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_mix_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeOneShotMethodTable :: get (get_api ()) . set_mix_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_use_sync (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeOneShotMethodTable :: get (get_api ()) . set_use_sync ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeOneShot { } unsafe impl GodotObject for AnimationNodeOneShot { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeOneShot" } } impl std :: ops :: Deref for AnimationNodeOneShot { type Target = crate :: generated :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeOneShot { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AnimationNode > for AnimationNodeOneShot { } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeOneShot { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeOneShot { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeOneShot { } impl Instanciable for AnimationNodeOneShot { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeOneShot :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeOneShotMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_autorestart_delay : * mut sys :: godot_method_bind , pub get_autorestart_random_delay : * mut sys :: godot_method_bind , pub get_fadein_time : * mut sys :: godot_method_bind , pub get_fadeout_time : * mut sys :: godot_method_bind , pub get_mix_mode : * mut sys :: godot_method_bind , pub has_autorestart : * mut sys :: godot_method_bind , pub is_using_sync : * mut sys :: godot_method_bind , pub set_autorestart : * mut sys :: godot_method_bind , pub set_autorestart_delay : * mut sys :: godot_method_bind , pub set_autorestart_random_delay : * mut sys :: godot_method_bind , pub set_fadein_time : * mut sys :: godot_method_bind , pub set_fadeout_time : * mut sys :: godot_method_bind , pub set_mix_mode : * mut sys :: godot_method_bind , pub set_use_sync : * mut sys :: godot_method_bind } impl AnimationNodeOneShotMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeOneShotMethodTable = AnimationNodeOneShotMethodTable { class_constructor : None , get_autorestart_delay : 0 as * mut sys :: godot_method_bind , get_autorestart_random_delay : 0 as * mut sys :: godot_method_bind , get_fadein_time : 0 as * mut sys :: godot_method_bind , get_fadeout_time : 0 as * mut sys :: godot_method_bind , get_mix_mode : 0 as * mut sys :: godot_method_bind , has_autorestart : 0 as * mut sys :: godot_method_bind , is_using_sync : 0 as * mut sys :: godot_method_bind , set_autorestart : 0 as * mut sys :: godot_method_bind , set_autorestart_delay : 0 as * mut sys :: godot_method_bind , set_autorestart_random_delay : 0 as * mut sys :: godot_method_bind , set_fadein_time : 0 as * mut sys :: godot_method_bind , set_fadeout_time : 0 as * mut sys :: godot_method_bind , set_mix_mode : 0 as * mut sys :: godot_method_bind , set_use_sync : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeOneShotMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeOneShot\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_autorestart_delay = (gd_api . godot_method_bind_get_method) (class_name , "get_autorestart_delay\0" . as_ptr () as * const c_char) ; table . get_autorestart_random_delay = (gd_api . godot_method_bind_get_method) (class_name , "get_autorestart_random_delay\0" . as_ptr () as * const c_char) ; table . get_fadein_time = (gd_api . godot_method_bind_get_method) (class_name , "get_fadein_time\0" . as_ptr () as * const c_char) ; table . get_fadeout_time = (gd_api . godot_method_bind_get_method) (class_name , "get_fadeout_time\0" . as_ptr () as * const c_char) ; table . get_mix_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mix_mode\0" . as_ptr () as * const c_char) ; table . has_autorestart = (gd_api . godot_method_bind_get_method) (class_name , "has_autorestart\0" . as_ptr () as * const c_char) ; table . is_using_sync = (gd_api . godot_method_bind_get_method) (class_name , "is_using_sync\0" . as_ptr () as * const c_char) ; table . set_autorestart = (gd_api . godot_method_bind_get_method) (class_name , "set_autorestart\0" . as_ptr () as * const c_char) ; table . set_autorestart_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_autorestart_delay\0" . as_ptr () as * const c_char) ; table . set_autorestart_random_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_autorestart_random_delay\0" . as_ptr () as * const c_char) ; table . set_fadein_time = (gd_api . godot_method_bind_get_method) (class_name , "set_fadein_time\0" . as_ptr () as * const c_char) ; table . set_fadeout_time = (gd_api . godot_method_bind_get_method) (class_name , "set_fadeout_time\0" . as_ptr () as * const c_char) ; table . set_mix_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mix_mode\0" . as_ptr () as * const c_char) ; table . set_use_sync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_sync\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_one_shot::private::AnimationNodeOneShot;
            
            pub(crate) mod animation_node_output {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeOutput`][super::AnimationNodeOutput]."] pub (crate) mod private { # [doc = "`core class AnimationNodeOutput` inherits `AnimationNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodeoutput.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeOutput inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeOutput { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeOutput ; impl AnimationNodeOutput { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeOutputMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeOutput { } unsafe impl GodotObject for AnimationNodeOutput { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeOutput" } } impl std :: ops :: Deref for AnimationNodeOutput { type Target = crate :: generated :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeOutput { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AnimationNode > for AnimationNodeOutput { } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeOutput { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeOutput { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeOutput { } impl Instanciable for AnimationNodeOutput { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeOutput :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeOutputMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AnimationNodeOutputMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeOutputMethodTable = AnimationNodeOutputMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeOutputMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeOutput\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_output::private::AnimationNodeOutput;
            
            pub(crate) mod animation_node_state_machine {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeStateMachine`][super::AnimationNodeStateMachine]."] pub (crate) mod private { # [doc = "`core class AnimationNodeStateMachine` inherits `AnimationRootNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodestatemachine.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeStateMachine inherits methods from:\n - [AnimationRootNode](struct.AnimationRootNode.html)\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeStateMachine { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeStateMachine ; impl AnimationNodeStateMachine { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeStateMachineMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a new node to the graph. The `position` is used for display in the editor.\n# Default Arguments\n* `position` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn add_node (& self , name : impl Into < GodotString > , node : impl AsArg < crate :: generated :: AnimationNode > , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . add_node ; let ret = crate :: icalls :: icallvar__str_obj_vec2 (method_bind , self . this . sys () . as_ptr () , name . into () , node . as_arg_ptr () , position) ; } } # [doc = "Adds a transition between the given nodes."] # [doc = ""] # [inline] pub fn add_transition (& self , from : impl Into < GodotString > , to : impl Into < GodotString > , transition : impl AsArg < crate :: generated :: AnimationNodeStateMachineTransition >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . add_transition ; let ret = crate :: icalls :: icallvar__str_str_obj (method_bind , self . this . sys () . as_ptr () , from . into () , to . into () , transition . as_arg_ptr ()) ; } } # [doc = "Returns the graph's end node."] # [doc = ""] # [inline] pub fn get_end_node (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . get_end_node ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the draw offset of the graph. Used for display in the editor."] # [doc = ""] # [inline] pub fn get_graph_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . get_graph_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the animation node with the given name."] # [doc = ""] # [inline] pub fn get_node (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: AnimationNode , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . get_node ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Option < Ref < crate :: generated :: AnimationNode , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the given animation node's name."] # [doc = ""] # [inline] pub fn get_node_name (& self , node : impl AsArg < crate :: generated :: AnimationNode >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . get_node_name ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the given node's coordinates. Used for display in the editor."] # [doc = ""] # [inline] pub fn get_node_position (& self , name : impl Into < GodotString >) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . get_node_position ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the graph's end node."] # [doc = ""] # [inline] pub fn get_start_node (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . get_start_node ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the given transition."] # [doc = ""] # [inline] pub fn get_transition (& self , idx : i64) -> Option < Ref < crate :: generated :: AnimationNodeStateMachineTransition , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . get_transition ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: AnimationNodeStateMachineTransition , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of connections in the graph."] # [doc = ""] # [inline] pub fn get_transition_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . get_transition_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the given transition's start node."] # [doc = ""] # [inline] pub fn get_transition_from (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . get_transition_from ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the given transition's end node."] # [doc = ""] # [inline] pub fn get_transition_to (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . get_transition_to ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the graph contains the given node."] # [doc = ""] # [inline] pub fn has_node (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . has_node ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if there is a transition between the given nodes."] # [doc = ""] # [inline] pub fn has_transition (& self , from : impl Into < GodotString > , to : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . has_transition ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , from . into () , to . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Deletes the given node from the graph."] # [doc = ""] # [inline] pub fn remove_node (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . remove_node ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Deletes the transition between the two specified nodes."] # [doc = ""] # [inline] pub fn remove_transition (& self , from : impl Into < GodotString > , to : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . remove_transition ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , from . into () , to . into ()) ; } } # [doc = "Deletes the given transition by index."] # [doc = ""] # [inline] pub fn remove_transition_by_index (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . remove_transition_by_index ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; } } # [doc = "Renames the given node."] # [doc = ""] # [inline] pub fn rename_node (& self , name : impl Into < GodotString > , new_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . rename_node ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , new_name . into ()) ; } } # [doc = "Replaces the node and keeps its transitions unchanged."] # [doc = ""] # [inline] pub fn replace_node (& self , name : impl Into < GodotString > , node : impl AsArg < crate :: generated :: AnimationNode >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . replace_node ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , node . as_arg_ptr ()) ; } } # [doc = "Sets the given node as the graph end point."] # [doc = ""] # [inline] pub fn set_end_node (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . set_end_node ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Sets the draw offset of the graph. Used for display in the editor."] # [doc = ""] # [inline] pub fn set_graph_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . set_graph_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Sets the node's coordinates. Used for display in the editor."] # [doc = ""] # [inline] pub fn set_node_position (& self , name : impl Into < GodotString > , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . set_node_position ; let ret = crate :: icalls :: icallvar__str_vec2 (method_bind , self . this . sys () . as_ptr () , name . into () , position) ; } } # [doc = "Sets the given node as the graph start point."] # [doc = ""] # [inline] pub fn set_start_node (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineMethodTable :: get (get_api ()) . set_start_node ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeStateMachine { } unsafe impl GodotObject for AnimationNodeStateMachine { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeStateMachine" } } impl std :: ops :: Deref for AnimationNodeStateMachine { type Target = crate :: generated :: AnimationRootNode ; # [inline] fn deref (& self) -> & crate :: generated :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeStateMachine { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AnimationRootNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AnimationRootNode > for AnimationNodeStateMachine { } unsafe impl SubClass < crate :: generated :: AnimationNode > for AnimationNodeStateMachine { } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeStateMachine { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeStateMachine { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeStateMachine { } impl Instanciable for AnimationNodeStateMachine { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeStateMachine :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeStateMachineMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_node : * mut sys :: godot_method_bind , pub add_transition : * mut sys :: godot_method_bind , pub get_end_node : * mut sys :: godot_method_bind , pub get_graph_offset : * mut sys :: godot_method_bind , pub get_node : * mut sys :: godot_method_bind , pub get_node_name : * mut sys :: godot_method_bind , pub get_node_position : * mut sys :: godot_method_bind , pub get_start_node : * mut sys :: godot_method_bind , pub get_transition : * mut sys :: godot_method_bind , pub get_transition_count : * mut sys :: godot_method_bind , pub get_transition_from : * mut sys :: godot_method_bind , pub get_transition_to : * mut sys :: godot_method_bind , pub has_node : * mut sys :: godot_method_bind , pub has_transition : * mut sys :: godot_method_bind , pub remove_node : * mut sys :: godot_method_bind , pub remove_transition : * mut sys :: godot_method_bind , pub remove_transition_by_index : * mut sys :: godot_method_bind , pub rename_node : * mut sys :: godot_method_bind , pub replace_node : * mut sys :: godot_method_bind , pub set_end_node : * mut sys :: godot_method_bind , pub set_graph_offset : * mut sys :: godot_method_bind , pub set_node_position : * mut sys :: godot_method_bind , pub set_start_node : * mut sys :: godot_method_bind } impl AnimationNodeStateMachineMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeStateMachineMethodTable = AnimationNodeStateMachineMethodTable { class_constructor : None , add_node : 0 as * mut sys :: godot_method_bind , add_transition : 0 as * mut sys :: godot_method_bind , get_end_node : 0 as * mut sys :: godot_method_bind , get_graph_offset : 0 as * mut sys :: godot_method_bind , get_node : 0 as * mut sys :: godot_method_bind , get_node_name : 0 as * mut sys :: godot_method_bind , get_node_position : 0 as * mut sys :: godot_method_bind , get_start_node : 0 as * mut sys :: godot_method_bind , get_transition : 0 as * mut sys :: godot_method_bind , get_transition_count : 0 as * mut sys :: godot_method_bind , get_transition_from : 0 as * mut sys :: godot_method_bind , get_transition_to : 0 as * mut sys :: godot_method_bind , has_node : 0 as * mut sys :: godot_method_bind , has_transition : 0 as * mut sys :: godot_method_bind , remove_node : 0 as * mut sys :: godot_method_bind , remove_transition : 0 as * mut sys :: godot_method_bind , remove_transition_by_index : 0 as * mut sys :: godot_method_bind , rename_node : 0 as * mut sys :: godot_method_bind , replace_node : 0 as * mut sys :: godot_method_bind , set_end_node : 0 as * mut sys :: godot_method_bind , set_graph_offset : 0 as * mut sys :: godot_method_bind , set_node_position : 0 as * mut sys :: godot_method_bind , set_start_node : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeStateMachineMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeStateMachine\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_node = (gd_api . godot_method_bind_get_method) (class_name , "add_node\0" . as_ptr () as * const c_char) ; table . add_transition = (gd_api . godot_method_bind_get_method) (class_name , "add_transition\0" . as_ptr () as * const c_char) ; table . get_end_node = (gd_api . godot_method_bind_get_method) (class_name , "get_end_node\0" . as_ptr () as * const c_char) ; table . get_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_graph_offset\0" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\0" . as_ptr () as * const c_char) ; table . get_node_name = (gd_api . godot_method_bind_get_method) (class_name , "get_node_name\0" . as_ptr () as * const c_char) ; table . get_node_position = (gd_api . godot_method_bind_get_method) (class_name , "get_node_position\0" . as_ptr () as * const c_char) ; table . get_start_node = (gd_api . godot_method_bind_get_method) (class_name , "get_start_node\0" . as_ptr () as * const c_char) ; table . get_transition = (gd_api . godot_method_bind_get_method) (class_name , "get_transition\0" . as_ptr () as * const c_char) ; table . get_transition_count = (gd_api . godot_method_bind_get_method) (class_name , "get_transition_count\0" . as_ptr () as * const c_char) ; table . get_transition_from = (gd_api . godot_method_bind_get_method) (class_name , "get_transition_from\0" . as_ptr () as * const c_char) ; table . get_transition_to = (gd_api . godot_method_bind_get_method) (class_name , "get_transition_to\0" . as_ptr () as * const c_char) ; table . has_node = (gd_api . godot_method_bind_get_method) (class_name , "has_node\0" . as_ptr () as * const c_char) ; table . has_transition = (gd_api . godot_method_bind_get_method) (class_name , "has_transition\0" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\0" . as_ptr () as * const c_char) ; table . remove_transition = (gd_api . godot_method_bind_get_method) (class_name , "remove_transition\0" . as_ptr () as * const c_char) ; table . remove_transition_by_index = (gd_api . godot_method_bind_get_method) (class_name , "remove_transition_by_index\0" . as_ptr () as * const c_char) ; table . rename_node = (gd_api . godot_method_bind_get_method) (class_name , "rename_node\0" . as_ptr () as * const c_char) ; table . replace_node = (gd_api . godot_method_bind_get_method) (class_name , "replace_node\0" . as_ptr () as * const c_char) ; table . set_end_node = (gd_api . godot_method_bind_get_method) (class_name , "set_end_node\0" . as_ptr () as * const c_char) ; table . set_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_graph_offset\0" . as_ptr () as * const c_char) ; table . set_node_position = (gd_api . godot_method_bind_get_method) (class_name , "set_node_position\0" . as_ptr () as * const c_char) ; table . set_start_node = (gd_api . godot_method_bind_get_method) (class_name , "set_start_node\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_state_machine::private::AnimationNodeStateMachine;
            
            pub(crate) mod animation_node_state_machine_playback {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeStateMachinePlayback`][super::AnimationNodeStateMachinePlayback]."] pub (crate) mod private { # [doc = "`core class AnimationNodeStateMachinePlayback` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodestatemachineplayback.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeStateMachinePlayback inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeStateMachinePlayback { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeStateMachinePlayback ; impl AnimationNodeStateMachinePlayback { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeStateMachinePlaybackMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_current_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachinePlaybackMethodTable :: get (get_api ()) . get_current_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the currently playing animation state."] # [doc = ""] # [inline] pub fn get_current_node (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachinePlaybackMethodTable :: get (get_api ()) . get_current_node ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the playback position within the current animation state."] # [doc = ""] # [inline] pub fn get_current_play_position (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachinePlaybackMethodTable :: get (get_api ()) . get_current_play_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the current travel path as computed internally by the A* algorithm."] # [doc = ""] # [inline] pub fn get_travel_path (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachinePlaybackMethodTable :: get (get_api ()) . get_travel_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if an animation is playing."] # [doc = ""] # [inline] pub fn is_playing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachinePlaybackMethodTable :: get (get_api ()) . is_playing ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Starts playing the given animation."] # [doc = ""] # [inline] pub fn start (& self , node : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachinePlaybackMethodTable :: get (get_api ()) . start ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , node . into ()) ; } } # [doc = "Stops the currently playing animation."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachinePlaybackMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Transitions from the current state to another one, following the shortest path."] # [doc = ""] # [inline] pub fn travel (& self , to_node : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachinePlaybackMethodTable :: get (get_api ()) . travel ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , to_node . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeStateMachinePlayback { } unsafe impl GodotObject for AnimationNodeStateMachinePlayback { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeStateMachinePlayback" } } impl std :: ops :: Deref for AnimationNodeStateMachinePlayback { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeStateMachinePlayback { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeStateMachinePlayback { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeStateMachinePlayback { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeStateMachinePlayback { } impl Instanciable for AnimationNodeStateMachinePlayback { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeStateMachinePlayback :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeStateMachinePlaybackMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_current_length : * mut sys :: godot_method_bind , pub get_current_node : * mut sys :: godot_method_bind , pub get_current_play_position : * mut sys :: godot_method_bind , pub get_travel_path : * mut sys :: godot_method_bind , pub is_playing : * mut sys :: godot_method_bind , pub start : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind , pub travel : * mut sys :: godot_method_bind } impl AnimationNodeStateMachinePlaybackMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeStateMachinePlaybackMethodTable = AnimationNodeStateMachinePlaybackMethodTable { class_constructor : None , get_current_length : 0 as * mut sys :: godot_method_bind , get_current_node : 0 as * mut sys :: godot_method_bind , get_current_play_position : 0 as * mut sys :: godot_method_bind , get_travel_path : 0 as * mut sys :: godot_method_bind , is_playing : 0 as * mut sys :: godot_method_bind , start : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind , travel : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeStateMachinePlaybackMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeStateMachinePlayback\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_current_length = (gd_api . godot_method_bind_get_method) (class_name , "get_current_length\0" . as_ptr () as * const c_char) ; table . get_current_node = (gd_api . godot_method_bind_get_method) (class_name , "get_current_node\0" . as_ptr () as * const c_char) ; table . get_current_play_position = (gd_api . godot_method_bind_get_method) (class_name , "get_current_play_position\0" . as_ptr () as * const c_char) ; table . get_travel_path = (gd_api . godot_method_bind_get_method) (class_name , "get_travel_path\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; table . travel = (gd_api . godot_method_bind_get_method) (class_name , "travel\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_state_machine_playback::private::AnimationNodeStateMachinePlayback;
            
            pub mod animation_node_state_machine_transition {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeStateMachineTransition`][super::AnimationNodeStateMachineTransition]."] pub (crate) mod private { # [doc = "`core class AnimationNodeStateMachineTransition` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`animation_node_state_machine_transition`][super::animation_node_state_machine_transition] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodestatemachinetransition.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeStateMachineTransition inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeStateMachineTransition { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeStateMachineTransition ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SwitchMode (pub i64) ; impl SwitchMode { pub const IMMEDIATE : SwitchMode = SwitchMode (0i64) ; pub const SYNC : SwitchMode = SwitchMode (1i64) ; pub const AT_END : SwitchMode = SwitchMode (2i64) ; } impl From < i64 > for SwitchMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SwitchMode > for i64 { # [inline] fn from (v : SwitchMode) -> Self { v . 0 } } impl FromVariant for SwitchMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationNodeStateMachineTransition { pub const SWITCH_MODE_IMMEDIATE : i64 = 0i64 ; pub const SWITCH_MODE_SYNC : i64 = 1i64 ; pub const SWITCH_MODE_AT_END : i64 = 2i64 ; } impl AnimationNodeStateMachineTransition { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeStateMachineTransitionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nTurn on auto advance when this condition is set. The provided name will become a boolean parameter on the [`AnimationTree`][AnimationTree] that can be controlled from code (see [Using AnimationTree](https://docs.godotengine.org/en/3.5.1/tutorials/animation/animation_tree.html#controlling-from-code)). For example, if [`AnimationTree.tree_root`][AnimationTree::tree_root] is an [`AnimationNodeStateMachine`][AnimationNodeStateMachine] and [`advance_condition`][Self::advance_condition] is set to `\"idle\"`:\n```gdscript\n$animation_tree[\"parameters/conditions/idle\"] = is_on_floor and (linear_velocity.x == 0)\n```"] # [doc = ""] # [inline] pub fn advance_condition (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineTransitionMethodTable :: get (get_api ()) . get_advance_condition ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Lower priority transitions are preferred when travelling through the tree via [`AnimationNodeStateMachinePlayback.travel`][AnimationNodeStateMachinePlayback::travel] or [`auto_advance`][Self::auto_advance]."] # [doc = ""] # [inline] pub fn priority (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineTransitionMethodTable :: get (get_api ()) . get_priority ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The transition type."] # [doc = ""] # [inline] pub fn switch_mode (& self) -> crate :: generated :: animation_node_state_machine_transition :: SwitchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineTransitionMethodTable :: get (get_api ()) . get_switch_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: animation_node_state_machine_transition :: SwitchMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The time to cross-fade between this state and the next."] # [doc = ""] # [inline] pub fn xfade_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineTransitionMethodTable :: get (get_api ()) . get_xfade_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Turn on the transition automatically when this state is reached. This works best with [`SWITCH_MODE_AT_END`][Self::SWITCH_MODE_AT_END]."] # [doc = ""] # [inline] pub fn has_auto_advance (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineTransitionMethodTable :: get (get_api ()) . has_auto_advance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Don't use this transition during [`AnimationNodeStateMachinePlayback.travel`][AnimationNodeStateMachinePlayback::travel] or [`auto_advance`][Self::auto_advance]."] # [doc = ""] # [inline] pub fn is_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineTransitionMethodTable :: get (get_api ()) . is_disabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nTurn on auto advance when this condition is set. The provided name will become a boolean parameter on the [`AnimationTree`][AnimationTree] that can be controlled from code (see [Using AnimationTree](https://docs.godotengine.org/en/3.5.1/tutorials/animation/animation_tree.html#controlling-from-code)). For example, if [`AnimationTree.tree_root`][AnimationTree::tree_root] is an [`AnimationNodeStateMachine`][AnimationNodeStateMachine] and [`advance_condition`][Self::advance_condition] is set to `\"idle\"`:\n```gdscript\n$animation_tree[\"parameters/conditions/idle\"] = is_on_floor and (linear_velocity.x == 0)\n```"] # [doc = ""] # [inline] pub fn set_advance_condition (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineTransitionMethodTable :: get (get_api ()) . set_advance_condition ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Turn on the transition automatically when this state is reached. This works best with [`SWITCH_MODE_AT_END`][Self::SWITCH_MODE_AT_END]."] # [doc = ""] # [inline] pub fn set_auto_advance (& self , auto_advance : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineTransitionMethodTable :: get (get_api ()) . set_auto_advance ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , auto_advance as _) ; } } # [doc = "Don't use this transition during [`AnimationNodeStateMachinePlayback.travel`][AnimationNodeStateMachinePlayback::travel] or [`auto_advance`][Self::auto_advance]."] # [doc = ""] # [inline] pub fn set_disabled (& self , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineTransitionMethodTable :: get (get_api ()) . set_disabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , disabled as _) ; } } # [doc = "Lower priority transitions are preferred when travelling through the tree via [`AnimationNodeStateMachinePlayback.travel`][AnimationNodeStateMachinePlayback::travel] or [`auto_advance`][Self::auto_advance]."] # [doc = ""] # [inline] pub fn set_priority (& self , priority : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineTransitionMethodTable :: get (get_api ()) . set_priority ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , priority as _) ; } } # [doc = "The transition type."] # [doc = ""] # [inline] pub fn set_switch_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineTransitionMethodTable :: get (get_api ()) . set_switch_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The time to cross-fade between this state and the next."] # [doc = ""] # [inline] pub fn set_xfade_time (& self , secs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeStateMachineTransitionMethodTable :: get (get_api ()) . set_xfade_time ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , secs as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeStateMachineTransition { } unsafe impl GodotObject for AnimationNodeStateMachineTransition { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeStateMachineTransition" } } impl std :: ops :: Deref for AnimationNodeStateMachineTransition { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeStateMachineTransition { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeStateMachineTransition { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeStateMachineTransition { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeStateMachineTransition { } impl Instanciable for AnimationNodeStateMachineTransition { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeStateMachineTransition :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeStateMachineTransitionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_advance_condition : * mut sys :: godot_method_bind , pub get_priority : * mut sys :: godot_method_bind , pub get_switch_mode : * mut sys :: godot_method_bind , pub get_xfade_time : * mut sys :: godot_method_bind , pub has_auto_advance : * mut sys :: godot_method_bind , pub is_disabled : * mut sys :: godot_method_bind , pub set_advance_condition : * mut sys :: godot_method_bind , pub set_auto_advance : * mut sys :: godot_method_bind , pub set_disabled : * mut sys :: godot_method_bind , pub set_priority : * mut sys :: godot_method_bind , pub set_switch_mode : * mut sys :: godot_method_bind , pub set_xfade_time : * mut sys :: godot_method_bind } impl AnimationNodeStateMachineTransitionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeStateMachineTransitionMethodTable = AnimationNodeStateMachineTransitionMethodTable { class_constructor : None , get_advance_condition : 0 as * mut sys :: godot_method_bind , get_priority : 0 as * mut sys :: godot_method_bind , get_switch_mode : 0 as * mut sys :: godot_method_bind , get_xfade_time : 0 as * mut sys :: godot_method_bind , has_auto_advance : 0 as * mut sys :: godot_method_bind , is_disabled : 0 as * mut sys :: godot_method_bind , set_advance_condition : 0 as * mut sys :: godot_method_bind , set_auto_advance : 0 as * mut sys :: godot_method_bind , set_disabled : 0 as * mut sys :: godot_method_bind , set_priority : 0 as * mut sys :: godot_method_bind , set_switch_mode : 0 as * mut sys :: godot_method_bind , set_xfade_time : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeStateMachineTransitionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeStateMachineTransition\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_advance_condition = (gd_api . godot_method_bind_get_method) (class_name , "get_advance_condition\0" . as_ptr () as * const c_char) ; table . get_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_priority\0" . as_ptr () as * const c_char) ; table . get_switch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_switch_mode\0" . as_ptr () as * const c_char) ; table . get_xfade_time = (gd_api . godot_method_bind_get_method) (class_name , "get_xfade_time\0" . as_ptr () as * const c_char) ; table . has_auto_advance = (gd_api . godot_method_bind_get_method) (class_name , "has_auto_advance\0" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\0" . as_ptr () as * const c_char) ; table . set_advance_condition = (gd_api . godot_method_bind_get_method) (class_name , "set_advance_condition\0" . as_ptr () as * const c_char) ; table . set_auto_advance = (gd_api . godot_method_bind_get_method) (class_name , "set_auto_advance\0" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\0" . as_ptr () as * const c_char) ; table . set_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_priority\0" . as_ptr () as * const c_char) ; table . set_switch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_switch_mode\0" . as_ptr () as * const c_char) ; table . set_xfade_time = (gd_api . godot_method_bind_get_method) (class_name , "set_xfade_time\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_state_machine_transition::private::AnimationNodeStateMachineTransition;
            
            pub(crate) mod animation_node_time_scale {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeTimeScale`][super::AnimationNodeTimeScale]."] pub (crate) mod private { # [doc = "`core class AnimationNodeTimeScale` inherits `AnimationNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodetimescale.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeTimeScale inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeTimeScale { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeTimeScale ; impl AnimationNodeTimeScale { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeTimeScaleMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeTimeScale { } unsafe impl GodotObject for AnimationNodeTimeScale { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeTimeScale" } } impl std :: ops :: Deref for AnimationNodeTimeScale { type Target = crate :: generated :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeTimeScale { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AnimationNode > for AnimationNodeTimeScale { } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeTimeScale { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeTimeScale { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeTimeScale { } impl Instanciable for AnimationNodeTimeScale { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeTimeScale :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeTimeScaleMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AnimationNodeTimeScaleMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeTimeScaleMethodTable = AnimationNodeTimeScaleMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeTimeScaleMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeTimeScale\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_time_scale::private::AnimationNodeTimeScale;
            
            pub(crate) mod animation_node_time_seek {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeTimeSeek`][super::AnimationNodeTimeSeek]."] pub (crate) mod private { # [doc = "`core class AnimationNodeTimeSeek` inherits `AnimationNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodetimeseek.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeTimeSeek inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeTimeSeek { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeTimeSeek ; impl AnimationNodeTimeSeek { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeTimeSeekMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeTimeSeek { } unsafe impl GodotObject for AnimationNodeTimeSeek { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeTimeSeek" } } impl std :: ops :: Deref for AnimationNodeTimeSeek { type Target = crate :: generated :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeTimeSeek { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AnimationNode > for AnimationNodeTimeSeek { } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeTimeSeek { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeTimeSeek { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeTimeSeek { } impl Instanciable for AnimationNodeTimeSeek { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeTimeSeek :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeTimeSeekMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AnimationNodeTimeSeekMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeTimeSeekMethodTable = AnimationNodeTimeSeekMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeTimeSeekMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeTimeSeek\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_time_seek::private::AnimationNodeTimeSeek;
            
            pub(crate) mod animation_node_transition {
                # ! [doc = "This module contains types related to the API class [`AnimationNodeTransition`][super::AnimationNodeTransition]."] pub (crate) mod private { # [doc = "`core class AnimationNodeTransition` inherits `AnimationNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationnodetransition.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationNodeTransition inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationNodeTransition { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationNodeTransition ; impl AnimationNodeTransition { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationNodeTransitionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Cross-fading time (in seconds) between each animation connected to the inputs."] # [doc = ""] # [inline] pub fn cross_fade_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . get_cross_fade_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The number of available input ports for this node."] # [doc = ""] # [inline] pub fn enabled_inputs (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . get_enabled_inputs ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn input_caption (& self , input : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . get_input_caption ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , input as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn is_input_set_as_auto_advance (& self , input : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . is_input_set_as_auto_advance ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , input as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Cross-fading time (in seconds) between each animation connected to the inputs."] # [doc = ""] # [inline] pub fn set_cross_fade_time (& self , time : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . set_cross_fade_time ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , time as _) ; } } # [doc = "The number of available input ports for this node."] # [doc = ""] # [inline] pub fn set_enabled_inputs (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . set_enabled_inputs ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_input_as_auto_advance (& self , input : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . set_input_as_auto_advance ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , input as _ , enable as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_input_caption (& self , input : i64 , caption : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationNodeTransitionMethodTable :: get (get_api ()) . set_input_caption ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , input as _ , caption . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationNodeTransition { } unsafe impl GodotObject for AnimationNodeTransition { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationNodeTransition" } } impl std :: ops :: Deref for AnimationNodeTransition { type Target = crate :: generated :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationNodeTransition { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AnimationNode > for AnimationNodeTransition { } unsafe impl SubClass < crate :: generated :: Resource > for AnimationNodeTransition { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationNodeTransition { } unsafe impl SubClass < crate :: generated :: Object > for AnimationNodeTransition { } impl Instanciable for AnimationNodeTransition { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationNodeTransition :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationNodeTransitionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_cross_fade_time : * mut sys :: godot_method_bind , pub get_enabled_inputs : * mut sys :: godot_method_bind , pub get_input_caption : * mut sys :: godot_method_bind , pub is_input_set_as_auto_advance : * mut sys :: godot_method_bind , pub set_cross_fade_time : * mut sys :: godot_method_bind , pub set_enabled_inputs : * mut sys :: godot_method_bind , pub set_input_as_auto_advance : * mut sys :: godot_method_bind , pub set_input_caption : * mut sys :: godot_method_bind } impl AnimationNodeTransitionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationNodeTransitionMethodTable = AnimationNodeTransitionMethodTable { class_constructor : None , get_cross_fade_time : 0 as * mut sys :: godot_method_bind , get_enabled_inputs : 0 as * mut sys :: godot_method_bind , get_input_caption : 0 as * mut sys :: godot_method_bind , is_input_set_as_auto_advance : 0 as * mut sys :: godot_method_bind , set_cross_fade_time : 0 as * mut sys :: godot_method_bind , set_enabled_inputs : 0 as * mut sys :: godot_method_bind , set_input_as_auto_advance : 0 as * mut sys :: godot_method_bind , set_input_caption : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationNodeTransitionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationNodeTransition\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cross_fade_time = (gd_api . godot_method_bind_get_method) (class_name , "get_cross_fade_time\0" . as_ptr () as * const c_char) ; table . get_enabled_inputs = (gd_api . godot_method_bind_get_method) (class_name , "get_enabled_inputs\0" . as_ptr () as * const c_char) ; table . get_input_caption = (gd_api . godot_method_bind_get_method) (class_name , "get_input_caption\0" . as_ptr () as * const c_char) ; table . is_input_set_as_auto_advance = (gd_api . godot_method_bind_get_method) (class_name , "is_input_set_as_auto_advance\0" . as_ptr () as * const c_char) ; table . set_cross_fade_time = (gd_api . godot_method_bind_get_method) (class_name , "set_cross_fade_time\0" . as_ptr () as * const c_char) ; table . set_enabled_inputs = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled_inputs\0" . as_ptr () as * const c_char) ; table . set_input_as_auto_advance = (gd_api . godot_method_bind_get_method) (class_name , "set_input_as_auto_advance\0" . as_ptr () as * const c_char) ; table . set_input_caption = (gd_api . godot_method_bind_get_method) (class_name , "set_input_caption\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_node_transition::private::AnimationNodeTransition;
            
            pub mod animation_player {
                # ! [doc = "This module contains types related to the API class [`AnimationPlayer`][super::AnimationPlayer]."] pub (crate) mod private { # [doc = "`core class AnimationPlayer` inherits `Node` (manually managed).\n\nThis class has related types in the [`animation_player`][super::animation_player] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationplayer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`AnimationPlayer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<AnimationPlayer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAnimationPlayer inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationPlayer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationPlayer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AnimationMethodCallMode (pub i64) ; impl AnimationMethodCallMode { pub const DEFERRED : AnimationMethodCallMode = AnimationMethodCallMode (0i64) ; pub const IMMEDIATE : AnimationMethodCallMode = AnimationMethodCallMode (1i64) ; } impl From < i64 > for AnimationMethodCallMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AnimationMethodCallMode > for i64 { # [inline] fn from (v : AnimationMethodCallMode) -> Self { v . 0 } } impl FromVariant for AnimationMethodCallMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AnimationProcessMode (pub i64) ; impl AnimationProcessMode { pub const PHYSICS : AnimationProcessMode = AnimationProcessMode (0i64) ; pub const IDLE : AnimationProcessMode = AnimationProcessMode (1i64) ; pub const MANUAL : AnimationProcessMode = AnimationProcessMode (2i64) ; } impl From < i64 > for AnimationProcessMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AnimationProcessMode > for i64 { # [inline] fn from (v : AnimationProcessMode) -> Self { v . 0 } } impl FromVariant for AnimationProcessMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationPlayer { pub const ANIMATION_METHOD_CALL_DEFERRED : i64 = 0i64 ; pub const ANIMATION_PROCESS_PHYSICS : i64 = 0i64 ; pub const ANIMATION_METHOD_CALL_IMMEDIATE : i64 = 1i64 ; pub const ANIMATION_PROCESS_IDLE : i64 = 1i64 ; pub const ANIMATION_PROCESS_MANUAL : i64 = 2i64 ; } impl AnimationPlayer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationPlayerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds `animation` to the player accessible with the key `name`."] # [doc = ""] # [inline] pub fn add_animation (& self , name : impl Into < GodotString > , animation : impl AsArg < crate :: generated :: Animation >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . add_animation ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , animation . as_arg_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Shifts position in the animation timeline and immediately updates the animation. `delta` is the time in seconds to shift. Events between the current frame and `delta` are handled."] # [doc = ""] # [inline] pub fn advance (& self , delta : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . advance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , delta as _) ; } } # [doc = "Returns the name of the next animation in the queue."] # [doc = ""] # [inline] pub fn animation_get_next (& self , anim_from : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . animation_get_next ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , anim_from . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Triggers the `anim_to` animation when the `anim_from` animation completes."] # [doc = ""] # [inline] pub fn animation_set_next (& self , anim_from : impl Into < GodotString > , anim_to : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . animation_set_next ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , anim_from . into () , anim_to . into ()) ; } } # [doc = "[`AnimationPlayer`][AnimationPlayer] caches animated nodes. It may not notice if a node disappears; [`clear_caches`][Self::clear_caches] forces it to update the cache again."] # [doc = ""] # [inline] pub fn clear_caches (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . clear_caches ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Clears all queued, unplayed animations."] # [doc = ""] # [inline] pub fn clear_queue (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . clear_queue ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the name of `animation` or an empty string if not found."] # [doc = ""] # [inline] pub fn find_animation (& self , animation : impl AsArg < crate :: generated :: Animation >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . find_animation ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , animation . as_arg_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`Animation`][Animation] with the key `name`. If the animation does not exist, `null` is returned and an error is logged."] # [doc = ""] # [inline] pub fn get_animation (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: Animation , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_animation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Option < Ref < crate :: generated :: Animation , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the list of stored animation names."] # [doc = ""] # [inline] pub fn get_animation_list (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_animation_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The process notification in which to update animations."] # [doc = ""] # [inline] pub fn animation_process_mode (& self) -> crate :: generated :: animation_player :: AnimationProcessMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_animation_process_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: animation_player :: AnimationProcessMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If playing, the current animation; otherwise, the animation last played. When set, would change the animation, but would not play it unless currently playing. See also [`current_animation`][Self::current_animation]."] # [doc = ""] # [inline] pub fn assigned_animation (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_assigned_animation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The name of the animation to play when the scene loads."] # [doc = ""] # [inline] pub fn autoplay (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_autoplay ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the blend time (in seconds) between two animations, referenced by their names."] # [doc = ""] # [inline] pub fn get_blend_time (& self , anim_from : impl Into < GodotString > , anim_to : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_blend_time ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , anim_from . into () , anim_to . into ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The name of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [`play`][Self::play] for more information on playing animations.\n**Note:** While this property appears in the inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [`Animation`][Animation]."] # [doc = ""] # [inline] pub fn current_animation (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_current_animation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The length (in seconds) of the currently being played animation."] # [doc = ""] # [inline] pub fn current_animation_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_current_animation_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The position (in seconds) of the currently playing animation."] # [doc = ""] # [inline] pub fn current_animation_position (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_current_animation_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision."] # [doc = ""] # [inline] pub fn default_blend_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_default_blend_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The call mode to use for Call Method tracks."] # [doc = ""] # [inline] pub fn method_call_mode (& self) -> crate :: generated :: animation_player :: AnimationMethodCallMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_method_call_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: animation_player :: AnimationMethodCallMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the actual playing speed of current animation or 0 if not playing. This speed is the [`playback_speed`][Self::playback_speed] property multiplied by `custom_speed` argument specified when calling the [`play`][Self::play] method."] # [doc = ""] # [inline] pub fn get_playing_speed (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_playing_speed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a list of the animation names that are currently queued to play."] # [doc = ""] # [inline] pub fn get_queue (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_queue ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The node from which node path references will travel."] # [doc = ""] # [inline] pub fn root (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_root ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The speed scaling ratio. For instance, if this value is 1, then the animation plays at normal speed. If it's 0.5, then it plays at half speed. If it's 2, then it plays at double speed."] # [doc = ""] # [inline] pub fn speed_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . get_speed_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the [`AnimationPlayer`][AnimationPlayer] stores an [`Animation`][Animation] with key `name`."] # [doc = ""] # [inline] pub fn has_animation (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . has_animation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, updates animations in response to process-related notifications."] # [doc = ""] # [inline] pub fn is_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . is_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if playing an animation."] # [doc = ""] # [inline] pub fn is_playing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . is_playing ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "This is used by the editor. If set to `true`, the scene will be saved with the effects of the reset animation applied (as if it had been seeked to time 0), then reverted after saving.\nIn other words, the saved scene file will contain the \"default pose\", as defined by the reset animation, if any, with the editor keeping the values that the nodes had before saving."] # [doc = ""] # [inline] pub fn is_reset_on_save_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . is_reset_on_save_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Plays the animation with key `name`. Custom blend times and speed can be set. If `custom_speed` is negative and `from_end` is `true`, the animation will play backwards (which is equivalent to calling [`play_backwards`][Self::play_backwards]).\nThe [`AnimationPlayer`][AnimationPlayer] keeps track of its current or last played animation with [`assigned_animation`][Self::assigned_animation]. If this method is called with that same animation `name`, or with no `name` parameter, the assigned animation will resume playing if it was paused, or restart if it was stopped (see [`stop`][Self::stop] for both pause and stop). If the animation was already playing, it will keep playing.\n**Note:** The animation will be updated the next time the [`AnimationPlayer`][AnimationPlayer] is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call `advance(0)`.\n# Default Arguments\n* `name` - `\"\"`\n* `custom_blend` - `-1`\n* `custom_speed` - `1.0`\n* `from_end` - `false`"] # [doc = ""] # [inline] pub fn play (& self , name : impl Into < GodotString > , custom_blend : f64 , custom_speed : f64 , from_end : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . play ; let ret = crate :: icalls :: icallvar__str_f64_f64_bool (method_bind , self . this . sys () . as_ptr () , name . into () , custom_blend as _ , custom_speed as _ , from_end as _) ; } } # [doc = "Plays the animation with key `name` in reverse.\nThis method is a shorthand for [`play`][Self::play] with `custom_speed = -1.0` and `from_end = true`, so see its description for more information.\n# Default Arguments\n* `name` - `\"\"`\n* `custom_blend` - `-1`"] # [doc = ""] # [inline] pub fn play_backwards (& self , name : impl Into < GodotString > , custom_blend : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . play_backwards ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , name . into () , custom_blend as _) ; } } # [doc = "Queues an animation for playback once the current one is done.\n**Note:** If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow."] # [doc = ""] # [inline] pub fn queue (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . queue ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Removes the animation with key `name`."] # [doc = ""] # [inline] pub fn remove_animation (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . remove_animation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Renames an existing animation with key `name` to `newname`."] # [doc = ""] # [inline] pub fn rename_animation (& self , name : impl Into < GodotString > , newname : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . rename_animation ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , newname . into ()) ; } } # [doc = "Seeks the animation to the `seconds` point in time (in seconds). If `update` is `true`, the animation updates too, otherwise it updates at process time. Events between the current frame and `seconds` are skipped.\n**Note:** Seeking to the end of the animation doesn't emit `animation_finished`. If you want to skip animation and emit the signal, use [`advance`][Self::advance].\n# Default Arguments\n* `update` - `false`"] # [doc = ""] # [inline] pub fn seek (& self , seconds : f64 , update : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . seek ; let ret = crate :: icalls :: icallvar__f64_bool (method_bind , self . this . sys () . as_ptr () , seconds as _ , update as _) ; } } # [doc = "If `true`, updates animations in response to process-related notifications."] # [doc = ""] # [inline] pub fn set_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , active as _) ; } } # [doc = "The process notification in which to update animations."] # [doc = ""] # [inline] pub fn set_animation_process_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_animation_process_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "If playing, the current animation; otherwise, the animation last played. When set, would change the animation, but would not play it unless currently playing. See also [`current_animation`][Self::current_animation]."] # [doc = ""] # [inline] pub fn set_assigned_animation (& self , anim : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_assigned_animation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; } } # [doc = "The name of the animation to play when the scene loads."] # [doc = ""] # [inline] pub fn set_autoplay (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_autoplay ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Specifies a blend time (in seconds) between two animations, referenced by their names."] # [doc = ""] # [inline] pub fn set_blend_time (& self , anim_from : impl Into < GodotString > , anim_to : impl Into < GodotString > , sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_blend_time ; let ret = crate :: icalls :: icallvar__str_str_f64 (method_bind , self . this . sys () . as_ptr () , anim_from . into () , anim_to . into () , sec as _) ; } } # [doc = "The name of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [`play`][Self::play] for more information on playing animations.\n**Note:** While this property appears in the inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [`Animation`][Animation]."] # [doc = ""] # [inline] pub fn set_current_animation (& self , anim : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_current_animation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; } } # [doc = "The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision."] # [doc = ""] # [inline] pub fn set_default_blend_time (& self , sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_default_blend_time ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , sec as _) ; } } # [doc = "The call mode to use for Call Method tracks."] # [doc = ""] # [inline] pub fn set_method_call_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_method_call_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "This is used by the editor. If set to `true`, the scene will be saved with the effects of the reset animation applied (as if it had been seeked to time 0), then reverted after saving.\nIn other words, the saved scene file will contain the \"default pose\", as defined by the reset animation, if any, with the editor keeping the values that the nodes had before saving."] # [doc = ""] # [inline] pub fn set_reset_on_save_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_reset_on_save_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The node from which node path references will travel."] # [doc = ""] # [inline] pub fn set_root (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_root ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "The speed scaling ratio. For instance, if this value is 1, then the animation plays at normal speed. If it's 0.5, then it plays at half speed. If it's 2, then it plays at double speed."] # [doc = ""] # [inline] pub fn set_speed_scale (& self , speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . set_speed_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , speed as _) ; } } # [doc = "Stops or pauses the currently playing animation. If `reset` is `true`, the animation position is reset to `0` and the playback speed is reset to `1.0`.\nIf `reset` is `false`, the [`current_animation_position`][Self::current_animation_position] will be kept and calling [`play`][Self::play] or [`play_backwards`][Self::play_backwards] without arguments or with the same animation name as [`assigned_animation`][Self::assigned_animation] will resume the animation.\n# Default Arguments\n* `reset` - `true`"] # [doc = ""] # [inline] pub fn stop (& self , reset : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationPlayerMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , reset as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationPlayer { } unsafe impl GodotObject for AnimationPlayer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AnimationPlayer" } } impl QueueFree for AnimationPlayer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for AnimationPlayer { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationPlayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for AnimationPlayer { } unsafe impl SubClass < crate :: generated :: Object > for AnimationPlayer { } impl Instanciable for AnimationPlayer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationPlayer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationPlayerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_animation : * mut sys :: godot_method_bind , pub advance : * mut sys :: godot_method_bind , pub animation_get_next : * mut sys :: godot_method_bind , pub animation_set_next : * mut sys :: godot_method_bind , pub clear_caches : * mut sys :: godot_method_bind , pub clear_queue : * mut sys :: godot_method_bind , pub find_animation : * mut sys :: godot_method_bind , pub get_animation : * mut sys :: godot_method_bind , pub get_animation_list : * mut sys :: godot_method_bind , pub get_animation_process_mode : * mut sys :: godot_method_bind , pub get_assigned_animation : * mut sys :: godot_method_bind , pub get_autoplay : * mut sys :: godot_method_bind , pub get_blend_time : * mut sys :: godot_method_bind , pub get_current_animation : * mut sys :: godot_method_bind , pub get_current_animation_length : * mut sys :: godot_method_bind , pub get_current_animation_position : * mut sys :: godot_method_bind , pub get_default_blend_time : * mut sys :: godot_method_bind , pub get_method_call_mode : * mut sys :: godot_method_bind , pub get_playing_speed : * mut sys :: godot_method_bind , pub get_queue : * mut sys :: godot_method_bind , pub get_root : * mut sys :: godot_method_bind , pub get_speed_scale : * mut sys :: godot_method_bind , pub has_animation : * mut sys :: godot_method_bind , pub is_active : * mut sys :: godot_method_bind , pub is_playing : * mut sys :: godot_method_bind , pub is_reset_on_save_enabled : * mut sys :: godot_method_bind , pub play : * mut sys :: godot_method_bind , pub play_backwards : * mut sys :: godot_method_bind , pub queue : * mut sys :: godot_method_bind , pub remove_animation : * mut sys :: godot_method_bind , pub rename_animation : * mut sys :: godot_method_bind , pub seek : * mut sys :: godot_method_bind , pub set_active : * mut sys :: godot_method_bind , pub set_animation_process_mode : * mut sys :: godot_method_bind , pub set_assigned_animation : * mut sys :: godot_method_bind , pub set_autoplay : * mut sys :: godot_method_bind , pub set_blend_time : * mut sys :: godot_method_bind , pub set_current_animation : * mut sys :: godot_method_bind , pub set_default_blend_time : * mut sys :: godot_method_bind , pub set_method_call_mode : * mut sys :: godot_method_bind , pub set_reset_on_save_enabled : * mut sys :: godot_method_bind , pub set_root : * mut sys :: godot_method_bind , pub set_speed_scale : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl AnimationPlayerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationPlayerMethodTable = AnimationPlayerMethodTable { class_constructor : None , add_animation : 0 as * mut sys :: godot_method_bind , advance : 0 as * mut sys :: godot_method_bind , animation_get_next : 0 as * mut sys :: godot_method_bind , animation_set_next : 0 as * mut sys :: godot_method_bind , clear_caches : 0 as * mut sys :: godot_method_bind , clear_queue : 0 as * mut sys :: godot_method_bind , find_animation : 0 as * mut sys :: godot_method_bind , get_animation : 0 as * mut sys :: godot_method_bind , get_animation_list : 0 as * mut sys :: godot_method_bind , get_animation_process_mode : 0 as * mut sys :: godot_method_bind , get_assigned_animation : 0 as * mut sys :: godot_method_bind , get_autoplay : 0 as * mut sys :: godot_method_bind , get_blend_time : 0 as * mut sys :: godot_method_bind , get_current_animation : 0 as * mut sys :: godot_method_bind , get_current_animation_length : 0 as * mut sys :: godot_method_bind , get_current_animation_position : 0 as * mut sys :: godot_method_bind , get_default_blend_time : 0 as * mut sys :: godot_method_bind , get_method_call_mode : 0 as * mut sys :: godot_method_bind , get_playing_speed : 0 as * mut sys :: godot_method_bind , get_queue : 0 as * mut sys :: godot_method_bind , get_root : 0 as * mut sys :: godot_method_bind , get_speed_scale : 0 as * mut sys :: godot_method_bind , has_animation : 0 as * mut sys :: godot_method_bind , is_active : 0 as * mut sys :: godot_method_bind , is_playing : 0 as * mut sys :: godot_method_bind , is_reset_on_save_enabled : 0 as * mut sys :: godot_method_bind , play : 0 as * mut sys :: godot_method_bind , play_backwards : 0 as * mut sys :: godot_method_bind , queue : 0 as * mut sys :: godot_method_bind , remove_animation : 0 as * mut sys :: godot_method_bind , rename_animation : 0 as * mut sys :: godot_method_bind , seek : 0 as * mut sys :: godot_method_bind , set_active : 0 as * mut sys :: godot_method_bind , set_animation_process_mode : 0 as * mut sys :: godot_method_bind , set_assigned_animation : 0 as * mut sys :: godot_method_bind , set_autoplay : 0 as * mut sys :: godot_method_bind , set_blend_time : 0 as * mut sys :: godot_method_bind , set_current_animation : 0 as * mut sys :: godot_method_bind , set_default_blend_time : 0 as * mut sys :: godot_method_bind , set_method_call_mode : 0 as * mut sys :: godot_method_bind , set_reset_on_save_enabled : 0 as * mut sys :: godot_method_bind , set_root : 0 as * mut sys :: godot_method_bind , set_speed_scale : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationPlayerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationPlayer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_animation = (gd_api . godot_method_bind_get_method) (class_name , "add_animation\0" . as_ptr () as * const c_char) ; table . advance = (gd_api . godot_method_bind_get_method) (class_name , "advance\0" . as_ptr () as * const c_char) ; table . animation_get_next = (gd_api . godot_method_bind_get_method) (class_name , "animation_get_next\0" . as_ptr () as * const c_char) ; table . animation_set_next = (gd_api . godot_method_bind_get_method) (class_name , "animation_set_next\0" . as_ptr () as * const c_char) ; table . clear_caches = (gd_api . godot_method_bind_get_method) (class_name , "clear_caches\0" . as_ptr () as * const c_char) ; table . clear_queue = (gd_api . godot_method_bind_get_method) (class_name , "clear_queue\0" . as_ptr () as * const c_char) ; table . find_animation = (gd_api . godot_method_bind_get_method) (class_name , "find_animation\0" . as_ptr () as * const c_char) ; table . get_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_animation\0" . as_ptr () as * const c_char) ; table . get_animation_list = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_list\0" . as_ptr () as * const c_char) ; table . get_animation_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_process_mode\0" . as_ptr () as * const c_char) ; table . get_assigned_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_assigned_animation\0" . as_ptr () as * const c_char) ; table . get_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "get_autoplay\0" . as_ptr () as * const c_char) ; table . get_blend_time = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_time\0" . as_ptr () as * const c_char) ; table . get_current_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_current_animation\0" . as_ptr () as * const c_char) ; table . get_current_animation_length = (gd_api . godot_method_bind_get_method) (class_name , "get_current_animation_length\0" . as_ptr () as * const c_char) ; table . get_current_animation_position = (gd_api . godot_method_bind_get_method) (class_name , "get_current_animation_position\0" . as_ptr () as * const c_char) ; table . get_default_blend_time = (gd_api . godot_method_bind_get_method) (class_name , "get_default_blend_time\0" . as_ptr () as * const c_char) ; table . get_method_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_method_call_mode\0" . as_ptr () as * const c_char) ; table . get_playing_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_playing_speed\0" . as_ptr () as * const c_char) ; table . get_queue = (gd_api . godot_method_bind_get_method) (class_name , "get_queue\0" . as_ptr () as * const c_char) ; table . get_root = (gd_api . godot_method_bind_get_method) (class_name , "get_root\0" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\0" . as_ptr () as * const c_char) ; table . has_animation = (gd_api . godot_method_bind_get_method) (class_name , "has_animation\0" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . is_reset_on_save_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_reset_on_save_enabled\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . play_backwards = (gd_api . godot_method_bind_get_method) (class_name , "play_backwards\0" . as_ptr () as * const c_char) ; table . queue = (gd_api . godot_method_bind_get_method) (class_name , "queue\0" . as_ptr () as * const c_char) ; table . remove_animation = (gd_api . godot_method_bind_get_method) (class_name , "remove_animation\0" . as_ptr () as * const c_char) ; table . rename_animation = (gd_api . godot_method_bind_get_method) (class_name , "rename_animation\0" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\0" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\0" . as_ptr () as * const c_char) ; table . set_animation_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_animation_process_mode\0" . as_ptr () as * const c_char) ; table . set_assigned_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_assigned_animation\0" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\0" . as_ptr () as * const c_char) ; table . set_blend_time = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_time\0" . as_ptr () as * const c_char) ; table . set_current_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_current_animation\0" . as_ptr () as * const c_char) ; table . set_default_blend_time = (gd_api . godot_method_bind_get_method) (class_name , "set_default_blend_time\0" . as_ptr () as * const c_char) ; table . set_method_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_method_call_mode\0" . as_ptr () as * const c_char) ; table . set_reset_on_save_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_reset_on_save_enabled\0" . as_ptr () as * const c_char) ; table . set_root = (gd_api . godot_method_bind_get_method) (class_name , "set_root\0" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_player::private::AnimationPlayer;
            
            pub(crate) mod animation_root_node {
                # ! [doc = "This module contains types related to the API class [`AnimationRootNode`][super::AnimationRootNode]."] pub (crate) mod private { # [doc = "`core class AnimationRootNode` inherits `AnimationNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationrootnode.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationRootNode inherits methods from:\n - [AnimationNode](struct.AnimationNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationRootNode { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationRootNode ; impl AnimationRootNode { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationRootNodeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationRootNode { } unsafe impl GodotObject for AnimationRootNode { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationRootNode" } } impl std :: ops :: Deref for AnimationRootNode { type Target = crate :: generated :: AnimationNode ; # [inline] fn deref (& self) -> & crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationRootNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AnimationNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AnimationNode > for AnimationRootNode { } unsafe impl SubClass < crate :: generated :: Resource > for AnimationRootNode { } unsafe impl SubClass < crate :: generated :: Reference > for AnimationRootNode { } unsafe impl SubClass < crate :: generated :: Object > for AnimationRootNode { } impl Instanciable for AnimationRootNode { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationRootNode :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationRootNodeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AnimationRootNodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationRootNodeMethodTable = AnimationRootNodeMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationRootNodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationRootNode\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_root_node::private::AnimationRootNode;
            
            pub(crate) mod animation_track_edit_plugin {
                # ! [doc = "This module contains types related to the API class [`AnimationTrackEditPlugin`][super::AnimationTrackEditPlugin]."] pub (crate) mod private { # [doc = "`tools class AnimationTrackEditPlugin` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationtrackeditplugin.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAnimationTrackEditPlugin inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationTrackEditPlugin { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationTrackEditPlugin ; impl AnimationTrackEditPlugin { } impl gdnative_core :: private :: godot_object :: Sealed for AnimationTrackEditPlugin { } unsafe impl GodotObject for AnimationTrackEditPlugin { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AnimationTrackEditPlugin" } } impl std :: ops :: Deref for AnimationTrackEditPlugin { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationTrackEditPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for AnimationTrackEditPlugin { } unsafe impl SubClass < crate :: generated :: Object > for AnimationTrackEditPlugin { }
                use super::*;
            }
            pub use crate::generated::animation_track_edit_plugin::private::AnimationTrackEditPlugin;
            
            pub mod animation_tree {
                # ! [doc = "This module contains types related to the API class [`AnimationTree`][super::AnimationTree]."] pub (crate) mod private { # [doc = "`core class AnimationTree` inherits `Node` (manually managed).\n\nThis class has related types in the [`animation_tree`][super::animation_tree] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationtree.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`AnimationTree` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<AnimationTree>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAnimationTree inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationTree { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationTree ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AnimationProcessMode (pub i64) ; impl AnimationProcessMode { pub const PHYSICS : AnimationProcessMode = AnimationProcessMode (0i64) ; pub const IDLE : AnimationProcessMode = AnimationProcessMode (1i64) ; pub const MANUAL : AnimationProcessMode = AnimationProcessMode (2i64) ; } impl From < i64 > for AnimationProcessMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AnimationProcessMode > for i64 { # [inline] fn from (v : AnimationProcessMode) -> Self { v . 0 } } impl FromVariant for AnimationProcessMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationTree { pub const ANIMATION_PROCESS_PHYSICS : i64 = 0i64 ; pub const ANIMATION_PROCESS_IDLE : i64 = 1i64 ; pub const ANIMATION_PROCESS_MANUAL : i64 = 2i64 ; } impl AnimationTree { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationTreeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Manually advance the animations by the specified time (in seconds)."] # [doc = ""] # [inline] pub fn advance (& self , delta : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreeMethodTable :: get (get_api ()) . advance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , delta as _) ; } } # [doc = "The path to the [`AnimationPlayer`][AnimationPlayer] used for animating."] # [doc = ""] # [inline] pub fn animation_player (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreeMethodTable :: get (get_api ()) . get_animation_player ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The process mode of this [`AnimationTree`][AnimationTree]. See [`AnimationProcessMode`][AnimationProcessMode] for available modes."] # [doc = ""] # [inline] pub fn process_mode (& self) -> crate :: generated :: animation_tree :: AnimationProcessMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreeMethodTable :: get (get_api ()) . get_process_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: animation_tree :: AnimationProcessMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by `\":\"`. For example, `\"character/skeleton:ankle\"` or `\"character/mesh:transform/local\"`.\nIf the track has type [`Animation.TYPE_TRANSFORM`][Animation::TYPE_TRANSFORM], the transformation will be cancelled visually, and the animation will appear to stay in place. See also [`get_root_motion_transform`][Self::get_root_motion_transform] and [`RootMotionView`][RootMotionView]."] # [doc = ""] # [inline] pub fn root_motion_track (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreeMethodTable :: get (get_api ()) . get_root_motion_track ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Retrieve the motion of the [`root_motion_track`][Self::root_motion_track] as a [`Transform`][Transform] that can be used elsewhere. If [`root_motion_track`][Self::root_motion_track] is not a path to a track of type [`Animation.TYPE_TRANSFORM`][Animation::TYPE_TRANSFORM], returns an identity transformation. See also [`root_motion_track`][Self::root_motion_track] and [`RootMotionView`][RootMotionView]."] # [doc = ""] # [inline] pub fn get_root_motion_transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreeMethodTable :: get (get_api ()) . get_root_motion_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The root animation node of this [`AnimationTree`][AnimationTree]. See [`AnimationNode`][AnimationNode]."] # [doc = ""] # [inline] pub fn tree_root (& self) -> Option < Ref < crate :: generated :: AnimationNode , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreeMethodTable :: get (get_api ()) . get_tree_root ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: AnimationNode , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the [`AnimationTree`][AnimationTree] will be processing."] # [doc = ""] # [inline] pub fn is_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreeMethodTable :: get (get_api ()) . is_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn rename_parameter (& self , old_name : impl Into < GodotString > , new_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreeMethodTable :: get (get_api ()) . rename_parameter ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , old_name . into () , new_name . into ()) ; } } # [doc = "If `true`, the [`AnimationTree`][AnimationTree] will be processing."] # [doc = ""] # [inline] pub fn set_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreeMethodTable :: get (get_api ()) . set_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , active as _) ; } } # [doc = "The path to the [`AnimationPlayer`][AnimationPlayer] used for animating."] # [doc = ""] # [inline] pub fn set_animation_player (& self , root : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreeMethodTable :: get (get_api ()) . set_animation_player ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , root . into ()) ; } } # [doc = "The process mode of this [`AnimationTree`][AnimationTree]. See [`AnimationProcessMode`][AnimationProcessMode] for available modes."] # [doc = ""] # [inline] pub fn set_process_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreeMethodTable :: get (get_api ()) . set_process_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by `\":\"`. For example, `\"character/skeleton:ankle\"` or `\"character/mesh:transform/local\"`.\nIf the track has type [`Animation.TYPE_TRANSFORM`][Animation::TYPE_TRANSFORM], the transformation will be cancelled visually, and the animation will appear to stay in place. See also [`get_root_motion_transform`][Self::get_root_motion_transform] and [`RootMotionView`][RootMotionView]."] # [doc = ""] # [inline] pub fn set_root_motion_track (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreeMethodTable :: get (get_api ()) . set_root_motion_track ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "The root animation node of this [`AnimationTree`][AnimationTree]. See [`AnimationNode`][AnimationNode]."] # [doc = ""] # [inline] pub fn set_tree_root (& self , root : impl AsArg < crate :: generated :: AnimationNode >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreeMethodTable :: get (get_api ()) . set_tree_root ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , root . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationTree { } unsafe impl GodotObject for AnimationTree { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AnimationTree" } } impl QueueFree for AnimationTree { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for AnimationTree { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationTree { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for AnimationTree { } unsafe impl SubClass < crate :: generated :: Object > for AnimationTree { } impl Instanciable for AnimationTree { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationTree :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationTreeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub advance : * mut sys :: godot_method_bind , pub get_animation_player : * mut sys :: godot_method_bind , pub get_process_mode : * mut sys :: godot_method_bind , pub get_root_motion_track : * mut sys :: godot_method_bind , pub get_root_motion_transform : * mut sys :: godot_method_bind , pub get_tree_root : * mut sys :: godot_method_bind , pub is_active : * mut sys :: godot_method_bind , pub rename_parameter : * mut sys :: godot_method_bind , pub set_active : * mut sys :: godot_method_bind , pub set_animation_player : * mut sys :: godot_method_bind , pub set_process_mode : * mut sys :: godot_method_bind , pub set_root_motion_track : * mut sys :: godot_method_bind , pub set_tree_root : * mut sys :: godot_method_bind } impl AnimationTreeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationTreeMethodTable = AnimationTreeMethodTable { class_constructor : None , advance : 0 as * mut sys :: godot_method_bind , get_animation_player : 0 as * mut sys :: godot_method_bind , get_process_mode : 0 as * mut sys :: godot_method_bind , get_root_motion_track : 0 as * mut sys :: godot_method_bind , get_root_motion_transform : 0 as * mut sys :: godot_method_bind , get_tree_root : 0 as * mut sys :: godot_method_bind , is_active : 0 as * mut sys :: godot_method_bind , rename_parameter : 0 as * mut sys :: godot_method_bind , set_active : 0 as * mut sys :: godot_method_bind , set_animation_player : 0 as * mut sys :: godot_method_bind , set_process_mode : 0 as * mut sys :: godot_method_bind , set_root_motion_track : 0 as * mut sys :: godot_method_bind , set_tree_root : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationTreeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationTree\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . advance = (gd_api . godot_method_bind_get_method) (class_name , "advance\0" . as_ptr () as * const c_char) ; table . get_animation_player = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_player\0" . as_ptr () as * const c_char) ; table . get_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_process_mode\0" . as_ptr () as * const c_char) ; table . get_root_motion_track = (gd_api . godot_method_bind_get_method) (class_name , "get_root_motion_track\0" . as_ptr () as * const c_char) ; table . get_root_motion_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_root_motion_transform\0" . as_ptr () as * const c_char) ; table . get_tree_root = (gd_api . godot_method_bind_get_method) (class_name , "get_tree_root\0" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\0" . as_ptr () as * const c_char) ; table . rename_parameter = (gd_api . godot_method_bind_get_method) (class_name , "rename_parameter\0" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\0" . as_ptr () as * const c_char) ; table . set_animation_player = (gd_api . godot_method_bind_get_method) (class_name , "set_animation_player\0" . as_ptr () as * const c_char) ; table . set_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_process_mode\0" . as_ptr () as * const c_char) ; table . set_root_motion_track = (gd_api . godot_method_bind_get_method) (class_name , "set_root_motion_track\0" . as_ptr () as * const c_char) ; table . set_tree_root = (gd_api . godot_method_bind_get_method) (class_name , "set_tree_root\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_tree::private::AnimationTree;
            
            pub mod animation_tree_player {
                # ! [doc = "This module contains types related to the API class [`AnimationTreePlayer`][super::AnimationTreePlayer]."] pub (crate) mod private { # [doc = "`core class AnimationTreePlayer` inherits `Node` (manually managed).\n\nThis class has related types in the [`animation_tree_player`][super::animation_tree_player] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_animationtreeplayer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`AnimationTreePlayer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<AnimationTreePlayer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAnimationTreePlayer inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AnimationTreePlayer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AnimationTreePlayer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AnimationProcessMode (pub i64) ; impl AnimationProcessMode { pub const PHYSICS : AnimationProcessMode = AnimationProcessMode (0i64) ; pub const IDLE : AnimationProcessMode = AnimationProcessMode (1i64) ; } impl From < i64 > for AnimationProcessMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AnimationProcessMode > for i64 { # [inline] fn from (v : AnimationProcessMode) -> Self { v . 0 } } impl FromVariant for AnimationProcessMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct NodeType (pub i64) ; impl NodeType { pub const OUTPUT : NodeType = NodeType (0i64) ; pub const ANIMATION : NodeType = NodeType (1i64) ; pub const ONESHOT : NodeType = NodeType (2i64) ; pub const MIX : NodeType = NodeType (3i64) ; pub const BLEND2 : NodeType = NodeType (4i64) ; pub const BLEND3 : NodeType = NodeType (5i64) ; pub const BLEND4 : NodeType = NodeType (6i64) ; pub const TIMESCALE : NodeType = NodeType (7i64) ; pub const TIMESEEK : NodeType = NodeType (8i64) ; pub const TRANSITION : NodeType = NodeType (9i64) ; } impl From < i64 > for NodeType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < NodeType > for i64 { # [inline] fn from (v : NodeType) -> Self { v . 0 } } impl FromVariant for NodeType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AnimationTreePlayer { pub const ANIMATION_PROCESS_PHYSICS : i64 = 0i64 ; pub const NODE_OUTPUT : i64 = 0i64 ; pub const ANIMATION_PROCESS_IDLE : i64 = 1i64 ; pub const NODE_ANIMATION : i64 = 1i64 ; pub const NODE_ONESHOT : i64 = 2i64 ; pub const NODE_MIX : i64 = 3i64 ; pub const NODE_BLEND2 : i64 = 4i64 ; pub const NODE_BLEND3 : i64 = 5i64 ; pub const NODE_BLEND4 : i64 = 6i64 ; pub const NODE_TIMESCALE : i64 = 7i64 ; pub const NODE_TIMESEEK : i64 = 8i64 ; pub const NODE_TRANSITION : i64 = 9i64 ; } impl AnimationTreePlayer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AnimationTreePlayerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a `type` node to the graph with name `id`."] # [doc = ""] # [inline] pub fn add_node (& self , type_ : i64 , id : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . add_node ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , type_ as _ , id . into ()) ; } } # [doc = "Shifts position in the animation timeline. `delta` is the time in seconds to shift. Events between the current frame and `delta` are handled."] # [doc = ""] # [inline] pub fn advance (& self , delta : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . advance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , delta as _) ; } } # [doc = "Returns the [`AnimationPlayer`][AnimationPlayer]'s [`Animation`][Animation] bound to the [`AnimationTreePlayer`][AnimationTreePlayer]'s animation node with name `id`."] # [doc = ""] # [inline] pub fn animation_node_get_animation (& self , id : impl Into < GodotString >) -> Option < Ref < crate :: generated :: Animation , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . animation_node_get_animation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < Option < Ref < crate :: generated :: Animation , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the name of the [`master_player`][Self::master_player]'s [`Animation`][Animation] bound to this animation node."] # [doc = ""] # [inline] pub fn animation_node_get_master_animation (& self , id : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . animation_node_get_master_animation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the absolute playback timestamp of the animation node with name `id`."] # [doc = ""] # [inline] pub fn animation_node_get_position (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . animation_node_get_position ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Binds a new [`Animation`][Animation] from the [`master_player`][Self::master_player] to the [`AnimationTreePlayer`][AnimationTreePlayer]'s animation node with name `id`."] # [doc = ""] # [inline] pub fn animation_node_set_animation (& self , id : impl Into < GodotString > , animation : impl AsArg < crate :: generated :: Animation >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . animation_node_set_animation ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , id . into () , animation . as_arg_ptr ()) ; } } # [doc = "If `enable` is `true`, the animation node with ID `id` turns off the track modifying the property at `path`. The modified node's children continue to animate."] # [doc = ""] # [inline] pub fn animation_node_set_filter_path (& self , id : impl Into < GodotString > , path : impl Into < NodePath > , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . animation_node_set_filter_path ; let ret = crate :: icalls :: icallvar__str_nodepath_bool (method_bind , self . this . sys () . as_ptr () , id . into () , path . into () , enable as _) ; } } # [doc = "Binds the [`Animation`][Animation] named `source` from [`master_player`][Self::master_player] to the animation node `id`. Recalculates caches."] # [doc = ""] # [inline] pub fn animation_node_set_master_animation (& self , id : impl Into < GodotString > , source : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . animation_node_set_master_animation ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , id . into () , source . into ()) ; } } # [doc = "Returns whether node `id` and `dst_id` are connected at the specified slot."] # [doc = ""] # [inline] pub fn are_nodes_connected (& self , id : impl Into < GodotString > , dst_id : impl Into < GodotString > , dst_input_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . are_nodes_connected ; let ret = crate :: icalls :: icallvar__str_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , dst_id . into () , dst_input_idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the blend amount of a Blend2 node given its name."] # [doc = ""] # [inline] pub fn blend2_node_get_amount (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . blend2_node_get_amount ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the blend amount of a Blend2 node given its name and value.\nA Blend2 node blends two animations (A and B) with the amount between 0 and 1.\nAt 0, output is input A. Towards 1, the influence of A gets lessened, the influence of B gets raised. At 1, output is input B."] # [doc = ""] # [inline] pub fn blend2_node_set_amount (& self , id : impl Into < GodotString > , blend : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . blend2_node_set_amount ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , blend as _) ; } } # [doc = "If `enable` is `true`, the Blend2 node with name `id` turns off the track modifying the property at `path`. The modified node's children continue to animate."] # [doc = ""] # [inline] pub fn blend2_node_set_filter_path (& self , id : impl Into < GodotString > , path : impl Into < NodePath > , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . blend2_node_set_filter_path ; let ret = crate :: icalls :: icallvar__str_nodepath_bool (method_bind , self . this . sys () . as_ptr () , id . into () , path . into () , enable as _) ; } } # [doc = "Returns the blend amount of a Blend3 node given its name."] # [doc = ""] # [inline] pub fn blend3_node_get_amount (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . blend3_node_get_amount ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the blend amount of a Blend3 node given its name and value.\nA Blend3 Node blends three animations (A, B-, B+) with the amount between -1 and 1.\nAt -1, output is input B-. From -1 to 0, the influence of B- gets lessened, the influence of A gets raised and the influence of B+ is 0. At 0, output is input A. From 0 to 1, the influence of A gets lessened, the influence of B+ gets raised and the influence of B+ is 0. At 1, output is input B+."] # [doc = ""] # [inline] pub fn blend3_node_set_amount (& self , id : impl Into < GodotString > , blend : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . blend3_node_set_amount ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , blend as _) ; } } # [doc = "Returns the blend amount of a Blend4 node given its name."] # [doc = ""] # [inline] pub fn blend4_node_get_amount (& self , id : impl Into < GodotString >) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . blend4_node_get_amount ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the blend amount of a Blend4 node given its name and value.\nA Blend4 Node blends two pairs of animations.\nThe two pairs are blended like Blend2 and then added together."] # [doc = ""] # [inline] pub fn blend4_node_set_amount (& self , id : impl Into < GodotString > , blend : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . blend4_node_set_amount ; let ret = crate :: icalls :: icallvar__str_vec2 (method_bind , self . this . sys () . as_ptr () , id . into () , blend) ; } } # [doc = "Connects node `id` to `dst_id` at the specified input slot."] # [doc = ""] # [inline] pub fn connect_nodes (& self , id : impl Into < GodotString > , dst_id : impl Into < GodotString > , dst_input_idx : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . connect_nodes ; let ret = crate :: icalls :: icallvar__str_str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , dst_id . into () , dst_input_idx as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Disconnects nodes connected to `id` at the specified input slot."] # [doc = ""] # [inline] pub fn disconnect_nodes (& self , id : impl Into < GodotString > , dst_input_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . disconnect_nodes ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , dst_input_idx as _) ; } } # [doc = "The thread in which to update animations."] # [doc = ""] # [inline] pub fn animation_process_mode (& self) -> crate :: generated :: animation_tree_player :: AnimationProcessMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . get_animation_process_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: animation_tree_player :: AnimationProcessMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The node from which to relatively access other nodes.\nIt accesses the bones, so it should point to the same node the [`AnimationPlayer`][AnimationPlayer] would point its Root Node at."] # [doc = ""] # [inline] pub fn base_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . get_base_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The path to the [`AnimationPlayer`][AnimationPlayer] from which this [`AnimationTreePlayer`][AnimationTreePlayer] binds animations to animation nodes.\nOnce set, [`Animation`][Animation] nodes can be added to the [`AnimationTreePlayer`][AnimationTreePlayer]."] # [doc = ""] # [inline] pub fn master_player (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . get_master_player ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [`PoolStringArray`][PoolArray<GodotString>] containing the name of all nodes."] # [doc = ""] # [inline] pub fn get_node_list (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . get_node_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the [`AnimationTreePlayer`][AnimationTreePlayer] is able to play animations."] # [doc = ""] # [inline] pub fn is_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . is_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the mix amount of a Mix node given its name."] # [doc = ""] # [inline] pub fn mix_node_get_amount (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . mix_node_get_amount ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the mix amount of a Mix node given its name and value.\nA Mix node adds input b to input a by the amount given by ratio."] # [doc = ""] # [inline] pub fn mix_node_set_amount (& self , id : impl Into < GodotString > , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . mix_node_set_amount ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , ratio as _) ; } } # [doc = "Check if a node exists (by name)."] # [doc = ""] # [inline] pub fn node_exists (& self , node : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . node_exists ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , node . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the input count for a given node. Different types of nodes have different amount of inputs."] # [doc = ""] # [inline] pub fn node_get_input_count (& self , id : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . node_get_input_count ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the input source for a given node input."] # [doc = ""] # [inline] pub fn node_get_input_source (& self , id : impl Into < GodotString > , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . node_get_input_source ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns position of a node in the graph given its name."] # [doc = ""] # [inline] pub fn node_get_position (& self , id : impl Into < GodotString >) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . node_get_position ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the node type, will return from [`NodeType`][NodeType] enum."] # [doc = ""] # [inline] pub fn node_get_type (& self , id : impl Into < GodotString >) -> crate :: generated :: animation_tree_player :: NodeType { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . node_get_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < crate :: generated :: animation_tree_player :: NodeType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Renames a node in the graph."] # [doc = ""] # [inline] pub fn node_rename (& self , node : impl Into < GodotString > , new_name : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . node_rename ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , node . into () , new_name . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Sets the position of a node in the graph given its name and position."] # [doc = ""] # [inline] pub fn node_set_position (& self , id : impl Into < GodotString > , screen_position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . node_set_position ; let ret = crate :: icalls :: icallvar__str_vec2 (method_bind , self . this . sys () . as_ptr () , id . into () , screen_position) ; } } # [doc = "Returns the autostart delay of a OneShot node given its name."] # [doc = ""] # [inline] pub fn oneshot_node_get_autorestart_delay (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_get_autorestart_delay ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the autostart random delay of a OneShot node given its name."] # [doc = ""] # [inline] pub fn oneshot_node_get_autorestart_random_delay (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_get_autorestart_random_delay ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the fade in time of a OneShot node given its name."] # [doc = ""] # [inline] pub fn oneshot_node_get_fadein_time (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_get_fadein_time ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the fade out time of a OneShot node given its name."] # [doc = ""] # [inline] pub fn oneshot_node_get_fadeout_time (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_get_fadeout_time ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns whether a OneShot node will auto restart given its name."] # [doc = ""] # [inline] pub fn oneshot_node_has_autorestart (& self , id : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_has_autorestart ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether a OneShot node is active given its name."] # [doc = ""] # [inline] pub fn oneshot_node_is_active (& self , id : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_is_active ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets the autorestart property of a OneShot node given its name and value."] # [doc = ""] # [inline] pub fn oneshot_node_set_autorestart (& self , id : impl Into < GodotString > , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_set_autorestart ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , id . into () , enable as _) ; } } # [doc = "Sets the autorestart delay of a OneShot node given its name and value in seconds."] # [doc = ""] # [inline] pub fn oneshot_node_set_autorestart_delay (& self , id : impl Into < GodotString > , delay_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_set_autorestart_delay ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , delay_sec as _) ; } } # [doc = "Sets the autorestart random delay of a OneShot node given its name and value in seconds."] # [doc = ""] # [inline] pub fn oneshot_node_set_autorestart_random_delay (& self , id : impl Into < GodotString > , rand_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_set_autorestart_random_delay ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , rand_sec as _) ; } } # [doc = "Sets the fade in time of a OneShot node given its name and value in seconds."] # [doc = ""] # [inline] pub fn oneshot_node_set_fadein_time (& self , id : impl Into < GodotString > , time_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_set_fadein_time ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , time_sec as _) ; } } # [doc = "Sets the fade out time of a OneShot node given its name and value in seconds."] # [doc = ""] # [inline] pub fn oneshot_node_set_fadeout_time (& self , id : impl Into < GodotString > , time_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_set_fadeout_time ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , time_sec as _) ; } } # [doc = "If `enable` is `true`, the OneShot node with ID `id` turns off the track modifying the property at `path`. The modified node's children continue to animate."] # [doc = ""] # [inline] pub fn oneshot_node_set_filter_path (& self , id : impl Into < GodotString > , path : impl Into < NodePath > , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_set_filter_path ; let ret = crate :: icalls :: icallvar__str_nodepath_bool (method_bind , self . this . sys () . as_ptr () , id . into () , path . into () , enable as _) ; } } # [doc = "Starts a OneShot node given its name."] # [doc = ""] # [inline] pub fn oneshot_node_start (& self , id : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_start ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; } } # [doc = "Stops the OneShot node with name `id`."] # [doc = ""] # [inline] pub fn oneshot_node_stop (& self , id : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . oneshot_node_stop ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; } } # [doc = "Manually recalculates the cache of track information generated from animation nodes. Needed when external sources modify the animation nodes' state."] # [doc = ""] # [inline] pub fn recompute_caches (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . recompute_caches ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes the animation node with name `id`."] # [doc = ""] # [inline] pub fn remove_node (& self , id : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . remove_node ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; } } # [doc = "Resets this [`AnimationTreePlayer`][AnimationTreePlayer]."] # [doc = ""] # [inline] pub fn reset (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . reset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the [`AnimationTreePlayer`][AnimationTreePlayer] is able to play animations."] # [doc = ""] # [inline] pub fn set_active (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . set_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The thread in which to update animations."] # [doc = ""] # [inline] pub fn set_animation_process_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . set_animation_process_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The node from which to relatively access other nodes.\nIt accesses the bones, so it should point to the same node the [`AnimationPlayer`][AnimationPlayer] would point its Root Node at."] # [doc = ""] # [inline] pub fn set_base_path (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . set_base_path ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "The path to the [`AnimationPlayer`][AnimationPlayer] from which this [`AnimationTreePlayer`][AnimationTreePlayer] binds animations to animation nodes.\nOnce set, [`Animation`][Animation] nodes can be added to the [`AnimationTreePlayer`][AnimationTreePlayer]."] # [doc = ""] # [inline] pub fn set_master_player (& self , nodepath : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . set_master_player ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , nodepath . into ()) ; } } # [doc = "Returns the time scale value of the TimeScale node with name `id`."] # [doc = ""] # [inline] pub fn timescale_node_get_scale (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . timescale_node_get_scale ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the time scale of the TimeScale node with name `id` to `scale`.\nThe TimeScale node is used to speed [`Animation`][Animation]s up if the scale is above 1 or slow them down if it is below 1.\nIf applied after a blend or mix, affects all input animations to that blend or mix."] # [doc = ""] # [inline] pub fn timescale_node_set_scale (& self , id : impl Into < GodotString > , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . timescale_node_set_scale ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , scale as _) ; } } # [doc = "Sets the time seek value of the TimeSeek node with name `id` to `seconds`.\nThis functions as a seek in the [`Animation`][Animation] or the blend or mix of [`Animation`][Animation]s input in it."] # [doc = ""] # [inline] pub fn timeseek_node_seek (& self , id : impl Into < GodotString > , seconds : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . timeseek_node_seek ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , seconds as _) ; } } # [doc = "Deletes the input at `input_idx` for the transition node with name `id`."] # [doc = ""] # [inline] pub fn transition_node_delete_input (& self , id : impl Into < GodotString > , input_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_delete_input ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , input_idx as _) ; } } # [doc = "Returns the index of the currently evaluated input for the transition node with name `id`."] # [doc = ""] # [inline] pub fn transition_node_get_current (& self , id : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_get_current ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of inputs for the transition node with name `id`. You can add inputs by right-clicking on the transition node."] # [doc = ""] # [inline] pub fn transition_node_get_input_count (& self , id : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_get_input_count ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the cross fade time for the transition node with name `id`."] # [doc = ""] # [inline] pub fn transition_node_get_xfade_time (& self , id : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_get_xfade_time ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , id . into ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the input at `input_idx` on the transition node with name `id` is set to automatically advance to the next input upon completion."] # [doc = ""] # [inline] pub fn transition_node_has_input_auto_advance (& self , id : impl Into < GodotString > , input_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_has_input_auto_advance ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , input_idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The transition node with name `id` sets its current input at `input_idx`."] # [doc = ""] # [inline] pub fn transition_node_set_current (& self , id : impl Into < GodotString > , input_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_set_current ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , input_idx as _) ; } } # [doc = "The transition node with name `id` advances to its next input automatically when the input at `input_idx` completes."] # [doc = ""] # [inline] pub fn transition_node_set_input_auto_advance (& self , id : impl Into < GodotString > , input_idx : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_set_input_auto_advance ; let ret = crate :: icalls :: icallvar__str_i64_bool (method_bind , self . this . sys () . as_ptr () , id . into () , input_idx as _ , enable as _) ; } } # [doc = "Resizes the number of inputs available for the transition node with name `id`."] # [doc = ""] # [inline] pub fn transition_node_set_input_count (& self , id : impl Into < GodotString > , count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_set_input_count ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , id . into () , count as _) ; } } # [doc = "The transition node with name `id` sets its cross fade time to `time_sec`."] # [doc = ""] # [inline] pub fn transition_node_set_xfade_time (& self , id : impl Into < GodotString > , time_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AnimationTreePlayerMethodTable :: get (get_api ()) . transition_node_set_xfade_time ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , id . into () , time_sec as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AnimationTreePlayer { } unsafe impl GodotObject for AnimationTreePlayer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AnimationTreePlayer" } } impl QueueFree for AnimationTreePlayer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for AnimationTreePlayer { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AnimationTreePlayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for AnimationTreePlayer { } unsafe impl SubClass < crate :: generated :: Object > for AnimationTreePlayer { } impl Instanciable for AnimationTreePlayer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AnimationTreePlayer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AnimationTreePlayerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_node : * mut sys :: godot_method_bind , pub advance : * mut sys :: godot_method_bind , pub animation_node_get_animation : * mut sys :: godot_method_bind , pub animation_node_get_master_animation : * mut sys :: godot_method_bind , pub animation_node_get_position : * mut sys :: godot_method_bind , pub animation_node_set_animation : * mut sys :: godot_method_bind , pub animation_node_set_filter_path : * mut sys :: godot_method_bind , pub animation_node_set_master_animation : * mut sys :: godot_method_bind , pub are_nodes_connected : * mut sys :: godot_method_bind , pub blend2_node_get_amount : * mut sys :: godot_method_bind , pub blend2_node_set_amount : * mut sys :: godot_method_bind , pub blend2_node_set_filter_path : * mut sys :: godot_method_bind , pub blend3_node_get_amount : * mut sys :: godot_method_bind , pub blend3_node_set_amount : * mut sys :: godot_method_bind , pub blend4_node_get_amount : * mut sys :: godot_method_bind , pub blend4_node_set_amount : * mut sys :: godot_method_bind , pub connect_nodes : * mut sys :: godot_method_bind , pub disconnect_nodes : * mut sys :: godot_method_bind , pub get_animation_process_mode : * mut sys :: godot_method_bind , pub get_base_path : * mut sys :: godot_method_bind , pub get_master_player : * mut sys :: godot_method_bind , pub get_node_list : * mut sys :: godot_method_bind , pub is_active : * mut sys :: godot_method_bind , pub mix_node_get_amount : * mut sys :: godot_method_bind , pub mix_node_set_amount : * mut sys :: godot_method_bind , pub node_exists : * mut sys :: godot_method_bind , pub node_get_input_count : * mut sys :: godot_method_bind , pub node_get_input_source : * mut sys :: godot_method_bind , pub node_get_position : * mut sys :: godot_method_bind , pub node_get_type : * mut sys :: godot_method_bind , pub node_rename : * mut sys :: godot_method_bind , pub node_set_position : * mut sys :: godot_method_bind , pub oneshot_node_get_autorestart_delay : * mut sys :: godot_method_bind , pub oneshot_node_get_autorestart_random_delay : * mut sys :: godot_method_bind , pub oneshot_node_get_fadein_time : * mut sys :: godot_method_bind , pub oneshot_node_get_fadeout_time : * mut sys :: godot_method_bind , pub oneshot_node_has_autorestart : * mut sys :: godot_method_bind , pub oneshot_node_is_active : * mut sys :: godot_method_bind , pub oneshot_node_set_autorestart : * mut sys :: godot_method_bind , pub oneshot_node_set_autorestart_delay : * mut sys :: godot_method_bind , pub oneshot_node_set_autorestart_random_delay : * mut sys :: godot_method_bind , pub oneshot_node_set_fadein_time : * mut sys :: godot_method_bind , pub oneshot_node_set_fadeout_time : * mut sys :: godot_method_bind , pub oneshot_node_set_filter_path : * mut sys :: godot_method_bind , pub oneshot_node_start : * mut sys :: godot_method_bind , pub oneshot_node_stop : * mut sys :: godot_method_bind , pub recompute_caches : * mut sys :: godot_method_bind , pub remove_node : * mut sys :: godot_method_bind , pub reset : * mut sys :: godot_method_bind , pub set_active : * mut sys :: godot_method_bind , pub set_animation_process_mode : * mut sys :: godot_method_bind , pub set_base_path : * mut sys :: godot_method_bind , pub set_master_player : * mut sys :: godot_method_bind , pub timescale_node_get_scale : * mut sys :: godot_method_bind , pub timescale_node_set_scale : * mut sys :: godot_method_bind , pub timeseek_node_seek : * mut sys :: godot_method_bind , pub transition_node_delete_input : * mut sys :: godot_method_bind , pub transition_node_get_current : * mut sys :: godot_method_bind , pub transition_node_get_input_count : * mut sys :: godot_method_bind , pub transition_node_get_xfade_time : * mut sys :: godot_method_bind , pub transition_node_has_input_auto_advance : * mut sys :: godot_method_bind , pub transition_node_set_current : * mut sys :: godot_method_bind , pub transition_node_set_input_auto_advance : * mut sys :: godot_method_bind , pub transition_node_set_input_count : * mut sys :: godot_method_bind , pub transition_node_set_xfade_time : * mut sys :: godot_method_bind } impl AnimationTreePlayerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AnimationTreePlayerMethodTable = AnimationTreePlayerMethodTable { class_constructor : None , add_node : 0 as * mut sys :: godot_method_bind , advance : 0 as * mut sys :: godot_method_bind , animation_node_get_animation : 0 as * mut sys :: godot_method_bind , animation_node_get_master_animation : 0 as * mut sys :: godot_method_bind , animation_node_get_position : 0 as * mut sys :: godot_method_bind , animation_node_set_animation : 0 as * mut sys :: godot_method_bind , animation_node_set_filter_path : 0 as * mut sys :: godot_method_bind , animation_node_set_master_animation : 0 as * mut sys :: godot_method_bind , are_nodes_connected : 0 as * mut sys :: godot_method_bind , blend2_node_get_amount : 0 as * mut sys :: godot_method_bind , blend2_node_set_amount : 0 as * mut sys :: godot_method_bind , blend2_node_set_filter_path : 0 as * mut sys :: godot_method_bind , blend3_node_get_amount : 0 as * mut sys :: godot_method_bind , blend3_node_set_amount : 0 as * mut sys :: godot_method_bind , blend4_node_get_amount : 0 as * mut sys :: godot_method_bind , blend4_node_set_amount : 0 as * mut sys :: godot_method_bind , connect_nodes : 0 as * mut sys :: godot_method_bind , disconnect_nodes : 0 as * mut sys :: godot_method_bind , get_animation_process_mode : 0 as * mut sys :: godot_method_bind , get_base_path : 0 as * mut sys :: godot_method_bind , get_master_player : 0 as * mut sys :: godot_method_bind , get_node_list : 0 as * mut sys :: godot_method_bind , is_active : 0 as * mut sys :: godot_method_bind , mix_node_get_amount : 0 as * mut sys :: godot_method_bind , mix_node_set_amount : 0 as * mut sys :: godot_method_bind , node_exists : 0 as * mut sys :: godot_method_bind , node_get_input_count : 0 as * mut sys :: godot_method_bind , node_get_input_source : 0 as * mut sys :: godot_method_bind , node_get_position : 0 as * mut sys :: godot_method_bind , node_get_type : 0 as * mut sys :: godot_method_bind , node_rename : 0 as * mut sys :: godot_method_bind , node_set_position : 0 as * mut sys :: godot_method_bind , oneshot_node_get_autorestart_delay : 0 as * mut sys :: godot_method_bind , oneshot_node_get_autorestart_random_delay : 0 as * mut sys :: godot_method_bind , oneshot_node_get_fadein_time : 0 as * mut sys :: godot_method_bind , oneshot_node_get_fadeout_time : 0 as * mut sys :: godot_method_bind , oneshot_node_has_autorestart : 0 as * mut sys :: godot_method_bind , oneshot_node_is_active : 0 as * mut sys :: godot_method_bind , oneshot_node_set_autorestart : 0 as * mut sys :: godot_method_bind , oneshot_node_set_autorestart_delay : 0 as * mut sys :: godot_method_bind , oneshot_node_set_autorestart_random_delay : 0 as * mut sys :: godot_method_bind , oneshot_node_set_fadein_time : 0 as * mut sys :: godot_method_bind , oneshot_node_set_fadeout_time : 0 as * mut sys :: godot_method_bind , oneshot_node_set_filter_path : 0 as * mut sys :: godot_method_bind , oneshot_node_start : 0 as * mut sys :: godot_method_bind , oneshot_node_stop : 0 as * mut sys :: godot_method_bind , recompute_caches : 0 as * mut sys :: godot_method_bind , remove_node : 0 as * mut sys :: godot_method_bind , reset : 0 as * mut sys :: godot_method_bind , set_active : 0 as * mut sys :: godot_method_bind , set_animation_process_mode : 0 as * mut sys :: godot_method_bind , set_base_path : 0 as * mut sys :: godot_method_bind , set_master_player : 0 as * mut sys :: godot_method_bind , timescale_node_get_scale : 0 as * mut sys :: godot_method_bind , timescale_node_set_scale : 0 as * mut sys :: godot_method_bind , timeseek_node_seek : 0 as * mut sys :: godot_method_bind , transition_node_delete_input : 0 as * mut sys :: godot_method_bind , transition_node_get_current : 0 as * mut sys :: godot_method_bind , transition_node_get_input_count : 0 as * mut sys :: godot_method_bind , transition_node_get_xfade_time : 0 as * mut sys :: godot_method_bind , transition_node_has_input_auto_advance : 0 as * mut sys :: godot_method_bind , transition_node_set_current : 0 as * mut sys :: godot_method_bind , transition_node_set_input_auto_advance : 0 as * mut sys :: godot_method_bind , transition_node_set_input_count : 0 as * mut sys :: godot_method_bind , transition_node_set_xfade_time : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AnimationTreePlayerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AnimationTreePlayer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_node = (gd_api . godot_method_bind_get_method) (class_name , "add_node\0" . as_ptr () as * const c_char) ; table . advance = (gd_api . godot_method_bind_get_method) (class_name , "advance\0" . as_ptr () as * const c_char) ; table . animation_node_get_animation = (gd_api . godot_method_bind_get_method) (class_name , "animation_node_get_animation\0" . as_ptr () as * const c_char) ; table . animation_node_get_master_animation = (gd_api . godot_method_bind_get_method) (class_name , "animation_node_get_master_animation\0" . as_ptr () as * const c_char) ; table . animation_node_get_position = (gd_api . godot_method_bind_get_method) (class_name , "animation_node_get_position\0" . as_ptr () as * const c_char) ; table . animation_node_set_animation = (gd_api . godot_method_bind_get_method) (class_name , "animation_node_set_animation\0" . as_ptr () as * const c_char) ; table . animation_node_set_filter_path = (gd_api . godot_method_bind_get_method) (class_name , "animation_node_set_filter_path\0" . as_ptr () as * const c_char) ; table . animation_node_set_master_animation = (gd_api . godot_method_bind_get_method) (class_name , "animation_node_set_master_animation\0" . as_ptr () as * const c_char) ; table . are_nodes_connected = (gd_api . godot_method_bind_get_method) (class_name , "are_nodes_connected\0" . as_ptr () as * const c_char) ; table . blend2_node_get_amount = (gd_api . godot_method_bind_get_method) (class_name , "blend2_node_get_amount\0" . as_ptr () as * const c_char) ; table . blend2_node_set_amount = (gd_api . godot_method_bind_get_method) (class_name , "blend2_node_set_amount\0" . as_ptr () as * const c_char) ; table . blend2_node_set_filter_path = (gd_api . godot_method_bind_get_method) (class_name , "blend2_node_set_filter_path\0" . as_ptr () as * const c_char) ; table . blend3_node_get_amount = (gd_api . godot_method_bind_get_method) (class_name , "blend3_node_get_amount\0" . as_ptr () as * const c_char) ; table . blend3_node_set_amount = (gd_api . godot_method_bind_get_method) (class_name , "blend3_node_set_amount\0" . as_ptr () as * const c_char) ; table . blend4_node_get_amount = (gd_api . godot_method_bind_get_method) (class_name , "blend4_node_get_amount\0" . as_ptr () as * const c_char) ; table . blend4_node_set_amount = (gd_api . godot_method_bind_get_method) (class_name , "blend4_node_set_amount\0" . as_ptr () as * const c_char) ; table . connect_nodes = (gd_api . godot_method_bind_get_method) (class_name , "connect_nodes\0" . as_ptr () as * const c_char) ; table . disconnect_nodes = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_nodes\0" . as_ptr () as * const c_char) ; table . get_animation_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_process_mode\0" . as_ptr () as * const c_char) ; table . get_base_path = (gd_api . godot_method_bind_get_method) (class_name , "get_base_path\0" . as_ptr () as * const c_char) ; table . get_master_player = (gd_api . godot_method_bind_get_method) (class_name , "get_master_player\0" . as_ptr () as * const c_char) ; table . get_node_list = (gd_api . godot_method_bind_get_method) (class_name , "get_node_list\0" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\0" . as_ptr () as * const c_char) ; table . mix_node_get_amount = (gd_api . godot_method_bind_get_method) (class_name , "mix_node_get_amount\0" . as_ptr () as * const c_char) ; table . mix_node_set_amount = (gd_api . godot_method_bind_get_method) (class_name , "mix_node_set_amount\0" . as_ptr () as * const c_char) ; table . node_exists = (gd_api . godot_method_bind_get_method) (class_name , "node_exists\0" . as_ptr () as * const c_char) ; table . node_get_input_count = (gd_api . godot_method_bind_get_method) (class_name , "node_get_input_count\0" . as_ptr () as * const c_char) ; table . node_get_input_source = (gd_api . godot_method_bind_get_method) (class_name , "node_get_input_source\0" . as_ptr () as * const c_char) ; table . node_get_position = (gd_api . godot_method_bind_get_method) (class_name , "node_get_position\0" . as_ptr () as * const c_char) ; table . node_get_type = (gd_api . godot_method_bind_get_method) (class_name , "node_get_type\0" . as_ptr () as * const c_char) ; table . node_rename = (gd_api . godot_method_bind_get_method) (class_name , "node_rename\0" . as_ptr () as * const c_char) ; table . node_set_position = (gd_api . godot_method_bind_get_method) (class_name , "node_set_position\0" . as_ptr () as * const c_char) ; table . oneshot_node_get_autorestart_delay = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_get_autorestart_delay\0" . as_ptr () as * const c_char) ; table . oneshot_node_get_autorestart_random_delay = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_get_autorestart_random_delay\0" . as_ptr () as * const c_char) ; table . oneshot_node_get_fadein_time = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_get_fadein_time\0" . as_ptr () as * const c_char) ; table . oneshot_node_get_fadeout_time = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_get_fadeout_time\0" . as_ptr () as * const c_char) ; table . oneshot_node_has_autorestart = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_has_autorestart\0" . as_ptr () as * const c_char) ; table . oneshot_node_is_active = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_is_active\0" . as_ptr () as * const c_char) ; table . oneshot_node_set_autorestart = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_set_autorestart\0" . as_ptr () as * const c_char) ; table . oneshot_node_set_autorestart_delay = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_set_autorestart_delay\0" . as_ptr () as * const c_char) ; table . oneshot_node_set_autorestart_random_delay = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_set_autorestart_random_delay\0" . as_ptr () as * const c_char) ; table . oneshot_node_set_fadein_time = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_set_fadein_time\0" . as_ptr () as * const c_char) ; table . oneshot_node_set_fadeout_time = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_set_fadeout_time\0" . as_ptr () as * const c_char) ; table . oneshot_node_set_filter_path = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_set_filter_path\0" . as_ptr () as * const c_char) ; table . oneshot_node_start = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_start\0" . as_ptr () as * const c_char) ; table . oneshot_node_stop = (gd_api . godot_method_bind_get_method) (class_name , "oneshot_node_stop\0" . as_ptr () as * const c_char) ; table . recompute_caches = (gd_api . godot_method_bind_get_method) (class_name , "recompute_caches\0" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\0" . as_ptr () as * const c_char) ; table . reset = (gd_api . godot_method_bind_get_method) (class_name , "reset\0" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\0" . as_ptr () as * const c_char) ; table . set_animation_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_animation_process_mode\0" . as_ptr () as * const c_char) ; table . set_base_path = (gd_api . godot_method_bind_get_method) (class_name , "set_base_path\0" . as_ptr () as * const c_char) ; table . set_master_player = (gd_api . godot_method_bind_get_method) (class_name , "set_master_player\0" . as_ptr () as * const c_char) ; table . timescale_node_get_scale = (gd_api . godot_method_bind_get_method) (class_name , "timescale_node_get_scale\0" . as_ptr () as * const c_char) ; table . timescale_node_set_scale = (gd_api . godot_method_bind_get_method) (class_name , "timescale_node_set_scale\0" . as_ptr () as * const c_char) ; table . timeseek_node_seek = (gd_api . godot_method_bind_get_method) (class_name , "timeseek_node_seek\0" . as_ptr () as * const c_char) ; table . transition_node_delete_input = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_delete_input\0" . as_ptr () as * const c_char) ; table . transition_node_get_current = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_get_current\0" . as_ptr () as * const c_char) ; table . transition_node_get_input_count = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_get_input_count\0" . as_ptr () as * const c_char) ; table . transition_node_get_xfade_time = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_get_xfade_time\0" . as_ptr () as * const c_char) ; table . transition_node_has_input_auto_advance = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_has_input_auto_advance\0" . as_ptr () as * const c_char) ; table . transition_node_set_current = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_set_current\0" . as_ptr () as * const c_char) ; table . transition_node_set_input_auto_advance = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_set_input_auto_advance\0" . as_ptr () as * const c_char) ; table . transition_node_set_input_count = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_set_input_count\0" . as_ptr () as * const c_char) ; table . transition_node_set_xfade_time = (gd_api . godot_method_bind_get_method) (class_name , "transition_node_set_xfade_time\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::animation_tree_player::private::AnimationTreePlayer;
            
            pub mod area {
                # ! [doc = "This module contains types related to the API class [`Area`][super::Area]."] pub (crate) mod private { # [doc = "`core class Area` inherits `CollisionObject` (manually managed).\n\nThis class has related types in the [`area`][super::area] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_area.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Area` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Area>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nArea inherits methods from:\n - [CollisionObject](struct.CollisionObject.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Area { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Area ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SpaceOverride (pub i64) ; impl SpaceOverride { pub const DISABLED : SpaceOverride = SpaceOverride (0i64) ; pub const COMBINE : SpaceOverride = SpaceOverride (1i64) ; pub const COMBINE_REPLACE : SpaceOverride = SpaceOverride (2i64) ; pub const REPLACE : SpaceOverride = SpaceOverride (3i64) ; pub const REPLACE_COMBINE : SpaceOverride = SpaceOverride (4i64) ; } impl From < i64 > for SpaceOverride { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SpaceOverride > for i64 { # [inline] fn from (v : SpaceOverride) -> Self { v . 0 } } impl FromVariant for SpaceOverride { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Area { pub const SPACE_OVERRIDE_DISABLED : i64 = 0i64 ; pub const SPACE_OVERRIDE_COMBINE : i64 = 1i64 ; pub const SPACE_OVERRIDE_COMBINE_REPLACE : i64 = 2i64 ; pub const SPACE_OVERRIDE_REPLACE : i64 = 3i64 ; pub const SPACE_OVERRIDE_REPLACE_COMBINE : i64 = 4i64 ; } impl Area { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AreaMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.\nSee [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping."] # [doc = ""] # [inline] pub fn angular_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_angular_damp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The name of the area's audio bus."] # [doc = ""] # [inline] pub fn audio_bus (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_audio_bus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The area's gravity intensity (in meters per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction."] # [doc = ""] # [inline] pub fn gravity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_gravity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance."] # [doc = ""] # [inline] pub fn gravity_distance_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_gravity_distance_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The area's gravity vector (not normalized). If gravity is a point (see [`gravity_point`][Self::gravity_point]), this will be the point of attraction."] # [doc = ""] # [inline] pub fn gravity_vector (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_gravity_vector ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The rate at which objects stop moving in this area. Represents the linear velocity lost per second.\nSee [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping."] # [doc = ""] # [inline] pub fn linear_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_linear_damp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a list of intersecting [`Area`][Area]s. The overlapping area's [`CollisionObject.collision_layer`][CollisionObject::collision_layer] must be part of this area's [`CollisionObject.collision_mask`][CollisionObject::collision_mask] in order to be detected.\nFor performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead."] # [doc = ""] # [inline] pub fn get_overlapping_areas (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_overlapping_areas ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a list of intersecting [`PhysicsBody`][PhysicsBody]s. The overlapping body's [`CollisionObject.collision_layer`][CollisionObject::collision_layer] must be part of this area's [`CollisionObject.collision_mask`][CollisionObject::collision_mask] in order to be detected.\nFor performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead."] # [doc = ""] # [inline] pub fn get_overlapping_bodies (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_overlapping_bodies ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The area's priority. Higher priority areas are processed first."] # [doc = ""] # [inline] pub fn priority (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_priority ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The degree to which this area applies reverb to its associated audio. Ranges from `0` to `1` with `0.1` precision."] # [doc = ""] # [inline] pub fn reverb_amount (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_reverb_amount ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The reverb bus name to use for this area's associated audio."] # [doc = ""] # [inline] pub fn reverb_bus (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_reverb_bus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The degree to which this area's reverb is a uniform effect. Ranges from `0` to `1` with `0.1` precision."] # [doc = ""] # [inline] pub fn reverb_uniformity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_reverb_uniformity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Override mode for gravity and damping calculations within this area. See [`SpaceOverride`][SpaceOverride] for possible values."] # [doc = ""] # [inline] pub fn space_override_mode (& self) -> crate :: generated :: area :: SpaceOverride { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . get_space_override_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: area :: SpaceOverride > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, gravity is calculated from a point (set via [`gravity_vec`][Self::gravity_vec]). See also [`space_override`][Self::space_override]."] # [doc = ""] # [inline] pub fn is_gravity_a_point (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . is_gravity_a_point ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, other monitoring areas can detect this area."] # [doc = ""] # [inline] pub fn is_monitorable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . is_monitorable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the area detects bodies or areas entering and exiting it."] # [doc = ""] # [inline] pub fn is_monitoring (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . is_monitoring ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the area's audio bus overrides the default audio bus."] # [doc = ""] # [inline] pub fn is_overriding_audio_bus (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . is_overriding_audio_bus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the area applies reverb to its associated audio."] # [doc = ""] # [inline] pub fn is_using_reverb_bus (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . is_using_reverb_bus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the given area overlaps the Area.\n**Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead."] # [doc = ""] # [inline] pub fn overlaps_area (& self , area : impl AsArg < crate :: generated :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . overlaps_area ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , area . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the given physics body overlaps the Area.\n**Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.\nThe `body` argument can either be a [`PhysicsBody`][PhysicsBody] or a [`GridMap`][GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body)."] # [doc = ""] # [inline] pub fn overlaps_body (& self , body : impl AsArg < crate :: generated :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . overlaps_body ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.\nSee [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping."] # [doc = ""] # [inline] pub fn set_angular_damp (& self , angular_damp : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_angular_damp ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , angular_damp as _) ; } } # [doc = "The name of the area's audio bus."] # [doc = ""] # [inline] pub fn set_audio_bus (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_audio_bus ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "If `true`, the area's audio bus overrides the default audio bus."] # [doc = ""] # [inline] pub fn set_audio_bus_override (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_audio_bus_override ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The area's gravity intensity (in meters per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction."] # [doc = ""] # [inline] pub fn set_gravity (& self , gravity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_gravity ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , gravity as _) ; } } # [doc = "The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance."] # [doc = ""] # [inline] pub fn set_gravity_distance_scale (& self , distance_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_gravity_distance_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , distance_scale as _) ; } } # [doc = "If `true`, gravity is calculated from a point (set via [`gravity_vec`][Self::gravity_vec]). See also [`space_override`][Self::space_override]."] # [doc = ""] # [inline] pub fn set_gravity_is_point (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_gravity_is_point ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The area's gravity vector (not normalized). If gravity is a point (see [`gravity_point`][Self::gravity_point]), this will be the point of attraction."] # [doc = ""] # [inline] pub fn set_gravity_vector (& self , vector : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_gravity_vector ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , vector) ; } } # [doc = "The rate at which objects stop moving in this area. Represents the linear velocity lost per second.\nSee [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping."] # [doc = ""] # [inline] pub fn set_linear_damp (& self , linear_damp : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_linear_damp ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , linear_damp as _) ; } } # [doc = "If `true`, other monitoring areas can detect this area."] # [doc = ""] # [inline] pub fn set_monitorable (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_monitorable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the area detects bodies or areas entering and exiting it."] # [doc = ""] # [inline] pub fn set_monitoring (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_monitoring ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The area's priority. Higher priority areas are processed first."] # [doc = ""] # [inline] pub fn set_priority (& self , priority : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_priority ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , priority as _) ; } } # [doc = "The degree to which this area applies reverb to its associated audio. Ranges from `0` to `1` with `0.1` precision."] # [doc = ""] # [inline] pub fn set_reverb_amount (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_reverb_amount ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "The reverb bus name to use for this area's associated audio."] # [doc = ""] # [inline] pub fn set_reverb_bus (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_reverb_bus ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "The degree to which this area's reverb is a uniform effect. Ranges from `0` to `1` with `0.1` precision."] # [doc = ""] # [inline] pub fn set_reverb_uniformity (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_reverb_uniformity ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Override mode for gravity and damping calculations within this area. See [`SpaceOverride`][SpaceOverride] for possible values."] # [doc = ""] # [inline] pub fn set_space_override_mode (& self , enable : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_space_override_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the area applies reverb to its associated audio."] # [doc = ""] # [inline] pub fn set_use_reverb_bus (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AreaMethodTable :: get (get_api ()) . set_use_reverb_bus ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Area { } unsafe impl GodotObject for Area { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Area" } } impl QueueFree for Area { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Area { type Target = crate :: generated :: CollisionObject ; # [inline] fn deref (& self) -> & crate :: generated :: CollisionObject { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Area { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CollisionObject { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CollisionObject > for Area { } unsafe impl SubClass < crate :: generated :: Spatial > for Area { } unsafe impl SubClass < crate :: generated :: Node > for Area { } unsafe impl SubClass < crate :: generated :: Object > for Area { } impl Instanciable for Area { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Area :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AreaMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_angular_damp : * mut sys :: godot_method_bind , pub get_audio_bus : * mut sys :: godot_method_bind , pub get_gravity : * mut sys :: godot_method_bind , pub get_gravity_distance_scale : * mut sys :: godot_method_bind , pub get_gravity_vector : * mut sys :: godot_method_bind , pub get_linear_damp : * mut sys :: godot_method_bind , pub get_overlapping_areas : * mut sys :: godot_method_bind , pub get_overlapping_bodies : * mut sys :: godot_method_bind , pub get_priority : * mut sys :: godot_method_bind , pub get_reverb_amount : * mut sys :: godot_method_bind , pub get_reverb_bus : * mut sys :: godot_method_bind , pub get_reverb_uniformity : * mut sys :: godot_method_bind , pub get_space_override_mode : * mut sys :: godot_method_bind , pub is_gravity_a_point : * mut sys :: godot_method_bind , pub is_monitorable : * mut sys :: godot_method_bind , pub is_monitoring : * mut sys :: godot_method_bind , pub is_overriding_audio_bus : * mut sys :: godot_method_bind , pub is_using_reverb_bus : * mut sys :: godot_method_bind , pub overlaps_area : * mut sys :: godot_method_bind , pub overlaps_body : * mut sys :: godot_method_bind , pub set_angular_damp : * mut sys :: godot_method_bind , pub set_audio_bus : * mut sys :: godot_method_bind , pub set_audio_bus_override : * mut sys :: godot_method_bind , pub set_gravity : * mut sys :: godot_method_bind , pub set_gravity_distance_scale : * mut sys :: godot_method_bind , pub set_gravity_is_point : * mut sys :: godot_method_bind , pub set_gravity_vector : * mut sys :: godot_method_bind , pub set_linear_damp : * mut sys :: godot_method_bind , pub set_monitorable : * mut sys :: godot_method_bind , pub set_monitoring : * mut sys :: godot_method_bind , pub set_priority : * mut sys :: godot_method_bind , pub set_reverb_amount : * mut sys :: godot_method_bind , pub set_reverb_bus : * mut sys :: godot_method_bind , pub set_reverb_uniformity : * mut sys :: godot_method_bind , pub set_space_override_mode : * mut sys :: godot_method_bind , pub set_use_reverb_bus : * mut sys :: godot_method_bind } impl AreaMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AreaMethodTable = AreaMethodTable { class_constructor : None , get_angular_damp : 0 as * mut sys :: godot_method_bind , get_audio_bus : 0 as * mut sys :: godot_method_bind , get_gravity : 0 as * mut sys :: godot_method_bind , get_gravity_distance_scale : 0 as * mut sys :: godot_method_bind , get_gravity_vector : 0 as * mut sys :: godot_method_bind , get_linear_damp : 0 as * mut sys :: godot_method_bind , get_overlapping_areas : 0 as * mut sys :: godot_method_bind , get_overlapping_bodies : 0 as * mut sys :: godot_method_bind , get_priority : 0 as * mut sys :: godot_method_bind , get_reverb_amount : 0 as * mut sys :: godot_method_bind , get_reverb_bus : 0 as * mut sys :: godot_method_bind , get_reverb_uniformity : 0 as * mut sys :: godot_method_bind , get_space_override_mode : 0 as * mut sys :: godot_method_bind , is_gravity_a_point : 0 as * mut sys :: godot_method_bind , is_monitorable : 0 as * mut sys :: godot_method_bind , is_monitoring : 0 as * mut sys :: godot_method_bind , is_overriding_audio_bus : 0 as * mut sys :: godot_method_bind , is_using_reverb_bus : 0 as * mut sys :: godot_method_bind , overlaps_area : 0 as * mut sys :: godot_method_bind , overlaps_body : 0 as * mut sys :: godot_method_bind , set_angular_damp : 0 as * mut sys :: godot_method_bind , set_audio_bus : 0 as * mut sys :: godot_method_bind , set_audio_bus_override : 0 as * mut sys :: godot_method_bind , set_gravity : 0 as * mut sys :: godot_method_bind , set_gravity_distance_scale : 0 as * mut sys :: godot_method_bind , set_gravity_is_point : 0 as * mut sys :: godot_method_bind , set_gravity_vector : 0 as * mut sys :: godot_method_bind , set_linear_damp : 0 as * mut sys :: godot_method_bind , set_monitorable : 0 as * mut sys :: godot_method_bind , set_monitoring : 0 as * mut sys :: godot_method_bind , set_priority : 0 as * mut sys :: godot_method_bind , set_reverb_amount : 0 as * mut sys :: godot_method_bind , set_reverb_bus : 0 as * mut sys :: godot_method_bind , set_reverb_uniformity : 0 as * mut sys :: godot_method_bind , set_space_override_mode : 0 as * mut sys :: godot_method_bind , set_use_reverb_bus : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AreaMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Area\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_damp\0" . as_ptr () as * const c_char) ; table . get_audio_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_audio_bus\0" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\0" . as_ptr () as * const c_char) ; table . get_gravity_distance_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_distance_scale\0" . as_ptr () as * const c_char) ; table . get_gravity_vector = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_vector\0" . as_ptr () as * const c_char) ; table . get_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_damp\0" . as_ptr () as * const c_char) ; table . get_overlapping_areas = (gd_api . godot_method_bind_get_method) (class_name , "get_overlapping_areas\0" . as_ptr () as * const c_char) ; table . get_overlapping_bodies = (gd_api . godot_method_bind_get_method) (class_name , "get_overlapping_bodies\0" . as_ptr () as * const c_char) ; table . get_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_priority\0" . as_ptr () as * const c_char) ; table . get_reverb_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_reverb_amount\0" . as_ptr () as * const c_char) ; table . get_reverb_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_reverb_bus\0" . as_ptr () as * const c_char) ; table . get_reverb_uniformity = (gd_api . godot_method_bind_get_method) (class_name , "get_reverb_uniformity\0" . as_ptr () as * const c_char) ; table . get_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_space_override_mode\0" . as_ptr () as * const c_char) ; table . is_gravity_a_point = (gd_api . godot_method_bind_get_method) (class_name , "is_gravity_a_point\0" . as_ptr () as * const c_char) ; table . is_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "is_monitorable\0" . as_ptr () as * const c_char) ; table . is_monitoring = (gd_api . godot_method_bind_get_method) (class_name , "is_monitoring\0" . as_ptr () as * const c_char) ; table . is_overriding_audio_bus = (gd_api . godot_method_bind_get_method) (class_name , "is_overriding_audio_bus\0" . as_ptr () as * const c_char) ; table . is_using_reverb_bus = (gd_api . godot_method_bind_get_method) (class_name , "is_using_reverb_bus\0" . as_ptr () as * const c_char) ; table . overlaps_area = (gd_api . godot_method_bind_get_method) (class_name , "overlaps_area\0" . as_ptr () as * const c_char) ; table . overlaps_body = (gd_api . godot_method_bind_get_method) (class_name , "overlaps_body\0" . as_ptr () as * const c_char) ; table . set_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_damp\0" . as_ptr () as * const c_char) ; table . set_audio_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_bus\0" . as_ptr () as * const c_char) ; table . set_audio_bus_override = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_bus_override\0" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\0" . as_ptr () as * const c_char) ; table . set_gravity_distance_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_distance_scale\0" . as_ptr () as * const c_char) ; table . set_gravity_is_point = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_is_point\0" . as_ptr () as * const c_char) ; table . set_gravity_vector = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_vector\0" . as_ptr () as * const c_char) ; table . set_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_damp\0" . as_ptr () as * const c_char) ; table . set_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "set_monitorable\0" . as_ptr () as * const c_char) ; table . set_monitoring = (gd_api . godot_method_bind_get_method) (class_name , "set_monitoring\0" . as_ptr () as * const c_char) ; table . set_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_priority\0" . as_ptr () as * const c_char) ; table . set_reverb_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_reverb_amount\0" . as_ptr () as * const c_char) ; table . set_reverb_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_reverb_bus\0" . as_ptr () as * const c_char) ; table . set_reverb_uniformity = (gd_api . godot_method_bind_get_method) (class_name , "set_reverb_uniformity\0" . as_ptr () as * const c_char) ; table . set_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_space_override_mode\0" . as_ptr () as * const c_char) ; table . set_use_reverb_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_use_reverb_bus\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::area::private::Area;
            
            pub mod area_2d {
                # ! [doc = "This module contains types related to the API class [`Area2D`][super::Area2D]."] pub (crate) mod private { # [doc = "`core class Area2D` inherits `CollisionObject2D` (manually managed).\n\nThis class has related types in the [`area_2d`][super::area_2d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_area2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Area2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Area2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nArea2D inherits methods from:\n - [CollisionObject2D](struct.CollisionObject2D.html)\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Area2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Area2D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SpaceOverride (pub i64) ; impl SpaceOverride { pub const DISABLED : SpaceOverride = SpaceOverride (0i64) ; pub const COMBINE : SpaceOverride = SpaceOverride (1i64) ; pub const COMBINE_REPLACE : SpaceOverride = SpaceOverride (2i64) ; pub const REPLACE : SpaceOverride = SpaceOverride (3i64) ; pub const REPLACE_COMBINE : SpaceOverride = SpaceOverride (4i64) ; } impl From < i64 > for SpaceOverride { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SpaceOverride > for i64 { # [inline] fn from (v : SpaceOverride) -> Self { v . 0 } } impl FromVariant for SpaceOverride { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Area2D { pub const SPACE_OVERRIDE_DISABLED : i64 = 0i64 ; pub const SPACE_OVERRIDE_COMBINE : i64 = 1i64 ; pub const SPACE_OVERRIDE_COMBINE_REPLACE : i64 = 2i64 ; pub const SPACE_OVERRIDE_REPLACE : i64 = 3i64 ; pub const SPACE_OVERRIDE_REPLACE_COMBINE : i64 = 4i64 ; } impl Area2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Area2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.\nSee [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping."] # [doc = ""] # [inline] pub fn angular_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_angular_damp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The name of the area's audio bus."] # [doc = ""] # [inline] pub fn audio_bus_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_audio_bus_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The area's gravity intensity (in pixels per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction."] # [doc = ""] # [inline] pub fn gravity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_gravity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance."] # [doc = ""] # [inline] pub fn gravity_distance_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_gravity_distance_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The area's gravity vector (not normalized). If gravity is a point (see [`gravity_point`][Self::gravity_point]), this will be the point of attraction."] # [doc = ""] # [inline] pub fn gravity_vector (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_gravity_vector ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The rate at which objects stop moving in this area. Represents the linear velocity lost per second.\nSee [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping."] # [doc = ""] # [inline] pub fn linear_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_linear_damp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a list of intersecting [`Area2D`][Area2D]s. The overlapping area's [`CollisionObject2D.collision_layer`][CollisionObject2D::collision_layer] must be part of this area's [`CollisionObject2D.collision_mask`][CollisionObject2D::collision_mask] in order to be detected.\nFor performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead."] # [doc = ""] # [inline] pub fn get_overlapping_areas (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_overlapping_areas ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a list of intersecting [`PhysicsBody2D`][PhysicsBody2D]s. The overlapping body's [`CollisionObject2D.collision_layer`][CollisionObject2D::collision_layer] must be part of this area's [`CollisionObject2D.collision_mask`][CollisionObject2D::collision_mask] in order to be detected.\nFor performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead."] # [doc = ""] # [inline] pub fn get_overlapping_bodies (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_overlapping_bodies ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The area's priority. Higher priority areas are processed first."] # [doc = ""] # [inline] pub fn priority (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_priority ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Override mode for gravity and damping calculations within this area. See [`SpaceOverride`][SpaceOverride] for possible values."] # [doc = ""] # [inline] pub fn space_override_mode (& self) -> crate :: generated :: area_2d :: SpaceOverride { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . get_space_override_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: area_2d :: SpaceOverride > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, gravity is calculated from a point (set via [`gravity_vec`][Self::gravity_vec]). See also [`space_override`][Self::space_override]."] # [doc = ""] # [inline] pub fn is_gravity_a_point (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . is_gravity_a_point ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, other monitoring areas can detect this area."] # [doc = ""] # [inline] pub fn is_monitorable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . is_monitorable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the area detects bodies or areas entering and exiting it."] # [doc = ""] # [inline] pub fn is_monitoring (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . is_monitoring ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the area's audio bus overrides the default audio bus."] # [doc = ""] # [inline] pub fn is_overriding_audio_bus (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . is_overriding_audio_bus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the given area overlaps the Area2D.\n**Note:** The result of this test is not immediate after moving objects. For performance, the list of overlaps is updated once per frame and before the physics step. Consider using signals instead."] # [doc = ""] # [inline] pub fn overlaps_area (& self , area : impl AsArg < crate :: generated :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . overlaps_area ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , area . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the given physics body overlaps the Area2D.\n**Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead.\nThe `body` argument can either be a [`PhysicsBody2D`][PhysicsBody2D] or a [`TileMap`][TileMap] instance (while TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body)."] # [doc = ""] # [inline] pub fn overlaps_body (& self , body : impl AsArg < crate :: generated :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . overlaps_body ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.\nSee [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping."] # [doc = ""] # [inline] pub fn set_angular_damp (& self , angular_damp : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_angular_damp ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , angular_damp as _) ; } } # [doc = "The name of the area's audio bus."] # [doc = ""] # [inline] pub fn set_audio_bus_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_audio_bus_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "If `true`, the area's audio bus overrides the default audio bus."] # [doc = ""] # [inline] pub fn set_audio_bus_override (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_audio_bus_override ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The area's gravity intensity (in pixels per second squared). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction."] # [doc = ""] # [inline] pub fn set_gravity (& self , gravity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_gravity ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , gravity as _) ; } } # [doc = "The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance."] # [doc = ""] # [inline] pub fn set_gravity_distance_scale (& self , distance_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_gravity_distance_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , distance_scale as _) ; } } # [doc = "If `true`, gravity is calculated from a point (set via [`gravity_vec`][Self::gravity_vec]). See also [`space_override`][Self::space_override]."] # [doc = ""] # [inline] pub fn set_gravity_is_point (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_gravity_is_point ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The area's gravity vector (not normalized). If gravity is a point (see [`gravity_point`][Self::gravity_point]), this will be the point of attraction."] # [doc = ""] # [inline] pub fn set_gravity_vector (& self , vector : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_gravity_vector ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , vector) ; } } # [doc = "The rate at which objects stop moving in this area. Represents the linear velocity lost per second.\nSee [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping."] # [doc = ""] # [inline] pub fn set_linear_damp (& self , linear_damp : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_linear_damp ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , linear_damp as _) ; } } # [doc = "If `true`, other monitoring areas can detect this area."] # [doc = ""] # [inline] pub fn set_monitorable (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_monitorable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the area detects bodies or areas entering and exiting it."] # [doc = ""] # [inline] pub fn set_monitoring (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_monitoring ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The area's priority. Higher priority areas are processed first."] # [doc = ""] # [inline] pub fn set_priority (& self , priority : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_priority ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , priority as _) ; } } # [doc = "Override mode for gravity and damping calculations within this area. See [`SpaceOverride`][SpaceOverride] for possible values."] # [doc = ""] # [inline] pub fn set_space_override_mode (& self , space_override_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Area2DMethodTable :: get (get_api ()) . set_space_override_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , space_override_mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Area2D { } unsafe impl GodotObject for Area2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Area2D" } } impl QueueFree for Area2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Area2D { type Target = crate :: generated :: CollisionObject2D ; # [inline] fn deref (& self) -> & crate :: generated :: CollisionObject2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Area2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CollisionObject2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CollisionObject2D > for Area2D { } unsafe impl SubClass < crate :: generated :: Node2D > for Area2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Area2D { } unsafe impl SubClass < crate :: generated :: Node > for Area2D { } unsafe impl SubClass < crate :: generated :: Object > for Area2D { } impl Instanciable for Area2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Area2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Area2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_angular_damp : * mut sys :: godot_method_bind , pub get_audio_bus_name : * mut sys :: godot_method_bind , pub get_gravity : * mut sys :: godot_method_bind , pub get_gravity_distance_scale : * mut sys :: godot_method_bind , pub get_gravity_vector : * mut sys :: godot_method_bind , pub get_linear_damp : * mut sys :: godot_method_bind , pub get_overlapping_areas : * mut sys :: godot_method_bind , pub get_overlapping_bodies : * mut sys :: godot_method_bind , pub get_priority : * mut sys :: godot_method_bind , pub get_space_override_mode : * mut sys :: godot_method_bind , pub is_gravity_a_point : * mut sys :: godot_method_bind , pub is_monitorable : * mut sys :: godot_method_bind , pub is_monitoring : * mut sys :: godot_method_bind , pub is_overriding_audio_bus : * mut sys :: godot_method_bind , pub overlaps_area : * mut sys :: godot_method_bind , pub overlaps_body : * mut sys :: godot_method_bind , pub set_angular_damp : * mut sys :: godot_method_bind , pub set_audio_bus_name : * mut sys :: godot_method_bind , pub set_audio_bus_override : * mut sys :: godot_method_bind , pub set_gravity : * mut sys :: godot_method_bind , pub set_gravity_distance_scale : * mut sys :: godot_method_bind , pub set_gravity_is_point : * mut sys :: godot_method_bind , pub set_gravity_vector : * mut sys :: godot_method_bind , pub set_linear_damp : * mut sys :: godot_method_bind , pub set_monitorable : * mut sys :: godot_method_bind , pub set_monitoring : * mut sys :: godot_method_bind , pub set_priority : * mut sys :: godot_method_bind , pub set_space_override_mode : * mut sys :: godot_method_bind } impl Area2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Area2DMethodTable = Area2DMethodTable { class_constructor : None , get_angular_damp : 0 as * mut sys :: godot_method_bind , get_audio_bus_name : 0 as * mut sys :: godot_method_bind , get_gravity : 0 as * mut sys :: godot_method_bind , get_gravity_distance_scale : 0 as * mut sys :: godot_method_bind , get_gravity_vector : 0 as * mut sys :: godot_method_bind , get_linear_damp : 0 as * mut sys :: godot_method_bind , get_overlapping_areas : 0 as * mut sys :: godot_method_bind , get_overlapping_bodies : 0 as * mut sys :: godot_method_bind , get_priority : 0 as * mut sys :: godot_method_bind , get_space_override_mode : 0 as * mut sys :: godot_method_bind , is_gravity_a_point : 0 as * mut sys :: godot_method_bind , is_monitorable : 0 as * mut sys :: godot_method_bind , is_monitoring : 0 as * mut sys :: godot_method_bind , is_overriding_audio_bus : 0 as * mut sys :: godot_method_bind , overlaps_area : 0 as * mut sys :: godot_method_bind , overlaps_body : 0 as * mut sys :: godot_method_bind , set_angular_damp : 0 as * mut sys :: godot_method_bind , set_audio_bus_name : 0 as * mut sys :: godot_method_bind , set_audio_bus_override : 0 as * mut sys :: godot_method_bind , set_gravity : 0 as * mut sys :: godot_method_bind , set_gravity_distance_scale : 0 as * mut sys :: godot_method_bind , set_gravity_is_point : 0 as * mut sys :: godot_method_bind , set_gravity_vector : 0 as * mut sys :: godot_method_bind , set_linear_damp : 0 as * mut sys :: godot_method_bind , set_monitorable : 0 as * mut sys :: godot_method_bind , set_monitoring : 0 as * mut sys :: godot_method_bind , set_priority : 0 as * mut sys :: godot_method_bind , set_space_override_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Area2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Area2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_damp\0" . as_ptr () as * const c_char) ; table . get_audio_bus_name = (gd_api . godot_method_bind_get_method) (class_name , "get_audio_bus_name\0" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\0" . as_ptr () as * const c_char) ; table . get_gravity_distance_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_distance_scale\0" . as_ptr () as * const c_char) ; table . get_gravity_vector = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_vector\0" . as_ptr () as * const c_char) ; table . get_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_damp\0" . as_ptr () as * const c_char) ; table . get_overlapping_areas = (gd_api . godot_method_bind_get_method) (class_name , "get_overlapping_areas\0" . as_ptr () as * const c_char) ; table . get_overlapping_bodies = (gd_api . godot_method_bind_get_method) (class_name , "get_overlapping_bodies\0" . as_ptr () as * const c_char) ; table . get_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_priority\0" . as_ptr () as * const c_char) ; table . get_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_space_override_mode\0" . as_ptr () as * const c_char) ; table . is_gravity_a_point = (gd_api . godot_method_bind_get_method) (class_name , "is_gravity_a_point\0" . as_ptr () as * const c_char) ; table . is_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "is_monitorable\0" . as_ptr () as * const c_char) ; table . is_monitoring = (gd_api . godot_method_bind_get_method) (class_name , "is_monitoring\0" . as_ptr () as * const c_char) ; table . is_overriding_audio_bus = (gd_api . godot_method_bind_get_method) (class_name , "is_overriding_audio_bus\0" . as_ptr () as * const c_char) ; table . overlaps_area = (gd_api . godot_method_bind_get_method) (class_name , "overlaps_area\0" . as_ptr () as * const c_char) ; table . overlaps_body = (gd_api . godot_method_bind_get_method) (class_name , "overlaps_body\0" . as_ptr () as * const c_char) ; table . set_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_damp\0" . as_ptr () as * const c_char) ; table . set_audio_bus_name = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_bus_name\0" . as_ptr () as * const c_char) ; table . set_audio_bus_override = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_bus_override\0" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\0" . as_ptr () as * const c_char) ; table . set_gravity_distance_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_distance_scale\0" . as_ptr () as * const c_char) ; table . set_gravity_is_point = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_is_point\0" . as_ptr () as * const c_char) ; table . set_gravity_vector = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_vector\0" . as_ptr () as * const c_char) ; table . set_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_damp\0" . as_ptr () as * const c_char) ; table . set_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "set_monitorable\0" . as_ptr () as * const c_char) ; table . set_monitoring = (gd_api . godot_method_bind_get_method) (class_name , "set_monitoring\0" . as_ptr () as * const c_char) ; table . set_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_priority\0" . as_ptr () as * const c_char) ; table . set_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_space_override_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::area_2d::private::Area2D;
            
            pub mod array_mesh {
                # ! [doc = "This module contains types related to the API class [`ArrayMesh`][super::ArrayMesh]."] pub (crate) mod private { # [doc = "`core class ArrayMesh` inherits `Mesh` (reference-counted).\n\nThis class has related types in the [`array_mesh`][super::array_mesh] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_arraymesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nArrayMesh inherits methods from:\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ArrayMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ArrayMesh ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ArrayFormat (pub i64) ; impl ArrayFormat { pub const VERTEX : ArrayFormat = ArrayFormat (1i64) ; pub const NORMAL : ArrayFormat = ArrayFormat (2i64) ; pub const TANGENT : ArrayFormat = ArrayFormat (4i64) ; pub const COLOR : ArrayFormat = ArrayFormat (8i64) ; pub const TEX_UV : ArrayFormat = ArrayFormat (16i64) ; pub const TEX_UV2 : ArrayFormat = ArrayFormat (32i64) ; pub const BONES : ArrayFormat = ArrayFormat (64i64) ; pub const WEIGHTS : ArrayFormat = ArrayFormat (128i64) ; pub const INDEX : ArrayFormat = ArrayFormat (256i64) ; } impl From < i64 > for ArrayFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ArrayFormat > for i64 { # [inline] fn from (v : ArrayFormat) -> Self { v . 0 } } impl FromVariant for ArrayFormat { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ArrayType (pub i64) ; impl ArrayType { pub const VERTEX : ArrayType = ArrayType (0i64) ; pub const NORMAL : ArrayType = ArrayType (1i64) ; pub const TANGENT : ArrayType = ArrayType (2i64) ; pub const COLOR : ArrayType = ArrayType (3i64) ; pub const TEX_UV : ArrayType = ArrayType (4i64) ; pub const TEX_UV2 : ArrayType = ArrayType (5i64) ; pub const BONES : ArrayType = ArrayType (6i64) ; pub const WEIGHTS : ArrayType = ArrayType (7i64) ; pub const INDEX : ArrayType = ArrayType (8i64) ; pub const MAX : ArrayType = ArrayType (9i64) ; } impl From < i64 > for ArrayType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ArrayType > for i64 { # [inline] fn from (v : ArrayType) -> Self { v . 0 } } impl FromVariant for ArrayType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ArrayMesh { pub const NO_INDEX_ARRAY : i64 = - 1i64 ; pub const ARRAY_VERTEX : i64 = 0i64 ; pub const ARRAY_FORMAT_VERTEX : i64 = 1i64 ; pub const ARRAY_NORMAL : i64 = 1i64 ; pub const ARRAY_FORMAT_NORMAL : i64 = 2i64 ; pub const ARRAY_TANGENT : i64 = 2i64 ; pub const ARRAY_COLOR : i64 = 3i64 ; pub const ARRAY_FORMAT_TANGENT : i64 = 4i64 ; pub const ARRAY_TEX_UV : i64 = 4i64 ; pub const ARRAY_WEIGHTS_SIZE : i64 = 4i64 ; pub const ARRAY_TEX_UV2 : i64 = 5i64 ; pub const ARRAY_BONES : i64 = 6i64 ; pub const ARRAY_WEIGHTS : i64 = 7i64 ; pub const ARRAY_FORMAT_COLOR : i64 = 8i64 ; pub const ARRAY_INDEX : i64 = 8i64 ; pub const ARRAY_MAX : i64 = 9i64 ; pub const ARRAY_FORMAT_TEX_UV : i64 = 16i64 ; pub const ARRAY_FORMAT_TEX_UV2 : i64 = 32i64 ; pub const ARRAY_FORMAT_BONES : i64 = 64i64 ; pub const ARRAY_FORMAT_WEIGHTS : i64 = 128i64 ; pub const ARRAY_FORMAT_INDEX : i64 = 256i64 ; } impl ArrayMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ArrayMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds name for a blend shape that will be added with [`add_surface_from_arrays`][Self::add_surface_from_arrays]. Must be called before surface is added."] # [doc = ""] # [inline] pub fn add_blend_shape (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . add_blend_shape ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Creates a new surface.\nSurfaces are created to be rendered using a `primitive`, which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [`Mesh.get_surface_count`][Mesh::get_surface_count] will become the `surf_idx` for this new surface.\nThe `arrays` argument is an array of arrays. See [`ArrayType`][ArrayType] for the values used in this array. For example, `arrays[`0`][0]` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into \"index mode\" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [`ARRAY_INDEX`][Self::ARRAY_INDEX] if it is used.\n`compress_flags` is a bitfield made of [enum Mesh.ArrayFormat] values. It defaults to [`Mesh.ARRAY_COMPRESS_DEFAULT`][Mesh::ARRAY_COMPRESS_DEFAULT].\n**Note:** The default `compress_flags` enable [`Mesh.ARRAY_COMPRESS_COLOR`][Mesh::ARRAY_COMPRESS_COLOR], which makes vertex colors stored as 8-bit unsigned integers. This will clamp overbright vertex colors to `Color(1, 1, 1, 1)` and reduce their precision. To store HDR vertex colors, remove the vertex color compression flag by passing `Mesh.ARRAY_COMPRESS_DEFAULT ^ Mesh.ARRAY_COMPRESS_COLOR` as the value of `compress_flags`.\n# Default Arguments\n* `blend_shapes` - `[  ]`\n* `compress_flags` - `2194432`"] # [doc = ""] # [inline] pub fn add_surface_from_arrays (& self , primitive : i64 , arrays : VariantArray , blend_shapes : VariantArray , compress_flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . add_surface_from_arrays ; let ret = crate :: icalls :: icallvar__i64_arr_arr_i64 (method_bind , self . this . sys () . as_ptr () , primitive as _ , arrays , blend_shapes , compress_flags as _) ; } } # [doc = "Removes all blend shapes from this [`ArrayMesh`][ArrayMesh]."] # [doc = ""] # [inline] pub fn clear_blend_shapes (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . clear_blend_shapes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes all surfaces from this [`ArrayMesh`][ArrayMesh]."] # [doc = ""] # [inline] pub fn clear_surfaces (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . clear_surfaces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the number of blend shapes that the [`ArrayMesh`][ArrayMesh] holds."] # [doc = ""] # [inline] pub fn get_blend_shape_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . get_blend_shape_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the blend shape mode to one of [enum Mesh.BlendShapeMode]."] # [doc = ""] # [inline] pub fn blend_shape_mode (& self) -> crate :: generated :: mesh :: BlendShapeMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . get_blend_shape_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: mesh :: BlendShapeMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the name of the blend shape at this index."] # [doc = ""] # [inline] pub fn get_blend_shape_name (& self , index : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . get_blend_shape_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Overrides the [`AABB`][Aabb] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices."] # [doc = ""] # [inline] pub fn custom_aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . get_custom_aabb ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Will perform a UV unwrap on the [`ArrayMesh`][ArrayMesh] to prepare the mesh for lightmapping."] # [doc = ""] # [inline] pub fn lightmap_unwrap (& self , transform : Transform , texel_size : f64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . lightmap_unwrap ; let ret = crate :: icalls :: icallvar__trans_f64 (method_bind , self . this . sys () . as_ptr () , transform , texel_size as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Will regenerate normal maps for the [`ArrayMesh`][ArrayMesh]."] # [doc = ""] # [inline] pub fn regen_normalmaps (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . regen_normalmaps ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets the blend shape mode to one of [enum Mesh.BlendShapeMode]."] # [doc = ""] # [inline] pub fn set_blend_shape_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . set_blend_shape_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_blend_shape_name (& self , index : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . set_blend_shape_name ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , index as _ , name . into ()) ; } } # [doc = "Overrides the [`AABB`][Aabb] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices."] # [doc = ""] # [inline] pub fn set_custom_aabb (& self , aabb : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . set_custom_aabb ; let ret = crate :: icalls :: icallvar__aabb (method_bind , self . this . sys () . as_ptr () , aabb) ; } } # [doc = "Returns the index of the first surface with this name held within this [`ArrayMesh`][ArrayMesh]. If none are found, -1 is returned."] # [doc = ""] # [inline] pub fn surface_find_by_name (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_find_by_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the length in indices of the index array in the requested surface (see [`add_surface_from_arrays`][Self::add_surface_from_arrays])."] # [doc = ""] # [inline] pub fn surface_get_array_index_len (& self , surf_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_get_array_index_len ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , surf_idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the length in vertices of the vertex array in the requested surface (see [`add_surface_from_arrays`][Self::add_surface_from_arrays])."] # [doc = ""] # [inline] pub fn surface_get_array_len (& self , surf_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_get_array_len ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , surf_idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the format mask of the requested surface (see [`add_surface_from_arrays`][Self::add_surface_from_arrays])."] # [doc = ""] # [inline] pub fn surface_get_format (& self , surf_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_get_format ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , surf_idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets the name assigned to this surface."] # [doc = ""] # [inline] pub fn surface_get_name (& self , surf_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_get_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , surf_idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the primitive type of the requested surface (see [`add_surface_from_arrays`][Self::add_surface_from_arrays])."] # [doc = ""] # [inline] pub fn surface_get_primitive_type (& self , surf_idx : i64) -> crate :: generated :: mesh :: PrimitiveType { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_get_primitive_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , surf_idx as _) ; < crate :: generated :: mesh :: PrimitiveType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Removes a surface at position `surf_idx`, shifting greater surfaces one `surf_idx` slot down."] # [doc = ""] # [inline] pub fn surface_remove (& self , surf_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_remove ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , surf_idx as _) ; } } # [doc = "Sets a name for a given surface."] # [doc = ""] # [inline] pub fn surface_set_name (& self , surf_idx : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_set_name ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , surf_idx as _ , name . into ()) ; } } # [doc = "Updates a specified region of mesh arrays on the GPU.\n**Warning:** Only use if you know what you are doing. You can easily cause crashes by calling this function with improper arguments."] # [doc = ""] # [inline] pub fn surface_update_region (& self , surf_idx : i64 , offset : i64 , data : PoolArray < u8 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ArrayMeshMethodTable :: get (get_api ()) . surface_update_region ; let ret = crate :: icalls :: icallvar__i64_i64_bytearr (method_bind , self . this . sys () . as_ptr () , surf_idx as _ , offset as _ , data) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ArrayMesh { } unsafe impl GodotObject for ArrayMesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ArrayMesh" } } impl std :: ops :: Deref for ArrayMesh { type Target = crate :: generated :: Mesh ; # [inline] fn deref (& self) -> & crate :: generated :: Mesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ArrayMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Mesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Mesh > for ArrayMesh { } unsafe impl SubClass < crate :: generated :: Resource > for ArrayMesh { } unsafe impl SubClass < crate :: generated :: Reference > for ArrayMesh { } unsafe impl SubClass < crate :: generated :: Object > for ArrayMesh { } impl Instanciable for ArrayMesh { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ArrayMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ArrayMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_blend_shape : * mut sys :: godot_method_bind , pub add_surface_from_arrays : * mut sys :: godot_method_bind , pub clear_blend_shapes : * mut sys :: godot_method_bind , pub clear_surfaces : * mut sys :: godot_method_bind , pub get_blend_shape_count : * mut sys :: godot_method_bind , pub get_blend_shape_mode : * mut sys :: godot_method_bind , pub get_blend_shape_name : * mut sys :: godot_method_bind , pub get_custom_aabb : * mut sys :: godot_method_bind , pub lightmap_unwrap : * mut sys :: godot_method_bind , pub regen_normalmaps : * mut sys :: godot_method_bind , pub set_blend_shape_mode : * mut sys :: godot_method_bind , pub set_blend_shape_name : * mut sys :: godot_method_bind , pub set_custom_aabb : * mut sys :: godot_method_bind , pub surface_find_by_name : * mut sys :: godot_method_bind , pub surface_get_array_index_len : * mut sys :: godot_method_bind , pub surface_get_array_len : * mut sys :: godot_method_bind , pub surface_get_format : * mut sys :: godot_method_bind , pub surface_get_name : * mut sys :: godot_method_bind , pub surface_get_primitive_type : * mut sys :: godot_method_bind , pub surface_remove : * mut sys :: godot_method_bind , pub surface_set_name : * mut sys :: godot_method_bind , pub surface_update_region : * mut sys :: godot_method_bind } impl ArrayMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ArrayMeshMethodTable = ArrayMeshMethodTable { class_constructor : None , add_blend_shape : 0 as * mut sys :: godot_method_bind , add_surface_from_arrays : 0 as * mut sys :: godot_method_bind , clear_blend_shapes : 0 as * mut sys :: godot_method_bind , clear_surfaces : 0 as * mut sys :: godot_method_bind , get_blend_shape_count : 0 as * mut sys :: godot_method_bind , get_blend_shape_mode : 0 as * mut sys :: godot_method_bind , get_blend_shape_name : 0 as * mut sys :: godot_method_bind , get_custom_aabb : 0 as * mut sys :: godot_method_bind , lightmap_unwrap : 0 as * mut sys :: godot_method_bind , regen_normalmaps : 0 as * mut sys :: godot_method_bind , set_blend_shape_mode : 0 as * mut sys :: godot_method_bind , set_blend_shape_name : 0 as * mut sys :: godot_method_bind , set_custom_aabb : 0 as * mut sys :: godot_method_bind , surface_find_by_name : 0 as * mut sys :: godot_method_bind , surface_get_array_index_len : 0 as * mut sys :: godot_method_bind , surface_get_array_len : 0 as * mut sys :: godot_method_bind , surface_get_format : 0 as * mut sys :: godot_method_bind , surface_get_name : 0 as * mut sys :: godot_method_bind , surface_get_primitive_type : 0 as * mut sys :: godot_method_bind , surface_remove : 0 as * mut sys :: godot_method_bind , surface_set_name : 0 as * mut sys :: godot_method_bind , surface_update_region : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ArrayMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ArrayMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_blend_shape = (gd_api . godot_method_bind_get_method) (class_name , "add_blend_shape\0" . as_ptr () as * const c_char) ; table . add_surface_from_arrays = (gd_api . godot_method_bind_get_method) (class_name , "add_surface_from_arrays\0" . as_ptr () as * const c_char) ; table . clear_blend_shapes = (gd_api . godot_method_bind_get_method) (class_name , "clear_blend_shapes\0" . as_ptr () as * const c_char) ; table . clear_surfaces = (gd_api . godot_method_bind_get_method) (class_name , "clear_surfaces\0" . as_ptr () as * const c_char) ; table . get_blend_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_shape_count\0" . as_ptr () as * const c_char) ; table . get_blend_shape_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_shape_mode\0" . as_ptr () as * const c_char) ; table . get_blend_shape_name = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_shape_name\0" . as_ptr () as * const c_char) ; table . get_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_aabb\0" . as_ptr () as * const c_char) ; table . lightmap_unwrap = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_unwrap\0" . as_ptr () as * const c_char) ; table . regen_normalmaps = (gd_api . godot_method_bind_get_method) (class_name , "regen_normalmaps\0" . as_ptr () as * const c_char) ; table . set_blend_shape_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_shape_mode\0" . as_ptr () as * const c_char) ; table . set_blend_shape_name = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_shape_name\0" . as_ptr () as * const c_char) ; table . set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_aabb\0" . as_ptr () as * const c_char) ; table . surface_find_by_name = (gd_api . godot_method_bind_get_method) (class_name , "surface_find_by_name\0" . as_ptr () as * const c_char) ; table . surface_get_array_index_len = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_array_index_len\0" . as_ptr () as * const c_char) ; table . surface_get_array_len = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_array_len\0" . as_ptr () as * const c_char) ; table . surface_get_format = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_format\0" . as_ptr () as * const c_char) ; table . surface_get_name = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_name\0" . as_ptr () as * const c_char) ; table . surface_get_primitive_type = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_primitive_type\0" . as_ptr () as * const c_char) ; table . surface_remove = (gd_api . godot_method_bind_get_method) (class_name , "surface_remove\0" . as_ptr () as * const c_char) ; table . surface_set_name = (gd_api . godot_method_bind_get_method) (class_name , "surface_set_name\0" . as_ptr () as * const c_char) ; table . surface_update_region = (gd_api . godot_method_bind_get_method) (class_name , "surface_update_region\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::array_mesh::private::ArrayMesh;
            
            pub mod aspect_ratio_container {
                # ! [doc = "This module contains types related to the API class [`AspectRatioContainer`][super::AspectRatioContainer]."] pub (crate) mod private { # [doc = "`core class AspectRatioContainer` inherits `Container` (manually managed).\n\nThis class has related types in the [`aspect_ratio_container`][super::aspect_ratio_container] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_aspectratiocontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`AspectRatioContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<AspectRatioContainer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAspectRatioContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AspectRatioContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AspectRatioContainer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AlignMode (pub i64) ; impl AlignMode { pub const BEGIN : AlignMode = AlignMode (0i64) ; pub const CENTER : AlignMode = AlignMode (1i64) ; pub const END : AlignMode = AlignMode (2i64) ; } impl From < i64 > for AlignMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AlignMode > for i64 { # [inline] fn from (v : AlignMode) -> Self { v . 0 } } impl FromVariant for AlignMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct StretchMode (pub i64) ; impl StretchMode { pub const WIDTH_CONTROLS_HEIGHT : StretchMode = StretchMode (0i64) ; pub const HEIGHT_CONTROLS_WIDTH : StretchMode = StretchMode (1i64) ; pub const FIT : StretchMode = StretchMode (2i64) ; pub const COVER : StretchMode = StretchMode (3i64) ; } impl From < i64 > for StretchMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < StretchMode > for i64 { # [inline] fn from (v : StretchMode) -> Self { v . 0 } } impl FromVariant for StretchMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AspectRatioContainer { pub const ALIGN_BEGIN : i64 = 0i64 ; pub const STRETCH_WIDTH_CONTROLS_HEIGHT : i64 = 0i64 ; pub const ALIGN_CENTER : i64 = 1i64 ; pub const STRETCH_HEIGHT_CONTROLS_WIDTH : i64 = 1i64 ; pub const ALIGN_END : i64 = 2i64 ; pub const STRETCH_FIT : i64 = 2i64 ; pub const STRETCH_COVER : i64 = 3i64 ; } impl AspectRatioContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AspectRatioContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Specifies the horizontal relative position of child controls."] # [doc = ""] # [inline] pub fn alignment_horizontal (& self) -> crate :: generated :: aspect_ratio_container :: AlignMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . get_alignment_horizontal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: aspect_ratio_container :: AlignMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Specifies the vertical relative position of child controls."] # [doc = ""] # [inline] pub fn alignment_vertical (& self) -> crate :: generated :: aspect_ratio_container :: AlignMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . get_alignment_vertical ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: aspect_ratio_container :: AlignMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The aspect ratio to enforce on child controls. This is the width divided by the height. The ratio depends on the [`stretch_mode`][Self::stretch_mode]."] # [doc = ""] # [inline] pub fn ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . get_ratio ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The stretch mode used to align child controls."] # [doc = ""] # [inline] pub fn stretch_mode (& self) -> crate :: generated :: aspect_ratio_container :: StretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . get_stretch_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: aspect_ratio_container :: StretchMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Specifies the horizontal relative position of child controls."] # [doc = ""] # [inline] pub fn set_alignment_horizontal (& self , alignment_horizontal : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . set_alignment_horizontal ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , alignment_horizontal as _) ; } } # [doc = "Specifies the vertical relative position of child controls."] # [doc = ""] # [inline] pub fn set_alignment_vertical (& self , alignment_vertical : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . set_alignment_vertical ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , alignment_vertical as _) ; } } # [doc = "The aspect ratio to enforce on child controls. This is the width divided by the height. The ratio depends on the [`stretch_mode`][Self::stretch_mode]."] # [doc = ""] # [inline] pub fn set_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . set_ratio ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ratio as _) ; } } # [doc = "The stretch mode used to align child controls."] # [doc = ""] # [inline] pub fn set_stretch_mode (& self , stretch_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AspectRatioContainerMethodTable :: get (get_api ()) . set_stretch_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , stretch_mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AspectRatioContainer { } unsafe impl GodotObject for AspectRatioContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AspectRatioContainer" } } impl QueueFree for AspectRatioContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for AspectRatioContainer { type Target = crate :: generated :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AspectRatioContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Container > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: Control > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: Node > for AspectRatioContainer { } unsafe impl SubClass < crate :: generated :: Object > for AspectRatioContainer { } impl Instanciable for AspectRatioContainer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AspectRatioContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AspectRatioContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_alignment_horizontal : * mut sys :: godot_method_bind , pub get_alignment_vertical : * mut sys :: godot_method_bind , pub get_ratio : * mut sys :: godot_method_bind , pub get_stretch_mode : * mut sys :: godot_method_bind , pub set_alignment_horizontal : * mut sys :: godot_method_bind , pub set_alignment_vertical : * mut sys :: godot_method_bind , pub set_ratio : * mut sys :: godot_method_bind , pub set_stretch_mode : * mut sys :: godot_method_bind } impl AspectRatioContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AspectRatioContainerMethodTable = AspectRatioContainerMethodTable { class_constructor : None , get_alignment_horizontal : 0 as * mut sys :: godot_method_bind , get_alignment_vertical : 0 as * mut sys :: godot_method_bind , get_ratio : 0 as * mut sys :: godot_method_bind , get_stretch_mode : 0 as * mut sys :: godot_method_bind , set_alignment_horizontal : 0 as * mut sys :: godot_method_bind , set_alignment_vertical : 0 as * mut sys :: godot_method_bind , set_ratio : 0 as * mut sys :: godot_method_bind , set_stretch_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AspectRatioContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AspectRatioContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_alignment_horizontal = (gd_api . godot_method_bind_get_method) (class_name , "get_alignment_horizontal\0" . as_ptr () as * const c_char) ; table . get_alignment_vertical = (gd_api . godot_method_bind_get_method) (class_name , "get_alignment_vertical\0" . as_ptr () as * const c_char) ; table . get_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_ratio\0" . as_ptr () as * const c_char) ; table . get_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_mode\0" . as_ptr () as * const c_char) ; table . set_alignment_horizontal = (gd_api . godot_method_bind_get_method) (class_name , "set_alignment_horizontal\0" . as_ptr () as * const c_char) ; table . set_alignment_vertical = (gd_api . godot_method_bind_get_method) (class_name , "set_alignment_vertical\0" . as_ptr () as * const c_char) ; table . set_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_ratio\0" . as_ptr () as * const c_char) ; table . set_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::aspect_ratio_container::private::AspectRatioContainer;
            
            pub(crate) mod atlas_texture {
                # ! [doc = "This module contains types related to the API class [`AtlasTexture`][super::AtlasTexture]."] pub (crate) mod private { # [doc = "`core class AtlasTexture` inherits `Texture` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_atlastexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAtlasTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AtlasTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AtlasTexture ; impl AtlasTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AtlasTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The texture that contains the atlas. Can be any [`Texture`][Texture] subtype."] # [doc = ""] # [inline] pub fn atlas (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . get_atlas ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The margin around the region. The [`Rect2`][Rect2]'s [`Rect2.size`][Rect2::size] parameter (\"w\" and \"h\" in the editor) resizes the texture so it fits within the margin."] # [doc = ""] # [inline] pub fn margin (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The AtlasTexture's used region."] # [doc = ""] # [inline] pub fn region (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . get_region ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, clips the area outside of the region to avoid bleeding of the surrounding texture pixels."] # [doc = ""] # [inline] pub fn has_filter_clip (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . has_filter_clip ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The texture that contains the atlas. Can be any [`Texture`][Texture] subtype."] # [doc = ""] # [inline] pub fn set_atlas (& self , atlas : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . set_atlas ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , atlas . as_arg_ptr ()) ; } } # [doc = "If `true`, clips the area outside of the region to avoid bleeding of the surrounding texture pixels."] # [doc = ""] # [inline] pub fn set_filter_clip (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . set_filter_clip ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The margin around the region. The [`Rect2`][Rect2]'s [`Rect2.size`][Rect2::size] parameter (\"w\" and \"h\" in the editor) resizes the texture so it fits within the margin."] # [doc = ""] # [inline] pub fn set_margin (& self , margin : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallvar__rect2 (method_bind , self . this . sys () . as_ptr () , margin) ; } } # [doc = "The AtlasTexture's used region."] # [doc = ""] # [inline] pub fn set_region (& self , region : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AtlasTextureMethodTable :: get (get_api ()) . set_region ; let ret = crate :: icalls :: icallvar__rect2 (method_bind , self . this . sys () . as_ptr () , region) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AtlasTexture { } unsafe impl GodotObject for AtlasTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AtlasTexture" } } impl std :: ops :: Deref for AtlasTexture { type Target = crate :: generated :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AtlasTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Texture > for AtlasTexture { } unsafe impl SubClass < crate :: generated :: Resource > for AtlasTexture { } unsafe impl SubClass < crate :: generated :: Reference > for AtlasTexture { } unsafe impl SubClass < crate :: generated :: Object > for AtlasTexture { } impl Instanciable for AtlasTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AtlasTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AtlasTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_atlas : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub get_region : * mut sys :: godot_method_bind , pub has_filter_clip : * mut sys :: godot_method_bind , pub set_atlas : * mut sys :: godot_method_bind , pub set_filter_clip : * mut sys :: godot_method_bind , pub set_margin : * mut sys :: godot_method_bind , pub set_region : * mut sys :: godot_method_bind } impl AtlasTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AtlasTextureMethodTable = AtlasTextureMethodTable { class_constructor : None , get_atlas : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , get_region : 0 as * mut sys :: godot_method_bind , has_filter_clip : 0 as * mut sys :: godot_method_bind , set_atlas : 0 as * mut sys :: godot_method_bind , set_filter_clip : 0 as * mut sys :: godot_method_bind , set_margin : 0 as * mut sys :: godot_method_bind , set_region : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AtlasTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AtlasTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_atlas = (gd_api . godot_method_bind_get_method) (class_name , "get_atlas\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . get_region = (gd_api . godot_method_bind_get_method) (class_name , "get_region\0" . as_ptr () as * const c_char) ; table . has_filter_clip = (gd_api . godot_method_bind_get_method) (class_name , "has_filter_clip\0" . as_ptr () as * const c_char) ; table . set_atlas = (gd_api . godot_method_bind_get_method) (class_name , "set_atlas\0" . as_ptr () as * const c_char) ; table . set_filter_clip = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_clip\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; table . set_region = (gd_api . godot_method_bind_get_method) (class_name , "set_region\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::atlas_texture::private::AtlasTexture;
            
            pub(crate) mod audio_bus_layout {
                # ! [doc = "This module contains types related to the API class [`AudioBusLayout`][super::AudioBusLayout]."] pub (crate) mod private { # [doc = "`core class AudioBusLayout` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audiobuslayout.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioBusLayout inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioBusLayout { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioBusLayout ; impl AudioBusLayout { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioBusLayoutMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioBusLayout { } unsafe impl GodotObject for AudioBusLayout { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioBusLayout" } } impl std :: ops :: Deref for AudioBusLayout { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioBusLayout { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for AudioBusLayout { } unsafe impl SubClass < crate :: generated :: Reference > for AudioBusLayout { } unsafe impl SubClass < crate :: generated :: Object > for AudioBusLayout { } impl Instanciable for AudioBusLayout { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioBusLayout :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioBusLayoutMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioBusLayoutMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioBusLayoutMethodTable = AudioBusLayoutMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioBusLayoutMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioBusLayout\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_bus_layout::private::AudioBusLayout;
            
            pub(crate) mod audio_effect {
                # ! [doc = "This module contains types related to the API class [`AudioEffect`][super::AudioEffect]."] pub (crate) mod private { # [doc = "`core class AudioEffect` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffect.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffect inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffect { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffect ; impl AudioEffect { } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffect { } unsafe impl GodotObject for AudioEffect { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffect" } } impl std :: ops :: Deref for AudioEffect { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffect { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffect { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffect { }
                use super::*;
            }
            pub use crate::generated::audio_effect::private::AudioEffect;
            
            pub(crate) mod audio_effect_amplify {
                # ! [doc = "This module contains types related to the API class [`AudioEffectAmplify`][super::AudioEffectAmplify]."] pub (crate) mod private { # [doc = "`core class AudioEffectAmplify` inherits `AudioEffect` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectamplify.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectAmplify inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectAmplify { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectAmplify ; impl AudioEffectAmplify { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectAmplifyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Amount of amplification in decibels. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24."] # [doc = ""] # [inline] pub fn volume_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectAmplifyMethodTable :: get (get_api ()) . get_volume_db ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Amount of amplification in decibels. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24."] # [doc = ""] # [inline] pub fn set_volume_db (& self , volume : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectAmplifyMethodTable :: get (get_api ()) . set_volume_db ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , volume as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectAmplify { } unsafe impl GodotObject for AudioEffectAmplify { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectAmplify" } } impl std :: ops :: Deref for AudioEffectAmplify { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectAmplify { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectAmplify { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectAmplify { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectAmplify { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectAmplify { } impl Instanciable for AudioEffectAmplify { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectAmplify :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectAmplifyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_volume_db : * mut sys :: godot_method_bind , pub set_volume_db : * mut sys :: godot_method_bind } impl AudioEffectAmplifyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectAmplifyMethodTable = AudioEffectAmplifyMethodTable { class_constructor : None , get_volume_db : 0 as * mut sys :: godot_method_bind , set_volume_db : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectAmplifyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectAmplify\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "get_volume_db\0" . as_ptr () as * const c_char) ; table . set_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_db\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_amplify::private::AudioEffectAmplify;
            
            pub(crate) mod audio_effect_band_limit_filter {
                # ! [doc = "This module contains types related to the API class [`AudioEffectBandLimitFilter`][super::AudioEffectBandLimitFilter]."] pub (crate) mod private { # [doc = "`core class AudioEffectBandLimitFilter` inherits `AudioEffectFilter` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectbandlimitfilter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectBandLimitFilter inherits methods from:\n - [AudioEffectFilter](struct.AudioEffectFilter.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectBandLimitFilter { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectBandLimitFilter ; impl AudioEffectBandLimitFilter { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectBandLimitFilterMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectBandLimitFilter { } unsafe impl GodotObject for AudioEffectBandLimitFilter { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectBandLimitFilter" } } impl std :: ops :: Deref for AudioEffectBandLimitFilter { type Target = crate :: generated :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectBandLimitFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffectFilter > for AudioEffectBandLimitFilter { } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectBandLimitFilter { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectBandLimitFilter { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectBandLimitFilter { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectBandLimitFilter { } impl Instanciable for AudioEffectBandLimitFilter { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectBandLimitFilter :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectBandLimitFilterMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectBandLimitFilterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectBandLimitFilterMethodTable = AudioEffectBandLimitFilterMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectBandLimitFilterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectBandLimitFilter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_band_limit_filter::private::AudioEffectBandLimitFilter;
            
            pub(crate) mod audio_effect_band_pass_filter {
                # ! [doc = "This module contains types related to the API class [`AudioEffectBandPassFilter`][super::AudioEffectBandPassFilter]."] pub (crate) mod private { # [doc = "`core class AudioEffectBandPassFilter` inherits `AudioEffectFilter` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectbandpassfilter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectBandPassFilter inherits methods from:\n - [AudioEffectFilter](struct.AudioEffectFilter.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectBandPassFilter { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectBandPassFilter ; impl AudioEffectBandPassFilter { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectBandPassFilterMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectBandPassFilter { } unsafe impl GodotObject for AudioEffectBandPassFilter { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectBandPassFilter" } } impl std :: ops :: Deref for AudioEffectBandPassFilter { type Target = crate :: generated :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectBandPassFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffectFilter > for AudioEffectBandPassFilter { } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectBandPassFilter { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectBandPassFilter { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectBandPassFilter { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectBandPassFilter { } impl Instanciable for AudioEffectBandPassFilter { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectBandPassFilter :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectBandPassFilterMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectBandPassFilterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectBandPassFilterMethodTable = AudioEffectBandPassFilterMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectBandPassFilterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectBandPassFilter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_band_pass_filter::private::AudioEffectBandPassFilter;
            
            pub(crate) mod audio_effect_capture {
                # ! [doc = "This module contains types related to the API class [`AudioEffectCapture`][super::AudioEffectCapture]."] pub (crate) mod private { # [doc = "`core class AudioEffectCapture` inherits `AudioEffect` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectcapture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectCapture inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectCapture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectCapture ; impl AudioEffectCapture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectCaptureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns `true` if at least `frames` audio frames are available to read in the internal ring buffer."] # [doc = ""] # [inline] pub fn can_get_buffer (& self , frames : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . can_get_buffer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , frames as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Clears the internal ring buffer."] # [doc = ""] # [inline] pub fn clear_buffer (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . clear_buffer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Gets the next `frames` audio samples from the internal ring buffer.\nReturns a [`PoolVector2Array`][PoolArray<Vector2>] containing exactly `frames` audio samples if available, or an empty [`PoolVector2Array`][PoolArray<Vector2>] if insufficient data was available."] # [doc = ""] # [inline] pub fn get_buffer (& self , frames : i64) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . get_buffer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , frames as _) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Length of the internal ring buffer, in seconds. Setting the buffer length will have no effect if already initialized."] # [doc = ""] # [inline] pub fn buffer_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . get_buffer_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the total size of the internal ring buffer in frames."] # [doc = ""] # [inline] pub fn get_buffer_length_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . get_buffer_length_frames ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of audio frames discarded from the audio bus due to full buffer."] # [doc = ""] # [inline] pub fn get_discarded_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . get_discarded_frames ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of frames available to read using [`get_buffer`][Self::get_buffer]."] # [doc = ""] # [inline] pub fn get_frames_available (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . get_frames_available ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of audio frames inserted from the audio bus."] # [doc = ""] # [inline] pub fn get_pushed_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . get_pushed_frames ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Length of the internal ring buffer, in seconds. Setting the buffer length will have no effect if already initialized."] # [doc = ""] # [inline] pub fn set_buffer_length (& self , buffer_length_seconds : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCaptureMethodTable :: get (get_api ()) . set_buffer_length ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , buffer_length_seconds as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectCapture { } unsafe impl GodotObject for AudioEffectCapture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectCapture" } } impl std :: ops :: Deref for AudioEffectCapture { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectCapture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectCapture { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectCapture { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectCapture { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectCapture { } impl Instanciable for AudioEffectCapture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectCapture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectCaptureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub can_get_buffer : * mut sys :: godot_method_bind , pub clear_buffer : * mut sys :: godot_method_bind , pub get_buffer : * mut sys :: godot_method_bind , pub get_buffer_length : * mut sys :: godot_method_bind , pub get_buffer_length_frames : * mut sys :: godot_method_bind , pub get_discarded_frames : * mut sys :: godot_method_bind , pub get_frames_available : * mut sys :: godot_method_bind , pub get_pushed_frames : * mut sys :: godot_method_bind , pub set_buffer_length : * mut sys :: godot_method_bind } impl AudioEffectCaptureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectCaptureMethodTable = AudioEffectCaptureMethodTable { class_constructor : None , can_get_buffer : 0 as * mut sys :: godot_method_bind , clear_buffer : 0 as * mut sys :: godot_method_bind , get_buffer : 0 as * mut sys :: godot_method_bind , get_buffer_length : 0 as * mut sys :: godot_method_bind , get_buffer_length_frames : 0 as * mut sys :: godot_method_bind , get_discarded_frames : 0 as * mut sys :: godot_method_bind , get_frames_available : 0 as * mut sys :: godot_method_bind , get_pushed_frames : 0 as * mut sys :: godot_method_bind , set_buffer_length : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectCaptureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectCapture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . can_get_buffer = (gd_api . godot_method_bind_get_method) (class_name , "can_get_buffer\0" . as_ptr () as * const c_char) ; table . clear_buffer = (gd_api . godot_method_bind_get_method) (class_name , "clear_buffer\0" . as_ptr () as * const c_char) ; table . get_buffer = (gd_api . godot_method_bind_get_method) (class_name , "get_buffer\0" . as_ptr () as * const c_char) ; table . get_buffer_length = (gd_api . godot_method_bind_get_method) (class_name , "get_buffer_length\0" . as_ptr () as * const c_char) ; table . get_buffer_length_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_buffer_length_frames\0" . as_ptr () as * const c_char) ; table . get_discarded_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_discarded_frames\0" . as_ptr () as * const c_char) ; table . get_frames_available = (gd_api . godot_method_bind_get_method) (class_name , "get_frames_available\0" . as_ptr () as * const c_char) ; table . get_pushed_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_pushed_frames\0" . as_ptr () as * const c_char) ; table . set_buffer_length = (gd_api . godot_method_bind_get_method) (class_name , "set_buffer_length\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_capture::private::AudioEffectCapture;
            
            pub(crate) mod audio_effect_chorus {
                # ! [doc = "This module contains types related to the API class [`AudioEffectChorus`][super::AudioEffectChorus]."] pub (crate) mod private { # [doc = "`core class AudioEffectChorus` inherits `AudioEffect` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectchorus.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectChorus inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectChorus { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectChorus ; impl AudioEffectChorus { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectChorusMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The effect's raw signal."] # [doc = ""] # [inline] pub fn dry (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_dry ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The amount of voices in the effect."] # [doc = ""] # [inline] pub fn voice_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_voice_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The voice's cutoff frequency."] # [doc = ""] # [inline] pub fn voice_cutoff_hz (& self , voice_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_voice_cutoff_hz ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , voice_idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The voice's signal delay."] # [doc = ""] # [inline] pub fn voice_delay_ms (& self , voice_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_voice_delay_ms ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , voice_idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The voice filter's depth."] # [doc = ""] # [inline] pub fn voice_depth_ms (& self , voice_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_voice_depth_ms ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , voice_idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The voice's volume."] # [doc = ""] # [inline] pub fn voice_level_db (& self , voice_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_voice_level_db ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , voice_idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The voice's pan level."] # [doc = ""] # [inline] pub fn voice_pan (& self , voice_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_voice_pan ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , voice_idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The voice's filter rate."] # [doc = ""] # [inline] pub fn voice_rate_hz (& self , voice_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_voice_rate_hz ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , voice_idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The effect's processed signal."] # [doc = ""] # [inline] pub fn wet (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . get_wet ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The effect's raw signal."] # [doc = ""] # [inline] pub fn set_dry (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_dry ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "The amount of voices in the effect."] # [doc = ""] # [inline] pub fn set_voice_count (& self , voices : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_voice_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , voices as _) ; } } # [doc = "The voice's cutoff frequency."] # [doc = ""] # [inline] pub fn set_voice_cutoff_hz (& self , voice_idx : i64 , cutoff_hz : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_voice_cutoff_hz ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx as _ , cutoff_hz as _) ; } } # [doc = "The voice's signal delay."] # [doc = ""] # [inline] pub fn set_voice_delay_ms (& self , voice_idx : i64 , delay_ms : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_voice_delay_ms ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx as _ , delay_ms as _) ; } } # [doc = "The voice filter's depth."] # [doc = ""] # [inline] pub fn set_voice_depth_ms (& self , voice_idx : i64 , depth_ms : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_voice_depth_ms ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx as _ , depth_ms as _) ; } } # [doc = "The voice's volume."] # [doc = ""] # [inline] pub fn set_voice_level_db (& self , voice_idx : i64 , level_db : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_voice_level_db ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx as _ , level_db as _) ; } } # [doc = "The voice's pan level."] # [doc = ""] # [inline] pub fn set_voice_pan (& self , voice_idx : i64 , pan : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_voice_pan ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx as _ , pan as _) ; } } # [doc = "The voice's filter rate."] # [doc = ""] # [inline] pub fn set_voice_rate_hz (& self , voice_idx : i64 , rate_hz : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_voice_rate_hz ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , voice_idx as _ , rate_hz as _) ; } } # [doc = "The effect's processed signal."] # [doc = ""] # [inline] pub fn set_wet (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectChorusMethodTable :: get (get_api ()) . set_wet ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectChorus { } unsafe impl GodotObject for AudioEffectChorus { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectChorus" } } impl std :: ops :: Deref for AudioEffectChorus { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectChorus { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectChorus { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectChorus { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectChorus { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectChorus { } impl Instanciable for AudioEffectChorus { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectChorus :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectChorusMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_dry : * mut sys :: godot_method_bind , pub get_voice_count : * mut sys :: godot_method_bind , pub get_voice_cutoff_hz : * mut sys :: godot_method_bind , pub get_voice_delay_ms : * mut sys :: godot_method_bind , pub get_voice_depth_ms : * mut sys :: godot_method_bind , pub get_voice_level_db : * mut sys :: godot_method_bind , pub get_voice_pan : * mut sys :: godot_method_bind , pub get_voice_rate_hz : * mut sys :: godot_method_bind , pub get_wet : * mut sys :: godot_method_bind , pub set_dry : * mut sys :: godot_method_bind , pub set_voice_count : * mut sys :: godot_method_bind , pub set_voice_cutoff_hz : * mut sys :: godot_method_bind , pub set_voice_delay_ms : * mut sys :: godot_method_bind , pub set_voice_depth_ms : * mut sys :: godot_method_bind , pub set_voice_level_db : * mut sys :: godot_method_bind , pub set_voice_pan : * mut sys :: godot_method_bind , pub set_voice_rate_hz : * mut sys :: godot_method_bind , pub set_wet : * mut sys :: godot_method_bind } impl AudioEffectChorusMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectChorusMethodTable = AudioEffectChorusMethodTable { class_constructor : None , get_dry : 0 as * mut sys :: godot_method_bind , get_voice_count : 0 as * mut sys :: godot_method_bind , get_voice_cutoff_hz : 0 as * mut sys :: godot_method_bind , get_voice_delay_ms : 0 as * mut sys :: godot_method_bind , get_voice_depth_ms : 0 as * mut sys :: godot_method_bind , get_voice_level_db : 0 as * mut sys :: godot_method_bind , get_voice_pan : 0 as * mut sys :: godot_method_bind , get_voice_rate_hz : 0 as * mut sys :: godot_method_bind , get_wet : 0 as * mut sys :: godot_method_bind , set_dry : 0 as * mut sys :: godot_method_bind , set_voice_count : 0 as * mut sys :: godot_method_bind , set_voice_cutoff_hz : 0 as * mut sys :: godot_method_bind , set_voice_delay_ms : 0 as * mut sys :: godot_method_bind , set_voice_depth_ms : 0 as * mut sys :: godot_method_bind , set_voice_level_db : 0 as * mut sys :: godot_method_bind , set_voice_pan : 0 as * mut sys :: godot_method_bind , set_voice_rate_hz : 0 as * mut sys :: godot_method_bind , set_wet : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectChorusMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectChorus\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_dry = (gd_api . godot_method_bind_get_method) (class_name , "get_dry\0" . as_ptr () as * const c_char) ; table . get_voice_count = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_count\0" . as_ptr () as * const c_char) ; table . get_voice_cutoff_hz = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_cutoff_hz\0" . as_ptr () as * const c_char) ; table . get_voice_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_delay_ms\0" . as_ptr () as * const c_char) ; table . get_voice_depth_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_depth_ms\0" . as_ptr () as * const c_char) ; table . get_voice_level_db = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_level_db\0" . as_ptr () as * const c_char) ; table . get_voice_pan = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_pan\0" . as_ptr () as * const c_char) ; table . get_voice_rate_hz = (gd_api . godot_method_bind_get_method) (class_name , "get_voice_rate_hz\0" . as_ptr () as * const c_char) ; table . get_wet = (gd_api . godot_method_bind_get_method) (class_name , "get_wet\0" . as_ptr () as * const c_char) ; table . set_dry = (gd_api . godot_method_bind_get_method) (class_name , "set_dry\0" . as_ptr () as * const c_char) ; table . set_voice_count = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_count\0" . as_ptr () as * const c_char) ; table . set_voice_cutoff_hz = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_cutoff_hz\0" . as_ptr () as * const c_char) ; table . set_voice_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_delay_ms\0" . as_ptr () as * const c_char) ; table . set_voice_depth_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_depth_ms\0" . as_ptr () as * const c_char) ; table . set_voice_level_db = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_level_db\0" . as_ptr () as * const c_char) ; table . set_voice_pan = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_pan\0" . as_ptr () as * const c_char) ; table . set_voice_rate_hz = (gd_api . godot_method_bind_get_method) (class_name , "set_voice_rate_hz\0" . as_ptr () as * const c_char) ; table . set_wet = (gd_api . godot_method_bind_get_method) (class_name , "set_wet\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_chorus::private::AudioEffectChorus;
            
            pub(crate) mod audio_effect_compressor {
                # ! [doc = "This module contains types related to the API class [`AudioEffectCompressor`][super::AudioEffectCompressor]."] pub (crate) mod private { # [doc = "`core class AudioEffectCompressor` inherits `AudioEffect` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectcompressor.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectCompressor inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectCompressor { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectCompressor ; impl AudioEffectCompressor { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectCompressorMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000."] # [doc = ""] # [inline] pub fn attack_us (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_attack_us ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Gain applied to the output signal."] # [doc = ""] # [inline] pub fn gain (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_gain ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet)."] # [doc = ""] # [inline] pub fn mix (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_mix ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Amount of compression applied to the audio once it passes the threshold level. The higher the ratio, the more the loud parts of the audio will be compressed. Value can range from 1 to 48."] # [doc = ""] # [inline] pub fn ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_ratio ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000."] # [doc = ""] # [inline] pub fn release_ms (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_release_ms ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Reduce the sound level using another audio bus for threshold detection."] # [doc = ""] # [inline] pub fn sidechain (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_sidechain ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The level above which compression is applied to the audio. Value can range from -60 to 0."] # [doc = ""] # [inline] pub fn threshold (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . get_threshold ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000."] # [doc = ""] # [inline] pub fn set_attack_us (& self , attack_us : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . set_attack_us ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , attack_us as _) ; } } # [doc = "Gain applied to the output signal."] # [doc = ""] # [inline] pub fn set_gain (& self , gain : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . set_gain ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , gain as _) ; } } # [doc = "Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet)."] # [doc = ""] # [inline] pub fn set_mix (& self , mix : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . set_mix ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , mix as _) ; } } # [doc = "Amount of compression applied to the audio once it passes the threshold level. The higher the ratio, the more the loud parts of the audio will be compressed. Value can range from 1 to 48."] # [doc = ""] # [inline] pub fn set_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . set_ratio ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ratio as _) ; } } # [doc = "Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000."] # [doc = ""] # [inline] pub fn set_release_ms (& self , release_ms : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . set_release_ms ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , release_ms as _) ; } } # [doc = "Reduce the sound level using another audio bus for threshold detection."] # [doc = ""] # [inline] pub fn set_sidechain (& self , sidechain : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . set_sidechain ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , sidechain . into ()) ; } } # [doc = "The level above which compression is applied to the audio. Value can range from -60 to 0."] # [doc = ""] # [inline] pub fn set_threshold (& self , threshold : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectCompressorMethodTable :: get (get_api ()) . set_threshold ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , threshold as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectCompressor { } unsafe impl GodotObject for AudioEffectCompressor { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectCompressor" } } impl std :: ops :: Deref for AudioEffectCompressor { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectCompressor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectCompressor { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectCompressor { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectCompressor { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectCompressor { } impl Instanciable for AudioEffectCompressor { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectCompressor :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectCompressorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_attack_us : * mut sys :: godot_method_bind , pub get_gain : * mut sys :: godot_method_bind , pub get_mix : * mut sys :: godot_method_bind , pub get_ratio : * mut sys :: godot_method_bind , pub get_release_ms : * mut sys :: godot_method_bind , pub get_sidechain : * mut sys :: godot_method_bind , pub get_threshold : * mut sys :: godot_method_bind , pub set_attack_us : * mut sys :: godot_method_bind , pub set_gain : * mut sys :: godot_method_bind , pub set_mix : * mut sys :: godot_method_bind , pub set_ratio : * mut sys :: godot_method_bind , pub set_release_ms : * mut sys :: godot_method_bind , pub set_sidechain : * mut sys :: godot_method_bind , pub set_threshold : * mut sys :: godot_method_bind } impl AudioEffectCompressorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectCompressorMethodTable = AudioEffectCompressorMethodTable { class_constructor : None , get_attack_us : 0 as * mut sys :: godot_method_bind , get_gain : 0 as * mut sys :: godot_method_bind , get_mix : 0 as * mut sys :: godot_method_bind , get_ratio : 0 as * mut sys :: godot_method_bind , get_release_ms : 0 as * mut sys :: godot_method_bind , get_sidechain : 0 as * mut sys :: godot_method_bind , get_threshold : 0 as * mut sys :: godot_method_bind , set_attack_us : 0 as * mut sys :: godot_method_bind , set_gain : 0 as * mut sys :: godot_method_bind , set_mix : 0 as * mut sys :: godot_method_bind , set_ratio : 0 as * mut sys :: godot_method_bind , set_release_ms : 0 as * mut sys :: godot_method_bind , set_sidechain : 0 as * mut sys :: godot_method_bind , set_threshold : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectCompressorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectCompressor\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_attack_us = (gd_api . godot_method_bind_get_method) (class_name , "get_attack_us\0" . as_ptr () as * const c_char) ; table . get_gain = (gd_api . godot_method_bind_get_method) (class_name , "get_gain\0" . as_ptr () as * const c_char) ; table . get_mix = (gd_api . godot_method_bind_get_method) (class_name , "get_mix\0" . as_ptr () as * const c_char) ; table . get_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_ratio\0" . as_ptr () as * const c_char) ; table . get_release_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_release_ms\0" . as_ptr () as * const c_char) ; table . get_sidechain = (gd_api . godot_method_bind_get_method) (class_name , "get_sidechain\0" . as_ptr () as * const c_char) ; table . get_threshold = (gd_api . godot_method_bind_get_method) (class_name , "get_threshold\0" . as_ptr () as * const c_char) ; table . set_attack_us = (gd_api . godot_method_bind_get_method) (class_name , "set_attack_us\0" . as_ptr () as * const c_char) ; table . set_gain = (gd_api . godot_method_bind_get_method) (class_name , "set_gain\0" . as_ptr () as * const c_char) ; table . set_mix = (gd_api . godot_method_bind_get_method) (class_name , "set_mix\0" . as_ptr () as * const c_char) ; table . set_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_ratio\0" . as_ptr () as * const c_char) ; table . set_release_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_release_ms\0" . as_ptr () as * const c_char) ; table . set_sidechain = (gd_api . godot_method_bind_get_method) (class_name , "set_sidechain\0" . as_ptr () as * const c_char) ; table . set_threshold = (gd_api . godot_method_bind_get_method) (class_name , "set_threshold\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_compressor::private::AudioEffectCompressor;
            
            pub(crate) mod audio_effect_delay {
                # ! [doc = "This module contains types related to the API class [`AudioEffectDelay`][super::AudioEffectDelay]."] pub (crate) mod private { # [doc = "`core class AudioEffectDelay` inherits `AudioEffect` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectdelay.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectDelay inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectDelay { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectDelay ; impl AudioEffectDelay { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectDelayMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn dry (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_dry ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Feedback delay time in milliseconds."] # [doc = ""] # [inline] pub fn feedback_delay_ms (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_feedback_delay_ms ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sound level for `tap1`."] # [doc = ""] # [inline] pub fn feedback_level_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_feedback_level_db ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Low-pass filter for feedback, in Hz. Frequencies below this value are filtered out of the source signal."] # [doc = ""] # [inline] pub fn feedback_lowpass (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_feedback_lowpass ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "`tap1` delay time in milliseconds."] # [doc = ""] # [inline] pub fn tap1_delay_ms (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_tap1_delay_ms ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sound level for `tap1`."] # [doc = ""] # [inline] pub fn tap1_level_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_tap1_level_db ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Pan position for `tap1`. Value can range from -1 (fully left) to 1 (fully right)."] # [doc = ""] # [inline] pub fn tap1_pan (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_tap1_pan ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "**Tap2** delay time in milliseconds."] # [doc = ""] # [inline] pub fn tap2_delay_ms (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_tap2_delay_ms ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sound level for `tap2`."] # [doc = ""] # [inline] pub fn tap2_level_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_tap2_level_db ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Pan position for `tap2`. Value can range from -1 (fully left) to 1 (fully right)."] # [doc = ""] # [inline] pub fn tap2_pan (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . get_tap2_pan ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, feedback is enabled."] # [doc = ""] # [inline] pub fn is_feedback_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . is_feedback_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, `tap1` will be enabled."] # [doc = ""] # [inline] pub fn is_tap1_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . is_tap1_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, `tap2` will be enabled."] # [doc = ""] # [inline] pub fn is_tap2_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . is_tap2_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn set_dry (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_dry ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "If `true`, feedback is enabled."] # [doc = ""] # [inline] pub fn set_feedback_active (& self , amount : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_feedback_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Feedback delay time in milliseconds."] # [doc = ""] # [inline] pub fn set_feedback_delay_ms (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_feedback_delay_ms ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Sound level for `tap1`."] # [doc = ""] # [inline] pub fn set_feedback_level_db (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_feedback_level_db ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Low-pass filter for feedback, in Hz. Frequencies below this value are filtered out of the source signal."] # [doc = ""] # [inline] pub fn set_feedback_lowpass (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_feedback_lowpass ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "If `true`, `tap1` will be enabled."] # [doc = ""] # [inline] pub fn set_tap1_active (& self , amount : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap1_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "`tap1` delay time in milliseconds."] # [doc = ""] # [inline] pub fn set_tap1_delay_ms (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap1_delay_ms ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Sound level for `tap1`."] # [doc = ""] # [inline] pub fn set_tap1_level_db (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap1_level_db ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Pan position for `tap1`. Value can range from -1 (fully left) to 1 (fully right)."] # [doc = ""] # [inline] pub fn set_tap1_pan (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap1_pan ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "If `true`, `tap2` will be enabled."] # [doc = ""] # [inline] pub fn set_tap2_active (& self , amount : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap2_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "**Tap2** delay time in milliseconds."] # [doc = ""] # [inline] pub fn set_tap2_delay_ms (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap2_delay_ms ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Sound level for `tap2`."] # [doc = ""] # [inline] pub fn set_tap2_level_db (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap2_level_db ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Pan position for `tap2`. Value can range from -1 (fully left) to 1 (fully right)."] # [doc = ""] # [inline] pub fn set_tap2_pan (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDelayMethodTable :: get (get_api ()) . set_tap2_pan ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectDelay { } unsafe impl GodotObject for AudioEffectDelay { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectDelay" } } impl std :: ops :: Deref for AudioEffectDelay { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectDelay { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectDelay { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectDelay { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectDelay { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectDelay { } impl Instanciable for AudioEffectDelay { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectDelay :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectDelayMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_dry : * mut sys :: godot_method_bind , pub get_feedback_delay_ms : * mut sys :: godot_method_bind , pub get_feedback_level_db : * mut sys :: godot_method_bind , pub get_feedback_lowpass : * mut sys :: godot_method_bind , pub get_tap1_delay_ms : * mut sys :: godot_method_bind , pub get_tap1_level_db : * mut sys :: godot_method_bind , pub get_tap1_pan : * mut sys :: godot_method_bind , pub get_tap2_delay_ms : * mut sys :: godot_method_bind , pub get_tap2_level_db : * mut sys :: godot_method_bind , pub get_tap2_pan : * mut sys :: godot_method_bind , pub is_feedback_active : * mut sys :: godot_method_bind , pub is_tap1_active : * mut sys :: godot_method_bind , pub is_tap2_active : * mut sys :: godot_method_bind , pub set_dry : * mut sys :: godot_method_bind , pub set_feedback_active : * mut sys :: godot_method_bind , pub set_feedback_delay_ms : * mut sys :: godot_method_bind , pub set_feedback_level_db : * mut sys :: godot_method_bind , pub set_feedback_lowpass : * mut sys :: godot_method_bind , pub set_tap1_active : * mut sys :: godot_method_bind , pub set_tap1_delay_ms : * mut sys :: godot_method_bind , pub set_tap1_level_db : * mut sys :: godot_method_bind , pub set_tap1_pan : * mut sys :: godot_method_bind , pub set_tap2_active : * mut sys :: godot_method_bind , pub set_tap2_delay_ms : * mut sys :: godot_method_bind , pub set_tap2_level_db : * mut sys :: godot_method_bind , pub set_tap2_pan : * mut sys :: godot_method_bind } impl AudioEffectDelayMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectDelayMethodTable = AudioEffectDelayMethodTable { class_constructor : None , get_dry : 0 as * mut sys :: godot_method_bind , get_feedback_delay_ms : 0 as * mut sys :: godot_method_bind , get_feedback_level_db : 0 as * mut sys :: godot_method_bind , get_feedback_lowpass : 0 as * mut sys :: godot_method_bind , get_tap1_delay_ms : 0 as * mut sys :: godot_method_bind , get_tap1_level_db : 0 as * mut sys :: godot_method_bind , get_tap1_pan : 0 as * mut sys :: godot_method_bind , get_tap2_delay_ms : 0 as * mut sys :: godot_method_bind , get_tap2_level_db : 0 as * mut sys :: godot_method_bind , get_tap2_pan : 0 as * mut sys :: godot_method_bind , is_feedback_active : 0 as * mut sys :: godot_method_bind , is_tap1_active : 0 as * mut sys :: godot_method_bind , is_tap2_active : 0 as * mut sys :: godot_method_bind , set_dry : 0 as * mut sys :: godot_method_bind , set_feedback_active : 0 as * mut sys :: godot_method_bind , set_feedback_delay_ms : 0 as * mut sys :: godot_method_bind , set_feedback_level_db : 0 as * mut sys :: godot_method_bind , set_feedback_lowpass : 0 as * mut sys :: godot_method_bind , set_tap1_active : 0 as * mut sys :: godot_method_bind , set_tap1_delay_ms : 0 as * mut sys :: godot_method_bind , set_tap1_level_db : 0 as * mut sys :: godot_method_bind , set_tap1_pan : 0 as * mut sys :: godot_method_bind , set_tap2_active : 0 as * mut sys :: godot_method_bind , set_tap2_delay_ms : 0 as * mut sys :: godot_method_bind , set_tap2_level_db : 0 as * mut sys :: godot_method_bind , set_tap2_pan : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectDelayMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectDelay\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_dry = (gd_api . godot_method_bind_get_method) (class_name , "get_dry\0" . as_ptr () as * const c_char) ; table . get_feedback_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_feedback_delay_ms\0" . as_ptr () as * const c_char) ; table . get_feedback_level_db = (gd_api . godot_method_bind_get_method) (class_name , "get_feedback_level_db\0" . as_ptr () as * const c_char) ; table . get_feedback_lowpass = (gd_api . godot_method_bind_get_method) (class_name , "get_feedback_lowpass\0" . as_ptr () as * const c_char) ; table . get_tap1_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_tap1_delay_ms\0" . as_ptr () as * const c_char) ; table . get_tap1_level_db = (gd_api . godot_method_bind_get_method) (class_name , "get_tap1_level_db\0" . as_ptr () as * const c_char) ; table . get_tap1_pan = (gd_api . godot_method_bind_get_method) (class_name , "get_tap1_pan\0" . as_ptr () as * const c_char) ; table . get_tap2_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "get_tap2_delay_ms\0" . as_ptr () as * const c_char) ; table . get_tap2_level_db = (gd_api . godot_method_bind_get_method) (class_name , "get_tap2_level_db\0" . as_ptr () as * const c_char) ; table . get_tap2_pan = (gd_api . godot_method_bind_get_method) (class_name , "get_tap2_pan\0" . as_ptr () as * const c_char) ; table . is_feedback_active = (gd_api . godot_method_bind_get_method) (class_name , "is_feedback_active\0" . as_ptr () as * const c_char) ; table . is_tap1_active = (gd_api . godot_method_bind_get_method) (class_name , "is_tap1_active\0" . as_ptr () as * const c_char) ; table . is_tap2_active = (gd_api . godot_method_bind_get_method) (class_name , "is_tap2_active\0" . as_ptr () as * const c_char) ; table . set_dry = (gd_api . godot_method_bind_get_method) (class_name , "set_dry\0" . as_ptr () as * const c_char) ; table . set_feedback_active = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback_active\0" . as_ptr () as * const c_char) ; table . set_feedback_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback_delay_ms\0" . as_ptr () as * const c_char) ; table . set_feedback_level_db = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback_level_db\0" . as_ptr () as * const c_char) ; table . set_feedback_lowpass = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback_lowpass\0" . as_ptr () as * const c_char) ; table . set_tap1_active = (gd_api . godot_method_bind_get_method) (class_name , "set_tap1_active\0" . as_ptr () as * const c_char) ; table . set_tap1_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_tap1_delay_ms\0" . as_ptr () as * const c_char) ; table . set_tap1_level_db = (gd_api . godot_method_bind_get_method) (class_name , "set_tap1_level_db\0" . as_ptr () as * const c_char) ; table . set_tap1_pan = (gd_api . godot_method_bind_get_method) (class_name , "set_tap1_pan\0" . as_ptr () as * const c_char) ; table . set_tap2_active = (gd_api . godot_method_bind_get_method) (class_name , "set_tap2_active\0" . as_ptr () as * const c_char) ; table . set_tap2_delay_ms = (gd_api . godot_method_bind_get_method) (class_name , "set_tap2_delay_ms\0" . as_ptr () as * const c_char) ; table . set_tap2_level_db = (gd_api . godot_method_bind_get_method) (class_name , "set_tap2_level_db\0" . as_ptr () as * const c_char) ; table . set_tap2_pan = (gd_api . godot_method_bind_get_method) (class_name , "set_tap2_pan\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_delay::private::AudioEffectDelay;
            
            pub mod audio_effect_distortion {
                # ! [doc = "This module contains types related to the API class [`AudioEffectDistortion`][super::AudioEffectDistortion]."] pub (crate) mod private { # [doc = "`core class AudioEffectDistortion` inherits `AudioEffect` (reference-counted).\n\nThis class has related types in the [`audio_effect_distortion`][super::audio_effect_distortion] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectdistortion.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectDistortion inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectDistortion { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectDistortion ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const CLIP : Mode = Mode (0i64) ; pub const ATAN : Mode = Mode (1i64) ; pub const LOFI : Mode = Mode (2i64) ; pub const OVERDRIVE : Mode = Mode (3i64) ; pub const WAVESHAPE : Mode = Mode (4i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } impl FromVariant for Mode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioEffectDistortion { pub const MODE_CLIP : i64 = 0i64 ; pub const MODE_ATAN : i64 = 1i64 ; pub const MODE_LOFI : i64 = 2i64 ; pub const MODE_OVERDRIVE : i64 = 3i64 ; pub const MODE_WAVESHAPE : i64 = 4i64 ; } impl AudioEffectDistortion { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectDistortionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Distortion power. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn drive (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDistortionMethodTable :: get (get_api ()) . get_drive ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "High-pass filter, in Hz. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000."] # [doc = ""] # [inline] pub fn keep_hf_hz (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDistortionMethodTable :: get (get_api ()) . get_keep_hf_hz ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Distortion type."] # [doc = ""] # [inline] pub fn mode (& self) -> crate :: generated :: audio_effect_distortion :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDistortionMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: audio_effect_distortion :: Mode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Increases or decreases the volume after the effect. Value can range from -80 to 24."] # [doc = ""] # [inline] pub fn post_gain (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDistortionMethodTable :: get (get_api ()) . get_post_gain ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Increases or decreases the volume before the effect. Value can range from -60 to 60."] # [doc = ""] # [inline] pub fn pre_gain (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDistortionMethodTable :: get (get_api ()) . get_pre_gain ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Distortion power. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn set_drive (& self , drive : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDistortionMethodTable :: get (get_api ()) . set_drive ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , drive as _) ; } } # [doc = "High-pass filter, in Hz. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000."] # [doc = ""] # [inline] pub fn set_keep_hf_hz (& self , keep_hf_hz : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDistortionMethodTable :: get (get_api ()) . set_keep_hf_hz ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , keep_hf_hz as _) ; } } # [doc = "Distortion type."] # [doc = ""] # [inline] pub fn set_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDistortionMethodTable :: get (get_api ()) . set_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Increases or decreases the volume after the effect. Value can range from -80 to 24."] # [doc = ""] # [inline] pub fn set_post_gain (& self , post_gain : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDistortionMethodTable :: get (get_api ()) . set_post_gain ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , post_gain as _) ; } } # [doc = "Increases or decreases the volume before the effect. Value can range from -60 to 60."] # [doc = ""] # [inline] pub fn set_pre_gain (& self , pre_gain : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectDistortionMethodTable :: get (get_api ()) . set_pre_gain ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , pre_gain as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectDistortion { } unsafe impl GodotObject for AudioEffectDistortion { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectDistortion" } } impl std :: ops :: Deref for AudioEffectDistortion { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectDistortion { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectDistortion { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectDistortion { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectDistortion { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectDistortion { } impl Instanciable for AudioEffectDistortion { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectDistortion :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectDistortionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_drive : * mut sys :: godot_method_bind , pub get_keep_hf_hz : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub get_post_gain : * mut sys :: godot_method_bind , pub get_pre_gain : * mut sys :: godot_method_bind , pub set_drive : * mut sys :: godot_method_bind , pub set_keep_hf_hz : * mut sys :: godot_method_bind , pub set_mode : * mut sys :: godot_method_bind , pub set_post_gain : * mut sys :: godot_method_bind , pub set_pre_gain : * mut sys :: godot_method_bind } impl AudioEffectDistortionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectDistortionMethodTable = AudioEffectDistortionMethodTable { class_constructor : None , get_drive : 0 as * mut sys :: godot_method_bind , get_keep_hf_hz : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , get_post_gain : 0 as * mut sys :: godot_method_bind , get_pre_gain : 0 as * mut sys :: godot_method_bind , set_drive : 0 as * mut sys :: godot_method_bind , set_keep_hf_hz : 0 as * mut sys :: godot_method_bind , set_mode : 0 as * mut sys :: godot_method_bind , set_post_gain : 0 as * mut sys :: godot_method_bind , set_pre_gain : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectDistortionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectDistortion\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_drive = (gd_api . godot_method_bind_get_method) (class_name , "get_drive\0" . as_ptr () as * const c_char) ; table . get_keep_hf_hz = (gd_api . godot_method_bind_get_method) (class_name , "get_keep_hf_hz\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_post_gain = (gd_api . godot_method_bind_get_method) (class_name , "get_post_gain\0" . as_ptr () as * const c_char) ; table . get_pre_gain = (gd_api . godot_method_bind_get_method) (class_name , "get_pre_gain\0" . as_ptr () as * const c_char) ; table . set_drive = (gd_api . godot_method_bind_get_method) (class_name , "set_drive\0" . as_ptr () as * const c_char) ; table . set_keep_hf_hz = (gd_api . godot_method_bind_get_method) (class_name , "set_keep_hf_hz\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_post_gain = (gd_api . godot_method_bind_get_method) (class_name , "set_post_gain\0" . as_ptr () as * const c_char) ; table . set_pre_gain = (gd_api . godot_method_bind_get_method) (class_name , "set_pre_gain\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_distortion::private::AudioEffectDistortion;
            
            pub(crate) mod audio_effect_eq {
                # ! [doc = "This module contains types related to the API class [`AudioEffectEQ`][super::AudioEffectEQ]."] pub (crate) mod private { # [doc = "`core class AudioEffectEQ` inherits `AudioEffect` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffecteq.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectEQ inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectEQ { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectEQ ; impl AudioEffectEQ { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectEQMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the number of bands of the equalizer."] # [doc = ""] # [inline] pub fn get_band_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectEQMethodTable :: get (get_api ()) . get_band_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the band's gain at the specified index, in dB."] # [doc = ""] # [inline] pub fn get_band_gain_db (& self , band_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectEQMethodTable :: get (get_api ()) . get_band_gain_db ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , band_idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets band's gain at the specified index, in dB."] # [doc = ""] # [inline] pub fn set_band_gain_db (& self , band_idx : i64 , volume_db : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectEQMethodTable :: get (get_api ()) . set_band_gain_db ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , band_idx as _ , volume_db as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectEQ { } unsafe impl GodotObject for AudioEffectEQ { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectEQ" } } impl std :: ops :: Deref for AudioEffectEQ { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectEQ { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectEQ { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectEQ { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectEQ { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectEQ { } impl Instanciable for AudioEffectEQ { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectEQ :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectEQMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_band_count : * mut sys :: godot_method_bind , pub get_band_gain_db : * mut sys :: godot_method_bind , pub set_band_gain_db : * mut sys :: godot_method_bind } impl AudioEffectEQMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectEQMethodTable = AudioEffectEQMethodTable { class_constructor : None , get_band_count : 0 as * mut sys :: godot_method_bind , get_band_gain_db : 0 as * mut sys :: godot_method_bind , set_band_gain_db : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectEQMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectEQ\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_band_count = (gd_api . godot_method_bind_get_method) (class_name , "get_band_count\0" . as_ptr () as * const c_char) ; table . get_band_gain_db = (gd_api . godot_method_bind_get_method) (class_name , "get_band_gain_db\0" . as_ptr () as * const c_char) ; table . set_band_gain_db = (gd_api . godot_method_bind_get_method) (class_name , "set_band_gain_db\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_eq::private::AudioEffectEQ;
            
            pub(crate) mod audio_effect_eq10 {
                # ! [doc = "This module contains types related to the API class [`AudioEffectEQ10`][super::AudioEffectEQ10]."] pub (crate) mod private { # [doc = "`core class AudioEffectEQ10` inherits `AudioEffectEQ` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffecteq10.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectEQ10 inherits methods from:\n - [AudioEffectEQ](struct.AudioEffectEQ.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectEQ10 { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectEQ10 ; impl AudioEffectEQ10 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectEQ10MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectEQ10 { } unsafe impl GodotObject for AudioEffectEQ10 { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectEQ10" } } impl std :: ops :: Deref for AudioEffectEQ10 { type Target = crate :: generated :: AudioEffectEQ ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectEQ10 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffectEQ > for AudioEffectEQ10 { } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectEQ10 { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectEQ10 { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectEQ10 { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectEQ10 { } impl Instanciable for AudioEffectEQ10 { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectEQ10 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectEQ10MethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectEQ10MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectEQ10MethodTable = AudioEffectEQ10MethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectEQ10MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectEQ10\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_eq10::private::AudioEffectEQ10;
            
            pub(crate) mod audio_effect_eq21 {
                # ! [doc = "This module contains types related to the API class [`AudioEffectEQ21`][super::AudioEffectEQ21]."] pub (crate) mod private { # [doc = "`core class AudioEffectEQ21` inherits `AudioEffectEQ` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffecteq21.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectEQ21 inherits methods from:\n - [AudioEffectEQ](struct.AudioEffectEQ.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectEQ21 { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectEQ21 ; impl AudioEffectEQ21 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectEQ21MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectEQ21 { } unsafe impl GodotObject for AudioEffectEQ21 { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectEQ21" } } impl std :: ops :: Deref for AudioEffectEQ21 { type Target = crate :: generated :: AudioEffectEQ ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectEQ21 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffectEQ > for AudioEffectEQ21 { } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectEQ21 { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectEQ21 { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectEQ21 { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectEQ21 { } impl Instanciable for AudioEffectEQ21 { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectEQ21 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectEQ21MethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectEQ21MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectEQ21MethodTable = AudioEffectEQ21MethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectEQ21MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectEQ21\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_eq21::private::AudioEffectEQ21;
            
            pub(crate) mod audio_effect_eq6 {
                # ! [doc = "This module contains types related to the API class [`AudioEffectEQ6`][super::AudioEffectEQ6]."] pub (crate) mod private { # [doc = "`core class AudioEffectEQ6` inherits `AudioEffectEQ` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffecteq6.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectEQ6 inherits methods from:\n - [AudioEffectEQ](struct.AudioEffectEQ.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectEQ6 { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectEQ6 ; impl AudioEffectEQ6 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectEQ6MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectEQ6 { } unsafe impl GodotObject for AudioEffectEQ6 { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectEQ6" } } impl std :: ops :: Deref for AudioEffectEQ6 { type Target = crate :: generated :: AudioEffectEQ ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectEQ6 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffectEQ { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffectEQ > for AudioEffectEQ6 { } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectEQ6 { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectEQ6 { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectEQ6 { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectEQ6 { } impl Instanciable for AudioEffectEQ6 { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectEQ6 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectEQ6MethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectEQ6MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectEQ6MethodTable = AudioEffectEQ6MethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectEQ6MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectEQ6\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_eq6::private::AudioEffectEQ6;
            
            pub mod audio_effect_filter {
                # ! [doc = "This module contains types related to the API class [`AudioEffectFilter`][super::AudioEffectFilter]."] pub (crate) mod private { # [doc = "`core class AudioEffectFilter` inherits `AudioEffect` (reference-counted).\n\nThis class has related types in the [`audio_effect_filter`][super::audio_effect_filter] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectfilter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectFilter inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectFilter { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectFilter ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct FilterDb (pub i64) ; impl FilterDb { pub const _6DB : FilterDb = FilterDb (0i64) ; pub const _12DB : FilterDb = FilterDb (1i64) ; pub const _18DB : FilterDb = FilterDb (2i64) ; pub const _24DB : FilterDb = FilterDb (3i64) ; } impl From < i64 > for FilterDb { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < FilterDb > for i64 { # [inline] fn from (v : FilterDb) -> Self { v . 0 } } impl FromVariant for FilterDb { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioEffectFilter { pub const FILTER_6DB : i64 = 0i64 ; pub const FILTER_12DB : i64 = 1i64 ; pub const FILTER_18DB : i64 = 2i64 ; pub const FILTER_24DB : i64 = 3i64 ; } impl AudioEffectFilter { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectFilterMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Threshold frequency for the filter, in Hz."] # [doc = ""] # [inline] pub fn cutoff (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . get_cutoff ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn db (& self) -> crate :: generated :: audio_effect_filter :: FilterDb { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . get_db ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: audio_effect_filter :: FilterDb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gain amount of the frequencies after the filter."] # [doc = ""] # [inline] pub fn gain (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . get_gain ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Amount of boost in the frequency range near the cutoff frequency."] # [doc = ""] # [inline] pub fn resonance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . get_resonance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Threshold frequency for the filter, in Hz."] # [doc = ""] # [inline] pub fn set_cutoff (& self , freq : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . set_cutoff ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , freq as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_db (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . set_db ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Gain amount of the frequencies after the filter."] # [doc = ""] # [inline] pub fn set_gain (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . set_gain ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Amount of boost in the frequency range near the cutoff frequency."] # [doc = ""] # [inline] pub fn set_resonance (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectFilterMethodTable :: get (get_api ()) . set_resonance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectFilter { } unsafe impl GodotObject for AudioEffectFilter { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectFilter" } } impl std :: ops :: Deref for AudioEffectFilter { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectFilter { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectFilter { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectFilter { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectFilter { } impl Instanciable for AudioEffectFilter { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectFilter :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectFilterMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_cutoff : * mut sys :: godot_method_bind , pub get_db : * mut sys :: godot_method_bind , pub get_gain : * mut sys :: godot_method_bind , pub get_resonance : * mut sys :: godot_method_bind , pub set_cutoff : * mut sys :: godot_method_bind , pub set_db : * mut sys :: godot_method_bind , pub set_gain : * mut sys :: godot_method_bind , pub set_resonance : * mut sys :: godot_method_bind } impl AudioEffectFilterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectFilterMethodTable = AudioEffectFilterMethodTable { class_constructor : None , get_cutoff : 0 as * mut sys :: godot_method_bind , get_db : 0 as * mut sys :: godot_method_bind , get_gain : 0 as * mut sys :: godot_method_bind , get_resonance : 0 as * mut sys :: godot_method_bind , set_cutoff : 0 as * mut sys :: godot_method_bind , set_db : 0 as * mut sys :: godot_method_bind , set_gain : 0 as * mut sys :: godot_method_bind , set_resonance : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectFilterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectFilter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cutoff = (gd_api . godot_method_bind_get_method) (class_name , "get_cutoff\0" . as_ptr () as * const c_char) ; table . get_db = (gd_api . godot_method_bind_get_method) (class_name , "get_db\0" . as_ptr () as * const c_char) ; table . get_gain = (gd_api . godot_method_bind_get_method) (class_name , "get_gain\0" . as_ptr () as * const c_char) ; table . get_resonance = (gd_api . godot_method_bind_get_method) (class_name , "get_resonance\0" . as_ptr () as * const c_char) ; table . set_cutoff = (gd_api . godot_method_bind_get_method) (class_name , "set_cutoff\0" . as_ptr () as * const c_char) ; table . set_db = (gd_api . godot_method_bind_get_method) (class_name , "set_db\0" . as_ptr () as * const c_char) ; table . set_gain = (gd_api . godot_method_bind_get_method) (class_name , "set_gain\0" . as_ptr () as * const c_char) ; table . set_resonance = (gd_api . godot_method_bind_get_method) (class_name , "set_resonance\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_filter::private::AudioEffectFilter;
            
            pub(crate) mod audio_effect_high_pass_filter {
                # ! [doc = "This module contains types related to the API class [`AudioEffectHighPassFilter`][super::AudioEffectHighPassFilter]."] pub (crate) mod private { # [doc = "`core class AudioEffectHighPassFilter` inherits `AudioEffectFilter` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffecthighpassfilter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectHighPassFilter inherits methods from:\n - [AudioEffectFilter](struct.AudioEffectFilter.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectHighPassFilter { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectHighPassFilter ; impl AudioEffectHighPassFilter { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectHighPassFilterMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectHighPassFilter { } unsafe impl GodotObject for AudioEffectHighPassFilter { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectHighPassFilter" } } impl std :: ops :: Deref for AudioEffectHighPassFilter { type Target = crate :: generated :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectHighPassFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffectFilter > for AudioEffectHighPassFilter { } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectHighPassFilter { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectHighPassFilter { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectHighPassFilter { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectHighPassFilter { } impl Instanciable for AudioEffectHighPassFilter { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectHighPassFilter :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectHighPassFilterMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectHighPassFilterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectHighPassFilterMethodTable = AudioEffectHighPassFilterMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectHighPassFilterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectHighPassFilter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_high_pass_filter::private::AudioEffectHighPassFilter;
            
            pub(crate) mod audio_effect_high_shelf_filter {
                # ! [doc = "This module contains types related to the API class [`AudioEffectHighShelfFilter`][super::AudioEffectHighShelfFilter]."] pub (crate) mod private { # [doc = "`core class AudioEffectHighShelfFilter` inherits `AudioEffectFilter` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffecthighshelffilter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectHighShelfFilter inherits methods from:\n - [AudioEffectFilter](struct.AudioEffectFilter.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectHighShelfFilter { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectHighShelfFilter ; impl AudioEffectHighShelfFilter { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectHighShelfFilterMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectHighShelfFilter { } unsafe impl GodotObject for AudioEffectHighShelfFilter { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectHighShelfFilter" } } impl std :: ops :: Deref for AudioEffectHighShelfFilter { type Target = crate :: generated :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectHighShelfFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffectFilter > for AudioEffectHighShelfFilter { } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectHighShelfFilter { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectHighShelfFilter { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectHighShelfFilter { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectHighShelfFilter { } impl Instanciable for AudioEffectHighShelfFilter { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectHighShelfFilter :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectHighShelfFilterMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectHighShelfFilterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectHighShelfFilterMethodTable = AudioEffectHighShelfFilterMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectHighShelfFilterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectHighShelfFilter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_high_shelf_filter::private::AudioEffectHighShelfFilter;
            
            pub(crate) mod audio_effect_instance {
                # ! [doc = "This module contains types related to the API class [`AudioEffectInstance`][super::AudioEffectInstance]."] pub (crate) mod private { # [doc = "`core class AudioEffectInstance` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectinstance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectInstance inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectInstance { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectInstance ; impl AudioEffectInstance { } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectInstance { } unsafe impl GodotObject for AudioEffectInstance { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectInstance" } } impl std :: ops :: Deref for AudioEffectInstance { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectInstance { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectInstance { }
                use super::*;
            }
            pub use crate::generated::audio_effect_instance::private::AudioEffectInstance;
            
            pub(crate) mod audio_effect_limiter {
                # ! [doc = "This module contains types related to the API class [`AudioEffectLimiter`][super::AudioEffectLimiter]."] pub (crate) mod private { # [doc = "`core class AudioEffectLimiter` inherits `AudioEffect` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectlimiter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectLimiter inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectLimiter { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectLimiter ; impl AudioEffectLimiter { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectLimiterMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The waveform's maximum allowed value, in decibels. Value can range from -20 to -0.1."] # [doc = ""] # [inline] pub fn ceiling_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . get_ceiling_db ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Applies a gain to the limited waves, in decibels. Value can range from 0 to 6."] # [doc = ""] # [inline] pub fn soft_clip_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . get_soft_clip_db ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn soft_clip_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . get_soft_clip_ratio ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0."] # [doc = ""] # [inline] pub fn threshold_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . get_threshold_db ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The waveform's maximum allowed value, in decibels. Value can range from -20 to -0.1."] # [doc = ""] # [inline] pub fn set_ceiling_db (& self , ceiling : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . set_ceiling_db ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ceiling as _) ; } } # [doc = "Applies a gain to the limited waves, in decibels. Value can range from 0 to 6."] # [doc = ""] # [inline] pub fn set_soft_clip_db (& self , soft_clip : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . set_soft_clip_db ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , soft_clip as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_soft_clip_ratio (& self , soft_clip : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . set_soft_clip_ratio ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , soft_clip as _) ; } } # [doc = "Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0."] # [doc = ""] # [inline] pub fn set_threshold_db (& self , threshold : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectLimiterMethodTable :: get (get_api ()) . set_threshold_db ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , threshold as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectLimiter { } unsafe impl GodotObject for AudioEffectLimiter { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectLimiter" } } impl std :: ops :: Deref for AudioEffectLimiter { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectLimiter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectLimiter { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectLimiter { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectLimiter { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectLimiter { } impl Instanciable for AudioEffectLimiter { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectLimiter :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectLimiterMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_ceiling_db : * mut sys :: godot_method_bind , pub get_soft_clip_db : * mut sys :: godot_method_bind , pub get_soft_clip_ratio : * mut sys :: godot_method_bind , pub get_threshold_db : * mut sys :: godot_method_bind , pub set_ceiling_db : * mut sys :: godot_method_bind , pub set_soft_clip_db : * mut sys :: godot_method_bind , pub set_soft_clip_ratio : * mut sys :: godot_method_bind , pub set_threshold_db : * mut sys :: godot_method_bind } impl AudioEffectLimiterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectLimiterMethodTable = AudioEffectLimiterMethodTable { class_constructor : None , get_ceiling_db : 0 as * mut sys :: godot_method_bind , get_soft_clip_db : 0 as * mut sys :: godot_method_bind , get_soft_clip_ratio : 0 as * mut sys :: godot_method_bind , get_threshold_db : 0 as * mut sys :: godot_method_bind , set_ceiling_db : 0 as * mut sys :: godot_method_bind , set_soft_clip_db : 0 as * mut sys :: godot_method_bind , set_soft_clip_ratio : 0 as * mut sys :: godot_method_bind , set_threshold_db : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectLimiterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectLimiter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_ceiling_db = (gd_api . godot_method_bind_get_method) (class_name , "get_ceiling_db\0" . as_ptr () as * const c_char) ; table . get_soft_clip_db = (gd_api . godot_method_bind_get_method) (class_name , "get_soft_clip_db\0" . as_ptr () as * const c_char) ; table . get_soft_clip_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_soft_clip_ratio\0" . as_ptr () as * const c_char) ; table . get_threshold_db = (gd_api . godot_method_bind_get_method) (class_name , "get_threshold_db\0" . as_ptr () as * const c_char) ; table . set_ceiling_db = (gd_api . godot_method_bind_get_method) (class_name , "set_ceiling_db\0" . as_ptr () as * const c_char) ; table . set_soft_clip_db = (gd_api . godot_method_bind_get_method) (class_name , "set_soft_clip_db\0" . as_ptr () as * const c_char) ; table . set_soft_clip_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_soft_clip_ratio\0" . as_ptr () as * const c_char) ; table . set_threshold_db = (gd_api . godot_method_bind_get_method) (class_name , "set_threshold_db\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_limiter::private::AudioEffectLimiter;
            
            pub(crate) mod audio_effect_low_pass_filter {
                # ! [doc = "This module contains types related to the API class [`AudioEffectLowPassFilter`][super::AudioEffectLowPassFilter]."] pub (crate) mod private { # [doc = "`core class AudioEffectLowPassFilter` inherits `AudioEffectFilter` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectlowpassfilter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectLowPassFilter inherits methods from:\n - [AudioEffectFilter](struct.AudioEffectFilter.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectLowPassFilter { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectLowPassFilter ; impl AudioEffectLowPassFilter { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectLowPassFilterMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectLowPassFilter { } unsafe impl GodotObject for AudioEffectLowPassFilter { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectLowPassFilter" } } impl std :: ops :: Deref for AudioEffectLowPassFilter { type Target = crate :: generated :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectLowPassFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffectFilter > for AudioEffectLowPassFilter { } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectLowPassFilter { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectLowPassFilter { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectLowPassFilter { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectLowPassFilter { } impl Instanciable for AudioEffectLowPassFilter { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectLowPassFilter :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectLowPassFilterMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectLowPassFilterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectLowPassFilterMethodTable = AudioEffectLowPassFilterMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectLowPassFilterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectLowPassFilter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_low_pass_filter::private::AudioEffectLowPassFilter;
            
            pub(crate) mod audio_effect_low_shelf_filter {
                # ! [doc = "This module contains types related to the API class [`AudioEffectLowShelfFilter`][super::AudioEffectLowShelfFilter]."] pub (crate) mod private { # [doc = "`core class AudioEffectLowShelfFilter` inherits `AudioEffectFilter` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectlowshelffilter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectLowShelfFilter inherits methods from:\n - [AudioEffectFilter](struct.AudioEffectFilter.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectLowShelfFilter { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectLowShelfFilter ; impl AudioEffectLowShelfFilter { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectLowShelfFilterMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectLowShelfFilter { } unsafe impl GodotObject for AudioEffectLowShelfFilter { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectLowShelfFilter" } } impl std :: ops :: Deref for AudioEffectLowShelfFilter { type Target = crate :: generated :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectLowShelfFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffectFilter > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectLowShelfFilter { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectLowShelfFilter { } impl Instanciable for AudioEffectLowShelfFilter { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectLowShelfFilter :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectLowShelfFilterMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectLowShelfFilterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectLowShelfFilterMethodTable = AudioEffectLowShelfFilterMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectLowShelfFilterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectLowShelfFilter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_low_shelf_filter::private::AudioEffectLowShelfFilter;
            
            pub(crate) mod audio_effect_notch_filter {
                # ! [doc = "This module contains types related to the API class [`AudioEffectNotchFilter`][super::AudioEffectNotchFilter]."] pub (crate) mod private { # [doc = "`core class AudioEffectNotchFilter` inherits `AudioEffectFilter` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectnotchfilter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectNotchFilter inherits methods from:\n - [AudioEffectFilter](struct.AudioEffectFilter.html)\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectNotchFilter { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectNotchFilter ; impl AudioEffectNotchFilter { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectNotchFilterMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectNotchFilter { } unsafe impl GodotObject for AudioEffectNotchFilter { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectNotchFilter" } } impl std :: ops :: Deref for AudioEffectNotchFilter { type Target = crate :: generated :: AudioEffectFilter ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectNotchFilter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffectFilter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffectFilter > for AudioEffectNotchFilter { } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectNotchFilter { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectNotchFilter { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectNotchFilter { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectNotchFilter { } impl Instanciable for AudioEffectNotchFilter { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectNotchFilter :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectNotchFilterMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioEffectNotchFilterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectNotchFilterMethodTable = AudioEffectNotchFilterMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectNotchFilterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectNotchFilter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_notch_filter::private::AudioEffectNotchFilter;
            
            pub(crate) mod audio_effect_panner {
                # ! [doc = "This module contains types related to the API class [`AudioEffectPanner`][super::AudioEffectPanner]."] pub (crate) mod private { # [doc = "`core class AudioEffectPanner` inherits `AudioEffect` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectpanner.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectPanner inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectPanner { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectPanner ; impl AudioEffectPanner { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectPannerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Pan position. Value can range from -1 (fully left) to 1 (fully right)."] # [doc = ""] # [inline] pub fn pan (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPannerMethodTable :: get (get_api ()) . get_pan ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Pan position. Value can range from -1 (fully left) to 1 (fully right)."] # [doc = ""] # [inline] pub fn set_pan (& self , cpanume : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPannerMethodTable :: get (get_api ()) . set_pan ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , cpanume as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectPanner { } unsafe impl GodotObject for AudioEffectPanner { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectPanner" } } impl std :: ops :: Deref for AudioEffectPanner { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectPanner { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectPanner { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectPanner { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectPanner { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectPanner { } impl Instanciable for AudioEffectPanner { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectPanner :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectPannerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_pan : * mut sys :: godot_method_bind , pub set_pan : * mut sys :: godot_method_bind } impl AudioEffectPannerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectPannerMethodTable = AudioEffectPannerMethodTable { class_constructor : None , get_pan : 0 as * mut sys :: godot_method_bind , set_pan : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectPannerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectPanner\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_pan = (gd_api . godot_method_bind_get_method) (class_name , "get_pan\0" . as_ptr () as * const c_char) ; table . set_pan = (gd_api . godot_method_bind_get_method) (class_name , "set_pan\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_panner::private::AudioEffectPanner;
            
            pub(crate) mod audio_effect_phaser {
                # ! [doc = "This module contains types related to the API class [`AudioEffectPhaser`][super::AudioEffectPhaser]."] pub (crate) mod private { # [doc = "`core class AudioEffectPhaser` inherits `AudioEffect` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectphaser.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectPhaser inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectPhaser { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectPhaser ; impl AudioEffectPhaser { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectPhaserMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4."] # [doc = ""] # [inline] pub fn depth (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . get_depth ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Output percent of modified sound. Value can range from 0.1 to 0.9."] # [doc = ""] # [inline] pub fn feedback (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . get_feedback ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Determines the maximum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000."] # [doc = ""] # [inline] pub fn range_max_hz (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . get_range_max_hz ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Determines the minimum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000."] # [doc = ""] # [inline] pub fn range_min_hz (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . get_range_min_hz ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range."] # [doc = ""] # [inline] pub fn rate_hz (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . get_rate_hz ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4."] # [doc = ""] # [inline] pub fn set_depth (& self , depth : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . set_depth ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , depth as _) ; } } # [doc = "Output percent of modified sound. Value can range from 0.1 to 0.9."] # [doc = ""] # [inline] pub fn set_feedback (& self , fbk : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . set_feedback ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , fbk as _) ; } } # [doc = "Determines the maximum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000."] # [doc = ""] # [inline] pub fn set_range_max_hz (& self , hz : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . set_range_max_hz ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , hz as _) ; } } # [doc = "Determines the minimum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000."] # [doc = ""] # [inline] pub fn set_range_min_hz (& self , hz : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . set_range_min_hz ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , hz as _) ; } } # [doc = "Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range."] # [doc = ""] # [inline] pub fn set_rate_hz (& self , hz : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPhaserMethodTable :: get (get_api ()) . set_rate_hz ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , hz as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectPhaser { } unsafe impl GodotObject for AudioEffectPhaser { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectPhaser" } } impl std :: ops :: Deref for AudioEffectPhaser { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectPhaser { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectPhaser { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectPhaser { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectPhaser { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectPhaser { } impl Instanciable for AudioEffectPhaser { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectPhaser :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectPhaserMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_depth : * mut sys :: godot_method_bind , pub get_feedback : * mut sys :: godot_method_bind , pub get_range_max_hz : * mut sys :: godot_method_bind , pub get_range_min_hz : * mut sys :: godot_method_bind , pub get_rate_hz : * mut sys :: godot_method_bind , pub set_depth : * mut sys :: godot_method_bind , pub set_feedback : * mut sys :: godot_method_bind , pub set_range_max_hz : * mut sys :: godot_method_bind , pub set_range_min_hz : * mut sys :: godot_method_bind , pub set_rate_hz : * mut sys :: godot_method_bind } impl AudioEffectPhaserMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectPhaserMethodTable = AudioEffectPhaserMethodTable { class_constructor : None , get_depth : 0 as * mut sys :: godot_method_bind , get_feedback : 0 as * mut sys :: godot_method_bind , get_range_max_hz : 0 as * mut sys :: godot_method_bind , get_range_min_hz : 0 as * mut sys :: godot_method_bind , get_rate_hz : 0 as * mut sys :: godot_method_bind , set_depth : 0 as * mut sys :: godot_method_bind , set_feedback : 0 as * mut sys :: godot_method_bind , set_range_max_hz : 0 as * mut sys :: godot_method_bind , set_range_min_hz : 0 as * mut sys :: godot_method_bind , set_rate_hz : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectPhaserMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectPhaser\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_depth\0" . as_ptr () as * const c_char) ; table . get_feedback = (gd_api . godot_method_bind_get_method) (class_name , "get_feedback\0" . as_ptr () as * const c_char) ; table . get_range_max_hz = (gd_api . godot_method_bind_get_method) (class_name , "get_range_max_hz\0" . as_ptr () as * const c_char) ; table . get_range_min_hz = (gd_api . godot_method_bind_get_method) (class_name , "get_range_min_hz\0" . as_ptr () as * const c_char) ; table . get_rate_hz = (gd_api . godot_method_bind_get_method) (class_name , "get_rate_hz\0" . as_ptr () as * const c_char) ; table . set_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_depth\0" . as_ptr () as * const c_char) ; table . set_feedback = (gd_api . godot_method_bind_get_method) (class_name , "set_feedback\0" . as_ptr () as * const c_char) ; table . set_range_max_hz = (gd_api . godot_method_bind_get_method) (class_name , "set_range_max_hz\0" . as_ptr () as * const c_char) ; table . set_range_min_hz = (gd_api . godot_method_bind_get_method) (class_name , "set_range_min_hz\0" . as_ptr () as * const c_char) ; table . set_rate_hz = (gd_api . godot_method_bind_get_method) (class_name , "set_rate_hz\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_phaser::private::AudioEffectPhaser;
            
            pub mod audio_effect_pitch_shift {
                # ! [doc = "This module contains types related to the API class [`AudioEffectPitchShift`][super::AudioEffectPitchShift]."] pub (crate) mod private { # [doc = "`core class AudioEffectPitchShift` inherits `AudioEffect` (reference-counted).\n\nThis class has related types in the [`audio_effect_pitch_shift`][super::audio_effect_pitch_shift] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectpitchshift.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectPitchShift inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectPitchShift { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectPitchShift ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct FftSize (pub i64) ; impl FftSize { pub const _256 : FftSize = FftSize (0i64) ; pub const _512 : FftSize = FftSize (1i64) ; pub const _1024 : FftSize = FftSize (2i64) ; pub const _2048 : FftSize = FftSize (3i64) ; pub const _4096 : FftSize = FftSize (4i64) ; pub const MAX : FftSize = FftSize (5i64) ; } impl From < i64 > for FftSize { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < FftSize > for i64 { # [inline] fn from (v : FftSize) -> Self { v . 0 } } impl FromVariant for FftSize { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioEffectPitchShift { pub const FFT_SIZE_256 : i64 = 0i64 ; pub const FFT_SIZE_512 : i64 = 1i64 ; pub const FFT_SIZE_1024 : i64 = 2i64 ; pub const FFT_SIZE_2048 : i64 = 3i64 ; pub const FFT_SIZE_4096 : i64 = 4i64 ; pub const FFT_SIZE_MAX : i64 = 5i64 ; } impl AudioEffectPitchShift { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectPitchShiftMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The size of the [Fast Fourier transform](https://en.wikipedia.org/wiki/Fast_Fourier_transform) buffer. Higher values smooth out the effect over time, but have greater latency. The effects of this higher latency are especially noticeable on sounds that have sudden amplitude changes."] # [doc = ""] # [inline] pub fn fft_size (& self) -> crate :: generated :: audio_effect_pitch_shift :: FftSize { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPitchShiftMethodTable :: get (get_api ()) . get_fft_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: audio_effect_pitch_shift :: FftSize > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The oversampling factor to use. Higher values result in better quality, but are more demanding on the CPU and may cause audio cracking if the CPU can't keep up."] # [doc = ""] # [inline] pub fn oversampling (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPitchShiftMethodTable :: get (get_api ()) . get_oversampling ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The pitch scale to use. `1.0` is the default pitch and plays sounds unaltered. [`pitch_scale`][Self::pitch_scale] can range from `0.0` (infinitely low pitch, inaudible) to `16` (16 times higher than the initial pitch)."] # [doc = ""] # [inline] pub fn pitch_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPitchShiftMethodTable :: get (get_api ()) . get_pitch_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The size of the [Fast Fourier transform](https://en.wikipedia.org/wiki/Fast_Fourier_transform) buffer. Higher values smooth out the effect over time, but have greater latency. The effects of this higher latency are especially noticeable on sounds that have sudden amplitude changes."] # [doc = ""] # [inline] pub fn set_fft_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPitchShiftMethodTable :: get (get_api ()) . set_fft_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } # [doc = "The oversampling factor to use. Higher values result in better quality, but are more demanding on the CPU and may cause audio cracking if the CPU can't keep up."] # [doc = ""] # [inline] pub fn set_oversampling (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPitchShiftMethodTable :: get (get_api ()) . set_oversampling ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "The pitch scale to use. `1.0` is the default pitch and plays sounds unaltered. [`pitch_scale`][Self::pitch_scale] can range from `0.0` (infinitely low pitch, inaudible) to `16` (16 times higher than the initial pitch)."] # [doc = ""] # [inline] pub fn set_pitch_scale (& self , rate : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectPitchShiftMethodTable :: get (get_api ()) . set_pitch_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , rate as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectPitchShift { } unsafe impl GodotObject for AudioEffectPitchShift { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectPitchShift" } } impl std :: ops :: Deref for AudioEffectPitchShift { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectPitchShift { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectPitchShift { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectPitchShift { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectPitchShift { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectPitchShift { } impl Instanciable for AudioEffectPitchShift { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectPitchShift :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectPitchShiftMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_fft_size : * mut sys :: godot_method_bind , pub get_oversampling : * mut sys :: godot_method_bind , pub get_pitch_scale : * mut sys :: godot_method_bind , pub set_fft_size : * mut sys :: godot_method_bind , pub set_oversampling : * mut sys :: godot_method_bind , pub set_pitch_scale : * mut sys :: godot_method_bind } impl AudioEffectPitchShiftMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectPitchShiftMethodTable = AudioEffectPitchShiftMethodTable { class_constructor : None , get_fft_size : 0 as * mut sys :: godot_method_bind , get_oversampling : 0 as * mut sys :: godot_method_bind , get_pitch_scale : 0 as * mut sys :: godot_method_bind , set_fft_size : 0 as * mut sys :: godot_method_bind , set_oversampling : 0 as * mut sys :: godot_method_bind , set_pitch_scale : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectPitchShiftMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectPitchShift\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_fft_size = (gd_api . godot_method_bind_get_method) (class_name , "get_fft_size\0" . as_ptr () as * const c_char) ; table . get_oversampling = (gd_api . godot_method_bind_get_method) (class_name , "get_oversampling\0" . as_ptr () as * const c_char) ; table . get_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_pitch_scale\0" . as_ptr () as * const c_char) ; table . set_fft_size = (gd_api . godot_method_bind_get_method) (class_name , "set_fft_size\0" . as_ptr () as * const c_char) ; table . set_oversampling = (gd_api . godot_method_bind_get_method) (class_name , "set_oversampling\0" . as_ptr () as * const c_char) ; table . set_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_pitch_scale\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_pitch_shift::private::AudioEffectPitchShift;
            
            pub(crate) mod audio_effect_record {
                # ! [doc = "This module contains types related to the API class [`AudioEffectRecord`][super::AudioEffectRecord]."] pub (crate) mod private { # [doc = "`core class AudioEffectRecord` inherits `AudioEffect` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectrecord.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectRecord inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectRecord { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectRecord ; impl AudioEffectRecord { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectRecordMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Specifies the format in which the sample will be recorded. See [enum AudioStreamSample.Format] for available formats."] # [doc = ""] # [inline] pub fn format (& self) -> crate :: generated :: audio_stream_sample :: Format { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectRecordMethodTable :: get (get_api ()) . get_format ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: audio_stream_sample :: Format > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the recorded sample."] # [doc = ""] # [inline] pub fn get_recording (& self) -> Option < Ref < crate :: generated :: AudioStreamSample , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectRecordMethodTable :: get (get_api ()) . get_recording ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: AudioStreamSample , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns whether the recording is active or not."] # [doc = ""] # [inline] pub fn is_recording_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectRecordMethodTable :: get (get_api ()) . is_recording_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Specifies the format in which the sample will be recorded. See [enum AudioStreamSample.Format] for available formats."] # [doc = ""] # [inline] pub fn set_format (& self , format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectRecordMethodTable :: get (get_api ()) . set_format ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , format as _) ; } } # [doc = "If `true`, the sound will be recorded. Note that restarting the recording will remove the previously recorded sample."] # [doc = ""] # [inline] pub fn set_recording_active (& self , record : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectRecordMethodTable :: get (get_api ()) . set_recording_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , record as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectRecord { } unsafe impl GodotObject for AudioEffectRecord { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectRecord" } } impl std :: ops :: Deref for AudioEffectRecord { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectRecord { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectRecord { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectRecord { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectRecord { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectRecord { } impl Instanciable for AudioEffectRecord { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectRecord :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectRecordMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_format : * mut sys :: godot_method_bind , pub get_recording : * mut sys :: godot_method_bind , pub is_recording_active : * mut sys :: godot_method_bind , pub set_format : * mut sys :: godot_method_bind , pub set_recording_active : * mut sys :: godot_method_bind } impl AudioEffectRecordMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectRecordMethodTable = AudioEffectRecordMethodTable { class_constructor : None , get_format : 0 as * mut sys :: godot_method_bind , get_recording : 0 as * mut sys :: godot_method_bind , is_recording_active : 0 as * mut sys :: godot_method_bind , set_format : 0 as * mut sys :: godot_method_bind , set_recording_active : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectRecordMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectRecord\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\0" . as_ptr () as * const c_char) ; table . get_recording = (gd_api . godot_method_bind_get_method) (class_name , "get_recording\0" . as_ptr () as * const c_char) ; table . is_recording_active = (gd_api . godot_method_bind_get_method) (class_name , "is_recording_active\0" . as_ptr () as * const c_char) ; table . set_format = (gd_api . godot_method_bind_get_method) (class_name , "set_format\0" . as_ptr () as * const c_char) ; table . set_recording_active = (gd_api . godot_method_bind_get_method) (class_name , "set_recording_active\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_record::private::AudioEffectRecord;
            
            pub(crate) mod audio_effect_reverb {
                # ! [doc = "This module contains types related to the API class [`AudioEffectReverb`][super::AudioEffectReverb]."] pub (crate) mod private { # [doc = "`core class AudioEffectReverb` inherits `AudioEffect` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectreverb.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectReverb inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectReverb { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectReverb ; impl AudioEffectReverb { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectReverbMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Defines how reflective the imaginary room's walls are. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn damping (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . get_damping ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn dry (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . get_dry ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "High-pass filter passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn hpf (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . get_hpf ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Output percent of predelay. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn predelay_feedback (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . get_predelay_feedback ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Time between the original signal and the early reflections of the reverb signal, in milliseconds."] # [doc = ""] # [inline] pub fn predelay_msec (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . get_predelay_msec ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn room_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . get_room_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn spread (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . get_spread ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn wet (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . get_wet ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Defines how reflective the imaginary room's walls are. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn set_damping (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . set_damping ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn set_dry (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . set_dry ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "High-pass filter passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn set_hpf (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . set_hpf ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Output percent of predelay. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn set_predelay_feedback (& self , feedback : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . set_predelay_feedback ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , feedback as _) ; } } # [doc = "Time between the original signal and the early reflections of the reverb signal, in milliseconds."] # [doc = ""] # [inline] pub fn set_predelay_msec (& self , msec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . set_predelay_msec ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , msec as _) ; } } # [doc = "Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn set_room_size (& self , size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . set_room_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } # [doc = "Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn set_spread (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . set_spread ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1."] # [doc = ""] # [inline] pub fn set_wet (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectReverbMethodTable :: get (get_api ()) . set_wet ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectReverb { } unsafe impl GodotObject for AudioEffectReverb { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectReverb" } } impl std :: ops :: Deref for AudioEffectReverb { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectReverb { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectReverb { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectReverb { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectReverb { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectReverb { } impl Instanciable for AudioEffectReverb { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectReverb :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectReverbMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_damping : * mut sys :: godot_method_bind , pub get_dry : * mut sys :: godot_method_bind , pub get_hpf : * mut sys :: godot_method_bind , pub get_predelay_feedback : * mut sys :: godot_method_bind , pub get_predelay_msec : * mut sys :: godot_method_bind , pub get_room_size : * mut sys :: godot_method_bind , pub get_spread : * mut sys :: godot_method_bind , pub get_wet : * mut sys :: godot_method_bind , pub set_damping : * mut sys :: godot_method_bind , pub set_dry : * mut sys :: godot_method_bind , pub set_hpf : * mut sys :: godot_method_bind , pub set_predelay_feedback : * mut sys :: godot_method_bind , pub set_predelay_msec : * mut sys :: godot_method_bind , pub set_room_size : * mut sys :: godot_method_bind , pub set_spread : * mut sys :: godot_method_bind , pub set_wet : * mut sys :: godot_method_bind } impl AudioEffectReverbMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectReverbMethodTable = AudioEffectReverbMethodTable { class_constructor : None , get_damping : 0 as * mut sys :: godot_method_bind , get_dry : 0 as * mut sys :: godot_method_bind , get_hpf : 0 as * mut sys :: godot_method_bind , get_predelay_feedback : 0 as * mut sys :: godot_method_bind , get_predelay_msec : 0 as * mut sys :: godot_method_bind , get_room_size : 0 as * mut sys :: godot_method_bind , get_spread : 0 as * mut sys :: godot_method_bind , get_wet : 0 as * mut sys :: godot_method_bind , set_damping : 0 as * mut sys :: godot_method_bind , set_dry : 0 as * mut sys :: godot_method_bind , set_hpf : 0 as * mut sys :: godot_method_bind , set_predelay_feedback : 0 as * mut sys :: godot_method_bind , set_predelay_msec : 0 as * mut sys :: godot_method_bind , set_room_size : 0 as * mut sys :: godot_method_bind , set_spread : 0 as * mut sys :: godot_method_bind , set_wet : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectReverbMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectReverb\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_damping = (gd_api . godot_method_bind_get_method) (class_name , "get_damping\0" . as_ptr () as * const c_char) ; table . get_dry = (gd_api . godot_method_bind_get_method) (class_name , "get_dry\0" . as_ptr () as * const c_char) ; table . get_hpf = (gd_api . godot_method_bind_get_method) (class_name , "get_hpf\0" . as_ptr () as * const c_char) ; table . get_predelay_feedback = (gd_api . godot_method_bind_get_method) (class_name , "get_predelay_feedback\0" . as_ptr () as * const c_char) ; table . get_predelay_msec = (gd_api . godot_method_bind_get_method) (class_name , "get_predelay_msec\0" . as_ptr () as * const c_char) ; table . get_room_size = (gd_api . godot_method_bind_get_method) (class_name , "get_room_size\0" . as_ptr () as * const c_char) ; table . get_spread = (gd_api . godot_method_bind_get_method) (class_name , "get_spread\0" . as_ptr () as * const c_char) ; table . get_wet = (gd_api . godot_method_bind_get_method) (class_name , "get_wet\0" . as_ptr () as * const c_char) ; table . set_damping = (gd_api . godot_method_bind_get_method) (class_name , "set_damping\0" . as_ptr () as * const c_char) ; table . set_dry = (gd_api . godot_method_bind_get_method) (class_name , "set_dry\0" . as_ptr () as * const c_char) ; table . set_hpf = (gd_api . godot_method_bind_get_method) (class_name , "set_hpf\0" . as_ptr () as * const c_char) ; table . set_predelay_feedback = (gd_api . godot_method_bind_get_method) (class_name , "set_predelay_feedback\0" . as_ptr () as * const c_char) ; table . set_predelay_msec = (gd_api . godot_method_bind_get_method) (class_name , "set_predelay_msec\0" . as_ptr () as * const c_char) ; table . set_room_size = (gd_api . godot_method_bind_get_method) (class_name , "set_room_size\0" . as_ptr () as * const c_char) ; table . set_spread = (gd_api . godot_method_bind_get_method) (class_name , "set_spread\0" . as_ptr () as * const c_char) ; table . set_wet = (gd_api . godot_method_bind_get_method) (class_name , "set_wet\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_reverb::private::AudioEffectReverb;
            
            pub mod audio_effect_spectrum_analyzer {
                # ! [doc = "This module contains types related to the API class [`AudioEffectSpectrumAnalyzer`][super::AudioEffectSpectrumAnalyzer]."] pub (crate) mod private { # [doc = "`core class AudioEffectSpectrumAnalyzer` inherits `AudioEffect` (reference-counted).\n\nThis class has related types in the [`audio_effect_spectrum_analyzer`][super::audio_effect_spectrum_analyzer] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectspectrumanalyzer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectSpectrumAnalyzer inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectSpectrumAnalyzer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectSpectrumAnalyzer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct FftSize (pub i64) ; impl FftSize { pub const _256 : FftSize = FftSize (0i64) ; pub const _512 : FftSize = FftSize (1i64) ; pub const _1024 : FftSize = FftSize (2i64) ; pub const _2048 : FftSize = FftSize (3i64) ; pub const _4096 : FftSize = FftSize (4i64) ; pub const MAX : FftSize = FftSize (5i64) ; } impl From < i64 > for FftSize { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < FftSize > for i64 { # [inline] fn from (v : FftSize) -> Self { v . 0 } } impl FromVariant for FftSize { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioEffectSpectrumAnalyzer { pub const FFT_SIZE_256 : i64 = 0i64 ; pub const FFT_SIZE_512 : i64 = 1i64 ; pub const FFT_SIZE_1024 : i64 = 2i64 ; pub const FFT_SIZE_2048 : i64 = 3i64 ; pub const FFT_SIZE_4096 : i64 = 4i64 ; pub const FFT_SIZE_MAX : i64 = 5i64 ; } impl AudioEffectSpectrumAnalyzer { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectSpectrumAnalyzerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The length of the buffer to keep (in seconds). Higher values keep data around for longer, but require more memory."] # [doc = ""] # [inline] pub fn buffer_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectSpectrumAnalyzerMethodTable :: get (get_api ()) . get_buffer_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The size of the [Fast Fourier transform](https://en.wikipedia.org/wiki/Fast_Fourier_transform) buffer. Higher values smooth out the spectrum analysis over time, but have greater latency. The effects of this higher latency are especially noticeable with sudden amplitude changes."] # [doc = ""] # [inline] pub fn fft_size (& self) -> crate :: generated :: audio_effect_spectrum_analyzer :: FftSize { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectSpectrumAnalyzerMethodTable :: get (get_api ()) . get_fft_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: audio_effect_spectrum_analyzer :: FftSize > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn tap_back_pos (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectSpectrumAnalyzerMethodTable :: get (get_api ()) . get_tap_back_pos ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The length of the buffer to keep (in seconds). Higher values keep data around for longer, but require more memory."] # [doc = ""] # [inline] pub fn set_buffer_length (& self , seconds : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectSpectrumAnalyzerMethodTable :: get (get_api ()) . set_buffer_length ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , seconds as _) ; } } # [doc = "The size of the [Fast Fourier transform](https://en.wikipedia.org/wiki/Fast_Fourier_transform) buffer. Higher values smooth out the spectrum analysis over time, but have greater latency. The effects of this higher latency are especially noticeable with sudden amplitude changes."] # [doc = ""] # [inline] pub fn set_fft_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectSpectrumAnalyzerMethodTable :: get (get_api ()) . set_fft_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_tap_back_pos (& self , seconds : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectSpectrumAnalyzerMethodTable :: get (get_api ()) . set_tap_back_pos ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , seconds as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectSpectrumAnalyzer { } unsafe impl GodotObject for AudioEffectSpectrumAnalyzer { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectSpectrumAnalyzer" } } impl std :: ops :: Deref for AudioEffectSpectrumAnalyzer { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectSpectrumAnalyzer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectSpectrumAnalyzer { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectSpectrumAnalyzer { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectSpectrumAnalyzer { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectSpectrumAnalyzer { } impl Instanciable for AudioEffectSpectrumAnalyzer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectSpectrumAnalyzer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectSpectrumAnalyzerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_buffer_length : * mut sys :: godot_method_bind , pub get_fft_size : * mut sys :: godot_method_bind , pub get_tap_back_pos : * mut sys :: godot_method_bind , pub set_buffer_length : * mut sys :: godot_method_bind , pub set_fft_size : * mut sys :: godot_method_bind , pub set_tap_back_pos : * mut sys :: godot_method_bind } impl AudioEffectSpectrumAnalyzerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectSpectrumAnalyzerMethodTable = AudioEffectSpectrumAnalyzerMethodTable { class_constructor : None , get_buffer_length : 0 as * mut sys :: godot_method_bind , get_fft_size : 0 as * mut sys :: godot_method_bind , get_tap_back_pos : 0 as * mut sys :: godot_method_bind , set_buffer_length : 0 as * mut sys :: godot_method_bind , set_fft_size : 0 as * mut sys :: godot_method_bind , set_tap_back_pos : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectSpectrumAnalyzerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectSpectrumAnalyzer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_buffer_length = (gd_api . godot_method_bind_get_method) (class_name , "get_buffer_length\0" . as_ptr () as * const c_char) ; table . get_fft_size = (gd_api . godot_method_bind_get_method) (class_name , "get_fft_size\0" . as_ptr () as * const c_char) ; table . get_tap_back_pos = (gd_api . godot_method_bind_get_method) (class_name , "get_tap_back_pos\0" . as_ptr () as * const c_char) ; table . set_buffer_length = (gd_api . godot_method_bind_get_method) (class_name , "set_buffer_length\0" . as_ptr () as * const c_char) ; table . set_fft_size = (gd_api . godot_method_bind_get_method) (class_name , "set_fft_size\0" . as_ptr () as * const c_char) ; table . set_tap_back_pos = (gd_api . godot_method_bind_get_method) (class_name , "set_tap_back_pos\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_spectrum_analyzer::private::AudioEffectSpectrumAnalyzer;
            
            pub mod audio_effect_spectrum_analyzer_instance {
                # ! [doc = "This module contains types related to the API class [`AudioEffectSpectrumAnalyzerInstance`][super::AudioEffectSpectrumAnalyzerInstance]."] pub (crate) mod private { # [doc = "`core class AudioEffectSpectrumAnalyzerInstance` inherits `AudioEffectInstance` (reference-counted).\n\nThis class has related types in the [`audio_effect_spectrum_analyzer_instance`][super::audio_effect_spectrum_analyzer_instance] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectspectrumanalyzerinstance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectSpectrumAnalyzerInstance inherits methods from:\n - [AudioEffectInstance](struct.AudioEffectInstance.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectSpectrumAnalyzerInstance { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectSpectrumAnalyzerInstance ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MagnitudeMode (pub i64) ; impl MagnitudeMode { pub const AVERAGE : MagnitudeMode = MagnitudeMode (0i64) ; pub const MAX : MagnitudeMode = MagnitudeMode (1i64) ; } impl From < i64 > for MagnitudeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MagnitudeMode > for i64 { # [inline] fn from (v : MagnitudeMode) -> Self { v . 0 } } impl FromVariant for MagnitudeMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioEffectSpectrumAnalyzerInstance { pub const MAGNITUDE_AVERAGE : i64 = 0i64 ; pub const MAGNITUDE_MAX : i64 = 1i64 ; } impl AudioEffectSpectrumAnalyzerInstance { # [doc = "\n# Default Arguments\n* `mode` - `1`"] # [doc = ""] # [inline] pub fn get_magnitude_for_frequency_range (& self , from_hz : f64 , to_hz : f64 , mode : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectSpectrumAnalyzerInstanceMethodTable :: get (get_api ()) . get_magnitude_for_frequency_range ; let ret = crate :: icalls :: icallvar__f64_f64_i64 (method_bind , self . this . sys () . as_ptr () , from_hz as _ , to_hz as _ , mode as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectSpectrumAnalyzerInstance { } unsafe impl GodotObject for AudioEffectSpectrumAnalyzerInstance { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectSpectrumAnalyzerInstance" } } impl std :: ops :: Deref for AudioEffectSpectrumAnalyzerInstance { type Target = crate :: generated :: AudioEffectInstance ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffectInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectSpectrumAnalyzerInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffectInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffectInstance > for AudioEffectSpectrumAnalyzerInstance { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectSpectrumAnalyzerInstance { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectSpectrumAnalyzerInstance { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectSpectrumAnalyzerInstanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_magnitude_for_frequency_range : * mut sys :: godot_method_bind } impl AudioEffectSpectrumAnalyzerInstanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectSpectrumAnalyzerInstanceMethodTable = AudioEffectSpectrumAnalyzerInstanceMethodTable { class_constructor : None , get_magnitude_for_frequency_range : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectSpectrumAnalyzerInstanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectSpectrumAnalyzerInstance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_magnitude_for_frequency_range = (gd_api . godot_method_bind_get_method) (class_name , "get_magnitude_for_frequency_range\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_spectrum_analyzer_instance::private::AudioEffectSpectrumAnalyzerInstance;
            
            pub(crate) mod audio_effect_stereo_enhance {
                # ! [doc = "This module contains types related to the API class [`AudioEffectStereoEnhance`][super::AudioEffectStereoEnhance]."] pub (crate) mod private { # [doc = "`core class AudioEffectStereoEnhance` inherits `AudioEffect` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioeffectstereoenhance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioEffectStereoEnhance inherits methods from:\n - [AudioEffect](struct.AudioEffect.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioEffectStereoEnhance { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioEffectStereoEnhance ; impl AudioEffectStereoEnhance { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioEffectStereoEnhanceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn pan_pullout (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectStereoEnhanceMethodTable :: get (get_api ()) . get_pan_pullout ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn surround (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectStereoEnhanceMethodTable :: get (get_api ()) . get_surround ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn time_pullout (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectStereoEnhanceMethodTable :: get (get_api ()) . get_time_pullout ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_pan_pullout (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectStereoEnhanceMethodTable :: get (get_api ()) . set_pan_pullout ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_surround (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectStereoEnhanceMethodTable :: get (get_api ()) . set_surround ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_time_pullout (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioEffectStereoEnhanceMethodTable :: get (get_api ()) . set_time_pullout ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioEffectStereoEnhance { } unsafe impl GodotObject for AudioEffectStereoEnhance { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioEffectStereoEnhance" } } impl std :: ops :: Deref for AudioEffectStereoEnhance { type Target = crate :: generated :: AudioEffect ; # [inline] fn deref (& self) -> & crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioEffectStereoEnhance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioEffect { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioEffect > for AudioEffectStereoEnhance { } unsafe impl SubClass < crate :: generated :: Resource > for AudioEffectStereoEnhance { } unsafe impl SubClass < crate :: generated :: Reference > for AudioEffectStereoEnhance { } unsafe impl SubClass < crate :: generated :: Object > for AudioEffectStereoEnhance { } impl Instanciable for AudioEffectStereoEnhance { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioEffectStereoEnhance :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioEffectStereoEnhanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_pan_pullout : * mut sys :: godot_method_bind , pub get_surround : * mut sys :: godot_method_bind , pub get_time_pullout : * mut sys :: godot_method_bind , pub set_pan_pullout : * mut sys :: godot_method_bind , pub set_surround : * mut sys :: godot_method_bind , pub set_time_pullout : * mut sys :: godot_method_bind } impl AudioEffectStereoEnhanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioEffectStereoEnhanceMethodTable = AudioEffectStereoEnhanceMethodTable { class_constructor : None , get_pan_pullout : 0 as * mut sys :: godot_method_bind , get_surround : 0 as * mut sys :: godot_method_bind , get_time_pullout : 0 as * mut sys :: godot_method_bind , set_pan_pullout : 0 as * mut sys :: godot_method_bind , set_surround : 0 as * mut sys :: godot_method_bind , set_time_pullout : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioEffectStereoEnhanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioEffectStereoEnhance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_pan_pullout = (gd_api . godot_method_bind_get_method) (class_name , "get_pan_pullout\0" . as_ptr () as * const c_char) ; table . get_surround = (gd_api . godot_method_bind_get_method) (class_name , "get_surround\0" . as_ptr () as * const c_char) ; table . get_time_pullout = (gd_api . godot_method_bind_get_method) (class_name , "get_time_pullout\0" . as_ptr () as * const c_char) ; table . set_pan_pullout = (gd_api . godot_method_bind_get_method) (class_name , "set_pan_pullout\0" . as_ptr () as * const c_char) ; table . set_surround = (gd_api . godot_method_bind_get_method) (class_name , "set_surround\0" . as_ptr () as * const c_char) ; table . set_time_pullout = (gd_api . godot_method_bind_get_method) (class_name , "set_time_pullout\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_effect_stereo_enhance::private::AudioEffectStereoEnhance;
            
            pub mod audio_server {
                # ! [doc = "This module contains types related to the API class [`AudioServer`][super::AudioServer]."] pub (crate) mod private { # [doc = "`core singleton class AudioServer` inherits `Object` (manually managed).\n\nThis class has related types in the [`audio_server`][super::audio_server] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audioserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nAudioServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioServer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioServer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SpeakerMode (pub i64) ; impl SpeakerMode { pub const MODE_STEREO : SpeakerMode = SpeakerMode (0i64) ; pub const SURROUND_31 : SpeakerMode = SpeakerMode (1i64) ; pub const SURROUND_51 : SpeakerMode = SpeakerMode (2i64) ; pub const SURROUND_71 : SpeakerMode = SpeakerMode (3i64) ; } impl From < i64 > for SpeakerMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SpeakerMode > for i64 { # [inline] fn from (v : SpeakerMode) -> Self { v . 0 } } impl FromVariant for SpeakerMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioServer { pub const SPEAKER_MODE_STEREO : i64 = 0i64 ; pub const SPEAKER_SURROUND_31 : i64 = 1i64 ; pub const SPEAKER_SURROUND_51 : i64 = 2i64 ; pub const SPEAKER_SURROUND_71 : i64 = 3i64 ; } impl AudioServer { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("AudioServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Adds a bus at `at_position`.\n# Default Arguments\n* `at_position` - `-1`"] # [doc = ""] # [inline] pub fn add_bus (& self , at_position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . add_bus ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , at_position as _) ; } } # [doc = "Adds an [`AudioEffect`][AudioEffect] effect to the bus `bus_idx` at `at_position`.\n# Default Arguments\n* `at_position` - `-1`"] # [doc = ""] # [inline] pub fn add_bus_effect (& self , bus_idx : i64 , effect : impl AsArg < crate :: generated :: AudioEffect > , at_position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . add_bus_effect ; let ret = crate :: icalls :: icallvar__i64_obj_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _ , effect . as_arg_ptr () , at_position as _) ; } } # [doc = "Name of the current device for audio input (see [`capture_get_device_list`][Self::capture_get_device_list]). On systems with multiple audio inputs (such as analog, USB and HDMI audio), this can be used to select the audio input device. The value `\"Default\"` will record audio on the system-wide default audio input. If an invalid device name is set, the value will be reverted back to `\"Default\"`.\n**Note:** [member ProjectSettings.audio/enable_audio_input] must be `true` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings."] # [doc = ""] # [inline] pub fn capture_get_device (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . capture_get_device ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the names of all audio input devices detected on the system.\n**Note:** [member ProjectSettings.audio/enable_audio_input] must be `true` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings."] # [doc = ""] # [inline] pub fn capture_get_device_list (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . capture_get_device_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Name of the current device for audio input (see [`capture_get_device_list`][Self::capture_get_device_list]). On systems with multiple audio inputs (such as analog, USB and HDMI audio), this can be used to select the audio input device. The value `\"Default\"` will record audio on the system-wide default audio input. If an invalid device name is set, the value will be reverted back to `\"Default\"`.\n**Note:** [member ProjectSettings.audio/enable_audio_input] must be `true` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings."] # [doc = ""] # [inline] pub fn capture_set_device (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . capture_set_device ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Generates an [`AudioBusLayout`][AudioBusLayout] using the available buses and effects."] # [doc = ""] # [inline] pub fn generate_bus_layout (& self) -> Option < Ref < crate :: generated :: AudioBusLayout , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . generate_bus_layout ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: AudioBusLayout , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the amount of channels of the bus at index `bus_idx`."] # [doc = ""] # [inline] pub fn get_bus_channels (& self , bus_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_channels ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Number of available audio buses."] # [doc = ""] # [inline] pub fn bus_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`AudioEffect`][AudioEffect] at position `effect_idx` in bus `bus_idx`."] # [doc = ""] # [inline] pub fn get_bus_effect (& self , bus_idx : i64 , effect_idx : i64) -> Option < Ref < crate :: generated :: AudioEffect , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_effect ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _ , effect_idx as _) ; < Option < Ref < crate :: generated :: AudioEffect , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of effects on the bus at `bus_idx`."] # [doc = ""] # [inline] pub fn get_bus_effect_count (& self , bus_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_effect_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`AudioEffectInstance`][AudioEffectInstance] assigned to the given bus and effect indices (and optionally channel).\n# Default Arguments\n* `channel` - `0`"] # [doc = ""] # [inline] pub fn get_bus_effect_instance (& self , bus_idx : i64 , effect_idx : i64 , channel : i64) -> Option < Ref < crate :: generated :: AudioEffectInstance , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_effect_instance ; let ret = crate :: icalls :: icallvar__i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _ , effect_idx as _ , channel as _) ; < Option < Ref < crate :: generated :: AudioEffectInstance , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the index of the bus with the name `bus_name`."] # [doc = ""] # [inline] pub fn get_bus_index (& self , bus_name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_index ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , bus_name . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the name of the bus with the index `bus_idx`."] # [doc = ""] # [inline] pub fn get_bus_name (& self , bus_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the peak volume of the left speaker at bus index `bus_idx` and channel index `channel`."] # [doc = ""] # [inline] pub fn get_bus_peak_volume_left_db (& self , bus_idx : i64 , channel : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_peak_volume_left_db ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _ , channel as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the peak volume of the right speaker at bus index `bus_idx` and channel index `channel`."] # [doc = ""] # [inline] pub fn get_bus_peak_volume_right_db (& self , bus_idx : i64 , channel : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_peak_volume_right_db ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _ , channel as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the name of the bus that the bus at index `bus_idx` sends to."] # [doc = ""] # [inline] pub fn get_bus_send (& self , bus_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_send ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the volume of the bus at index `bus_idx` in dB."] # [doc = ""] # [inline] pub fn get_bus_volume_db (& self , bus_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_bus_volume_db ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Name of the current device for audio output (see [`get_device_list`][Self::get_device_list]). On systems with multiple audio outputs (such as analog, USB and HDMI audio), this can be used to select the audio output device. The value `\"Default\"` will play audio on the system-wide default audio output. If an invalid device name is set, the value will be reverted back to `\"Default\"`."] # [doc = ""] # [inline] pub fn device (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_device ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the names of all audio devices detected on the system."] # [doc = ""] # [inline] pub fn get_device_list (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_device_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Scales the rate at which audio is played (i.e. setting it to `0.5` will make the audio be played twice as fast)."] # [doc = ""] # [inline] pub fn global_rate_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_global_rate_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the sample rate at the output of the [`AudioServer`][AudioServer]."] # [doc = ""] # [inline] pub fn get_mix_rate (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_mix_rate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the audio driver's output latency."] # [doc = ""] # [inline] pub fn get_output_latency (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_output_latency ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the speaker configuration."] # [doc = ""] # [inline] pub fn get_speaker_mode (& self) -> crate :: generated :: audio_server :: SpeakerMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_speaker_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: audio_server :: SpeakerMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the relative time since the last mix occurred."] # [doc = ""] # [inline] pub fn get_time_since_last_mix (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_time_since_last_mix ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the relative time until the next mix occurs."] # [doc = ""] # [inline] pub fn get_time_to_next_mix (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . get_time_to_next_mix ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the bus at index `bus_idx` is bypassing effects."] # [doc = ""] # [inline] pub fn is_bus_bypassing_effects (& self , bus_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . is_bus_bypassing_effects ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the effect at index `effect_idx` on the bus at index `bus_idx` is enabled."] # [doc = ""] # [inline] pub fn is_bus_effect_enabled (& self , bus_idx : i64 , effect_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . is_bus_effect_enabled ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _ , effect_idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the bus at index `bus_idx` is muted."] # [doc = ""] # [inline] pub fn is_bus_mute (& self , bus_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . is_bus_mute ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the bus at index `bus_idx` is in solo mode."] # [doc = ""] # [inline] pub fn is_bus_solo (& self , bus_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . is_bus_solo ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Locks the audio driver's main loop.\n**Note:** Remember to unlock it afterwards."] # [doc = ""] # [inline] pub fn lock (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . lock ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Moves the bus from index `index` to index `to_index`."] # [doc = ""] # [inline] pub fn move_bus (& self , index : i64 , to_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . move_bus ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , index as _ , to_index as _) ; } } # [doc = "Removes the bus at index `index`."] # [doc = ""] # [inline] pub fn remove_bus (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . remove_bus ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } # [doc = "Removes the effect at index `effect_idx` from the bus at index `bus_idx`."] # [doc = ""] # [inline] pub fn remove_bus_effect (& self , bus_idx : i64 , effect_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . remove_bus_effect ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _ , effect_idx as _) ; } } # [doc = "If `true`, the bus at index `bus_idx` is bypassing effects."] # [doc = ""] # [inline] pub fn set_bus_bypass_effects (& self , bus_idx : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_bypass_effects ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bus_idx as _ , enable as _) ; } } # [doc = "Number of available audio buses."] # [doc = ""] # [inline] pub fn set_bus_count (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "If `true`, the effect at index `effect_idx` on the bus at index `bus_idx` is enabled."] # [doc = ""] # [inline] pub fn set_bus_effect_enabled (& self , bus_idx : i64 , effect_idx : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_effect_enabled ; let ret = crate :: icalls :: icallvar__i64_i64_bool (method_bind , self . this . sys () . as_ptr () , bus_idx as _ , effect_idx as _ , enabled as _) ; } } # [doc = "Overwrites the currently used [`AudioBusLayout`][AudioBusLayout]."] # [doc = ""] # [inline] pub fn set_bus_layout (& self , bus_layout : impl AsArg < crate :: generated :: AudioBusLayout >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_layout ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , bus_layout . as_arg_ptr ()) ; } } # [doc = "If `true`, the bus at index `bus_idx` is muted."] # [doc = ""] # [inline] pub fn set_bus_mute (& self , bus_idx : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_mute ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bus_idx as _ , enable as _) ; } } # [doc = "Sets the name of the bus at index `bus_idx` to `name`."] # [doc = ""] # [inline] pub fn set_bus_name (& self , bus_idx : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_name ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , bus_idx as _ , name . into ()) ; } } # [doc = "Connects the output of the bus at `bus_idx` to the bus named `send`."] # [doc = ""] # [inline] pub fn set_bus_send (& self , bus_idx : i64 , send : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_send ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , bus_idx as _ , send . into ()) ; } } # [doc = "If `true`, the bus at index `bus_idx` is in solo mode."] # [doc = ""] # [inline] pub fn set_bus_solo (& self , bus_idx : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_solo ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bus_idx as _ , enable as _) ; } } # [doc = "Sets the volume of the bus at index `bus_idx` to `volume_db`."] # [doc = ""] # [inline] pub fn set_bus_volume_db (& self , bus_idx : i64 , volume_db : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_bus_volume_db ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _ , volume_db as _) ; } } # [doc = "Name of the current device for audio output (see [`get_device_list`][Self::get_device_list]). On systems with multiple audio outputs (such as analog, USB and HDMI audio), this can be used to select the audio output device. The value `\"Default\"` will play audio on the system-wide default audio output. If an invalid device name is set, the value will be reverted back to `\"Default\"`."] # [doc = ""] # [inline] pub fn set_device (& self , device : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_device ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , device . into ()) ; } } # [doc = "Scales the rate at which audio is played (i.e. setting it to `0.5` will make the audio be played twice as fast)."] # [doc = ""] # [inline] pub fn set_global_rate_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . set_global_rate_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , scale as _) ; } } # [doc = "Swaps the position of two effects in bus `bus_idx`."] # [doc = ""] # [inline] pub fn swap_bus_effects (& self , bus_idx : i64 , effect_idx : i64 , by_effect_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . swap_bus_effects ; let ret = crate :: icalls :: icallvar__i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , bus_idx as _ , effect_idx as _ , by_effect_idx as _) ; } } # [doc = "Unlocks the audio driver's main loop. (After locking it, you should always unlock it.)"] # [doc = ""] # [inline] pub fn unlock (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioServerMethodTable :: get (get_api ()) . unlock ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioServer { } unsafe impl GodotObject for AudioServer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AudioServer" } } impl std :: ops :: Deref for AudioServer { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for AudioServer { } unsafe impl Send for AudioServer { } unsafe impl Sync for AudioServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_bus : * mut sys :: godot_method_bind , pub add_bus_effect : * mut sys :: godot_method_bind , pub capture_get_device : * mut sys :: godot_method_bind , pub capture_get_device_list : * mut sys :: godot_method_bind , pub capture_set_device : * mut sys :: godot_method_bind , pub generate_bus_layout : * mut sys :: godot_method_bind , pub get_bus_channels : * mut sys :: godot_method_bind , pub get_bus_count : * mut sys :: godot_method_bind , pub get_bus_effect : * mut sys :: godot_method_bind , pub get_bus_effect_count : * mut sys :: godot_method_bind , pub get_bus_effect_instance : * mut sys :: godot_method_bind , pub get_bus_index : * mut sys :: godot_method_bind , pub get_bus_name : * mut sys :: godot_method_bind , pub get_bus_peak_volume_left_db : * mut sys :: godot_method_bind , pub get_bus_peak_volume_right_db : * mut sys :: godot_method_bind , pub get_bus_send : * mut sys :: godot_method_bind , pub get_bus_volume_db : * mut sys :: godot_method_bind , pub get_device : * mut sys :: godot_method_bind , pub get_device_list : * mut sys :: godot_method_bind , pub get_global_rate_scale : * mut sys :: godot_method_bind , pub get_mix_rate : * mut sys :: godot_method_bind , pub get_output_latency : * mut sys :: godot_method_bind , pub get_speaker_mode : * mut sys :: godot_method_bind , pub get_time_since_last_mix : * mut sys :: godot_method_bind , pub get_time_to_next_mix : * mut sys :: godot_method_bind , pub is_bus_bypassing_effects : * mut sys :: godot_method_bind , pub is_bus_effect_enabled : * mut sys :: godot_method_bind , pub is_bus_mute : * mut sys :: godot_method_bind , pub is_bus_solo : * mut sys :: godot_method_bind , pub lock : * mut sys :: godot_method_bind , pub move_bus : * mut sys :: godot_method_bind , pub remove_bus : * mut sys :: godot_method_bind , pub remove_bus_effect : * mut sys :: godot_method_bind , pub set_bus_bypass_effects : * mut sys :: godot_method_bind , pub set_bus_count : * mut sys :: godot_method_bind , pub set_bus_effect_enabled : * mut sys :: godot_method_bind , pub set_bus_layout : * mut sys :: godot_method_bind , pub set_bus_mute : * mut sys :: godot_method_bind , pub set_bus_name : * mut sys :: godot_method_bind , pub set_bus_send : * mut sys :: godot_method_bind , pub set_bus_solo : * mut sys :: godot_method_bind , pub set_bus_volume_db : * mut sys :: godot_method_bind , pub set_device : * mut sys :: godot_method_bind , pub set_global_rate_scale : * mut sys :: godot_method_bind , pub swap_bus_effects : * mut sys :: godot_method_bind , pub unlock : * mut sys :: godot_method_bind } impl AudioServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioServerMethodTable = AudioServerMethodTable { class_constructor : None , add_bus : 0 as * mut sys :: godot_method_bind , add_bus_effect : 0 as * mut sys :: godot_method_bind , capture_get_device : 0 as * mut sys :: godot_method_bind , capture_get_device_list : 0 as * mut sys :: godot_method_bind , capture_set_device : 0 as * mut sys :: godot_method_bind , generate_bus_layout : 0 as * mut sys :: godot_method_bind , get_bus_channels : 0 as * mut sys :: godot_method_bind , get_bus_count : 0 as * mut sys :: godot_method_bind , get_bus_effect : 0 as * mut sys :: godot_method_bind , get_bus_effect_count : 0 as * mut sys :: godot_method_bind , get_bus_effect_instance : 0 as * mut sys :: godot_method_bind , get_bus_index : 0 as * mut sys :: godot_method_bind , get_bus_name : 0 as * mut sys :: godot_method_bind , get_bus_peak_volume_left_db : 0 as * mut sys :: godot_method_bind , get_bus_peak_volume_right_db : 0 as * mut sys :: godot_method_bind , get_bus_send : 0 as * mut sys :: godot_method_bind , get_bus_volume_db : 0 as * mut sys :: godot_method_bind , get_device : 0 as * mut sys :: godot_method_bind , get_device_list : 0 as * mut sys :: godot_method_bind , get_global_rate_scale : 0 as * mut sys :: godot_method_bind , get_mix_rate : 0 as * mut sys :: godot_method_bind , get_output_latency : 0 as * mut sys :: godot_method_bind , get_speaker_mode : 0 as * mut sys :: godot_method_bind , get_time_since_last_mix : 0 as * mut sys :: godot_method_bind , get_time_to_next_mix : 0 as * mut sys :: godot_method_bind , is_bus_bypassing_effects : 0 as * mut sys :: godot_method_bind , is_bus_effect_enabled : 0 as * mut sys :: godot_method_bind , is_bus_mute : 0 as * mut sys :: godot_method_bind , is_bus_solo : 0 as * mut sys :: godot_method_bind , lock : 0 as * mut sys :: godot_method_bind , move_bus : 0 as * mut sys :: godot_method_bind , remove_bus : 0 as * mut sys :: godot_method_bind , remove_bus_effect : 0 as * mut sys :: godot_method_bind , set_bus_bypass_effects : 0 as * mut sys :: godot_method_bind , set_bus_count : 0 as * mut sys :: godot_method_bind , set_bus_effect_enabled : 0 as * mut sys :: godot_method_bind , set_bus_layout : 0 as * mut sys :: godot_method_bind , set_bus_mute : 0 as * mut sys :: godot_method_bind , set_bus_name : 0 as * mut sys :: godot_method_bind , set_bus_send : 0 as * mut sys :: godot_method_bind , set_bus_solo : 0 as * mut sys :: godot_method_bind , set_bus_volume_db : 0 as * mut sys :: godot_method_bind , set_device : 0 as * mut sys :: godot_method_bind , set_global_rate_scale : 0 as * mut sys :: godot_method_bind , swap_bus_effects : 0 as * mut sys :: godot_method_bind , unlock : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_bus = (gd_api . godot_method_bind_get_method) (class_name , "add_bus\0" . as_ptr () as * const c_char) ; table . add_bus_effect = (gd_api . godot_method_bind_get_method) (class_name , "add_bus_effect\0" . as_ptr () as * const c_char) ; table . capture_get_device = (gd_api . godot_method_bind_get_method) (class_name , "capture_get_device\0" . as_ptr () as * const c_char) ; table . capture_get_device_list = (gd_api . godot_method_bind_get_method) (class_name , "capture_get_device_list\0" . as_ptr () as * const c_char) ; table . capture_set_device = (gd_api . godot_method_bind_get_method) (class_name , "capture_set_device\0" . as_ptr () as * const c_char) ; table . generate_bus_layout = (gd_api . godot_method_bind_get_method) (class_name , "generate_bus_layout\0" . as_ptr () as * const c_char) ; table . get_bus_channels = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_channels\0" . as_ptr () as * const c_char) ; table . get_bus_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_count\0" . as_ptr () as * const c_char) ; table . get_bus_effect = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_effect\0" . as_ptr () as * const c_char) ; table . get_bus_effect_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_effect_count\0" . as_ptr () as * const c_char) ; table . get_bus_effect_instance = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_effect_instance\0" . as_ptr () as * const c_char) ; table . get_bus_index = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_index\0" . as_ptr () as * const c_char) ; table . get_bus_name = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_name\0" . as_ptr () as * const c_char) ; table . get_bus_peak_volume_left_db = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_peak_volume_left_db\0" . as_ptr () as * const c_char) ; table . get_bus_peak_volume_right_db = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_peak_volume_right_db\0" . as_ptr () as * const c_char) ; table . get_bus_send = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_send\0" . as_ptr () as * const c_char) ; table . get_bus_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "get_bus_volume_db\0" . as_ptr () as * const c_char) ; table . get_device = (gd_api . godot_method_bind_get_method) (class_name , "get_device\0" . as_ptr () as * const c_char) ; table . get_device_list = (gd_api . godot_method_bind_get_method) (class_name , "get_device_list\0" . as_ptr () as * const c_char) ; table . get_global_rate_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_global_rate_scale\0" . as_ptr () as * const c_char) ; table . get_mix_rate = (gd_api . godot_method_bind_get_method) (class_name , "get_mix_rate\0" . as_ptr () as * const c_char) ; table . get_output_latency = (gd_api . godot_method_bind_get_method) (class_name , "get_output_latency\0" . as_ptr () as * const c_char) ; table . get_speaker_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_speaker_mode\0" . as_ptr () as * const c_char) ; table . get_time_since_last_mix = (gd_api . godot_method_bind_get_method) (class_name , "get_time_since_last_mix\0" . as_ptr () as * const c_char) ; table . get_time_to_next_mix = (gd_api . godot_method_bind_get_method) (class_name , "get_time_to_next_mix\0" . as_ptr () as * const c_char) ; table . is_bus_bypassing_effects = (gd_api . godot_method_bind_get_method) (class_name , "is_bus_bypassing_effects\0" . as_ptr () as * const c_char) ; table . is_bus_effect_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_bus_effect_enabled\0" . as_ptr () as * const c_char) ; table . is_bus_mute = (gd_api . godot_method_bind_get_method) (class_name , "is_bus_mute\0" . as_ptr () as * const c_char) ; table . is_bus_solo = (gd_api . godot_method_bind_get_method) (class_name , "is_bus_solo\0" . as_ptr () as * const c_char) ; table . lock = (gd_api . godot_method_bind_get_method) (class_name , "lock\0" . as_ptr () as * const c_char) ; table . move_bus = (gd_api . godot_method_bind_get_method) (class_name , "move_bus\0" . as_ptr () as * const c_char) ; table . remove_bus = (gd_api . godot_method_bind_get_method) (class_name , "remove_bus\0" . as_ptr () as * const c_char) ; table . remove_bus_effect = (gd_api . godot_method_bind_get_method) (class_name , "remove_bus_effect\0" . as_ptr () as * const c_char) ; table . set_bus_bypass_effects = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_bypass_effects\0" . as_ptr () as * const c_char) ; table . set_bus_count = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_count\0" . as_ptr () as * const c_char) ; table . set_bus_effect_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_effect_enabled\0" . as_ptr () as * const c_char) ; table . set_bus_layout = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_layout\0" . as_ptr () as * const c_char) ; table . set_bus_mute = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_mute\0" . as_ptr () as * const c_char) ; table . set_bus_name = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_name\0" . as_ptr () as * const c_char) ; table . set_bus_send = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_send\0" . as_ptr () as * const c_char) ; table . set_bus_solo = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_solo\0" . as_ptr () as * const c_char) ; table . set_bus_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "set_bus_volume_db\0" . as_ptr () as * const c_char) ; table . set_device = (gd_api . godot_method_bind_get_method) (class_name , "set_device\0" . as_ptr () as * const c_char) ; table . set_global_rate_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_global_rate_scale\0" . as_ptr () as * const c_char) ; table . swap_bus_effects = (gd_api . godot_method_bind_get_method) (class_name , "swap_bus_effects\0" . as_ptr () as * const c_char) ; table . unlock = (gd_api . godot_method_bind_get_method) (class_name , "unlock\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_server::private::AudioServer;
            
            pub(crate) mod audio_stream {
                # ! [doc = "This module contains types related to the API class [`AudioStream`][super::AudioStream]."] pub (crate) mod private { # [doc = "`core class AudioStream` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audiostream.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStream inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStream { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioStream ; impl AudioStream { # [doc = "Returns the length of the audio stream in seconds."] # [doc = ""] # [inline] pub fn get_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMethodTable :: get (get_api ()) . get_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStream { } unsafe impl GodotObject for AudioStream { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStream" } } impl std :: ops :: Deref for AudioStream { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStream { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for AudioStream { } unsafe impl SubClass < crate :: generated :: Reference > for AudioStream { } unsafe impl SubClass < crate :: generated :: Object > for AudioStream { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_length : * mut sys :: godot_method_bind } impl AudioStreamMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamMethodTable = AudioStreamMethodTable { class_constructor : None , get_length : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioStreamMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStream\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_length = (gd_api . godot_method_bind_get_method) (class_name , "get_length\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_stream::private::AudioStream;
            
            pub(crate) mod audio_stream_generator {
                # ! [doc = "This module contains types related to the API class [`AudioStreamGenerator`][super::AudioStreamGenerator]."] pub (crate) mod private { # [doc = "`core class AudioStreamGenerator` inherits `AudioStream` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audiostreamgenerator.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamGenerator inherits methods from:\n - [AudioStream](struct.AudioStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamGenerator { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioStreamGenerator ; impl AudioStreamGenerator { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamGeneratorMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The length of the buffer to generate (in seconds). Lower values result in less latency, but require the script to generate audio data faster, resulting in increased CPU usage and more risk for audio cracking if the CPU can't keep up."] # [doc = ""] # [inline] pub fn buffer_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorMethodTable :: get (get_api ()) . get_buffer_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The sample rate to use (in Hz). Higher values are more demanding for the CPU to generate, but result in better quality.\nIn games, common sample rates in use are `11025`, `16000`, `22050`, `32000`, `44100`, and `48000`.\nAccording to the [Nyquist-Shannon sampling theorem](https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem), there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are generating lower-pitched sounds such as voices, lower sample rates such as `32000` or `22050` may be usable with no loss in quality."] # [doc = ""] # [inline] pub fn mix_rate (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorMethodTable :: get (get_api ()) . get_mix_rate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The length of the buffer to generate (in seconds). Lower values result in less latency, but require the script to generate audio data faster, resulting in increased CPU usage and more risk for audio cracking if the CPU can't keep up."] # [doc = ""] # [inline] pub fn set_buffer_length (& self , seconds : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorMethodTable :: get (get_api ()) . set_buffer_length ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , seconds as _) ; } } # [doc = "The sample rate to use (in Hz). Higher values are more demanding for the CPU to generate, but result in better quality.\nIn games, common sample rates in use are `11025`, `16000`, `22050`, `32000`, `44100`, and `48000`.\nAccording to the [Nyquist-Shannon sampling theorem](https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem), there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are generating lower-pitched sounds such as voices, lower sample rates such as `32000` or `22050` may be usable with no loss in quality."] # [doc = ""] # [inline] pub fn set_mix_rate (& self , hz : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorMethodTable :: get (get_api ()) . set_mix_rate ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , hz as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamGenerator { } unsafe impl GodotObject for AudioStreamGenerator { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamGenerator" } } impl std :: ops :: Deref for AudioStreamGenerator { type Target = crate :: generated :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamGenerator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioStream > for AudioStreamGenerator { } unsafe impl SubClass < crate :: generated :: Resource > for AudioStreamGenerator { } unsafe impl SubClass < crate :: generated :: Reference > for AudioStreamGenerator { } unsafe impl SubClass < crate :: generated :: Object > for AudioStreamGenerator { } impl Instanciable for AudioStreamGenerator { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioStreamGenerator :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamGeneratorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_buffer_length : * mut sys :: godot_method_bind , pub get_mix_rate : * mut sys :: godot_method_bind , pub set_buffer_length : * mut sys :: godot_method_bind , pub set_mix_rate : * mut sys :: godot_method_bind } impl AudioStreamGeneratorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamGeneratorMethodTable = AudioStreamGeneratorMethodTable { class_constructor : None , get_buffer_length : 0 as * mut sys :: godot_method_bind , get_mix_rate : 0 as * mut sys :: godot_method_bind , set_buffer_length : 0 as * mut sys :: godot_method_bind , set_mix_rate : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioStreamGeneratorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamGenerator\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_buffer_length = (gd_api . godot_method_bind_get_method) (class_name , "get_buffer_length\0" . as_ptr () as * const c_char) ; table . get_mix_rate = (gd_api . godot_method_bind_get_method) (class_name , "get_mix_rate\0" . as_ptr () as * const c_char) ; table . set_buffer_length = (gd_api . godot_method_bind_get_method) (class_name , "set_buffer_length\0" . as_ptr () as * const c_char) ; table . set_mix_rate = (gd_api . godot_method_bind_get_method) (class_name , "set_mix_rate\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_stream_generator::private::AudioStreamGenerator;
            
            pub(crate) mod audio_stream_generator_playback {
                # ! [doc = "This module contains types related to the API class [`AudioStreamGeneratorPlayback`][super::AudioStreamGeneratorPlayback]."] pub (crate) mod private { # [doc = "`core class AudioStreamGeneratorPlayback` inherits `AudioStreamPlaybackResampled` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audiostreamgeneratorplayback.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamGeneratorPlayback inherits methods from:\n - [AudioStreamPlaybackResampled](struct.AudioStreamPlaybackResampled.html)\n - [AudioStreamPlayback](struct.AudioStreamPlayback.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamGeneratorPlayback { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioStreamGeneratorPlayback ; impl AudioStreamGeneratorPlayback { # [doc = "Returns `true` if a buffer of the size `amount` can be pushed to the audio sample data buffer without overflowing it, `false` otherwise."] # [doc = ""] # [inline] pub fn can_push_buffer (& self , amount : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . can_push_buffer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Clears the audio sample data buffer."] # [doc = ""] # [inline] pub fn clear_buffer (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . clear_buffer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the number of audio data frames left to play. If this returned number reaches `0`, the audio will stop playing until frames are added again. Therefore, make sure your script can always generate and push new audio frames fast enough to avoid audio cracking."] # [doc = ""] # [inline] pub fn get_frames_available (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . get_frames_available ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_skips (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . get_skips ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Pushes several audio data frames to the buffer. This is usually more efficient than [`push_frame`][Self::push_frame] in C# and compiled languages via GDNative, but [`push_buffer`][Self::push_buffer] may be _less_ efficient in GDScript."] # [doc = ""] # [inline] pub fn push_buffer (& self , frames : PoolArray < Vector2 >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . push_buffer ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , frames) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Pushes a single audio data frame to the buffer. This is usually less efficient than [`push_buffer`][Self::push_buffer] in C# and compiled languages via GDNative, but [`push_frame`][Self::push_frame] may be _more_ efficient in GDScript."] # [doc = ""] # [inline] pub fn push_frame (& self , frame : Vector2) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamGeneratorPlaybackMethodTable :: get (get_api ()) . push_frame ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , frame) ; < bool > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamGeneratorPlayback { } unsafe impl GodotObject for AudioStreamGeneratorPlayback { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamGeneratorPlayback" } } impl std :: ops :: Deref for AudioStreamGeneratorPlayback { type Target = crate :: generated :: AudioStreamPlaybackResampled ; # [inline] fn deref (& self) -> & crate :: generated :: AudioStreamPlaybackResampled { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamGeneratorPlayback { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioStreamPlaybackResampled { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioStreamPlaybackResampled > for AudioStreamGeneratorPlayback { } unsafe impl SubClass < crate :: generated :: AudioStreamPlayback > for AudioStreamGeneratorPlayback { } unsafe impl SubClass < crate :: generated :: Reference > for AudioStreamGeneratorPlayback { } unsafe impl SubClass < crate :: generated :: Object > for AudioStreamGeneratorPlayback { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamGeneratorPlaybackMethodTable { pub class_constructor : sys :: godot_class_constructor , pub can_push_buffer : * mut sys :: godot_method_bind , pub clear_buffer : * mut sys :: godot_method_bind , pub get_frames_available : * mut sys :: godot_method_bind , pub get_skips : * mut sys :: godot_method_bind , pub push_buffer : * mut sys :: godot_method_bind , pub push_frame : * mut sys :: godot_method_bind } impl AudioStreamGeneratorPlaybackMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamGeneratorPlaybackMethodTable = AudioStreamGeneratorPlaybackMethodTable { class_constructor : None , can_push_buffer : 0 as * mut sys :: godot_method_bind , clear_buffer : 0 as * mut sys :: godot_method_bind , get_frames_available : 0 as * mut sys :: godot_method_bind , get_skips : 0 as * mut sys :: godot_method_bind , push_buffer : 0 as * mut sys :: godot_method_bind , push_frame : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioStreamGeneratorPlaybackMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamGeneratorPlayback\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . can_push_buffer = (gd_api . godot_method_bind_get_method) (class_name , "can_push_buffer\0" . as_ptr () as * const c_char) ; table . clear_buffer = (gd_api . godot_method_bind_get_method) (class_name , "clear_buffer\0" . as_ptr () as * const c_char) ; table . get_frames_available = (gd_api . godot_method_bind_get_method) (class_name , "get_frames_available\0" . as_ptr () as * const c_char) ; table . get_skips = (gd_api . godot_method_bind_get_method) (class_name , "get_skips\0" . as_ptr () as * const c_char) ; table . push_buffer = (gd_api . godot_method_bind_get_method) (class_name , "push_buffer\0" . as_ptr () as * const c_char) ; table . push_frame = (gd_api . godot_method_bind_get_method) (class_name , "push_frame\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_stream_generator_playback::private::AudioStreamGeneratorPlayback;
            
            pub(crate) mod audio_stream_mp3 {
                # ! [doc = "This module contains types related to the API class [`AudioStreamMP3`][super::AudioStreamMP3]."] pub (crate) mod private { # [doc = "`core class AudioStreamMP3` inherits `AudioStream` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audiostreammp3.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamMP3 inherits methods from:\n - [AudioStream](struct.AudioStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamMP3 { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioStreamMP3 ; impl AudioStreamMP3 { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamMP3MethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn data (& self) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn loop_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . get_loop_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn has_loop (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . has_loop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_data (& self , data : PoolArray < u8 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . set_data ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , data) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_loop (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . set_loop ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_loop_offset (& self , seconds : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamMP3MethodTable :: get (get_api ()) . set_loop_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , seconds as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamMP3 { } unsafe impl GodotObject for AudioStreamMP3 { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamMP3" } } impl std :: ops :: Deref for AudioStreamMP3 { type Target = crate :: generated :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamMP3 { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioStream > for AudioStreamMP3 { } unsafe impl SubClass < crate :: generated :: Resource > for AudioStreamMP3 { } unsafe impl SubClass < crate :: generated :: Reference > for AudioStreamMP3 { } unsafe impl SubClass < crate :: generated :: Object > for AudioStreamMP3 { } impl Instanciable for AudioStreamMP3 { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioStreamMP3 :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamMP3MethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_data : * mut sys :: godot_method_bind , pub get_loop_offset : * mut sys :: godot_method_bind , pub has_loop : * mut sys :: godot_method_bind , pub set_data : * mut sys :: godot_method_bind , pub set_loop : * mut sys :: godot_method_bind , pub set_loop_offset : * mut sys :: godot_method_bind } impl AudioStreamMP3MethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamMP3MethodTable = AudioStreamMP3MethodTable { class_constructor : None , get_data : 0 as * mut sys :: godot_method_bind , get_loop_offset : 0 as * mut sys :: godot_method_bind , has_loop : 0 as * mut sys :: godot_method_bind , set_data : 0 as * mut sys :: godot_method_bind , set_loop : 0 as * mut sys :: godot_method_bind , set_loop_offset : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioStreamMP3MethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamMP3\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_offset\0" . as_ptr () as * const c_char) ; table . has_loop = (gd_api . godot_method_bind_get_method) (class_name , "has_loop\0" . as_ptr () as * const c_char) ; table . set_data = (gd_api . godot_method_bind_get_method) (class_name , "set_data\0" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\0" . as_ptr () as * const c_char) ; table . set_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_offset\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_stream_mp3::private::AudioStreamMP3;
            
            pub(crate) mod audio_stream_microphone {
                # ! [doc = "This module contains types related to the API class [`AudioStreamMicrophone`][super::AudioStreamMicrophone]."] pub (crate) mod private { # [doc = "`core class AudioStreamMicrophone` inherits `AudioStream` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audiostreammicrophone.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamMicrophone inherits methods from:\n - [AudioStream](struct.AudioStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamMicrophone { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioStreamMicrophone ; impl AudioStreamMicrophone { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamMicrophoneMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamMicrophone { } unsafe impl GodotObject for AudioStreamMicrophone { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamMicrophone" } } impl std :: ops :: Deref for AudioStreamMicrophone { type Target = crate :: generated :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamMicrophone { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioStream > for AudioStreamMicrophone { } unsafe impl SubClass < crate :: generated :: Resource > for AudioStreamMicrophone { } unsafe impl SubClass < crate :: generated :: Reference > for AudioStreamMicrophone { } unsafe impl SubClass < crate :: generated :: Object > for AudioStreamMicrophone { } impl Instanciable for AudioStreamMicrophone { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioStreamMicrophone :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamMicrophoneMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl AudioStreamMicrophoneMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamMicrophoneMethodTable = AudioStreamMicrophoneMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioStreamMicrophoneMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamMicrophone\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_stream_microphone::private::AudioStreamMicrophone;
            
            pub(crate) mod audio_stream_ogg_vorbis {
                # ! [doc = "This module contains types related to the API class [`AudioStreamOGGVorbis`][super::AudioStreamOGGVorbis]."] pub (crate) mod private { # [doc = "`core class AudioStreamOGGVorbis` inherits `AudioStream` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audiostreamoggvorbis.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamOGGVorbis inherits methods from:\n - [AudioStream](struct.AudioStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamOGGVorbis { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioStreamOGGVorbis ; impl AudioStreamOGGVorbis { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamOGGVorbisMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn data (& self) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamOGGVorbisMethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn loop_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamOGGVorbisMethodTable :: get (get_api ()) . get_loop_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn has_loop (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamOGGVorbisMethodTable :: get (get_api ()) . has_loop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_data (& self , data : PoolArray < u8 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamOGGVorbisMethodTable :: get (get_api ()) . set_data ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , data) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_loop (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamOGGVorbisMethodTable :: get (get_api ()) . set_loop ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_loop_offset (& self , seconds : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamOGGVorbisMethodTable :: get (get_api ()) . set_loop_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , seconds as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamOGGVorbis { } unsafe impl GodotObject for AudioStreamOGGVorbis { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamOGGVorbis" } } impl std :: ops :: Deref for AudioStreamOGGVorbis { type Target = crate :: generated :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamOGGVorbis { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioStream > for AudioStreamOGGVorbis { } unsafe impl SubClass < crate :: generated :: Resource > for AudioStreamOGGVorbis { } unsafe impl SubClass < crate :: generated :: Reference > for AudioStreamOGGVorbis { } unsafe impl SubClass < crate :: generated :: Object > for AudioStreamOGGVorbis { } impl Instanciable for AudioStreamOGGVorbis { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioStreamOGGVorbis :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamOGGVorbisMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_data : * mut sys :: godot_method_bind , pub get_loop_offset : * mut sys :: godot_method_bind , pub has_loop : * mut sys :: godot_method_bind , pub set_data : * mut sys :: godot_method_bind , pub set_loop : * mut sys :: godot_method_bind , pub set_loop_offset : * mut sys :: godot_method_bind } impl AudioStreamOGGVorbisMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamOGGVorbisMethodTable = AudioStreamOGGVorbisMethodTable { class_constructor : None , get_data : 0 as * mut sys :: godot_method_bind , get_loop_offset : 0 as * mut sys :: godot_method_bind , has_loop : 0 as * mut sys :: godot_method_bind , set_data : 0 as * mut sys :: godot_method_bind , set_loop : 0 as * mut sys :: godot_method_bind , set_loop_offset : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioStreamOGGVorbisMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamOGGVorbis\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_offset\0" . as_ptr () as * const c_char) ; table . has_loop = (gd_api . godot_method_bind_get_method) (class_name , "has_loop\0" . as_ptr () as * const c_char) ; table . set_data = (gd_api . godot_method_bind_get_method) (class_name , "set_data\0" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\0" . as_ptr () as * const c_char) ; table . set_loop_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_offset\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_stream_ogg_vorbis::private::AudioStreamOGGVorbis;
            
            pub(crate) mod audio_stream_playback {
                # ! [doc = "This module contains types related to the API class [`AudioStreamPlayback`][super::AudioStreamPlayback]."] pub (crate) mod private { # [doc = "`core class AudioStreamPlayback` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audiostreamplayback.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamPlayback inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamPlayback { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioStreamPlayback ; impl AudioStreamPlayback { } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamPlayback { } unsafe impl GodotObject for AudioStreamPlayback { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamPlayback" } } impl std :: ops :: Deref for AudioStreamPlayback { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamPlayback { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for AudioStreamPlayback { } unsafe impl SubClass < crate :: generated :: Object > for AudioStreamPlayback { }
                use super::*;
            }
            pub use crate::generated::audio_stream_playback::private::AudioStreamPlayback;
            
            pub(crate) mod audio_stream_playback_resampled {
                # ! [doc = "This module contains types related to the API class [`AudioStreamPlaybackResampled`][super::AudioStreamPlaybackResampled]."] pub (crate) mod private { # [doc = "`core class AudioStreamPlaybackResampled` inherits `AudioStreamPlayback` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audiostreamplaybackresampled.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamPlaybackResampled inherits methods from:\n - [AudioStreamPlayback](struct.AudioStreamPlayback.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamPlaybackResampled { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioStreamPlaybackResampled ; impl AudioStreamPlaybackResampled { } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamPlaybackResampled { } unsafe impl GodotObject for AudioStreamPlaybackResampled { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamPlaybackResampled" } } impl std :: ops :: Deref for AudioStreamPlaybackResampled { type Target = crate :: generated :: AudioStreamPlayback ; # [inline] fn deref (& self) -> & crate :: generated :: AudioStreamPlayback { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamPlaybackResampled { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioStreamPlayback { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioStreamPlayback > for AudioStreamPlaybackResampled { } unsafe impl SubClass < crate :: generated :: Reference > for AudioStreamPlaybackResampled { } unsafe impl SubClass < crate :: generated :: Object > for AudioStreamPlaybackResampled { }
                use super::*;
            }
            pub use crate::generated::audio_stream_playback_resampled::private::AudioStreamPlaybackResampled;
            
            pub mod audio_stream_player {
                # ! [doc = "This module contains types related to the API class [`AudioStreamPlayer`][super::AudioStreamPlayer]."] pub (crate) mod private { # [doc = "`core class AudioStreamPlayer` inherits `Node` (manually managed).\n\nThis class has related types in the [`audio_stream_player`][super::audio_stream_player] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audiostreamplayer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`AudioStreamPlayer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<AudioStreamPlayer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAudioStreamPlayer inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamPlayer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioStreamPlayer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MixTarget (pub i64) ; impl MixTarget { pub const STEREO : MixTarget = MixTarget (0i64) ; pub const SURROUND : MixTarget = MixTarget (1i64) ; pub const CENTER : MixTarget = MixTarget (2i64) ; } impl From < i64 > for MixTarget { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MixTarget > for i64 { # [inline] fn from (v : MixTarget) -> Self { v . 0 } } impl FromVariant for MixTarget { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioStreamPlayer { pub const MIX_TARGET_STEREO : i64 = 0i64 ; pub const MIX_TARGET_SURROUND : i64 = 1i64 ; pub const MIX_TARGET_CENTER : i64 = 2i64 ; } impl AudioStreamPlayer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamPlayerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Bus on which this audio is playing.\n**Note:** When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to `\"Master\"`."] # [doc = ""] # [inline] pub fn bus (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_bus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If the audio configuration has more than two speakers, this sets the target channels. See [`MixTarget`][MixTarget] constants."] # [doc = ""] # [inline] pub fn mix_target (& self) -> crate :: generated :: audio_stream_player :: MixTarget { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_mix_target ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: audio_stream_player :: MixTarget > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate."] # [doc = ""] # [inline] pub fn pitch_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_pitch_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the position in the [`AudioStream`][AudioStream] in seconds."] # [doc = ""] # [inline] pub fn get_playback_position (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_playback_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The [`AudioStream`][AudioStream] object to be played."] # [doc = ""] # [inline] pub fn stream (& self) -> Option < Ref < crate :: generated :: AudioStream , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_stream ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: AudioStream , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the playback is paused. You can resume it by setting `stream_paused` to `false`."] # [doc = ""] # [inline] pub fn stream_paused (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_stream_paused ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`AudioStreamPlayback`][AudioStreamPlayback] object associated with this [`AudioStreamPlayer`][AudioStreamPlayer]."] # [doc = ""] # [inline] pub fn get_stream_playback (& self) -> Option < Ref < crate :: generated :: AudioStreamPlayback , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_stream_playback ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: AudioStreamPlayback , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Volume of sound, in dB."] # [doc = ""] # [inline] pub fn volume_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . get_volume_db ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, audio plays when added to scene tree."] # [doc = ""] # [inline] pub fn is_autoplay_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . is_autoplay_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, audio is playing."] # [doc = ""] # [inline] pub fn is_playing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . is_playing ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Plays the audio from the given `from_position`, in seconds.\n# Default Arguments\n* `from_position` - `0.0`"] # [doc = ""] # [inline] pub fn play (& self , from_position : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . play ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , from_position as _) ; } } # [doc = "Sets the position from which audio will be played, in seconds."] # [doc = ""] # [inline] pub fn seek (& self , to_position : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . seek ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , to_position as _) ; } } # [doc = "If `true`, audio plays when added to scene tree."] # [doc = ""] # [inline] pub fn set_autoplay (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . set_autoplay ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Bus on which this audio is playing.\n**Note:** When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to `\"Master\"`."] # [doc = ""] # [inline] pub fn set_bus (& self , bus : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . set_bus ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , bus . into ()) ; } } # [doc = "If the audio configuration has more than two speakers, this sets the target channels. See [`MixTarget`][MixTarget] constants."] # [doc = ""] # [inline] pub fn set_mix_target (& self , mix_target : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . set_mix_target ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mix_target as _) ; } } # [doc = "The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate."] # [doc = ""] # [inline] pub fn set_pitch_scale (& self , pitch_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . set_pitch_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , pitch_scale as _) ; } } # [doc = "The [`AudioStream`][AudioStream] object to be played."] # [doc = ""] # [inline] pub fn set_stream (& self , stream : impl AsArg < crate :: generated :: AudioStream >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . set_stream ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , stream . as_arg_ptr ()) ; } } # [doc = "If `true`, the playback is paused. You can resume it by setting `stream_paused` to `false`."] # [doc = ""] # [inline] pub fn set_stream_paused (& self , pause : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . set_stream_paused ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , pause as _) ; } } # [doc = "Volume of sound, in dB."] # [doc = ""] # [inline] pub fn set_volume_db (& self , volume_db : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . set_volume_db ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , volume_db as _) ; } } # [doc = "Stops the audio."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayerMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamPlayer { } unsafe impl GodotObject for AudioStreamPlayer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AudioStreamPlayer" } } impl QueueFree for AudioStreamPlayer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for AudioStreamPlayer { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamPlayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for AudioStreamPlayer { } unsafe impl SubClass < crate :: generated :: Object > for AudioStreamPlayer { } impl Instanciable for AudioStreamPlayer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioStreamPlayer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamPlayerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bus : * mut sys :: godot_method_bind , pub get_mix_target : * mut sys :: godot_method_bind , pub get_pitch_scale : * mut sys :: godot_method_bind , pub get_playback_position : * mut sys :: godot_method_bind , pub get_stream : * mut sys :: godot_method_bind , pub get_stream_paused : * mut sys :: godot_method_bind , pub get_stream_playback : * mut sys :: godot_method_bind , pub get_volume_db : * mut sys :: godot_method_bind , pub is_autoplay_enabled : * mut sys :: godot_method_bind , pub is_playing : * mut sys :: godot_method_bind , pub play : * mut sys :: godot_method_bind , pub seek : * mut sys :: godot_method_bind , pub set_autoplay : * mut sys :: godot_method_bind , pub set_bus : * mut sys :: godot_method_bind , pub set_mix_target : * mut sys :: godot_method_bind , pub set_pitch_scale : * mut sys :: godot_method_bind , pub set_stream : * mut sys :: godot_method_bind , pub set_stream_paused : * mut sys :: godot_method_bind , pub set_volume_db : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl AudioStreamPlayerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamPlayerMethodTable = AudioStreamPlayerMethodTable { class_constructor : None , get_bus : 0 as * mut sys :: godot_method_bind , get_mix_target : 0 as * mut sys :: godot_method_bind , get_pitch_scale : 0 as * mut sys :: godot_method_bind , get_playback_position : 0 as * mut sys :: godot_method_bind , get_stream : 0 as * mut sys :: godot_method_bind , get_stream_paused : 0 as * mut sys :: godot_method_bind , get_stream_playback : 0 as * mut sys :: godot_method_bind , get_volume_db : 0 as * mut sys :: godot_method_bind , is_autoplay_enabled : 0 as * mut sys :: godot_method_bind , is_playing : 0 as * mut sys :: godot_method_bind , play : 0 as * mut sys :: godot_method_bind , seek : 0 as * mut sys :: godot_method_bind , set_autoplay : 0 as * mut sys :: godot_method_bind , set_bus : 0 as * mut sys :: godot_method_bind , set_mix_target : 0 as * mut sys :: godot_method_bind , set_pitch_scale : 0 as * mut sys :: godot_method_bind , set_stream : 0 as * mut sys :: godot_method_bind , set_stream_paused : 0 as * mut sys :: godot_method_bind , set_volume_db : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioStreamPlayerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamPlayer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_bus\0" . as_ptr () as * const c_char) ; table . get_mix_target = (gd_api . godot_method_bind_get_method) (class_name , "get_mix_target\0" . as_ptr () as * const c_char) ; table . get_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_pitch_scale\0" . as_ptr () as * const c_char) ; table . get_playback_position = (gd_api . godot_method_bind_get_method) (class_name , "get_playback_position\0" . as_ptr () as * const c_char) ; table . get_stream = (gd_api . godot_method_bind_get_method) (class_name , "get_stream\0" . as_ptr () as * const c_char) ; table . get_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_paused\0" . as_ptr () as * const c_char) ; table . get_stream_playback = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_playback\0" . as_ptr () as * const c_char) ; table . get_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "get_volume_db\0" . as_ptr () as * const c_char) ; table . is_autoplay_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_autoplay_enabled\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\0" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\0" . as_ptr () as * const c_char) ; table . set_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_bus\0" . as_ptr () as * const c_char) ; table . set_mix_target = (gd_api . godot_method_bind_get_method) (class_name , "set_mix_target\0" . as_ptr () as * const c_char) ; table . set_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_pitch_scale\0" . as_ptr () as * const c_char) ; table . set_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_stream\0" . as_ptr () as * const c_char) ; table . set_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_paused\0" . as_ptr () as * const c_char) ; table . set_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_db\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_stream_player::private::AudioStreamPlayer;
            
            pub(crate) mod audio_stream_player_2d {
                # ! [doc = "This module contains types related to the API class [`AudioStreamPlayer2D`][super::AudioStreamPlayer2D]."] pub (crate) mod private { # [doc = "`core class AudioStreamPlayer2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audiostreamplayer2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`AudioStreamPlayer2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<AudioStreamPlayer2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAudioStreamPlayer2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamPlayer2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioStreamPlayer2D ; impl AudioStreamPlayer2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamPlayer2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Determines which [`Area2D`][Area2D] layers affect the sound for reverb and audio bus effects. Areas can be used to redirect [`AudioStream`][AudioStream]s so that they play in a certain audio bus. An example of how you might use this is making a \"water\" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater."] # [doc = ""] # [inline] pub fn area_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_area_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Dampens audio over distance with this as an exponent."] # [doc = ""] # [inline] pub fn attenuation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_attenuation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Bus on which this audio is playing.\n**Note:** When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to `\"Master\"`."] # [doc = ""] # [inline] pub fn bus (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_bus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Maximum distance from which audio is still hearable."] # [doc = ""] # [inline] pub fn max_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_max_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate."] # [doc = ""] # [inline] pub fn pitch_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_pitch_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the position in the [`AudioStream`][AudioStream]."] # [doc = ""] # [inline] pub fn get_playback_position (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_playback_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The [`AudioStream`][AudioStream] object to be played."] # [doc = ""] # [inline] pub fn stream (& self) -> Option < Ref < crate :: generated :: AudioStream , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_stream ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: AudioStream , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the playback is paused. You can resume it by setting `stream_paused` to `false`."] # [doc = ""] # [inline] pub fn stream_paused (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_stream_paused ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`AudioStreamPlayback`][AudioStreamPlayback] object associated with this [`AudioStreamPlayer2D`][AudioStreamPlayer2D]."] # [doc = ""] # [inline] pub fn get_stream_playback (& self) -> Option < Ref < crate :: generated :: AudioStreamPlayback , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_stream_playback ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: AudioStreamPlayback , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Base volume without dampening."] # [doc = ""] # [inline] pub fn volume_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . get_volume_db ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, audio plays when added to scene tree."] # [doc = ""] # [inline] pub fn is_autoplay_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . is_autoplay_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, audio is playing."] # [doc = ""] # [inline] pub fn is_playing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . is_playing ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Plays the audio from the given position `from_position`, in seconds.\n# Default Arguments\n* `from_position` - `0.0`"] # [doc = ""] # [inline] pub fn play (& self , from_position : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . play ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , from_position as _) ; } } # [doc = "Sets the position from which audio will be played, in seconds."] # [doc = ""] # [inline] pub fn seek (& self , to_position : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . seek ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , to_position as _) ; } } # [doc = "Determines which [`Area2D`][Area2D] layers affect the sound for reverb and audio bus effects. Areas can be used to redirect [`AudioStream`][AudioStream]s so that they play in a certain audio bus. An example of how you might use this is making a \"water\" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater."] # [doc = ""] # [inline] pub fn set_area_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_area_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "Dampens audio over distance with this as an exponent."] # [doc = ""] # [inline] pub fn set_attenuation (& self , curve : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_attenuation ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , curve as _) ; } } # [doc = "If `true`, audio plays when added to scene tree."] # [doc = ""] # [inline] pub fn set_autoplay (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_autoplay ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Bus on which this audio is playing.\n**Note:** When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to `\"Master\"`."] # [doc = ""] # [inline] pub fn set_bus (& self , bus : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_bus ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , bus . into ()) ; } } # [doc = "Maximum distance from which audio is still hearable."] # [doc = ""] # [inline] pub fn set_max_distance (& self , pixels : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_max_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , pixels as _) ; } } # [doc = "The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate."] # [doc = ""] # [inline] pub fn set_pitch_scale (& self , pitch_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_pitch_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , pitch_scale as _) ; } } # [doc = "The [`AudioStream`][AudioStream] object to be played."] # [doc = ""] # [inline] pub fn set_stream (& self , stream : impl AsArg < crate :: generated :: AudioStream >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_stream ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , stream . as_arg_ptr ()) ; } } # [doc = "If `true`, the playback is paused. You can resume it by setting `stream_paused` to `false`."] # [doc = ""] # [inline] pub fn set_stream_paused (& self , pause : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_stream_paused ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , pause as _) ; } } # [doc = "Base volume without dampening."] # [doc = ""] # [inline] pub fn set_volume_db (& self , volume_db : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . set_volume_db ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , volume_db as _) ; } } # [doc = "Stops the audio."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer2DMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamPlayer2D { } unsafe impl GodotObject for AudioStreamPlayer2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AudioStreamPlayer2D" } } impl QueueFree for AudioStreamPlayer2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for AudioStreamPlayer2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamPlayer2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for AudioStreamPlayer2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for AudioStreamPlayer2D { } unsafe impl SubClass < crate :: generated :: Node > for AudioStreamPlayer2D { } unsafe impl SubClass < crate :: generated :: Object > for AudioStreamPlayer2D { } impl Instanciable for AudioStreamPlayer2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioStreamPlayer2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamPlayer2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_area_mask : * mut sys :: godot_method_bind , pub get_attenuation : * mut sys :: godot_method_bind , pub get_bus : * mut sys :: godot_method_bind , pub get_max_distance : * mut sys :: godot_method_bind , pub get_pitch_scale : * mut sys :: godot_method_bind , pub get_playback_position : * mut sys :: godot_method_bind , pub get_stream : * mut sys :: godot_method_bind , pub get_stream_paused : * mut sys :: godot_method_bind , pub get_stream_playback : * mut sys :: godot_method_bind , pub get_volume_db : * mut sys :: godot_method_bind , pub is_autoplay_enabled : * mut sys :: godot_method_bind , pub is_playing : * mut sys :: godot_method_bind , pub play : * mut sys :: godot_method_bind , pub seek : * mut sys :: godot_method_bind , pub set_area_mask : * mut sys :: godot_method_bind , pub set_attenuation : * mut sys :: godot_method_bind , pub set_autoplay : * mut sys :: godot_method_bind , pub set_bus : * mut sys :: godot_method_bind , pub set_max_distance : * mut sys :: godot_method_bind , pub set_pitch_scale : * mut sys :: godot_method_bind , pub set_stream : * mut sys :: godot_method_bind , pub set_stream_paused : * mut sys :: godot_method_bind , pub set_volume_db : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl AudioStreamPlayer2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamPlayer2DMethodTable = AudioStreamPlayer2DMethodTable { class_constructor : None , get_area_mask : 0 as * mut sys :: godot_method_bind , get_attenuation : 0 as * mut sys :: godot_method_bind , get_bus : 0 as * mut sys :: godot_method_bind , get_max_distance : 0 as * mut sys :: godot_method_bind , get_pitch_scale : 0 as * mut sys :: godot_method_bind , get_playback_position : 0 as * mut sys :: godot_method_bind , get_stream : 0 as * mut sys :: godot_method_bind , get_stream_paused : 0 as * mut sys :: godot_method_bind , get_stream_playback : 0 as * mut sys :: godot_method_bind , get_volume_db : 0 as * mut sys :: godot_method_bind , is_autoplay_enabled : 0 as * mut sys :: godot_method_bind , is_playing : 0 as * mut sys :: godot_method_bind , play : 0 as * mut sys :: godot_method_bind , seek : 0 as * mut sys :: godot_method_bind , set_area_mask : 0 as * mut sys :: godot_method_bind , set_attenuation : 0 as * mut sys :: godot_method_bind , set_autoplay : 0 as * mut sys :: godot_method_bind , set_bus : 0 as * mut sys :: godot_method_bind , set_max_distance : 0 as * mut sys :: godot_method_bind , set_pitch_scale : 0 as * mut sys :: godot_method_bind , set_stream : 0 as * mut sys :: godot_method_bind , set_stream_paused : 0 as * mut sys :: godot_method_bind , set_volume_db : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioStreamPlayer2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamPlayer2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_area_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_area_mask\0" . as_ptr () as * const c_char) ; table . get_attenuation = (gd_api . godot_method_bind_get_method) (class_name , "get_attenuation\0" . as_ptr () as * const c_char) ; table . get_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_bus\0" . as_ptr () as * const c_char) ; table . get_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_max_distance\0" . as_ptr () as * const c_char) ; table . get_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_pitch_scale\0" . as_ptr () as * const c_char) ; table . get_playback_position = (gd_api . godot_method_bind_get_method) (class_name , "get_playback_position\0" . as_ptr () as * const c_char) ; table . get_stream = (gd_api . godot_method_bind_get_method) (class_name , "get_stream\0" . as_ptr () as * const c_char) ; table . get_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_paused\0" . as_ptr () as * const c_char) ; table . get_stream_playback = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_playback\0" . as_ptr () as * const c_char) ; table . get_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "get_volume_db\0" . as_ptr () as * const c_char) ; table . is_autoplay_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_autoplay_enabled\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\0" . as_ptr () as * const c_char) ; table . set_area_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_area_mask\0" . as_ptr () as * const c_char) ; table . set_attenuation = (gd_api . godot_method_bind_get_method) (class_name , "set_attenuation\0" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\0" . as_ptr () as * const c_char) ; table . set_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_bus\0" . as_ptr () as * const c_char) ; table . set_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_max_distance\0" . as_ptr () as * const c_char) ; table . set_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_pitch_scale\0" . as_ptr () as * const c_char) ; table . set_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_stream\0" . as_ptr () as * const c_char) ; table . set_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_paused\0" . as_ptr () as * const c_char) ; table . set_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_db\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_stream_player_2d::private::AudioStreamPlayer2D;
            
            pub mod audio_stream_player_3d {
                # ! [doc = "This module contains types related to the API class [`AudioStreamPlayer3D`][super::AudioStreamPlayer3D]."] pub (crate) mod private { # [doc = "`core class AudioStreamPlayer3D` inherits `Spatial` (manually managed).\n\nThis class has related types in the [`audio_stream_player_3d`][super::audio_stream_player_3d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audiostreamplayer3d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`AudioStreamPlayer3D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<AudioStreamPlayer3D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nAudioStreamPlayer3D inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamPlayer3D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioStreamPlayer3D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AttenuationModel (pub i64) ; impl AttenuationModel { pub const INVERSE_DISTANCE : AttenuationModel = AttenuationModel (0i64) ; pub const INVERSE_SQUARE_DISTANCE : AttenuationModel = AttenuationModel (1i64) ; pub const LOGARITHMIC : AttenuationModel = AttenuationModel (2i64) ; pub const DISABLED : AttenuationModel = AttenuationModel (3i64) ; } impl From < i64 > for AttenuationModel { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AttenuationModel > for i64 { # [inline] fn from (v : AttenuationModel) -> Self { v . 0 } } impl FromVariant for AttenuationModel { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DopplerTracking (pub i64) ; impl DopplerTracking { pub const DISABLED : DopplerTracking = DopplerTracking (0i64) ; pub const IDLE_STEP : DopplerTracking = DopplerTracking (1i64) ; pub const PHYSICS_STEP : DopplerTracking = DopplerTracking (2i64) ; } impl From < i64 > for DopplerTracking { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DopplerTracking > for i64 { # [inline] fn from (v : DopplerTracking) -> Self { v . 0 } } impl FromVariant for DopplerTracking { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct OutOfRangeMode (pub i64) ; impl OutOfRangeMode { pub const MIX : OutOfRangeMode = OutOfRangeMode (0i64) ; pub const PAUSE : OutOfRangeMode = OutOfRangeMode (1i64) ; } impl From < i64 > for OutOfRangeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < OutOfRangeMode > for i64 { # [inline] fn from (v : OutOfRangeMode) -> Self { v . 0 } } impl FromVariant for OutOfRangeMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioStreamPlayer3D { pub const ATTENUATION_INVERSE_DISTANCE : i64 = 0i64 ; pub const DOPPLER_TRACKING_DISABLED : i64 = 0i64 ; pub const OUT_OF_RANGE_MIX : i64 = 0i64 ; pub const ATTENUATION_INVERSE_SQUARE_DISTANCE : i64 = 1i64 ; pub const DOPPLER_TRACKING_IDLE_STEP : i64 = 1i64 ; pub const OUT_OF_RANGE_PAUSE : i64 = 1i64 ; pub const ATTENUATION_LOGARITHMIC : i64 = 2i64 ; pub const DOPPLER_TRACKING_PHYSICS_STEP : i64 = 2i64 ; pub const ATTENUATION_DISABLED : i64 = 3i64 ; } impl AudioStreamPlayer3D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamPlayer3DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Determines which [`Area`][Area] layers affect the sound for reverb and audio bus effects. Areas can be used to redirect [`AudioStream`][AudioStream]s so that they play in a certain audio bus. An example of how you might use this is making a \"water\" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater."] # [doc = ""] # [inline] pub fn area_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_area_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Dampens audio using a low-pass filter above this frequency, in Hz. To disable the dampening effect entirely, set this to `20500` as this frequency is above the human hearing limit."] # [doc = ""] # [inline] pub fn attenuation_filter_cutoff_hz (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_attenuation_filter_cutoff_hz ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Amount how much the filter affects the loudness, in decibels."] # [doc = ""] # [inline] pub fn attenuation_filter_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_attenuation_filter_db ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Decides if audio should get quieter with distance linearly, quadratically, logarithmically, or not be affected by distance, effectively disabling attenuation."] # [doc = ""] # [inline] pub fn attenuation_model (& self) -> crate :: generated :: audio_stream_player_3d :: AttenuationModel { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_attenuation_model ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: audio_stream_player_3d :: AttenuationModel > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The bus on which this audio is playing.\n**Note:** When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to `\"Master\"`."] # [doc = ""] # [inline] pub fn bus (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_bus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Decides in which step the [Doppler effect](https://en.wikipedia.org/wiki/Doppler_effect) should be calculated.\n**Note:** Only effective if the current [`Camera`][Camera]'s [`Camera.doppler_tracking`][Camera::doppler_tracking] property is set to a value other than [`Camera.DOPPLER_TRACKING_DISABLED`][Camera::DOPPLER_TRACKING_DISABLED]."] # [doc = ""] # [inline] pub fn doppler_tracking (& self) -> crate :: generated :: audio_stream_player_3d :: DopplerTracking { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_doppler_tracking ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: audio_stream_player_3d :: DopplerTracking > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The angle in which the audio reaches cameras undampened."] # [doc = ""] # [inline] pub fn emission_angle (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_emission_angle ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Dampens audio if camera is outside of [`emission_angle_degrees`][Self::emission_angle_degrees] and [`emission_angle_enabled`][Self::emission_angle_enabled] is set by this factor, in decibels."] # [doc = ""] # [inline] pub fn emission_angle_filter_attenuation_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_emission_angle_filter_attenuation_db ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the absolute maximum of the soundlevel, in decibels."] # [doc = ""] # [inline] pub fn max_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_max_db ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the distance from which the [`out_of_range_mode`][Self::out_of_range_mode] takes effect. Has no effect if set to 0."] # [doc = ""] # [inline] pub fn max_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_max_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Decides if audio should pause when source is outside of [`max_distance`][Self::max_distance] range."] # [doc = ""] # [inline] pub fn out_of_range_mode (& self) -> crate :: generated :: audio_stream_player_3d :: OutOfRangeMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_out_of_range_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: audio_stream_player_3d :: OutOfRangeMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate."] # [doc = ""] # [inline] pub fn pitch_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_pitch_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the position in the [`AudioStream`][AudioStream]."] # [doc = ""] # [inline] pub fn get_playback_position (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_playback_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The [`AudioStream`][AudioStream] resource to be played."] # [doc = ""] # [inline] pub fn stream (& self) -> Option < Ref < crate :: generated :: AudioStream , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_stream ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: AudioStream , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the playback is paused. You can resume it by setting [`stream_paused`][Self::stream_paused] to `false`."] # [doc = ""] # [inline] pub fn stream_paused (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_stream_paused ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`AudioStreamPlayback`][AudioStreamPlayback] object associated with this [`AudioStreamPlayer3D`][AudioStreamPlayer3D]."] # [doc = ""] # [inline] pub fn get_stream_playback (& self) -> Option < Ref < crate :: generated :: AudioStreamPlayback , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_stream_playback ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: AudioStreamPlayback , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The base sound level unaffected by dampening, in decibels."] # [doc = ""] # [inline] pub fn unit_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_unit_db ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The factor for the attenuation effect. Higher values make the sound audible over a larger distance."] # [doc = ""] # [inline] pub fn unit_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . get_unit_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, audio plays when the AudioStreamPlayer3D node is added to scene tree."] # [doc = ""] # [inline] pub fn is_autoplay_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . is_autoplay_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the audio should be dampened according to the direction of the sound."] # [doc = ""] # [inline] pub fn is_emission_angle_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . is_emission_angle_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, audio is playing."] # [doc = ""] # [inline] pub fn is_playing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . is_playing ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Plays the audio from the given position `from_position`, in seconds.\n# Default Arguments\n* `from_position` - `0.0`"] # [doc = ""] # [inline] pub fn play (& self , from_position : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . play ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , from_position as _) ; } } # [doc = "Sets the position from which audio will be played, in seconds."] # [doc = ""] # [inline] pub fn seek (& self , to_position : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . seek ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , to_position as _) ; } } # [doc = "Determines which [`Area`][Area] layers affect the sound for reverb and audio bus effects. Areas can be used to redirect [`AudioStream`][AudioStream]s so that they play in a certain audio bus. An example of how you might use this is making a \"water\" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater."] # [doc = ""] # [inline] pub fn set_area_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_area_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "Dampens audio using a low-pass filter above this frequency, in Hz. To disable the dampening effect entirely, set this to `20500` as this frequency is above the human hearing limit."] # [doc = ""] # [inline] pub fn set_attenuation_filter_cutoff_hz (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_attenuation_filter_cutoff_hz ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , degrees as _) ; } } # [doc = "Amount how much the filter affects the loudness, in decibels."] # [doc = ""] # [inline] pub fn set_attenuation_filter_db (& self , db : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_attenuation_filter_db ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , db as _) ; } } # [doc = "Decides if audio should get quieter with distance linearly, quadratically, logarithmically, or not be affected by distance, effectively disabling attenuation."] # [doc = ""] # [inline] pub fn set_attenuation_model (& self , model : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_attenuation_model ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , model as _) ; } } # [doc = "If `true`, audio plays when the AudioStreamPlayer3D node is added to scene tree."] # [doc = ""] # [inline] pub fn set_autoplay (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_autoplay ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The bus on which this audio is playing.\n**Note:** When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to `\"Master\"`."] # [doc = ""] # [inline] pub fn set_bus (& self , bus : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_bus ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , bus . into ()) ; } } # [doc = "Decides in which step the [Doppler effect](https://en.wikipedia.org/wiki/Doppler_effect) should be calculated.\n**Note:** Only effective if the current [`Camera`][Camera]'s [`Camera.doppler_tracking`][Camera::doppler_tracking] property is set to a value other than [`Camera.DOPPLER_TRACKING_DISABLED`][Camera::DOPPLER_TRACKING_DISABLED]."] # [doc = ""] # [inline] pub fn set_doppler_tracking (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_doppler_tracking ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The angle in which the audio reaches cameras undampened."] # [doc = ""] # [inline] pub fn set_emission_angle (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_emission_angle ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , degrees as _) ; } } # [doc = "If `true`, the audio should be dampened according to the direction of the sound."] # [doc = ""] # [inline] pub fn set_emission_angle_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_emission_angle_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Dampens audio if camera is outside of [`emission_angle_degrees`][Self::emission_angle_degrees] and [`emission_angle_enabled`][Self::emission_angle_enabled] is set by this factor, in decibels."] # [doc = ""] # [inline] pub fn set_emission_angle_filter_attenuation_db (& self , db : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_emission_angle_filter_attenuation_db ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , db as _) ; } } # [doc = "Sets the absolute maximum of the soundlevel, in decibels."] # [doc = ""] # [inline] pub fn set_max_db (& self , max_db : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_max_db ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , max_db as _) ; } } # [doc = "Sets the distance from which the [`out_of_range_mode`][Self::out_of_range_mode] takes effect. Has no effect if set to 0."] # [doc = ""] # [inline] pub fn set_max_distance (& self , metres : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_max_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , metres as _) ; } } # [doc = "Decides if audio should pause when source is outside of [`max_distance`][Self::max_distance] range."] # [doc = ""] # [inline] pub fn set_out_of_range_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_out_of_range_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate."] # [doc = ""] # [inline] pub fn set_pitch_scale (& self , pitch_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_pitch_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , pitch_scale as _) ; } } # [doc = "The [`AudioStream`][AudioStream] resource to be played."] # [doc = ""] # [inline] pub fn set_stream (& self , stream : impl AsArg < crate :: generated :: AudioStream >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_stream ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , stream . as_arg_ptr ()) ; } } # [doc = "If `true`, the playback is paused. You can resume it by setting [`stream_paused`][Self::stream_paused] to `false`."] # [doc = ""] # [inline] pub fn set_stream_paused (& self , pause : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_stream_paused ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , pause as _) ; } } # [doc = "The base sound level unaffected by dampening, in decibels."] # [doc = ""] # [inline] pub fn set_unit_db (& self , unit_db : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_unit_db ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , unit_db as _) ; } } # [doc = "The factor for the attenuation effect. Higher values make the sound audible over a larger distance."] # [doc = ""] # [inline] pub fn set_unit_size (& self , unit_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . set_unit_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , unit_size as _) ; } } # [doc = "Stops the audio."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamPlayer3DMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamPlayer3D { } unsafe impl GodotObject for AudioStreamPlayer3D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "AudioStreamPlayer3D" } } impl QueueFree for AudioStreamPlayer3D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for AudioStreamPlayer3D { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamPlayer3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for AudioStreamPlayer3D { } unsafe impl SubClass < crate :: generated :: Node > for AudioStreamPlayer3D { } unsafe impl SubClass < crate :: generated :: Object > for AudioStreamPlayer3D { } impl Instanciable for AudioStreamPlayer3D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioStreamPlayer3D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamPlayer3DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_area_mask : * mut sys :: godot_method_bind , pub get_attenuation_filter_cutoff_hz : * mut sys :: godot_method_bind , pub get_attenuation_filter_db : * mut sys :: godot_method_bind , pub get_attenuation_model : * mut sys :: godot_method_bind , pub get_bus : * mut sys :: godot_method_bind , pub get_doppler_tracking : * mut sys :: godot_method_bind , pub get_emission_angle : * mut sys :: godot_method_bind , pub get_emission_angle_filter_attenuation_db : * mut sys :: godot_method_bind , pub get_max_db : * mut sys :: godot_method_bind , pub get_max_distance : * mut sys :: godot_method_bind , pub get_out_of_range_mode : * mut sys :: godot_method_bind , pub get_pitch_scale : * mut sys :: godot_method_bind , pub get_playback_position : * mut sys :: godot_method_bind , pub get_stream : * mut sys :: godot_method_bind , pub get_stream_paused : * mut sys :: godot_method_bind , pub get_stream_playback : * mut sys :: godot_method_bind , pub get_unit_db : * mut sys :: godot_method_bind , pub get_unit_size : * mut sys :: godot_method_bind , pub is_autoplay_enabled : * mut sys :: godot_method_bind , pub is_emission_angle_enabled : * mut sys :: godot_method_bind , pub is_playing : * mut sys :: godot_method_bind , pub play : * mut sys :: godot_method_bind , pub seek : * mut sys :: godot_method_bind , pub set_area_mask : * mut sys :: godot_method_bind , pub set_attenuation_filter_cutoff_hz : * mut sys :: godot_method_bind , pub set_attenuation_filter_db : * mut sys :: godot_method_bind , pub set_attenuation_model : * mut sys :: godot_method_bind , pub set_autoplay : * mut sys :: godot_method_bind , pub set_bus : * mut sys :: godot_method_bind , pub set_doppler_tracking : * mut sys :: godot_method_bind , pub set_emission_angle : * mut sys :: godot_method_bind , pub set_emission_angle_enabled : * mut sys :: godot_method_bind , pub set_emission_angle_filter_attenuation_db : * mut sys :: godot_method_bind , pub set_max_db : * mut sys :: godot_method_bind , pub set_max_distance : * mut sys :: godot_method_bind , pub set_out_of_range_mode : * mut sys :: godot_method_bind , pub set_pitch_scale : * mut sys :: godot_method_bind , pub set_stream : * mut sys :: godot_method_bind , pub set_stream_paused : * mut sys :: godot_method_bind , pub set_unit_db : * mut sys :: godot_method_bind , pub set_unit_size : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl AudioStreamPlayer3DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamPlayer3DMethodTable = AudioStreamPlayer3DMethodTable { class_constructor : None , get_area_mask : 0 as * mut sys :: godot_method_bind , get_attenuation_filter_cutoff_hz : 0 as * mut sys :: godot_method_bind , get_attenuation_filter_db : 0 as * mut sys :: godot_method_bind , get_attenuation_model : 0 as * mut sys :: godot_method_bind , get_bus : 0 as * mut sys :: godot_method_bind , get_doppler_tracking : 0 as * mut sys :: godot_method_bind , get_emission_angle : 0 as * mut sys :: godot_method_bind , get_emission_angle_filter_attenuation_db : 0 as * mut sys :: godot_method_bind , get_max_db : 0 as * mut sys :: godot_method_bind , get_max_distance : 0 as * mut sys :: godot_method_bind , get_out_of_range_mode : 0 as * mut sys :: godot_method_bind , get_pitch_scale : 0 as * mut sys :: godot_method_bind , get_playback_position : 0 as * mut sys :: godot_method_bind , get_stream : 0 as * mut sys :: godot_method_bind , get_stream_paused : 0 as * mut sys :: godot_method_bind , get_stream_playback : 0 as * mut sys :: godot_method_bind , get_unit_db : 0 as * mut sys :: godot_method_bind , get_unit_size : 0 as * mut sys :: godot_method_bind , is_autoplay_enabled : 0 as * mut sys :: godot_method_bind , is_emission_angle_enabled : 0 as * mut sys :: godot_method_bind , is_playing : 0 as * mut sys :: godot_method_bind , play : 0 as * mut sys :: godot_method_bind , seek : 0 as * mut sys :: godot_method_bind , set_area_mask : 0 as * mut sys :: godot_method_bind , set_attenuation_filter_cutoff_hz : 0 as * mut sys :: godot_method_bind , set_attenuation_filter_db : 0 as * mut sys :: godot_method_bind , set_attenuation_model : 0 as * mut sys :: godot_method_bind , set_autoplay : 0 as * mut sys :: godot_method_bind , set_bus : 0 as * mut sys :: godot_method_bind , set_doppler_tracking : 0 as * mut sys :: godot_method_bind , set_emission_angle : 0 as * mut sys :: godot_method_bind , set_emission_angle_enabled : 0 as * mut sys :: godot_method_bind , set_emission_angle_filter_attenuation_db : 0 as * mut sys :: godot_method_bind , set_max_db : 0 as * mut sys :: godot_method_bind , set_max_distance : 0 as * mut sys :: godot_method_bind , set_out_of_range_mode : 0 as * mut sys :: godot_method_bind , set_pitch_scale : 0 as * mut sys :: godot_method_bind , set_stream : 0 as * mut sys :: godot_method_bind , set_stream_paused : 0 as * mut sys :: godot_method_bind , set_unit_db : 0 as * mut sys :: godot_method_bind , set_unit_size : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioStreamPlayer3DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamPlayer3D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_area_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_area_mask\0" . as_ptr () as * const c_char) ; table . get_attenuation_filter_cutoff_hz = (gd_api . godot_method_bind_get_method) (class_name , "get_attenuation_filter_cutoff_hz\0" . as_ptr () as * const c_char) ; table . get_attenuation_filter_db = (gd_api . godot_method_bind_get_method) (class_name , "get_attenuation_filter_db\0" . as_ptr () as * const c_char) ; table . get_attenuation_model = (gd_api . godot_method_bind_get_method) (class_name , "get_attenuation_model\0" . as_ptr () as * const c_char) ; table . get_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_bus\0" . as_ptr () as * const c_char) ; table . get_doppler_tracking = (gd_api . godot_method_bind_get_method) (class_name , "get_doppler_tracking\0" . as_ptr () as * const c_char) ; table . get_emission_angle = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_angle\0" . as_ptr () as * const c_char) ; table . get_emission_angle_filter_attenuation_db = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_angle_filter_attenuation_db\0" . as_ptr () as * const c_char) ; table . get_max_db = (gd_api . godot_method_bind_get_method) (class_name , "get_max_db\0" . as_ptr () as * const c_char) ; table . get_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_max_distance\0" . as_ptr () as * const c_char) ; table . get_out_of_range_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_out_of_range_mode\0" . as_ptr () as * const c_char) ; table . get_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_pitch_scale\0" . as_ptr () as * const c_char) ; table . get_playback_position = (gd_api . godot_method_bind_get_method) (class_name , "get_playback_position\0" . as_ptr () as * const c_char) ; table . get_stream = (gd_api . godot_method_bind_get_method) (class_name , "get_stream\0" . as_ptr () as * const c_char) ; table . get_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_paused\0" . as_ptr () as * const c_char) ; table . get_stream_playback = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_playback\0" . as_ptr () as * const c_char) ; table . get_unit_db = (gd_api . godot_method_bind_get_method) (class_name , "get_unit_db\0" . as_ptr () as * const c_char) ; table . get_unit_size = (gd_api . godot_method_bind_get_method) (class_name , "get_unit_size\0" . as_ptr () as * const c_char) ; table . is_autoplay_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_autoplay_enabled\0" . as_ptr () as * const c_char) ; table . is_emission_angle_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_emission_angle_enabled\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\0" . as_ptr () as * const c_char) ; table . set_area_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_area_mask\0" . as_ptr () as * const c_char) ; table . set_attenuation_filter_cutoff_hz = (gd_api . godot_method_bind_get_method) (class_name , "set_attenuation_filter_cutoff_hz\0" . as_ptr () as * const c_char) ; table . set_attenuation_filter_db = (gd_api . godot_method_bind_get_method) (class_name , "set_attenuation_filter_db\0" . as_ptr () as * const c_char) ; table . set_attenuation_model = (gd_api . godot_method_bind_get_method) (class_name , "set_attenuation_model\0" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\0" . as_ptr () as * const c_char) ; table . set_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_bus\0" . as_ptr () as * const c_char) ; table . set_doppler_tracking = (gd_api . godot_method_bind_get_method) (class_name , "set_doppler_tracking\0" . as_ptr () as * const c_char) ; table . set_emission_angle = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_angle\0" . as_ptr () as * const c_char) ; table . set_emission_angle_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_angle_enabled\0" . as_ptr () as * const c_char) ; table . set_emission_angle_filter_attenuation_db = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_angle_filter_attenuation_db\0" . as_ptr () as * const c_char) ; table . set_max_db = (gd_api . godot_method_bind_get_method) (class_name , "set_max_db\0" . as_ptr () as * const c_char) ; table . set_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_max_distance\0" . as_ptr () as * const c_char) ; table . set_out_of_range_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_out_of_range_mode\0" . as_ptr () as * const c_char) ; table . set_pitch_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_pitch_scale\0" . as_ptr () as * const c_char) ; table . set_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_stream\0" . as_ptr () as * const c_char) ; table . set_stream_paused = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_paused\0" . as_ptr () as * const c_char) ; table . set_unit_db = (gd_api . godot_method_bind_get_method) (class_name , "set_unit_db\0" . as_ptr () as * const c_char) ; table . set_unit_size = (gd_api . godot_method_bind_get_method) (class_name , "set_unit_size\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_stream_player_3d::private::AudioStreamPlayer3D;
            
            pub(crate) mod audio_stream_random_pitch {
                # ! [doc = "This module contains types related to the API class [`AudioStreamRandomPitch`][super::AudioStreamRandomPitch]."] pub (crate) mod private { # [doc = "`core class AudioStreamRandomPitch` inherits `AudioStream` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audiostreamrandompitch.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamRandomPitch inherits methods from:\n - [AudioStream](struct.AudioStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamRandomPitch { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioStreamRandomPitch ; impl AudioStreamRandomPitch { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamRandomPitchMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The current [`AudioStream`][AudioStream]."] # [doc = ""] # [inline] pub fn audio_stream (& self) -> Option < Ref < crate :: generated :: AudioStream , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamRandomPitchMethodTable :: get (get_api ()) . get_audio_stream ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: AudioStream , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The intensity of random pitch variation."] # [doc = ""] # [inline] pub fn random_pitch (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamRandomPitchMethodTable :: get (get_api ()) . get_random_pitch ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The current [`AudioStream`][AudioStream]."] # [doc = ""] # [inline] pub fn set_audio_stream (& self , stream : impl AsArg < crate :: generated :: AudioStream >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamRandomPitchMethodTable :: get (get_api ()) . set_audio_stream ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , stream . as_arg_ptr ()) ; } } # [doc = "The intensity of random pitch variation."] # [doc = ""] # [inline] pub fn set_random_pitch (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamRandomPitchMethodTable :: get (get_api ()) . set_random_pitch ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , scale as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamRandomPitch { } unsafe impl GodotObject for AudioStreamRandomPitch { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamRandomPitch" } } impl std :: ops :: Deref for AudioStreamRandomPitch { type Target = crate :: generated :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamRandomPitch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioStream > for AudioStreamRandomPitch { } unsafe impl SubClass < crate :: generated :: Resource > for AudioStreamRandomPitch { } unsafe impl SubClass < crate :: generated :: Reference > for AudioStreamRandomPitch { } unsafe impl SubClass < crate :: generated :: Object > for AudioStreamRandomPitch { } impl Instanciable for AudioStreamRandomPitch { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioStreamRandomPitch :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamRandomPitchMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_audio_stream : * mut sys :: godot_method_bind , pub get_random_pitch : * mut sys :: godot_method_bind , pub set_audio_stream : * mut sys :: godot_method_bind , pub set_random_pitch : * mut sys :: godot_method_bind } impl AudioStreamRandomPitchMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamRandomPitchMethodTable = AudioStreamRandomPitchMethodTable { class_constructor : None , get_audio_stream : 0 as * mut sys :: godot_method_bind , get_random_pitch : 0 as * mut sys :: godot_method_bind , set_audio_stream : 0 as * mut sys :: godot_method_bind , set_random_pitch : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioStreamRandomPitchMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamRandomPitch\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_audio_stream = (gd_api . godot_method_bind_get_method) (class_name , "get_audio_stream\0" . as_ptr () as * const c_char) ; table . get_random_pitch = (gd_api . godot_method_bind_get_method) (class_name , "get_random_pitch\0" . as_ptr () as * const c_char) ; table . set_audio_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_stream\0" . as_ptr () as * const c_char) ; table . set_random_pitch = (gd_api . godot_method_bind_get_method) (class_name , "set_random_pitch\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_stream_random_pitch::private::AudioStreamRandomPitch;
            
            pub mod audio_stream_sample {
                # ! [doc = "This module contains types related to the API class [`AudioStreamSample`][super::AudioStreamSample]."] pub (crate) mod private { # [doc = "`core class AudioStreamSample` inherits `AudioStream` (reference-counted).\n\nThis class has related types in the [`audio_stream_sample`][super::audio_stream_sample] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_audiostreamsample.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nAudioStreamSample inherits methods from:\n - [AudioStream](struct.AudioStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct AudioStreamSample { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: AudioStreamSample ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Format (pub i64) ; impl Format { pub const _8_BITS : Format = Format (0i64) ; pub const _16_BITS : Format = Format (1i64) ; pub const IMA_ADPCM : Format = Format (2i64) ; } impl From < i64 > for Format { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Format > for i64 { # [inline] fn from (v : Format) -> Self { v . 0 } } impl FromVariant for Format { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LoopMode (pub i64) ; impl LoopMode { pub const DISABLED : LoopMode = LoopMode (0i64) ; pub const FORWARD : LoopMode = LoopMode (1i64) ; pub const PING_PONG : LoopMode = LoopMode (2i64) ; pub const BACKWARD : LoopMode = LoopMode (3i64) ; } impl From < i64 > for LoopMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LoopMode > for i64 { # [inline] fn from (v : LoopMode) -> Self { v . 0 } } impl FromVariant for LoopMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl AudioStreamSample { pub const FORMAT_8_BITS : i64 = 0i64 ; pub const LOOP_DISABLED : i64 = 0i64 ; pub const FORMAT_16_BITS : i64 = 1i64 ; pub const LOOP_FORWARD : i64 = 1i64 ; pub const FORMAT_IMA_ADPCM : i64 = 2i64 ; pub const LOOP_PING_PONG : i64 = 2i64 ; pub const LOOP_BACKWARD : i64 = 3i64 ; } impl AudioStreamSample { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = AudioStreamSampleMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Contains the audio data in bytes.\n**Note:** This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte."] # [doc = ""] # [inline] pub fn data (& self) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Audio format. See [`Format`][Format] constants for values."] # [doc = ""] # [inline] pub fn format (& self) -> crate :: generated :: audio_stream_sample :: Format { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . get_format ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: audio_stream_sample :: Format > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The loop start point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present."] # [doc = ""] # [inline] pub fn loop_begin (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . get_loop_begin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The loop end point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present."] # [doc = ""] # [inline] pub fn loop_end (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . get_loop_end ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The loop mode. This information will be imported automatically from the WAV file if present. See [`LoopMode`][LoopMode] constants for values."] # [doc = ""] # [inline] pub fn loop_mode (& self) -> crate :: generated :: audio_stream_sample :: LoopMode { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . get_loop_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: audio_stream_sample :: LoopMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The sample rate for mixing this audio. Higher values require more storage space, but result in better quality.\nIn games, common sample rates in use are `11025`, `16000`, `22050`, `32000`, `44100`, and `48000`.\nAccording to the [Nyquist-Shannon sampling theorem](https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem), there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are using lower-pitched sounds such as voices, lower sample rates such as `32000` or `22050` may be usable with no loss in quality."] # [doc = ""] # [inline] pub fn mix_rate (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . get_mix_rate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, audio is stereo."] # [doc = ""] # [inline] pub fn is_stereo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . is_stereo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Saves the AudioStreamSample as a WAV file to `path`. Samples with IMA ADPCM format can't be saved.\n**Note:** A `.wav` extension is automatically appended to `path` if it is missing."] # [doc = ""] # [inline] pub fn save_to_wav (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . save_to_wav ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Contains the audio data in bytes.\n**Note:** This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte."] # [doc = ""] # [inline] pub fn set_data (& self , data : PoolArray < u8 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . set_data ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , data) ; } } # [doc = "Audio format. See [`Format`][Format] constants for values."] # [doc = ""] # [inline] pub fn set_format (& self , format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . set_format ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , format as _) ; } } # [doc = "The loop start point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present."] # [doc = ""] # [inline] pub fn set_loop_begin (& self , loop_begin : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . set_loop_begin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , loop_begin as _) ; } } # [doc = "The loop end point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present."] # [doc = ""] # [inline] pub fn set_loop_end (& self , loop_end : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . set_loop_end ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , loop_end as _) ; } } # [doc = "The loop mode. This information will be imported automatically from the WAV file if present. See [`LoopMode`][LoopMode] constants for values."] # [doc = ""] # [inline] pub fn set_loop_mode (& self , loop_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . set_loop_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , loop_mode as _) ; } } # [doc = "The sample rate for mixing this audio. Higher values require more storage space, but result in better quality.\nIn games, common sample rates in use are `11025`, `16000`, `22050`, `32000`, `44100`, and `48000`.\nAccording to the [Nyquist-Shannon sampling theorem](https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem), there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are using lower-pitched sounds such as voices, lower sample rates such as `32000` or `22050` may be usable with no loss in quality."] # [doc = ""] # [inline] pub fn set_mix_rate (& self , mix_rate : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . set_mix_rate ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mix_rate as _) ; } } # [doc = "If `true`, audio is stereo."] # [doc = ""] # [inline] pub fn set_stereo (& self , stereo : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = AudioStreamSampleMethodTable :: get (get_api ()) . set_stereo ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , stereo as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for AudioStreamSample { } unsafe impl GodotObject for AudioStreamSample { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "AudioStreamSample" } } impl std :: ops :: Deref for AudioStreamSample { type Target = crate :: generated :: AudioStream ; # [inline] fn deref (& self) -> & crate :: generated :: AudioStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for AudioStreamSample { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AudioStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AudioStream > for AudioStreamSample { } unsafe impl SubClass < crate :: generated :: Resource > for AudioStreamSample { } unsafe impl SubClass < crate :: generated :: Reference > for AudioStreamSample { } unsafe impl SubClass < crate :: generated :: Object > for AudioStreamSample { } impl Instanciable for AudioStreamSample { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { AudioStreamSample :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct AudioStreamSampleMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_data : * mut sys :: godot_method_bind , pub get_format : * mut sys :: godot_method_bind , pub get_loop_begin : * mut sys :: godot_method_bind , pub get_loop_end : * mut sys :: godot_method_bind , pub get_loop_mode : * mut sys :: godot_method_bind , pub get_mix_rate : * mut sys :: godot_method_bind , pub is_stereo : * mut sys :: godot_method_bind , pub save_to_wav : * mut sys :: godot_method_bind , pub set_data : * mut sys :: godot_method_bind , pub set_format : * mut sys :: godot_method_bind , pub set_loop_begin : * mut sys :: godot_method_bind , pub set_loop_end : * mut sys :: godot_method_bind , pub set_loop_mode : * mut sys :: godot_method_bind , pub set_mix_rate : * mut sys :: godot_method_bind , pub set_stereo : * mut sys :: godot_method_bind } impl AudioStreamSampleMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : AudioStreamSampleMethodTable = AudioStreamSampleMethodTable { class_constructor : None , get_data : 0 as * mut sys :: godot_method_bind , get_format : 0 as * mut sys :: godot_method_bind , get_loop_begin : 0 as * mut sys :: godot_method_bind , get_loop_end : 0 as * mut sys :: godot_method_bind , get_loop_mode : 0 as * mut sys :: godot_method_bind , get_mix_rate : 0 as * mut sys :: godot_method_bind , is_stereo : 0 as * mut sys :: godot_method_bind , save_to_wav : 0 as * mut sys :: godot_method_bind , set_data : 0 as * mut sys :: godot_method_bind , set_format : 0 as * mut sys :: godot_method_bind , set_loop_begin : 0 as * mut sys :: godot_method_bind , set_loop_end : 0 as * mut sys :: godot_method_bind , set_loop_mode : 0 as * mut sys :: godot_method_bind , set_mix_rate : 0 as * mut sys :: godot_method_bind , set_stereo : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { AudioStreamSampleMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "AudioStreamSample\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\0" . as_ptr () as * const c_char) ; table . get_loop_begin = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_begin\0" . as_ptr () as * const c_char) ; table . get_loop_end = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_end\0" . as_ptr () as * const c_char) ; table . get_loop_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_loop_mode\0" . as_ptr () as * const c_char) ; table . get_mix_rate = (gd_api . godot_method_bind_get_method) (class_name , "get_mix_rate\0" . as_ptr () as * const c_char) ; table . is_stereo = (gd_api . godot_method_bind_get_method) (class_name , "is_stereo\0" . as_ptr () as * const c_char) ; table . save_to_wav = (gd_api . godot_method_bind_get_method) (class_name , "save_to_wav\0" . as_ptr () as * const c_char) ; table . set_data = (gd_api . godot_method_bind_get_method) (class_name , "set_data\0" . as_ptr () as * const c_char) ; table . set_format = (gd_api . godot_method_bind_get_method) (class_name , "set_format\0" . as_ptr () as * const c_char) ; table . set_loop_begin = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_begin\0" . as_ptr () as * const c_char) ; table . set_loop_end = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_end\0" . as_ptr () as * const c_char) ; table . set_loop_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_loop_mode\0" . as_ptr () as * const c_char) ; table . set_mix_rate = (gd_api . godot_method_bind_get_method) (class_name , "set_mix_rate\0" . as_ptr () as * const c_char) ; table . set_stereo = (gd_api . godot_method_bind_get_method) (class_name , "set_stereo\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::audio_stream_sample::private::AudioStreamSample;
            
            pub mod back_buffer_copy {
                # ! [doc = "This module contains types related to the API class [`BackBufferCopy`][super::BackBufferCopy]."] pub (crate) mod private { # [doc = "`core class BackBufferCopy` inherits `Node2D` (manually managed).\n\nThis class has related types in the [`back_buffer_copy`][super::back_buffer_copy] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_backbuffercopy.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`BackBufferCopy` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<BackBufferCopy>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nBackBufferCopy inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BackBufferCopy { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: BackBufferCopy ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CopyMode (pub i64) ; impl CopyMode { pub const DISABLED : CopyMode = CopyMode (0i64) ; pub const RECT : CopyMode = CopyMode (1i64) ; pub const VIEWPORT : CopyMode = CopyMode (2i64) ; } impl From < i64 > for CopyMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CopyMode > for i64 { # [inline] fn from (v : CopyMode) -> Self { v . 0 } } impl FromVariant for CopyMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl BackBufferCopy { pub const COPY_MODE_DISABLED : i64 = 0i64 ; pub const COPY_MODE_RECT : i64 = 1i64 ; pub const COPY_MODE_VIEWPORT : i64 = 2i64 ; } impl BackBufferCopy { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = BackBufferCopyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Buffer mode. See [`CopyMode`][CopyMode] constants."] # [doc = ""] # [inline] pub fn copy_mode (& self) -> crate :: generated :: back_buffer_copy :: CopyMode { unsafe { let method_bind : * mut sys :: godot_method_bind = BackBufferCopyMethodTable :: get (get_api ()) . get_copy_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: back_buffer_copy :: CopyMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The area covered by the BackBufferCopy. Only used if [`copy_mode`][Self::copy_mode] is [`COPY_MODE_RECT`][Self::COPY_MODE_RECT]."] # [doc = ""] # [inline] pub fn rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = BackBufferCopyMethodTable :: get (get_api ()) . get_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Buffer mode. See [`CopyMode`][CopyMode] constants."] # [doc = ""] # [inline] pub fn set_copy_mode (& self , copy_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BackBufferCopyMethodTable :: get (get_api ()) . set_copy_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , copy_mode as _) ; } } # [doc = "The area covered by the BackBufferCopy. Only used if [`copy_mode`][Self::copy_mode] is [`COPY_MODE_RECT`][Self::COPY_MODE_RECT]."] # [doc = ""] # [inline] pub fn set_rect (& self , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BackBufferCopyMethodTable :: get (get_api ()) . set_rect ; let ret = crate :: icalls :: icallvar__rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BackBufferCopy { } unsafe impl GodotObject for BackBufferCopy { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "BackBufferCopy" } } impl QueueFree for BackBufferCopy { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for BackBufferCopy { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BackBufferCopy { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for BackBufferCopy { } unsafe impl SubClass < crate :: generated :: CanvasItem > for BackBufferCopy { } unsafe impl SubClass < crate :: generated :: Node > for BackBufferCopy { } unsafe impl SubClass < crate :: generated :: Object > for BackBufferCopy { } impl Instanciable for BackBufferCopy { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { BackBufferCopy :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BackBufferCopyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_copy_mode : * mut sys :: godot_method_bind , pub get_rect : * mut sys :: godot_method_bind , pub set_copy_mode : * mut sys :: godot_method_bind , pub set_rect : * mut sys :: godot_method_bind } impl BackBufferCopyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : BackBufferCopyMethodTable = BackBufferCopyMethodTable { class_constructor : None , get_copy_mode : 0 as * mut sys :: godot_method_bind , get_rect : 0 as * mut sys :: godot_method_bind , set_copy_mode : 0 as * mut sys :: godot_method_bind , set_rect : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { BackBufferCopyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "BackBufferCopy\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_copy_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_copy_mode\0" . as_ptr () as * const c_char) ; table . get_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_rect\0" . as_ptr () as * const c_char) ; table . set_copy_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_copy_mode\0" . as_ptr () as * const c_char) ; table . set_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_rect\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::back_buffer_copy::private::BackBufferCopy;
            
            pub mod baked_lightmap {
                # ! [doc = "This module contains types related to the API class [`BakedLightmap`][super::BakedLightmap]."] pub (crate) mod private { # [doc = "`core class BakedLightmap` inherits `VisualInstance` (manually managed).\n\nThis class has related types in the [`baked_lightmap`][super::baked_lightmap] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_bakedlightmap.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`BakedLightmap` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<BakedLightmap>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nBakedLightmap inherits methods from:\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BakedLightmap { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: BakedLightmap ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BakeError (pub i64) ; impl BakeError { pub const OK : BakeError = BakeError (0i64) ; pub const NO_SAVE_PATH : BakeError = BakeError (1i64) ; pub const NO_MESHES : BakeError = BakeError (2i64) ; pub const CANT_CREATE_IMAGE : BakeError = BakeError (3i64) ; pub const LIGHTMAP_SIZE : BakeError = BakeError (4i64) ; pub const INVALID_MESH : BakeError = BakeError (5i64) ; pub const USER_ABORTED : BakeError = BakeError (6i64) ; pub const NO_LIGHTMAPPER : BakeError = BakeError (7i64) ; pub const NO_ROOT : BakeError = BakeError (8i64) ; } impl From < i64 > for BakeError { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BakeError > for i64 { # [inline] fn from (v : BakeError) -> Self { v . 0 } } impl FromVariant for BakeError { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BakeQuality (pub i64) ; impl BakeQuality { pub const LOW : BakeQuality = BakeQuality (0i64) ; pub const MEDIUM : BakeQuality = BakeQuality (1i64) ; pub const HIGH : BakeQuality = BakeQuality (2i64) ; pub const ULTRA : BakeQuality = BakeQuality (3i64) ; } impl From < i64 > for BakeQuality { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BakeQuality > for i64 { # [inline] fn from (v : BakeQuality) -> Self { v . 0 } } impl FromVariant for BakeQuality { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EnvironmentMode (pub i64) ; impl EnvironmentMode { pub const DISABLED : EnvironmentMode = EnvironmentMode (0i64) ; pub const SCENE : EnvironmentMode = EnvironmentMode (1i64) ; pub const CUSTOM_SKY : EnvironmentMode = EnvironmentMode (2i64) ; pub const CUSTOM_COLOR : EnvironmentMode = EnvironmentMode (3i64) ; } impl From < i64 > for EnvironmentMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EnvironmentMode > for i64 { # [inline] fn from (v : EnvironmentMode) -> Self { v . 0 } } impl FromVariant for EnvironmentMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl BakedLightmap { pub const BAKE_ERROR_OK : i64 = 0i64 ; pub const BAKE_QUALITY_LOW : i64 = 0i64 ; pub const ENVIRONMENT_MODE_DISABLED : i64 = 0i64 ; pub const BAKE_ERROR_NO_SAVE_PATH : i64 = 1i64 ; pub const BAKE_QUALITY_MEDIUM : i64 = 1i64 ; pub const ENVIRONMENT_MODE_SCENE : i64 = 1i64 ; pub const BAKE_ERROR_NO_MESHES : i64 = 2i64 ; pub const BAKE_QUALITY_HIGH : i64 = 2i64 ; pub const ENVIRONMENT_MODE_CUSTOM_SKY : i64 = 2i64 ; pub const BAKE_ERROR_CANT_CREATE_IMAGE : i64 = 3i64 ; pub const BAKE_QUALITY_ULTRA : i64 = 3i64 ; pub const ENVIRONMENT_MODE_CUSTOM_COLOR : i64 = 3i64 ; pub const BAKE_ERROR_LIGHTMAP_SIZE : i64 = 4i64 ; pub const BAKE_ERROR_INVALID_MESH : i64 = 5i64 ; pub const BAKE_ERROR_USER_ABORTED : i64 = 6i64 ; pub const BAKE_ERROR_NO_LIGHTMAPPER : i64 = 7i64 ; pub const BAKE_ERROR_NO_ROOT : i64 = 8i64 ; } impl BakedLightmap { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = BakedLightmapMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Bakes the lightmap, scanning from the given `from_node` root and saves the resulting [`BakedLightmapData`][BakedLightmapData] in `data_save_path`. If no root node is provided, parent of this node will be used as root instead. If no save path is provided it will try to match the path from the current [`light_data`][Self::light_data].\n# Default Arguments\n* `from_node` - `null`\n* `data_save_path` - `\"\"`"] # [doc = ""] # [inline] pub fn bake (& self , from_node : impl AsArg < crate :: generated :: Node > , data_save_path : impl Into < GodotString >) -> crate :: generated :: baked_lightmap :: BakeError { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . bake ; let ret = crate :: icalls :: icallvar__obj_str (method_bind , self . this . sys () . as_ptr () , from_node . as_arg_ptr () , data_save_path . into ()) ; < crate :: generated :: baked_lightmap :: BakeError > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Determines the amount of samples per texel used in indirect light baking. The amount of samples for each quality level can be configured in the project settings."] # [doc = ""] # [inline] pub fn bake_quality (& self) -> crate :: generated :: baked_lightmap :: BakeQuality { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_bake_quality ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: baked_lightmap :: BakeQuality > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Raycasting bias used during baking to avoid floating point precision issues."] # [doc = ""] # [inline] pub fn bias (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_bias ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The energy multiplier for each bounce. Higher values will make indirect lighting brighter. A value of `1.0` represents physically accurate behavior, but higher values can be used to make indirect lighting propagate more visibly when using a low number of bounces. This can be used to speed up bake times by lowering the number of [`bounces`][Self::bounces] then increasing [`bounce_indirect_energy`][Self::bounce_indirect_energy]. Unlike [`BakedLightmapData.energy`][BakedLightmapData::energy], this property does not affect direct lighting emitted by light nodes, emissive materials and the environment.\n**Note:** [`bounce_indirect_energy`][Self::bounce_indirect_energy] only has an effect if [`bounces`][Self::bounces] is set to a value greater than or equal to `1`."] # [doc = ""] # [inline] pub fn bounce_indirect_energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_bounce_indirect_energy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Number of light bounces that are taken into account during baking. See also [`bounce_indirect_energy`][Self::bounce_indirect_energy]."] # [doc = ""] # [inline] pub fn bounces (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_bounces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Grid size used for real-time capture information on dynamic objects."] # [doc = ""] # [inline] pub fn capture_cell_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_capture_cell_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "When enabled, an octree containing the scene's lighting information will be computed. This octree will then be used to light dynamic objects in the scene."] # [doc = ""] # [inline] pub fn capture_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_capture_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Bias value to reduce the amount of light propagation in the captured octree."] # [doc = ""] # [inline] pub fn capture_propagation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_capture_propagation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Bake quality of the capture data."] # [doc = ""] # [inline] pub fn capture_quality (& self) -> crate :: generated :: baked_lightmap :: BakeQuality { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_capture_quality ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: baked_lightmap :: BakeQuality > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If a baked mesh doesn't have a UV2 size hint, this value will be used to roughly compute a suitable lightmap size."] # [doc = ""] # [inline] pub fn default_texels_per_unit (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_default_texels_per_unit ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The environment color when [`environment_mode`][Self::environment_mode] is set to [`ENVIRONMENT_MODE_CUSTOM_COLOR`][Self::ENVIRONMENT_MODE_CUSTOM_COLOR]."] # [doc = ""] # [inline] pub fn environment_custom_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_environment_custom_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The energy scaling factor when when [`environment_mode`][Self::environment_mode] is set to [`ENVIRONMENT_MODE_CUSTOM_COLOR`][Self::ENVIRONMENT_MODE_CUSTOM_COLOR] or [`ENVIRONMENT_MODE_CUSTOM_SKY`][Self::ENVIRONMENT_MODE_CUSTOM_SKY]."] # [doc = ""] # [inline] pub fn environment_custom_energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_environment_custom_energy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The [`Sky`][Sky] resource to use when [`environment_mode`][Self::environment_mode] is set o [`ENVIRONMENT_MODE_CUSTOM_SKY`][Self::ENVIRONMENT_MODE_CUSTOM_SKY]."] # [doc = ""] # [inline] pub fn environment_custom_sky (& self) -> Option < Ref < crate :: generated :: Sky , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_environment_custom_sky ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Sky , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The rotation of the baked custom sky."] # [doc = ""] # [inline] pub fn environment_custom_sky_rotation_degrees (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_environment_custom_sky_rotation_degrees ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Minimum ambient light for all the lightmap texels. This doesn't take into account any occlusion from the scene's geometry, it simply ensures a minimum amount of light on all the lightmap texels. Can be used for artistic control on shadow color."] # [doc = ""] # [inline] pub fn environment_min_light (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_environment_min_light ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Decides which environment to use during baking."] # [doc = ""] # [inline] pub fn environment_mode (& self) -> crate :: generated :: baked_lightmap :: EnvironmentMode { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_environment_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: baked_lightmap :: EnvironmentMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Size of the baked lightmap. Only meshes inside this region will be included in the baked lightmap, also used as the bounds of the captured region for dynamic lighting."] # [doc = ""] # [inline] pub fn extents (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_extents ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Deprecated, in previous versions it determined the location where lightmaps were be saved."] # [doc = ""] # [inline] pub fn image_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_image_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The calculated light data."] # [doc = ""] # [inline] pub fn light_data (& self) -> Option < Ref < crate :: generated :: BakedLightmapData , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_light_data ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: BakedLightmapData , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Maximum size of each lightmap layer, only used when [`atlas_generate`][Self::atlas_generate] is enabled."] # [doc = ""] # [inline] pub fn max_atlas_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . get_max_atlas_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the lightmapper will merge the textures for all meshes into one or several large layered textures. If `false`, every mesh will get its own lightmap texture, which is less efficient.\n**Note:** Atlas lightmap rendering is only supported in GLES3, _not_ GLES2. Non-atlas lightmap rendering is supported by both GLES3 and GLES2. If [member ProjectSettings.rendering/quality/driver/fallback_to_gles2] is `true`, consider baking lightmaps with [`atlas_generate`][Self::atlas_generate] set to `false` so that the resulting lightmap is visible in both GLES3 and GLES2."] # [doc = ""] # [inline] pub fn is_generate_atlas_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . is_generate_atlas_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Store full color values in the lightmap textures. When disabled, lightmap textures will store a single brightness channel. Can be disabled to reduce disk usage if the scene contains only white lights or you don't mind losing color information in indirect lighting."] # [doc = ""] # [inline] pub fn is_using_color (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . is_using_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "When enabled, a lightmap denoiser will be used to reduce the noise inherent to Monte Carlo based global illumination."] # [doc = ""] # [inline] pub fn is_using_denoiser (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . is_using_denoiser ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, stores the lightmap textures in a high dynamic range format (EXR). If `false`, stores the lightmap texture in a low dynamic range PNG image. This can be set to `false` to reduce disk usage, but light values over 1.0 will be clamped and you may see banding caused by the reduced precision.\n**Note:** Setting [`use_hdr`][Self::use_hdr] to `true` will decrease lightmap banding even when using the GLES2 backend or if [member ProjectSettings.rendering/quality/depth/hdr] is `false`."] # [doc = ""] # [inline] pub fn is_using_hdr (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . is_using_hdr ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Determines the amount of samples per texel used in indirect light baking. The amount of samples for each quality level can be configured in the project settings."] # [doc = ""] # [inline] pub fn set_bake_quality (& self , quality : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_bake_quality ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , quality as _) ; } } # [doc = "Raycasting bias used during baking to avoid floating point precision issues."] # [doc = ""] # [inline] pub fn set_bias (& self , bias : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_bias ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , bias as _) ; } } # [doc = "The energy multiplier for each bounce. Higher values will make indirect lighting brighter. A value of `1.0` represents physically accurate behavior, but higher values can be used to make indirect lighting propagate more visibly when using a low number of bounces. This can be used to speed up bake times by lowering the number of [`bounces`][Self::bounces] then increasing [`bounce_indirect_energy`][Self::bounce_indirect_energy]. Unlike [`BakedLightmapData.energy`][BakedLightmapData::energy], this property does not affect direct lighting emitted by light nodes, emissive materials and the environment.\n**Note:** [`bounce_indirect_energy`][Self::bounce_indirect_energy] only has an effect if [`bounces`][Self::bounces] is set to a value greater than or equal to `1`."] # [doc = ""] # [inline] pub fn set_bounce_indirect_energy (& self , bounce_indirect_energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_bounce_indirect_energy ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , bounce_indirect_energy as _) ; } } # [doc = "Number of light bounces that are taken into account during baking. See also [`bounce_indirect_energy`][Self::bounce_indirect_energy]."] # [doc = ""] # [inline] pub fn set_bounces (& self , bounces : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_bounces ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bounces as _) ; } } # [doc = "Grid size used for real-time capture information on dynamic objects."] # [doc = ""] # [inline] pub fn set_capture_cell_size (& self , capture_cell_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_capture_cell_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , capture_cell_size as _) ; } } # [doc = "When enabled, an octree containing the scene's lighting information will be computed. This octree will then be used to light dynamic objects in the scene."] # [doc = ""] # [inline] pub fn set_capture_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_capture_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Bias value to reduce the amount of light propagation in the captured octree."] # [doc = ""] # [inline] pub fn set_capture_propagation (& self , propagation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_capture_propagation ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , propagation as _) ; } } # [doc = "Bake quality of the capture data."] # [doc = ""] # [inline] pub fn set_capture_quality (& self , capture_quality : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_capture_quality ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , capture_quality as _) ; } } # [doc = "If a baked mesh doesn't have a UV2 size hint, this value will be used to roughly compute a suitable lightmap size."] # [doc = ""] # [inline] pub fn set_default_texels_per_unit (& self , texels : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_default_texels_per_unit ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , texels as _) ; } } # [doc = "The environment color when [`environment_mode`][Self::environment_mode] is set to [`ENVIRONMENT_MODE_CUSTOM_COLOR`][Self::ENVIRONMENT_MODE_CUSTOM_COLOR]."] # [doc = ""] # [inline] pub fn set_environment_custom_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_environment_custom_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The energy scaling factor when when [`environment_mode`][Self::environment_mode] is set to [`ENVIRONMENT_MODE_CUSTOM_COLOR`][Self::ENVIRONMENT_MODE_CUSTOM_COLOR] or [`ENVIRONMENT_MODE_CUSTOM_SKY`][Self::ENVIRONMENT_MODE_CUSTOM_SKY]."] # [doc = ""] # [inline] pub fn set_environment_custom_energy (& self , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_environment_custom_energy ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , energy as _) ; } } # [doc = "The [`Sky`][Sky] resource to use when [`environment_mode`][Self::environment_mode] is set o [`ENVIRONMENT_MODE_CUSTOM_SKY`][Self::ENVIRONMENT_MODE_CUSTOM_SKY]."] # [doc = ""] # [inline] pub fn set_environment_custom_sky (& self , sky : impl AsArg < crate :: generated :: Sky >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_environment_custom_sky ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , sky . as_arg_ptr ()) ; } } # [doc = "The rotation of the baked custom sky."] # [doc = ""] # [inline] pub fn set_environment_custom_sky_rotation_degrees (& self , rotation : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_environment_custom_sky_rotation_degrees ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , rotation) ; } } # [doc = "Minimum ambient light for all the lightmap texels. This doesn't take into account any occlusion from the scene's geometry, it simply ensures a minimum amount of light on all the lightmap texels. Can be used for artistic control on shadow color."] # [doc = ""] # [inline] pub fn set_environment_min_light (& self , min_light : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_environment_min_light ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , min_light) ; } } # [doc = "Decides which environment to use during baking."] # [doc = ""] # [inline] pub fn set_environment_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_environment_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Size of the baked lightmap. Only meshes inside this region will be included in the baked lightmap, also used as the bounds of the captured region for dynamic lighting."] # [doc = ""] # [inline] pub fn set_extents (& self , extents : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_extents ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , extents) ; } } # [doc = "If `true`, the lightmapper will merge the textures for all meshes into one or several large layered textures. If `false`, every mesh will get its own lightmap texture, which is less efficient.\n**Note:** Atlas lightmap rendering is only supported in GLES3, _not_ GLES2. Non-atlas lightmap rendering is supported by both GLES3 and GLES2. If [member ProjectSettings.rendering/quality/driver/fallback_to_gles2] is `true`, consider baking lightmaps with [`atlas_generate`][Self::atlas_generate] set to `false` so that the resulting lightmap is visible in both GLES3 and GLES2."] # [doc = ""] # [inline] pub fn set_generate_atlas (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_generate_atlas ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Deprecated, in previous versions it determined the location where lightmaps were be saved."] # [doc = ""] # [inline] pub fn set_image_path (& self , image_path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_image_path ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , image_path . into ()) ; } } # [doc = "The calculated light data."] # [doc = ""] # [inline] pub fn set_light_data (& self , data : impl AsArg < crate :: generated :: BakedLightmapData >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_light_data ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , data . as_arg_ptr ()) ; } } # [doc = "Maximum size of each lightmap layer, only used when [`atlas_generate`][Self::atlas_generate] is enabled."] # [doc = ""] # [inline] pub fn set_max_atlas_size (& self , max_atlas_size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_max_atlas_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , max_atlas_size as _) ; } } # [doc = "Store full color values in the lightmap textures. When disabled, lightmap textures will store a single brightness channel. Can be disabled to reduce disk usage if the scene contains only white lights or you don't mind losing color information in indirect lighting."] # [doc = ""] # [inline] pub fn set_use_color (& self , use_denoiser : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_use_color ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , use_denoiser as _) ; } } # [doc = "When enabled, a lightmap denoiser will be used to reduce the noise inherent to Monte Carlo based global illumination."] # [doc = ""] # [inline] pub fn set_use_denoiser (& self , use_denoiser : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_use_denoiser ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , use_denoiser as _) ; } } # [doc = "If `true`, stores the lightmap textures in a high dynamic range format (EXR). If `false`, stores the lightmap texture in a low dynamic range PNG image. This can be set to `false` to reduce disk usage, but light values over 1.0 will be clamped and you may see banding caused by the reduced precision.\n**Note:** Setting [`use_hdr`][Self::use_hdr] to `true` will decrease lightmap banding even when using the GLES2 backend or if [member ProjectSettings.rendering/quality/depth/hdr] is `false`."] # [doc = ""] # [inline] pub fn set_use_hdr (& self , use_denoiser : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapMethodTable :: get (get_api ()) . set_use_hdr ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , use_denoiser as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BakedLightmap { } unsafe impl GodotObject for BakedLightmap { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "BakedLightmap" } } impl QueueFree for BakedLightmap { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for BakedLightmap { type Target = crate :: generated :: VisualInstance ; # [inline] fn deref (& self) -> & crate :: generated :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BakedLightmap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualInstance > for BakedLightmap { } unsafe impl SubClass < crate :: generated :: CullInstance > for BakedLightmap { } unsafe impl SubClass < crate :: generated :: Spatial > for BakedLightmap { } unsafe impl SubClass < crate :: generated :: Node > for BakedLightmap { } unsafe impl SubClass < crate :: generated :: Object > for BakedLightmap { } impl Instanciable for BakedLightmap { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { BakedLightmap :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BakedLightmapMethodTable { pub class_constructor : sys :: godot_class_constructor , pub bake : * mut sys :: godot_method_bind , pub get_bake_quality : * mut sys :: godot_method_bind , pub get_bias : * mut sys :: godot_method_bind , pub get_bounce_indirect_energy : * mut sys :: godot_method_bind , pub get_bounces : * mut sys :: godot_method_bind , pub get_capture_cell_size : * mut sys :: godot_method_bind , pub get_capture_enabled : * mut sys :: godot_method_bind , pub get_capture_propagation : * mut sys :: godot_method_bind , pub get_capture_quality : * mut sys :: godot_method_bind , pub get_default_texels_per_unit : * mut sys :: godot_method_bind , pub get_environment_custom_color : * mut sys :: godot_method_bind , pub get_environment_custom_energy : * mut sys :: godot_method_bind , pub get_environment_custom_sky : * mut sys :: godot_method_bind , pub get_environment_custom_sky_rotation_degrees : * mut sys :: godot_method_bind , pub get_environment_min_light : * mut sys :: godot_method_bind , pub get_environment_mode : * mut sys :: godot_method_bind , pub get_extents : * mut sys :: godot_method_bind , pub get_image_path : * mut sys :: godot_method_bind , pub get_light_data : * mut sys :: godot_method_bind , pub get_max_atlas_size : * mut sys :: godot_method_bind , pub is_generate_atlas_enabled : * mut sys :: godot_method_bind , pub is_using_color : * mut sys :: godot_method_bind , pub is_using_denoiser : * mut sys :: godot_method_bind , pub is_using_hdr : * mut sys :: godot_method_bind , pub set_bake_quality : * mut sys :: godot_method_bind , pub set_bias : * mut sys :: godot_method_bind , pub set_bounce_indirect_energy : * mut sys :: godot_method_bind , pub set_bounces : * mut sys :: godot_method_bind , pub set_capture_cell_size : * mut sys :: godot_method_bind , pub set_capture_enabled : * mut sys :: godot_method_bind , pub set_capture_propagation : * mut sys :: godot_method_bind , pub set_capture_quality : * mut sys :: godot_method_bind , pub set_default_texels_per_unit : * mut sys :: godot_method_bind , pub set_environment_custom_color : * mut sys :: godot_method_bind , pub set_environment_custom_energy : * mut sys :: godot_method_bind , pub set_environment_custom_sky : * mut sys :: godot_method_bind , pub set_environment_custom_sky_rotation_degrees : * mut sys :: godot_method_bind , pub set_environment_min_light : * mut sys :: godot_method_bind , pub set_environment_mode : * mut sys :: godot_method_bind , pub set_extents : * mut sys :: godot_method_bind , pub set_generate_atlas : * mut sys :: godot_method_bind , pub set_image_path : * mut sys :: godot_method_bind , pub set_light_data : * mut sys :: godot_method_bind , pub set_max_atlas_size : * mut sys :: godot_method_bind , pub set_use_color : * mut sys :: godot_method_bind , pub set_use_denoiser : * mut sys :: godot_method_bind , pub set_use_hdr : * mut sys :: godot_method_bind } impl BakedLightmapMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : BakedLightmapMethodTable = BakedLightmapMethodTable { class_constructor : None , bake : 0 as * mut sys :: godot_method_bind , get_bake_quality : 0 as * mut sys :: godot_method_bind , get_bias : 0 as * mut sys :: godot_method_bind , get_bounce_indirect_energy : 0 as * mut sys :: godot_method_bind , get_bounces : 0 as * mut sys :: godot_method_bind , get_capture_cell_size : 0 as * mut sys :: godot_method_bind , get_capture_enabled : 0 as * mut sys :: godot_method_bind , get_capture_propagation : 0 as * mut sys :: godot_method_bind , get_capture_quality : 0 as * mut sys :: godot_method_bind , get_default_texels_per_unit : 0 as * mut sys :: godot_method_bind , get_environment_custom_color : 0 as * mut sys :: godot_method_bind , get_environment_custom_energy : 0 as * mut sys :: godot_method_bind , get_environment_custom_sky : 0 as * mut sys :: godot_method_bind , get_environment_custom_sky_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_environment_min_light : 0 as * mut sys :: godot_method_bind , get_environment_mode : 0 as * mut sys :: godot_method_bind , get_extents : 0 as * mut sys :: godot_method_bind , get_image_path : 0 as * mut sys :: godot_method_bind , get_light_data : 0 as * mut sys :: godot_method_bind , get_max_atlas_size : 0 as * mut sys :: godot_method_bind , is_generate_atlas_enabled : 0 as * mut sys :: godot_method_bind , is_using_color : 0 as * mut sys :: godot_method_bind , is_using_denoiser : 0 as * mut sys :: godot_method_bind , is_using_hdr : 0 as * mut sys :: godot_method_bind , set_bake_quality : 0 as * mut sys :: godot_method_bind , set_bias : 0 as * mut sys :: godot_method_bind , set_bounce_indirect_energy : 0 as * mut sys :: godot_method_bind , set_bounces : 0 as * mut sys :: godot_method_bind , set_capture_cell_size : 0 as * mut sys :: godot_method_bind , set_capture_enabled : 0 as * mut sys :: godot_method_bind , set_capture_propagation : 0 as * mut sys :: godot_method_bind , set_capture_quality : 0 as * mut sys :: godot_method_bind , set_default_texels_per_unit : 0 as * mut sys :: godot_method_bind , set_environment_custom_color : 0 as * mut sys :: godot_method_bind , set_environment_custom_energy : 0 as * mut sys :: godot_method_bind , set_environment_custom_sky : 0 as * mut sys :: godot_method_bind , set_environment_custom_sky_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_environment_min_light : 0 as * mut sys :: godot_method_bind , set_environment_mode : 0 as * mut sys :: godot_method_bind , set_extents : 0 as * mut sys :: godot_method_bind , set_generate_atlas : 0 as * mut sys :: godot_method_bind , set_image_path : 0 as * mut sys :: godot_method_bind , set_light_data : 0 as * mut sys :: godot_method_bind , set_max_atlas_size : 0 as * mut sys :: godot_method_bind , set_use_color : 0 as * mut sys :: godot_method_bind , set_use_denoiser : 0 as * mut sys :: godot_method_bind , set_use_hdr : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { BakedLightmapMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "BakedLightmap\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . bake = (gd_api . godot_method_bind_get_method) (class_name , "bake\0" . as_ptr () as * const c_char) ; table . get_bake_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_quality\0" . as_ptr () as * const c_char) ; table . get_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_bias\0" . as_ptr () as * const c_char) ; table . get_bounce_indirect_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce_indirect_energy\0" . as_ptr () as * const c_char) ; table . get_bounces = (gd_api . godot_method_bind_get_method) (class_name , "get_bounces\0" . as_ptr () as * const c_char) ; table . get_capture_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "get_capture_cell_size\0" . as_ptr () as * const c_char) ; table . get_capture_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_capture_enabled\0" . as_ptr () as * const c_char) ; table . get_capture_propagation = (gd_api . godot_method_bind_get_method) (class_name , "get_capture_propagation\0" . as_ptr () as * const c_char) ; table . get_capture_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_capture_quality\0" . as_ptr () as * const c_char) ; table . get_default_texels_per_unit = (gd_api . godot_method_bind_get_method) (class_name , "get_default_texels_per_unit\0" . as_ptr () as * const c_char) ; table . get_environment_custom_color = (gd_api . godot_method_bind_get_method) (class_name , "get_environment_custom_color\0" . as_ptr () as * const c_char) ; table . get_environment_custom_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_environment_custom_energy\0" . as_ptr () as * const c_char) ; table . get_environment_custom_sky = (gd_api . godot_method_bind_get_method) (class_name , "get_environment_custom_sky\0" . as_ptr () as * const c_char) ; table . get_environment_custom_sky_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_environment_custom_sky_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_environment_min_light = (gd_api . godot_method_bind_get_method) (class_name , "get_environment_min_light\0" . as_ptr () as * const c_char) ; table . get_environment_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_environment_mode\0" . as_ptr () as * const c_char) ; table . get_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_extents\0" . as_ptr () as * const c_char) ; table . get_image_path = (gd_api . godot_method_bind_get_method) (class_name , "get_image_path\0" . as_ptr () as * const c_char) ; table . get_light_data = (gd_api . godot_method_bind_get_method) (class_name , "get_light_data\0" . as_ptr () as * const c_char) ; table . get_max_atlas_size = (gd_api . godot_method_bind_get_method) (class_name , "get_max_atlas_size\0" . as_ptr () as * const c_char) ; table . is_generate_atlas_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_generate_atlas_enabled\0" . as_ptr () as * const c_char) ; table . is_using_color = (gd_api . godot_method_bind_get_method) (class_name , "is_using_color\0" . as_ptr () as * const c_char) ; table . is_using_denoiser = (gd_api . godot_method_bind_get_method) (class_name , "is_using_denoiser\0" . as_ptr () as * const c_char) ; table . is_using_hdr = (gd_api . godot_method_bind_get_method) (class_name , "is_using_hdr\0" . as_ptr () as * const c_char) ; table . set_bake_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_quality\0" . as_ptr () as * const c_char) ; table . set_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_bias\0" . as_ptr () as * const c_char) ; table . set_bounce_indirect_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce_indirect_energy\0" . as_ptr () as * const c_char) ; table . set_bounces = (gd_api . godot_method_bind_get_method) (class_name , "set_bounces\0" . as_ptr () as * const c_char) ; table . set_capture_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "set_capture_cell_size\0" . as_ptr () as * const c_char) ; table . set_capture_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_capture_enabled\0" . as_ptr () as * const c_char) ; table . set_capture_propagation = (gd_api . godot_method_bind_get_method) (class_name , "set_capture_propagation\0" . as_ptr () as * const c_char) ; table . set_capture_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_capture_quality\0" . as_ptr () as * const c_char) ; table . set_default_texels_per_unit = (gd_api . godot_method_bind_get_method) (class_name , "set_default_texels_per_unit\0" . as_ptr () as * const c_char) ; table . set_environment_custom_color = (gd_api . godot_method_bind_get_method) (class_name , "set_environment_custom_color\0" . as_ptr () as * const c_char) ; table . set_environment_custom_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_environment_custom_energy\0" . as_ptr () as * const c_char) ; table . set_environment_custom_sky = (gd_api . godot_method_bind_get_method) (class_name , "set_environment_custom_sky\0" . as_ptr () as * const c_char) ; table . set_environment_custom_sky_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_environment_custom_sky_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_environment_min_light = (gd_api . godot_method_bind_get_method) (class_name , "set_environment_min_light\0" . as_ptr () as * const c_char) ; table . set_environment_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_environment_mode\0" . as_ptr () as * const c_char) ; table . set_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_extents\0" . as_ptr () as * const c_char) ; table . set_generate_atlas = (gd_api . godot_method_bind_get_method) (class_name , "set_generate_atlas\0" . as_ptr () as * const c_char) ; table . set_image_path = (gd_api . godot_method_bind_get_method) (class_name , "set_image_path\0" . as_ptr () as * const c_char) ; table . set_light_data = (gd_api . godot_method_bind_get_method) (class_name , "set_light_data\0" . as_ptr () as * const c_char) ; table . set_max_atlas_size = (gd_api . godot_method_bind_get_method) (class_name , "set_max_atlas_size\0" . as_ptr () as * const c_char) ; table . set_use_color = (gd_api . godot_method_bind_get_method) (class_name , "set_use_color\0" . as_ptr () as * const c_char) ; table . set_use_denoiser = (gd_api . godot_method_bind_get_method) (class_name , "set_use_denoiser\0" . as_ptr () as * const c_char) ; table . set_use_hdr = (gd_api . godot_method_bind_get_method) (class_name , "set_use_hdr\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::baked_lightmap::private::BakedLightmap;
            
            pub(crate) mod baked_lightmap_data {
                # ! [doc = "This module contains types related to the API class [`BakedLightmapData`][super::BakedLightmapData]."] pub (crate) mod private { # [doc = "`core class BakedLightmapData` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_bakedlightmapdata.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nBakedLightmapData inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BakedLightmapData { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: BakedLightmapData ; impl BakedLightmapData { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = BakedLightmapDataMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_user (& self , path : impl Into < NodePath > , lightmap : impl AsArg < crate :: generated :: Resource > , lightmap_slice : i64 , lightmap_uv_rect : Rect2 , instance : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . add_user ; let ret = crate :: icalls :: icallvar__nodepath_obj_i64_rect2_i64 (method_bind , self . this . sys () . as_ptr () , path . into () , lightmap . as_arg_ptr () , lightmap_slice as _ , lightmap_uv_rect , instance as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn clear_data (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . clear_data ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn clear_users (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . clear_users ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn bounds (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_bounds ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn cell_space_transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_cell_space_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn cell_subdiv (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_cell_subdiv ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Global energy multiplier for baked and dynamic capture objects. This can be changed at run-time without having to bake lightmaps again.\nTo adjust only the energy of indirect lighting (without affecting direct lighting or emissive materials), adjust [`BakedLightmap.bounce_indirect_energy`][BakedLightmap::bounce_indirect_energy] and bake lightmaps again."] # [doc = ""] # [inline] pub fn energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_energy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn octree (& self) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_octree ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_user_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_user_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_user_lightmap (& self , user_idx : i64) -> Option < Ref < crate :: generated :: Resource , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_user_lightmap ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , user_idx as _) ; < Option < Ref < crate :: generated :: Resource , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_user_path (& self , user_idx : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . get_user_path ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , user_idx as _) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Controls whether dynamic capture objects receive environment lighting or not."] # [doc = ""] # [inline] pub fn is_interior (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . is_interior ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bounds (& self , bounds : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . set_bounds ; let ret = crate :: icalls :: icallvar__aabb (method_bind , self . this . sys () . as_ptr () , bounds) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cell_space_transform (& self , xform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . set_cell_space_transform ; let ret = crate :: icalls :: icallvar__trans (method_bind , self . this . sys () . as_ptr () , xform) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cell_subdiv (& self , cell_subdiv : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . set_cell_subdiv ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , cell_subdiv as _) ; } } # [doc = "Global energy multiplier for baked and dynamic capture objects. This can be changed at run-time without having to bake lightmaps again.\nTo adjust only the energy of indirect lighting (without affecting direct lighting or emissive materials), adjust [`BakedLightmap.bounce_indirect_energy`][BakedLightmap::bounce_indirect_energy] and bake lightmaps again."] # [doc = ""] # [inline] pub fn set_energy (& self , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . set_energy ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , energy as _) ; } } # [doc = "Controls whether dynamic capture objects receive environment lighting or not."] # [doc = ""] # [inline] pub fn set_interior (& self , interior : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . set_interior ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , interior as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_octree (& self , octree : PoolArray < u8 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BakedLightmapDataMethodTable :: get (get_api ()) . set_octree ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , octree) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BakedLightmapData { } unsafe impl GodotObject for BakedLightmapData { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "BakedLightmapData" } } impl std :: ops :: Deref for BakedLightmapData { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BakedLightmapData { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for BakedLightmapData { } unsafe impl SubClass < crate :: generated :: Reference > for BakedLightmapData { } unsafe impl SubClass < crate :: generated :: Object > for BakedLightmapData { } impl Instanciable for BakedLightmapData { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { BakedLightmapData :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BakedLightmapDataMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_user : * mut sys :: godot_method_bind , pub clear_data : * mut sys :: godot_method_bind , pub clear_users : * mut sys :: godot_method_bind , pub get_bounds : * mut sys :: godot_method_bind , pub get_cell_space_transform : * mut sys :: godot_method_bind , pub get_cell_subdiv : * mut sys :: godot_method_bind , pub get_energy : * mut sys :: godot_method_bind , pub get_octree : * mut sys :: godot_method_bind , pub get_user_count : * mut sys :: godot_method_bind , pub get_user_lightmap : * mut sys :: godot_method_bind , pub get_user_path : * mut sys :: godot_method_bind , pub is_interior : * mut sys :: godot_method_bind , pub set_bounds : * mut sys :: godot_method_bind , pub set_cell_space_transform : * mut sys :: godot_method_bind , pub set_cell_subdiv : * mut sys :: godot_method_bind , pub set_energy : * mut sys :: godot_method_bind , pub set_interior : * mut sys :: godot_method_bind , pub set_octree : * mut sys :: godot_method_bind } impl BakedLightmapDataMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : BakedLightmapDataMethodTable = BakedLightmapDataMethodTable { class_constructor : None , add_user : 0 as * mut sys :: godot_method_bind , clear_data : 0 as * mut sys :: godot_method_bind , clear_users : 0 as * mut sys :: godot_method_bind , get_bounds : 0 as * mut sys :: godot_method_bind , get_cell_space_transform : 0 as * mut sys :: godot_method_bind , get_cell_subdiv : 0 as * mut sys :: godot_method_bind , get_energy : 0 as * mut sys :: godot_method_bind , get_octree : 0 as * mut sys :: godot_method_bind , get_user_count : 0 as * mut sys :: godot_method_bind , get_user_lightmap : 0 as * mut sys :: godot_method_bind , get_user_path : 0 as * mut sys :: godot_method_bind , is_interior : 0 as * mut sys :: godot_method_bind , set_bounds : 0 as * mut sys :: godot_method_bind , set_cell_space_transform : 0 as * mut sys :: godot_method_bind , set_cell_subdiv : 0 as * mut sys :: godot_method_bind , set_energy : 0 as * mut sys :: godot_method_bind , set_interior : 0 as * mut sys :: godot_method_bind , set_octree : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { BakedLightmapDataMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "BakedLightmapData\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_user = (gd_api . godot_method_bind_get_method) (class_name , "add_user\0" . as_ptr () as * const c_char) ; table . clear_data = (gd_api . godot_method_bind_get_method) (class_name , "clear_data\0" . as_ptr () as * const c_char) ; table . clear_users = (gd_api . godot_method_bind_get_method) (class_name , "clear_users\0" . as_ptr () as * const c_char) ; table . get_bounds = (gd_api . godot_method_bind_get_method) (class_name , "get_bounds\0" . as_ptr () as * const c_char) ; table . get_cell_space_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_space_transform\0" . as_ptr () as * const c_char) ; table . get_cell_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_subdiv\0" . as_ptr () as * const c_char) ; table . get_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_energy\0" . as_ptr () as * const c_char) ; table . get_octree = (gd_api . godot_method_bind_get_method) (class_name , "get_octree\0" . as_ptr () as * const c_char) ; table . get_user_count = (gd_api . godot_method_bind_get_method) (class_name , "get_user_count\0" . as_ptr () as * const c_char) ; table . get_user_lightmap = (gd_api . godot_method_bind_get_method) (class_name , "get_user_lightmap\0" . as_ptr () as * const c_char) ; table . get_user_path = (gd_api . godot_method_bind_get_method) (class_name , "get_user_path\0" . as_ptr () as * const c_char) ; table . is_interior = (gd_api . godot_method_bind_get_method) (class_name , "is_interior\0" . as_ptr () as * const c_char) ; table . set_bounds = (gd_api . godot_method_bind_get_method) (class_name , "set_bounds\0" . as_ptr () as * const c_char) ; table . set_cell_space_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_space_transform\0" . as_ptr () as * const c_char) ; table . set_cell_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_subdiv\0" . as_ptr () as * const c_char) ; table . set_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_energy\0" . as_ptr () as * const c_char) ; table . set_interior = (gd_api . godot_method_bind_get_method) (class_name , "set_interior\0" . as_ptr () as * const c_char) ; table . set_octree = (gd_api . godot_method_bind_get_method) (class_name , "set_octree\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::baked_lightmap_data::private::BakedLightmapData;
            
            pub mod base_button {
                # ! [doc = "This module contains types related to the API class [`BaseButton`][super::BaseButton]."] pub (crate) mod private { # [doc = "`core class BaseButton` inherits `Control` (manually managed).\n\nThis class has related types in the [`base_button`][super::base_button] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_basebutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nBaseButton inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BaseButton { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: BaseButton ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ActionMode (pub i64) ; impl ActionMode { pub const PRESS : ActionMode = ActionMode (0i64) ; pub const RELEASE : ActionMode = ActionMode (1i64) ; } impl From < i64 > for ActionMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ActionMode > for i64 { # [inline] fn from (v : ActionMode) -> Self { v . 0 } } impl FromVariant for ActionMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DrawMode (pub i64) ; impl DrawMode { pub const NORMAL : DrawMode = DrawMode (0i64) ; pub const PRESSED : DrawMode = DrawMode (1i64) ; pub const HOVER : DrawMode = DrawMode (2i64) ; pub const DISABLED : DrawMode = DrawMode (3i64) ; pub const HOVER_PRESSED : DrawMode = DrawMode (4i64) ; } impl From < i64 > for DrawMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DrawMode > for i64 { # [inline] fn from (v : DrawMode) -> Self { v . 0 } } impl FromVariant for DrawMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl BaseButton { pub const ACTION_MODE_BUTTON_PRESS : i64 = 0i64 ; pub const DRAW_NORMAL : i64 = 0i64 ; pub const ACTION_MODE_BUTTON_RELEASE : i64 = 1i64 ; pub const DRAW_PRESSED : i64 = 1i64 ; pub const DRAW_HOVER : i64 = 2i64 ; pub const DRAW_DISABLED : i64 = 3i64 ; pub const DRAW_HOVER_PRESSED : i64 = 4i64 ; } impl BaseButton { # [doc = "Determines when the button is considered clicked, one of the [`ActionMode`][ActionMode] constants."] # [doc = ""] # [inline] pub fn action_mode (& self) -> crate :: generated :: base_button :: ActionMode { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . get_action_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: base_button :: ActionMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "[`ButtonGroup`][ButtonGroup] associated to the button."] # [doc = ""] # [inline] pub fn button_group (& self) -> Option < Ref < crate :: generated :: ButtonGroup , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . get_button_group ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: ButtonGroup , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Binary mask to choose which mouse buttons this button will respond to.\nTo allow both left-click and right-click, use `BUTTON_MASK_LEFT | BUTTON_MASK_RIGHT`."] # [doc = ""] # [inline] pub fn button_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . get_button_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to \"draw\" signal. The visual state of the button is defined by the [`DrawMode`][DrawMode] enum."] # [doc = ""] # [inline] pub fn get_draw_mode (& self) -> crate :: generated :: base_button :: DrawMode { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . get_draw_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: base_button :: DrawMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Deprecated._ This property has been deprecated due to redundancy and will be removed in Godot 4.0. This property no longer has any effect when set. Please use [`Control.focus_mode`][Control::focus_mode] instead."] # [doc = ""] # [inline] pub fn enabled_focus_mode (& self) -> crate :: generated :: control :: FocusMode { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . get_enabled_focus_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: control :: FocusMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "[`ShortCut`][ShortCut] associated to the button."] # [doc = ""] # [inline] pub fn shortcut (& self) -> Option < Ref < crate :: generated :: ShortCut , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . get_shortcut ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: ShortCut , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the button is in disabled state and can't be clicked or toggled."] # [doc = ""] # [inline] pub fn is_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . is_disabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the mouse has entered the button and has not left it yet."] # [doc = ""] # [inline] pub fn is_hovered (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . is_hovered ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the button stays pressed when moving the cursor outside the button while pressing it.\n**Note:** This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value."] # [doc = ""] # [inline] pub fn is_keep_pressed_outside (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . is_keep_pressed_outside ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the button's state is pressed. Means the button is pressed down or toggled (if [`toggle_mode`][Self::toggle_mode] is active). Only works if [`toggle_mode`][Self::toggle_mode] is `true`.\n**Note:** Setting [`pressed`][Self::pressed] will result in `toggled` to be emitted. If you want to change the pressed state without emitting that signal, use [`set_pressed_no_signal`][Self::set_pressed_no_signal]."] # [doc = ""] # [inline] pub fn is_pressed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . is_pressed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the button will add information about its shortcut in the tooltip."] # [doc = ""] # [inline] pub fn is_shortcut_in_tooltip_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . is_shortcut_in_tooltip_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked."] # [doc = ""] # [inline] pub fn is_toggle_mode (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . is_toggle_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Determines when the button is considered clicked, one of the [`ActionMode`][ActionMode] constants."] # [doc = ""] # [inline] pub fn set_action_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . set_action_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "[`ButtonGroup`][ButtonGroup] associated to the button."] # [doc = ""] # [inline] pub fn set_button_group (& self , button_group : impl AsArg < crate :: generated :: ButtonGroup >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . set_button_group ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , button_group . as_arg_ptr ()) ; } } # [doc = "Binary mask to choose which mouse buttons this button will respond to.\nTo allow both left-click and right-click, use `BUTTON_MASK_LEFT | BUTTON_MASK_RIGHT`."] # [doc = ""] # [inline] pub fn set_button_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . set_button_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "If `true`, the button is in disabled state and can't be clicked or toggled."] # [doc = ""] # [inline] pub fn set_disabled (& self , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . set_disabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , disabled as _) ; } } # [doc = "_Deprecated._ This property has been deprecated due to redundancy and will be removed in Godot 4.0. This property no longer has any effect when set. Please use [`Control.focus_mode`][Control::focus_mode] instead."] # [doc = ""] # [inline] pub fn set_enabled_focus_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . set_enabled_focus_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "If `true`, the button stays pressed when moving the cursor outside the button while pressing it.\n**Note:** This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value."] # [doc = ""] # [inline] pub fn set_keep_pressed_outside (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . set_keep_pressed_outside ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, the button's state is pressed. Means the button is pressed down or toggled (if [`toggle_mode`][Self::toggle_mode] is active). Only works if [`toggle_mode`][Self::toggle_mode] is `true`.\n**Note:** Setting [`pressed`][Self::pressed] will result in `toggled` to be emitted. If you want to change the pressed state without emitting that signal, use [`set_pressed_no_signal`][Self::set_pressed_no_signal]."] # [doc = ""] # [inline] pub fn set_pressed (& self , pressed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . set_pressed ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , pressed as _) ; } } # [doc = "Changes the [`pressed`][Self::pressed] state of the button, without emitting `toggled`. Use when you just want to change the state of the button without sending the pressed event (e.g. when initializing scene). Only works if [`toggle_mode`][Self::toggle_mode] is `true`.\n**Note:** This method doesn't unpress other buttons in its button [`group`][Self::group]."] # [doc = ""] # [inline] pub fn set_pressed_no_signal (& self , pressed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . set_pressed_no_signal ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , pressed as _) ; } } # [doc = "[`ShortCut`][ShortCut] associated to the button."] # [doc = ""] # [inline] pub fn set_shortcut (& self , shortcut : impl AsArg < crate :: generated :: ShortCut >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . set_shortcut ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , shortcut . as_arg_ptr ()) ; } } # [doc = "If `true`, the button will add information about its shortcut in the tooltip."] # [doc = ""] # [inline] pub fn set_shortcut_in_tooltip (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . set_shortcut_in_tooltip ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked."] # [doc = ""] # [inline] pub fn set_toggle_mode (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BaseButtonMethodTable :: get (get_api ()) . set_toggle_mode ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BaseButton { } unsafe impl GodotObject for BaseButton { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "BaseButton" } } impl QueueFree for BaseButton { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for BaseButton { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BaseButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for BaseButton { } unsafe impl SubClass < crate :: generated :: CanvasItem > for BaseButton { } unsafe impl SubClass < crate :: generated :: Node > for BaseButton { } unsafe impl SubClass < crate :: generated :: Object > for BaseButton { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BaseButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_action_mode : * mut sys :: godot_method_bind , pub get_button_group : * mut sys :: godot_method_bind , pub get_button_mask : * mut sys :: godot_method_bind , pub get_draw_mode : * mut sys :: godot_method_bind , pub get_enabled_focus_mode : * mut sys :: godot_method_bind , pub get_shortcut : * mut sys :: godot_method_bind , pub is_disabled : * mut sys :: godot_method_bind , pub is_hovered : * mut sys :: godot_method_bind , pub is_keep_pressed_outside : * mut sys :: godot_method_bind , pub is_pressed : * mut sys :: godot_method_bind , pub is_shortcut_in_tooltip_enabled : * mut sys :: godot_method_bind , pub is_toggle_mode : * mut sys :: godot_method_bind , pub set_action_mode : * mut sys :: godot_method_bind , pub set_button_group : * mut sys :: godot_method_bind , pub set_button_mask : * mut sys :: godot_method_bind , pub set_disabled : * mut sys :: godot_method_bind , pub set_enabled_focus_mode : * mut sys :: godot_method_bind , pub set_keep_pressed_outside : * mut sys :: godot_method_bind , pub set_pressed : * mut sys :: godot_method_bind , pub set_pressed_no_signal : * mut sys :: godot_method_bind , pub set_shortcut : * mut sys :: godot_method_bind , pub set_shortcut_in_tooltip : * mut sys :: godot_method_bind , pub set_toggle_mode : * mut sys :: godot_method_bind } impl BaseButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : BaseButtonMethodTable = BaseButtonMethodTable { class_constructor : None , get_action_mode : 0 as * mut sys :: godot_method_bind , get_button_group : 0 as * mut sys :: godot_method_bind , get_button_mask : 0 as * mut sys :: godot_method_bind , get_draw_mode : 0 as * mut sys :: godot_method_bind , get_enabled_focus_mode : 0 as * mut sys :: godot_method_bind , get_shortcut : 0 as * mut sys :: godot_method_bind , is_disabled : 0 as * mut sys :: godot_method_bind , is_hovered : 0 as * mut sys :: godot_method_bind , is_keep_pressed_outside : 0 as * mut sys :: godot_method_bind , is_pressed : 0 as * mut sys :: godot_method_bind , is_shortcut_in_tooltip_enabled : 0 as * mut sys :: godot_method_bind , is_toggle_mode : 0 as * mut sys :: godot_method_bind , set_action_mode : 0 as * mut sys :: godot_method_bind , set_button_group : 0 as * mut sys :: godot_method_bind , set_button_mask : 0 as * mut sys :: godot_method_bind , set_disabled : 0 as * mut sys :: godot_method_bind , set_enabled_focus_mode : 0 as * mut sys :: godot_method_bind , set_keep_pressed_outside : 0 as * mut sys :: godot_method_bind , set_pressed : 0 as * mut sys :: godot_method_bind , set_pressed_no_signal : 0 as * mut sys :: godot_method_bind , set_shortcut : 0 as * mut sys :: godot_method_bind , set_shortcut_in_tooltip : 0 as * mut sys :: godot_method_bind , set_toggle_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { BaseButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "BaseButton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_action_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_action_mode\0" . as_ptr () as * const c_char) ; table . get_button_group = (gd_api . godot_method_bind_get_method) (class_name , "get_button_group\0" . as_ptr () as * const c_char) ; table . get_button_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_button_mask\0" . as_ptr () as * const c_char) ; table . get_draw_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_mode\0" . as_ptr () as * const c_char) ; table . get_enabled_focus_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_enabled_focus_mode\0" . as_ptr () as * const c_char) ; table . get_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "get_shortcut\0" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\0" . as_ptr () as * const c_char) ; table . is_hovered = (gd_api . godot_method_bind_get_method) (class_name , "is_hovered\0" . as_ptr () as * const c_char) ; table . is_keep_pressed_outside = (gd_api . godot_method_bind_get_method) (class_name , "is_keep_pressed_outside\0" . as_ptr () as * const c_char) ; table . is_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_pressed\0" . as_ptr () as * const c_char) ; table . is_shortcut_in_tooltip_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_shortcut_in_tooltip_enabled\0" . as_ptr () as * const c_char) ; table . is_toggle_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_toggle_mode\0" . as_ptr () as * const c_char) ; table . set_action_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_action_mode\0" . as_ptr () as * const c_char) ; table . set_button_group = (gd_api . godot_method_bind_get_method) (class_name , "set_button_group\0" . as_ptr () as * const c_char) ; table . set_button_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_button_mask\0" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\0" . as_ptr () as * const c_char) ; table . set_enabled_focus_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled_focus_mode\0" . as_ptr () as * const c_char) ; table . set_keep_pressed_outside = (gd_api . godot_method_bind_get_method) (class_name , "set_keep_pressed_outside\0" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\0" . as_ptr () as * const c_char) ; table . set_pressed_no_signal = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed_no_signal\0" . as_ptr () as * const c_char) ; table . set_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "set_shortcut\0" . as_ptr () as * const c_char) ; table . set_shortcut_in_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "set_shortcut_in_tooltip\0" . as_ptr () as * const c_char) ; table . set_toggle_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_toggle_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::base_button::private::BaseButton;
            
            pub(crate) mod bit_map {
                # ! [doc = "This module contains types related to the API class [`BitMap`][super::BitMap]."] pub (crate) mod private { # [doc = "`core class BitMap` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_bitmap.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nBitMap inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BitMap { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: BitMap ; impl BitMap { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = BitMapMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns an image of the same size as the bitmap and with a [enum Image.Format] of type `FORMAT_L8`. `true` bits of the bitmap are being converted into white pixels, and `false` bits into black."] # [doc = ""] # [inline] pub fn convert_to_image (& self) -> Option < Ref < crate :: generated :: Image , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . convert_to_image ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Image , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a bitmap with the specified size, filled with `false`."] # [doc = ""] # [inline] pub fn create (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . create ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to `false` if the alpha value of the image at that position is equal to `threshold` or less, and `true` in other case.\n# Default Arguments\n* `threshold` - `0.1`"] # [doc = ""] # [inline] pub fn create_from_image_alpha (& self , image : impl AsArg < crate :: generated :: Image > , threshold : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . create_from_image_alpha ; let ret = crate :: icalls :: icallvar__obj_f64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , threshold as _) ; } } # [doc = "Returns bitmap's value at the specified position."] # [doc = ""] # [inline] pub fn get_bit (& self , position : Vector2) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . get_bit ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns bitmap's dimensions."] # [doc = ""] # [inline] pub fn get_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the amount of bitmap elements that are set to `true`."] # [doc = ""] # [inline] pub fn get_true_bit_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . get_true_bit_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Applies morphological dilation or erosion to the bitmap. If `pixels` is positive, dilation is applied to the bitmap. If `pixels` is negative, erosion is applied to the bitmap. `rect` defines the area where the morphological operation is applied. Pixels located outside the `rect` are unaffected by [`grow_mask`][Self::grow_mask]."] # [doc = ""] # [inline] pub fn grow_mask (& self , pixels : i64 , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . grow_mask ; let ret = crate :: icalls :: icallvar__i64_rect2 (method_bind , self . this . sys () . as_ptr () , pixels as _ , rect) ; } } # [doc = "\n# Default Arguments\n* `epsilon` - `2.0`"] # [doc = ""] # [inline] pub fn opaque_to_polygons (& self , rect : Rect2 , epsilon : f64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . opaque_to_polygons ; let ret = crate :: icalls :: icallvar__rect2_f64 (method_bind , self . this . sys () . as_ptr () , rect , epsilon as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Resizes the image to `new_size`."] # [doc = ""] # [inline] pub fn resize (& self , new_size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . resize ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , new_size) ; } } # [doc = "Sets the bitmap's element at the specified position, to the specified value."] # [doc = ""] # [inline] pub fn set_bit (& self , position : Vector2 , bit : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . set_bit ; let ret = crate :: icalls :: icallvar__vec2_bool (method_bind , self . this . sys () . as_ptr () , position , bit as _) ; } } # [doc = "Sets a rectangular portion of the bitmap to the specified value."] # [doc = ""] # [inline] pub fn set_bit_rect (& self , rect : Rect2 , bit : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitMapMethodTable :: get (get_api ()) . set_bit_rect ; let ret = crate :: icalls :: icallvar__rect2_bool (method_bind , self . this . sys () . as_ptr () , rect , bit as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BitMap { } unsafe impl GodotObject for BitMap { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "BitMap" } } impl std :: ops :: Deref for BitMap { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BitMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for BitMap { } unsafe impl SubClass < crate :: generated :: Reference > for BitMap { } unsafe impl SubClass < crate :: generated :: Object > for BitMap { } impl Instanciable for BitMap { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { BitMap :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BitMapMethodTable { pub class_constructor : sys :: godot_class_constructor , pub convert_to_image : * mut sys :: godot_method_bind , pub create : * mut sys :: godot_method_bind , pub create_from_image_alpha : * mut sys :: godot_method_bind , pub get_bit : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_true_bit_count : * mut sys :: godot_method_bind , pub grow_mask : * mut sys :: godot_method_bind , pub opaque_to_polygons : * mut sys :: godot_method_bind , pub resize : * mut sys :: godot_method_bind , pub set_bit : * mut sys :: godot_method_bind , pub set_bit_rect : * mut sys :: godot_method_bind } impl BitMapMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : BitMapMethodTable = BitMapMethodTable { class_constructor : None , convert_to_image : 0 as * mut sys :: godot_method_bind , create : 0 as * mut sys :: godot_method_bind , create_from_image_alpha : 0 as * mut sys :: godot_method_bind , get_bit : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_true_bit_count : 0 as * mut sys :: godot_method_bind , grow_mask : 0 as * mut sys :: godot_method_bind , opaque_to_polygons : 0 as * mut sys :: godot_method_bind , resize : 0 as * mut sys :: godot_method_bind , set_bit : 0 as * mut sys :: godot_method_bind , set_bit_rect : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { BitMapMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "BitMap\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . convert_to_image = (gd_api . godot_method_bind_get_method) (class_name , "convert_to_image\0" . as_ptr () as * const c_char) ; table . create = (gd_api . godot_method_bind_get_method) (class_name , "create\0" . as_ptr () as * const c_char) ; table . create_from_image_alpha = (gd_api . godot_method_bind_get_method) (class_name , "create_from_image_alpha\0" . as_ptr () as * const c_char) ; table . get_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_bit\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_true_bit_count = (gd_api . godot_method_bind_get_method) (class_name , "get_true_bit_count\0" . as_ptr () as * const c_char) ; table . grow_mask = (gd_api . godot_method_bind_get_method) (class_name , "grow_mask\0" . as_ptr () as * const c_char) ; table . opaque_to_polygons = (gd_api . godot_method_bind_get_method) (class_name , "opaque_to_polygons\0" . as_ptr () as * const c_char) ; table . resize = (gd_api . godot_method_bind_get_method) (class_name , "resize\0" . as_ptr () as * const c_char) ; table . set_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_bit\0" . as_ptr () as * const c_char) ; table . set_bit_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_bit_rect\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::bit_map::private::BitMap;
            
            pub(crate) mod bitmap_font {
                # ! [doc = "This module contains types related to the API class [`BitmapFont`][super::BitmapFont]."] pub (crate) mod private { # [doc = "`core class BitmapFont` inherits `Font` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_bitmapfont.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nBitmapFont inherits methods from:\n - [Font](struct.Font.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BitmapFont { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: BitmapFont ; impl BitmapFont { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = BitmapFontMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a character to the font, where `character` is the Unicode value, `texture` is the texture index, `rect` is the region in the texture (in pixels!), `align` is the (optional) alignment for the character and `advance` is the (optional) advance.\n# Default Arguments\n* `align` - `Vector2( 0, 0 )`\n* `advance` - `-1`"] # [doc = ""] # [inline] pub fn add_char (& self , character : i64 , texture : i64 , rect : Rect2 , align : Vector2 , advance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . add_char ; let ret = crate :: icalls :: icallvar__i64_i64_rect2_vec2_f64 (method_bind , self . this . sys () . as_ptr () , character as _ , texture as _ , rect , align , advance as _) ; } } # [doc = "Adds a kerning pair to the [`BitmapFont`][BitmapFont] as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character."] # [doc = ""] # [inline] pub fn add_kerning_pair (& self , char_a : i64 , char_b : i64 , kerning : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . add_kerning_pair ; let ret = crate :: icalls :: icallvar__i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , char_a as _ , char_b as _ , kerning as _) ; } } # [doc = "Adds a texture to the [`BitmapFont`][BitmapFont]."] # [doc = ""] # [inline] pub fn add_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . add_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Clears all the font data and settings."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Creates a BitmapFont from the `*.fnt` file at `path`."] # [doc = ""] # [inline] pub fn create_from_fnt (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . create_from_fnt ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "The fallback font."] # [doc = ""] # [inline] pub fn fallback (& self) -> Option < Ref < crate :: generated :: BitmapFont , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . get_fallback ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: BitmapFont , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a kerning pair as a difference."] # [doc = ""] # [inline] pub fn get_kerning_pair (& self , char_a : i64 , char_b : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . get_kerning_pair ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , char_a as _ , char_b as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the font atlas texture at index `idx`."] # [doc = ""] # [inline] pub fn get_texture (& self , idx : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of textures in the BitmapFont atlas."] # [doc = ""] # [inline] pub fn get_texture_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . get_texture_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Ascent (number of pixels above the baseline)."] # [doc = ""] # [inline] pub fn set_ascent (& self , px : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . set_ascent ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , px as _) ; } } # [doc = "If `true`, distance field hint is enabled."] # [doc = ""] # [inline] pub fn set_distance_field_hint (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . set_distance_field_hint ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The fallback font."] # [doc = ""] # [inline] pub fn set_fallback (& self , fallback : impl AsArg < crate :: generated :: BitmapFont >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . set_fallback ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , fallback . as_arg_ptr ()) ; } } # [doc = "Total font height (ascent plus descent) in pixels."] # [doc = ""] # [inline] pub fn set_height (& self , px : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BitmapFontMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , px as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BitmapFont { } unsafe impl GodotObject for BitmapFont { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "BitmapFont" } } impl std :: ops :: Deref for BitmapFont { type Target = crate :: generated :: Font ; # [inline] fn deref (& self) -> & crate :: generated :: Font { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BitmapFont { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Font { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Font > for BitmapFont { } unsafe impl SubClass < crate :: generated :: Resource > for BitmapFont { } unsafe impl SubClass < crate :: generated :: Reference > for BitmapFont { } unsafe impl SubClass < crate :: generated :: Object > for BitmapFont { } impl Instanciable for BitmapFont { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { BitmapFont :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BitmapFontMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_char : * mut sys :: godot_method_bind , pub add_kerning_pair : * mut sys :: godot_method_bind , pub add_texture : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub create_from_fnt : * mut sys :: godot_method_bind , pub get_fallback : * mut sys :: godot_method_bind , pub get_kerning_pair : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_texture_count : * mut sys :: godot_method_bind , pub set_ascent : * mut sys :: godot_method_bind , pub set_distance_field_hint : * mut sys :: godot_method_bind , pub set_fallback : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind } impl BitmapFontMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : BitmapFontMethodTable = BitmapFontMethodTable { class_constructor : None , add_char : 0 as * mut sys :: godot_method_bind , add_kerning_pair : 0 as * mut sys :: godot_method_bind , add_texture : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , create_from_fnt : 0 as * mut sys :: godot_method_bind , get_fallback : 0 as * mut sys :: godot_method_bind , get_kerning_pair : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_texture_count : 0 as * mut sys :: godot_method_bind , set_ascent : 0 as * mut sys :: godot_method_bind , set_distance_field_hint : 0 as * mut sys :: godot_method_bind , set_fallback : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { BitmapFontMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "BitmapFont\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_char = (gd_api . godot_method_bind_get_method) (class_name , "add_char\0" . as_ptr () as * const c_char) ; table . add_kerning_pair = (gd_api . godot_method_bind_get_method) (class_name , "add_kerning_pair\0" . as_ptr () as * const c_char) ; table . add_texture = (gd_api . godot_method_bind_get_method) (class_name , "add_texture\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . create_from_fnt = (gd_api . godot_method_bind_get_method) (class_name , "create_from_fnt\0" . as_ptr () as * const c_char) ; table . get_fallback = (gd_api . godot_method_bind_get_method) (class_name , "get_fallback\0" . as_ptr () as * const c_char) ; table . get_kerning_pair = (gd_api . godot_method_bind_get_method) (class_name , "get_kerning_pair\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_texture_count = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_count\0" . as_ptr () as * const c_char) ; table . set_ascent = (gd_api . godot_method_bind_get_method) (class_name , "set_ascent\0" . as_ptr () as * const c_char) ; table . set_distance_field_hint = (gd_api . godot_method_bind_get_method) (class_name , "set_distance_field_hint\0" . as_ptr () as * const c_char) ; table . set_fallback = (gd_api . godot_method_bind_get_method) (class_name , "set_fallback\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::bitmap_font::private::BitmapFont;
            
            pub(crate) mod bone_2d {
                # ! [doc = "This module contains types related to the API class [`Bone2D`][super::Bone2D]."] pub (crate) mod private { # [doc = "`core class Bone2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_bone2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Bone2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Bone2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nBone2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Bone2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Bone2D ; impl Bone2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Bone2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Stores the node's current transforms in [`rest`][Self::rest]."] # [doc = ""] # [inline] pub fn apply_rest (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Bone2DMethodTable :: get (get_api ()) . apply_rest ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Length of the bone's representation drawn in the editor's viewport in pixels."] # [doc = ""] # [inline] pub fn default_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Bone2DMethodTable :: get (get_api ()) . get_default_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the node's index as part of the entire skeleton. See [`Skeleton2D`][Skeleton2D]."] # [doc = ""] # [inline] pub fn get_index_in_skeleton (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Bone2DMethodTable :: get (get_api ()) . get_index_in_skeleton ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Rest transform of the bone. You can reset the node's transforms to this value using [`apply_rest`][Self::apply_rest]."] # [doc = ""] # [inline] pub fn rest (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Bone2DMethodTable :: get (get_api ()) . get_rest ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the node's [`rest`][Self::rest] `Transform2D` if it doesn't have a parent, or its rest pose relative to its parent."] # [doc = ""] # [inline] pub fn get_skeleton_rest (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Bone2DMethodTable :: get (get_api ()) . get_skeleton_rest ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Length of the bone's representation drawn in the editor's viewport in pixels."] # [doc = ""] # [inline] pub fn set_default_length (& self , default_length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Bone2DMethodTable :: get (get_api ()) . set_default_length ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , default_length as _) ; } } # [doc = "Rest transform of the bone. You can reset the node's transforms to this value using [`apply_rest`][Self::apply_rest]."] # [doc = ""] # [inline] pub fn set_rest (& self , rest : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Bone2DMethodTable :: get (get_api ()) . set_rest ; let ret = crate :: icalls :: icallvar__trans2D (method_bind , self . this . sys () . as_ptr () , rest) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Bone2D { } unsafe impl GodotObject for Bone2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Bone2D" } } impl QueueFree for Bone2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Bone2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Bone2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for Bone2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Bone2D { } unsafe impl SubClass < crate :: generated :: Node > for Bone2D { } unsafe impl SubClass < crate :: generated :: Object > for Bone2D { } impl Instanciable for Bone2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Bone2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Bone2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub apply_rest : * mut sys :: godot_method_bind , pub get_default_length : * mut sys :: godot_method_bind , pub get_index_in_skeleton : * mut sys :: godot_method_bind , pub get_rest : * mut sys :: godot_method_bind , pub get_skeleton_rest : * mut sys :: godot_method_bind , pub set_default_length : * mut sys :: godot_method_bind , pub set_rest : * mut sys :: godot_method_bind } impl Bone2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Bone2DMethodTable = Bone2DMethodTable { class_constructor : None , apply_rest : 0 as * mut sys :: godot_method_bind , get_default_length : 0 as * mut sys :: godot_method_bind , get_index_in_skeleton : 0 as * mut sys :: godot_method_bind , get_rest : 0 as * mut sys :: godot_method_bind , get_skeleton_rest : 0 as * mut sys :: godot_method_bind , set_default_length : 0 as * mut sys :: godot_method_bind , set_rest : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Bone2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Bone2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . apply_rest = (gd_api . godot_method_bind_get_method) (class_name , "apply_rest\0" . as_ptr () as * const c_char) ; table . get_default_length = (gd_api . godot_method_bind_get_method) (class_name , "get_default_length\0" . as_ptr () as * const c_char) ; table . get_index_in_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_index_in_skeleton\0" . as_ptr () as * const c_char) ; table . get_rest = (gd_api . godot_method_bind_get_method) (class_name , "get_rest\0" . as_ptr () as * const c_char) ; table . get_skeleton_rest = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton_rest\0" . as_ptr () as * const c_char) ; table . set_default_length = (gd_api . godot_method_bind_get_method) (class_name , "set_default_length\0" . as_ptr () as * const c_char) ; table . set_rest = (gd_api . godot_method_bind_get_method) (class_name , "set_rest\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::bone_2d::private::Bone2D;
            
            pub(crate) mod bone_attachment {
                # ! [doc = "This module contains types related to the API class [`BoneAttachment`][super::BoneAttachment]."] pub (crate) mod private { # [doc = "`core class BoneAttachment` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_boneattachment.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`BoneAttachment` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<BoneAttachment>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nBoneAttachment inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BoneAttachment { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: BoneAttachment ; impl BoneAttachment { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = BoneAttachmentMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The name of the attached bone."] # [doc = ""] # [inline] pub fn bone_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = BoneAttachmentMethodTable :: get (get_api ()) . get_bone_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The name of the attached bone."] # [doc = ""] # [inline] pub fn set_bone_name (& self , bone_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BoneAttachmentMethodTable :: get (get_api ()) . set_bone_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , bone_name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BoneAttachment { } unsafe impl GodotObject for BoneAttachment { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "BoneAttachment" } } impl QueueFree for BoneAttachment { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for BoneAttachment { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BoneAttachment { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for BoneAttachment { } unsafe impl SubClass < crate :: generated :: Node > for BoneAttachment { } unsafe impl SubClass < crate :: generated :: Object > for BoneAttachment { } impl Instanciable for BoneAttachment { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { BoneAttachment :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BoneAttachmentMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bone_name : * mut sys :: godot_method_bind , pub set_bone_name : * mut sys :: godot_method_bind } impl BoneAttachmentMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : BoneAttachmentMethodTable = BoneAttachmentMethodTable { class_constructor : None , get_bone_name : 0 as * mut sys :: godot_method_bind , set_bone_name : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { BoneAttachmentMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "BoneAttachment\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bone_name = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_name\0" . as_ptr () as * const c_char) ; table . set_bone_name = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_name\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::bone_attachment::private::BoneAttachment;
            
            pub mod box_container {
                # ! [doc = "This module contains types related to the API class [`BoxContainer`][super::BoxContainer]."] pub (crate) mod private { # [doc = "`core class BoxContainer` inherits `Container` (manually managed).\n\nThis class has related types in the [`box_container`][super::box_container] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_boxcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nBoxContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BoxContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: BoxContainer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AlignMode (pub i64) ; impl AlignMode { pub const BEGIN : AlignMode = AlignMode (0i64) ; pub const CENTER : AlignMode = AlignMode (1i64) ; pub const END : AlignMode = AlignMode (2i64) ; } impl From < i64 > for AlignMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AlignMode > for i64 { # [inline] fn from (v : AlignMode) -> Self { v . 0 } } impl FromVariant for AlignMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl BoxContainer { pub const ALIGN_BEGIN : i64 = 0i64 ; pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_END : i64 = 2i64 ; } impl BoxContainer { # [doc = "Adds a control to the box as a spacer. If `true`, `begin` will insert the spacer control in front of other children."] # [doc = ""] # [inline] pub fn add_spacer (& self , begin : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BoxContainerMethodTable :: get (get_api ()) . add_spacer ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , begin as _) ; } } # [doc = "The alignment of the container's children (must be one of [`ALIGN_BEGIN`][Self::ALIGN_BEGIN], [`ALIGN_CENTER`][Self::ALIGN_CENTER] or [`ALIGN_END`][Self::ALIGN_END])."] # [doc = ""] # [inline] pub fn alignment (& self) -> crate :: generated :: box_container :: AlignMode { unsafe { let method_bind : * mut sys :: godot_method_bind = BoxContainerMethodTable :: get (get_api ()) . get_alignment ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: box_container :: AlignMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The alignment of the container's children (must be one of [`ALIGN_BEGIN`][Self::ALIGN_BEGIN], [`ALIGN_CENTER`][Self::ALIGN_CENTER] or [`ALIGN_END`][Self::ALIGN_END])."] # [doc = ""] # [inline] pub fn set_alignment (& self , alignment : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BoxContainerMethodTable :: get (get_api ()) . set_alignment ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , alignment as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BoxContainer { } unsafe impl GodotObject for BoxContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "BoxContainer" } } impl QueueFree for BoxContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for BoxContainer { type Target = crate :: generated :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BoxContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Container > for BoxContainer { } unsafe impl SubClass < crate :: generated :: Control > for BoxContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for BoxContainer { } unsafe impl SubClass < crate :: generated :: Node > for BoxContainer { } unsafe impl SubClass < crate :: generated :: Object > for BoxContainer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BoxContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_spacer : * mut sys :: godot_method_bind , pub get_alignment : * mut sys :: godot_method_bind , pub set_alignment : * mut sys :: godot_method_bind } impl BoxContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : BoxContainerMethodTable = BoxContainerMethodTable { class_constructor : None , add_spacer : 0 as * mut sys :: godot_method_bind , get_alignment : 0 as * mut sys :: godot_method_bind , set_alignment : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { BoxContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "BoxContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_spacer = (gd_api . godot_method_bind_get_method) (class_name , "add_spacer\0" . as_ptr () as * const c_char) ; table . get_alignment = (gd_api . godot_method_bind_get_method) (class_name , "get_alignment\0" . as_ptr () as * const c_char) ; table . set_alignment = (gd_api . godot_method_bind_get_method) (class_name , "set_alignment\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::box_container::private::BoxContainer;
            
            pub(crate) mod box_shape {
                # ! [doc = "This module contains types related to the API class [`BoxShape`][super::BoxShape]."] pub (crate) mod private { # [doc = "`core class BoxShape` inherits `Shape` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_boxshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nBoxShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BoxShape { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: BoxShape ; impl BoxShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = BoxShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The box's half extents. The width, height and depth of this shape is twice the half extents."] # [doc = ""] # [inline] pub fn extents (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = BoxShapeMethodTable :: get (get_api ()) . get_extents ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The box's half extents. The width, height and depth of this shape is twice the half extents."] # [doc = ""] # [inline] pub fn set_extents (& self , extents : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = BoxShapeMethodTable :: get (get_api ()) . set_extents ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , extents) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for BoxShape { } unsafe impl GodotObject for BoxShape { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "BoxShape" } } impl std :: ops :: Deref for BoxShape { type Target = crate :: generated :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BoxShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape > for BoxShape { } unsafe impl SubClass < crate :: generated :: Resource > for BoxShape { } unsafe impl SubClass < crate :: generated :: Reference > for BoxShape { } unsafe impl SubClass < crate :: generated :: Object > for BoxShape { } impl Instanciable for BoxShape { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { BoxShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct BoxShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_extents : * mut sys :: godot_method_bind , pub set_extents : * mut sys :: godot_method_bind } impl BoxShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : BoxShapeMethodTable = BoxShapeMethodTable { class_constructor : None , get_extents : 0 as * mut sys :: godot_method_bind , set_extents : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { BoxShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "BoxShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_extents\0" . as_ptr () as * const c_char) ; table . set_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_extents\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::box_shape::private::BoxShape;
            
            pub(crate) mod bullet_physics_server {
                # ! [doc = "This module contains types related to the API class [`BulletPhysicsServer`][super::BulletPhysicsServer]."] pub (crate) mod private { # [doc = "`core class BulletPhysicsServer` inherits `PhysicsServer` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_bulletphysicsserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nBulletPhysicsServer inherits methods from:\n - [PhysicsServer](struct.PhysicsServer.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct BulletPhysicsServer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: BulletPhysicsServer ; impl BulletPhysicsServer { } impl gdnative_core :: private :: godot_object :: Sealed for BulletPhysicsServer { } unsafe impl GodotObject for BulletPhysicsServer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "BulletPhysicsServer" } } impl std :: ops :: Deref for BulletPhysicsServer { type Target = crate :: generated :: PhysicsServer ; # [inline] fn deref (& self) -> & crate :: generated :: PhysicsServer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for BulletPhysicsServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PhysicsServer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PhysicsServer > for BulletPhysicsServer { } unsafe impl SubClass < crate :: generated :: Object > for BulletPhysicsServer { }
                use super::*;
            }
            pub use crate::generated::bullet_physics_server::private::BulletPhysicsServer;
            
            pub mod button {
                # ! [doc = "This module contains types related to the API class [`Button`][super::Button]."] pub (crate) mod private { # [doc = "`core class Button` inherits `BaseButton` (manually managed).\n\nThis class has related types in the [`button`][super::button] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_button.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Button` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Button>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nButton inherits methods from:\n - [BaseButton](struct.BaseButton.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Button { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Button ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TextAlign (pub i64) ; impl TextAlign { pub const LEFT : TextAlign = TextAlign (0i64) ; pub const CENTER : TextAlign = TextAlign (1i64) ; pub const RIGHT : TextAlign = TextAlign (2i64) ; } impl From < i64 > for TextAlign { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TextAlign > for i64 { # [inline] fn from (v : TextAlign) -> Self { v . 0 } } impl FromVariant for TextAlign { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Button { pub const ALIGN_LEFT : i64 = 0i64 ; pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; } impl Button { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Button's icon, if text is present the icon will be placed before the text.\nTo edit margin and spacing of the icon, use `hseparation` theme property of [`Button`][Button] and `content_margin_*` properties of the used [`StyleBox`][StyleBox]es."] # [doc = ""] # [inline] pub fn button_icon (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . get_button_icon ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text."] # [doc = ""] # [inline] pub fn clip_text (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . get_clip_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [`TextAlign`][TextAlign] constants as the text alignment. If centered, text will draw on top of the icon."] # [doc = ""] # [inline] pub fn icon_align (& self) -> crate :: generated :: button :: TextAlign { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . get_icon_align ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: button :: TextAlign > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The button's text that will be displayed inside the button's area."] # [doc = ""] # [inline] pub fn text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . get_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Text alignment policy for the button's text, use one of the [`TextAlign`][TextAlign] constants."] # [doc = ""] # [inline] pub fn text_align (& self) -> crate :: generated :: button :: TextAlign { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . get_text_align ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: button :: TextAlign > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect."] # [doc = ""] # [inline] pub fn is_expand_icon (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . is_expand_icon ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Flat buttons don't display decoration."] # [doc = ""] # [inline] pub fn is_flat (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . is_flat ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Button's icon, if text is present the icon will be placed before the text.\nTo edit margin and spacing of the icon, use `hseparation` theme property of [`Button`][Button] and `content_margin_*` properties of the used [`StyleBox`][StyleBox]es."] # [doc = ""] # [inline] pub fn set_button_icon (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . set_button_icon ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text."] # [doc = ""] # [inline] pub fn set_clip_text (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . set_clip_text ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect."] # [doc = ""] # [inline] pub fn set_expand_icon (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . set_expand_icon ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Flat buttons don't display decoration."] # [doc = ""] # [inline] pub fn set_flat (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . set_flat ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [`TextAlign`][TextAlign] constants as the text alignment. If centered, text will draw on top of the icon."] # [doc = ""] # [inline] pub fn set_icon_align (& self , icon_align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . set_icon_align ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , icon_align as _) ; } } # [doc = "The button's text that will be displayed inside the button's area."] # [doc = ""] # [inline] pub fn set_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . set_text ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Text alignment policy for the button's text, use one of the [`TextAlign`][TextAlign] constants."] # [doc = ""] # [inline] pub fn set_text_align (& self , align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonMethodTable :: get (get_api ()) . set_text_align ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , align as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Button { } unsafe impl GodotObject for Button { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Button" } } impl QueueFree for Button { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Button { type Target = crate :: generated :: BaseButton ; # [inline] fn deref (& self) -> & crate :: generated :: BaseButton { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Button { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: BaseButton { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: BaseButton > for Button { } unsafe impl SubClass < crate :: generated :: Control > for Button { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Button { } unsafe impl SubClass < crate :: generated :: Node > for Button { } unsafe impl SubClass < crate :: generated :: Object > for Button { } impl Instanciable for Button { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Button :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_button_icon : * mut sys :: godot_method_bind , pub get_clip_text : * mut sys :: godot_method_bind , pub get_icon_align : * mut sys :: godot_method_bind , pub get_text : * mut sys :: godot_method_bind , pub get_text_align : * mut sys :: godot_method_bind , pub is_expand_icon : * mut sys :: godot_method_bind , pub is_flat : * mut sys :: godot_method_bind , pub set_button_icon : * mut sys :: godot_method_bind , pub set_clip_text : * mut sys :: godot_method_bind , pub set_expand_icon : * mut sys :: godot_method_bind , pub set_flat : * mut sys :: godot_method_bind , pub set_icon_align : * mut sys :: godot_method_bind , pub set_text : * mut sys :: godot_method_bind , pub set_text_align : * mut sys :: godot_method_bind } impl ButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ButtonMethodTable = ButtonMethodTable { class_constructor : None , get_button_icon : 0 as * mut sys :: godot_method_bind , get_clip_text : 0 as * mut sys :: godot_method_bind , get_icon_align : 0 as * mut sys :: godot_method_bind , get_text : 0 as * mut sys :: godot_method_bind , get_text_align : 0 as * mut sys :: godot_method_bind , is_expand_icon : 0 as * mut sys :: godot_method_bind , is_flat : 0 as * mut sys :: godot_method_bind , set_button_icon : 0 as * mut sys :: godot_method_bind , set_clip_text : 0 as * mut sys :: godot_method_bind , set_expand_icon : 0 as * mut sys :: godot_method_bind , set_flat : 0 as * mut sys :: godot_method_bind , set_icon_align : 0 as * mut sys :: godot_method_bind , set_text : 0 as * mut sys :: godot_method_bind , set_text_align : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Button\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_button_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_button_icon\0" . as_ptr () as * const c_char) ; table . get_clip_text = (gd_api . godot_method_bind_get_method) (class_name , "get_clip_text\0" . as_ptr () as * const c_char) ; table . get_icon_align = (gd_api . godot_method_bind_get_method) (class_name , "get_icon_align\0" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . get_text_align = (gd_api . godot_method_bind_get_method) (class_name , "get_text_align\0" . as_ptr () as * const c_char) ; table . is_expand_icon = (gd_api . godot_method_bind_get_method) (class_name , "is_expand_icon\0" . as_ptr () as * const c_char) ; table . is_flat = (gd_api . godot_method_bind_get_method) (class_name , "is_flat\0" . as_ptr () as * const c_char) ; table . set_button_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_button_icon\0" . as_ptr () as * const c_char) ; table . set_clip_text = (gd_api . godot_method_bind_get_method) (class_name , "set_clip_text\0" . as_ptr () as * const c_char) ; table . set_expand_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_icon\0" . as_ptr () as * const c_char) ; table . set_flat = (gd_api . godot_method_bind_get_method) (class_name , "set_flat\0" . as_ptr () as * const c_char) ; table . set_icon_align = (gd_api . godot_method_bind_get_method) (class_name , "set_icon_align\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; table . set_text_align = (gd_api . godot_method_bind_get_method) (class_name , "set_text_align\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::button::private::Button;
            
            pub(crate) mod button_group {
                # ! [doc = "This module contains types related to the API class [`ButtonGroup`][super::ButtonGroup]."] pub (crate) mod private { # [doc = "`core class ButtonGroup` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_buttongroup.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nButtonGroup inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ButtonGroup { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ButtonGroup ; impl ButtonGroup { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ButtonGroupMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns an [`Array`][VariantArray] of [`Button`][Button]s who have this as their [`ButtonGroup`][ButtonGroup] (see [`BaseButton.group`][BaseButton::group])."] # [doc = ""] # [inline] pub fn get_buttons (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonGroupMethodTable :: get (get_api ()) . get_buttons ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current pressed button."] # [doc = ""] # [inline] pub fn get_pressed_button (& self) -> Option < Ref < crate :: generated :: BaseButton , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ButtonGroupMethodTable :: get (get_api ()) . get_pressed_button ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: BaseButton , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for ButtonGroup { } unsafe impl GodotObject for ButtonGroup { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ButtonGroup" } } impl std :: ops :: Deref for ButtonGroup { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ButtonGroup { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for ButtonGroup { } unsafe impl SubClass < crate :: generated :: Reference > for ButtonGroup { } unsafe impl SubClass < crate :: generated :: Object > for ButtonGroup { } impl Instanciable for ButtonGroup { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ButtonGroup :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ButtonGroupMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_buttons : * mut sys :: godot_method_bind , pub get_pressed_button : * mut sys :: godot_method_bind } impl ButtonGroupMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ButtonGroupMethodTable = ButtonGroupMethodTable { class_constructor : None , get_buttons : 0 as * mut sys :: godot_method_bind , get_pressed_button : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ButtonGroupMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ButtonGroup\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_buttons = (gd_api . godot_method_bind_get_method) (class_name , "get_buttons\0" . as_ptr () as * const c_char) ; table . get_pressed_button = (gd_api . godot_method_bind_get_method) (class_name , "get_pressed_button\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::button_group::private::ButtonGroup;
            
            pub mod cpu_particles {
                # ! [doc = "This module contains types related to the API class [`CPUParticles`][super::CPUParticles]."] pub (crate) mod private { # [doc = "`core class CPUParticles` inherits `GeometryInstance` (manually managed).\n\nThis class has related types in the [`cpu_particles`][super::cpu_particles] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_cpuparticles.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CPUParticles` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CPUParticles>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCPUParticles inherits methods from:\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CPUParticles { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CPUParticles ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DrawOrder (pub i64) ; impl DrawOrder { pub const INDEX : DrawOrder = DrawOrder (0i64) ; pub const LIFETIME : DrawOrder = DrawOrder (1i64) ; pub const VIEW_DEPTH : DrawOrder = DrawOrder (2i64) ; } impl From < i64 > for DrawOrder { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DrawOrder > for i64 { # [inline] fn from (v : DrawOrder) -> Self { v . 0 } } impl FromVariant for DrawOrder { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EmissionShape (pub i64) ; impl EmissionShape { pub const POINT : EmissionShape = EmissionShape (0i64) ; pub const SPHERE : EmissionShape = EmissionShape (1i64) ; pub const BOX : EmissionShape = EmissionShape (2i64) ; pub const POINTS : EmissionShape = EmissionShape (3i64) ; pub const DIRECTED_POINTS : EmissionShape = EmissionShape (4i64) ; pub const RING : EmissionShape = EmissionShape (5i64) ; pub const MAX : EmissionShape = EmissionShape (6i64) ; } impl From < i64 > for EmissionShape { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EmissionShape > for i64 { # [inline] fn from (v : EmissionShape) -> Self { v . 0 } } impl FromVariant for EmissionShape { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flags (pub i64) ; impl Flags { pub const ALIGN_Y_TO_VELOCITY : Flags = Flags (0i64) ; pub const ROTATE_Y : Flags = Flags (1i64) ; pub const DISABLE_Z : Flags = Flags (2i64) ; pub const MAX : Flags = Flags (3i64) ; } impl From < i64 > for Flags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flags > for i64 { # [inline] fn from (v : Flags) -> Self { v . 0 } } impl FromVariant for Flags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Parameter (pub i64) ; impl Parameter { pub const INITIAL_LINEAR_VELOCITY : Parameter = Parameter (0i64) ; pub const ANGULAR_VELOCITY : Parameter = Parameter (1i64) ; pub const ORBIT_VELOCITY : Parameter = Parameter (2i64) ; pub const LINEAR_ACCEL : Parameter = Parameter (3i64) ; pub const RADIAL_ACCEL : Parameter = Parameter (4i64) ; pub const TANGENTIAL_ACCEL : Parameter = Parameter (5i64) ; pub const DAMPING : Parameter = Parameter (6i64) ; pub const ANGLE : Parameter = Parameter (7i64) ; pub const SCALE : Parameter = Parameter (8i64) ; pub const HUE_VARIATION : Parameter = Parameter (9i64) ; pub const ANIM_SPEED : Parameter = Parameter (10i64) ; pub const ANIM_OFFSET : Parameter = Parameter (11i64) ; pub const MAX : Parameter = Parameter (12i64) ; } impl From < i64 > for Parameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Parameter > for i64 { # [inline] fn from (v : Parameter) -> Self { v . 0 } } impl FromVariant for Parameter { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CPUParticles { pub const DRAW_ORDER_INDEX : i64 = 0i64 ; pub const EMISSION_SHAPE_POINT : i64 = 0i64 ; pub const FLAG_ALIGN_Y_TO_VELOCITY : i64 = 0i64 ; pub const PARAM_INITIAL_LINEAR_VELOCITY : i64 = 0i64 ; pub const DRAW_ORDER_LIFETIME : i64 = 1i64 ; pub const EMISSION_SHAPE_SPHERE : i64 = 1i64 ; pub const FLAG_ROTATE_Y : i64 = 1i64 ; pub const PARAM_ANGULAR_VELOCITY : i64 = 1i64 ; pub const DRAW_ORDER_VIEW_DEPTH : i64 = 2i64 ; pub const EMISSION_SHAPE_BOX : i64 = 2i64 ; pub const FLAG_DISABLE_Z : i64 = 2i64 ; pub const PARAM_ORBIT_VELOCITY : i64 = 2i64 ; pub const EMISSION_SHAPE_POINTS : i64 = 3i64 ; pub const FLAG_MAX : i64 = 3i64 ; pub const PARAM_LINEAR_ACCEL : i64 = 3i64 ; pub const EMISSION_SHAPE_DIRECTED_POINTS : i64 = 4i64 ; pub const PARAM_RADIAL_ACCEL : i64 = 4i64 ; pub const EMISSION_SHAPE_RING : i64 = 5i64 ; pub const PARAM_TANGENTIAL_ACCEL : i64 = 5i64 ; pub const EMISSION_SHAPE_MAX : i64 = 6i64 ; pub const PARAM_DAMPING : i64 = 6i64 ; pub const PARAM_ANGLE : i64 = 7i64 ; pub const PARAM_SCALE : i64 = 8i64 ; pub const PARAM_HUE_VARIATION : i64 = 9i64 ; pub const PARAM_ANIM_SPEED : i64 = 10i64 ; pub const PARAM_ANIM_OFFSET : i64 = 11i64 ; pub const PARAM_MAX : i64 = 12i64 ; } impl CPUParticles { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CPUParticlesMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Sets this node's properties to match a given [`Particles`][Particles] node with an assigned [`ParticlesMaterial`][ParticlesMaterial]."] # [doc = ""] # [inline] pub fn convert_from_particles (& self , particles : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . convert_from_particles ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , particles . as_arg_ptr ()) ; } } # [doc = "The number of particles emitted in one emission cycle (corresponding to the [`lifetime`][Self::lifetime]).\n**Note:** Changing [`amount`][Self::amount] will reset the particle emission, therefore removing all particles that were already emitted before changing [`amount`][Self::amount]."] # [doc = ""] # [inline] pub fn amount (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_amount ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Each particle's initial color. To have particle display color in a [`SpatialMaterial`][SpatialMaterial] make sure to set [`SpatialMaterial.vertex_color_use_as_albedo`][SpatialMaterial::vertex_color_use_as_albedo] to `true`."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's initial color will vary along this [`GradientTexture`][GradientTexture] (multiplied with [`color`][Self::color])."] # [doc = ""] # [inline] pub fn color_initial_ramp (& self) -> Option < Ref < crate :: generated :: Gradient , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_color_initial_ramp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Gradient , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's color will vary along this [`GradientTexture`][GradientTexture] over its lifetime (multiplied with [`color`][Self::color])."] # [doc = ""] # [inline] pub fn color_ramp (& self) -> Option < Ref < crate :: generated :: Gradient , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_color_ramp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Gradient , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Unit vector specifying the particles' emission direction."] # [doc = ""] # [inline] pub fn direction (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_direction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Particle draw order. Uses [`DrawOrder`][DrawOrder] values."] # [doc = ""] # [inline] pub fn draw_order (& self) -> crate :: generated :: cpu_particles :: DrawOrder { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_draw_order ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: cpu_particles :: DrawOrder > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The rectangle's extents if [`emission_shape`][Self::emission_shape] is set to [`EMISSION_SHAPE_BOX`][Self::EMISSION_SHAPE_BOX]."] # [doc = ""] # [inline] pub fn emission_box_extents (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_emission_box_extents ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the [`Color`][Color]s to modulate particles by when using [`EMISSION_SHAPE_POINTS`][Self::EMISSION_SHAPE_POINTS] or [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_colors (& self) -> PoolArray < Color > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_emission_colors ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Color > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the direction the particles will be emitted in when using [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_normals (& self) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_emission_normals ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the initial positions to spawn particles when using [`EMISSION_SHAPE_POINTS`][Self::EMISSION_SHAPE_POINTS] or [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_points (& self) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_emission_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The axis for the ring shaped emitter when using [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn emission_ring_axis (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_emission_ring_axis ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The height for the ring shaped emitter when using [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn emission_ring_height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_emission_ring_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The inner radius for the ring shaped emitter when using [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn emission_ring_inner_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_emission_ring_inner_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The radius for the ring shaped emitter when using [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn emission_ring_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_emission_ring_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Particles will be emitted inside this region. See [`EmissionShape`][EmissionShape] for possible values."] # [doc = ""] # [inline] pub fn emission_shape (& self) -> crate :: generated :: cpu_particles :: EmissionShape { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_emission_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: cpu_particles :: EmissionShape > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The sphere's radius if [`EmissionShape`][EmissionShape] is set to [`EMISSION_SHAPE_SPHERE`][Self::EMISSION_SHAPE_SPHERE]."] # [doc = ""] # [inline] pub fn emission_sphere_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_emission_sphere_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "How rapidly particles in an emission cycle are emitted. If greater than `0`, there will be a gap in emissions before the next cycle begins."] # [doc = ""] # [inline] pub fn explosiveness_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_explosiveness_ratio ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself."] # [doc = ""] # [inline] pub fn fixed_fps (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_fixed_fps ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Amount of [`spread`][Self::spread] in Y/Z plane. A value of `1` restricts particles to X/Z plane."] # [doc = ""] # [inline] pub fn flatness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_flatness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, results in fractional delta calculation which has a smoother particles display effect."] # [doc = ""] # [inline] pub fn fractional_delta (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_fractional_delta ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Gravity applied to every particle."] # [doc = ""] # [inline] pub fn gravity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_gravity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The amount of time each particle will exist (in seconds)."] # [doc = ""] # [inline] pub fn lifetime (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_lifetime ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Particle lifetime randomness ratio."] # [doc = ""] # [inline] pub fn lifetime_randomness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_lifetime_randomness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The [`Mesh`][Mesh] used for each particle. If `null`, particles will be spheres."] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end."] # [doc = ""] # [inline] pub fn one_shot (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_one_shot ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the base value of the parameter specified by [`Parameter`][Parameter]."] # [doc = ""] # [inline] pub fn param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`Curve`][Curve] of the parameter specified by [`Parameter`][Parameter]."] # [doc = ""] # [inline] pub fn param_curve (& self , param : i64) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the randomness factor of the parameter specified by [`Parameter`][Parameter]."] # [doc = ""] # [inline] pub fn param_randomness (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the enabled state of the given flag (see [`Flags`][Flags] for options)."] # [doc = ""] # [inline] pub fn particle_flag (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_particle_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flag as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Particle system starts as if it had already run for this many seconds."] # [doc = ""] # [inline] pub fn pre_process_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_pre_process_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Emission lifetime randomness ratio."] # [doc = ""] # [inline] pub fn randomness_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_randomness_ratio ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles."] # [doc = ""] # [inline] pub fn speed_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_speed_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Each particle's initial direction range from `+spread` to `-spread` degrees. Applied to X/Z plane and Y/Z planes."] # [doc = ""] # [inline] pub fn spread (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_spread ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, particles use the parent node's coordinate space. If `false`, they use global coordinates."] # [doc = ""] # [inline] pub fn use_local_coordinates (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_use_local_coordinates ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, particles are being emitted."] # [doc = ""] # [inline] pub fn is_emitting (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . is_emitting ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Restarts the particle emitter."] # [doc = ""] # [inline] pub fn restart (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . restart ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The number of particles emitted in one emission cycle (corresponding to the [`lifetime`][Self::lifetime]).\n**Note:** Changing [`amount`][Self::amount] will reset the particle emission, therefore removing all particles that were already emitted before changing [`amount`][Self::amount]."] # [doc = ""] # [inline] pub fn set_amount (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_amount ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Each particle's initial color. To have particle display color in a [`SpatialMaterial`][SpatialMaterial] make sure to set [`SpatialMaterial.vertex_color_use_as_albedo`][SpatialMaterial::vertex_color_use_as_albedo] to `true`."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Each particle's initial color will vary along this [`GradientTexture`][GradientTexture] (multiplied with [`color`][Self::color])."] # [doc = ""] # [inline] pub fn set_color_initial_ramp (& self , ramp : impl AsArg < crate :: generated :: Gradient >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_color_initial_ramp ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , ramp . as_arg_ptr ()) ; } } # [doc = "Each particle's color will vary along this [`GradientTexture`][GradientTexture] over its lifetime (multiplied with [`color`][Self::color])."] # [doc = ""] # [inline] pub fn set_color_ramp (& self , ramp : impl AsArg < crate :: generated :: Gradient >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_color_ramp ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , ramp . as_arg_ptr ()) ; } } # [doc = "Unit vector specifying the particles' emission direction."] # [doc = ""] # [inline] pub fn set_direction (& self , direction : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_direction ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , direction) ; } } # [doc = "Particle draw order. Uses [`DrawOrder`][DrawOrder] values."] # [doc = ""] # [inline] pub fn set_draw_order (& self , order : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_draw_order ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , order as _) ; } } # [doc = "The rectangle's extents if [`emission_shape`][Self::emission_shape] is set to [`EMISSION_SHAPE_BOX`][Self::EMISSION_SHAPE_BOX]."] # [doc = ""] # [inline] pub fn set_emission_box_extents (& self , extents : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_emission_box_extents ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , extents) ; } } # [doc = "Sets the [`Color`][Color]s to modulate particles by when using [`EMISSION_SHAPE_POINTS`][Self::EMISSION_SHAPE_POINTS] or [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_colors (& self , array : PoolArray < Color >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_emission_colors ; let ret = crate :: icalls :: icallvar__colorarr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "Sets the direction the particles will be emitted in when using [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_normals (& self , array : PoolArray < Vector3 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_emission_normals ; let ret = crate :: icalls :: icallvar__vec3arr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "Sets the initial positions to spawn particles when using [`EMISSION_SHAPE_POINTS`][Self::EMISSION_SHAPE_POINTS] or [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_points (& self , array : PoolArray < Vector3 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_emission_points ; let ret = crate :: icalls :: icallvar__vec3arr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "The axis for the ring shaped emitter when using [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn set_emission_ring_axis (& self , axis : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_emission_ring_axis ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , axis) ; } } # [doc = "The height for the ring shaped emitter when using [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn set_emission_ring_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_emission_ring_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = "The inner radius for the ring shaped emitter when using [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn set_emission_ring_inner_radius (& self , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_emission_ring_inner_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , offset as _) ; } } # [doc = "The radius for the ring shaped emitter when using [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn set_emission_ring_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_emission_ring_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = "Particles will be emitted inside this region. See [`EmissionShape`][EmissionShape] for possible values."] # [doc = ""] # [inline] pub fn set_emission_shape (& self , shape : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_emission_shape ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , shape as _) ; } } # [doc = "The sphere's radius if [`EmissionShape`][EmissionShape] is set to [`EMISSION_SHAPE_SPHERE`][Self::EMISSION_SHAPE_SPHERE]."] # [doc = ""] # [inline] pub fn set_emission_sphere_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_emission_sphere_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = "If `true`, particles are being emitted."] # [doc = ""] # [inline] pub fn set_emitting (& self , emitting : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_emitting ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , emitting as _) ; } } # [doc = "How rapidly particles in an emission cycle are emitted. If greater than `0`, there will be a gap in emissions before the next cycle begins."] # [doc = ""] # [inline] pub fn set_explosiveness_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_explosiveness_ratio ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ratio as _) ; } } # [doc = "The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself."] # [doc = ""] # [inline] pub fn set_fixed_fps (& self , fps : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_fixed_fps ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , fps as _) ; } } # [doc = "Amount of [`spread`][Self::spread] in Y/Z plane. A value of `1` restricts particles to X/Z plane."] # [doc = ""] # [inline] pub fn set_flatness (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_flatness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "If `true`, results in fractional delta calculation which has a smoother particles display effect."] # [doc = ""] # [inline] pub fn set_fractional_delta (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_fractional_delta ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Gravity applied to every particle."] # [doc = ""] # [inline] pub fn set_gravity (& self , accel_vec : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_gravity ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , accel_vec) ; } } # [doc = "The amount of time each particle will exist (in seconds)."] # [doc = ""] # [inline] pub fn set_lifetime (& self , secs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_lifetime ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , secs as _) ; } } # [doc = "Particle lifetime randomness ratio."] # [doc = ""] # [inline] pub fn set_lifetime_randomness (& self , random : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_lifetime_randomness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , random as _) ; } } # [doc = "The [`Mesh`][Mesh] used for each particle. If `null`, particles will be spheres."] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : impl AsArg < crate :: generated :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } # [doc = "If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end."] # [doc = ""] # [inline] pub fn set_one_shot (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_one_shot ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Sets the base value of the parameter specified by [`Parameter`][Parameter]."] # [doc = ""] # [inline] pub fn set_param (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , param as _ , value as _) ; } } # [doc = "Sets the [`Curve`][Curve] of the parameter specified by [`Parameter`][Parameter]."] # [doc = ""] # [inline] pub fn set_param_curve (& self , param : i64 , curve : impl AsArg < crate :: generated :: Curve >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , param as _ , curve . as_arg_ptr ()) ; } } # [doc = "Sets the randomness factor of the parameter specified by [`Parameter`][Parameter]."] # [doc = ""] # [inline] pub fn set_param_randomness (& self , param : i64 , randomness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , param as _ , randomness as _) ; } } # [doc = "Enables or disables the given flag (see [`Flags`][Flags] for options)."] # [doc = ""] # [inline] pub fn set_particle_flag (& self , flag : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_particle_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , flag as _ , enable as _) ; } } # [doc = "Particle system starts as if it had already run for this many seconds."] # [doc = ""] # [inline] pub fn set_pre_process_time (& self , secs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_pre_process_time ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , secs as _) ; } } # [doc = "Emission lifetime randomness ratio."] # [doc = ""] # [inline] pub fn set_randomness_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_randomness_ratio ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ratio as _) ; } } # [doc = "Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles."] # [doc = ""] # [inline] pub fn set_speed_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_speed_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , scale as _) ; } } # [doc = "Each particle's initial direction range from `+spread` to `-spread` degrees. Applied to X/Z plane and Y/Z planes."] # [doc = ""] # [inline] pub fn set_spread (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_spread ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , degrees as _) ; } } # [doc = "If `true`, particles use the parent node's coordinate space. If `false`, they use global coordinates."] # [doc = ""] # [inline] pub fn set_use_local_coordinates (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_use_local_coordinates ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Initial rotation applied to each particle, in degrees."] # [doc = ""] # [inline] pub fn angle (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 7i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial rotation applied to each particle, in degrees."] # [doc = ""] # [inline] pub fn set_angle (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 7i64 , value as _) ; } } # [doc = "Each particle's rotation will be animated along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn angle_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 7i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's rotation will be animated along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_angle_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 7i64 , value . as_arg_ptr ()) ; } } # [doc = "Rotation randomness ratio."] # [doc = ""] # [inline] pub fn angle_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 7i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Rotation randomness ratio."] # [doc = ""] # [inline] pub fn set_angle_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 7i64 , value as _) ; } } # [doc = "Initial angular velocity applied to each particle in _degrees_ per second. Sets the speed of rotation of the particle."] # [doc = ""] # [inline] pub fn angular_velocity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial angular velocity applied to each particle in _degrees_ per second. Sets the speed of rotation of the particle."] # [doc = ""] # [inline] pub fn set_angular_velocity (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Each particle's angular velocity will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn angular_velocity_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's angular velocity will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_angular_velocity_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 1i64 , value . as_arg_ptr ()) ; } } # [doc = "Angular velocity randomness ratio."] # [doc = ""] # [inline] pub fn angular_velocity_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Angular velocity randomness ratio."] # [doc = ""] # [inline] pub fn set_angular_velocity_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Particle animation offset."] # [doc = ""] # [inline] pub fn anim_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 11i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Particle animation offset."] # [doc = ""] # [inline] pub fn set_anim_offset (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 11i64 , value as _) ; } } # [doc = "Each particle's animation offset will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn anim_offset_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 11i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's animation offset will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_anim_offset_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 11i64 , value . as_arg_ptr ()) ; } } # [doc = "Animation offset randomness ratio."] # [doc = ""] # [inline] pub fn anim_offset_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 11i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Animation offset randomness ratio."] # [doc = ""] # [inline] pub fn set_anim_offset_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 11i64 , value as _) ; } } # [doc = "Particle animation speed."] # [doc = ""] # [inline] pub fn anim_speed (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 10i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Particle animation speed."] # [doc = ""] # [inline] pub fn set_anim_speed (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 10i64 , value as _) ; } } # [doc = "Each particle's animation speed will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn anim_speed_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 10i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's animation speed will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_anim_speed_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 10i64 , value . as_arg_ptr ()) ; } } # [doc = "Animation speed randomness ratio."] # [doc = ""] # [inline] pub fn anim_speed_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 10i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Animation speed randomness ratio."] # [doc = ""] # [inline] pub fn set_anim_speed_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 10i64 , value as _) ; } } # [doc = "The rate at which particles lose velocity."] # [doc = ""] # [inline] pub fn damping (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 6i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The rate at which particles lose velocity."] # [doc = ""] # [inline] pub fn set_damping (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 6i64 , value as _) ; } } # [doc = "Damping will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn damping_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 6i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Damping will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_damping_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 6i64 , value . as_arg_ptr ()) ; } } # [doc = "Damping randomness ratio."] # [doc = ""] # [inline] pub fn damping_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 6i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Damping randomness ratio."] # [doc = ""] # [inline] pub fn set_damping_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 6i64 , value as _) ; } } # [doc = "Align Y axis of particle with the direction of its velocity."] # [doc = ""] # [inline] pub fn flag_align_y (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_particle_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Align Y axis of particle with the direction of its velocity."] # [doc = ""] # [inline] pub fn set_flag_align_y (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_particle_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "If `true`, particles will not move on the z axis."] # [doc = ""] # [inline] pub fn flag_disable_z (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_particle_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, particles will not move on the z axis."] # [doc = ""] # [inline] pub fn set_flag_disable_z (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_particle_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "If `true`, particles rotate around Y axis by [`angle`][Self::angle]."] # [doc = ""] # [inline] pub fn flag_rotate_y (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_particle_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, particles rotate around Y axis by [`angle`][Self::angle]."] # [doc = ""] # [inline] pub fn set_flag_rotate_y (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_particle_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Initial hue variation applied to each particle."] # [doc = ""] # [inline] pub fn hue_variation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 9i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial hue variation applied to each particle."] # [doc = ""] # [inline] pub fn set_hue_variation (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 9i64 , value as _) ; } } # [doc = "Each particle's hue will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn hue_variation_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 9i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's hue will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_hue_variation_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 9i64 , value . as_arg_ptr ()) ; } } # [doc = "Hue variation randomness ratio."] # [doc = ""] # [inline] pub fn hue_variation_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 9i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Hue variation randomness ratio."] # [doc = ""] # [inline] pub fn set_hue_variation_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 9i64 , value as _) ; } } # [doc = "Initial velocity magnitude for each particle. Direction comes from [`spread`][Self::spread] and the node's orientation."] # [doc = ""] # [inline] pub fn initial_velocity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial velocity magnitude for each particle. Direction comes from [`spread`][Self::spread] and the node's orientation."] # [doc = ""] # [inline] pub fn set_initial_velocity (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "Initial velocity randomness ratio."] # [doc = ""] # [inline] pub fn initial_velocity_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial velocity randomness ratio."] # [doc = ""] # [inline] pub fn set_initial_velocity_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "Linear acceleration applied to each particle in the direction of motion."] # [doc = ""] # [inline] pub fn linear_accel (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Linear acceleration applied to each particle in the direction of motion."] # [doc = ""] # [inline] pub fn set_linear_accel (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Each particle's linear acceleration will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn linear_accel_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's linear acceleration will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_linear_accel_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 3i64 , value . as_arg_ptr ()) ; } } # [doc = "Linear acceleration randomness ratio."] # [doc = ""] # [inline] pub fn linear_accel_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Linear acceleration randomness ratio."] # [doc = ""] # [inline] pub fn set_linear_accel_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second.\nThis property is only available when [`flag_disable_z`][Self::flag_disable_z] is `true`."] # [doc = ""] # [inline] pub fn orbit_velocity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second.\nThis property is only available when [`flag_disable_z`][Self::flag_disable_z] is `true`."] # [doc = ""] # [inline] pub fn set_orbit_velocity (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Each particle's orbital velocity will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn orbit_velocity_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's orbital velocity will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_orbit_velocity_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 2i64 , value . as_arg_ptr ()) ; } } # [doc = "Orbital velocity randomness ratio."] # [doc = ""] # [inline] pub fn orbit_velocity_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Orbital velocity randomness ratio."] # [doc = ""] # [inline] pub fn set_orbit_velocity_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Radial acceleration applied to each particle. Makes particle accelerate away from origin."] # [doc = ""] # [inline] pub fn radial_accel (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Radial acceleration applied to each particle. Makes particle accelerate away from origin."] # [doc = ""] # [inline] pub fn set_radial_accel (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 4i64 , value as _) ; } } # [doc = "Each particle's radial acceleration will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn radial_accel_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's radial acceleration will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_radial_accel_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 4i64 , value . as_arg_ptr ()) ; } } # [doc = "Radial acceleration randomness ratio."] # [doc = ""] # [inline] pub fn radial_accel_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Radial acceleration randomness ratio."] # [doc = ""] # [inline] pub fn set_radial_accel_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 4i64 , value as _) ; } } # [doc = "Initial scale applied to each particle."] # [doc = ""] # [inline] pub fn scale_amount (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 8i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial scale applied to each particle."] # [doc = ""] # [inline] pub fn set_scale_amount (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 8i64 , value as _) ; } } # [doc = "Each particle's scale will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn scale_amount_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 8i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's scale will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_scale_amount_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 8i64 , value . as_arg_ptr ()) ; } } # [doc = "Scale randomness ratio."] # [doc = ""] # [inline] pub fn scale_amount_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 8i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Scale randomness ratio."] # [doc = ""] # [inline] pub fn set_scale_amount_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 8i64 , value as _) ; } } # [doc = "Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion."] # [doc = ""] # [inline] pub fn tangential_accel (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 5i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion."] # [doc = ""] # [inline] pub fn set_tangential_accel (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 5i64 , value as _) ; } } # [doc = "Each particle's tangential acceleration will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn tangential_accel_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 5i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's tangential acceleration will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_tangential_accel_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 5i64 , value . as_arg_ptr ()) ; } } # [doc = "Tangential acceleration randomness ratio."] # [doc = ""] # [inline] pub fn tangential_accel_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 5i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Tangential acceleration randomness ratio."] # [doc = ""] # [inline] pub fn set_tangential_accel_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticlesMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 5i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CPUParticles { } unsafe impl GodotObject for CPUParticles { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CPUParticles" } } impl QueueFree for CPUParticles { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CPUParticles { type Target = crate :: generated :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CPUParticles { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: GeometryInstance > for CPUParticles { } unsafe impl SubClass < crate :: generated :: VisualInstance > for CPUParticles { } unsafe impl SubClass < crate :: generated :: CullInstance > for CPUParticles { } unsafe impl SubClass < crate :: generated :: Spatial > for CPUParticles { } unsafe impl SubClass < crate :: generated :: Node > for CPUParticles { } unsafe impl SubClass < crate :: generated :: Object > for CPUParticles { } impl Instanciable for CPUParticles { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CPUParticles :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CPUParticlesMethodTable { pub class_constructor : sys :: godot_class_constructor , pub convert_from_particles : * mut sys :: godot_method_bind , pub get_amount : * mut sys :: godot_method_bind , pub get_color : * mut sys :: godot_method_bind , pub get_color_initial_ramp : * mut sys :: godot_method_bind , pub get_color_ramp : * mut sys :: godot_method_bind , pub get_direction : * mut sys :: godot_method_bind , pub get_draw_order : * mut sys :: godot_method_bind , pub get_emission_box_extents : * mut sys :: godot_method_bind , pub get_emission_colors : * mut sys :: godot_method_bind , pub get_emission_normals : * mut sys :: godot_method_bind , pub get_emission_points : * mut sys :: godot_method_bind , pub get_emission_ring_axis : * mut sys :: godot_method_bind , pub get_emission_ring_height : * mut sys :: godot_method_bind , pub get_emission_ring_inner_radius : * mut sys :: godot_method_bind , pub get_emission_ring_radius : * mut sys :: godot_method_bind , pub get_emission_shape : * mut sys :: godot_method_bind , pub get_emission_sphere_radius : * mut sys :: godot_method_bind , pub get_explosiveness_ratio : * mut sys :: godot_method_bind , pub get_fixed_fps : * mut sys :: godot_method_bind , pub get_flatness : * mut sys :: godot_method_bind , pub get_fractional_delta : * mut sys :: godot_method_bind , pub get_gravity : * mut sys :: godot_method_bind , pub get_lifetime : * mut sys :: godot_method_bind , pub get_lifetime_randomness : * mut sys :: godot_method_bind , pub get_mesh : * mut sys :: godot_method_bind , pub get_one_shot : * mut sys :: godot_method_bind , pub get_param : * mut sys :: godot_method_bind , pub get_param_curve : * mut sys :: godot_method_bind , pub get_param_randomness : * mut sys :: godot_method_bind , pub get_particle_flag : * mut sys :: godot_method_bind , pub get_pre_process_time : * mut sys :: godot_method_bind , pub get_randomness_ratio : * mut sys :: godot_method_bind , pub get_speed_scale : * mut sys :: godot_method_bind , pub get_spread : * mut sys :: godot_method_bind , pub get_use_local_coordinates : * mut sys :: godot_method_bind , pub is_emitting : * mut sys :: godot_method_bind , pub restart : * mut sys :: godot_method_bind , pub set_amount : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_color_initial_ramp : * mut sys :: godot_method_bind , pub set_color_ramp : * mut sys :: godot_method_bind , pub set_direction : * mut sys :: godot_method_bind , pub set_draw_order : * mut sys :: godot_method_bind , pub set_emission_box_extents : * mut sys :: godot_method_bind , pub set_emission_colors : * mut sys :: godot_method_bind , pub set_emission_normals : * mut sys :: godot_method_bind , pub set_emission_points : * mut sys :: godot_method_bind , pub set_emission_ring_axis : * mut sys :: godot_method_bind , pub set_emission_ring_height : * mut sys :: godot_method_bind , pub set_emission_ring_inner_radius : * mut sys :: godot_method_bind , pub set_emission_ring_radius : * mut sys :: godot_method_bind , pub set_emission_shape : * mut sys :: godot_method_bind , pub set_emission_sphere_radius : * mut sys :: godot_method_bind , pub set_emitting : * mut sys :: godot_method_bind , pub set_explosiveness_ratio : * mut sys :: godot_method_bind , pub set_fixed_fps : * mut sys :: godot_method_bind , pub set_flatness : * mut sys :: godot_method_bind , pub set_fractional_delta : * mut sys :: godot_method_bind , pub set_gravity : * mut sys :: godot_method_bind , pub set_lifetime : * mut sys :: godot_method_bind , pub set_lifetime_randomness : * mut sys :: godot_method_bind , pub set_mesh : * mut sys :: godot_method_bind , pub set_one_shot : * mut sys :: godot_method_bind , pub set_param : * mut sys :: godot_method_bind , pub set_param_curve : * mut sys :: godot_method_bind , pub set_param_randomness : * mut sys :: godot_method_bind , pub set_particle_flag : * mut sys :: godot_method_bind , pub set_pre_process_time : * mut sys :: godot_method_bind , pub set_randomness_ratio : * mut sys :: godot_method_bind , pub set_speed_scale : * mut sys :: godot_method_bind , pub set_spread : * mut sys :: godot_method_bind , pub set_use_local_coordinates : * mut sys :: godot_method_bind } impl CPUParticlesMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CPUParticlesMethodTable = CPUParticlesMethodTable { class_constructor : None , convert_from_particles : 0 as * mut sys :: godot_method_bind , get_amount : 0 as * mut sys :: godot_method_bind , get_color : 0 as * mut sys :: godot_method_bind , get_color_initial_ramp : 0 as * mut sys :: godot_method_bind , get_color_ramp : 0 as * mut sys :: godot_method_bind , get_direction : 0 as * mut sys :: godot_method_bind , get_draw_order : 0 as * mut sys :: godot_method_bind , get_emission_box_extents : 0 as * mut sys :: godot_method_bind , get_emission_colors : 0 as * mut sys :: godot_method_bind , get_emission_normals : 0 as * mut sys :: godot_method_bind , get_emission_points : 0 as * mut sys :: godot_method_bind , get_emission_ring_axis : 0 as * mut sys :: godot_method_bind , get_emission_ring_height : 0 as * mut sys :: godot_method_bind , get_emission_ring_inner_radius : 0 as * mut sys :: godot_method_bind , get_emission_ring_radius : 0 as * mut sys :: godot_method_bind , get_emission_shape : 0 as * mut sys :: godot_method_bind , get_emission_sphere_radius : 0 as * mut sys :: godot_method_bind , get_explosiveness_ratio : 0 as * mut sys :: godot_method_bind , get_fixed_fps : 0 as * mut sys :: godot_method_bind , get_flatness : 0 as * mut sys :: godot_method_bind , get_fractional_delta : 0 as * mut sys :: godot_method_bind , get_gravity : 0 as * mut sys :: godot_method_bind , get_lifetime : 0 as * mut sys :: godot_method_bind , get_lifetime_randomness : 0 as * mut sys :: godot_method_bind , get_mesh : 0 as * mut sys :: godot_method_bind , get_one_shot : 0 as * mut sys :: godot_method_bind , get_param : 0 as * mut sys :: godot_method_bind , get_param_curve : 0 as * mut sys :: godot_method_bind , get_param_randomness : 0 as * mut sys :: godot_method_bind , get_particle_flag : 0 as * mut sys :: godot_method_bind , get_pre_process_time : 0 as * mut sys :: godot_method_bind , get_randomness_ratio : 0 as * mut sys :: godot_method_bind , get_speed_scale : 0 as * mut sys :: godot_method_bind , get_spread : 0 as * mut sys :: godot_method_bind , get_use_local_coordinates : 0 as * mut sys :: godot_method_bind , is_emitting : 0 as * mut sys :: godot_method_bind , restart : 0 as * mut sys :: godot_method_bind , set_amount : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_color_initial_ramp : 0 as * mut sys :: godot_method_bind , set_color_ramp : 0 as * mut sys :: godot_method_bind , set_direction : 0 as * mut sys :: godot_method_bind , set_draw_order : 0 as * mut sys :: godot_method_bind , set_emission_box_extents : 0 as * mut sys :: godot_method_bind , set_emission_colors : 0 as * mut sys :: godot_method_bind , set_emission_normals : 0 as * mut sys :: godot_method_bind , set_emission_points : 0 as * mut sys :: godot_method_bind , set_emission_ring_axis : 0 as * mut sys :: godot_method_bind , set_emission_ring_height : 0 as * mut sys :: godot_method_bind , set_emission_ring_inner_radius : 0 as * mut sys :: godot_method_bind , set_emission_ring_radius : 0 as * mut sys :: godot_method_bind , set_emission_shape : 0 as * mut sys :: godot_method_bind , set_emission_sphere_radius : 0 as * mut sys :: godot_method_bind , set_emitting : 0 as * mut sys :: godot_method_bind , set_explosiveness_ratio : 0 as * mut sys :: godot_method_bind , set_fixed_fps : 0 as * mut sys :: godot_method_bind , set_flatness : 0 as * mut sys :: godot_method_bind , set_fractional_delta : 0 as * mut sys :: godot_method_bind , set_gravity : 0 as * mut sys :: godot_method_bind , set_lifetime : 0 as * mut sys :: godot_method_bind , set_lifetime_randomness : 0 as * mut sys :: godot_method_bind , set_mesh : 0 as * mut sys :: godot_method_bind , set_one_shot : 0 as * mut sys :: godot_method_bind , set_param : 0 as * mut sys :: godot_method_bind , set_param_curve : 0 as * mut sys :: godot_method_bind , set_param_randomness : 0 as * mut sys :: godot_method_bind , set_particle_flag : 0 as * mut sys :: godot_method_bind , set_pre_process_time : 0 as * mut sys :: godot_method_bind , set_randomness_ratio : 0 as * mut sys :: godot_method_bind , set_speed_scale : 0 as * mut sys :: godot_method_bind , set_spread : 0 as * mut sys :: godot_method_bind , set_use_local_coordinates : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CPUParticlesMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CPUParticles\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . convert_from_particles = (gd_api . godot_method_bind_get_method) (class_name , "convert_from_particles\0" . as_ptr () as * const c_char) ; table . get_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_amount\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_color_initial_ramp = (gd_api . godot_method_bind_get_method) (class_name , "get_color_initial_ramp\0" . as_ptr () as * const c_char) ; table . get_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "get_color_ramp\0" . as_ptr () as * const c_char) ; table . get_direction = (gd_api . godot_method_bind_get_method) (class_name , "get_direction\0" . as_ptr () as * const c_char) ; table . get_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_order\0" . as_ptr () as * const c_char) ; table . get_emission_box_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_box_extents\0" . as_ptr () as * const c_char) ; table . get_emission_colors = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_colors\0" . as_ptr () as * const c_char) ; table . get_emission_normals = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_normals\0" . as_ptr () as * const c_char) ; table . get_emission_points = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_points\0" . as_ptr () as * const c_char) ; table . get_emission_ring_axis = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_ring_axis\0" . as_ptr () as * const c_char) ; table . get_emission_ring_height = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_ring_height\0" . as_ptr () as * const c_char) ; table . get_emission_ring_inner_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_ring_inner_radius\0" . as_ptr () as * const c_char) ; table . get_emission_ring_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_ring_radius\0" . as_ptr () as * const c_char) ; table . get_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_shape\0" . as_ptr () as * const c_char) ; table . get_emission_sphere_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_sphere_radius\0" . as_ptr () as * const c_char) ; table . get_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . get_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_fixed_fps\0" . as_ptr () as * const c_char) ; table . get_flatness = (gd_api . godot_method_bind_get_method) (class_name , "get_flatness\0" . as_ptr () as * const c_char) ; table . get_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "get_fractional_delta\0" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\0" . as_ptr () as * const c_char) ; table . get_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime\0" . as_ptr () as * const c_char) ; table . get_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime_randomness\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "get_one_shot\0" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . get_param_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_param_curve\0" . as_ptr () as * const c_char) ; table . get_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_param_randomness\0" . as_ptr () as * const c_char) ; table . get_particle_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_particle_flag\0" . as_ptr () as * const c_char) ; table . get_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "get_pre_process_time\0" . as_ptr () as * const c_char) ; table . get_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_randomness_ratio\0" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\0" . as_ptr () as * const c_char) ; table . get_spread = (gd_api . godot_method_bind_get_method) (class_name , "get_spread\0" . as_ptr () as * const c_char) ; table . get_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "get_use_local_coordinates\0" . as_ptr () as * const c_char) ; table . is_emitting = (gd_api . godot_method_bind_get_method) (class_name , "is_emitting\0" . as_ptr () as * const c_char) ; table . restart = (gd_api . godot_method_bind_get_method) (class_name , "restart\0" . as_ptr () as * const c_char) ; table . set_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_amount\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_color_initial_ramp = (gd_api . godot_method_bind_get_method) (class_name , "set_color_initial_ramp\0" . as_ptr () as * const c_char) ; table . set_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "set_color_ramp\0" . as_ptr () as * const c_char) ; table . set_direction = (gd_api . godot_method_bind_get_method) (class_name , "set_direction\0" . as_ptr () as * const c_char) ; table . set_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_order\0" . as_ptr () as * const c_char) ; table . set_emission_box_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_box_extents\0" . as_ptr () as * const c_char) ; table . set_emission_colors = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_colors\0" . as_ptr () as * const c_char) ; table . set_emission_normals = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_normals\0" . as_ptr () as * const c_char) ; table . set_emission_points = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_points\0" . as_ptr () as * const c_char) ; table . set_emission_ring_axis = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_ring_axis\0" . as_ptr () as * const c_char) ; table . set_emission_ring_height = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_ring_height\0" . as_ptr () as * const c_char) ; table . set_emission_ring_inner_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_ring_inner_radius\0" . as_ptr () as * const c_char) ; table . set_emission_ring_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_ring_radius\0" . as_ptr () as * const c_char) ; table . set_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_shape\0" . as_ptr () as * const c_char) ; table . set_emission_sphere_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_sphere_radius\0" . as_ptr () as * const c_char) ; table . set_emitting = (gd_api . godot_method_bind_get_method) (class_name , "set_emitting\0" . as_ptr () as * const c_char) ; table . set_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . set_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_fixed_fps\0" . as_ptr () as * const c_char) ; table . set_flatness = (gd_api . godot_method_bind_get_method) (class_name , "set_flatness\0" . as_ptr () as * const c_char) ; table . set_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "set_fractional_delta\0" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\0" . as_ptr () as * const c_char) ; table . set_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime\0" . as_ptr () as * const c_char) ; table . set_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime_randomness\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; table . set_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "set_one_shot\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; table . set_param_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_param_curve\0" . as_ptr () as * const c_char) ; table . set_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_param_randomness\0" . as_ptr () as * const c_char) ; table . set_particle_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_particle_flag\0" . as_ptr () as * const c_char) ; table . set_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "set_pre_process_time\0" . as_ptr () as * const c_char) ; table . set_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_randomness_ratio\0" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\0" . as_ptr () as * const c_char) ; table . set_spread = (gd_api . godot_method_bind_get_method) (class_name , "set_spread\0" . as_ptr () as * const c_char) ; table . set_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "set_use_local_coordinates\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::cpu_particles::private::CPUParticles;
            
            pub mod cpu_particles_2d {
                # ! [doc = "This module contains types related to the API class [`CPUParticles2D`][super::CPUParticles2D]."] pub (crate) mod private { # [doc = "`core class CPUParticles2D` inherits `Node2D` (manually managed).\n\nThis class has related types in the [`cpu_particles_2d`][super::cpu_particles_2d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_cpuparticles2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CPUParticles2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CPUParticles2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCPUParticles2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CPUParticles2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CPUParticles2D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DrawOrder (pub i64) ; impl DrawOrder { pub const INDEX : DrawOrder = DrawOrder (0i64) ; pub const LIFETIME : DrawOrder = DrawOrder (1i64) ; } impl From < i64 > for DrawOrder { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DrawOrder > for i64 { # [inline] fn from (v : DrawOrder) -> Self { v . 0 } } impl FromVariant for DrawOrder { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EmissionShape (pub i64) ; impl EmissionShape { pub const POINT : EmissionShape = EmissionShape (0i64) ; pub const SPHERE : EmissionShape = EmissionShape (1i64) ; pub const RECTANGLE : EmissionShape = EmissionShape (2i64) ; pub const POINTS : EmissionShape = EmissionShape (3i64) ; pub const DIRECTED_POINTS : EmissionShape = EmissionShape (4i64) ; pub const MAX : EmissionShape = EmissionShape (5i64) ; } impl From < i64 > for EmissionShape { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EmissionShape > for i64 { # [inline] fn from (v : EmissionShape) -> Self { v . 0 } } impl FromVariant for EmissionShape { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flags (pub i64) ; impl Flags { pub const ALIGN_Y_TO_VELOCITY : Flags = Flags (0i64) ; pub const ROTATE_Y : Flags = Flags (1i64) ; pub const DISABLE_Z : Flags = Flags (2i64) ; pub const MAX : Flags = Flags (3i64) ; } impl From < i64 > for Flags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flags > for i64 { # [inline] fn from (v : Flags) -> Self { v . 0 } } impl FromVariant for Flags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Parameter (pub i64) ; impl Parameter { pub const INITIAL_LINEAR_VELOCITY : Parameter = Parameter (0i64) ; pub const ANGULAR_VELOCITY : Parameter = Parameter (1i64) ; pub const ORBIT_VELOCITY : Parameter = Parameter (2i64) ; pub const LINEAR_ACCEL : Parameter = Parameter (3i64) ; pub const RADIAL_ACCEL : Parameter = Parameter (4i64) ; pub const TANGENTIAL_ACCEL : Parameter = Parameter (5i64) ; pub const DAMPING : Parameter = Parameter (6i64) ; pub const ANGLE : Parameter = Parameter (7i64) ; pub const SCALE : Parameter = Parameter (8i64) ; pub const HUE_VARIATION : Parameter = Parameter (9i64) ; pub const ANIM_SPEED : Parameter = Parameter (10i64) ; pub const ANIM_OFFSET : Parameter = Parameter (11i64) ; pub const MAX : Parameter = Parameter (12i64) ; } impl From < i64 > for Parameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Parameter > for i64 { # [inline] fn from (v : Parameter) -> Self { v . 0 } } impl FromVariant for Parameter { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CPUParticles2D { pub const DRAW_ORDER_INDEX : i64 = 0i64 ; pub const EMISSION_SHAPE_POINT : i64 = 0i64 ; pub const FLAG_ALIGN_Y_TO_VELOCITY : i64 = 0i64 ; pub const PARAM_INITIAL_LINEAR_VELOCITY : i64 = 0i64 ; pub const DRAW_ORDER_LIFETIME : i64 = 1i64 ; pub const EMISSION_SHAPE_SPHERE : i64 = 1i64 ; pub const FLAG_ROTATE_Y : i64 = 1i64 ; pub const PARAM_ANGULAR_VELOCITY : i64 = 1i64 ; pub const EMISSION_SHAPE_RECTANGLE : i64 = 2i64 ; pub const FLAG_DISABLE_Z : i64 = 2i64 ; pub const PARAM_ORBIT_VELOCITY : i64 = 2i64 ; pub const EMISSION_SHAPE_POINTS : i64 = 3i64 ; pub const FLAG_MAX : i64 = 3i64 ; pub const PARAM_LINEAR_ACCEL : i64 = 3i64 ; pub const EMISSION_SHAPE_DIRECTED_POINTS : i64 = 4i64 ; pub const PARAM_RADIAL_ACCEL : i64 = 4i64 ; pub const EMISSION_SHAPE_MAX : i64 = 5i64 ; pub const PARAM_TANGENTIAL_ACCEL : i64 = 5i64 ; pub const PARAM_DAMPING : i64 = 6i64 ; pub const PARAM_ANGLE : i64 = 7i64 ; pub const PARAM_SCALE : i64 = 8i64 ; pub const PARAM_HUE_VARIATION : i64 = 9i64 ; pub const PARAM_ANIM_SPEED : i64 = 10i64 ; pub const PARAM_ANIM_OFFSET : i64 = 11i64 ; pub const PARAM_MAX : i64 = 12i64 ; } impl CPUParticles2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CPUParticles2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Sets this node's properties to match a given [`Particles2D`][Particles2D] node with an assigned [`ParticlesMaterial`][ParticlesMaterial]."] # [doc = ""] # [inline] pub fn convert_from_particles (& self , particles : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . convert_from_particles ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , particles . as_arg_ptr ()) ; } } # [doc = "The number of particles emitted in one emission cycle (corresponding to the [`lifetime`][Self::lifetime]).\n**Note:** Changing [`amount`][Self::amount] will reset the particle emission, therefore removing all particles that were already emitted before changing [`amount`][Self::amount]."] # [doc = ""] # [inline] pub fn amount (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_amount ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Each particle's initial color. If [`texture`][Self::texture] is defined, it will be multiplied by this color."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's initial color will vary along this [`GradientTexture`][GradientTexture] (multiplied with [`color`][Self::color])."] # [doc = ""] # [inline] pub fn color_initial_ramp (& self) -> Option < Ref < crate :: generated :: Gradient , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_color_initial_ramp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Gradient , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's color will vary along this [`Gradient`][Gradient] (multiplied with [`color`][Self::color])."] # [doc = ""] # [inline] pub fn color_ramp (& self) -> Option < Ref < crate :: generated :: Gradient , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_color_ramp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Gradient , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Unit vector specifying the particles' emission direction."] # [doc = ""] # [inline] pub fn direction (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_direction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Particle draw order. Uses [`DrawOrder`][DrawOrder] values."] # [doc = ""] # [inline] pub fn draw_order (& self) -> crate :: generated :: cpu_particles_2d :: DrawOrder { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_draw_order ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: cpu_particles_2d :: DrawOrder > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the [`Color`][Color]s to modulate particles by when using [`EMISSION_SHAPE_POINTS`][Self::EMISSION_SHAPE_POINTS] or [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_colors (& self) -> PoolArray < Color > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_emission_colors ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Color > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the direction the particles will be emitted in when using [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_normals (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_emission_normals ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the initial positions to spawn particles when using [`EMISSION_SHAPE_POINTS`][Self::EMISSION_SHAPE_POINTS] or [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_points (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_emission_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The rectangle's extents if [`emission_shape`][Self::emission_shape] is set to [`EMISSION_SHAPE_RECTANGLE`][Self::EMISSION_SHAPE_RECTANGLE]."] # [doc = ""] # [inline] pub fn emission_rect_extents (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_emission_rect_extents ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Particles will be emitted inside this region. See [`EmissionShape`][EmissionShape] for possible values."] # [doc = ""] # [inline] pub fn emission_shape (& self) -> crate :: generated :: cpu_particles_2d :: EmissionShape { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_emission_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: cpu_particles_2d :: EmissionShape > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The sphere's radius if [`emission_shape`][Self::emission_shape] is set to [`EMISSION_SHAPE_SPHERE`][Self::EMISSION_SHAPE_SPHERE]."] # [doc = ""] # [inline] pub fn emission_sphere_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_emission_sphere_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "How rapidly particles in an emission cycle are emitted. If greater than `0`, there will be a gap in emissions before the next cycle begins."] # [doc = ""] # [inline] pub fn explosiveness_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_explosiveness_ratio ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself."] # [doc = ""] # [inline] pub fn fixed_fps (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_fixed_fps ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, results in fractional delta calculation which has a smoother particles display effect."] # [doc = ""] # [inline] pub fn fractional_delta (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_fractional_delta ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Gravity applied to every particle."] # [doc = ""] # [inline] pub fn gravity (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_gravity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The amount of time each particle will exist (in seconds)."] # [doc = ""] # [inline] pub fn lifetime (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_lifetime ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Particle lifetime randomness ratio."] # [doc = ""] # [inline] pub fn lifetime_randomness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_lifetime_randomness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Normal map to be used for the [`texture`][Self::texture] property.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normalmap (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_normalmap ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end."] # [doc = ""] # [inline] pub fn one_shot (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_one_shot ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the base value of the parameter specified by [`Parameter`][Parameter]."] # [doc = ""] # [inline] pub fn param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`Curve`][Curve] of the parameter specified by [`Parameter`][Parameter]."] # [doc = ""] # [inline] pub fn param_curve (& self , param : i64) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the randomness factor of the parameter specified by [`Parameter`][Parameter]."] # [doc = ""] # [inline] pub fn param_randomness (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the enabled state of the given flag (see [`Flags`][Flags] for options)."] # [doc = ""] # [inline] pub fn particle_flag (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_particle_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flag as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Particle system starts as if it had already run for this many seconds."] # [doc = ""] # [inline] pub fn pre_process_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_pre_process_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Emission lifetime randomness ratio."] # [doc = ""] # [inline] pub fn randomness_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_randomness_ratio ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles."] # [doc = ""] # [inline] pub fn speed_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_speed_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Each particle's initial direction range from `+spread` to `-spread` degrees."] # [doc = ""] # [inline] pub fn spread (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_spread ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Particle texture. If `null`, particles will be squares."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, particles use the parent node's coordinate space. If `false`, they use global coordinates."] # [doc = ""] # [inline] pub fn use_local_coordinates (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_use_local_coordinates ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, particles are being emitted."] # [doc = ""] # [inline] pub fn is_emitting (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . is_emitting ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Restarts the particle emitter."] # [doc = ""] # [inline] pub fn restart (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . restart ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The number of particles emitted in one emission cycle (corresponding to the [`lifetime`][Self::lifetime]).\n**Note:** Changing [`amount`][Self::amount] will reset the particle emission, therefore removing all particles that were already emitted before changing [`amount`][Self::amount]."] # [doc = ""] # [inline] pub fn set_amount (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_amount ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Each particle's initial color. If [`texture`][Self::texture] is defined, it will be multiplied by this color."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Each particle's initial color will vary along this [`GradientTexture`][GradientTexture] (multiplied with [`color`][Self::color])."] # [doc = ""] # [inline] pub fn set_color_initial_ramp (& self , ramp : impl AsArg < crate :: generated :: Gradient >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_color_initial_ramp ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , ramp . as_arg_ptr ()) ; } } # [doc = "Each particle's color will vary along this [`Gradient`][Gradient] (multiplied with [`color`][Self::color])."] # [doc = ""] # [inline] pub fn set_color_ramp (& self , ramp : impl AsArg < crate :: generated :: Gradient >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_color_ramp ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , ramp . as_arg_ptr ()) ; } } # [doc = "Unit vector specifying the particles' emission direction."] # [doc = ""] # [inline] pub fn set_direction (& self , direction : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_direction ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , direction) ; } } # [doc = "Particle draw order. Uses [`DrawOrder`][DrawOrder] values."] # [doc = ""] # [inline] pub fn set_draw_order (& self , order : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_draw_order ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , order as _) ; } } # [doc = "Sets the [`Color`][Color]s to modulate particles by when using [`EMISSION_SHAPE_POINTS`][Self::EMISSION_SHAPE_POINTS] or [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_colors (& self , array : PoolArray < Color >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emission_colors ; let ret = crate :: icalls :: icallvar__colorarr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "Sets the direction the particles will be emitted in when using [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_normals (& self , array : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emission_normals ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "Sets the initial positions to spawn particles when using [`EMISSION_SHAPE_POINTS`][Self::EMISSION_SHAPE_POINTS] or [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_points (& self , array : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emission_points ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "The rectangle's extents if [`emission_shape`][Self::emission_shape] is set to [`EMISSION_SHAPE_RECTANGLE`][Self::EMISSION_SHAPE_RECTANGLE]."] # [doc = ""] # [inline] pub fn set_emission_rect_extents (& self , extents : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emission_rect_extents ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , extents) ; } } # [doc = "Particles will be emitted inside this region. See [`EmissionShape`][EmissionShape] for possible values."] # [doc = ""] # [inline] pub fn set_emission_shape (& self , shape : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emission_shape ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , shape as _) ; } } # [doc = "The sphere's radius if [`emission_shape`][Self::emission_shape] is set to [`EMISSION_SHAPE_SPHERE`][Self::EMISSION_SHAPE_SPHERE]."] # [doc = ""] # [inline] pub fn set_emission_sphere_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emission_sphere_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = "If `true`, particles are being emitted."] # [doc = ""] # [inline] pub fn set_emitting (& self , emitting : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_emitting ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , emitting as _) ; } } # [doc = "How rapidly particles in an emission cycle are emitted. If greater than `0`, there will be a gap in emissions before the next cycle begins."] # [doc = ""] # [inline] pub fn set_explosiveness_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_explosiveness_ratio ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ratio as _) ; } } # [doc = "The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself."] # [doc = ""] # [inline] pub fn set_fixed_fps (& self , fps : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_fixed_fps ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , fps as _) ; } } # [doc = "If `true`, results in fractional delta calculation which has a smoother particles display effect."] # [doc = ""] # [inline] pub fn set_fractional_delta (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_fractional_delta ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Gravity applied to every particle."] # [doc = ""] # [inline] pub fn set_gravity (& self , accel_vec : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_gravity ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , accel_vec) ; } } # [doc = "The amount of time each particle will exist (in seconds)."] # [doc = ""] # [inline] pub fn set_lifetime (& self , secs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_lifetime ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , secs as _) ; } } # [doc = "Particle lifetime randomness ratio."] # [doc = ""] # [inline] pub fn set_lifetime_randomness (& self , random : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_lifetime_randomness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , random as _) ; } } # [doc = "Normal map to be used for the [`texture`][Self::texture] property.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn set_normalmap (& self , normalmap : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_normalmap ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , normalmap . as_arg_ptr ()) ; } } # [doc = "If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end."] # [doc = ""] # [inline] pub fn set_one_shot (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_one_shot ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Sets the base value of the parameter specified by [`Parameter`][Parameter]."] # [doc = ""] # [inline] pub fn set_param (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , param as _ , value as _) ; } } # [doc = "Sets the [`Curve`][Curve] of the parameter specified by [`Parameter`][Parameter]."] # [doc = ""] # [inline] pub fn set_param_curve (& self , param : i64 , curve : impl AsArg < crate :: generated :: Curve >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , param as _ , curve . as_arg_ptr ()) ; } } # [doc = "Sets the randomness factor of the parameter specified by [`Parameter`][Parameter]."] # [doc = ""] # [inline] pub fn set_param_randomness (& self , param : i64 , randomness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , param as _ , randomness as _) ; } } # [doc = "Enables or disables the given flag (see [`Flags`][Flags] for options)."] # [doc = ""] # [inline] pub fn set_particle_flag (& self , flag : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_particle_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , flag as _ , enable as _) ; } } # [doc = "Particle system starts as if it had already run for this many seconds."] # [doc = ""] # [inline] pub fn set_pre_process_time (& self , secs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_pre_process_time ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , secs as _) ; } } # [doc = "Emission lifetime randomness ratio."] # [doc = ""] # [inline] pub fn set_randomness_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_randomness_ratio ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ratio as _) ; } } # [doc = "Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles."] # [doc = ""] # [inline] pub fn set_speed_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_speed_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , scale as _) ; } } # [doc = "Each particle's initial direction range from `+spread` to `-spread` degrees."] # [doc = ""] # [inline] pub fn set_spread (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_spread ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , degrees as _) ; } } # [doc = "Particle texture. If `null`, particles will be squares."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "If `true`, particles use the parent node's coordinate space. If `false`, they use global coordinates."] # [doc = ""] # [inline] pub fn set_use_local_coordinates (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_use_local_coordinates ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Initial rotation applied to each particle, in degrees."] # [doc = ""] # [inline] pub fn angle (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 7i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial rotation applied to each particle, in degrees."] # [doc = ""] # [inline] pub fn set_angle (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 7i64 , value as _) ; } } # [doc = "Each particle's rotation will be animated along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn angle_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 7i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's rotation will be animated along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_angle_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 7i64 , value . as_arg_ptr ()) ; } } # [doc = "Rotation randomness ratio."] # [doc = ""] # [inline] pub fn angle_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 7i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Rotation randomness ratio."] # [doc = ""] # [inline] pub fn set_angle_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 7i64 , value as _) ; } } # [doc = "Initial angular velocity applied to each particle in _degrees_ per second. Sets the speed of rotation of the particle."] # [doc = ""] # [inline] pub fn angular_velocity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial angular velocity applied to each particle in _degrees_ per second. Sets the speed of rotation of the particle."] # [doc = ""] # [inline] pub fn set_angular_velocity (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Each particle's angular velocity will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn angular_velocity_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's angular velocity will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_angular_velocity_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 1i64 , value . as_arg_ptr ()) ; } } # [doc = "Angular velocity randomness ratio."] # [doc = ""] # [inline] pub fn angular_velocity_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Angular velocity randomness ratio."] # [doc = ""] # [inline] pub fn set_angular_velocity_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Particle animation offset."] # [doc = ""] # [inline] pub fn anim_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 11i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Particle animation offset."] # [doc = ""] # [inline] pub fn set_anim_offset (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 11i64 , value as _) ; } } # [doc = "Each particle's animation offset will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn anim_offset_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 11i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's animation offset will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_anim_offset_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 11i64 , value . as_arg_ptr ()) ; } } # [doc = "Animation offset randomness ratio."] # [doc = ""] # [inline] pub fn anim_offset_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 11i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Animation offset randomness ratio."] # [doc = ""] # [inline] pub fn set_anim_offset_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 11i64 , value as _) ; } } # [doc = "Particle animation speed."] # [doc = ""] # [inline] pub fn anim_speed (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 10i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Particle animation speed."] # [doc = ""] # [inline] pub fn set_anim_speed (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 10i64 , value as _) ; } } # [doc = "Each particle's animation speed will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn anim_speed_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 10i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's animation speed will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_anim_speed_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 10i64 , value . as_arg_ptr ()) ; } } # [doc = "Animation speed randomness ratio."] # [doc = ""] # [inline] pub fn anim_speed_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 10i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Animation speed randomness ratio."] # [doc = ""] # [inline] pub fn set_anim_speed_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 10i64 , value as _) ; } } # [doc = "The rate at which particles lose velocity."] # [doc = ""] # [inline] pub fn damping (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 6i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The rate at which particles lose velocity."] # [doc = ""] # [inline] pub fn set_damping (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 6i64 , value as _) ; } } # [doc = "Damping will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn damping_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 6i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Damping will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_damping_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 6i64 , value . as_arg_ptr ()) ; } } # [doc = "Damping randomness ratio."] # [doc = ""] # [inline] pub fn damping_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 6i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Damping randomness ratio."] # [doc = ""] # [inline] pub fn set_damping_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 6i64 , value as _) ; } } # [doc = "Align Y axis of particle with the direction of its velocity."] # [doc = ""] # [inline] pub fn flag_align_y (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_particle_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Align Y axis of particle with the direction of its velocity."] # [doc = ""] # [inline] pub fn set_flag_align_y (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_particle_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "Initial hue variation applied to each particle."] # [doc = ""] # [inline] pub fn hue_variation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 9i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial hue variation applied to each particle."] # [doc = ""] # [inline] pub fn set_hue_variation (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 9i64 , value as _) ; } } # [doc = "Each particle's hue will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn hue_variation_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 9i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's hue will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_hue_variation_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 9i64 , value . as_arg_ptr ()) ; } } # [doc = "Hue variation randomness ratio."] # [doc = ""] # [inline] pub fn hue_variation_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 9i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Hue variation randomness ratio."] # [doc = ""] # [inline] pub fn set_hue_variation_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 9i64 , value as _) ; } } # [doc = "Initial velocity magnitude for each particle. Direction comes from [`spread`][Self::spread] and the node's orientation."] # [doc = ""] # [inline] pub fn initial_velocity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial velocity magnitude for each particle. Direction comes from [`spread`][Self::spread] and the node's orientation."] # [doc = ""] # [inline] pub fn set_initial_velocity (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "Initial velocity randomness ratio."] # [doc = ""] # [inline] pub fn initial_velocity_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial velocity randomness ratio."] # [doc = ""] # [inline] pub fn set_initial_velocity_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "Linear acceleration applied to each particle in the direction of motion."] # [doc = ""] # [inline] pub fn linear_accel (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Linear acceleration applied to each particle in the direction of motion."] # [doc = ""] # [inline] pub fn set_linear_accel (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Each particle's linear acceleration will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn linear_accel_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's linear acceleration will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_linear_accel_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 3i64 , value . as_arg_ptr ()) ; } } # [doc = "Linear acceleration randomness ratio."] # [doc = ""] # [inline] pub fn linear_accel_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Linear acceleration randomness ratio."] # [doc = ""] # [inline] pub fn set_linear_accel_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second."] # [doc = ""] # [inline] pub fn orbit_velocity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second."] # [doc = ""] # [inline] pub fn set_orbit_velocity (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Each particle's orbital velocity will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn orbit_velocity_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's orbital velocity will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_orbit_velocity_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 2i64 , value . as_arg_ptr ()) ; } } # [doc = "Orbital velocity randomness ratio."] # [doc = ""] # [inline] pub fn orbit_velocity_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Orbital velocity randomness ratio."] # [doc = ""] # [inline] pub fn set_orbit_velocity_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Radial acceleration applied to each particle. Makes particle accelerate away from origin."] # [doc = ""] # [inline] pub fn radial_accel (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Radial acceleration applied to each particle. Makes particle accelerate away from origin."] # [doc = ""] # [inline] pub fn set_radial_accel (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 4i64 , value as _) ; } } # [doc = "Each particle's radial acceleration will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn radial_accel_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's radial acceleration will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_radial_accel_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 4i64 , value . as_arg_ptr ()) ; } } # [doc = "Radial acceleration randomness ratio."] # [doc = ""] # [inline] pub fn radial_accel_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Radial acceleration randomness ratio."] # [doc = ""] # [inline] pub fn set_radial_accel_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 4i64 , value as _) ; } } # [doc = "Initial scale applied to each particle."] # [doc = ""] # [inline] pub fn scale_amount (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 8i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial scale applied to each particle."] # [doc = ""] # [inline] pub fn set_scale_amount (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 8i64 , value as _) ; } } # [doc = "Each particle's scale will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn scale_amount_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 8i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's scale will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_scale_amount_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 8i64 , value . as_arg_ptr ()) ; } } # [doc = "Scale randomness ratio."] # [doc = ""] # [inline] pub fn scale_amount_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 8i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Scale randomness ratio."] # [doc = ""] # [inline] pub fn set_scale_amount_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 8i64 , value as _) ; } } # [doc = "Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion."] # [doc = ""] # [inline] pub fn tangential_accel (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 5i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion."] # [doc = ""] # [inline] pub fn set_tangential_accel (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 5i64 , value as _) ; } } # [doc = "Each particle's tangential acceleration will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn tangential_accel_curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_curve ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 5i64) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's tangential acceleration will vary along this [`Curve`][Curve]."] # [doc = ""] # [inline] pub fn set_tangential_accel_curve (& self , value : impl AsArg < crate :: generated :: Curve >) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_curve ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 5i64 , value . as_arg_ptr ()) ; } } # [doc = "Tangential acceleration randomness ratio."] # [doc = ""] # [inline] pub fn tangential_accel_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 5i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Tangential acceleration randomness ratio."] # [doc = ""] # [inline] pub fn set_tangential_accel_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = CPUParticles2DMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 5i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CPUParticles2D { } unsafe impl GodotObject for CPUParticles2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CPUParticles2D" } } impl QueueFree for CPUParticles2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CPUParticles2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CPUParticles2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for CPUParticles2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for CPUParticles2D { } unsafe impl SubClass < crate :: generated :: Node > for CPUParticles2D { } unsafe impl SubClass < crate :: generated :: Object > for CPUParticles2D { } impl Instanciable for CPUParticles2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CPUParticles2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CPUParticles2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub convert_from_particles : * mut sys :: godot_method_bind , pub get_amount : * mut sys :: godot_method_bind , pub get_color : * mut sys :: godot_method_bind , pub get_color_initial_ramp : * mut sys :: godot_method_bind , pub get_color_ramp : * mut sys :: godot_method_bind , pub get_direction : * mut sys :: godot_method_bind , pub get_draw_order : * mut sys :: godot_method_bind , pub get_emission_colors : * mut sys :: godot_method_bind , pub get_emission_normals : * mut sys :: godot_method_bind , pub get_emission_points : * mut sys :: godot_method_bind , pub get_emission_rect_extents : * mut sys :: godot_method_bind , pub get_emission_shape : * mut sys :: godot_method_bind , pub get_emission_sphere_radius : * mut sys :: godot_method_bind , pub get_explosiveness_ratio : * mut sys :: godot_method_bind , pub get_fixed_fps : * mut sys :: godot_method_bind , pub get_fractional_delta : * mut sys :: godot_method_bind , pub get_gravity : * mut sys :: godot_method_bind , pub get_lifetime : * mut sys :: godot_method_bind , pub get_lifetime_randomness : * mut sys :: godot_method_bind , pub get_normalmap : * mut sys :: godot_method_bind , pub get_one_shot : * mut sys :: godot_method_bind , pub get_param : * mut sys :: godot_method_bind , pub get_param_curve : * mut sys :: godot_method_bind , pub get_param_randomness : * mut sys :: godot_method_bind , pub get_particle_flag : * mut sys :: godot_method_bind , pub get_pre_process_time : * mut sys :: godot_method_bind , pub get_randomness_ratio : * mut sys :: godot_method_bind , pub get_speed_scale : * mut sys :: godot_method_bind , pub get_spread : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_use_local_coordinates : * mut sys :: godot_method_bind , pub is_emitting : * mut sys :: godot_method_bind , pub restart : * mut sys :: godot_method_bind , pub set_amount : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_color_initial_ramp : * mut sys :: godot_method_bind , pub set_color_ramp : * mut sys :: godot_method_bind , pub set_direction : * mut sys :: godot_method_bind , pub set_draw_order : * mut sys :: godot_method_bind , pub set_emission_colors : * mut sys :: godot_method_bind , pub set_emission_normals : * mut sys :: godot_method_bind , pub set_emission_points : * mut sys :: godot_method_bind , pub set_emission_rect_extents : * mut sys :: godot_method_bind , pub set_emission_shape : * mut sys :: godot_method_bind , pub set_emission_sphere_radius : * mut sys :: godot_method_bind , pub set_emitting : * mut sys :: godot_method_bind , pub set_explosiveness_ratio : * mut sys :: godot_method_bind , pub set_fixed_fps : * mut sys :: godot_method_bind , pub set_fractional_delta : * mut sys :: godot_method_bind , pub set_gravity : * mut sys :: godot_method_bind , pub set_lifetime : * mut sys :: godot_method_bind , pub set_lifetime_randomness : * mut sys :: godot_method_bind , pub set_normalmap : * mut sys :: godot_method_bind , pub set_one_shot : * mut sys :: godot_method_bind , pub set_param : * mut sys :: godot_method_bind , pub set_param_curve : * mut sys :: godot_method_bind , pub set_param_randomness : * mut sys :: godot_method_bind , pub set_particle_flag : * mut sys :: godot_method_bind , pub set_pre_process_time : * mut sys :: godot_method_bind , pub set_randomness_ratio : * mut sys :: godot_method_bind , pub set_speed_scale : * mut sys :: godot_method_bind , pub set_spread : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_use_local_coordinates : * mut sys :: godot_method_bind } impl CPUParticles2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CPUParticles2DMethodTable = CPUParticles2DMethodTable { class_constructor : None , convert_from_particles : 0 as * mut sys :: godot_method_bind , get_amount : 0 as * mut sys :: godot_method_bind , get_color : 0 as * mut sys :: godot_method_bind , get_color_initial_ramp : 0 as * mut sys :: godot_method_bind , get_color_ramp : 0 as * mut sys :: godot_method_bind , get_direction : 0 as * mut sys :: godot_method_bind , get_draw_order : 0 as * mut sys :: godot_method_bind , get_emission_colors : 0 as * mut sys :: godot_method_bind , get_emission_normals : 0 as * mut sys :: godot_method_bind , get_emission_points : 0 as * mut sys :: godot_method_bind , get_emission_rect_extents : 0 as * mut sys :: godot_method_bind , get_emission_shape : 0 as * mut sys :: godot_method_bind , get_emission_sphere_radius : 0 as * mut sys :: godot_method_bind , get_explosiveness_ratio : 0 as * mut sys :: godot_method_bind , get_fixed_fps : 0 as * mut sys :: godot_method_bind , get_fractional_delta : 0 as * mut sys :: godot_method_bind , get_gravity : 0 as * mut sys :: godot_method_bind , get_lifetime : 0 as * mut sys :: godot_method_bind , get_lifetime_randomness : 0 as * mut sys :: godot_method_bind , get_normalmap : 0 as * mut sys :: godot_method_bind , get_one_shot : 0 as * mut sys :: godot_method_bind , get_param : 0 as * mut sys :: godot_method_bind , get_param_curve : 0 as * mut sys :: godot_method_bind , get_param_randomness : 0 as * mut sys :: godot_method_bind , get_particle_flag : 0 as * mut sys :: godot_method_bind , get_pre_process_time : 0 as * mut sys :: godot_method_bind , get_randomness_ratio : 0 as * mut sys :: godot_method_bind , get_speed_scale : 0 as * mut sys :: godot_method_bind , get_spread : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_use_local_coordinates : 0 as * mut sys :: godot_method_bind , is_emitting : 0 as * mut sys :: godot_method_bind , restart : 0 as * mut sys :: godot_method_bind , set_amount : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_color_initial_ramp : 0 as * mut sys :: godot_method_bind , set_color_ramp : 0 as * mut sys :: godot_method_bind , set_direction : 0 as * mut sys :: godot_method_bind , set_draw_order : 0 as * mut sys :: godot_method_bind , set_emission_colors : 0 as * mut sys :: godot_method_bind , set_emission_normals : 0 as * mut sys :: godot_method_bind , set_emission_points : 0 as * mut sys :: godot_method_bind , set_emission_rect_extents : 0 as * mut sys :: godot_method_bind , set_emission_shape : 0 as * mut sys :: godot_method_bind , set_emission_sphere_radius : 0 as * mut sys :: godot_method_bind , set_emitting : 0 as * mut sys :: godot_method_bind , set_explosiveness_ratio : 0 as * mut sys :: godot_method_bind , set_fixed_fps : 0 as * mut sys :: godot_method_bind , set_fractional_delta : 0 as * mut sys :: godot_method_bind , set_gravity : 0 as * mut sys :: godot_method_bind , set_lifetime : 0 as * mut sys :: godot_method_bind , set_lifetime_randomness : 0 as * mut sys :: godot_method_bind , set_normalmap : 0 as * mut sys :: godot_method_bind , set_one_shot : 0 as * mut sys :: godot_method_bind , set_param : 0 as * mut sys :: godot_method_bind , set_param_curve : 0 as * mut sys :: godot_method_bind , set_param_randomness : 0 as * mut sys :: godot_method_bind , set_particle_flag : 0 as * mut sys :: godot_method_bind , set_pre_process_time : 0 as * mut sys :: godot_method_bind , set_randomness_ratio : 0 as * mut sys :: godot_method_bind , set_speed_scale : 0 as * mut sys :: godot_method_bind , set_spread : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_use_local_coordinates : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CPUParticles2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CPUParticles2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . convert_from_particles = (gd_api . godot_method_bind_get_method) (class_name , "convert_from_particles\0" . as_ptr () as * const c_char) ; table . get_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_amount\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_color_initial_ramp = (gd_api . godot_method_bind_get_method) (class_name , "get_color_initial_ramp\0" . as_ptr () as * const c_char) ; table . get_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "get_color_ramp\0" . as_ptr () as * const c_char) ; table . get_direction = (gd_api . godot_method_bind_get_method) (class_name , "get_direction\0" . as_ptr () as * const c_char) ; table . get_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_order\0" . as_ptr () as * const c_char) ; table . get_emission_colors = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_colors\0" . as_ptr () as * const c_char) ; table . get_emission_normals = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_normals\0" . as_ptr () as * const c_char) ; table . get_emission_points = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_points\0" . as_ptr () as * const c_char) ; table . get_emission_rect_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_rect_extents\0" . as_ptr () as * const c_char) ; table . get_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_shape\0" . as_ptr () as * const c_char) ; table . get_emission_sphere_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_sphere_radius\0" . as_ptr () as * const c_char) ; table . get_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . get_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_fixed_fps\0" . as_ptr () as * const c_char) ; table . get_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "get_fractional_delta\0" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\0" . as_ptr () as * const c_char) ; table . get_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime\0" . as_ptr () as * const c_char) ; table . get_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime_randomness\0" . as_ptr () as * const c_char) ; table . get_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "get_normalmap\0" . as_ptr () as * const c_char) ; table . get_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "get_one_shot\0" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . get_param_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_param_curve\0" . as_ptr () as * const c_char) ; table . get_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_param_randomness\0" . as_ptr () as * const c_char) ; table . get_particle_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_particle_flag\0" . as_ptr () as * const c_char) ; table . get_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "get_pre_process_time\0" . as_ptr () as * const c_char) ; table . get_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_randomness_ratio\0" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\0" . as_ptr () as * const c_char) ; table . get_spread = (gd_api . godot_method_bind_get_method) (class_name , "get_spread\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "get_use_local_coordinates\0" . as_ptr () as * const c_char) ; table . is_emitting = (gd_api . godot_method_bind_get_method) (class_name , "is_emitting\0" . as_ptr () as * const c_char) ; table . restart = (gd_api . godot_method_bind_get_method) (class_name , "restart\0" . as_ptr () as * const c_char) ; table . set_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_amount\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_color_initial_ramp = (gd_api . godot_method_bind_get_method) (class_name , "set_color_initial_ramp\0" . as_ptr () as * const c_char) ; table . set_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "set_color_ramp\0" . as_ptr () as * const c_char) ; table . set_direction = (gd_api . godot_method_bind_get_method) (class_name , "set_direction\0" . as_ptr () as * const c_char) ; table . set_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_order\0" . as_ptr () as * const c_char) ; table . set_emission_colors = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_colors\0" . as_ptr () as * const c_char) ; table . set_emission_normals = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_normals\0" . as_ptr () as * const c_char) ; table . set_emission_points = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_points\0" . as_ptr () as * const c_char) ; table . set_emission_rect_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_rect_extents\0" . as_ptr () as * const c_char) ; table . set_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_shape\0" . as_ptr () as * const c_char) ; table . set_emission_sphere_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_sphere_radius\0" . as_ptr () as * const c_char) ; table . set_emitting = (gd_api . godot_method_bind_get_method) (class_name , "set_emitting\0" . as_ptr () as * const c_char) ; table . set_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . set_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_fixed_fps\0" . as_ptr () as * const c_char) ; table . set_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "set_fractional_delta\0" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\0" . as_ptr () as * const c_char) ; table . set_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime\0" . as_ptr () as * const c_char) ; table . set_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime_randomness\0" . as_ptr () as * const c_char) ; table . set_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "set_normalmap\0" . as_ptr () as * const c_char) ; table . set_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "set_one_shot\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; table . set_param_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_param_curve\0" . as_ptr () as * const c_char) ; table . set_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_param_randomness\0" . as_ptr () as * const c_char) ; table . set_particle_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_particle_flag\0" . as_ptr () as * const c_char) ; table . set_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "set_pre_process_time\0" . as_ptr () as * const c_char) ; table . set_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_randomness_ratio\0" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\0" . as_ptr () as * const c_char) ; table . set_spread = (gd_api . godot_method_bind_get_method) (class_name , "set_spread\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "set_use_local_coordinates\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::cpu_particles_2d::private::CPUParticles2D;
            
            pub(crate) mod csg_box {
                # ! [doc = "This module contains types related to the API class [`CSGBox`][super::CSGBox]."] pub (crate) mod private { # [doc = "`core class CSGBox` inherits `CSGPrimitive` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_csgbox.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CSGBox` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CSGBox>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCSGBox inherits methods from:\n - [CSGPrimitive](struct.CSGPrimitive.html)\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGBox { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CSGBox ; impl CSGBox { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CSGBoxMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn depth (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGBoxMethodTable :: get (get_api ()) . get_depth ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGBoxMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGBoxMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn width (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGBoxMethodTable :: get (get_api ()) . get_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_depth (& self , depth : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGBoxMethodTable :: get (get_api ()) . set_depth ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , depth as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGBoxMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGBoxMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_width (& self , width : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGBoxMethodTable :: get (get_api ()) . set_width ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , width as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGBox { } unsafe impl GodotObject for CSGBox { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGBox" } } impl QueueFree for CSGBox { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CSGBox { type Target = crate :: generated :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGBox { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CSGPrimitive > for CSGBox { } unsafe impl SubClass < crate :: generated :: CSGShape > for CSGBox { } unsafe impl SubClass < crate :: generated :: GeometryInstance > for CSGBox { } unsafe impl SubClass < crate :: generated :: VisualInstance > for CSGBox { } unsafe impl SubClass < crate :: generated :: CullInstance > for CSGBox { } unsafe impl SubClass < crate :: generated :: Spatial > for CSGBox { } unsafe impl SubClass < crate :: generated :: Node > for CSGBox { } unsafe impl SubClass < crate :: generated :: Object > for CSGBox { } impl Instanciable for CSGBox { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CSGBox :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGBoxMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_depth : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_material : * mut sys :: godot_method_bind , pub get_width : * mut sys :: godot_method_bind , pub set_depth : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind , pub set_width : * mut sys :: godot_method_bind } impl CSGBoxMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGBoxMethodTable = CSGBoxMethodTable { class_constructor : None , get_depth : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_material : 0 as * mut sys :: godot_method_bind , get_width : 0 as * mut sys :: godot_method_bind , set_depth : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind , set_width : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CSGBoxMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGBox\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_depth\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\0" . as_ptr () as * const c_char) ; table . set_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_depth\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::csg_box::private::CSGBox;
            
            pub(crate) mod csg_combiner {
                # ! [doc = "This module contains types related to the API class [`CSGCombiner`][super::CSGCombiner]."] pub (crate) mod private { # [doc = "`core class CSGCombiner` inherits `CSGShape` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_csgcombiner.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CSGCombiner` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CSGCombiner>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCSGCombiner inherits methods from:\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGCombiner { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CSGCombiner ; impl CSGCombiner { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CSGCombinerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGCombiner { } unsafe impl GodotObject for CSGCombiner { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGCombiner" } } impl QueueFree for CSGCombiner { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CSGCombiner { type Target = crate :: generated :: CSGShape ; # [inline] fn deref (& self) -> & crate :: generated :: CSGShape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGCombiner { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CSGShape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CSGShape > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: GeometryInstance > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: VisualInstance > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: CullInstance > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: Spatial > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: Node > for CSGCombiner { } unsafe impl SubClass < crate :: generated :: Object > for CSGCombiner { } impl Instanciable for CSGCombiner { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CSGCombiner :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGCombinerMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl CSGCombinerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGCombinerMethodTable = CSGCombinerMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CSGCombinerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGCombiner\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::csg_combiner::private::CSGCombiner;
            
            pub(crate) mod csg_cylinder {
                # ! [doc = "This module contains types related to the API class [`CSGCylinder`][super::CSGCylinder]."] pub (crate) mod private { # [doc = "`core class CSGCylinder` inherits `CSGPrimitive` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_csgcylinder.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CSGCylinder` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CSGCylinder>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCSGCylinder inherits methods from:\n - [CSGPrimitive](struct.CSGPrimitive.html)\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGCylinder { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CSGCylinder ; impl CSGCylinder { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CSGCylinderMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn sides (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . get_sides ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn smooth_faces (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . get_smooth_faces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_cone (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . is_cone ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cone (& self , cone : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . set_cone ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , cone as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_sides (& self , sides : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . set_sides ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , sides as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_smooth_faces (& self , smooth_faces : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGCylinderMethodTable :: get (get_api ()) . set_smooth_faces ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , smooth_faces as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGCylinder { } unsafe impl GodotObject for CSGCylinder { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGCylinder" } } impl QueueFree for CSGCylinder { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CSGCylinder { type Target = crate :: generated :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGCylinder { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CSGPrimitive > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: CSGShape > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: GeometryInstance > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: VisualInstance > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: CullInstance > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: Spatial > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: Node > for CSGCylinder { } unsafe impl SubClass < crate :: generated :: Object > for CSGCylinder { } impl Instanciable for CSGCylinder { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CSGCylinder :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGCylinderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_height : * mut sys :: godot_method_bind , pub get_material : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub get_sides : * mut sys :: godot_method_bind , pub get_smooth_faces : * mut sys :: godot_method_bind , pub is_cone : * mut sys :: godot_method_bind , pub set_cone : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind , pub set_sides : * mut sys :: godot_method_bind , pub set_smooth_faces : * mut sys :: godot_method_bind } impl CSGCylinderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGCylinderMethodTable = CSGCylinderMethodTable { class_constructor : None , get_height : 0 as * mut sys :: godot_method_bind , get_material : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , get_sides : 0 as * mut sys :: godot_method_bind , get_smooth_faces : 0 as * mut sys :: godot_method_bind , is_cone : 0 as * mut sys :: godot_method_bind , set_cone : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind , set_sides : 0 as * mut sys :: godot_method_bind , set_smooth_faces : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CSGCylinderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGCylinder\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . get_sides = (gd_api . godot_method_bind_get_method) (class_name , "get_sides\0" . as_ptr () as * const c_char) ; table . get_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_smooth_faces\0" . as_ptr () as * const c_char) ; table . is_cone = (gd_api . godot_method_bind_get_method) (class_name , "is_cone\0" . as_ptr () as * const c_char) ; table . set_cone = (gd_api . godot_method_bind_get_method) (class_name , "set_cone\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; table . set_sides = (gd_api . godot_method_bind_get_method) (class_name , "set_sides\0" . as_ptr () as * const c_char) ; table . set_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_smooth_faces\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::csg_cylinder::private::CSGCylinder;
            
            pub(crate) mod csg_mesh {
                # ! [doc = "This module contains types related to the API class [`CSGMesh`][super::CSGMesh]."] pub (crate) mod private { # [doc = "`core class CSGMesh` inherits `CSGPrimitive` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_csgmesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CSGMesh` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CSGMesh>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCSGMesh inherits methods from:\n - [CSGPrimitive](struct.CSGPrimitive.html)\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CSGMesh ; impl CSGMesh { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CSGMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGMeshMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGMeshMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGMeshMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : impl AsArg < crate :: generated :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGMeshMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGMesh { } unsafe impl GodotObject for CSGMesh { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGMesh" } } impl QueueFree for CSGMesh { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CSGMesh { type Target = crate :: generated :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CSGPrimitive > for CSGMesh { } unsafe impl SubClass < crate :: generated :: CSGShape > for CSGMesh { } unsafe impl SubClass < crate :: generated :: GeometryInstance > for CSGMesh { } unsafe impl SubClass < crate :: generated :: VisualInstance > for CSGMesh { } unsafe impl SubClass < crate :: generated :: CullInstance > for CSGMesh { } unsafe impl SubClass < crate :: generated :: Spatial > for CSGMesh { } unsafe impl SubClass < crate :: generated :: Node > for CSGMesh { } unsafe impl SubClass < crate :: generated :: Object > for CSGMesh { } impl Instanciable for CSGMesh { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CSGMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_material : * mut sys :: godot_method_bind , pub get_mesh : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind , pub set_mesh : * mut sys :: godot_method_bind } impl CSGMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGMeshMethodTable = CSGMeshMethodTable { class_constructor : None , get_material : 0 as * mut sys :: godot_method_bind , get_mesh : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind , set_mesh : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CSGMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::csg_mesh::private::CSGMesh;
            
            pub mod csg_polygon {
                # ! [doc = "This module contains types related to the API class [`CSGPolygon`][super::CSGPolygon]."] pub (crate) mod private { # [doc = "`core class CSGPolygon` inherits `CSGPrimitive` (manually managed).\n\nThis class has related types in the [`csg_polygon`][super::csg_polygon] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_csgpolygon.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CSGPolygon` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CSGPolygon>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCSGPolygon inherits methods from:\n - [CSGPrimitive](struct.CSGPrimitive.html)\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGPolygon { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CSGPolygon ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const DEPTH : Mode = Mode (0i64) ; pub const SPIN : Mode = Mode (1i64) ; pub const PATH : Mode = Mode (2i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } impl FromVariant for Mode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PathIntervalType (pub i64) ; impl PathIntervalType { pub const DISTANCE : PathIntervalType = PathIntervalType (0i64) ; pub const SUBDIVIDE : PathIntervalType = PathIntervalType (1i64) ; } impl From < i64 > for PathIntervalType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PathIntervalType > for i64 { # [inline] fn from (v : PathIntervalType) -> Self { v . 0 } } impl FromVariant for PathIntervalType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PathRotation (pub i64) ; impl PathRotation { pub const POLYGON : PathRotation = PathRotation (0i64) ; pub const PATH : PathRotation = PathRotation (1i64) ; pub const PATH_FOLLOW : PathRotation = PathRotation (2i64) ; } impl From < i64 > for PathRotation { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PathRotation > for i64 { # [inline] fn from (v : PathRotation) -> Self { v . 0 } } impl FromVariant for PathRotation { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CSGPolygon { pub const MODE_DEPTH : i64 = 0i64 ; pub const PATH_INTERVAL_DISTANCE : i64 = 0i64 ; pub const PATH_ROTATION_POLYGON : i64 = 0i64 ; pub const MODE_SPIN : i64 = 1i64 ; pub const PATH_INTERVAL_SUBDIVIDE : i64 = 1i64 ; pub const PATH_ROTATION_PATH : i64 = 1i64 ; pub const MODE_PATH : i64 = 2i64 ; pub const PATH_ROTATION_PATH_FOLLOW : i64 = 2i64 ; } impl CSGPolygon { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CSGPolygonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn depth (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_depth ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn mode (& self) -> crate :: generated :: csg_polygon :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: csg_polygon :: Mode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn path_interval (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_path_interval ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn path_interval_type (& self) -> crate :: generated :: csg_polygon :: PathIntervalType { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_path_interval_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: csg_polygon :: PathIntervalType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn path_node (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_path_node ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn path_rotation (& self) -> crate :: generated :: csg_polygon :: PathRotation { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_path_rotation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: csg_polygon :: PathRotation > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn path_simplify_angle (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_path_simplify_angle ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn path_u_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_path_u_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn polygon (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn smooth_faces (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_smooth_faces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn spin_degrees (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_spin_degrees ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn spin_sides (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . get_spin_sides ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_path_continuous_u (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . is_path_continuous_u ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_path_joined (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . is_path_joined ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_path_local (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . is_path_local ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_depth (& self , depth : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_depth ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , depth as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_continuous_u (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_continuous_u ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_interval (& self , path_interval : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_interval ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , path_interval as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_interval_type (& self , interval_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_interval_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , interval_type as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_joined (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_joined ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_local (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_local ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_node (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_node ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_rotation (& self , path_rotation : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_rotation ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , path_rotation as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_simplify_angle (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_simplify_angle ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , degrees as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_path_u_distance (& self , distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_path_u_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , distance as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_polygon (& self , polygon : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_smooth_faces (& self , smooth_faces : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_smooth_faces ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , smooth_faces as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_spin_degrees (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_spin_degrees ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , degrees as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_spin_sides (& self , spin_sides : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPolygonMethodTable :: get (get_api ()) . set_spin_sides ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , spin_sides as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGPolygon { } unsafe impl GodotObject for CSGPolygon { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGPolygon" } } impl QueueFree for CSGPolygon { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CSGPolygon { type Target = crate :: generated :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGPolygon { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CSGPrimitive > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: CSGShape > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: GeometryInstance > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: VisualInstance > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: CullInstance > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: Spatial > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: Node > for CSGPolygon { } unsafe impl SubClass < crate :: generated :: Object > for CSGPolygon { } impl Instanciable for CSGPolygon { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CSGPolygon :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGPolygonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_depth : * mut sys :: godot_method_bind , pub get_material : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub get_path_interval : * mut sys :: godot_method_bind , pub get_path_interval_type : * mut sys :: godot_method_bind , pub get_path_node : * mut sys :: godot_method_bind , pub get_path_rotation : * mut sys :: godot_method_bind , pub get_path_simplify_angle : * mut sys :: godot_method_bind , pub get_path_u_distance : * mut sys :: godot_method_bind , pub get_polygon : * mut sys :: godot_method_bind , pub get_smooth_faces : * mut sys :: godot_method_bind , pub get_spin_degrees : * mut sys :: godot_method_bind , pub get_spin_sides : * mut sys :: godot_method_bind , pub is_path_continuous_u : * mut sys :: godot_method_bind , pub is_path_joined : * mut sys :: godot_method_bind , pub is_path_local : * mut sys :: godot_method_bind , pub set_depth : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind , pub set_mode : * mut sys :: godot_method_bind , pub set_path_continuous_u : * mut sys :: godot_method_bind , pub set_path_interval : * mut sys :: godot_method_bind , pub set_path_interval_type : * mut sys :: godot_method_bind , pub set_path_joined : * mut sys :: godot_method_bind , pub set_path_local : * mut sys :: godot_method_bind , pub set_path_node : * mut sys :: godot_method_bind , pub set_path_rotation : * mut sys :: godot_method_bind , pub set_path_simplify_angle : * mut sys :: godot_method_bind , pub set_path_u_distance : * mut sys :: godot_method_bind , pub set_polygon : * mut sys :: godot_method_bind , pub set_smooth_faces : * mut sys :: godot_method_bind , pub set_spin_degrees : * mut sys :: godot_method_bind , pub set_spin_sides : * mut sys :: godot_method_bind } impl CSGPolygonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGPolygonMethodTable = CSGPolygonMethodTable { class_constructor : None , get_depth : 0 as * mut sys :: godot_method_bind , get_material : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , get_path_interval : 0 as * mut sys :: godot_method_bind , get_path_interval_type : 0 as * mut sys :: godot_method_bind , get_path_node : 0 as * mut sys :: godot_method_bind , get_path_rotation : 0 as * mut sys :: godot_method_bind , get_path_simplify_angle : 0 as * mut sys :: godot_method_bind , get_path_u_distance : 0 as * mut sys :: godot_method_bind , get_polygon : 0 as * mut sys :: godot_method_bind , get_smooth_faces : 0 as * mut sys :: godot_method_bind , get_spin_degrees : 0 as * mut sys :: godot_method_bind , get_spin_sides : 0 as * mut sys :: godot_method_bind , is_path_continuous_u : 0 as * mut sys :: godot_method_bind , is_path_joined : 0 as * mut sys :: godot_method_bind , is_path_local : 0 as * mut sys :: godot_method_bind , set_depth : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind , set_mode : 0 as * mut sys :: godot_method_bind , set_path_continuous_u : 0 as * mut sys :: godot_method_bind , set_path_interval : 0 as * mut sys :: godot_method_bind , set_path_interval_type : 0 as * mut sys :: godot_method_bind , set_path_joined : 0 as * mut sys :: godot_method_bind , set_path_local : 0 as * mut sys :: godot_method_bind , set_path_node : 0 as * mut sys :: godot_method_bind , set_path_rotation : 0 as * mut sys :: godot_method_bind , set_path_simplify_angle : 0 as * mut sys :: godot_method_bind , set_path_u_distance : 0 as * mut sys :: godot_method_bind , set_polygon : 0 as * mut sys :: godot_method_bind , set_smooth_faces : 0 as * mut sys :: godot_method_bind , set_spin_degrees : 0 as * mut sys :: godot_method_bind , set_spin_sides : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CSGPolygonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGPolygon\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_depth\0" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_path_interval = (gd_api . godot_method_bind_get_method) (class_name , "get_path_interval\0" . as_ptr () as * const c_char) ; table . get_path_interval_type = (gd_api . godot_method_bind_get_method) (class_name , "get_path_interval_type\0" . as_ptr () as * const c_char) ; table . get_path_node = (gd_api . godot_method_bind_get_method) (class_name , "get_path_node\0" . as_ptr () as * const c_char) ; table . get_path_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_path_rotation\0" . as_ptr () as * const c_char) ; table . get_path_simplify_angle = (gd_api . godot_method_bind_get_method) (class_name , "get_path_simplify_angle\0" . as_ptr () as * const c_char) ; table . get_path_u_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_path_u_distance\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . get_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_smooth_faces\0" . as_ptr () as * const c_char) ; table . get_spin_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_spin_degrees\0" . as_ptr () as * const c_char) ; table . get_spin_sides = (gd_api . godot_method_bind_get_method) (class_name , "get_spin_sides\0" . as_ptr () as * const c_char) ; table . is_path_continuous_u = (gd_api . godot_method_bind_get_method) (class_name , "is_path_continuous_u\0" . as_ptr () as * const c_char) ; table . is_path_joined = (gd_api . godot_method_bind_get_method) (class_name , "is_path_joined\0" . as_ptr () as * const c_char) ; table . is_path_local = (gd_api . godot_method_bind_get_method) (class_name , "is_path_local\0" . as_ptr () as * const c_char) ; table . set_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_depth\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_path_continuous_u = (gd_api . godot_method_bind_get_method) (class_name , "set_path_continuous_u\0" . as_ptr () as * const c_char) ; table . set_path_interval = (gd_api . godot_method_bind_get_method) (class_name , "set_path_interval\0" . as_ptr () as * const c_char) ; table . set_path_interval_type = (gd_api . godot_method_bind_get_method) (class_name , "set_path_interval_type\0" . as_ptr () as * const c_char) ; table . set_path_joined = (gd_api . godot_method_bind_get_method) (class_name , "set_path_joined\0" . as_ptr () as * const c_char) ; table . set_path_local = (gd_api . godot_method_bind_get_method) (class_name , "set_path_local\0" . as_ptr () as * const c_char) ; table . set_path_node = (gd_api . godot_method_bind_get_method) (class_name , "set_path_node\0" . as_ptr () as * const c_char) ; table . set_path_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_path_rotation\0" . as_ptr () as * const c_char) ; table . set_path_simplify_angle = (gd_api . godot_method_bind_get_method) (class_name , "set_path_simplify_angle\0" . as_ptr () as * const c_char) ; table . set_path_u_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_path_u_distance\0" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\0" . as_ptr () as * const c_char) ; table . set_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_smooth_faces\0" . as_ptr () as * const c_char) ; table . set_spin_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_spin_degrees\0" . as_ptr () as * const c_char) ; table . set_spin_sides = (gd_api . godot_method_bind_get_method) (class_name , "set_spin_sides\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::csg_polygon::private::CSGPolygon;
            
            pub(crate) mod csg_primitive {
                # ! [doc = "This module contains types related to the API class [`CSGPrimitive`][super::CSGPrimitive]."] pub (crate) mod private { # [doc = "`core class CSGPrimitive` inherits `CSGShape` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_csgprimitive.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nCSGPrimitive inherits methods from:\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGPrimitive { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CSGPrimitive ; impl CSGPrimitive { # [doc = ""] # [doc = ""] # [inline] pub fn is_inverting_faces (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPrimitiveMethodTable :: get (get_api ()) . is_inverting_faces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_invert_faces (& self , invert_faces : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGPrimitiveMethodTable :: get (get_api ()) . set_invert_faces ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , invert_faces as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGPrimitive { } unsafe impl GodotObject for CSGPrimitive { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGPrimitive" } } impl QueueFree for CSGPrimitive { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CSGPrimitive { type Target = crate :: generated :: CSGShape ; # [inline] fn deref (& self) -> & crate :: generated :: CSGShape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGPrimitive { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CSGShape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CSGShape > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: GeometryInstance > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: VisualInstance > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: CullInstance > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: Spatial > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: Node > for CSGPrimitive { } unsafe impl SubClass < crate :: generated :: Object > for CSGPrimitive { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGPrimitiveMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_inverting_faces : * mut sys :: godot_method_bind , pub set_invert_faces : * mut sys :: godot_method_bind } impl CSGPrimitiveMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGPrimitiveMethodTable = CSGPrimitiveMethodTable { class_constructor : None , is_inverting_faces : 0 as * mut sys :: godot_method_bind , set_invert_faces : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CSGPrimitiveMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGPrimitive\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_inverting_faces = (gd_api . godot_method_bind_get_method) (class_name , "is_inverting_faces\0" . as_ptr () as * const c_char) ; table . set_invert_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_invert_faces\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::csg_primitive::private::CSGPrimitive;
            
            pub mod csg_shape {
                # ! [doc = "This module contains types related to the API class [`CSGShape`][super::CSGShape]."] pub (crate) mod private { # [doc = "`core class CSGShape` inherits `GeometryInstance` (manually managed).\n\nThis class has related types in the [`csg_shape`][super::csg_shape] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_csgshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nCSGShape inherits methods from:\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGShape { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CSGShape ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Operation (pub i64) ; impl Operation { pub const UNION : Operation = Operation (0i64) ; pub const INTERSECTION : Operation = Operation (1i64) ; pub const SUBTRACTION : Operation = Operation (2i64) ; } impl From < i64 > for Operation { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Operation > for i64 { # [inline] fn from (v : Operation) -> Self { v . 0 } } impl FromVariant for Operation { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CSGShape { pub const OPERATION_UNION : i64 = 0i64 ; pub const OPERATION_INTERSECTION : i64 = 1i64 ; pub const OPERATION_SUBTRACTION : i64 = 2i64 ; } impl CSGShape { # [doc = ""] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_collision_layer_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . get_collision_layer_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_meshes (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . get_meshes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn operation (& self) -> crate :: generated :: csg_shape :: Operation { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . get_operation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: csg_shape :: Operation > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn snap (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . get_snap ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_calculating_tangents (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . is_calculating_tangents ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_root_shape (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . is_root_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_using_collision (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . is_using_collision ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_calculate_tangents (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . set_calculate_tangents ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_collision_layer (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , layer as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_collision_layer_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . set_collision_layer_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_operation (& self , operation : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . set_operation ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , operation as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_snap (& self , snap : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . set_snap ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , snap as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_use_collision (& self , operation : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGShapeMethodTable :: get (get_api ()) . set_use_collision ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , operation as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGShape { } unsafe impl GodotObject for CSGShape { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGShape" } } impl QueueFree for CSGShape { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CSGShape { type Target = crate :: generated :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: GeometryInstance > for CSGShape { } unsafe impl SubClass < crate :: generated :: VisualInstance > for CSGShape { } unsafe impl SubClass < crate :: generated :: CullInstance > for CSGShape { } unsafe impl SubClass < crate :: generated :: Spatial > for CSGShape { } unsafe impl SubClass < crate :: generated :: Node > for CSGShape { } unsafe impl SubClass < crate :: generated :: Object > for CSGShape { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_collision_layer : * mut sys :: godot_method_bind , pub get_collision_layer_bit : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_meshes : * mut sys :: godot_method_bind , pub get_operation : * mut sys :: godot_method_bind , pub get_snap : * mut sys :: godot_method_bind , pub is_calculating_tangents : * mut sys :: godot_method_bind , pub is_root_shape : * mut sys :: godot_method_bind , pub is_using_collision : * mut sys :: godot_method_bind , pub set_calculate_tangents : * mut sys :: godot_method_bind , pub set_collision_layer : * mut sys :: godot_method_bind , pub set_collision_layer_bit : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_operation : * mut sys :: godot_method_bind , pub set_snap : * mut sys :: godot_method_bind , pub set_use_collision : * mut sys :: godot_method_bind } impl CSGShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGShapeMethodTable = CSGShapeMethodTable { class_constructor : None , get_collision_layer : 0 as * mut sys :: godot_method_bind , get_collision_layer_bit : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_meshes : 0 as * mut sys :: godot_method_bind , get_operation : 0 as * mut sys :: godot_method_bind , get_snap : 0 as * mut sys :: godot_method_bind , is_calculating_tangents : 0 as * mut sys :: godot_method_bind , is_root_shape : 0 as * mut sys :: godot_method_bind , is_using_collision : 0 as * mut sys :: godot_method_bind , set_calculate_tangents : 0 as * mut sys :: godot_method_bind , set_collision_layer : 0 as * mut sys :: godot_method_bind , set_collision_layer_bit : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_operation : 0 as * mut sys :: godot_method_bind , set_snap : 0 as * mut sys :: godot_method_bind , set_use_collision : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CSGShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\0" . as_ptr () as * const c_char) ; table . get_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_meshes = (gd_api . godot_method_bind_get_method) (class_name , "get_meshes\0" . as_ptr () as * const c_char) ; table . get_operation = (gd_api . godot_method_bind_get_method) (class_name , "get_operation\0" . as_ptr () as * const c_char) ; table . get_snap = (gd_api . godot_method_bind_get_method) (class_name , "get_snap\0" . as_ptr () as * const c_char) ; table . is_calculating_tangents = (gd_api . godot_method_bind_get_method) (class_name , "is_calculating_tangents\0" . as_ptr () as * const c_char) ; table . is_root_shape = (gd_api . godot_method_bind_get_method) (class_name , "is_root_shape\0" . as_ptr () as * const c_char) ; table . is_using_collision = (gd_api . godot_method_bind_get_method) (class_name , "is_using_collision\0" . as_ptr () as * const c_char) ; table . set_calculate_tangents = (gd_api . godot_method_bind_get_method) (class_name , "set_calculate_tangents\0" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\0" . as_ptr () as * const c_char) ; table . set_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_operation = (gd_api . godot_method_bind_get_method) (class_name , "set_operation\0" . as_ptr () as * const c_char) ; table . set_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_snap\0" . as_ptr () as * const c_char) ; table . set_use_collision = (gd_api . godot_method_bind_get_method) (class_name , "set_use_collision\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::csg_shape::private::CSGShape;
            
            pub(crate) mod csg_sphere {
                # ! [doc = "This module contains types related to the API class [`CSGSphere`][super::CSGSphere]."] pub (crate) mod private { # [doc = "`core class CSGSphere` inherits `CSGPrimitive` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_csgsphere.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CSGSphere` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CSGSphere>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCSGSphere inherits methods from:\n - [CSGPrimitive](struct.CSGPrimitive.html)\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGSphere { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CSGSphere ; impl CSGSphere { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CSGSphereMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn radial_segments (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_radial_segments ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn rings (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_rings ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn smooth_faces (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . get_smooth_faces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_radial_segments (& self , radial_segments : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_radial_segments ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , radial_segments as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_rings (& self , rings : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_rings ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , rings as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_smooth_faces (& self , smooth_faces : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGSphereMethodTable :: get (get_api ()) . set_smooth_faces ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , smooth_faces as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGSphere { } unsafe impl GodotObject for CSGSphere { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGSphere" } } impl QueueFree for CSGSphere { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CSGSphere { type Target = crate :: generated :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGSphere { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CSGPrimitive > for CSGSphere { } unsafe impl SubClass < crate :: generated :: CSGShape > for CSGSphere { } unsafe impl SubClass < crate :: generated :: GeometryInstance > for CSGSphere { } unsafe impl SubClass < crate :: generated :: VisualInstance > for CSGSphere { } unsafe impl SubClass < crate :: generated :: CullInstance > for CSGSphere { } unsafe impl SubClass < crate :: generated :: Spatial > for CSGSphere { } unsafe impl SubClass < crate :: generated :: Node > for CSGSphere { } unsafe impl SubClass < crate :: generated :: Object > for CSGSphere { } impl Instanciable for CSGSphere { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CSGSphere :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGSphereMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_material : * mut sys :: godot_method_bind , pub get_radial_segments : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub get_rings : * mut sys :: godot_method_bind , pub get_smooth_faces : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind , pub set_radial_segments : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind , pub set_rings : * mut sys :: godot_method_bind , pub set_smooth_faces : * mut sys :: godot_method_bind } impl CSGSphereMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGSphereMethodTable = CSGSphereMethodTable { class_constructor : None , get_material : 0 as * mut sys :: godot_method_bind , get_radial_segments : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , get_rings : 0 as * mut sys :: godot_method_bind , get_smooth_faces : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind , set_radial_segments : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind , set_rings : 0 as * mut sys :: godot_method_bind , set_smooth_faces : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CSGSphereMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGSphere\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_radial_segments\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . get_rings = (gd_api . godot_method_bind_get_method) (class_name , "get_rings\0" . as_ptr () as * const c_char) ; table . get_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_smooth_faces\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; table . set_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "set_radial_segments\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; table . set_rings = (gd_api . godot_method_bind_get_method) (class_name , "set_rings\0" . as_ptr () as * const c_char) ; table . set_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_smooth_faces\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::csg_sphere::private::CSGSphere;
            
            pub(crate) mod csg_torus {
                # ! [doc = "This module contains types related to the API class [`CSGTorus`][super::CSGTorus]."] pub (crate) mod private { # [doc = "`core class CSGTorus` inherits `CSGPrimitive` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_csgtorus.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CSGTorus` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CSGTorus>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCSGTorus inherits methods from:\n - [CSGPrimitive](struct.CSGPrimitive.html)\n - [CSGShape](struct.CSGShape.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CSGTorus { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CSGTorus ; impl CSGTorus { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CSGTorusMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn inner_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . get_inner_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn outer_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . get_outer_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn ring_sides (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . get_ring_sides ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn sides (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . get_sides ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn smooth_faces (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . get_smooth_faces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_inner_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . set_inner_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_outer_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . set_outer_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_ring_sides (& self , sides : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . set_ring_sides ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , sides as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_sides (& self , sides : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . set_sides ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , sides as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_smooth_faces (& self , smooth_faces : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CSGTorusMethodTable :: get (get_api ()) . set_smooth_faces ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , smooth_faces as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CSGTorus { } unsafe impl GodotObject for CSGTorus { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CSGTorus" } } impl QueueFree for CSGTorus { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CSGTorus { type Target = crate :: generated :: CSGPrimitive ; # [inline] fn deref (& self) -> & crate :: generated :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CSGTorus { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CSGPrimitive { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CSGPrimitive > for CSGTorus { } unsafe impl SubClass < crate :: generated :: CSGShape > for CSGTorus { } unsafe impl SubClass < crate :: generated :: GeometryInstance > for CSGTorus { } unsafe impl SubClass < crate :: generated :: VisualInstance > for CSGTorus { } unsafe impl SubClass < crate :: generated :: CullInstance > for CSGTorus { } unsafe impl SubClass < crate :: generated :: Spatial > for CSGTorus { } unsafe impl SubClass < crate :: generated :: Node > for CSGTorus { } unsafe impl SubClass < crate :: generated :: Object > for CSGTorus { } impl Instanciable for CSGTorus { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CSGTorus :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CSGTorusMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_inner_radius : * mut sys :: godot_method_bind , pub get_material : * mut sys :: godot_method_bind , pub get_outer_radius : * mut sys :: godot_method_bind , pub get_ring_sides : * mut sys :: godot_method_bind , pub get_sides : * mut sys :: godot_method_bind , pub get_smooth_faces : * mut sys :: godot_method_bind , pub set_inner_radius : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind , pub set_outer_radius : * mut sys :: godot_method_bind , pub set_ring_sides : * mut sys :: godot_method_bind , pub set_sides : * mut sys :: godot_method_bind , pub set_smooth_faces : * mut sys :: godot_method_bind } impl CSGTorusMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CSGTorusMethodTable = CSGTorusMethodTable { class_constructor : None , get_inner_radius : 0 as * mut sys :: godot_method_bind , get_material : 0 as * mut sys :: godot_method_bind , get_outer_radius : 0 as * mut sys :: godot_method_bind , get_ring_sides : 0 as * mut sys :: godot_method_bind , get_sides : 0 as * mut sys :: godot_method_bind , get_smooth_faces : 0 as * mut sys :: godot_method_bind , set_inner_radius : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind , set_outer_radius : 0 as * mut sys :: godot_method_bind , set_ring_sides : 0 as * mut sys :: godot_method_bind , set_sides : 0 as * mut sys :: godot_method_bind , set_smooth_faces : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CSGTorusMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CSGTorus\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_inner_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_inner_radius\0" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_outer_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_outer_radius\0" . as_ptr () as * const c_char) ; table . get_ring_sides = (gd_api . godot_method_bind_get_method) (class_name , "get_ring_sides\0" . as_ptr () as * const c_char) ; table . get_sides = (gd_api . godot_method_bind_get_method) (class_name , "get_sides\0" . as_ptr () as * const c_char) ; table . get_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_smooth_faces\0" . as_ptr () as * const c_char) ; table . set_inner_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_inner_radius\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; table . set_outer_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_outer_radius\0" . as_ptr () as * const c_char) ; table . set_ring_sides = (gd_api . godot_method_bind_get_method) (class_name , "set_ring_sides\0" . as_ptr () as * const c_char) ; table . set_sides = (gd_api . godot_method_bind_get_method) (class_name , "set_sides\0" . as_ptr () as * const c_char) ; table . set_smooth_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_smooth_faces\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::csg_torus::private::CSGTorus;
            
            pub(crate) mod callback_tweener {
                # ! [doc = "This module contains types related to the API class [`CallbackTweener`][super::CallbackTweener]."] pub (crate) mod private { # [doc = "`core class CallbackTweener` inherits `Tweener` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_callbacktweener.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCallbackTweener inherits methods from:\n - [Tweener](struct.Tweener.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CallbackTweener { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CallbackTweener ; impl CallbackTweener { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CallbackTweenerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nMakes the callback call delayed by given time in seconds. Example:\n```gdscript\nvar tween = get_tree().create_tween()\ntween.tween_callback(queue_free).set_delay(2) #this will call queue_free() after 2 seconds\n```"] # [doc = ""] # [inline] pub fn set_delay (& self , delay : f64) -> Option < Ref < crate :: generated :: CallbackTweener , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CallbackTweenerMethodTable :: get (get_api ()) . set_delay ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , delay as _) ; < Option < Ref < crate :: generated :: CallbackTweener , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for CallbackTweener { } unsafe impl GodotObject for CallbackTweener { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CallbackTweener" } } impl std :: ops :: Deref for CallbackTweener { type Target = crate :: generated :: Tweener ; # [inline] fn deref (& self) -> & crate :: generated :: Tweener { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CallbackTweener { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Tweener { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Tweener > for CallbackTweener { } unsafe impl SubClass < crate :: generated :: Reference > for CallbackTweener { } unsafe impl SubClass < crate :: generated :: Object > for CallbackTweener { } impl Instanciable for CallbackTweener { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CallbackTweener :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CallbackTweenerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub set_delay : * mut sys :: godot_method_bind } impl CallbackTweenerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CallbackTweenerMethodTable = CallbackTweenerMethodTable { class_constructor : None , set_delay : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CallbackTweenerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CallbackTweener\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . set_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_delay\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::callback_tweener::private::CallbackTweener;
            
            pub mod camera {
                # ! [doc = "This module contains types related to the API class [`Camera`][super::Camera]."] pub (crate) mod private { # [doc = "`core class Camera` inherits `Spatial` (manually managed).\n\nThis class has related types in the [`camera`][super::camera] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_camera.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Camera` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Camera>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCamera inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Camera { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Camera ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DopplerTracking (pub i64) ; impl DopplerTracking { pub const DISABLED : DopplerTracking = DopplerTracking (0i64) ; pub const IDLE_STEP : DopplerTracking = DopplerTracking (1i64) ; pub const PHYSICS_STEP : DopplerTracking = DopplerTracking (2i64) ; } impl From < i64 > for DopplerTracking { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DopplerTracking > for i64 { # [inline] fn from (v : DopplerTracking) -> Self { v . 0 } } impl FromVariant for DopplerTracking { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct KeepAspect (pub i64) ; impl KeepAspect { pub const WIDTH : KeepAspect = KeepAspect (0i64) ; pub const HEIGHT : KeepAspect = KeepAspect (1i64) ; } impl From < i64 > for KeepAspect { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < KeepAspect > for i64 { # [inline] fn from (v : KeepAspect) -> Self { v . 0 } } impl FromVariant for KeepAspect { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Projection (pub i64) ; impl Projection { pub const PERSPECTIVE : Projection = Projection (0i64) ; pub const ORTHOGONAL : Projection = Projection (1i64) ; pub const FRUSTUM : Projection = Projection (2i64) ; } impl From < i64 > for Projection { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Projection > for i64 { # [inline] fn from (v : Projection) -> Self { v . 0 } } impl FromVariant for Projection { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Camera { pub const DOPPLER_TRACKING_DISABLED : i64 = 0i64 ; pub const KEEP_WIDTH : i64 = 0i64 ; pub const PROJECTION_PERSPECTIVE : i64 = 0i64 ; pub const DOPPLER_TRACKING_IDLE_STEP : i64 = 1i64 ; pub const KEEP_HEIGHT : i64 = 1i64 ; pub const PROJECTION_ORTHOGONAL : i64 = 1i64 ; pub const DOPPLER_TRACKING_PHYSICS_STEP : i64 = 2i64 ; pub const PROJECTION_FRUSTUM : i64 = 2i64 ; } impl Camera { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CameraMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If this is the current camera, remove it from being current. If `enable_next` is `true`, request to make the next camera current, if any.\n# Default Arguments\n* `enable_next` - `true`"] # [doc = ""] # [inline] pub fn clear_current (& self , enable_next : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . clear_current ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable_next as _) ; } } # [doc = "Returns the camera's RID from the [`VisualServer`][VisualServer]."] # [doc = ""] # [inline] pub fn get_camera_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_camera_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the transform of the camera plus the vertical ([`v_offset`][Self::v_offset]) and horizontal ([`h_offset`][Self::h_offset]) offsets; and any other adjustments made to the position and orientation of the camera by subclassed cameras such as [`ClippedCamera`][ClippedCamera], [`InterpolatedCamera`][InterpolatedCamera] and [`ARVRCamera`][ARVRCamera]."] # [doc = ""] # [inline] pub fn get_camera_transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_camera_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The culling mask that describes which 3D render layers are rendered by this camera."] # [doc = ""] # [inline] pub fn cull_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_cull_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given `layer` in the [`cull_mask`][Self::cull_mask] is enabled, `false` otherwise."] # [doc = ""] # [inline] pub fn get_cull_mask_bit (& self , layer : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_cull_mask_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , layer as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If not [`DOPPLER_TRACKING_DISABLED`][Self::DOPPLER_TRACKING_DISABLED], this camera will simulate the [Doppler effect](https://en.wikipedia.org/wiki/Doppler_effect) for objects changed in particular `_process` methods. The Doppler effect is only simulated for [`AudioStreamPlayer3D`][AudioStreamPlayer3D] nodes that have [`AudioStreamPlayer3D.doppler_tracking`][AudioStreamPlayer3D::doppler_tracking] set to a value other than [`AudioStreamPlayer3D.DOPPLER_TRACKING_DISABLED`][AudioStreamPlayer3D::DOPPLER_TRACKING_DISABLED].\n**Note:** To toggle the Doppler effect preview in the editor, use the Perspective menu in the top-left corner of the 3D viewport and toggle **Enable Doppler**."] # [doc = ""] # [inline] pub fn doppler_tracking (& self) -> crate :: generated :: camera :: DopplerTracking { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_doppler_tracking ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: camera :: DopplerTracking > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Environment`][Environment] to use for this camera."] # [doc = ""] # [inline] pub fn environment (& self) -> Option < Ref < crate :: generated :: Environment , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_environment ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Environment , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [`keep_aspect`][Self::keep_aspect] locks one axis, `fov` sets the other axis' field of view angle.\nFor reference, the default vertical field of view value (`70.0`) is equivalent to a horizontal FOV of:\n- ~86.07 degrees in a 4:3 viewport\n- ~96.50 degrees in a 16:10 viewport\n- ~102.45 degrees in a 16:9 viewport\n- ~117.06 degrees in a 21:9 viewport"] # [doc = ""] # [inline] pub fn fov (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_fov ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the camera's frustum planes in world space units as an array of [`Plane`][Plane]s in the following order: near, far, left, top, right, bottom. Not to be confused with [`frustum_offset`][Self::frustum_offset]."] # [doc = ""] # [inline] pub fn get_frustum (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_frustum ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The camera's frustum offset. This can be changed from the default to create \"tilted frustum\" effects such as [Y-shearing](https://zdoom.org/wiki/Y-shearing).\n**Note:** Only effective if [`projection`][Self::projection] is [`PROJECTION_FRUSTUM`][Self::PROJECTION_FRUSTUM]."] # [doc = ""] # [inline] pub fn frustum_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_frustum_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The horizontal (X) offset of the camera viewport."] # [doc = ""] # [inline] pub fn h_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_h_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The axis to lock during [`fov`][Self::fov]/[`size`][Self::size] adjustments. Can be either [`KEEP_WIDTH`][Self::KEEP_WIDTH] or [`KEEP_HEIGHT`][Self::KEEP_HEIGHT]."] # [doc = ""] # [inline] pub fn keep_aspect_mode (& self) -> crate :: generated :: camera :: KeepAspect { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_keep_aspect_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: camera :: KeepAspect > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The camera's projection mode. In [`PROJECTION_PERSPECTIVE`][Self::PROJECTION_PERSPECTIVE] mode, objects' Z distance from the camera's local space scales their perceived size."] # [doc = ""] # [inline] pub fn projection (& self) -> crate :: generated :: camera :: Projection { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_projection ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: camera :: Projection > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The camera's size in meters measured as the diameter of the width or height, depending on [`keep_aspect`][Self::keep_aspect]. Only applicable in orthogonal and frustum modes."] # [doc = ""] # [inline] pub fn size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The vertical (Y) offset of the camera viewport."] # [doc = ""] # [inline] pub fn v_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_v_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The distance to the far culling boundary for this camera relative to its local Z axis."] # [doc = ""] # [inline] pub fn zfar (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_zfar ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The distance to the near culling boundary for this camera relative to its local Z axis."] # [doc = ""] # [inline] pub fn znear (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . get_znear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the ancestor [`Viewport`][Viewport] is currently using this camera.\nIf multiple cameras are in the scene, one will always be made current. For example, if two [`Camera`][Camera] nodes are present in the scene and only one is current, setting one camera's [`current`][Self::current] to `false` will cause the other camera to be made current."] # [doc = ""] # [inline] pub fn is_current (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . is_current ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given position is behind the camera.\n**Note:** A position which returns `false` may still be outside the camera's field of view."] # [doc = ""] # [inline] pub fn is_position_behind (& self , world_point : Vector3) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . is_position_behind ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , world_point) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Makes this camera the current camera for the [`Viewport`][Viewport] (see class description). If the camera node is outside the scene tree, it will attempt to become current once it's added."] # [doc = ""] # [inline] pub fn make_current (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . make_current ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns a normal vector from the screen point location directed along the camera. Orthogonal cameras are normalized. Perspective cameras account for perspective, screen width/height, etc."] # [doc = ""] # [inline] pub fn project_local_ray_normal (& self , screen_point : Vector2) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . project_local_ray_normal ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , screen_point) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the 3D point in world space that maps to the given 2D coordinate in the [`Viewport`][Viewport] rectangle on a plane that is the given `z_depth` distance into the scene away from the camera."] # [doc = ""] # [inline] pub fn project_position (& self , screen_point : Vector2 , z_depth : f64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . project_position ; let ret = crate :: icalls :: icallvar__vec2_f64 (method_bind , self . this . sys () . as_ptr () , screen_point , z_depth as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a normal vector in world space, that is the result of projecting a point on the [`Viewport`][Viewport] rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking."] # [doc = ""] # [inline] pub fn project_ray_normal (& self , screen_point : Vector2) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . project_ray_normal ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , screen_point) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a 3D position in world space, that is the result of projecting a point on the [`Viewport`][Viewport] rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking."] # [doc = ""] # [inline] pub fn project_ray_origin (& self , screen_point : Vector2) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . project_ray_origin ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , screen_point) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The culling mask that describes which 3D render layers are rendered by this camera."] # [doc = ""] # [inline] pub fn set_cull_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_cull_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "Enables or disables the given `layer` in the [`cull_mask`][Self::cull_mask]."] # [doc = ""] # [inline] pub fn set_cull_mask_bit (& self , layer : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_cull_mask_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , layer as _ , enable as _) ; } } # [doc = "If `true`, the ancestor [`Viewport`][Viewport] is currently using this camera.\nIf multiple cameras are in the scene, one will always be made current. For example, if two [`Camera`][Camera] nodes are present in the scene and only one is current, setting one camera's [`current`][Self::current] to `false` will cause the other camera to be made current."] # [doc = ""] # [inline] pub fn set_current (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_current ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If not [`DOPPLER_TRACKING_DISABLED`][Self::DOPPLER_TRACKING_DISABLED], this camera will simulate the [Doppler effect](https://en.wikipedia.org/wiki/Doppler_effect) for objects changed in particular `_process` methods. The Doppler effect is only simulated for [`AudioStreamPlayer3D`][AudioStreamPlayer3D] nodes that have [`AudioStreamPlayer3D.doppler_tracking`][AudioStreamPlayer3D::doppler_tracking] set to a value other than [`AudioStreamPlayer3D.DOPPLER_TRACKING_DISABLED`][AudioStreamPlayer3D::DOPPLER_TRACKING_DISABLED].\n**Note:** To toggle the Doppler effect preview in the editor, use the Perspective menu in the top-left corner of the 3D viewport and toggle **Enable Doppler**."] # [doc = ""] # [inline] pub fn set_doppler_tracking (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_doppler_tracking ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The [`Environment`][Environment] to use for this camera."] # [doc = ""] # [inline] pub fn set_environment (& self , env : impl AsArg < crate :: generated :: Environment >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_environment ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , env . as_arg_ptr ()) ; } } # [doc = "The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [`keep_aspect`][Self::keep_aspect] locks one axis, `fov` sets the other axis' field of view angle.\nFor reference, the default vertical field of view value (`70.0`) is equivalent to a horizontal FOV of:\n- ~86.07 degrees in a 4:3 viewport\n- ~96.50 degrees in a 16:10 viewport\n- ~102.45 degrees in a 16:9 viewport\n- ~117.06 degrees in a 21:9 viewport"] # [doc = ""] # [inline] pub fn set_fov (& self , fov : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_fov ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , fov as _) ; } } # [doc = "Sets the camera projection to frustum mode (see [`PROJECTION_FRUSTUM`][Self::PROJECTION_FRUSTUM]), by specifying a `size`, an `offset`, and the `z_near` and `z_far` clip planes in world space units. See also [`frustum_offset`][Self::frustum_offset]."] # [doc = ""] # [inline] pub fn set_frustum (& self , size : f64 , offset : Vector2 , z_near : f64 , z_far : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_frustum ; let ret = crate :: icalls :: icallvar__f64_vec2_f64_f64 (method_bind , self . this . sys () . as_ptr () , size as _ , offset , z_near as _ , z_far as _) ; } } # [doc = "The camera's frustum offset. This can be changed from the default to create \"tilted frustum\" effects such as [Y-shearing](https://zdoom.org/wiki/Y-shearing).\n**Note:** Only effective if [`projection`][Self::projection] is [`PROJECTION_FRUSTUM`][Self::PROJECTION_FRUSTUM]."] # [doc = ""] # [inline] pub fn set_frustum_offset (& self , frustum_offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_frustum_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , frustum_offset) ; } } # [doc = "The horizontal (X) offset of the camera viewport."] # [doc = ""] # [inline] pub fn set_h_offset (& self , ofs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_h_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ofs as _) ; } } # [doc = "The axis to lock during [`fov`][Self::fov]/[`size`][Self::size] adjustments. Can be either [`KEEP_WIDTH`][Self::KEEP_WIDTH] or [`KEEP_HEIGHT`][Self::KEEP_HEIGHT]."] # [doc = ""] # [inline] pub fn set_keep_aspect_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_keep_aspect_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Sets the camera projection to orthogonal mode (see [`PROJECTION_ORTHOGONAL`][Self::PROJECTION_ORTHOGONAL]), by specifying a `size`, and the `z_near` and `z_far` clip planes in world space units. (As a hint, 2D games often use this projection, with values specified in pixels.)"] # [doc = ""] # [inline] pub fn set_orthogonal (& self , size : f64 , z_near : f64 , z_far : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_orthogonal ; let ret = crate :: icalls :: icallvar__f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , size as _ , z_near as _ , z_far as _) ; } } # [doc = "Sets the camera projection to perspective mode (see [`PROJECTION_PERSPECTIVE`][Self::PROJECTION_PERSPECTIVE]), by specifying a `fov` (field of view) angle in degrees, and the `z_near` and `z_far` clip planes in world space units."] # [doc = ""] # [inline] pub fn set_perspective (& self , fov : f64 , z_near : f64 , z_far : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_perspective ; let ret = crate :: icalls :: icallvar__f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , fov as _ , z_near as _ , z_far as _) ; } } # [doc = "The camera's projection mode. In [`PROJECTION_PERSPECTIVE`][Self::PROJECTION_PERSPECTIVE] mode, objects' Z distance from the camera's local space scales their perceived size."] # [doc = ""] # [inline] pub fn set_projection (& self , projection : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_projection ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , projection as _) ; } } # [doc = "The camera's size in meters measured as the diameter of the width or height, depending on [`keep_aspect`][Self::keep_aspect]. Only applicable in orthogonal and frustum modes."] # [doc = ""] # [inline] pub fn set_size (& self , size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } # [doc = "The vertical (Y) offset of the camera viewport."] # [doc = ""] # [inline] pub fn set_v_offset (& self , ofs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_v_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ofs as _) ; } } # [doc = "The distance to the far culling boundary for this camera relative to its local Z axis."] # [doc = ""] # [inline] pub fn set_zfar (& self , zfar : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_zfar ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , zfar as _) ; } } # [doc = "The distance to the near culling boundary for this camera relative to its local Z axis."] # [doc = ""] # [inline] pub fn set_znear (& self , znear : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . set_znear ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , znear as _) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the 2D coordinate in the [`Viewport`][Viewport] rectangle that maps to the given 3D point in world space.\n**Note:** When using this to position GUI elements over a 3D viewport, use [`is_position_behind`][Self::is_position_behind] to prevent them from appearing if the 3D point is behind the camera:\n```gdscript\n# This code block is part of a script that inherits from Spatial.\n# `control` is a reference to a node inheriting from Control.\ncontrol.visible = not get_viewport().get_camera().is_position_behind(global_transform.origin)\ncontrol.rect_position = get_viewport().get_camera().unproject_position(global_transform.origin)\n```"] # [doc = ""] # [inline] pub fn unproject_position (& self , world_point : Vector3) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraMethodTable :: get (get_api ()) . unproject_position ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , world_point) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for Camera { } unsafe impl GodotObject for Camera { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Camera" } } impl QueueFree for Camera { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Camera { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Camera { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for Camera { } unsafe impl SubClass < crate :: generated :: Node > for Camera { } unsafe impl SubClass < crate :: generated :: Object > for Camera { } impl Instanciable for Camera { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Camera :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CameraMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear_current : * mut sys :: godot_method_bind , pub get_camera_rid : * mut sys :: godot_method_bind , pub get_camera_transform : * mut sys :: godot_method_bind , pub get_cull_mask : * mut sys :: godot_method_bind , pub get_cull_mask_bit : * mut sys :: godot_method_bind , pub get_doppler_tracking : * mut sys :: godot_method_bind , pub get_environment : * mut sys :: godot_method_bind , pub get_fov : * mut sys :: godot_method_bind , pub get_frustum : * mut sys :: godot_method_bind , pub get_frustum_offset : * mut sys :: godot_method_bind , pub get_h_offset : * mut sys :: godot_method_bind , pub get_keep_aspect_mode : * mut sys :: godot_method_bind , pub get_projection : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_v_offset : * mut sys :: godot_method_bind , pub get_zfar : * mut sys :: godot_method_bind , pub get_znear : * mut sys :: godot_method_bind , pub is_current : * mut sys :: godot_method_bind , pub is_position_behind : * mut sys :: godot_method_bind , pub make_current : * mut sys :: godot_method_bind , pub project_local_ray_normal : * mut sys :: godot_method_bind , pub project_position : * mut sys :: godot_method_bind , pub project_ray_normal : * mut sys :: godot_method_bind , pub project_ray_origin : * mut sys :: godot_method_bind , pub set_cull_mask : * mut sys :: godot_method_bind , pub set_cull_mask_bit : * mut sys :: godot_method_bind , pub set_current : * mut sys :: godot_method_bind , pub set_doppler_tracking : * mut sys :: godot_method_bind , pub set_environment : * mut sys :: godot_method_bind , pub set_fov : * mut sys :: godot_method_bind , pub set_frustum : * mut sys :: godot_method_bind , pub set_frustum_offset : * mut sys :: godot_method_bind , pub set_h_offset : * mut sys :: godot_method_bind , pub set_keep_aspect_mode : * mut sys :: godot_method_bind , pub set_orthogonal : * mut sys :: godot_method_bind , pub set_perspective : * mut sys :: godot_method_bind , pub set_projection : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind , pub set_v_offset : * mut sys :: godot_method_bind , pub set_zfar : * mut sys :: godot_method_bind , pub set_znear : * mut sys :: godot_method_bind , pub unproject_position : * mut sys :: godot_method_bind } impl CameraMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CameraMethodTable = CameraMethodTable { class_constructor : None , clear_current : 0 as * mut sys :: godot_method_bind , get_camera_rid : 0 as * mut sys :: godot_method_bind , get_camera_transform : 0 as * mut sys :: godot_method_bind , get_cull_mask : 0 as * mut sys :: godot_method_bind , get_cull_mask_bit : 0 as * mut sys :: godot_method_bind , get_doppler_tracking : 0 as * mut sys :: godot_method_bind , get_environment : 0 as * mut sys :: godot_method_bind , get_fov : 0 as * mut sys :: godot_method_bind , get_frustum : 0 as * mut sys :: godot_method_bind , get_frustum_offset : 0 as * mut sys :: godot_method_bind , get_h_offset : 0 as * mut sys :: godot_method_bind , get_keep_aspect_mode : 0 as * mut sys :: godot_method_bind , get_projection : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_v_offset : 0 as * mut sys :: godot_method_bind , get_zfar : 0 as * mut sys :: godot_method_bind , get_znear : 0 as * mut sys :: godot_method_bind , is_current : 0 as * mut sys :: godot_method_bind , is_position_behind : 0 as * mut sys :: godot_method_bind , make_current : 0 as * mut sys :: godot_method_bind , project_local_ray_normal : 0 as * mut sys :: godot_method_bind , project_position : 0 as * mut sys :: godot_method_bind , project_ray_normal : 0 as * mut sys :: godot_method_bind , project_ray_origin : 0 as * mut sys :: godot_method_bind , set_cull_mask : 0 as * mut sys :: godot_method_bind , set_cull_mask_bit : 0 as * mut sys :: godot_method_bind , set_current : 0 as * mut sys :: godot_method_bind , set_doppler_tracking : 0 as * mut sys :: godot_method_bind , set_environment : 0 as * mut sys :: godot_method_bind , set_fov : 0 as * mut sys :: godot_method_bind , set_frustum : 0 as * mut sys :: godot_method_bind , set_frustum_offset : 0 as * mut sys :: godot_method_bind , set_h_offset : 0 as * mut sys :: godot_method_bind , set_keep_aspect_mode : 0 as * mut sys :: godot_method_bind , set_orthogonal : 0 as * mut sys :: godot_method_bind , set_perspective : 0 as * mut sys :: godot_method_bind , set_projection : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind , set_v_offset : 0 as * mut sys :: godot_method_bind , set_zfar : 0 as * mut sys :: godot_method_bind , set_znear : 0 as * mut sys :: godot_method_bind , unproject_position : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CameraMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Camera\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear_current = (gd_api . godot_method_bind_get_method) (class_name , "clear_current\0" . as_ptr () as * const c_char) ; table . get_camera_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_rid\0" . as_ptr () as * const c_char) ; table . get_camera_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_transform\0" . as_ptr () as * const c_char) ; table . get_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_cull_mask\0" . as_ptr () as * const c_char) ; table . get_cull_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_cull_mask_bit\0" . as_ptr () as * const c_char) ; table . get_doppler_tracking = (gd_api . godot_method_bind_get_method) (class_name , "get_doppler_tracking\0" . as_ptr () as * const c_char) ; table . get_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_environment\0" . as_ptr () as * const c_char) ; table . get_fov = (gd_api . godot_method_bind_get_method) (class_name , "get_fov\0" . as_ptr () as * const c_char) ; table . get_frustum = (gd_api . godot_method_bind_get_method) (class_name , "get_frustum\0" . as_ptr () as * const c_char) ; table . get_frustum_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_frustum_offset\0" . as_ptr () as * const c_char) ; table . get_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_h_offset\0" . as_ptr () as * const c_char) ; table . get_keep_aspect_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_keep_aspect_mode\0" . as_ptr () as * const c_char) ; table . get_projection = (gd_api . godot_method_bind_get_method) (class_name , "get_projection\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_v_offset\0" . as_ptr () as * const c_char) ; table . get_zfar = (gd_api . godot_method_bind_get_method) (class_name , "get_zfar\0" . as_ptr () as * const c_char) ; table . get_znear = (gd_api . godot_method_bind_get_method) (class_name , "get_znear\0" . as_ptr () as * const c_char) ; table . is_current = (gd_api . godot_method_bind_get_method) (class_name , "is_current\0" . as_ptr () as * const c_char) ; table . is_position_behind = (gd_api . godot_method_bind_get_method) (class_name , "is_position_behind\0" . as_ptr () as * const c_char) ; table . make_current = (gd_api . godot_method_bind_get_method) (class_name , "make_current\0" . as_ptr () as * const c_char) ; table . project_local_ray_normal = (gd_api . godot_method_bind_get_method) (class_name , "project_local_ray_normal\0" . as_ptr () as * const c_char) ; table . project_position = (gd_api . godot_method_bind_get_method) (class_name , "project_position\0" . as_ptr () as * const c_char) ; table . project_ray_normal = (gd_api . godot_method_bind_get_method) (class_name , "project_ray_normal\0" . as_ptr () as * const c_char) ; table . project_ray_origin = (gd_api . godot_method_bind_get_method) (class_name , "project_ray_origin\0" . as_ptr () as * const c_char) ; table . set_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mask\0" . as_ptr () as * const c_char) ; table . set_cull_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mask_bit\0" . as_ptr () as * const c_char) ; table . set_current = (gd_api . godot_method_bind_get_method) (class_name , "set_current\0" . as_ptr () as * const c_char) ; table . set_doppler_tracking = (gd_api . godot_method_bind_get_method) (class_name , "set_doppler_tracking\0" . as_ptr () as * const c_char) ; table . set_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_environment\0" . as_ptr () as * const c_char) ; table . set_fov = (gd_api . godot_method_bind_get_method) (class_name , "set_fov\0" . as_ptr () as * const c_char) ; table . set_frustum = (gd_api . godot_method_bind_get_method) (class_name , "set_frustum\0" . as_ptr () as * const c_char) ; table . set_frustum_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_frustum_offset\0" . as_ptr () as * const c_char) ; table . set_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_h_offset\0" . as_ptr () as * const c_char) ; table . set_keep_aspect_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_keep_aspect_mode\0" . as_ptr () as * const c_char) ; table . set_orthogonal = (gd_api . godot_method_bind_get_method) (class_name , "set_orthogonal\0" . as_ptr () as * const c_char) ; table . set_perspective = (gd_api . godot_method_bind_get_method) (class_name , "set_perspective\0" . as_ptr () as * const c_char) ; table . set_projection = (gd_api . godot_method_bind_get_method) (class_name , "set_projection\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; table . set_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_v_offset\0" . as_ptr () as * const c_char) ; table . set_zfar = (gd_api . godot_method_bind_get_method) (class_name , "set_zfar\0" . as_ptr () as * const c_char) ; table . set_znear = (gd_api . godot_method_bind_get_method) (class_name , "set_znear\0" . as_ptr () as * const c_char) ; table . unproject_position = (gd_api . godot_method_bind_get_method) (class_name , "unproject_position\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::camera::private::Camera;
            
            pub mod camera_2d {
                # ! [doc = "This module contains types related to the API class [`Camera2D`][super::Camera2D]."] pub (crate) mod private { # [doc = "`core class Camera2D` inherits `Node2D` (manually managed).\n\nThis class has related types in the [`camera_2d`][super::camera_2d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_camera2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Camera2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Camera2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCamera2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Camera2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Camera2D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AnchorMode (pub i64) ; impl AnchorMode { pub const FIXED_TOP_LEFT : AnchorMode = AnchorMode (0i64) ; pub const DRAG_CENTER : AnchorMode = AnchorMode (1i64) ; } impl From < i64 > for AnchorMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AnchorMode > for i64 { # [inline] fn from (v : AnchorMode) -> Self { v . 0 } } impl FromVariant for AnchorMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Camera2DProcessMode (pub i64) ; impl Camera2DProcessMode { pub const PHYSICS : Camera2DProcessMode = Camera2DProcessMode (0i64) ; pub const IDLE : Camera2DProcessMode = Camera2DProcessMode (1i64) ; } impl From < i64 > for Camera2DProcessMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Camera2DProcessMode > for i64 { # [inline] fn from (v : Camera2DProcessMode) -> Self { v . 0 } } impl FromVariant for Camera2DProcessMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Camera2D { pub const ANCHOR_MODE_FIXED_TOP_LEFT : i64 = 0i64 ; pub const CAMERA2D_PROCESS_PHYSICS : i64 = 0i64 ; pub const ANCHOR_MODE_DRAG_CENTER : i64 = 1i64 ; pub const CAMERA2D_PROCESS_IDLE : i64 = 1i64 ; } impl Camera2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Camera2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Aligns the camera to the tracked node."] # [doc = ""] # [inline] pub fn align (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . align ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes any [`Camera2D`][Camera2D] from the ancestor [`Viewport`][Viewport]'s internal currently-assigned camera."] # [doc = ""] # [inline] pub fn clear_current (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . clear_current ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Forces the camera to update scroll immediately."] # [doc = ""] # [inline] pub fn force_update_scroll (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . force_update_scroll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The Camera2D's anchor point. See [`AnchorMode`][AnchorMode] constants."] # [doc = ""] # [inline] pub fn anchor_mode (& self) -> crate :: generated :: camera_2d :: AnchorMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_anchor_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: camera_2d :: AnchorMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the camera's `position` (the tracked point the camera attempts to follow), relative to the origin.\n**Note:** The returned value is not the same as [`Node2D.position`][Node2D::position] or [`Node2D.global_position`][Node2D::global_position], as it is affected by the `drag` properties."] # [doc = ""] # [inline] pub fn get_camera_position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_camera_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the location of the [`Camera2D`][Camera2D]'s screen-center, relative to the origin.\n**Note:** The real `position` of the camera may be different, see [`get_camera_position`][Self::get_camera_position]."] # [doc = ""] # [inline] pub fn get_camera_screen_center (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_camera_screen_center ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The custom [`Viewport`][Viewport] node attached to the [`Camera2D`][Camera2D]. If `null` or not a [`Viewport`][Viewport], uses the default viewport instead."] # [doc = ""] # [inline] pub fn custom_viewport (& self) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_custom_viewport ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the specified margin. See also [`drag_margin_bottom`][Self::drag_margin_bottom], [`drag_margin_top`][Self::drag_margin_top], [`drag_margin_left`][Self::drag_margin_left], and [`drag_margin_right`][Self::drag_margin_right]."] # [doc = ""] # [inline] pub fn drag_margin (& self , margin : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_drag_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Speed in pixels per second of the camera's smoothing effect when [`smoothing_enabled`][Self::smoothing_enabled] is `true`."] # [doc = ""] # [inline] pub fn follow_smoothing (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_follow_smoothing ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The horizontal offset of the camera, relative to the drag margins.\n**Note:** Offset H is used only to force offset relative to margins. It's not updated in any way if drag margins are enabled and can be used to set initial offset."] # [doc = ""] # [inline] pub fn h_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_h_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the specified camera limit. See also [`limit_bottom`][Self::limit_bottom], [`limit_top`][Self::limit_top], [`limit_left`][Self::limit_left], and [`limit_right`][Self::limit_right]."] # [doc = ""] # [inline] pub fn limit (& self , margin : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_limit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The camera's offset, useful for looking around or camera shake animations."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The camera's process callback. See [`Camera2DProcessMode`][Camera2DProcessMode]."] # [doc = ""] # [inline] pub fn process_mode (& self) -> crate :: generated :: camera_2d :: Camera2DProcessMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_process_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: camera_2d :: Camera2DProcessMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The vertical offset of the camera, relative to the drag margins.\n**Note:** Used the same as [`offset_h`][Self::offset_h]."] # [doc = ""] # [inline] pub fn v_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_v_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The camera's zoom relative to the viewport. Values larger than `Vector2(1, 1)` zoom out and smaller values zoom in. For an example, use `Vector2(0.5, 0.5)` for a 2× zoom-in, and `Vector2(4, 4)` for a 4× zoom-out."] # [doc = ""] # [inline] pub fn zoom (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_zoom ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera `current` will disable this one."] # [doc = ""] # [inline] pub fn is_current (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_current ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the camera smoothly moves towards the target at [`smoothing_speed`][Self::smoothing_speed]."] # [doc = ""] # [inline] pub fn is_follow_smoothing_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_follow_smoothing_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the camera only moves when reaching the horizontal drag margins. If `false`, the camera moves horizontally regardless of margins."] # [doc = ""] # [inline] pub fn is_h_drag_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_h_drag_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, draws the camera's limits rectangle in the editor."] # [doc = ""] # [inline] pub fn is_limit_drawing_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_limit_drawing_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the camera smoothly stops when reaches its limits.\nThis property has no effect if [`smoothing_enabled`][Self::smoothing_enabled] is `false`.\n**Note:** To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke [`reset_smoothing`][Self::reset_smoothing]."] # [doc = ""] # [inline] pub fn is_limit_smoothing_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_limit_smoothing_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, draws the camera's drag margin rectangle in the editor."] # [doc = ""] # [inline] pub fn is_margin_drawing_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_margin_drawing_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the camera view rotates with the target."] # [doc = ""] # [inline] pub fn is_rotating (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_rotating ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, draws the camera's screen rectangle in the editor."] # [doc = ""] # [inline] pub fn is_screen_drawing_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_screen_drawing_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the camera only moves when reaching the vertical drag margins. If `false`, the camera moves vertically regardless of margins."] # [doc = ""] # [inline] pub fn is_v_drag_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . is_v_drag_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Make this the current 2D camera for the scene (viewport and layer), in case there are many cameras in the scene."] # [doc = ""] # [inline] pub fn make_current (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . make_current ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets the camera's position immediately to its current smoothing destination.\nThis method has no effect if [`smoothing_enabled`][Self::smoothing_enabled] is `false`."] # [doc = ""] # [inline] pub fn reset_smoothing (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . reset_smoothing ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The Camera2D's anchor point. See [`AnchorMode`][AnchorMode] constants."] # [doc = ""] # [inline] pub fn set_anchor_mode (& self , anchor_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_anchor_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , anchor_mode as _) ; } } # [doc = "The custom [`Viewport`][Viewport] node attached to the [`Camera2D`][Camera2D]. If `null` or not a [`Viewport`][Viewport], uses the default viewport instead."] # [doc = ""] # [inline] pub fn set_custom_viewport (& self , viewport : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_custom_viewport ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , viewport . as_arg_ptr ()) ; } } # [doc = "Sets the specified margin. See also [`drag_margin_bottom`][Self::drag_margin_bottom], [`drag_margin_top`][Self::drag_margin_top], [`drag_margin_left`][Self::drag_margin_left], and [`drag_margin_right`][Self::drag_margin_right]."] # [doc = ""] # [inline] pub fn set_drag_margin (& self , margin : i64 , drag_margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_drag_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , margin as _ , drag_margin as _) ; } } # [doc = "If `true`, the camera smoothly moves towards the target at [`smoothing_speed`][Self::smoothing_speed]."] # [doc = ""] # [inline] pub fn set_enable_follow_smoothing (& self , follow_smoothing : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_enable_follow_smoothing ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , follow_smoothing as _) ; } } # [doc = "Speed in pixels per second of the camera's smoothing effect when [`smoothing_enabled`][Self::smoothing_enabled] is `true`."] # [doc = ""] # [inline] pub fn set_follow_smoothing (& self , follow_smoothing : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_follow_smoothing ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , follow_smoothing as _) ; } } # [doc = "If `true`, the camera only moves when reaching the horizontal drag margins. If `false`, the camera moves horizontally regardless of margins."] # [doc = ""] # [inline] pub fn set_h_drag_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_h_drag_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The horizontal offset of the camera, relative to the drag margins.\n**Note:** Offset H is used only to force offset relative to margins. It's not updated in any way if drag margins are enabled and can be used to set initial offset."] # [doc = ""] # [inline] pub fn set_h_offset (& self , ofs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_h_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ofs as _) ; } } # [doc = "Sets the specified camera limit. See also [`limit_bottom`][Self::limit_bottom], [`limit_top`][Self::limit_top], [`limit_left`][Self::limit_left], and [`limit_right`][Self::limit_right]."] # [doc = ""] # [inline] pub fn set_limit (& self , margin : i64 , limit : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_limit ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , margin as _ , limit as _) ; } } # [doc = "If `true`, draws the camera's limits rectangle in the editor."] # [doc = ""] # [inline] pub fn set_limit_drawing_enabled (& self , limit_drawing_enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_limit_drawing_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , limit_drawing_enabled as _) ; } } # [doc = "If `true`, the camera smoothly stops when reaches its limits.\nThis property has no effect if [`smoothing_enabled`][Self::smoothing_enabled] is `false`.\n**Note:** To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke [`reset_smoothing`][Self::reset_smoothing]."] # [doc = ""] # [inline] pub fn set_limit_smoothing_enabled (& self , limit_smoothing_enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_limit_smoothing_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , limit_smoothing_enabled as _) ; } } # [doc = "If `true`, draws the camera's drag margin rectangle in the editor."] # [doc = ""] # [inline] pub fn set_margin_drawing_enabled (& self , margin_drawing_enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_margin_drawing_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , margin_drawing_enabled as _) ; } } # [doc = "The camera's offset, useful for looking around or camera shake animations."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The camera's process callback. See [`Camera2DProcessMode`][Camera2DProcessMode]."] # [doc = ""] # [inline] pub fn set_process_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_process_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "If `true`, the camera view rotates with the target."] # [doc = ""] # [inline] pub fn set_rotating (& self , rotating : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_rotating ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , rotating as _) ; } } # [doc = "If `true`, draws the camera's screen rectangle in the editor."] # [doc = ""] # [inline] pub fn set_screen_drawing_enabled (& self , screen_drawing_enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_screen_drawing_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , screen_drawing_enabled as _) ; } } # [doc = "If `true`, the camera only moves when reaching the vertical drag margins. If `false`, the camera moves vertically regardless of margins."] # [doc = ""] # [inline] pub fn set_v_drag_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_v_drag_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The vertical offset of the camera, relative to the drag margins.\n**Note:** Used the same as [`offset_h`][Self::offset_h]."] # [doc = ""] # [inline] pub fn set_v_offset (& self , ofs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_v_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ofs as _) ; } } # [doc = "The camera's zoom relative to the viewport. Values larger than `Vector2(1, 1)` zoom out and smaller values zoom in. For an example, use `Vector2(0.5, 0.5)` for a 2× zoom-in, and `Vector2(4, 4)` for a 4× zoom-out."] # [doc = ""] # [inline] pub fn set_zoom (& self , zoom : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_zoom ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , zoom) ; } } # [doc = "Bottom margin needed to drag the camera. A value of `1` makes the camera move only when reaching the edge of the screen."] # [doc = ""] # [inline] pub fn drag_margin_bottom (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_drag_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Bottom margin needed to drag the camera. A value of `1` makes the camera move only when reaching the edge of the screen."] # [doc = ""] # [inline] pub fn set_drag_margin_bottom (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_drag_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Left margin needed to drag the camera. A value of `1` makes the camera move only when reaching the edge of the screen."] # [doc = ""] # [inline] pub fn drag_margin_left (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_drag_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Left margin needed to drag the camera. A value of `1` makes the camera move only when reaching the edge of the screen."] # [doc = ""] # [inline] pub fn set_drag_margin_left (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_drag_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "Right margin needed to drag the camera. A value of `1` makes the camera move only when reaching the edge of the screen."] # [doc = ""] # [inline] pub fn drag_margin_right (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_drag_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Right margin needed to drag the camera. A value of `1` makes the camera move only when reaching the edge of the screen."] # [doc = ""] # [inline] pub fn set_drag_margin_right (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_drag_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Top margin needed to drag the camera. A value of `1` makes the camera move only when reaching the edge of the screen."] # [doc = ""] # [inline] pub fn drag_margin_top (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_drag_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Top margin needed to drag the camera. A value of `1` makes the camera move only when reaching the edge of the screen."] # [doc = ""] # [inline] pub fn set_drag_margin_top (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_drag_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Bottom scroll limit in pixels. The camera stops moving when reaching this value."] # [doc = ""] # [inline] pub fn limit_bottom (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_limit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Bottom scroll limit in pixels. The camera stops moving when reaching this value."] # [doc = ""] # [inline] pub fn set_limit_bottom (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_limit ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Left scroll limit in pixels. The camera stops moving when reaching this value."] # [doc = ""] # [inline] pub fn limit_left (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_limit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Left scroll limit in pixels. The camera stops moving when reaching this value."] # [doc = ""] # [inline] pub fn set_limit_left (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_limit ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "Right scroll limit in pixels. The camera stops moving when reaching this value."] # [doc = ""] # [inline] pub fn limit_right (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_limit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Right scroll limit in pixels. The camera stops moving when reaching this value."] # [doc = ""] # [inline] pub fn set_limit_right (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_limit ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Top scroll limit in pixels. The camera stops moving when reaching this value."] # [doc = ""] # [inline] pub fn limit_top (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . get_limit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Top scroll limit in pixels. The camera stops moving when reaching this value."] # [doc = ""] # [inline] pub fn set_limit_top (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = Camera2DMethodTable :: get (get_api ()) . set_limit ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Camera2D { } unsafe impl GodotObject for Camera2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Camera2D" } } impl QueueFree for Camera2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Camera2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Camera2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for Camera2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Camera2D { } unsafe impl SubClass < crate :: generated :: Node > for Camera2D { } unsafe impl SubClass < crate :: generated :: Object > for Camera2D { } impl Instanciable for Camera2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Camera2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Camera2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub align : * mut sys :: godot_method_bind , pub clear_current : * mut sys :: godot_method_bind , pub force_update_scroll : * mut sys :: godot_method_bind , pub get_anchor_mode : * mut sys :: godot_method_bind , pub get_camera_position : * mut sys :: godot_method_bind , pub get_camera_screen_center : * mut sys :: godot_method_bind , pub get_custom_viewport : * mut sys :: godot_method_bind , pub get_drag_margin : * mut sys :: godot_method_bind , pub get_follow_smoothing : * mut sys :: godot_method_bind , pub get_h_offset : * mut sys :: godot_method_bind , pub get_limit : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_process_mode : * mut sys :: godot_method_bind , pub get_v_offset : * mut sys :: godot_method_bind , pub get_zoom : * mut sys :: godot_method_bind , pub is_current : * mut sys :: godot_method_bind , pub is_follow_smoothing_enabled : * mut sys :: godot_method_bind , pub is_h_drag_enabled : * mut sys :: godot_method_bind , pub is_limit_drawing_enabled : * mut sys :: godot_method_bind , pub is_limit_smoothing_enabled : * mut sys :: godot_method_bind , pub is_margin_drawing_enabled : * mut sys :: godot_method_bind , pub is_rotating : * mut sys :: godot_method_bind , pub is_screen_drawing_enabled : * mut sys :: godot_method_bind , pub is_v_drag_enabled : * mut sys :: godot_method_bind , pub make_current : * mut sys :: godot_method_bind , pub reset_smoothing : * mut sys :: godot_method_bind , pub set_anchor_mode : * mut sys :: godot_method_bind , pub set_custom_viewport : * mut sys :: godot_method_bind , pub set_drag_margin : * mut sys :: godot_method_bind , pub set_enable_follow_smoothing : * mut sys :: godot_method_bind , pub set_follow_smoothing : * mut sys :: godot_method_bind , pub set_h_drag_enabled : * mut sys :: godot_method_bind , pub set_h_offset : * mut sys :: godot_method_bind , pub set_limit : * mut sys :: godot_method_bind , pub set_limit_drawing_enabled : * mut sys :: godot_method_bind , pub set_limit_smoothing_enabled : * mut sys :: godot_method_bind , pub set_margin_drawing_enabled : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_process_mode : * mut sys :: godot_method_bind , pub set_rotating : * mut sys :: godot_method_bind , pub set_screen_drawing_enabled : * mut sys :: godot_method_bind , pub set_v_drag_enabled : * mut sys :: godot_method_bind , pub set_v_offset : * mut sys :: godot_method_bind , pub set_zoom : * mut sys :: godot_method_bind } impl Camera2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Camera2DMethodTable = Camera2DMethodTable { class_constructor : None , align : 0 as * mut sys :: godot_method_bind , clear_current : 0 as * mut sys :: godot_method_bind , force_update_scroll : 0 as * mut sys :: godot_method_bind , get_anchor_mode : 0 as * mut sys :: godot_method_bind , get_camera_position : 0 as * mut sys :: godot_method_bind , get_camera_screen_center : 0 as * mut sys :: godot_method_bind , get_custom_viewport : 0 as * mut sys :: godot_method_bind , get_drag_margin : 0 as * mut sys :: godot_method_bind , get_follow_smoothing : 0 as * mut sys :: godot_method_bind , get_h_offset : 0 as * mut sys :: godot_method_bind , get_limit : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_process_mode : 0 as * mut sys :: godot_method_bind , get_v_offset : 0 as * mut sys :: godot_method_bind , get_zoom : 0 as * mut sys :: godot_method_bind , is_current : 0 as * mut sys :: godot_method_bind , is_follow_smoothing_enabled : 0 as * mut sys :: godot_method_bind , is_h_drag_enabled : 0 as * mut sys :: godot_method_bind , is_limit_drawing_enabled : 0 as * mut sys :: godot_method_bind , is_limit_smoothing_enabled : 0 as * mut sys :: godot_method_bind , is_margin_drawing_enabled : 0 as * mut sys :: godot_method_bind , is_rotating : 0 as * mut sys :: godot_method_bind , is_screen_drawing_enabled : 0 as * mut sys :: godot_method_bind , is_v_drag_enabled : 0 as * mut sys :: godot_method_bind , make_current : 0 as * mut sys :: godot_method_bind , reset_smoothing : 0 as * mut sys :: godot_method_bind , set_anchor_mode : 0 as * mut sys :: godot_method_bind , set_custom_viewport : 0 as * mut sys :: godot_method_bind , set_drag_margin : 0 as * mut sys :: godot_method_bind , set_enable_follow_smoothing : 0 as * mut sys :: godot_method_bind , set_follow_smoothing : 0 as * mut sys :: godot_method_bind , set_h_drag_enabled : 0 as * mut sys :: godot_method_bind , set_h_offset : 0 as * mut sys :: godot_method_bind , set_limit : 0 as * mut sys :: godot_method_bind , set_limit_drawing_enabled : 0 as * mut sys :: godot_method_bind , set_limit_smoothing_enabled : 0 as * mut sys :: godot_method_bind , set_margin_drawing_enabled : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_process_mode : 0 as * mut sys :: godot_method_bind , set_rotating : 0 as * mut sys :: godot_method_bind , set_screen_drawing_enabled : 0 as * mut sys :: godot_method_bind , set_v_drag_enabled : 0 as * mut sys :: godot_method_bind , set_v_offset : 0 as * mut sys :: godot_method_bind , set_zoom : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Camera2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Camera2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . align = (gd_api . godot_method_bind_get_method) (class_name , "align\0" . as_ptr () as * const c_char) ; table . clear_current = (gd_api . godot_method_bind_get_method) (class_name , "clear_current\0" . as_ptr () as * const c_char) ; table . force_update_scroll = (gd_api . godot_method_bind_get_method) (class_name , "force_update_scroll\0" . as_ptr () as * const c_char) ; table . get_anchor_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_anchor_mode\0" . as_ptr () as * const c_char) ; table . get_camera_position = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_position\0" . as_ptr () as * const c_char) ; table . get_camera_screen_center = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_screen_center\0" . as_ptr () as * const c_char) ; table . get_custom_viewport = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_viewport\0" . as_ptr () as * const c_char) ; table . get_drag_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_drag_margin\0" . as_ptr () as * const c_char) ; table . get_follow_smoothing = (gd_api . godot_method_bind_get_method) (class_name , "get_follow_smoothing\0" . as_ptr () as * const c_char) ; table . get_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_h_offset\0" . as_ptr () as * const c_char) ; table . get_limit = (gd_api . godot_method_bind_get_method) (class_name , "get_limit\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_process_mode\0" . as_ptr () as * const c_char) ; table . get_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_v_offset\0" . as_ptr () as * const c_char) ; table . get_zoom = (gd_api . godot_method_bind_get_method) (class_name , "get_zoom\0" . as_ptr () as * const c_char) ; table . is_current = (gd_api . godot_method_bind_get_method) (class_name , "is_current\0" . as_ptr () as * const c_char) ; table . is_follow_smoothing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_follow_smoothing_enabled\0" . as_ptr () as * const c_char) ; table . is_h_drag_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_h_drag_enabled\0" . as_ptr () as * const c_char) ; table . is_limit_drawing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_limit_drawing_enabled\0" . as_ptr () as * const c_char) ; table . is_limit_smoothing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_limit_smoothing_enabled\0" . as_ptr () as * const c_char) ; table . is_margin_drawing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_margin_drawing_enabled\0" . as_ptr () as * const c_char) ; table . is_rotating = (gd_api . godot_method_bind_get_method) (class_name , "is_rotating\0" . as_ptr () as * const c_char) ; table . is_screen_drawing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_screen_drawing_enabled\0" . as_ptr () as * const c_char) ; table . is_v_drag_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_v_drag_enabled\0" . as_ptr () as * const c_char) ; table . make_current = (gd_api . godot_method_bind_get_method) (class_name , "make_current\0" . as_ptr () as * const c_char) ; table . reset_smoothing = (gd_api . godot_method_bind_get_method) (class_name , "reset_smoothing\0" . as_ptr () as * const c_char) ; table . set_anchor_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_anchor_mode\0" . as_ptr () as * const c_char) ; table . set_custom_viewport = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_viewport\0" . as_ptr () as * const c_char) ; table . set_drag_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_margin\0" . as_ptr () as * const c_char) ; table . set_enable_follow_smoothing = (gd_api . godot_method_bind_get_method) (class_name , "set_enable_follow_smoothing\0" . as_ptr () as * const c_char) ; table . set_follow_smoothing = (gd_api . godot_method_bind_get_method) (class_name , "set_follow_smoothing\0" . as_ptr () as * const c_char) ; table . set_h_drag_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_h_drag_enabled\0" . as_ptr () as * const c_char) ; table . set_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_h_offset\0" . as_ptr () as * const c_char) ; table . set_limit = (gd_api . godot_method_bind_get_method) (class_name , "set_limit\0" . as_ptr () as * const c_char) ; table . set_limit_drawing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_limit_drawing_enabled\0" . as_ptr () as * const c_char) ; table . set_limit_smoothing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_limit_smoothing_enabled\0" . as_ptr () as * const c_char) ; table . set_margin_drawing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_margin_drawing_enabled\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_process_mode\0" . as_ptr () as * const c_char) ; table . set_rotating = (gd_api . godot_method_bind_get_method) (class_name , "set_rotating\0" . as_ptr () as * const c_char) ; table . set_screen_drawing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_screen_drawing_enabled\0" . as_ptr () as * const c_char) ; table . set_v_drag_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_v_drag_enabled\0" . as_ptr () as * const c_char) ; table . set_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_v_offset\0" . as_ptr () as * const c_char) ; table . set_zoom = (gd_api . godot_method_bind_get_method) (class_name , "set_zoom\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::camera_2d::private::Camera2D;
            
            pub mod camera_feed {
                # ! [doc = "This module contains types related to the API class [`CameraFeed`][super::CameraFeed]."] pub (crate) mod private { # [doc = "`core class CameraFeed` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`camera_feed`][super::camera_feed] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_camerafeed.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCameraFeed inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CameraFeed { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CameraFeed ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct FeedDataType (pub i64) ; impl FeedDataType { pub const NOIMAGE : FeedDataType = FeedDataType (0i64) ; pub const RGB : FeedDataType = FeedDataType (1i64) ; pub const YCBCR : FeedDataType = FeedDataType (2i64) ; pub const YCBCR_SEP : FeedDataType = FeedDataType (3i64) ; } impl From < i64 > for FeedDataType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < FeedDataType > for i64 { # [inline] fn from (v : FeedDataType) -> Self { v . 0 } } impl FromVariant for FeedDataType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct FeedPosition (pub i64) ; impl FeedPosition { pub const UNSPECIFIED : FeedPosition = FeedPosition (0i64) ; pub const FRONT : FeedPosition = FeedPosition (1i64) ; pub const BACK : FeedPosition = FeedPosition (2i64) ; } impl From < i64 > for FeedPosition { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < FeedPosition > for i64 { # [inline] fn from (v : FeedPosition) -> Self { v . 0 } } impl FromVariant for FeedPosition { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CameraFeed { pub const FEED_NOIMAGE : i64 = 0i64 ; pub const FEED_UNSPECIFIED : i64 = 0i64 ; pub const FEED_FRONT : i64 = 1i64 ; pub const FEED_RGB : i64 = 1i64 ; pub const FEED_BACK : i64 = 2i64 ; pub const FEED_YCBCR : i64 = 2i64 ; pub const FEED_YCBCR_SEP : i64 = 3i64 ; } impl CameraFeed { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CameraFeedMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the unique ID for this feed."] # [doc = ""] # [inline] pub fn get_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraFeedMethodTable :: get (get_api ()) . get_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the camera's name."] # [doc = ""] # [inline] pub fn get_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraFeedMethodTable :: get (get_api ()) . get_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position of camera on the device."] # [doc = ""] # [inline] pub fn get_position (& self) -> crate :: generated :: camera_feed :: FeedPosition { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraFeedMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: camera_feed :: FeedPosition > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The transform applied to the camera's image."] # [doc = ""] # [inline] pub fn transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraFeedMethodTable :: get (get_api ()) . get_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the feed is active."] # [doc = ""] # [inline] pub fn is_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraFeedMethodTable :: get (get_api ()) . is_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the feed is active."] # [doc = ""] # [inline] pub fn set_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraFeedMethodTable :: get (get_api ()) . set_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , active as _) ; } } # [doc = "The transform applied to the camera's image."] # [doc = ""] # [inline] pub fn set_transform (& self , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraFeedMethodTable :: get (get_api ()) . set_transform ; let ret = crate :: icalls :: icallvar__trans2D (method_bind , self . this . sys () . as_ptr () , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CameraFeed { } unsafe impl GodotObject for CameraFeed { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CameraFeed" } } impl std :: ops :: Deref for CameraFeed { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CameraFeed { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for CameraFeed { } unsafe impl SubClass < crate :: generated :: Object > for CameraFeed { } impl Instanciable for CameraFeed { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CameraFeed :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CameraFeedMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_id : * mut sys :: godot_method_bind , pub get_name : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub get_transform : * mut sys :: godot_method_bind , pub is_active : * mut sys :: godot_method_bind , pub set_active : * mut sys :: godot_method_bind , pub set_transform : * mut sys :: godot_method_bind } impl CameraFeedMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CameraFeedMethodTable = CameraFeedMethodTable { class_constructor : None , get_id : 0 as * mut sys :: godot_method_bind , get_name : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , get_transform : 0 as * mut sys :: godot_method_bind , is_active : 0 as * mut sys :: godot_method_bind , set_active : 0 as * mut sys :: godot_method_bind , set_transform : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CameraFeedMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CameraFeed\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_id = (gd_api . godot_method_bind_get_method) (class_name , "get_id\0" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\0" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\0" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::camera_feed::private::CameraFeed;
            
            pub mod camera_server {
                # ! [doc = "This module contains types related to the API class [`CameraServer`][super::CameraServer]."] pub (crate) mod private { # [doc = "`core singleton class CameraServer` inherits `Object` (manually managed).\n\nThis class has related types in the [`camera_server`][super::camera_server] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_cameraserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nCameraServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CameraServer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CameraServer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct FeedImage (pub i64) ; impl FeedImage { pub const RGBA_IMAGE : FeedImage = FeedImage (0i64) ; pub const YCBCR_IMAGE : FeedImage = FeedImage (0i64) ; pub const Y_IMAGE : FeedImage = FeedImage (0i64) ; pub const CBCR_IMAGE : FeedImage = FeedImage (1i64) ; } impl From < i64 > for FeedImage { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < FeedImage > for i64 { # [inline] fn from (v : FeedImage) -> Self { v . 0 } } impl FromVariant for FeedImage { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CameraServer { pub const FEED_RGBA_IMAGE : i64 = 0i64 ; pub const FEED_YCBCR_IMAGE : i64 = 0i64 ; pub const FEED_Y_IMAGE : i64 = 0i64 ; pub const FEED_CBCR_IMAGE : i64 = 1i64 ; } impl CameraServer { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("CameraServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Adds the camera `feed` to the camera server."] # [doc = ""] # [inline] pub fn add_feed (& self , feed : impl AsArg < crate :: generated :: CameraFeed >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraServerMethodTable :: get (get_api ()) . add_feed ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , feed . as_arg_ptr ()) ; } } # [doc = "Returns an array of [`CameraFeed`][CameraFeed]s."] # [doc = ""] # [inline] pub fn feeds (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraServerMethodTable :: get (get_api ()) . feeds ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`CameraFeed`][CameraFeed] corresponding to the camera with the given `index`."] # [doc = ""] # [inline] pub fn get_feed (& self , index : i64) -> Option < Ref < crate :: generated :: CameraFeed , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraServerMethodTable :: get (get_api ()) . get_feed ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; < Option < Ref < crate :: generated :: CameraFeed , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of [`CameraFeed`][CameraFeed]s registered."] # [doc = ""] # [inline] pub fn get_feed_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraServerMethodTable :: get (get_api ()) . get_feed_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Removes the specified camera `feed`."] # [doc = ""] # [inline] pub fn remove_feed (& self , feed : impl AsArg < crate :: generated :: CameraFeed >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraServerMethodTable :: get (get_api ()) . remove_feed ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , feed . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CameraServer { } unsafe impl GodotObject for CameraServer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CameraServer" } } impl std :: ops :: Deref for CameraServer { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CameraServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for CameraServer { } unsafe impl Send for CameraServer { } unsafe impl Sync for CameraServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CameraServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_feed : * mut sys :: godot_method_bind , pub feeds : * mut sys :: godot_method_bind , pub get_feed : * mut sys :: godot_method_bind , pub get_feed_count : * mut sys :: godot_method_bind , pub remove_feed : * mut sys :: godot_method_bind } impl CameraServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CameraServerMethodTable = CameraServerMethodTable { class_constructor : None , add_feed : 0 as * mut sys :: godot_method_bind , feeds : 0 as * mut sys :: godot_method_bind , get_feed : 0 as * mut sys :: godot_method_bind , get_feed_count : 0 as * mut sys :: godot_method_bind , remove_feed : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CameraServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CameraServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_feed = (gd_api . godot_method_bind_get_method) (class_name , "add_feed\0" . as_ptr () as * const c_char) ; table . feeds = (gd_api . godot_method_bind_get_method) (class_name , "feeds\0" . as_ptr () as * const c_char) ; table . get_feed = (gd_api . godot_method_bind_get_method) (class_name , "get_feed\0" . as_ptr () as * const c_char) ; table . get_feed_count = (gd_api . godot_method_bind_get_method) (class_name , "get_feed_count\0" . as_ptr () as * const c_char) ; table . remove_feed = (gd_api . godot_method_bind_get_method) (class_name , "remove_feed\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::camera_server::private::CameraServer;
            
            pub(crate) mod camera_texture {
                # ! [doc = "This module contains types related to the API class [`CameraTexture`][super::CameraTexture]."] pub (crate) mod private { # [doc = "`core class CameraTexture` inherits `Texture` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_cameratexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCameraTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CameraTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CameraTexture ; impl CameraTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CameraTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Convenience property that gives access to the active property of the [`CameraFeed`][CameraFeed]."] # [doc = ""] # [inline] pub fn camera_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraTextureMethodTable :: get (get_api ()) . get_camera_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The ID of the [`CameraFeed`][CameraFeed] for which we want to display the image."] # [doc = ""] # [inline] pub fn camera_feed_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraTextureMethodTable :: get (get_api ()) . get_camera_feed_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Which image within the [`CameraFeed`][CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component."] # [doc = ""] # [inline] pub fn which_feed (& self) -> crate :: generated :: camera_server :: FeedImage { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraTextureMethodTable :: get (get_api ()) . get_which_feed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: camera_server :: FeedImage > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Convenience property that gives access to the active property of the [`CameraFeed`][CameraFeed]."] # [doc = ""] # [inline] pub fn set_camera_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraTextureMethodTable :: get (get_api ()) . set_camera_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , active as _) ; } } # [doc = "The ID of the [`CameraFeed`][CameraFeed] for which we want to display the image."] # [doc = ""] # [inline] pub fn set_camera_feed_id (& self , feed_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraTextureMethodTable :: get (get_api ()) . set_camera_feed_id ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , feed_id as _) ; } } # [doc = "Which image within the [`CameraFeed`][CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component."] # [doc = ""] # [inline] pub fn set_which_feed (& self , which_feed : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CameraTextureMethodTable :: get (get_api ()) . set_which_feed ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , which_feed as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CameraTexture { } unsafe impl GodotObject for CameraTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CameraTexture" } } impl std :: ops :: Deref for CameraTexture { type Target = crate :: generated :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CameraTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Texture > for CameraTexture { } unsafe impl SubClass < crate :: generated :: Resource > for CameraTexture { } unsafe impl SubClass < crate :: generated :: Reference > for CameraTexture { } unsafe impl SubClass < crate :: generated :: Object > for CameraTexture { } impl Instanciable for CameraTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CameraTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CameraTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_camera_active : * mut sys :: godot_method_bind , pub get_camera_feed_id : * mut sys :: godot_method_bind , pub get_which_feed : * mut sys :: godot_method_bind , pub set_camera_active : * mut sys :: godot_method_bind , pub set_camera_feed_id : * mut sys :: godot_method_bind , pub set_which_feed : * mut sys :: godot_method_bind } impl CameraTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CameraTextureMethodTable = CameraTextureMethodTable { class_constructor : None , get_camera_active : 0 as * mut sys :: godot_method_bind , get_camera_feed_id : 0 as * mut sys :: godot_method_bind , get_which_feed : 0 as * mut sys :: godot_method_bind , set_camera_active : 0 as * mut sys :: godot_method_bind , set_camera_feed_id : 0 as * mut sys :: godot_method_bind , set_which_feed : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CameraTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CameraTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_camera_active = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_active\0" . as_ptr () as * const c_char) ; table . get_camera_feed_id = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_feed_id\0" . as_ptr () as * const c_char) ; table . get_which_feed = (gd_api . godot_method_bind_get_method) (class_name , "get_which_feed\0" . as_ptr () as * const c_char) ; table . set_camera_active = (gd_api . godot_method_bind_get_method) (class_name , "set_camera_active\0" . as_ptr () as * const c_char) ; table . set_camera_feed_id = (gd_api . godot_method_bind_get_method) (class_name , "set_camera_feed_id\0" . as_ptr () as * const c_char) ; table . set_which_feed = (gd_api . godot_method_bind_get_method) (class_name , "set_which_feed\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::camera_texture::private::CameraTexture;
            
            pub mod canvas_item {
                # ! [doc = "This module contains types related to the API class [`CanvasItem`][super::CanvasItem]."] pub (crate) mod private { # [doc = "`core class CanvasItem` inherits `Node` (manually managed).\n\nThis class has related types in the [`canvas_item`][super::canvas_item] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_canvasitem.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nCanvasItem inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CanvasItem { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CanvasItem ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BlendMode (pub i64) ; impl BlendMode { pub const MIX : BlendMode = BlendMode (0i64) ; pub const ADD : BlendMode = BlendMode (1i64) ; pub const SUB : BlendMode = BlendMode (2i64) ; pub const MUL : BlendMode = BlendMode (3i64) ; pub const PREMULT_ALPHA : BlendMode = BlendMode (4i64) ; pub const DISABLED : BlendMode = BlendMode (5i64) ; } impl From < i64 > for BlendMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BlendMode > for i64 { # [inline] fn from (v : BlendMode) -> Self { v . 0 } } impl FromVariant for BlendMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CanvasItem { pub const BLEND_MODE_MIX : i64 = 0i64 ; pub const BLEND_MODE_ADD : i64 = 1i64 ; pub const BLEND_MODE_SUB : i64 = 2i64 ; pub const BLEND_MODE_MUL : i64 = 3i64 ; pub const BLEND_MODE_PREMULT_ALPHA : i64 = 4i64 ; pub const BLEND_MODE_DISABLED : i64 = 5i64 ; pub const NOTIFICATION_DRAW : i64 = 30i64 ; pub const NOTIFICATION_VISIBILITY_CHANGED : i64 = 31i64 ; pub const NOTIFICATION_ENTER_CANVAS : i64 = 32i64 ; pub const NOTIFICATION_EXIT_CANVAS : i64 = 33i64 ; pub const NOTIFICATION_LOCAL_TRANSFORM_CHANGED : i64 = 35i64 ; pub const NOTIFICATION_TRANSFORM_CHANGED : i64 = 2000i64 ; } impl CanvasItem { # [doc = "Draws a unfilled arc between the given angles. The larger the value of `point_count`, the smoother the curve. See also [`draw_circle`][Self::draw_circle].\n**Note:** Line drawing is not accelerated by batching if `antialiased` is `true`.\n**Note:** Due to how it works, built-in antialiasing will not look correct for translucent lines and may not work on certain platforms. As a workaround, install the [Antialiased Line2D](https://github.com/godot-extended-libraries/godot-antialiased-line2d) add-on then create an AntialiasedRegularPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing. 2D batching is also still supported with those antialiased lines.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn draw_arc (& self , center : Vector2 , radius : f64 , start_angle : f64 , end_angle : f64 , point_count : i64 , color : Color , width : f64 , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_arc ; let ret = crate :: icalls :: icallvar__vec2_f64_f64_f64_i64_color_f64_bool (method_bind , self . this . sys () . as_ptr () , center , radius as _ , start_angle as _ , end_angle as _ , point_count as _ , color , width as _ , antialiased as _) ; } } # [doc = "Draws a string character using a custom font. Returns the advance, depending on the character width and kerning with an optional next character.\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`"] # [doc = ""] # [inline] pub fn draw_char (& self , font : impl AsArg < crate :: generated :: Font > , position : Vector2 , char : impl Into < GodotString > , next : impl Into < GodotString > , modulate : Color) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_char ; let ret = crate :: icalls :: icallvar__obj_vec2_str_str_color (method_bind , self . this . sys () . as_ptr () , font . as_arg_ptr () , position , char . into () , next . into () , modulate) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Draws a colored, filled circle. See also [`draw_arc`][Self::draw_arc], [`draw_polyline`][Self::draw_polyline] and [`draw_polygon`][Self::draw_polygon].\n**Note:** Built-in antialiasing is not provided for [`draw_circle`][Self::draw_circle]. As a workaround, install the [Antialiased Line2D](https://github.com/godot-extended-libraries/godot-antialiased-line2d) add-on then create an AntialiasedRegularPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing."] # [doc = ""] # [inline] pub fn draw_circle (& self , position : Vector2 , radius : f64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_circle ; let ret = crate :: icalls :: icallvar__vec2_f64_color (method_bind , self . this . sys () . as_ptr () , position , radius as _ , color) ; } } # [doc = "Draws a colored polygon of any amount of points, convex or concave. Unlike [`draw_polygon`][Self::draw_polygon], a single color must be specified for the whole polygon.\n**Note:** Due to how it works, built-in antialiasing will not look correct for translucent polygons and may not work on certain platforms. As a workaround, install the [Antialiased Line2D](https://github.com/godot-extended-libraries/godot-antialiased-line2d) add-on then create an AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing.\n# Default Arguments\n* `uvs` - `PoolVector2Array(  )`\n* `texture` - `null`\n* `normal_map` - `null`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn draw_colored_polygon (& self , points : PoolArray < Vector2 > , color : Color , uvs : PoolArray < Vector2 > , texture : impl AsArg < crate :: generated :: Texture > , normal_map : impl AsArg < crate :: generated :: Texture > , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_colored_polygon ; let ret = crate :: icalls :: icallvar__vec2arr_color_vec2arr_obj_obj_bool (method_bind , self . this . sys () . as_ptr () , points , color , uvs , texture . as_arg_ptr () , normal_map . as_arg_ptr () , antialiased as _) ; } } # [doc = "Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. See also [`draw_multiline`][Self::draw_multiline] and [`draw_polyline`][Self::draw_polyline].\n**Note:** Line drawing is not accelerated by batching if `antialiased` is `true`.\n**Note:** Due to how it works, built-in antialiasing will not look correct for translucent lines and may not work on certain platforms. As a workaround, install the [Antialiased Line2D](https://github.com/godot-extended-libraries/godot-antialiased-line2d) add-on then create an AntialiasedLine2D node. That node relies on a texture with custom mipmaps to perform antialiasing. 2D batching is also still supported with those antialiased lines.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn draw_line (& self , from : Vector2 , to : Vector2 , color : Color , width : f64 , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_line ; let ret = crate :: icalls :: icallvar__vec2_vec2_color_f64_bool (method_bind , self . this . sys () . as_ptr () , from , to , color , width as _ , antialiased as _) ; } } # [doc = "Draws a [`Mesh`][Mesh] in 2D, using the provided texture. See [`MeshInstance2D`][MeshInstance2D] for related documentation.\n# Default Arguments\n* `normal_map` - `null`\n* `transform` - `Transform2D( 1, 0, 0, 1, 0, 0 )`\n* `modulate` - `Color( 1, 1, 1, 1 )`"] # [doc = ""] # [inline] pub fn draw_mesh (& self , mesh : impl AsArg < crate :: generated :: Mesh > , texture : impl AsArg < crate :: generated :: Texture > , normal_map : impl AsArg < crate :: generated :: Texture > , transform : Transform2D , modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_mesh ; let ret = crate :: icalls :: icallvar__obj_obj_obj_trans2D_color (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr () , texture . as_arg_ptr () , normal_map . as_arg_ptr () , transform , modulate) ; } } # [doc = "Draws multiple disconnected lines with a uniform `color`. When drawing large amounts of lines, this is faster than using individual [`draw_line`][Self::draw_line] calls. To draw interconnected lines, use [`draw_polyline`][Self::draw_polyline] instead.\n**Note:** `width` and `antialiased` are currently not implemented and have no effect. As a workaround, install the [Antialiased Line2D](https://github.com/godot-extended-libraries/godot-antialiased-line2d) add-on then create an AntialiasedLine2D node. That node relies on a texture with custom mipmaps to perform antialiasing. 2D batching is also still supported with those antialiased lines.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn draw_multiline (& self , points : PoolArray < Vector2 > , color : Color , width : f64 , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_multiline ; let ret = crate :: icalls :: icallvar__vec2arr_color_f64_bool (method_bind , self . this . sys () . as_ptr () , points , color , width as _ , antialiased as _) ; } } # [doc = "Draws multiple disconnected lines with a uniform `width` and segment-by-segment coloring. Colors assigned to line segments match by index between `points` and `colors`. When drawing large amounts of lines, this is faster than using individual [`draw_line`][Self::draw_line] calls. To draw interconnected lines, use [`draw_polyline_colors`][Self::draw_polyline_colors] instead.\n**Note:** `width` and `antialiased` are currently not implemented and have no effect. As a workaround, install the [Antialiased Line2D](https://github.com/godot-extended-libraries/godot-antialiased-line2d) add-on then create an AntialiasedLine2D node. That node relies on a texture with custom mipmaps to perform antialiasing. 2D batching is also still supported with those antialiased lines.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn draw_multiline_colors (& self , points : PoolArray < Vector2 > , colors : PoolArray < Color > , width : f64 , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_multiline_colors ; let ret = crate :: icalls :: icallvar__vec2arr_colorarr_f64_bool (method_bind , self . this . sys () . as_ptr () , points , colors , width as _ , antialiased as _) ; } } # [doc = "Draws a [`MultiMesh`][MultiMesh] in 2D with the provided texture. See [`MultiMeshInstance2D`][MultiMeshInstance2D] for related documentation.\n# Default Arguments\n* `normal_map` - `null`"] # [doc = ""] # [inline] pub fn draw_multimesh (& self , multimesh : impl AsArg < crate :: generated :: MultiMesh > , texture : impl AsArg < crate :: generated :: Texture > , normal_map : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_multimesh ; let ret = crate :: icalls :: icallvar__obj_obj_obj (method_bind , self . this . sys () . as_ptr () , multimesh . as_arg_ptr () , texture . as_arg_ptr () , normal_map . as_arg_ptr ()) ; } } # [doc = "Draws a solid polygon of any amount of points, convex or concave. Unlike [`draw_colored_polygon`][Self::draw_colored_polygon], each point's color can be changed individually. See also [`draw_polyline`][Self::draw_polyline] and [`draw_polyline_colors`][Self::draw_polyline_colors].\n**Note:** Due to how it works, built-in antialiasing will not look correct for translucent polygons and may not work on certain platforms. As a workaround, install the [Antialiased Line2D](https://github.com/godot-extended-libraries/godot-antialiased-line2d) add-on then create an AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing.\n# Default Arguments\n* `uvs` - `PoolVector2Array(  )`\n* `texture` - `null`\n* `normal_map` - `null`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn draw_polygon (& self , points : PoolArray < Vector2 > , colors : PoolArray < Color > , uvs : PoolArray < Vector2 > , texture : impl AsArg < crate :: generated :: Texture > , normal_map : impl AsArg < crate :: generated :: Texture > , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_polygon ; let ret = crate :: icalls :: icallvar__vec2arr_colorarr_vec2arr_obj_obj_bool (method_bind , self . this . sys () . as_ptr () , points , colors , uvs , texture . as_arg_ptr () , normal_map . as_arg_ptr () , antialiased as _) ; } } # [doc = "Draws interconnected line segments with a uniform `color` and `width` and optional antialiasing. When drawing large amounts of lines, this is faster than using individual [`draw_line`][Self::draw_line] calls. To draw disconnected lines, use [`draw_multiline`][Self::draw_multiline] instead. See also [`draw_polygon`][Self::draw_polygon].\n**Note:** Due to how it works, built-in antialiasing will not look correct for translucent polygons and may not work on certain platforms. As a workaround, install the [Antialiased Line2D](https://github.com/godot-extended-libraries/godot-antialiased-line2d) add-on then create an AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn draw_polyline (& self , points : PoolArray < Vector2 > , color : Color , width : f64 , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_polyline ; let ret = crate :: icalls :: icallvar__vec2arr_color_f64_bool (method_bind , self . this . sys () . as_ptr () , points , color , width as _ , antialiased as _) ; } } # [doc = "Draws interconnected line segments with a uniform `width` and segment-by-segment coloring, and optional antialiasing. Colors assigned to line segments match by index between `points` and `colors`. When drawing large amounts of lines, this is faster than using individual [`draw_line`][Self::draw_line] calls. To draw disconnected lines, use [`draw_multiline_colors`][Self::draw_multiline_colors] instead. See also [`draw_polygon`][Self::draw_polygon].\n**Note:** Due to how it works, built-in antialiasing will not look correct for translucent polygons and may not work on certain platforms. As a workaround, install the [Antialiased Line2D](https://github.com/godot-extended-libraries/godot-antialiased-line2d) add-on then create an AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn draw_polyline_colors (& self , points : PoolArray < Vector2 > , colors : PoolArray < Color > , width : f64 , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_polyline_colors ; let ret = crate :: icalls :: icallvar__vec2arr_colorarr_f64_bool (method_bind , self . this . sys () . as_ptr () , points , colors , width as _ , antialiased as _) ; } } # [doc = "Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. See also [`draw_line`][Self::draw_line], [`draw_polyline`][Self::draw_polyline], [`draw_polygon`][Self::draw_polygon], and [`draw_rect`][Self::draw_rect].\n# Default Arguments\n* `texture` - `null`\n* `width` - `1.0`\n* `normal_map` - `null`"] # [doc = ""] # [inline] pub fn draw_primitive (& self , points : PoolArray < Vector2 > , colors : PoolArray < Color > , uvs : PoolArray < Vector2 > , texture : impl AsArg < crate :: generated :: Texture > , width : f64 , normal_map : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_primitive ; let ret = crate :: icalls :: icallvar__vec2arr_colorarr_vec2arr_obj_f64_obj (method_bind , self . this . sys () . as_ptr () , points , colors , uvs , texture . as_arg_ptr () , width as _ , normal_map . as_arg_ptr ()) ; } } # [doc = "Draws a rectangle. If `filled` is `true`, the rectangle will be filled with the `color` specified. If `filled` is `false`, the rectangle will be drawn as a stroke with the `color` and `width` specified. If `antialiased` is `true`, the lines will attempt to perform antialiasing using OpenGL line smoothing.\n**Note:** `width` and `antialiased` are only effective if `filled` is `false`.\n**Note:** Due to how it works, built-in antialiasing will not look correct for translucent polygons and may not work on certain platforms. As a workaround, install the [Antialiased Line2D](https://github.com/godot-extended-libraries/godot-antialiased-line2d) add-on then create an AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing.\n# Default Arguments\n* `filled` - `true`\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = ""] # [inline] pub fn draw_rect (& self , rect : Rect2 , color : Color , filled : bool , width : f64 , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_rect ; let ret = crate :: icalls :: icallvar__rect2_color_bool_f64_bool (method_bind , self . this . sys () . as_ptr () , rect , color , filled as _ , width as _ , antialiased as _) ; } } # [doc = "Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this."] # [doc = ""] # [inline] pub fn draw_set_transform (& self , position : Vector2 , rotation : f64 , scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_set_transform ; let ret = crate :: icalls :: icallvar__vec2_f64_vec2 (method_bind , self . this . sys () . as_ptr () , position , rotation as _ , scale) ; } } # [doc = "Sets a custom transform for drawing via matrix. Anything drawn afterwards will be transformed by this."] # [doc = ""] # [inline] pub fn draw_set_transform_matrix (& self , xform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_set_transform_matrix ; let ret = crate :: icalls :: icallvar__trans2D (method_bind , self . this . sys () . as_ptr () , xform) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nDraws `text` using the specified `font` at the `position` (bottom-left corner using the baseline of the font). The text will have its color multiplied by `modulate`. If `clip_w` is greater than or equal to 0, the text will be clipped if it exceeds the specified width.\n**Example using the default project font:**\n```gdscript\n# If using this method in a script that redraws constantly, move the\n# `default_font` declaration to a member variable assigned in `_ready()`\n# so the Control is only created once.\nvar default_font = Control.new().get_font(\"font\")\ndraw_string(default_font, Vector2(64, 64), \"Hello world\")\n```\nSee also [`Font.draw`][Font::draw].\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `clip_w` - `-1`"] # [doc = ""] # [inline] pub fn draw_string (& self , font : impl AsArg < crate :: generated :: Font > , position : Vector2 , text : impl Into < GodotString > , modulate : Color , clip_w : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_string ; let ret = crate :: icalls :: icallvar__obj_vec2_str_color_i64 (method_bind , self . this . sys () . as_ptr () , font . as_arg_ptr () , position , text . into () , modulate , clip_w as _) ; } } # [doc = "Draws a styled rectangle."] # [doc = ""] # [inline] pub fn draw_style_box (& self , style_box : impl AsArg < crate :: generated :: StyleBox > , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_style_box ; let ret = crate :: icalls :: icallvar__obj_rect2 (method_bind , self . this . sys () . as_ptr () , style_box . as_arg_ptr () , rect) ; } } # [doc = "Draws a texture at a given position.\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `normal_map` - `null`"] # [doc = ""] # [inline] pub fn draw_texture (& self , texture : impl AsArg < crate :: generated :: Texture > , position : Vector2 , modulate : Color , normal_map : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_texture ; let ret = crate :: icalls :: icallvar__obj_vec2_color_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , position , modulate , normal_map . as_arg_ptr ()) ; } } # [doc = "Draws a textured rectangle at a given position, optionally modulated by a color. If `transpose` is `true`, the texture will have its X and Y coordinates swapped.\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `normal_map` - `null`"] # [doc = ""] # [inline] pub fn draw_texture_rect (& self , texture : impl AsArg < crate :: generated :: Texture > , rect : Rect2 , tile : bool , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_texture_rect ; let ret = crate :: icalls :: icallvar__obj_rect2_bool_color_bool_obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , rect , tile as _ , modulate , transpose as _ , normal_map . as_arg_ptr ()) ; } } # [doc = "Draws a textured rectangle region at a given position, optionally modulated by a color. If `transpose` is `true`, the texture will have its X and Y coordinates swapped.\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `normal_map` - `null`\n* `clip_uv` - `true`"] # [doc = ""] # [inline] pub fn draw_texture_rect_region (& self , texture : impl AsArg < crate :: generated :: Texture > , rect : Rect2 , src_rect : Rect2 , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: Texture > , clip_uv : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . draw_texture_rect_region ; let ret = crate :: icalls :: icallvar__obj_rect2_rect2_color_bool_obj_bool (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , rect , src_rect , modulate , transpose as _ , normal_map . as_arg_ptr () , clip_uv as _) ; } } # [doc = "Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations."] # [doc = ""] # [inline] pub fn force_update_transform (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . force_update_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the [`RID`][Rid] of the [`World2D`][World2D] canvas where this item is in."] # [doc = ""] # [inline] pub fn get_canvas (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_canvas ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the canvas item RID used by [`VisualServer`][VisualServer] for this item."] # [doc = ""] # [inline] pub fn get_canvas_item (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_canvas_item ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the transform matrix of this item's canvas."] # [doc = ""] # [inline] pub fn get_canvas_transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_canvas_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the mouse's position in the [`CanvasLayer`][CanvasLayer] that this [`CanvasItem`][CanvasItem] is in using the coordinate system of the [`CanvasLayer`][CanvasLayer]."] # [doc = ""] # [inline] pub fn get_global_mouse_position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_global_mouse_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the global transform matrix of this item."] # [doc = ""] # [inline] pub fn get_global_transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_global_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the global transform matrix of this item in relation to the canvas."] # [doc = ""] # [inline] pub fn get_global_transform_with_canvas (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_global_transform_with_canvas ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The rendering layers in which this [`CanvasItem`][CanvasItem] responds to [`Light2D`][Light2D] nodes."] # [doc = ""] # [inline] pub fn light_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_light_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the mouse's position in this [`CanvasItem`][CanvasItem] using the local coordinate system of this [`CanvasItem`][CanvasItem]."] # [doc = ""] # [inline] pub fn get_local_mouse_position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_local_mouse_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The material applied to textures on this [`CanvasItem`][CanvasItem]."] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The color applied to textures on this [`CanvasItem`][CanvasItem]."] # [doc = ""] # [inline] pub fn modulate (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_modulate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The color applied to textures on this [`CanvasItem`][CanvasItem]. This is not inherited by children [`CanvasItem`][CanvasItem]s."] # [doc = ""] # [inline] pub fn self_modulate (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_self_modulate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the transform matrix of this item."] # [doc = ""] # [inline] pub fn get_transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the parent [`CanvasItem`][CanvasItem]'s [`material`][Self::material] property is used as this one's material."] # [doc = ""] # [inline] pub fn use_parent_material (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_use_parent_material ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the viewport's boundaries as a [`Rect2`][Rect2]."] # [doc = ""] # [inline] pub fn get_viewport_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_viewport_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns this item's transform in relation to the viewport."] # [doc = ""] # [inline] pub fn get_viewport_transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_viewport_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`World2D`][World2D] where this item is in."] # [doc = ""] # [inline] pub fn get_world_2d (& self) -> Option < Ref < crate :: generated :: World2D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . get_world_2d ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: World2D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Hide the [`CanvasItem`][CanvasItem] if it's currently visible. This is equivalent to setting [`visible`][Self::visible] to `false`."] # [doc = ""] # [inline] pub fn hide (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . hide ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the object draws behind its parent."] # [doc = ""] # [inline] pub fn is_draw_behind_parent_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . is_draw_behind_parent_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if local transform notifications are communicated to children."] # [doc = ""] # [inline] pub fn is_local_transform_notification_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . is_local_transform_notification_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the node is set as top-level. See [`set_as_toplevel`][Self::set_as_toplevel]."] # [doc = ""] # [inline] pub fn is_set_as_toplevel (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . is_set_as_toplevel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if global transform notifications are communicated to children."] # [doc = ""] # [inline] pub fn is_transform_notification_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . is_transform_notification_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, this [`CanvasItem`][CanvasItem] is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [`is_visible_in_tree`][Self::is_visible_in_tree] must return `true`).\n**Note:** For controls that inherit [`Popup`][Popup], the correct way to make them visible is to call one of the multiple `popup*()` functions instead."] # [doc = ""] # [inline] pub fn is_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . is_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the node is present in the [`SceneTree`][SceneTree], its [`visible`][Self::visible] property is `true` and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree, and is consequently not drawn (see [`_draw`][Self::_draw])."] # [doc = ""] # [inline] pub fn is_visible_in_tree (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . is_visible_in_tree ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Assigns `screen_point` as this node's new local transform."] # [doc = ""] # [inline] pub fn make_canvas_position_local (& self , screen_point : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . make_canvas_position_local ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , screen_point) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Transformations issued by `event`'s inputs are applied in local space instead of global space."] # [doc = ""] # [inline] pub fn make_input_local (& self , event : impl AsArg < crate :: generated :: InputEvent >) -> Option < Ref < crate :: generated :: InputEvent , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . make_input_local ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr ()) ; < Option < Ref < crate :: generated :: InputEvent , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `enable` is `true`, this [`CanvasItem`][CanvasItem] will _not_ inherit its transform from parent [`CanvasItem`][CanvasItem]s. Its draw order will also be changed to make it draw on top of other [`CanvasItem`][CanvasItem]s that are not set as top-level. The [`CanvasItem`][CanvasItem] will effectively act as if it was placed as a child of a bare [`Node`][Node]. See also [`is_set_as_toplevel`][Self::is_set_as_toplevel]."] # [doc = ""] # [inline] pub fn set_as_toplevel (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . set_as_toplevel ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the object draws behind its parent."] # [doc = ""] # [inline] pub fn set_draw_behind_parent (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . set_draw_behind_parent ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The rendering layers in which this [`CanvasItem`][CanvasItem] responds to [`Light2D`][Light2D] nodes."] # [doc = ""] # [inline] pub fn set_light_mask (& self , light_mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . set_light_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , light_mask as _) ; } } # [doc = "The material applied to textures on this [`CanvasItem`][CanvasItem]."] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = "The color applied to textures on this [`CanvasItem`][CanvasItem]."] # [doc = ""] # [inline] pub fn set_modulate (& self , modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . set_modulate ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , modulate) ; } } # [doc = "If `enable` is `true`, this node will receive [`NOTIFICATION_LOCAL_TRANSFORM_CHANGED`][Self::NOTIFICATION_LOCAL_TRANSFORM_CHANGED] when its local transform changes."] # [doc = ""] # [inline] pub fn set_notify_local_transform (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . set_notify_local_transform ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `enable` is `true`, this node will receive [`NOTIFICATION_TRANSFORM_CHANGED`][Self::NOTIFICATION_TRANSFORM_CHANGED] when its global transform changes."] # [doc = ""] # [inline] pub fn set_notify_transform (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . set_notify_transform ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The color applied to textures on this [`CanvasItem`][CanvasItem]. This is not inherited by children [`CanvasItem`][CanvasItem]s."] # [doc = ""] # [inline] pub fn set_self_modulate (& self , self_modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . set_self_modulate ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , self_modulate) ; } } # [doc = "If `true`, the parent [`CanvasItem`][CanvasItem]'s [`material`][Self::material] property is used as this one's material."] # [doc = ""] # [inline] pub fn set_use_parent_material (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . set_use_parent_material ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, this [`CanvasItem`][CanvasItem] is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [`is_visible_in_tree`][Self::is_visible_in_tree] must return `true`).\n**Note:** For controls that inherit [`Popup`][Popup], the correct way to make them visible is to call one of the multiple `popup*()` functions instead."] # [doc = ""] # [inline] pub fn set_visible (& self , visible : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . set_visible ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , visible as _) ; } } # [doc = "Show the [`CanvasItem`][CanvasItem] if it's currently hidden. This is equivalent to setting [`visible`][Self::visible] to `true`. For controls that inherit [`Popup`][Popup], the correct way to make them visible is to call one of the multiple `popup*()` functions instead."] # [doc = ""] # [inline] pub fn show (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . show ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Queues the [`CanvasItem`][CanvasItem] to redraw. During idle time, if [`CanvasItem`][CanvasItem] is visible, [`NOTIFICATION_DRAW`][Self::NOTIFICATION_DRAW] is sent and [`_draw`][Self::_draw] is called. This only occurs **once** per frame, even if this method has been called multiple times."] # [doc = ""] # [inline] pub fn update (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMethodTable :: get (get_api ()) . update ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CanvasItem { } unsafe impl GodotObject for CanvasItem { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CanvasItem" } } impl QueueFree for CanvasItem { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CanvasItem { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CanvasItem { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for CanvasItem { } unsafe impl SubClass < crate :: generated :: Object > for CanvasItem { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CanvasItemMethodTable { pub class_constructor : sys :: godot_class_constructor , pub draw_arc : * mut sys :: godot_method_bind , pub draw_char : * mut sys :: godot_method_bind , pub draw_circle : * mut sys :: godot_method_bind , pub draw_colored_polygon : * mut sys :: godot_method_bind , pub draw_line : * mut sys :: godot_method_bind , pub draw_mesh : * mut sys :: godot_method_bind , pub draw_multiline : * mut sys :: godot_method_bind , pub draw_multiline_colors : * mut sys :: godot_method_bind , pub draw_multimesh : * mut sys :: godot_method_bind , pub draw_polygon : * mut sys :: godot_method_bind , pub draw_polyline : * mut sys :: godot_method_bind , pub draw_polyline_colors : * mut sys :: godot_method_bind , pub draw_primitive : * mut sys :: godot_method_bind , pub draw_rect : * mut sys :: godot_method_bind , pub draw_set_transform : * mut sys :: godot_method_bind , pub draw_set_transform_matrix : * mut sys :: godot_method_bind , pub draw_string : * mut sys :: godot_method_bind , pub draw_style_box : * mut sys :: godot_method_bind , pub draw_texture : * mut sys :: godot_method_bind , pub draw_texture_rect : * mut sys :: godot_method_bind , pub draw_texture_rect_region : * mut sys :: godot_method_bind , pub force_update_transform : * mut sys :: godot_method_bind , pub get_canvas : * mut sys :: godot_method_bind , pub get_canvas_item : * mut sys :: godot_method_bind , pub get_canvas_transform : * mut sys :: godot_method_bind , pub get_global_mouse_position : * mut sys :: godot_method_bind , pub get_global_transform : * mut sys :: godot_method_bind , pub get_global_transform_with_canvas : * mut sys :: godot_method_bind , pub get_light_mask : * mut sys :: godot_method_bind , pub get_local_mouse_position : * mut sys :: godot_method_bind , pub get_material : * mut sys :: godot_method_bind , pub get_modulate : * mut sys :: godot_method_bind , pub get_self_modulate : * mut sys :: godot_method_bind , pub get_transform : * mut sys :: godot_method_bind , pub get_use_parent_material : * mut sys :: godot_method_bind , pub get_viewport_rect : * mut sys :: godot_method_bind , pub get_viewport_transform : * mut sys :: godot_method_bind , pub get_world_2d : * mut sys :: godot_method_bind , pub hide : * mut sys :: godot_method_bind , pub is_draw_behind_parent_enabled : * mut sys :: godot_method_bind , pub is_local_transform_notification_enabled : * mut sys :: godot_method_bind , pub is_set_as_toplevel : * mut sys :: godot_method_bind , pub is_transform_notification_enabled : * mut sys :: godot_method_bind , pub is_visible : * mut sys :: godot_method_bind , pub is_visible_in_tree : * mut sys :: godot_method_bind , pub make_canvas_position_local : * mut sys :: godot_method_bind , pub make_input_local : * mut sys :: godot_method_bind , pub set_as_toplevel : * mut sys :: godot_method_bind , pub set_draw_behind_parent : * mut sys :: godot_method_bind , pub set_light_mask : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind , pub set_modulate : * mut sys :: godot_method_bind , pub set_notify_local_transform : * mut sys :: godot_method_bind , pub set_notify_transform : * mut sys :: godot_method_bind , pub set_self_modulate : * mut sys :: godot_method_bind , pub set_use_parent_material : * mut sys :: godot_method_bind , pub set_visible : * mut sys :: godot_method_bind , pub show : * mut sys :: godot_method_bind , pub update : * mut sys :: godot_method_bind } impl CanvasItemMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CanvasItemMethodTable = CanvasItemMethodTable { class_constructor : None , draw_arc : 0 as * mut sys :: godot_method_bind , draw_char : 0 as * mut sys :: godot_method_bind , draw_circle : 0 as * mut sys :: godot_method_bind , draw_colored_polygon : 0 as * mut sys :: godot_method_bind , draw_line : 0 as * mut sys :: godot_method_bind , draw_mesh : 0 as * mut sys :: godot_method_bind , draw_multiline : 0 as * mut sys :: godot_method_bind , draw_multiline_colors : 0 as * mut sys :: godot_method_bind , draw_multimesh : 0 as * mut sys :: godot_method_bind , draw_polygon : 0 as * mut sys :: godot_method_bind , draw_polyline : 0 as * mut sys :: godot_method_bind , draw_polyline_colors : 0 as * mut sys :: godot_method_bind , draw_primitive : 0 as * mut sys :: godot_method_bind , draw_rect : 0 as * mut sys :: godot_method_bind , draw_set_transform : 0 as * mut sys :: godot_method_bind , draw_set_transform_matrix : 0 as * mut sys :: godot_method_bind , draw_string : 0 as * mut sys :: godot_method_bind , draw_style_box : 0 as * mut sys :: godot_method_bind , draw_texture : 0 as * mut sys :: godot_method_bind , draw_texture_rect : 0 as * mut sys :: godot_method_bind , draw_texture_rect_region : 0 as * mut sys :: godot_method_bind , force_update_transform : 0 as * mut sys :: godot_method_bind , get_canvas : 0 as * mut sys :: godot_method_bind , get_canvas_item : 0 as * mut sys :: godot_method_bind , get_canvas_transform : 0 as * mut sys :: godot_method_bind , get_global_mouse_position : 0 as * mut sys :: godot_method_bind , get_global_transform : 0 as * mut sys :: godot_method_bind , get_global_transform_with_canvas : 0 as * mut sys :: godot_method_bind , get_light_mask : 0 as * mut sys :: godot_method_bind , get_local_mouse_position : 0 as * mut sys :: godot_method_bind , get_material : 0 as * mut sys :: godot_method_bind , get_modulate : 0 as * mut sys :: godot_method_bind , get_self_modulate : 0 as * mut sys :: godot_method_bind , get_transform : 0 as * mut sys :: godot_method_bind , get_use_parent_material : 0 as * mut sys :: godot_method_bind , get_viewport_rect : 0 as * mut sys :: godot_method_bind , get_viewport_transform : 0 as * mut sys :: godot_method_bind , get_world_2d : 0 as * mut sys :: godot_method_bind , hide : 0 as * mut sys :: godot_method_bind , is_draw_behind_parent_enabled : 0 as * mut sys :: godot_method_bind , is_local_transform_notification_enabled : 0 as * mut sys :: godot_method_bind , is_set_as_toplevel : 0 as * mut sys :: godot_method_bind , is_transform_notification_enabled : 0 as * mut sys :: godot_method_bind , is_visible : 0 as * mut sys :: godot_method_bind , is_visible_in_tree : 0 as * mut sys :: godot_method_bind , make_canvas_position_local : 0 as * mut sys :: godot_method_bind , make_input_local : 0 as * mut sys :: godot_method_bind , set_as_toplevel : 0 as * mut sys :: godot_method_bind , set_draw_behind_parent : 0 as * mut sys :: godot_method_bind , set_light_mask : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind , set_modulate : 0 as * mut sys :: godot_method_bind , set_notify_local_transform : 0 as * mut sys :: godot_method_bind , set_notify_transform : 0 as * mut sys :: godot_method_bind , set_self_modulate : 0 as * mut sys :: godot_method_bind , set_use_parent_material : 0 as * mut sys :: godot_method_bind , set_visible : 0 as * mut sys :: godot_method_bind , show : 0 as * mut sys :: godot_method_bind , update : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CanvasItemMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CanvasItem\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . draw_arc = (gd_api . godot_method_bind_get_method) (class_name , "draw_arc\0" . as_ptr () as * const c_char) ; table . draw_char = (gd_api . godot_method_bind_get_method) (class_name , "draw_char\0" . as_ptr () as * const c_char) ; table . draw_circle = (gd_api . godot_method_bind_get_method) (class_name , "draw_circle\0" . as_ptr () as * const c_char) ; table . draw_colored_polygon = (gd_api . godot_method_bind_get_method) (class_name , "draw_colored_polygon\0" . as_ptr () as * const c_char) ; table . draw_line = (gd_api . godot_method_bind_get_method) (class_name , "draw_line\0" . as_ptr () as * const c_char) ; table . draw_mesh = (gd_api . godot_method_bind_get_method) (class_name , "draw_mesh\0" . as_ptr () as * const c_char) ; table . draw_multiline = (gd_api . godot_method_bind_get_method) (class_name , "draw_multiline\0" . as_ptr () as * const c_char) ; table . draw_multiline_colors = (gd_api . godot_method_bind_get_method) (class_name , "draw_multiline_colors\0" . as_ptr () as * const c_char) ; table . draw_multimesh = (gd_api . godot_method_bind_get_method) (class_name , "draw_multimesh\0" . as_ptr () as * const c_char) ; table . draw_polygon = (gd_api . godot_method_bind_get_method) (class_name , "draw_polygon\0" . as_ptr () as * const c_char) ; table . draw_polyline = (gd_api . godot_method_bind_get_method) (class_name , "draw_polyline\0" . as_ptr () as * const c_char) ; table . draw_polyline_colors = (gd_api . godot_method_bind_get_method) (class_name , "draw_polyline_colors\0" . as_ptr () as * const c_char) ; table . draw_primitive = (gd_api . godot_method_bind_get_method) (class_name , "draw_primitive\0" . as_ptr () as * const c_char) ; table . draw_rect = (gd_api . godot_method_bind_get_method) (class_name , "draw_rect\0" . as_ptr () as * const c_char) ; table . draw_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "draw_set_transform\0" . as_ptr () as * const c_char) ; table . draw_set_transform_matrix = (gd_api . godot_method_bind_get_method) (class_name , "draw_set_transform_matrix\0" . as_ptr () as * const c_char) ; table . draw_string = (gd_api . godot_method_bind_get_method) (class_name , "draw_string\0" . as_ptr () as * const c_char) ; table . draw_style_box = (gd_api . godot_method_bind_get_method) (class_name , "draw_style_box\0" . as_ptr () as * const c_char) ; table . draw_texture = (gd_api . godot_method_bind_get_method) (class_name , "draw_texture\0" . as_ptr () as * const c_char) ; table . draw_texture_rect = (gd_api . godot_method_bind_get_method) (class_name , "draw_texture_rect\0" . as_ptr () as * const c_char) ; table . draw_texture_rect_region = (gd_api . godot_method_bind_get_method) (class_name , "draw_texture_rect_region\0" . as_ptr () as * const c_char) ; table . force_update_transform = (gd_api . godot_method_bind_get_method) (class_name , "force_update_transform\0" . as_ptr () as * const c_char) ; table . get_canvas = (gd_api . godot_method_bind_get_method) (class_name , "get_canvas\0" . as_ptr () as * const c_char) ; table . get_canvas_item = (gd_api . godot_method_bind_get_method) (class_name , "get_canvas_item\0" . as_ptr () as * const c_char) ; table . get_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_canvas_transform\0" . as_ptr () as * const c_char) ; table . get_global_mouse_position = (gd_api . godot_method_bind_get_method) (class_name , "get_global_mouse_position\0" . as_ptr () as * const c_char) ; table . get_global_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_global_transform\0" . as_ptr () as * const c_char) ; table . get_global_transform_with_canvas = (gd_api . godot_method_bind_get_method) (class_name , "get_global_transform_with_canvas\0" . as_ptr () as * const c_char) ; table . get_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_light_mask\0" . as_ptr () as * const c_char) ; table . get_local_mouse_position = (gd_api . godot_method_bind_get_method) (class_name , "get_local_mouse_position\0" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_modulate\0" . as_ptr () as * const c_char) ; table . get_self_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_self_modulate\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . get_use_parent_material = (gd_api . godot_method_bind_get_method) (class_name , "get_use_parent_material\0" . as_ptr () as * const c_char) ; table . get_viewport_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_viewport_rect\0" . as_ptr () as * const c_char) ; table . get_viewport_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_viewport_transform\0" . as_ptr () as * const c_char) ; table . get_world_2d = (gd_api . godot_method_bind_get_method) (class_name , "get_world_2d\0" . as_ptr () as * const c_char) ; table . hide = (gd_api . godot_method_bind_get_method) (class_name , "hide\0" . as_ptr () as * const c_char) ; table . is_draw_behind_parent_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_draw_behind_parent_enabled\0" . as_ptr () as * const c_char) ; table . is_local_transform_notification_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_local_transform_notification_enabled\0" . as_ptr () as * const c_char) ; table . is_set_as_toplevel = (gd_api . godot_method_bind_get_method) (class_name , "is_set_as_toplevel\0" . as_ptr () as * const c_char) ; table . is_transform_notification_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_transform_notification_enabled\0" . as_ptr () as * const c_char) ; table . is_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_visible\0" . as_ptr () as * const c_char) ; table . is_visible_in_tree = (gd_api . godot_method_bind_get_method) (class_name , "is_visible_in_tree\0" . as_ptr () as * const c_char) ; table . make_canvas_position_local = (gd_api . godot_method_bind_get_method) (class_name , "make_canvas_position_local\0" . as_ptr () as * const c_char) ; table . make_input_local = (gd_api . godot_method_bind_get_method) (class_name , "make_input_local\0" . as_ptr () as * const c_char) ; table . set_as_toplevel = (gd_api . godot_method_bind_get_method) (class_name , "set_as_toplevel\0" . as_ptr () as * const c_char) ; table . set_draw_behind_parent = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_behind_parent\0" . as_ptr () as * const c_char) ; table . set_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_light_mask\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; table . set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_modulate\0" . as_ptr () as * const c_char) ; table . set_notify_local_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_notify_local_transform\0" . as_ptr () as * const c_char) ; table . set_notify_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_notify_transform\0" . as_ptr () as * const c_char) ; table . set_self_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_self_modulate\0" . as_ptr () as * const c_char) ; table . set_use_parent_material = (gd_api . godot_method_bind_get_method) (class_name , "set_use_parent_material\0" . as_ptr () as * const c_char) ; table . set_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_visible\0" . as_ptr () as * const c_char) ; table . show = (gd_api . godot_method_bind_get_method) (class_name , "show\0" . as_ptr () as * const c_char) ; table . update = (gd_api . godot_method_bind_get_method) (class_name , "update\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::canvas_item::private::CanvasItem;
            
            pub mod canvas_item_material {
                # ! [doc = "This module contains types related to the API class [`CanvasItemMaterial`][super::CanvasItemMaterial]."] pub (crate) mod private { # [doc = "`core class CanvasItemMaterial` inherits `Material` (reference-counted).\n\nThis class has related types in the [`canvas_item_material`][super::canvas_item_material] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_canvasitemmaterial.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCanvasItemMaterial inherits methods from:\n - [Material](struct.Material.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CanvasItemMaterial { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CanvasItemMaterial ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BlendMode (pub i64) ; impl BlendMode { pub const MIX : BlendMode = BlendMode (0i64) ; pub const ADD : BlendMode = BlendMode (1i64) ; pub const SUB : BlendMode = BlendMode (2i64) ; pub const MUL : BlendMode = BlendMode (3i64) ; pub const PREMULT_ALPHA : BlendMode = BlendMode (4i64) ; } impl From < i64 > for BlendMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BlendMode > for i64 { # [inline] fn from (v : BlendMode) -> Self { v . 0 } } impl FromVariant for BlendMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightMode (pub i64) ; impl LightMode { pub const NORMAL : LightMode = LightMode (0i64) ; pub const UNSHADED : LightMode = LightMode (1i64) ; pub const LIGHT_ONLY : LightMode = LightMode (2i64) ; } impl From < i64 > for LightMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightMode > for i64 { # [inline] fn from (v : LightMode) -> Self { v . 0 } } impl FromVariant for LightMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CanvasItemMaterial { pub const BLEND_MODE_MIX : i64 = 0i64 ; pub const LIGHT_MODE_NORMAL : i64 = 0i64 ; pub const BLEND_MODE_ADD : i64 = 1i64 ; pub const LIGHT_MODE_UNSHADED : i64 = 1i64 ; pub const BLEND_MODE_SUB : i64 = 2i64 ; pub const LIGHT_MODE_LIGHT_ONLY : i64 = 2i64 ; pub const BLEND_MODE_MUL : i64 = 3i64 ; pub const BLEND_MODE_PREMULT_ALPHA : i64 = 4i64 ; } impl CanvasItemMaterial { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CanvasItemMaterialMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The manner in which a material's rendering is applied to underlying textures."] # [doc = ""] # [inline] pub fn blend_mode (& self) -> crate :: generated :: canvas_item_material :: BlendMode { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . get_blend_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: canvas_item_material :: BlendMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The manner in which material reacts to lighting."] # [doc = ""] # [inline] pub fn light_mode (& self) -> crate :: generated :: canvas_item_material :: LightMode { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . get_light_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: canvas_item_material :: LightMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The number of columns in the spritesheet assigned as [`Texture`][Texture] for a [`Particles2D`][Particles2D] or [`CPUParticles2D`][CPUParticles2D].\n**Note:** This property is only used and visible in the editor if [`particles_animation`][Self::particles_animation] is `true`."] # [doc = ""] # [inline] pub fn particles_anim_h_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . get_particles_anim_h_frames ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the particles animation will loop.\n**Note:** This property is only used and visible in the editor if [`particles_animation`][Self::particles_animation] is `true`."] # [doc = ""] # [inline] pub fn particles_anim_loop (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . get_particles_anim_loop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The number of rows in the spritesheet assigned as [`Texture`][Texture] for a [`Particles2D`][Particles2D] or [`CPUParticles2D`][CPUParticles2D].\n**Note:** This property is only used and visible in the editor if [`particles_animation`][Self::particles_animation] is `true`."] # [doc = ""] # [inline] pub fn particles_anim_v_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . get_particles_anim_v_frames ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, enable spritesheet-based animation features when assigned to [`Particles2D`][Particles2D] and [`CPUParticles2D`][CPUParticles2D] nodes. The [`ParticlesMaterial.anim_speed`][ParticlesMaterial::anim_speed] or [`CPUParticles2D.anim_speed`][CPUParticles2D::anim_speed] should also be set to a positive value for the animation to play.\nThis property (and other `particles_anim_*` properties that depend on it) has no effect on other types of nodes."] # [doc = ""] # [inline] pub fn particles_animation (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . get_particles_animation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The manner in which a material's rendering is applied to underlying textures."] # [doc = ""] # [inline] pub fn set_blend_mode (& self , blend_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . set_blend_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , blend_mode as _) ; } } # [doc = "The manner in which material reacts to lighting."] # [doc = ""] # [inline] pub fn set_light_mode (& self , light_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . set_light_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , light_mode as _) ; } } # [doc = "The number of columns in the spritesheet assigned as [`Texture`][Texture] for a [`Particles2D`][Particles2D] or [`CPUParticles2D`][CPUParticles2D].\n**Note:** This property is only used and visible in the editor if [`particles_animation`][Self::particles_animation] is `true`."] # [doc = ""] # [inline] pub fn set_particles_anim_h_frames (& self , frames : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . set_particles_anim_h_frames ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , frames as _) ; } } # [doc = "If `true`, the particles animation will loop.\n**Note:** This property is only used and visible in the editor if [`particles_animation`][Self::particles_animation] is `true`."] # [doc = ""] # [inline] pub fn set_particles_anim_loop (& self , loop_ : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . set_particles_anim_loop ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , loop_ as _) ; } } # [doc = "The number of rows in the spritesheet assigned as [`Texture`][Texture] for a [`Particles2D`][Particles2D] or [`CPUParticles2D`][CPUParticles2D].\n**Note:** This property is only used and visible in the editor if [`particles_animation`][Self::particles_animation] is `true`."] # [doc = ""] # [inline] pub fn set_particles_anim_v_frames (& self , frames : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . set_particles_anim_v_frames ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , frames as _) ; } } # [doc = "If `true`, enable spritesheet-based animation features when assigned to [`Particles2D`][Particles2D] and [`CPUParticles2D`][CPUParticles2D] nodes. The [`ParticlesMaterial.anim_speed`][ParticlesMaterial::anim_speed] or [`CPUParticles2D.anim_speed`][CPUParticles2D::anim_speed] should also be set to a positive value for the animation to play.\nThis property (and other `particles_anim_*` properties that depend on it) has no effect on other types of nodes."] # [doc = ""] # [inline] pub fn set_particles_animation (& self , particles_anim : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasItemMaterialMethodTable :: get (get_api ()) . set_particles_animation ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , particles_anim as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CanvasItemMaterial { } unsafe impl GodotObject for CanvasItemMaterial { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CanvasItemMaterial" } } impl std :: ops :: Deref for CanvasItemMaterial { type Target = crate :: generated :: Material ; # [inline] fn deref (& self) -> & crate :: generated :: Material { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CanvasItemMaterial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Material { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Material > for CanvasItemMaterial { } unsafe impl SubClass < crate :: generated :: Resource > for CanvasItemMaterial { } unsafe impl SubClass < crate :: generated :: Reference > for CanvasItemMaterial { } unsafe impl SubClass < crate :: generated :: Object > for CanvasItemMaterial { } impl Instanciable for CanvasItemMaterial { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CanvasItemMaterial :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CanvasItemMaterialMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_blend_mode : * mut sys :: godot_method_bind , pub get_light_mode : * mut sys :: godot_method_bind , pub get_particles_anim_h_frames : * mut sys :: godot_method_bind , pub get_particles_anim_loop : * mut sys :: godot_method_bind , pub get_particles_anim_v_frames : * mut sys :: godot_method_bind , pub get_particles_animation : * mut sys :: godot_method_bind , pub set_blend_mode : * mut sys :: godot_method_bind , pub set_light_mode : * mut sys :: godot_method_bind , pub set_particles_anim_h_frames : * mut sys :: godot_method_bind , pub set_particles_anim_loop : * mut sys :: godot_method_bind , pub set_particles_anim_v_frames : * mut sys :: godot_method_bind , pub set_particles_animation : * mut sys :: godot_method_bind } impl CanvasItemMaterialMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CanvasItemMaterialMethodTable = CanvasItemMaterialMethodTable { class_constructor : None , get_blend_mode : 0 as * mut sys :: godot_method_bind , get_light_mode : 0 as * mut sys :: godot_method_bind , get_particles_anim_h_frames : 0 as * mut sys :: godot_method_bind , get_particles_anim_loop : 0 as * mut sys :: godot_method_bind , get_particles_anim_v_frames : 0 as * mut sys :: godot_method_bind , get_particles_animation : 0 as * mut sys :: godot_method_bind , set_blend_mode : 0 as * mut sys :: godot_method_bind , set_light_mode : 0 as * mut sys :: godot_method_bind , set_particles_anim_h_frames : 0 as * mut sys :: godot_method_bind , set_particles_anim_loop : 0 as * mut sys :: godot_method_bind , set_particles_anim_v_frames : 0 as * mut sys :: godot_method_bind , set_particles_animation : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CanvasItemMaterialMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CanvasItemMaterial\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_mode\0" . as_ptr () as * const c_char) ; table . get_light_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_light_mode\0" . as_ptr () as * const c_char) ; table . get_particles_anim_h_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_anim_h_frames\0" . as_ptr () as * const c_char) ; table . get_particles_anim_loop = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_anim_loop\0" . as_ptr () as * const c_char) ; table . get_particles_anim_v_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_anim_v_frames\0" . as_ptr () as * const c_char) ; table . get_particles_animation = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_animation\0" . as_ptr () as * const c_char) ; table . set_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_mode\0" . as_ptr () as * const c_char) ; table . set_light_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_light_mode\0" . as_ptr () as * const c_char) ; table . set_particles_anim_h_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_anim_h_frames\0" . as_ptr () as * const c_char) ; table . set_particles_anim_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_anim_loop\0" . as_ptr () as * const c_char) ; table . set_particles_anim_v_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_anim_v_frames\0" . as_ptr () as * const c_char) ; table . set_particles_animation = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_animation\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::canvas_item_material::private::CanvasItemMaterial;
            
            pub(crate) mod canvas_layer {
                # ! [doc = "This module contains types related to the API class [`CanvasLayer`][super::CanvasLayer]."] pub (crate) mod private { # [doc = "`core class CanvasLayer` inherits `Node` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_canvaslayer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CanvasLayer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CanvasLayer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCanvasLayer inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CanvasLayer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CanvasLayer ; impl CanvasLayer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CanvasLayerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the RID of the canvas used by this layer."] # [doc = ""] # [inline] pub fn get_canvas (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_canvas ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The custom [`Viewport`][Viewport] node assigned to the [`CanvasLayer`][CanvasLayer]. If `null`, uses the default viewport instead."] # [doc = ""] # [inline] pub fn custom_viewport (& self) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_custom_viewport ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Scales the layer when using [`follow_viewport_enable`][Self::follow_viewport_enable]. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales."] # [doc = ""] # [inline] pub fn follow_viewport_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_follow_viewport_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Layer index for draw order. Lower values are drawn first."] # [doc = ""] # [inline] pub fn layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_layer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The layer's base offset."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The layer's rotation in radians."] # [doc = ""] # [inline] pub fn rotation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_rotation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The layer's rotation in degrees."] # [doc = ""] # [inline] pub fn rotation_degrees (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_rotation_degrees ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The layer's scale."] # [doc = ""] # [inline] pub fn scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The layer's transform."] # [doc = ""] # [inline] pub fn transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . get_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Hides any [`CanvasItem`][CanvasItem] under this [`CanvasLayer`][CanvasLayer]. This is equivalent to setting [`visible`][Self::visible] to `false`."] # [doc = ""] # [inline] pub fn hide (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . hide ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If enabled, the [`CanvasLayer`][CanvasLayer] will use the viewport's transform, so it will move when camera moves instead of being anchored in a fixed position on the screen.\nTogether with [`follow_viewport_scale`][Self::follow_viewport_scale] it can be used for a pseudo 3D effect."] # [doc = ""] # [inline] pub fn is_following_viewport (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . is_following_viewport ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `false`, any [`CanvasItem`][CanvasItem] under this [`CanvasLayer`][CanvasLayer] will be hidden.\nUnlike [`CanvasItem.visible`][CanvasItem::visible], visibility of a [`CanvasLayer`][CanvasLayer] isn't propagated to underlying layers."] # [doc = ""] # [inline] pub fn is_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . is_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The custom [`Viewport`][Viewport] node assigned to the [`CanvasLayer`][CanvasLayer]. If `null`, uses the default viewport instead."] # [doc = ""] # [inline] pub fn set_custom_viewport (& self , viewport : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_custom_viewport ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , viewport . as_arg_ptr ()) ; } } # [doc = "If enabled, the [`CanvasLayer`][CanvasLayer] will use the viewport's transform, so it will move when camera moves instead of being anchored in a fixed position on the screen.\nTogether with [`follow_viewport_scale`][Self::follow_viewport_scale] it can be used for a pseudo 3D effect."] # [doc = ""] # [inline] pub fn set_follow_viewport (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_follow_viewport ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Scales the layer when using [`follow_viewport_enable`][Self::follow_viewport_enable]. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales."] # [doc = ""] # [inline] pub fn set_follow_viewport_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_follow_viewport_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , scale as _) ; } } # [doc = "Layer index for draw order. Lower values are drawn first."] # [doc = ""] # [inline] pub fn set_layer (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_layer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , layer as _) ; } } # [doc = "The layer's base offset."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The layer's rotation in radians."] # [doc = ""] # [inline] pub fn set_rotation (& self , radians : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_rotation ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radians as _) ; } } # [doc = "The layer's rotation in degrees."] # [doc = ""] # [inline] pub fn set_rotation_degrees (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_rotation_degrees ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , degrees as _) ; } } # [doc = "The layer's scale."] # [doc = ""] # [inline] pub fn set_scale (& self , scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_scale ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "The layer's transform."] # [doc = ""] # [inline] pub fn set_transform (& self , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_transform ; let ret = crate :: icalls :: icallvar__trans2D (method_bind , self . this . sys () . as_ptr () , transform) ; } } # [doc = "If `false`, any [`CanvasItem`][CanvasItem] under this [`CanvasLayer`][CanvasLayer] will be hidden.\nUnlike [`CanvasItem.visible`][CanvasItem::visible], visibility of a [`CanvasLayer`][CanvasLayer] isn't propagated to underlying layers."] # [doc = ""] # [inline] pub fn set_visible (& self , visible : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . set_visible ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , visible as _) ; } } # [doc = "Shows any [`CanvasItem`][CanvasItem] under this [`CanvasLayer`][CanvasLayer]. This is equivalent to setting [`visible`][Self::visible] to `true`."] # [doc = ""] # [inline] pub fn show (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasLayerMethodTable :: get (get_api ()) . show ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CanvasLayer { } unsafe impl GodotObject for CanvasLayer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CanvasLayer" } } impl QueueFree for CanvasLayer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CanvasLayer { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CanvasLayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for CanvasLayer { } unsafe impl SubClass < crate :: generated :: Object > for CanvasLayer { } impl Instanciable for CanvasLayer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CanvasLayer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CanvasLayerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_canvas : * mut sys :: godot_method_bind , pub get_custom_viewport : * mut sys :: godot_method_bind , pub get_follow_viewport_scale : * mut sys :: godot_method_bind , pub get_layer : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_rotation : * mut sys :: godot_method_bind , pub get_rotation_degrees : * mut sys :: godot_method_bind , pub get_scale : * mut sys :: godot_method_bind , pub get_transform : * mut sys :: godot_method_bind , pub hide : * mut sys :: godot_method_bind , pub is_following_viewport : * mut sys :: godot_method_bind , pub is_visible : * mut sys :: godot_method_bind , pub set_custom_viewport : * mut sys :: godot_method_bind , pub set_follow_viewport : * mut sys :: godot_method_bind , pub set_follow_viewport_scale : * mut sys :: godot_method_bind , pub set_layer : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_rotation : * mut sys :: godot_method_bind , pub set_rotation_degrees : * mut sys :: godot_method_bind , pub set_scale : * mut sys :: godot_method_bind , pub set_transform : * mut sys :: godot_method_bind , pub set_visible : * mut sys :: godot_method_bind , pub show : * mut sys :: godot_method_bind } impl CanvasLayerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CanvasLayerMethodTable = CanvasLayerMethodTable { class_constructor : None , get_canvas : 0 as * mut sys :: godot_method_bind , get_custom_viewport : 0 as * mut sys :: godot_method_bind , get_follow_viewport_scale : 0 as * mut sys :: godot_method_bind , get_layer : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_rotation : 0 as * mut sys :: godot_method_bind , get_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_scale : 0 as * mut sys :: godot_method_bind , get_transform : 0 as * mut sys :: godot_method_bind , hide : 0 as * mut sys :: godot_method_bind , is_following_viewport : 0 as * mut sys :: godot_method_bind , is_visible : 0 as * mut sys :: godot_method_bind , set_custom_viewport : 0 as * mut sys :: godot_method_bind , set_follow_viewport : 0 as * mut sys :: godot_method_bind , set_follow_viewport_scale : 0 as * mut sys :: godot_method_bind , set_layer : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_rotation : 0 as * mut sys :: godot_method_bind , set_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_scale : 0 as * mut sys :: godot_method_bind , set_transform : 0 as * mut sys :: godot_method_bind , set_visible : 0 as * mut sys :: godot_method_bind , show : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CanvasLayerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CanvasLayer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_canvas = (gd_api . godot_method_bind_get_method) (class_name , "get_canvas\0" . as_ptr () as * const c_char) ; table . get_custom_viewport = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_viewport\0" . as_ptr () as * const c_char) ; table . get_follow_viewport_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_follow_viewport_scale\0" . as_ptr () as * const c_char) ; table . get_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_layer\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation\0" . as_ptr () as * const c_char) ; table . get_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_scale\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . hide = (gd_api . godot_method_bind_get_method) (class_name , "hide\0" . as_ptr () as * const c_char) ; table . is_following_viewport = (gd_api . godot_method_bind_get_method) (class_name , "is_following_viewport\0" . as_ptr () as * const c_char) ; table . is_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_visible\0" . as_ptr () as * const c_char) ; table . set_custom_viewport = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_viewport\0" . as_ptr () as * const c_char) ; table . set_follow_viewport = (gd_api . godot_method_bind_get_method) (class_name , "set_follow_viewport\0" . as_ptr () as * const c_char) ; table . set_follow_viewport_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_follow_viewport_scale\0" . as_ptr () as * const c_char) ; table . set_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_layer\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation\0" . as_ptr () as * const c_char) ; table . set_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_scale\0" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\0" . as_ptr () as * const c_char) ; table . set_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_visible\0" . as_ptr () as * const c_char) ; table . show = (gd_api . godot_method_bind_get_method) (class_name , "show\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::canvas_layer::private::CanvasLayer;
            
            pub(crate) mod canvas_modulate {
                # ! [doc = "This module contains types related to the API class [`CanvasModulate`][super::CanvasModulate]."] pub (crate) mod private { # [doc = "`core class CanvasModulate` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_canvasmodulate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CanvasModulate` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CanvasModulate>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCanvasModulate inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CanvasModulate { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CanvasModulate ; impl CanvasModulate { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CanvasModulateMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The tint color to apply."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasModulateMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The tint color to apply."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CanvasModulateMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CanvasModulate { } unsafe impl GodotObject for CanvasModulate { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CanvasModulate" } } impl QueueFree for CanvasModulate { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CanvasModulate { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CanvasModulate { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for CanvasModulate { } unsafe impl SubClass < crate :: generated :: CanvasItem > for CanvasModulate { } unsafe impl SubClass < crate :: generated :: Node > for CanvasModulate { } unsafe impl SubClass < crate :: generated :: Object > for CanvasModulate { } impl Instanciable for CanvasModulate { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CanvasModulate :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CanvasModulateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_color : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind } impl CanvasModulateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CanvasModulateMethodTable = CanvasModulateMethodTable { class_constructor : None , get_color : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CanvasModulateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CanvasModulate\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::canvas_modulate::private::CanvasModulate;
            
            pub(crate) mod capsule_mesh {
                # ! [doc = "This module contains types related to the API class [`CapsuleMesh`][super::CapsuleMesh]."] pub (crate) mod private { # [doc = "`core class CapsuleMesh` inherits `PrimitiveMesh` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_capsulemesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCapsuleMesh inherits methods from:\n - [PrimitiveMesh](struct.PrimitiveMesh.html)\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CapsuleMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CapsuleMesh ; impl CapsuleMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CapsuleMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Height of the middle cylindrical part of the capsule (without the hemispherical ends).\n**Note:** The capsule's total height is equal to [`mid_height`][Self::mid_height] + 2 * [`radius`][Self::radius]."] # [doc = ""] # [inline] pub fn mid_height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleMeshMethodTable :: get (get_api ()) . get_mid_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Number of radial segments on the capsule mesh."] # [doc = ""] # [inline] pub fn radial_segments (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleMeshMethodTable :: get (get_api ()) . get_radial_segments ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Radius of the capsule mesh."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleMeshMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Number of rings along the height of the capsule."] # [doc = ""] # [inline] pub fn rings (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleMeshMethodTable :: get (get_api ()) . get_rings ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Height of the middle cylindrical part of the capsule (without the hemispherical ends).\n**Note:** The capsule's total height is equal to [`mid_height`][Self::mid_height] + 2 * [`radius`][Self::radius]."] # [doc = ""] # [inline] pub fn set_mid_height (& self , mid_height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleMeshMethodTable :: get (get_api ()) . set_mid_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , mid_height as _) ; } } # [doc = "Number of radial segments on the capsule mesh."] # [doc = ""] # [inline] pub fn set_radial_segments (& self , segments : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleMeshMethodTable :: get (get_api ()) . set_radial_segments ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , segments as _) ; } } # [doc = "Radius of the capsule mesh."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleMeshMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = "Number of rings along the height of the capsule."] # [doc = ""] # [inline] pub fn set_rings (& self , rings : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleMeshMethodTable :: get (get_api ()) . set_rings ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , rings as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CapsuleMesh { } unsafe impl GodotObject for CapsuleMesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CapsuleMesh" } } impl std :: ops :: Deref for CapsuleMesh { type Target = crate :: generated :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CapsuleMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PrimitiveMesh > for CapsuleMesh { } unsafe impl SubClass < crate :: generated :: Mesh > for CapsuleMesh { } unsafe impl SubClass < crate :: generated :: Resource > for CapsuleMesh { } unsafe impl SubClass < crate :: generated :: Reference > for CapsuleMesh { } unsafe impl SubClass < crate :: generated :: Object > for CapsuleMesh { } impl Instanciable for CapsuleMesh { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CapsuleMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CapsuleMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_mid_height : * mut sys :: godot_method_bind , pub get_radial_segments : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub get_rings : * mut sys :: godot_method_bind , pub set_mid_height : * mut sys :: godot_method_bind , pub set_radial_segments : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind , pub set_rings : * mut sys :: godot_method_bind } impl CapsuleMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CapsuleMeshMethodTable = CapsuleMeshMethodTable { class_constructor : None , get_mid_height : 0 as * mut sys :: godot_method_bind , get_radial_segments : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , get_rings : 0 as * mut sys :: godot_method_bind , set_mid_height : 0 as * mut sys :: godot_method_bind , set_radial_segments : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind , set_rings : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CapsuleMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CapsuleMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_mid_height = (gd_api . godot_method_bind_get_method) (class_name , "get_mid_height\0" . as_ptr () as * const c_char) ; table . get_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_radial_segments\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . get_rings = (gd_api . godot_method_bind_get_method) (class_name , "get_rings\0" . as_ptr () as * const c_char) ; table . set_mid_height = (gd_api . godot_method_bind_get_method) (class_name , "set_mid_height\0" . as_ptr () as * const c_char) ; table . set_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "set_radial_segments\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; table . set_rings = (gd_api . godot_method_bind_get_method) (class_name , "set_rings\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::capsule_mesh::private::CapsuleMesh;
            
            pub(crate) mod capsule_shape {
                # ! [doc = "This module contains types related to the API class [`CapsuleShape`][super::CapsuleShape]."] pub (crate) mod private { # [doc = "`core class CapsuleShape` inherits `Shape` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_capsuleshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCapsuleShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CapsuleShape { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CapsuleShape ; impl CapsuleShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CapsuleShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The capsule's height."] # [doc = ""] # [inline] pub fn height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShapeMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The capsule's radius."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShapeMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The capsule's height."] # [doc = ""] # [inline] pub fn set_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShapeMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = "The capsule's radius."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShapeMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CapsuleShape { } unsafe impl GodotObject for CapsuleShape { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CapsuleShape" } } impl std :: ops :: Deref for CapsuleShape { type Target = crate :: generated :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CapsuleShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape > for CapsuleShape { } unsafe impl SubClass < crate :: generated :: Resource > for CapsuleShape { } unsafe impl SubClass < crate :: generated :: Reference > for CapsuleShape { } unsafe impl SubClass < crate :: generated :: Object > for CapsuleShape { } impl Instanciable for CapsuleShape { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CapsuleShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CapsuleShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_height : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind } impl CapsuleShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CapsuleShapeMethodTable = CapsuleShapeMethodTable { class_constructor : None , get_height : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CapsuleShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CapsuleShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::capsule_shape::private::CapsuleShape;
            
            pub(crate) mod capsule_shape_2d {
                # ! [doc = "This module contains types related to the API class [`CapsuleShape2D`][super::CapsuleShape2D]."] pub (crate) mod private { # [doc = "`core class CapsuleShape2D` inherits `Shape2D` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_capsuleshape2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCapsuleShape2D inherits methods from:\n - [Shape2D](struct.Shape2D.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CapsuleShape2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CapsuleShape2D ; impl CapsuleShape2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CapsuleShape2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The capsule's height."] # [doc = ""] # [inline] pub fn height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShape2DMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The capsule's radius."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShape2DMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The capsule's height."] # [doc = ""] # [inline] pub fn set_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShape2DMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = "The capsule's radius."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CapsuleShape2DMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CapsuleShape2D { } unsafe impl GodotObject for CapsuleShape2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CapsuleShape2D" } } impl std :: ops :: Deref for CapsuleShape2D { type Target = crate :: generated :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CapsuleShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape2D > for CapsuleShape2D { } unsafe impl SubClass < crate :: generated :: Resource > for CapsuleShape2D { } unsafe impl SubClass < crate :: generated :: Reference > for CapsuleShape2D { } unsafe impl SubClass < crate :: generated :: Object > for CapsuleShape2D { } impl Instanciable for CapsuleShape2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CapsuleShape2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CapsuleShape2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_height : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind } impl CapsuleShape2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CapsuleShape2DMethodTable = CapsuleShape2DMethodTable { class_constructor : None , get_height : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CapsuleShape2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CapsuleShape2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::capsule_shape_2d::private::CapsuleShape2D;
            
            pub(crate) mod center_container {
                # ! [doc = "This module contains types related to the API class [`CenterContainer`][super::CenterContainer]."] pub (crate) mod private { # [doc = "`core class CenterContainer` inherits `Container` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_centercontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CenterContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CenterContainer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCenterContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CenterContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CenterContainer ; impl CenterContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CenterContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, centers children relative to the [`CenterContainer`][CenterContainer]'s top left corner."] # [doc = ""] # [inline] pub fn is_using_top_left (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CenterContainerMethodTable :: get (get_api ()) . is_using_top_left ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, centers children relative to the [`CenterContainer`][CenterContainer]'s top left corner."] # [doc = ""] # [inline] pub fn set_use_top_left (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CenterContainerMethodTable :: get (get_api ()) . set_use_top_left ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CenterContainer { } unsafe impl GodotObject for CenterContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CenterContainer" } } impl QueueFree for CenterContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CenterContainer { type Target = crate :: generated :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CenterContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Container > for CenterContainer { } unsafe impl SubClass < crate :: generated :: Control > for CenterContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for CenterContainer { } unsafe impl SubClass < crate :: generated :: Node > for CenterContainer { } unsafe impl SubClass < crate :: generated :: Object > for CenterContainer { } impl Instanciable for CenterContainer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CenterContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CenterContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_using_top_left : * mut sys :: godot_method_bind , pub set_use_top_left : * mut sys :: godot_method_bind } impl CenterContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CenterContainerMethodTable = CenterContainerMethodTable { class_constructor : None , is_using_top_left : 0 as * mut sys :: godot_method_bind , set_use_top_left : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CenterContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CenterContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_using_top_left = (gd_api . godot_method_bind_get_method) (class_name , "is_using_top_left\0" . as_ptr () as * const c_char) ; table . set_use_top_left = (gd_api . godot_method_bind_get_method) (class_name , "set_use_top_left\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::center_container::private::CenterContainer;
            
            pub(crate) mod char_fx_transform {
                # ! [doc = "This module contains types related to the API class [`CharFXTransform`][super::CharFXTransform]."] pub (crate) mod private { # [doc = "`core class CharFXTransform` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_charfxtransform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCharFXTransform inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CharFXTransform { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CharFXTransform ; impl CharFXTransform { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CharFXTransformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The index of the current character (starting from 0) for the [`RichTextLabel`][RichTextLabel]'s BBCode text. Setting this property won't affect drawing."] # [doc = ""] # [inline] pub fn absolute_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . get_absolute_index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nThe Unicode codepoint the character will use. This only affects non-whitespace characters. [method @GDScript.ord] can be useful here. For example, the following will replace all characters with asterisks:\n```gdscript\n# `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`.\n# See the RichTextEffect documentation for details.\nchar_fx.character = ord(\"*\")\n```"] # [doc = ""] # [inline] pub fn character (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . get_character ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The color the character will be drawn with."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The time elapsed since the [`RichTextLabel`][RichTextLabel] was added to the scene tree (in seconds). Time stops when the [`RichTextLabel`][RichTextLabel] is paused (see [`Node.pause_mode`][Node::pause_mode]). Resets when the text in the [`RichTextLabel`][RichTextLabel] is changed.\n**Note:** Time still passes while the [`RichTextLabel`][RichTextLabel] is hidden."] # [doc = ""] # [inline] pub fn elapsed_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . get_elapsed_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nContains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as [`bool`][bool], [`int`][int] or [`float`][float], they will be converted automatically. Color codes in the form `#rrggbb` or `#rgb` will be converted to an opaque [`Color`][Color]. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string.\nFor example, the opening BBCode tag `[example foo=hello bar=true baz=42 color=#ffffff]` will map to the following [`Dictionary`][Dictionary]:\n```gdscript\n{\"foo\": \"hello\", \"bar\": true, \"baz\": 42, \"color\": Color(1, 1, 1, 1)}\n```"] # [doc = ""] # [inline] pub fn environment (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . get_environment ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The position offset the character will be drawn with (in pixels)."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The index of the current character (starting from 0) for this [`RichTextEffect`][RichTextEffect] custom block. Setting this property won't affect drawing."] # [doc = ""] # [inline] pub fn relative_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . get_relative_index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the character will be drawn. If `false`, the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [`color`][Self::color] to `Color(1, 1, 1, 0)` instead."] # [doc = ""] # [inline] pub fn is_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . is_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The index of the current character (starting from 0) for the [`RichTextLabel`][RichTextLabel]'s BBCode text. Setting this property won't affect drawing."] # [doc = ""] # [inline] pub fn set_absolute_index (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_absolute_index ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nThe Unicode codepoint the character will use. This only affects non-whitespace characters. [method @GDScript.ord] can be useful here. For example, the following will replace all characters with asterisks:\n```gdscript\n# `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`.\n# See the RichTextEffect documentation for details.\nchar_fx.character = ord(\"*\")\n```"] # [doc = ""] # [inline] pub fn set_character (& self , character : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_character ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , character as _) ; } } # [doc = "The color the character will be drawn with."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The time elapsed since the [`RichTextLabel`][RichTextLabel] was added to the scene tree (in seconds). Time stops when the [`RichTextLabel`][RichTextLabel] is paused (see [`Node.pause_mode`][Node::pause_mode]). Resets when the text in the [`RichTextLabel`][RichTextLabel] is changed.\n**Note:** Time still passes while the [`RichTextLabel`][RichTextLabel] is hidden."] # [doc = ""] # [inline] pub fn set_elapsed_time (& self , time : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_elapsed_time ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , time as _) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nContains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as [`bool`][bool], [`int`][int] or [`float`][float], they will be converted automatically. Color codes in the form `#rrggbb` or `#rgb` will be converted to an opaque [`Color`][Color]. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string.\nFor example, the opening BBCode tag `[example foo=hello bar=true baz=42 color=#ffffff]` will map to the following [`Dictionary`][Dictionary]:\n```gdscript\n{\"foo\": \"hello\", \"bar\": true, \"baz\": 42, \"color\": Color(1, 1, 1, 1)}\n```"] # [doc = ""] # [inline] pub fn set_environment (& self , environment : Dictionary) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_environment ; let ret = crate :: icalls :: icallvar__dict (method_bind , self . this . sys () . as_ptr () , environment) ; } } # [doc = "The position offset the character will be drawn with (in pixels)."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The index of the current character (starting from 0) for this [`RichTextEffect`][RichTextEffect] custom block. Setting this property won't affect drawing."] # [doc = ""] # [inline] pub fn set_relative_index (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_relative_index ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } # [doc = "If `true`, the character will be drawn. If `false`, the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [`color`][Self::color] to `Color(1, 1, 1, 0)` instead."] # [doc = ""] # [inline] pub fn set_visibility (& self , visibility : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CharFXTransformMethodTable :: get (get_api ()) . set_visibility ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , visibility as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CharFXTransform { } unsafe impl GodotObject for CharFXTransform { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CharFXTransform" } } impl std :: ops :: Deref for CharFXTransform { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CharFXTransform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for CharFXTransform { } unsafe impl SubClass < crate :: generated :: Object > for CharFXTransform { } impl Instanciable for CharFXTransform { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CharFXTransform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CharFXTransformMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_absolute_index : * mut sys :: godot_method_bind , pub get_character : * mut sys :: godot_method_bind , pub get_color : * mut sys :: godot_method_bind , pub get_elapsed_time : * mut sys :: godot_method_bind , pub get_environment : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_relative_index : * mut sys :: godot_method_bind , pub is_visible : * mut sys :: godot_method_bind , pub set_absolute_index : * mut sys :: godot_method_bind , pub set_character : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_elapsed_time : * mut sys :: godot_method_bind , pub set_environment : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_relative_index : * mut sys :: godot_method_bind , pub set_visibility : * mut sys :: godot_method_bind } impl CharFXTransformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CharFXTransformMethodTable = CharFXTransformMethodTable { class_constructor : None , get_absolute_index : 0 as * mut sys :: godot_method_bind , get_character : 0 as * mut sys :: godot_method_bind , get_color : 0 as * mut sys :: godot_method_bind , get_elapsed_time : 0 as * mut sys :: godot_method_bind , get_environment : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_relative_index : 0 as * mut sys :: godot_method_bind , is_visible : 0 as * mut sys :: godot_method_bind , set_absolute_index : 0 as * mut sys :: godot_method_bind , set_character : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_elapsed_time : 0 as * mut sys :: godot_method_bind , set_environment : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_relative_index : 0 as * mut sys :: godot_method_bind , set_visibility : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CharFXTransformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CharFXTransform\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_absolute_index = (gd_api . godot_method_bind_get_method) (class_name , "get_absolute_index\0" . as_ptr () as * const c_char) ; table . get_character = (gd_api . godot_method_bind_get_method) (class_name , "get_character\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_elapsed_time = (gd_api . godot_method_bind_get_method) (class_name , "get_elapsed_time\0" . as_ptr () as * const c_char) ; table . get_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_environment\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_relative_index = (gd_api . godot_method_bind_get_method) (class_name , "get_relative_index\0" . as_ptr () as * const c_char) ; table . is_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_visible\0" . as_ptr () as * const c_char) ; table . set_absolute_index = (gd_api . godot_method_bind_get_method) (class_name , "set_absolute_index\0" . as_ptr () as * const c_char) ; table . set_character = (gd_api . godot_method_bind_get_method) (class_name , "set_character\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_elapsed_time = (gd_api . godot_method_bind_get_method) (class_name , "set_elapsed_time\0" . as_ptr () as * const c_char) ; table . set_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_environment\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_relative_index = (gd_api . godot_method_bind_get_method) (class_name , "set_relative_index\0" . as_ptr () as * const c_char) ; table . set_visibility = (gd_api . godot_method_bind_get_method) (class_name , "set_visibility\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::char_fx_transform::private::CharFXTransform;
            
            pub(crate) mod check_box {
                # ! [doc = "This module contains types related to the API class [`CheckBox`][super::CheckBox]."] pub (crate) mod private { # [doc = "`core class CheckBox` inherits `Button` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_checkbox.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CheckBox` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CheckBox>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCheckBox inherits methods from:\n - [Button](struct.Button.html)\n - [BaseButton](struct.BaseButton.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CheckBox { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CheckBox ; impl CheckBox { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CheckBoxMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for CheckBox { } unsafe impl GodotObject for CheckBox { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CheckBox" } } impl QueueFree for CheckBox { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CheckBox { type Target = crate :: generated :: Button ; # [inline] fn deref (& self) -> & crate :: generated :: Button { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CheckBox { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Button { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Button > for CheckBox { } unsafe impl SubClass < crate :: generated :: BaseButton > for CheckBox { } unsafe impl SubClass < crate :: generated :: Control > for CheckBox { } unsafe impl SubClass < crate :: generated :: CanvasItem > for CheckBox { } unsafe impl SubClass < crate :: generated :: Node > for CheckBox { } unsafe impl SubClass < crate :: generated :: Object > for CheckBox { } impl Instanciable for CheckBox { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CheckBox :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CheckBoxMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl CheckBoxMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CheckBoxMethodTable = CheckBoxMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CheckBoxMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CheckBox\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::check_box::private::CheckBox;
            
            pub(crate) mod check_button {
                # ! [doc = "This module contains types related to the API class [`CheckButton`][super::CheckButton]."] pub (crate) mod private { # [doc = "`core class CheckButton` inherits `Button` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_checkbutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CheckButton` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CheckButton>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCheckButton inherits methods from:\n - [Button](struct.Button.html)\n - [BaseButton](struct.BaseButton.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CheckButton { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CheckButton ; impl CheckButton { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CheckButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for CheckButton { } unsafe impl GodotObject for CheckButton { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CheckButton" } } impl QueueFree for CheckButton { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CheckButton { type Target = crate :: generated :: Button ; # [inline] fn deref (& self) -> & crate :: generated :: Button { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CheckButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Button { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Button > for CheckButton { } unsafe impl SubClass < crate :: generated :: BaseButton > for CheckButton { } unsafe impl SubClass < crate :: generated :: Control > for CheckButton { } unsafe impl SubClass < crate :: generated :: CanvasItem > for CheckButton { } unsafe impl SubClass < crate :: generated :: Node > for CheckButton { } unsafe impl SubClass < crate :: generated :: Object > for CheckButton { } impl Instanciable for CheckButton { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CheckButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CheckButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl CheckButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CheckButtonMethodTable = CheckButtonMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CheckButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CheckButton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::check_button::private::CheckButton;
            
            pub(crate) mod circle_shape_2d {
                # ! [doc = "This module contains types related to the API class [`CircleShape2D`][super::CircleShape2D]."] pub (crate) mod private { # [doc = "`core class CircleShape2D` inherits `Shape2D` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_circleshape2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCircleShape2D inherits methods from:\n - [Shape2D](struct.Shape2D.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CircleShape2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CircleShape2D ; impl CircleShape2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CircleShape2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The circle's radius."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CircleShape2DMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The circle's radius."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CircleShape2DMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CircleShape2D { } unsafe impl GodotObject for CircleShape2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CircleShape2D" } } impl std :: ops :: Deref for CircleShape2D { type Target = crate :: generated :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CircleShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape2D > for CircleShape2D { } unsafe impl SubClass < crate :: generated :: Resource > for CircleShape2D { } unsafe impl SubClass < crate :: generated :: Reference > for CircleShape2D { } unsafe impl SubClass < crate :: generated :: Object > for CircleShape2D { } impl Instanciable for CircleShape2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CircleShape2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CircleShape2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_radius : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind } impl CircleShape2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CircleShape2DMethodTable = CircleShape2DMethodTable { class_constructor : None , get_radius : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CircleShape2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CircleShape2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::circle_shape_2d::private::CircleShape2D;
            
            pub mod clipped_camera {
                # ! [doc = "This module contains types related to the API class [`ClippedCamera`][super::ClippedCamera]."] pub (crate) mod private { # [doc = "`core class ClippedCamera` inherits `Camera` (manually managed).\n\nThis class has related types in the [`clipped_camera`][super::clipped_camera] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_clippedcamera.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ClippedCamera` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ClippedCamera>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nClippedCamera inherits methods from:\n - [Camera](struct.Camera.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ClippedCamera { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ClippedCamera ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ProcessMode (pub i64) ; impl ProcessMode { pub const PHYSICS : ProcessMode = ProcessMode (0i64) ; pub const IDLE : ProcessMode = ProcessMode (1i64) ; } impl From < i64 > for ProcessMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ProcessMode > for i64 { # [inline] fn from (v : ProcessMode) -> Self { v . 0 } } impl FromVariant for ProcessMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ClippedCamera { pub const CLIP_PROCESS_PHYSICS : i64 = 0i64 ; pub const CLIP_PROCESS_IDLE : i64 = 1i64 ; } impl ClippedCamera { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ClippedCameraMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a collision exception so the camera does not collide with the specified node."] # [doc = ""] # [inline] pub fn add_exception (& self , node : impl AsArg < crate :: generated :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . add_exception ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Adds a collision exception so the camera does not collide with the specified [`RID`][Rid]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn add_exception_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . add_exception_rid ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Removes all collision exceptions."] # [doc = ""] # [inline] pub fn clear_exceptions (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . clear_exceptions ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the distance the camera has been offset due to a collision."] # [doc = ""] # [inline] pub fn get_clip_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . get_clip_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the specified bit index is on.\n**Note:** Bit indices range from 0-19."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The camera's collision margin. The camera can't get closer than this distance to a colliding object."] # [doc = ""] # [inline] pub fn margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The camera's process callback. See [`ProcessMode`][ProcessMode]."] # [doc = ""] # [inline] pub fn process_mode (& self) -> crate :: generated :: clipped_camera :: ProcessMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . get_process_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: clipped_camera :: ProcessMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the camera stops on contact with [`Area`][Area]s."] # [doc = ""] # [inline] pub fn is_clip_to_areas_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . is_clip_to_areas_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the camera stops on contact with [`PhysicsBody`][PhysicsBody]s."] # [doc = ""] # [inline] pub fn is_clip_to_bodies_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . is_clip_to_bodies_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes a collision exception with the specified node."] # [doc = ""] # [inline] pub fn remove_exception (& self , node : impl AsArg < crate :: generated :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . remove_exception ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Removes a collision exception with the specified [`RID`][Rid]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn remove_exception_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . remove_exception_rid ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "If `true`, the camera stops on contact with [`Area`][Area]s."] # [doc = ""] # [inline] pub fn set_clip_to_areas (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . set_clip_to_areas ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the camera stops on contact with [`PhysicsBody`][PhysicsBody]s."] # [doc = ""] # [inline] pub fn set_clip_to_bodies (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . set_clip_to_bodies ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "Sets the specified bit index to the `value`.\n**Note:** Bit indices range from 0-19."] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = "The camera's collision margin. The camera can't get closer than this distance to a colliding object."] # [doc = ""] # [inline] pub fn set_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; } } # [doc = "The camera's process callback. See [`ProcessMode`][ProcessMode]."] # [doc = ""] # [inline] pub fn set_process_mode (& self , process_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ClippedCameraMethodTable :: get (get_api ()) . set_process_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , process_mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ClippedCamera { } unsafe impl GodotObject for ClippedCamera { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ClippedCamera" } } impl QueueFree for ClippedCamera { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ClippedCamera { type Target = crate :: generated :: Camera ; # [inline] fn deref (& self) -> & crate :: generated :: Camera { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ClippedCamera { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Camera { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Camera > for ClippedCamera { } unsafe impl SubClass < crate :: generated :: Spatial > for ClippedCamera { } unsafe impl SubClass < crate :: generated :: Node > for ClippedCamera { } unsafe impl SubClass < crate :: generated :: Object > for ClippedCamera { } impl Instanciable for ClippedCamera { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ClippedCamera :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ClippedCameraMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_exception : * mut sys :: godot_method_bind , pub add_exception_rid : * mut sys :: godot_method_bind , pub clear_exceptions : * mut sys :: godot_method_bind , pub get_clip_offset : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub get_process_mode : * mut sys :: godot_method_bind , pub is_clip_to_areas_enabled : * mut sys :: godot_method_bind , pub is_clip_to_bodies_enabled : * mut sys :: godot_method_bind , pub remove_exception : * mut sys :: godot_method_bind , pub remove_exception_rid : * mut sys :: godot_method_bind , pub set_clip_to_areas : * mut sys :: godot_method_bind , pub set_clip_to_bodies : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_margin : * mut sys :: godot_method_bind , pub set_process_mode : * mut sys :: godot_method_bind } impl ClippedCameraMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ClippedCameraMethodTable = ClippedCameraMethodTable { class_constructor : None , add_exception : 0 as * mut sys :: godot_method_bind , add_exception_rid : 0 as * mut sys :: godot_method_bind , clear_exceptions : 0 as * mut sys :: godot_method_bind , get_clip_offset : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , get_process_mode : 0 as * mut sys :: godot_method_bind , is_clip_to_areas_enabled : 0 as * mut sys :: godot_method_bind , is_clip_to_bodies_enabled : 0 as * mut sys :: godot_method_bind , remove_exception : 0 as * mut sys :: godot_method_bind , remove_exception_rid : 0 as * mut sys :: godot_method_bind , set_clip_to_areas : 0 as * mut sys :: godot_method_bind , set_clip_to_bodies : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_margin : 0 as * mut sys :: godot_method_bind , set_process_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ClippedCameraMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ClippedCamera\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_exception = (gd_api . godot_method_bind_get_method) (class_name , "add_exception\0" . as_ptr () as * const c_char) ; table . add_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "add_exception_rid\0" . as_ptr () as * const c_char) ; table . clear_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "clear_exceptions\0" . as_ptr () as * const c_char) ; table . get_clip_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_clip_offset\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . get_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_process_mode\0" . as_ptr () as * const c_char) ; table . is_clip_to_areas_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_clip_to_areas_enabled\0" . as_ptr () as * const c_char) ; table . is_clip_to_bodies_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_clip_to_bodies_enabled\0" . as_ptr () as * const c_char) ; table . remove_exception = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception\0" . as_ptr () as * const c_char) ; table . remove_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception_rid\0" . as_ptr () as * const c_char) ; table . set_clip_to_areas = (gd_api . godot_method_bind_get_method) (class_name , "set_clip_to_areas\0" . as_ptr () as * const c_char) ; table . set_clip_to_bodies = (gd_api . godot_method_bind_get_method) (class_name , "set_clip_to_bodies\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; table . set_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_process_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::clipped_camera::private::ClippedCamera;
            
            pub(crate) mod collision_object {
                # ! [doc = "This module contains types related to the API class [`CollisionObject`][super::CollisionObject]."] pub (crate) mod private { # [doc = "`core class CollisionObject` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_collisionobject.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nCollisionObject inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CollisionObject { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CollisionObject ; impl CollisionObject { # [doc = "Creates a new shape owner for the given object. Returns `owner_id` of the new owner for future reference."] # [doc = ""] # [inline] pub fn create_shape_owner (& self , owner : impl AsArg < crate :: generated :: Object >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . create_shape_owner ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , owner . as_arg_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the [`CollisionObject`][CollisionObject] will continue to receive input events as the mouse is dragged across its shapes."] # [doc = ""] # [inline] pub fn capture_input_on_drag (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . get_capture_input_on_drag ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The physics layers this CollisionObject3D is in. Collision objects can exist in one or more of 32 different layers. See also [`collision_mask`][Self::collision_mask].\n**Note:** A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns whether or not the specified `bit` of the [`collision_layer`][Self::collision_layer] is set."] # [doc = ""] # [inline] pub fn get_collision_layer_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . get_collision_layer_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The physics layers this CollisionObject3D scans. Collision objects can scan one or more of 32 different layers. See also [`collision_layer`][Self::collision_layer].\n**Note:** A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns whether or not the specified `bit` of the [`collision_mask`][Self::collision_mask] is set."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the object's [`RID`][Rid]."] # [doc = ""] # [inline] pub fn get_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . get_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an [`Array`][VariantArray] of `owner_id` identifiers. You can use these ids in other methods that take `owner_id` as an argument."] # [doc = ""] # [inline] pub fn get_shape_owners (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . get_shape_owners ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [`collision_layer`][Self::collision_layer] bit to be set."] # [doc = ""] # [inline] pub fn is_ray_pickable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . is_ray_pickable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the shape owner and its shapes are disabled."] # [doc = ""] # [inline] pub fn is_shape_owner_disabled (& self , owner_id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . is_shape_owner_disabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes the given shape owner."] # [doc = ""] # [inline] pub fn remove_shape_owner (& self , owner_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . remove_shape_owner ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _) ; } } # [doc = "If `true`, the [`CollisionObject`][CollisionObject] will continue to receive input events as the mouse is dragged across its shapes."] # [doc = ""] # [inline] pub fn set_capture_input_on_drag (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . set_capture_input_on_drag ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The physics layers this CollisionObject3D is in. Collision objects can exist in one or more of 32 different layers. See also [`collision_mask`][Self::collision_mask].\n**Note:** A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_layer (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , layer as _) ; } } # [doc = "If `value` is `true`, sets the specified `bit` in the [`collision_layer`][Self::collision_layer].\nIf `value` is `false`, clears the specified `bit` in the [`collision_layer`][Self::collision_layer]."] # [doc = ""] # [inline] pub fn set_collision_layer_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . set_collision_layer_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = "The physics layers this CollisionObject3D scans. Collision objects can scan one or more of 32 different layers. See also [`collision_layer`][Self::collision_layer].\n**Note:** A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "If `value` is `true`, sets the specified `bit` in the [`collision_mask`][Self::collision_mask].\nIf `value` is `false`, clears the specified `bit` in the [`collision_mask`][Self::collision_mask]."] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = "If `true`, this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [`collision_layer`][Self::collision_layer] bit to be set."] # [doc = ""] # [inline] pub fn set_ray_pickable (& self , ray_pickable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . set_ray_pickable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , ray_pickable as _) ; } } # [doc = "Returns the `owner_id` of the given shape."] # [doc = ""] # [inline] pub fn shape_find_owner (& self , shape_index : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_find_owner ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , shape_index as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Adds a [`Shape`][Shape] to the shape owner."] # [doc = ""] # [inline] pub fn shape_owner_add_shape (& self , owner_id : i64 , shape : impl AsArg < crate :: generated :: Shape >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_add_shape ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , owner_id as _ , shape . as_arg_ptr ()) ; } } # [doc = "Removes all shapes from the shape owner."] # [doc = ""] # [inline] pub fn shape_owner_clear_shapes (& self , owner_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_clear_shapes ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _) ; } } # [doc = "Returns the parent object of the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_get_owner (& self , owner_id : i64) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_get_owner ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`Shape`][Shape] with the given id from the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_get_shape (& self , owner_id : i64 , shape_id : i64) -> Option < Ref < crate :: generated :: Shape , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_get_shape ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _ , shape_id as _) ; < Option < Ref < crate :: generated :: Shape , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of shapes the given shape owner contains."] # [doc = ""] # [inline] pub fn shape_owner_get_shape_count (& self , owner_id : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_get_shape_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the child index of the [`Shape`][Shape] with the given id from the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_get_shape_index (& self , owner_id : i64 , shape_id : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_get_shape_index ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _ , shape_id as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the shape owner's [`Transform`][Transform]."] # [doc = ""] # [inline] pub fn shape_owner_get_transform (& self , owner_id : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_get_transform ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Removes a shape from the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_remove_shape (& self , owner_id : i64 , shape_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_remove_shape ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _ , shape_id as _) ; } } # [doc = "If `true`, disables the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_set_disabled (& self , owner_id : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_set_disabled ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , owner_id as _ , disabled as _) ; } } # [doc = "Sets the [`Transform`][Transform] of the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_set_transform (& self , owner_id : i64 , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObjectMethodTable :: get (get_api ()) . shape_owner_set_transform ; let ret = crate :: icalls :: icallvar__i64_trans (method_bind , self . this . sys () . as_ptr () , owner_id as _ , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CollisionObject { } unsafe impl GodotObject for CollisionObject { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CollisionObject" } } impl QueueFree for CollisionObject { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CollisionObject { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionObject { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for CollisionObject { } unsafe impl SubClass < crate :: generated :: Node > for CollisionObject { } unsafe impl SubClass < crate :: generated :: Object > for CollisionObject { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CollisionObjectMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create_shape_owner : * mut sys :: godot_method_bind , pub get_capture_input_on_drag : * mut sys :: godot_method_bind , pub get_collision_layer : * mut sys :: godot_method_bind , pub get_collision_layer_bit : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_rid : * mut sys :: godot_method_bind , pub get_shape_owners : * mut sys :: godot_method_bind , pub is_ray_pickable : * mut sys :: godot_method_bind , pub is_shape_owner_disabled : * mut sys :: godot_method_bind , pub remove_shape_owner : * mut sys :: godot_method_bind , pub set_capture_input_on_drag : * mut sys :: godot_method_bind , pub set_collision_layer : * mut sys :: godot_method_bind , pub set_collision_layer_bit : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_ray_pickable : * mut sys :: godot_method_bind , pub shape_find_owner : * mut sys :: godot_method_bind , pub shape_owner_add_shape : * mut sys :: godot_method_bind , pub shape_owner_clear_shapes : * mut sys :: godot_method_bind , pub shape_owner_get_owner : * mut sys :: godot_method_bind , pub shape_owner_get_shape : * mut sys :: godot_method_bind , pub shape_owner_get_shape_count : * mut sys :: godot_method_bind , pub shape_owner_get_shape_index : * mut sys :: godot_method_bind , pub shape_owner_get_transform : * mut sys :: godot_method_bind , pub shape_owner_remove_shape : * mut sys :: godot_method_bind , pub shape_owner_set_disabled : * mut sys :: godot_method_bind , pub shape_owner_set_transform : * mut sys :: godot_method_bind } impl CollisionObjectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CollisionObjectMethodTable = CollisionObjectMethodTable { class_constructor : None , create_shape_owner : 0 as * mut sys :: godot_method_bind , get_capture_input_on_drag : 0 as * mut sys :: godot_method_bind , get_collision_layer : 0 as * mut sys :: godot_method_bind , get_collision_layer_bit : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_rid : 0 as * mut sys :: godot_method_bind , get_shape_owners : 0 as * mut sys :: godot_method_bind , is_ray_pickable : 0 as * mut sys :: godot_method_bind , is_shape_owner_disabled : 0 as * mut sys :: godot_method_bind , remove_shape_owner : 0 as * mut sys :: godot_method_bind , set_capture_input_on_drag : 0 as * mut sys :: godot_method_bind , set_collision_layer : 0 as * mut sys :: godot_method_bind , set_collision_layer_bit : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_ray_pickable : 0 as * mut sys :: godot_method_bind , shape_find_owner : 0 as * mut sys :: godot_method_bind , shape_owner_add_shape : 0 as * mut sys :: godot_method_bind , shape_owner_clear_shapes : 0 as * mut sys :: godot_method_bind , shape_owner_get_owner : 0 as * mut sys :: godot_method_bind , shape_owner_get_shape : 0 as * mut sys :: godot_method_bind , shape_owner_get_shape_count : 0 as * mut sys :: godot_method_bind , shape_owner_get_shape_index : 0 as * mut sys :: godot_method_bind , shape_owner_get_transform : 0 as * mut sys :: godot_method_bind , shape_owner_remove_shape : 0 as * mut sys :: godot_method_bind , shape_owner_set_disabled : 0 as * mut sys :: godot_method_bind , shape_owner_set_transform : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CollisionObjectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CollisionObject\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create_shape_owner = (gd_api . godot_method_bind_get_method) (class_name , "create_shape_owner\0" . as_ptr () as * const c_char) ; table . get_capture_input_on_drag = (gd_api . godot_method_bind_get_method) (class_name , "get_capture_input_on_drag\0" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\0" . as_ptr () as * const c_char) ; table . get_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_rid\0" . as_ptr () as * const c_char) ; table . get_shape_owners = (gd_api . godot_method_bind_get_method) (class_name , "get_shape_owners\0" . as_ptr () as * const c_char) ; table . is_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "is_ray_pickable\0" . as_ptr () as * const c_char) ; table . is_shape_owner_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_shape_owner_disabled\0" . as_ptr () as * const c_char) ; table . remove_shape_owner = (gd_api . godot_method_bind_get_method) (class_name , "remove_shape_owner\0" . as_ptr () as * const c_char) ; table . set_capture_input_on_drag = (gd_api . godot_method_bind_get_method) (class_name , "set_capture_input_on_drag\0" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\0" . as_ptr () as * const c_char) ; table . set_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "set_ray_pickable\0" . as_ptr () as * const c_char) ; table . shape_find_owner = (gd_api . godot_method_bind_get_method) (class_name , "shape_find_owner\0" . as_ptr () as * const c_char) ; table . shape_owner_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_add_shape\0" . as_ptr () as * const c_char) ; table . shape_owner_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_clear_shapes\0" . as_ptr () as * const c_char) ; table . shape_owner_get_owner = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_owner\0" . as_ptr () as * const c_char) ; table . shape_owner_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_shape\0" . as_ptr () as * const c_char) ; table . shape_owner_get_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_shape_count\0" . as_ptr () as * const c_char) ; table . shape_owner_get_shape_index = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_shape_index\0" . as_ptr () as * const c_char) ; table . shape_owner_get_transform = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_transform\0" . as_ptr () as * const c_char) ; table . shape_owner_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_remove_shape\0" . as_ptr () as * const c_char) ; table . shape_owner_set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_set_disabled\0" . as_ptr () as * const c_char) ; table . shape_owner_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_set_transform\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::collision_object::private::CollisionObject;
            
            pub(crate) mod collision_object_2d {
                # ! [doc = "This module contains types related to the API class [`CollisionObject2D`][super::CollisionObject2D]."] pub (crate) mod private { # [doc = "`core class CollisionObject2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_collisionobject2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nCollisionObject2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CollisionObject2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CollisionObject2D ; impl CollisionObject2D { # [doc = "Creates a new shape owner for the given object. Returns `owner_id` of the new owner for future reference."] # [doc = ""] # [inline] pub fn create_shape_owner (& self , owner : impl AsArg < crate :: generated :: Object >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . create_shape_owner ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , owner . as_arg_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The physics layers this CollisionObject2D is in. Collision objects can exist in one or more of 32 different layers. See also [`collision_mask`][Self::collision_mask].\n**Note:** A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns whether or not the specified `bit` of the [`collision_layer`][Self::collision_layer] is set."] # [doc = ""] # [inline] pub fn get_collision_layer_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . get_collision_layer_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [`collision_layer`][Self::collision_layer].\n**Note:** A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns whether or not the specified `bit` of the [`collision_mask`][Self::collision_mask] is set."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the object's [`RID`][Rid]."] # [doc = ""] # [inline] pub fn get_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . get_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the `one_way_collision_margin` of the shape owner identified by given `owner_id`."] # [doc = ""] # [inline] pub fn get_shape_owner_one_way_collision_margin (& self , owner_id : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . get_shape_owner_one_way_collision_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an [`Array`][VariantArray] of `owner_id` identifiers. You can use these ids in other methods that take `owner_id` as an argument."] # [doc = ""] # [inline] pub fn get_shape_owners (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . get_shape_owners ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [`collision_layer`][Self::collision_layer] bit to be set."] # [doc = ""] # [inline] pub fn is_pickable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . is_pickable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the shape owner and its shapes are disabled."] # [doc = ""] # [inline] pub fn is_shape_owner_disabled (& self , owner_id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . is_shape_owner_disabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if collisions for the shape owner originating from this [`CollisionObject2D`][CollisionObject2D] will not be reported to collided with [`CollisionObject2D`][CollisionObject2D]s."] # [doc = ""] # [inline] pub fn is_shape_owner_one_way_collision_enabled (& self , owner_id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . is_shape_owner_one_way_collision_enabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes the given shape owner."] # [doc = ""] # [inline] pub fn remove_shape_owner (& self , owner_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . remove_shape_owner ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _) ; } } # [doc = "The physics layers this CollisionObject2D is in. Collision objects can exist in one or more of 32 different layers. See also [`collision_mask`][Self::collision_mask].\n**Note:** A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_layer (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , layer as _) ; } } # [doc = "If `value` is `true`, sets the specified `bit` in the [`collision_layer`][Self::collision_layer].\nIf `value` is `false`, clears the specified `bit` in the [`collision_layer`][Self::collision_layer]."] # [doc = ""] # [inline] pub fn set_collision_layer_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . set_collision_layer_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = "The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [`collision_layer`][Self::collision_layer].\n**Note:** A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "If `value` is `true`, sets the specified `bit` in the [`collision_mask`][Self::collision_mask].\nIf `value` is `false`, clears the specified `bit` in the [`collision_mask`][Self::collision_mask]."] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = "If `true`, this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [`collision_layer`][Self::collision_layer] bit to be set."] # [doc = ""] # [inline] pub fn set_pickable (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . set_pickable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Returns the `owner_id` of the given shape."] # [doc = ""] # [inline] pub fn shape_find_owner (& self , shape_index : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_find_owner ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , shape_index as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Adds a [`Shape2D`][Shape2D] to the shape owner."] # [doc = ""] # [inline] pub fn shape_owner_add_shape (& self , owner_id : i64 , shape : impl AsArg < crate :: generated :: Shape2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_owner_add_shape ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , owner_id as _ , shape . as_arg_ptr ()) ; } } # [doc = "Removes all shapes from the shape owner."] # [doc = ""] # [inline] pub fn shape_owner_clear_shapes (& self , owner_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_owner_clear_shapes ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _) ; } } # [doc = "Returns the parent object of the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_get_owner (& self , owner_id : i64) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_owner_get_owner ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`Shape2D`][Shape2D] with the given id from the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_get_shape (& self , owner_id : i64 , shape_id : i64) -> Option < Ref < crate :: generated :: Shape2D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_owner_get_shape ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _ , shape_id as _) ; < Option < Ref < crate :: generated :: Shape2D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of shapes the given shape owner contains."] # [doc = ""] # [inline] pub fn shape_owner_get_shape_count (& self , owner_id : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_owner_get_shape_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the child index of the [`Shape2D`][Shape2D] with the given id from the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_get_shape_index (& self , owner_id : i64 , shape_id : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_owner_get_shape_index ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _ , shape_id as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the shape owner's [`Transform2D`][Transform2D]."] # [doc = ""] # [inline] pub fn shape_owner_get_transform (& self , owner_id : i64) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_owner_get_transform ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Removes a shape from the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_remove_shape (& self , owner_id : i64 , shape_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_owner_remove_shape ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , owner_id as _ , shape_id as _) ; } } # [doc = "If `true`, disables the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_set_disabled (& self , owner_id : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_owner_set_disabled ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , owner_id as _ , disabled as _) ; } } # [doc = "If `enable` is `true`, collisions for the shape owner originating from this [`CollisionObject2D`][CollisionObject2D] will not be reported to collided with [`CollisionObject2D`][CollisionObject2D]s."] # [doc = ""] # [inline] pub fn shape_owner_set_one_way_collision (& self , owner_id : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_owner_set_one_way_collision ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , owner_id as _ , enable as _) ; } } # [doc = "Sets the `one_way_collision_margin` of the shape owner identified by given `owner_id` to `margin` pixels."] # [doc = ""] # [inline] pub fn shape_owner_set_one_way_collision_margin (& self , owner_id : i64 , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_owner_set_one_way_collision_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , owner_id as _ , margin as _) ; } } # [doc = "Sets the [`Transform2D`][Transform2D] of the given shape owner."] # [doc = ""] # [inline] pub fn shape_owner_set_transform (& self , owner_id : i64 , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionObject2DMethodTable :: get (get_api ()) . shape_owner_set_transform ; let ret = crate :: icalls :: icallvar__i64_trans2D (method_bind , self . this . sys () . as_ptr () , owner_id as _ , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CollisionObject2D { } unsafe impl GodotObject for CollisionObject2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CollisionObject2D" } } impl QueueFree for CollisionObject2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CollisionObject2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionObject2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for CollisionObject2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for CollisionObject2D { } unsafe impl SubClass < crate :: generated :: Node > for CollisionObject2D { } unsafe impl SubClass < crate :: generated :: Object > for CollisionObject2D { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CollisionObject2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create_shape_owner : * mut sys :: godot_method_bind , pub get_collision_layer : * mut sys :: godot_method_bind , pub get_collision_layer_bit : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_rid : * mut sys :: godot_method_bind , pub get_shape_owner_one_way_collision_margin : * mut sys :: godot_method_bind , pub get_shape_owners : * mut sys :: godot_method_bind , pub is_pickable : * mut sys :: godot_method_bind , pub is_shape_owner_disabled : * mut sys :: godot_method_bind , pub is_shape_owner_one_way_collision_enabled : * mut sys :: godot_method_bind , pub remove_shape_owner : * mut sys :: godot_method_bind , pub set_collision_layer : * mut sys :: godot_method_bind , pub set_collision_layer_bit : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_pickable : * mut sys :: godot_method_bind , pub shape_find_owner : * mut sys :: godot_method_bind , pub shape_owner_add_shape : * mut sys :: godot_method_bind , pub shape_owner_clear_shapes : * mut sys :: godot_method_bind , pub shape_owner_get_owner : * mut sys :: godot_method_bind , pub shape_owner_get_shape : * mut sys :: godot_method_bind , pub shape_owner_get_shape_count : * mut sys :: godot_method_bind , pub shape_owner_get_shape_index : * mut sys :: godot_method_bind , pub shape_owner_get_transform : * mut sys :: godot_method_bind , pub shape_owner_remove_shape : * mut sys :: godot_method_bind , pub shape_owner_set_disabled : * mut sys :: godot_method_bind , pub shape_owner_set_one_way_collision : * mut sys :: godot_method_bind , pub shape_owner_set_one_way_collision_margin : * mut sys :: godot_method_bind , pub shape_owner_set_transform : * mut sys :: godot_method_bind } impl CollisionObject2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CollisionObject2DMethodTable = CollisionObject2DMethodTable { class_constructor : None , create_shape_owner : 0 as * mut sys :: godot_method_bind , get_collision_layer : 0 as * mut sys :: godot_method_bind , get_collision_layer_bit : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_rid : 0 as * mut sys :: godot_method_bind , get_shape_owner_one_way_collision_margin : 0 as * mut sys :: godot_method_bind , get_shape_owners : 0 as * mut sys :: godot_method_bind , is_pickable : 0 as * mut sys :: godot_method_bind , is_shape_owner_disabled : 0 as * mut sys :: godot_method_bind , is_shape_owner_one_way_collision_enabled : 0 as * mut sys :: godot_method_bind , remove_shape_owner : 0 as * mut sys :: godot_method_bind , set_collision_layer : 0 as * mut sys :: godot_method_bind , set_collision_layer_bit : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_pickable : 0 as * mut sys :: godot_method_bind , shape_find_owner : 0 as * mut sys :: godot_method_bind , shape_owner_add_shape : 0 as * mut sys :: godot_method_bind , shape_owner_clear_shapes : 0 as * mut sys :: godot_method_bind , shape_owner_get_owner : 0 as * mut sys :: godot_method_bind , shape_owner_get_shape : 0 as * mut sys :: godot_method_bind , shape_owner_get_shape_count : 0 as * mut sys :: godot_method_bind , shape_owner_get_shape_index : 0 as * mut sys :: godot_method_bind , shape_owner_get_transform : 0 as * mut sys :: godot_method_bind , shape_owner_remove_shape : 0 as * mut sys :: godot_method_bind , shape_owner_set_disabled : 0 as * mut sys :: godot_method_bind , shape_owner_set_one_way_collision : 0 as * mut sys :: godot_method_bind , shape_owner_set_one_way_collision_margin : 0 as * mut sys :: godot_method_bind , shape_owner_set_transform : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CollisionObject2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CollisionObject2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create_shape_owner = (gd_api . godot_method_bind_get_method) (class_name , "create_shape_owner\0" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\0" . as_ptr () as * const c_char) ; table . get_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_rid\0" . as_ptr () as * const c_char) ; table . get_shape_owner_one_way_collision_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_shape_owner_one_way_collision_margin\0" . as_ptr () as * const c_char) ; table . get_shape_owners = (gd_api . godot_method_bind_get_method) (class_name , "get_shape_owners\0" . as_ptr () as * const c_char) ; table . is_pickable = (gd_api . godot_method_bind_get_method) (class_name , "is_pickable\0" . as_ptr () as * const c_char) ; table . is_shape_owner_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_shape_owner_disabled\0" . as_ptr () as * const c_char) ; table . is_shape_owner_one_way_collision_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_shape_owner_one_way_collision_enabled\0" . as_ptr () as * const c_char) ; table . remove_shape_owner = (gd_api . godot_method_bind_get_method) (class_name , "remove_shape_owner\0" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\0" . as_ptr () as * const c_char) ; table . set_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_pickable = (gd_api . godot_method_bind_get_method) (class_name , "set_pickable\0" . as_ptr () as * const c_char) ; table . shape_find_owner = (gd_api . godot_method_bind_get_method) (class_name , "shape_find_owner\0" . as_ptr () as * const c_char) ; table . shape_owner_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_add_shape\0" . as_ptr () as * const c_char) ; table . shape_owner_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_clear_shapes\0" . as_ptr () as * const c_char) ; table . shape_owner_get_owner = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_owner\0" . as_ptr () as * const c_char) ; table . shape_owner_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_shape\0" . as_ptr () as * const c_char) ; table . shape_owner_get_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_shape_count\0" . as_ptr () as * const c_char) ; table . shape_owner_get_shape_index = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_shape_index\0" . as_ptr () as * const c_char) ; table . shape_owner_get_transform = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_get_transform\0" . as_ptr () as * const c_char) ; table . shape_owner_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_remove_shape\0" . as_ptr () as * const c_char) ; table . shape_owner_set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_set_disabled\0" . as_ptr () as * const c_char) ; table . shape_owner_set_one_way_collision = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_set_one_way_collision\0" . as_ptr () as * const c_char) ; table . shape_owner_set_one_way_collision_margin = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_set_one_way_collision_margin\0" . as_ptr () as * const c_char) ; table . shape_owner_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "shape_owner_set_transform\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::collision_object_2d::private::CollisionObject2D;
            
            pub(crate) mod collision_polygon {
                # ! [doc = "This module contains types related to the API class [`CollisionPolygon`][super::CollisionPolygon]."] pub (crate) mod private { # [doc = "`core class CollisionPolygon` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_collisionpolygon.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CollisionPolygon` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CollisionPolygon>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCollisionPolygon inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CollisionPolygon { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CollisionPolygon ; impl CollisionPolygon { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CollisionPolygonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Length that the resulting collision extends in either direction perpendicular to its polygon."] # [doc = ""] # [inline] pub fn depth (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . get_depth ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The collision margin for the generated [`Shape`][Shape]. See [`Shape.margin`][Shape::margin] for more details."] # [doc = ""] # [inline] pub fn margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Array of vertices which define the polygon.\n**Note:** The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the `polygon` member."] # [doc = ""] # [inline] pub fn polygon (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, no collision will be produced."] # [doc = ""] # [inline] pub fn is_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . is_disabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Length that the resulting collision extends in either direction perpendicular to its polygon."] # [doc = ""] # [inline] pub fn set_depth (& self , depth : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . set_depth ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , depth as _) ; } } # [doc = "If `true`, no collision will be produced."] # [doc = ""] # [inline] pub fn set_disabled (& self , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . set_disabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , disabled as _) ; } } # [doc = "The collision margin for the generated [`Shape`][Shape]. See [`Shape.margin`][Shape::margin] for more details."] # [doc = ""] # [inline] pub fn set_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; } } # [doc = "Array of vertices which define the polygon.\n**Note:** The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the `polygon` member."] # [doc = ""] # [inline] pub fn set_polygon (& self , polygon : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygonMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CollisionPolygon { } unsafe impl GodotObject for CollisionPolygon { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CollisionPolygon" } } impl QueueFree for CollisionPolygon { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CollisionPolygon { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionPolygon { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for CollisionPolygon { } unsafe impl SubClass < crate :: generated :: Node > for CollisionPolygon { } unsafe impl SubClass < crate :: generated :: Object > for CollisionPolygon { } impl Instanciable for CollisionPolygon { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CollisionPolygon :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CollisionPolygonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_depth : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub get_polygon : * mut sys :: godot_method_bind , pub is_disabled : * mut sys :: godot_method_bind , pub set_depth : * mut sys :: godot_method_bind , pub set_disabled : * mut sys :: godot_method_bind , pub set_margin : * mut sys :: godot_method_bind , pub set_polygon : * mut sys :: godot_method_bind } impl CollisionPolygonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CollisionPolygonMethodTable = CollisionPolygonMethodTable { class_constructor : None , get_depth : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , get_polygon : 0 as * mut sys :: godot_method_bind , is_disabled : 0 as * mut sys :: godot_method_bind , set_depth : 0 as * mut sys :: godot_method_bind , set_disabled : 0 as * mut sys :: godot_method_bind , set_margin : 0 as * mut sys :: godot_method_bind , set_polygon : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CollisionPolygonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CollisionPolygon\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_depth\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\0" . as_ptr () as * const c_char) ; table . set_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_depth\0" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::collision_polygon::private::CollisionPolygon;
            
            pub mod collision_polygon_2d {
                # ! [doc = "This module contains types related to the API class [`CollisionPolygon2D`][super::CollisionPolygon2D]."] pub (crate) mod private { # [doc = "`core class CollisionPolygon2D` inherits `Node2D` (manually managed).\n\nThis class has related types in the [`collision_polygon_2d`][super::collision_polygon_2d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_collisionpolygon2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CollisionPolygon2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CollisionPolygon2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCollisionPolygon2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CollisionPolygon2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CollisionPolygon2D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BuildMode (pub i64) ; impl BuildMode { pub const SOLIDS : BuildMode = BuildMode (0i64) ; pub const SEGMENTS : BuildMode = BuildMode (1i64) ; } impl From < i64 > for BuildMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BuildMode > for i64 { # [inline] fn from (v : BuildMode) -> Self { v . 0 } } impl FromVariant for BuildMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CollisionPolygon2D { pub const BUILD_SOLIDS : i64 = 0i64 ; pub const BUILD_SEGMENTS : i64 = 1i64 ; } impl CollisionPolygon2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CollisionPolygon2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Collision build mode. Use one of the [`BuildMode`][BuildMode] constants."] # [doc = ""] # [inline] pub fn build_mode (& self) -> crate :: generated :: collision_polygon_2d :: BuildMode { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . get_build_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: collision_polygon_2d :: BuildMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity."] # [doc = ""] # [inline] pub fn one_way_collision_margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . get_one_way_collision_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [`PoolVector2Array`][PoolArray<Vector2>], not a reference."] # [doc = ""] # [inline] pub fn polygon (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, no collisions will be detected."] # [doc = ""] # [inline] pub fn is_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . is_disabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, only edges that face up, relative to [`CollisionPolygon2D`][CollisionPolygon2D]'s rotation, will collide with other objects.\n**Note:** This property has no effect if this [`CollisionPolygon2D`][CollisionPolygon2D] is a child of an [`Area2D`][Area2D] node."] # [doc = ""] # [inline] pub fn is_one_way_collision_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . is_one_way_collision_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Collision build mode. Use one of the [`BuildMode`][BuildMode] constants."] # [doc = ""] # [inline] pub fn set_build_mode (& self , build_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . set_build_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , build_mode as _) ; } } # [doc = "If `true`, no collisions will be detected."] # [doc = ""] # [inline] pub fn set_disabled (& self , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . set_disabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , disabled as _) ; } } # [doc = "If `true`, only edges that face up, relative to [`CollisionPolygon2D`][CollisionPolygon2D]'s rotation, will collide with other objects.\n**Note:** This property has no effect if this [`CollisionPolygon2D`][CollisionPolygon2D] is a child of an [`Area2D`][Area2D] node."] # [doc = ""] # [inline] pub fn set_one_way_collision (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . set_one_way_collision ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity."] # [doc = ""] # [inline] pub fn set_one_way_collision_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . set_one_way_collision_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; } } # [doc = "The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [`PoolVector2Array`][PoolArray<Vector2>], not a reference."] # [doc = ""] # [inline] pub fn set_polygon (& self , polygon : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionPolygon2DMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CollisionPolygon2D { } unsafe impl GodotObject for CollisionPolygon2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CollisionPolygon2D" } } impl QueueFree for CollisionPolygon2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CollisionPolygon2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionPolygon2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for CollisionPolygon2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for CollisionPolygon2D { } unsafe impl SubClass < crate :: generated :: Node > for CollisionPolygon2D { } unsafe impl SubClass < crate :: generated :: Object > for CollisionPolygon2D { } impl Instanciable for CollisionPolygon2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CollisionPolygon2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CollisionPolygon2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_build_mode : * mut sys :: godot_method_bind , pub get_one_way_collision_margin : * mut sys :: godot_method_bind , pub get_polygon : * mut sys :: godot_method_bind , pub is_disabled : * mut sys :: godot_method_bind , pub is_one_way_collision_enabled : * mut sys :: godot_method_bind , pub set_build_mode : * mut sys :: godot_method_bind , pub set_disabled : * mut sys :: godot_method_bind , pub set_one_way_collision : * mut sys :: godot_method_bind , pub set_one_way_collision_margin : * mut sys :: godot_method_bind , pub set_polygon : * mut sys :: godot_method_bind } impl CollisionPolygon2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CollisionPolygon2DMethodTable = CollisionPolygon2DMethodTable { class_constructor : None , get_build_mode : 0 as * mut sys :: godot_method_bind , get_one_way_collision_margin : 0 as * mut sys :: godot_method_bind , get_polygon : 0 as * mut sys :: godot_method_bind , is_disabled : 0 as * mut sys :: godot_method_bind , is_one_way_collision_enabled : 0 as * mut sys :: godot_method_bind , set_build_mode : 0 as * mut sys :: godot_method_bind , set_disabled : 0 as * mut sys :: godot_method_bind , set_one_way_collision : 0 as * mut sys :: godot_method_bind , set_one_way_collision_margin : 0 as * mut sys :: godot_method_bind , set_polygon : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CollisionPolygon2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CollisionPolygon2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_build_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_build_mode\0" . as_ptr () as * const c_char) ; table . get_one_way_collision_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_one_way_collision_margin\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\0" . as_ptr () as * const c_char) ; table . is_one_way_collision_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_one_way_collision_enabled\0" . as_ptr () as * const c_char) ; table . set_build_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_build_mode\0" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\0" . as_ptr () as * const c_char) ; table . set_one_way_collision = (gd_api . godot_method_bind_get_method) (class_name , "set_one_way_collision\0" . as_ptr () as * const c_char) ; table . set_one_way_collision_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_one_way_collision_margin\0" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::collision_polygon_2d::private::CollisionPolygon2D;
            
            pub(crate) mod collision_shape {
                # ! [doc = "This module contains types related to the API class [`CollisionShape`][super::CollisionShape]."] pub (crate) mod private { # [doc = "`core class CollisionShape` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_collisionshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CollisionShape` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CollisionShape>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCollisionShape inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CollisionShape { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CollisionShape ; impl CollisionShape { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CollisionShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The actual shape owned by this collision shape."] # [doc = ""] # [inline] pub fn shape (& self) -> Option < Ref < crate :: generated :: Shape , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShapeMethodTable :: get (get_api ()) . get_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Shape , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A disabled collision shape has no effect in the world."] # [doc = ""] # [inline] pub fn is_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShapeMethodTable :: get (get_api ()) . is_disabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets the collision shape's shape to the addition of all its convexed [`MeshInstance`][MeshInstance] siblings geometry."] # [doc = ""] # [inline] pub fn make_convex_from_brothers (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShapeMethodTable :: get (get_api ()) . make_convex_from_brothers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If this method exists within a script it will be called whenever the shape resource has been modified."] # [doc = ""] # [inline] pub fn resource_changed (& self , resource : impl AsArg < crate :: generated :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShapeMethodTable :: get (get_api ()) . resource_changed ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , resource . as_arg_ptr ()) ; } } # [doc = "A disabled collision shape has no effect in the world."] # [doc = ""] # [inline] pub fn set_disabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShapeMethodTable :: get (get_api ()) . set_disabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The actual shape owned by this collision shape."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: Shape >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShapeMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CollisionShape { } unsafe impl GodotObject for CollisionShape { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CollisionShape" } } impl QueueFree for CollisionShape { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CollisionShape { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for CollisionShape { } unsafe impl SubClass < crate :: generated :: Node > for CollisionShape { } unsafe impl SubClass < crate :: generated :: Object > for CollisionShape { } impl Instanciable for CollisionShape { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CollisionShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CollisionShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_shape : * mut sys :: godot_method_bind , pub is_disabled : * mut sys :: godot_method_bind , pub make_convex_from_brothers : * mut sys :: godot_method_bind , pub resource_changed : * mut sys :: godot_method_bind , pub set_disabled : * mut sys :: godot_method_bind , pub set_shape : * mut sys :: godot_method_bind } impl CollisionShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CollisionShapeMethodTable = CollisionShapeMethodTable { class_constructor : None , get_shape : 0 as * mut sys :: godot_method_bind , is_disabled : 0 as * mut sys :: godot_method_bind , make_convex_from_brothers : 0 as * mut sys :: godot_method_bind , resource_changed : 0 as * mut sys :: godot_method_bind , set_disabled : 0 as * mut sys :: godot_method_bind , set_shape : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CollisionShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CollisionShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_shape\0" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\0" . as_ptr () as * const c_char) ; table . make_convex_from_brothers = (gd_api . godot_method_bind_get_method) (class_name , "make_convex_from_brothers\0" . as_ptr () as * const c_char) ; table . resource_changed = (gd_api . godot_method_bind_get_method) (class_name , "resource_changed\0" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\0" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::collision_shape::private::CollisionShape;
            
            pub(crate) mod collision_shape_2d {
                # ! [doc = "This module contains types related to the API class [`CollisionShape2D`][super::CollisionShape2D]."] pub (crate) mod private { # [doc = "`core class CollisionShape2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_collisionshape2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`CollisionShape2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<CollisionShape2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nCollisionShape2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CollisionShape2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CollisionShape2D ; impl CollisionShape2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CollisionShape2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the shape at a high velocity."] # [doc = ""] # [inline] pub fn one_way_collision_margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . get_one_way_collision_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The actual shape owned by this collision shape."] # [doc = ""] # [inline] pub fn shape (& self) -> Option < Ref < crate :: generated :: Shape2D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . get_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Shape2D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A disabled collision shape has no effect in the world. This property should be changed with [`Object.set_deferred`][Object::set_deferred]."] # [doc = ""] # [inline] pub fn is_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . is_disabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets whether this collision shape should only detect collision on one side (top or bottom).\n**Note:** This property has no effect if this [`CollisionShape2D`][CollisionShape2D] is a child of an [`Area2D`][Area2D] node."] # [doc = ""] # [inline] pub fn is_one_way_collision_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . is_one_way_collision_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "A disabled collision shape has no effect in the world. This property should be changed with [`Object.set_deferred`][Object::set_deferred]."] # [doc = ""] # [inline] pub fn set_disabled (& self , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . set_disabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , disabled as _) ; } } # [doc = "Sets whether this collision shape should only detect collision on one side (top or bottom).\n**Note:** This property has no effect if this [`CollisionShape2D`][CollisionShape2D] is a child of an [`Area2D`][Area2D] node."] # [doc = ""] # [inline] pub fn set_one_way_collision (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . set_one_way_collision ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the shape at a high velocity."] # [doc = ""] # [inline] pub fn set_one_way_collision_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . set_one_way_collision_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; } } # [doc = "The actual shape owned by this collision shape."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: Shape2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CollisionShape2DMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CollisionShape2D { } unsafe impl GodotObject for CollisionShape2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CollisionShape2D" } } impl QueueFree for CollisionShape2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CollisionShape2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CollisionShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for CollisionShape2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for CollisionShape2D { } unsafe impl SubClass < crate :: generated :: Node > for CollisionShape2D { } unsafe impl SubClass < crate :: generated :: Object > for CollisionShape2D { } impl Instanciable for CollisionShape2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CollisionShape2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CollisionShape2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_one_way_collision_margin : * mut sys :: godot_method_bind , pub get_shape : * mut sys :: godot_method_bind , pub is_disabled : * mut sys :: godot_method_bind , pub is_one_way_collision_enabled : * mut sys :: godot_method_bind , pub set_disabled : * mut sys :: godot_method_bind , pub set_one_way_collision : * mut sys :: godot_method_bind , pub set_one_way_collision_margin : * mut sys :: godot_method_bind , pub set_shape : * mut sys :: godot_method_bind } impl CollisionShape2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CollisionShape2DMethodTable = CollisionShape2DMethodTable { class_constructor : None , get_one_way_collision_margin : 0 as * mut sys :: godot_method_bind , get_shape : 0 as * mut sys :: godot_method_bind , is_disabled : 0 as * mut sys :: godot_method_bind , is_one_way_collision_enabled : 0 as * mut sys :: godot_method_bind , set_disabled : 0 as * mut sys :: godot_method_bind , set_one_way_collision : 0 as * mut sys :: godot_method_bind , set_one_way_collision_margin : 0 as * mut sys :: godot_method_bind , set_shape : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CollisionShape2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CollisionShape2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_one_way_collision_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_one_way_collision_margin\0" . as_ptr () as * const c_char) ; table . get_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_shape\0" . as_ptr () as * const c_char) ; table . is_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_disabled\0" . as_ptr () as * const c_char) ; table . is_one_way_collision_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_one_way_collision_enabled\0" . as_ptr () as * const c_char) ; table . set_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled\0" . as_ptr () as * const c_char) ; table . set_one_way_collision = (gd_api . godot_method_bind_get_method) (class_name , "set_one_way_collision\0" . as_ptr () as * const c_char) ; table . set_one_way_collision_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_one_way_collision_margin\0" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::collision_shape_2d::private::CollisionShape2D;
            
            pub(crate) mod color_picker {
                # ! [doc = "This module contains types related to the API class [`ColorPicker`][super::ColorPicker]."] pub (crate) mod private { # [doc = "`core class ColorPicker` inherits `BoxContainer` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_colorpicker.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ColorPicker` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ColorPicker>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nColorPicker inherits methods from:\n - [BoxContainer](struct.BoxContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ColorPicker { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ColorPicker ; impl ColorPicker { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ColorPickerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them.\n**Note:** The presets list is only for _this_ color picker."] # [doc = ""] # [inline] pub fn add_preset (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . add_preset ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "If `true`, the \"add preset\" button is enabled."] # [doc = ""] # [inline] pub fn are_presets_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . are_presets_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, saved color presets are visible."] # [doc = ""] # [inline] pub fn are_presets_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . are_presets_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes the given color from the list of color presets of this color picker."] # [doc = ""] # [inline] pub fn erase_preset (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . erase_preset ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The currently selected color."] # [doc = ""] # [inline] pub fn pick_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . get_pick_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the list of colors in the presets of the color picker."] # [doc = ""] # [inline] pub fn get_presets (& self) -> PoolArray < Color > { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . get_presets ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Color > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues)."] # [doc = ""] # [inline] pub fn is_deferred_mode (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . is_deferred_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, shows an alpha channel slider (opacity)."] # [doc = ""] # [inline] pub fn is_editing_alpha (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . is_editing_alpha ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, allows editing the color with Hue/Saturation/Value sliders.\n**Note:** Cannot be enabled if raw mode is on."] # [doc = ""] # [inline] pub fn is_hsv_mode (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . is_hsv_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR).\n**Note:** Cannot be enabled if HSV mode is on."] # [doc = ""] # [inline] pub fn is_raw_mode (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . is_raw_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues)."] # [doc = ""] # [inline] pub fn set_deferred_mode (& self , mode : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . set_deferred_mode ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "If `true`, shows an alpha channel slider (opacity)."] # [doc = ""] # [inline] pub fn set_edit_alpha (& self , show : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . set_edit_alpha ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , show as _) ; } } # [doc = "If `true`, allows editing the color with Hue/Saturation/Value sliders.\n**Note:** Cannot be enabled if raw mode is on."] # [doc = ""] # [inline] pub fn set_hsv_mode (& self , mode : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . set_hsv_mode ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The currently selected color."] # [doc = ""] # [inline] pub fn set_pick_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . set_pick_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "If `true`, the \"add preset\" button is enabled."] # [doc = ""] # [inline] pub fn set_presets_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . set_presets_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, saved color presets are visible."] # [doc = ""] # [inline] pub fn set_presets_visible (& self , visible : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . set_presets_visible ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , visible as _) ; } } # [doc = "If `true`, allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR).\n**Note:** Cannot be enabled if HSV mode is on."] # [doc = ""] # [inline] pub fn set_raw_mode (& self , mode : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerMethodTable :: get (get_api ()) . set_raw_mode ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ColorPicker { } unsafe impl GodotObject for ColorPicker { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ColorPicker" } } impl QueueFree for ColorPicker { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ColorPicker { type Target = crate :: generated :: BoxContainer ; # [inline] fn deref (& self) -> & crate :: generated :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ColorPicker { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: BoxContainer > for ColorPicker { } unsafe impl SubClass < crate :: generated :: Container > for ColorPicker { } unsafe impl SubClass < crate :: generated :: Control > for ColorPicker { } unsafe impl SubClass < crate :: generated :: CanvasItem > for ColorPicker { } unsafe impl SubClass < crate :: generated :: Node > for ColorPicker { } unsafe impl SubClass < crate :: generated :: Object > for ColorPicker { } impl Instanciable for ColorPicker { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ColorPicker :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ColorPickerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_preset : * mut sys :: godot_method_bind , pub are_presets_enabled : * mut sys :: godot_method_bind , pub are_presets_visible : * mut sys :: godot_method_bind , pub erase_preset : * mut sys :: godot_method_bind , pub get_pick_color : * mut sys :: godot_method_bind , pub get_presets : * mut sys :: godot_method_bind , pub is_deferred_mode : * mut sys :: godot_method_bind , pub is_editing_alpha : * mut sys :: godot_method_bind , pub is_hsv_mode : * mut sys :: godot_method_bind , pub is_raw_mode : * mut sys :: godot_method_bind , pub set_deferred_mode : * mut sys :: godot_method_bind , pub set_edit_alpha : * mut sys :: godot_method_bind , pub set_hsv_mode : * mut sys :: godot_method_bind , pub set_pick_color : * mut sys :: godot_method_bind , pub set_presets_enabled : * mut sys :: godot_method_bind , pub set_presets_visible : * mut sys :: godot_method_bind , pub set_raw_mode : * mut sys :: godot_method_bind } impl ColorPickerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ColorPickerMethodTable = ColorPickerMethodTable { class_constructor : None , add_preset : 0 as * mut sys :: godot_method_bind , are_presets_enabled : 0 as * mut sys :: godot_method_bind , are_presets_visible : 0 as * mut sys :: godot_method_bind , erase_preset : 0 as * mut sys :: godot_method_bind , get_pick_color : 0 as * mut sys :: godot_method_bind , get_presets : 0 as * mut sys :: godot_method_bind , is_deferred_mode : 0 as * mut sys :: godot_method_bind , is_editing_alpha : 0 as * mut sys :: godot_method_bind , is_hsv_mode : 0 as * mut sys :: godot_method_bind , is_raw_mode : 0 as * mut sys :: godot_method_bind , set_deferred_mode : 0 as * mut sys :: godot_method_bind , set_edit_alpha : 0 as * mut sys :: godot_method_bind , set_hsv_mode : 0 as * mut sys :: godot_method_bind , set_pick_color : 0 as * mut sys :: godot_method_bind , set_presets_enabled : 0 as * mut sys :: godot_method_bind , set_presets_visible : 0 as * mut sys :: godot_method_bind , set_raw_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ColorPickerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ColorPicker\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_preset = (gd_api . godot_method_bind_get_method) (class_name , "add_preset\0" . as_ptr () as * const c_char) ; table . are_presets_enabled = (gd_api . godot_method_bind_get_method) (class_name , "are_presets_enabled\0" . as_ptr () as * const c_char) ; table . are_presets_visible = (gd_api . godot_method_bind_get_method) (class_name , "are_presets_visible\0" . as_ptr () as * const c_char) ; table . erase_preset = (gd_api . godot_method_bind_get_method) (class_name , "erase_preset\0" . as_ptr () as * const c_char) ; table . get_pick_color = (gd_api . godot_method_bind_get_method) (class_name , "get_pick_color\0" . as_ptr () as * const c_char) ; table . get_presets = (gd_api . godot_method_bind_get_method) (class_name , "get_presets\0" . as_ptr () as * const c_char) ; table . is_deferred_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_deferred_mode\0" . as_ptr () as * const c_char) ; table . is_editing_alpha = (gd_api . godot_method_bind_get_method) (class_name , "is_editing_alpha\0" . as_ptr () as * const c_char) ; table . is_hsv_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_hsv_mode\0" . as_ptr () as * const c_char) ; table . is_raw_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_raw_mode\0" . as_ptr () as * const c_char) ; table . set_deferred_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_deferred_mode\0" . as_ptr () as * const c_char) ; table . set_edit_alpha = (gd_api . godot_method_bind_get_method) (class_name , "set_edit_alpha\0" . as_ptr () as * const c_char) ; table . set_hsv_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_hsv_mode\0" . as_ptr () as * const c_char) ; table . set_pick_color = (gd_api . godot_method_bind_get_method) (class_name , "set_pick_color\0" . as_ptr () as * const c_char) ; table . set_presets_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_presets_enabled\0" . as_ptr () as * const c_char) ; table . set_presets_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_presets_visible\0" . as_ptr () as * const c_char) ; table . set_raw_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_raw_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::color_picker::private::ColorPicker;
            
            pub(crate) mod color_picker_button {
                # ! [doc = "This module contains types related to the API class [`ColorPickerButton`][super::ColorPickerButton]."] pub (crate) mod private { # [doc = "`core class ColorPickerButton` inherits `Button` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_colorpickerbutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ColorPickerButton` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ColorPickerButton>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nColorPickerButton inherits methods from:\n - [Button](struct.Button.html)\n - [BaseButton](struct.BaseButton.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ColorPickerButton { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ColorPickerButton ; impl ColorPickerButton { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ColorPickerButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The currently selected color."] # [doc = ""] # [inline] pub fn pick_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerButtonMethodTable :: get (get_api ()) . get_pick_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`ColorPicker`][ColorPicker] that this node toggles.\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_picker (& self) -> Option < Ref < crate :: generated :: ColorPicker , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerButtonMethodTable :: get (get_api ()) . get_picker ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: ColorPicker , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the control's [`PopupPanel`][PopupPanel] which allows you to connect to popup signals. This allows you to handle events when the ColorPicker is shown or hidden.\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_popup (& self) -> Option < Ref < crate :: generated :: PopupPanel , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerButtonMethodTable :: get (get_api ()) . get_popup ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: PopupPanel , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the alpha channel in the displayed [`ColorPicker`][ColorPicker] will be visible."] # [doc = ""] # [inline] pub fn is_editing_alpha (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerButtonMethodTable :: get (get_api ()) . is_editing_alpha ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the alpha channel in the displayed [`ColorPicker`][ColorPicker] will be visible."] # [doc = ""] # [inline] pub fn set_edit_alpha (& self , show : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerButtonMethodTable :: get (get_api ()) . set_edit_alpha ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , show as _) ; } } # [doc = "The currently selected color."] # [doc = ""] # [inline] pub fn set_pick_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorPickerButtonMethodTable :: get (get_api ()) . set_pick_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ColorPickerButton { } unsafe impl GodotObject for ColorPickerButton { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ColorPickerButton" } } impl QueueFree for ColorPickerButton { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ColorPickerButton { type Target = crate :: generated :: Button ; # [inline] fn deref (& self) -> & crate :: generated :: Button { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ColorPickerButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Button { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Button > for ColorPickerButton { } unsafe impl SubClass < crate :: generated :: BaseButton > for ColorPickerButton { } unsafe impl SubClass < crate :: generated :: Control > for ColorPickerButton { } unsafe impl SubClass < crate :: generated :: CanvasItem > for ColorPickerButton { } unsafe impl SubClass < crate :: generated :: Node > for ColorPickerButton { } unsafe impl SubClass < crate :: generated :: Object > for ColorPickerButton { } impl Instanciable for ColorPickerButton { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ColorPickerButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ColorPickerButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_pick_color : * mut sys :: godot_method_bind , pub get_picker : * mut sys :: godot_method_bind , pub get_popup : * mut sys :: godot_method_bind , pub is_editing_alpha : * mut sys :: godot_method_bind , pub set_edit_alpha : * mut sys :: godot_method_bind , pub set_pick_color : * mut sys :: godot_method_bind } impl ColorPickerButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ColorPickerButtonMethodTable = ColorPickerButtonMethodTable { class_constructor : None , get_pick_color : 0 as * mut sys :: godot_method_bind , get_picker : 0 as * mut sys :: godot_method_bind , get_popup : 0 as * mut sys :: godot_method_bind , is_editing_alpha : 0 as * mut sys :: godot_method_bind , set_edit_alpha : 0 as * mut sys :: godot_method_bind , set_pick_color : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ColorPickerButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ColorPickerButton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_pick_color = (gd_api . godot_method_bind_get_method) (class_name , "get_pick_color\0" . as_ptr () as * const c_char) ; table . get_picker = (gd_api . godot_method_bind_get_method) (class_name , "get_picker\0" . as_ptr () as * const c_char) ; table . get_popup = (gd_api . godot_method_bind_get_method) (class_name , "get_popup\0" . as_ptr () as * const c_char) ; table . is_editing_alpha = (gd_api . godot_method_bind_get_method) (class_name , "is_editing_alpha\0" . as_ptr () as * const c_char) ; table . set_edit_alpha = (gd_api . godot_method_bind_get_method) (class_name , "set_edit_alpha\0" . as_ptr () as * const c_char) ; table . set_pick_color = (gd_api . godot_method_bind_get_method) (class_name , "set_pick_color\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::color_picker_button::private::ColorPickerButton;
            
            pub(crate) mod color_rect {
                # ! [doc = "This module contains types related to the API class [`ColorRect`][super::ColorRect]."] pub (crate) mod private { # [doc = "`core class ColorRect` inherits `Control` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_colorrect.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ColorRect` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ColorRect>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nColorRect inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ColorRect { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ColorRect ; impl ColorRect { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ColorRectMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nThe fill color.\n```gdscript\n$ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect's color to red.\n```"] # [doc = ""] # [inline] pub fn frame_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorRectMethodTable :: get (get_api ()) . get_frame_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nThe fill color.\n```gdscript\n$ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect's color to red.\n```"] # [doc = ""] # [inline] pub fn set_frame_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ColorRectMethodTable :: get (get_api ()) . set_frame_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ColorRect { } unsafe impl GodotObject for ColorRect { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ColorRect" } } impl QueueFree for ColorRect { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ColorRect { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ColorRect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for ColorRect { } unsafe impl SubClass < crate :: generated :: CanvasItem > for ColorRect { } unsafe impl SubClass < crate :: generated :: Node > for ColorRect { } unsafe impl SubClass < crate :: generated :: Object > for ColorRect { } impl Instanciable for ColorRect { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ColorRect :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ColorRectMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_frame_color : * mut sys :: godot_method_bind , pub set_frame_color : * mut sys :: godot_method_bind } impl ColorRectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ColorRectMethodTable = ColorRectMethodTable { class_constructor : None , get_frame_color : 0 as * mut sys :: godot_method_bind , set_frame_color : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ColorRectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ColorRect\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_frame_color = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_color\0" . as_ptr () as * const c_char) ; table . set_frame_color = (gd_api . godot_method_bind_get_method) (class_name , "set_frame_color\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::color_rect::private::ColorRect;
            
            pub(crate) mod concave_polygon_shape {
                # ! [doc = "This module contains types related to the API class [`ConcavePolygonShape`][super::ConcavePolygonShape]."] pub (crate) mod private { # [doc = "`core class ConcavePolygonShape` inherits `Shape` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_concavepolygonshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nConcavePolygonShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ConcavePolygonShape { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ConcavePolygonShape ; impl ConcavePolygonShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ConcavePolygonShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the faces (an array of triangles)."] # [doc = ""] # [inline] pub fn faces (& self) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = ConcavePolygonShapeMethodTable :: get (get_api ()) . get_faces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the faces (an array of triangles)."] # [doc = ""] # [inline] pub fn set_faces (& self , faces : PoolArray < Vector3 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConcavePolygonShapeMethodTable :: get (get_api ()) . set_faces ; let ret = crate :: icalls :: icallvar__vec3arr (method_bind , self . this . sys () . as_ptr () , faces) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConcavePolygonShape { } unsafe impl GodotObject for ConcavePolygonShape { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ConcavePolygonShape" } } impl std :: ops :: Deref for ConcavePolygonShape { type Target = crate :: generated :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConcavePolygonShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape > for ConcavePolygonShape { } unsafe impl SubClass < crate :: generated :: Resource > for ConcavePolygonShape { } unsafe impl SubClass < crate :: generated :: Reference > for ConcavePolygonShape { } unsafe impl SubClass < crate :: generated :: Object > for ConcavePolygonShape { } impl Instanciable for ConcavePolygonShape { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ConcavePolygonShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ConcavePolygonShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_faces : * mut sys :: godot_method_bind , pub set_faces : * mut sys :: godot_method_bind } impl ConcavePolygonShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ConcavePolygonShapeMethodTable = ConcavePolygonShapeMethodTable { class_constructor : None , get_faces : 0 as * mut sys :: godot_method_bind , set_faces : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ConcavePolygonShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ConcavePolygonShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_faces\0" . as_ptr () as * const c_char) ; table . set_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_faces\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::concave_polygon_shape::private::ConcavePolygonShape;
            
            pub(crate) mod concave_polygon_shape_2d {
                # ! [doc = "This module contains types related to the API class [`ConcavePolygonShape2D`][super::ConcavePolygonShape2D]."] pub (crate) mod private { # [doc = "`core class ConcavePolygonShape2D` inherits `Shape2D` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_concavepolygonshape2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nConcavePolygonShape2D inherits methods from:\n - [Shape2D](struct.Shape2D.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ConcavePolygonShape2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ConcavePolygonShape2D ; impl ConcavePolygonShape2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ConcavePolygonShape2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The array of points that make up the [`ConcavePolygonShape2D`][ConcavePolygonShape2D]'s line segments."] # [doc = ""] # [inline] pub fn segments (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = ConcavePolygonShape2DMethodTable :: get (get_api ()) . get_segments ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The array of points that make up the [`ConcavePolygonShape2D`][ConcavePolygonShape2D]'s line segments."] # [doc = ""] # [inline] pub fn set_segments (& self , segments : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConcavePolygonShape2DMethodTable :: get (get_api ()) . set_segments ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , segments) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConcavePolygonShape2D { } unsafe impl GodotObject for ConcavePolygonShape2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ConcavePolygonShape2D" } } impl std :: ops :: Deref for ConcavePolygonShape2D { type Target = crate :: generated :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConcavePolygonShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape2D > for ConcavePolygonShape2D { } unsafe impl SubClass < crate :: generated :: Resource > for ConcavePolygonShape2D { } unsafe impl SubClass < crate :: generated :: Reference > for ConcavePolygonShape2D { } unsafe impl SubClass < crate :: generated :: Object > for ConcavePolygonShape2D { } impl Instanciable for ConcavePolygonShape2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ConcavePolygonShape2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ConcavePolygonShape2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_segments : * mut sys :: godot_method_bind , pub set_segments : * mut sys :: godot_method_bind } impl ConcavePolygonShape2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ConcavePolygonShape2DMethodTable = ConcavePolygonShape2DMethodTable { class_constructor : None , get_segments : 0 as * mut sys :: godot_method_bind , set_segments : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ConcavePolygonShape2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ConcavePolygonShape2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_segments\0" . as_ptr () as * const c_char) ; table . set_segments = (gd_api . godot_method_bind_get_method) (class_name , "set_segments\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::concave_polygon_shape_2d::private::ConcavePolygonShape2D;
            
            pub mod cone_twist_joint {
                # ! [doc = "This module contains types related to the API class [`ConeTwistJoint`][super::ConeTwistJoint]."] pub (crate) mod private { # [doc = "`core class ConeTwistJoint` inherits `Joint` (manually managed).\n\nThis class has related types in the [`cone_twist_joint`][super::cone_twist_joint] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_conetwistjoint.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ConeTwistJoint` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ConeTwistJoint>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nConeTwistJoint inherits methods from:\n - [Joint](struct.Joint.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ConeTwistJoint { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ConeTwistJoint ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Param (pub i64) ; impl Param { pub const SWING_SPAN : Param = Param (0i64) ; pub const TWIST_SPAN : Param = Param (1i64) ; pub const BIAS : Param = Param (2i64) ; pub const SOFTNESS : Param = Param (3i64) ; pub const RELAXATION : Param = Param (4i64) ; pub const MAX : Param = Param (5i64) ; } impl From < i64 > for Param { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Param > for i64 { # [inline] fn from (v : Param) -> Self { v . 0 } } impl FromVariant for Param { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ConeTwistJoint { pub const PARAM_SWING_SPAN : i64 = 0i64 ; pub const PARAM_TWIST_SPAN : i64 = 1i64 ; pub const PARAM_BIAS : i64 = 2i64 ; pub const PARAM_SOFTNESS : i64 = 3i64 ; pub const PARAM_RELAXATION : i64 = 4i64 ; pub const PARAM_MAX : i64 = 5i64 ; } impl ConeTwistJoint { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ConeTwistJointMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint."] # [doc = ""] # [inline] pub fn param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ConeTwistJointMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint."] # [doc = ""] # [inline] pub fn set_param (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConeTwistJointMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , param as _ , value as _) ; } } # [doc = "The speed with which the swing or twist will take place.\nThe higher, the faster."] # [doc = ""] # [inline] pub fn bias (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ConeTwistJointMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The speed with which the swing or twist will take place.\nThe higher, the faster."] # [doc = ""] # [inline] pub fn set_bias (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ConeTwistJointMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Defines, how fast the swing- and twist-speed-difference on both sides gets synced."] # [doc = ""] # [inline] pub fn relaxation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ConeTwistJointMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Defines, how fast the swing- and twist-speed-difference on both sides gets synced."] # [doc = ""] # [inline] pub fn set_relaxation (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ConeTwistJointMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 4i64 , value as _) ; } } # [doc = "The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint."] # [doc = ""] # [inline] pub fn softness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ConeTwistJointMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint."] # [doc = ""] # [inline] pub fn set_softness (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ConeTwistJointMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConeTwistJoint { } unsafe impl GodotObject for ConeTwistJoint { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ConeTwistJoint" } } impl QueueFree for ConeTwistJoint { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ConeTwistJoint { type Target = crate :: generated :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConeTwistJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Joint > for ConeTwistJoint { } unsafe impl SubClass < crate :: generated :: Spatial > for ConeTwistJoint { } unsafe impl SubClass < crate :: generated :: Node > for ConeTwistJoint { } unsafe impl SubClass < crate :: generated :: Object > for ConeTwistJoint { } impl Instanciable for ConeTwistJoint { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ConeTwistJoint :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ConeTwistJointMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_param : * mut sys :: godot_method_bind , pub set_param : * mut sys :: godot_method_bind } impl ConeTwistJointMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ConeTwistJointMethodTable = ConeTwistJointMethodTable { class_constructor : None , get_param : 0 as * mut sys :: godot_method_bind , set_param : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ConeTwistJointMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ConeTwistJoint\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::cone_twist_joint::private::ConeTwistJoint;
            
            pub(crate) mod config_file {
                # ! [doc = "This module contains types related to the API class [`ConfigFile`][super::ConfigFile]."] pub (crate) mod private { # [doc = "`core class ConfigFile` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_configfile.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nConfigFile inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ConfigFile { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ConfigFile ; impl ConfigFile { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ConfigFileMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Removes the entire contents of the config."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Deletes the specified section along with all the key-value pairs inside. Raises an error if the section does not exist."] # [doc = ""] # [inline] pub fn erase_section (& self , section : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . erase_section ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , section . into ()) ; } } # [doc = "Deletes the specified key in a section. Raises an error if either the section or the key do not exist."] # [doc = ""] # [inline] pub fn erase_section_key (& self , section : impl Into < GodotString > , key : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . erase_section_key ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , section . into () , key . into ()) ; } } # [doc = "Returns an array of all defined key identifiers in the specified section. Raises an error and returns an empty array if the section does not exist."] # [doc = ""] # [inline] pub fn get_section_keys (& self , section : impl Into < GodotString >) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . get_section_keys ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , section . into ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array of all defined section identifiers."] # [doc = ""] # [inline] pub fn get_sections (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . get_sections ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current value for the specified section and key. If either the section or the key do not exist, the method returns the fallback `default` value. If `default` is not specified or set to `null`, an error is also raised.\n# Default Arguments\n* `default` - `null`"] # [doc = ""] # [inline] pub fn get_value (& self , section : impl Into < GodotString > , key : impl Into < GodotString > , default : impl OwnedToVariant) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . get_value ; let ret = crate :: icalls :: icallvar__str_str_var (method_bind , self . this . sys () . as_ptr () , section . into () , key . into () , default . owned_to_variant ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the specified section exists."] # [doc = ""] # [inline] pub fn has_section (& self , section : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . has_section ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , section . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the specified section-key pair exists."] # [doc = ""] # [inline] pub fn has_section_key (& self , section : impl Into < GodotString > , key : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . has_section_key ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , section . into () , key . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Loads the config file specified as a parameter. The file's contents are parsed and loaded in the [`ConfigFile`][ConfigFile] object which the method was called on.\nReturns one of the [`Error`][GodotError] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn load (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . load ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Loads the encrypted config file specified as a parameter, using the provided `key` to decrypt it. The file's contents are parsed and loaded in the [`ConfigFile`][ConfigFile] object which the method was called on.\nReturns one of the [`Error`][GodotError] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn load_encrypted (& self , path : impl Into < GodotString > , key : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . load_encrypted ; let ret = crate :: icalls :: icallvar__str_bytearr (method_bind , self . this . sys () . as_ptr () , path . into () , key) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Loads the encrypted config file specified as a parameter, using the provided `password` to decrypt it. The file's contents are parsed and loaded in the [`ConfigFile`][ConfigFile] object which the method was called on.\nReturns one of the [`Error`][GodotError] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn load_encrypted_pass (& self , path : impl Into < GodotString > , password : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . load_encrypted_pass ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , path . into () , password . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Parses the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on.\nReturns one of the [`Error`][GodotError] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn parse (& self , data : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . parse ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , data . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Saves the contents of the [`ConfigFile`][ConfigFile] object to the file specified as a parameter. The output file uses an INI-style structure.\nReturns one of the [`Error`][GodotError] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn save (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . save ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Saves the contents of the [`ConfigFile`][ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided `key` to encrypt it. The output file uses an INI-style structure.\nReturns one of the [`Error`][GodotError] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn save_encrypted (& self , path : impl Into < GodotString > , key : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . save_encrypted ; let ret = crate :: icalls :: icallvar__str_bytearr (method_bind , self . this . sys () . as_ptr () , path . into () , key) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Saves the contents of the [`ConfigFile`][ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided `password` to encrypt it. The output file uses an INI-style structure.\nReturns one of the [`Error`][GodotError] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn save_encrypted_pass (& self , path : impl Into < GodotString > , password : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . save_encrypted_pass ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , path . into () , password . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Assigns a value to the specified key of the specified section. If either the section or the key do not exist, they are created. Passing a `null` value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed."] # [doc = ""] # [inline] pub fn set_value (& self , section : impl Into < GodotString > , key : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfigFileMethodTable :: get (get_api ()) . set_value ; let ret = crate :: icalls :: icallvar__str_str_var (method_bind , self . this . sys () . as_ptr () , section . into () , key . into () , value . owned_to_variant ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConfigFile { } unsafe impl GodotObject for ConfigFile { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ConfigFile" } } impl std :: ops :: Deref for ConfigFile { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConfigFile { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for ConfigFile { } unsafe impl SubClass < crate :: generated :: Object > for ConfigFile { } impl Instanciable for ConfigFile { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ConfigFile :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ConfigFileMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub erase_section : * mut sys :: godot_method_bind , pub erase_section_key : * mut sys :: godot_method_bind , pub get_section_keys : * mut sys :: godot_method_bind , pub get_sections : * mut sys :: godot_method_bind , pub get_value : * mut sys :: godot_method_bind , pub has_section : * mut sys :: godot_method_bind , pub has_section_key : * mut sys :: godot_method_bind , pub load : * mut sys :: godot_method_bind , pub load_encrypted : * mut sys :: godot_method_bind , pub load_encrypted_pass : * mut sys :: godot_method_bind , pub parse : * mut sys :: godot_method_bind , pub save : * mut sys :: godot_method_bind , pub save_encrypted : * mut sys :: godot_method_bind , pub save_encrypted_pass : * mut sys :: godot_method_bind , pub set_value : * mut sys :: godot_method_bind } impl ConfigFileMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ConfigFileMethodTable = ConfigFileMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , erase_section : 0 as * mut sys :: godot_method_bind , erase_section_key : 0 as * mut sys :: godot_method_bind , get_section_keys : 0 as * mut sys :: godot_method_bind , get_sections : 0 as * mut sys :: godot_method_bind , get_value : 0 as * mut sys :: godot_method_bind , has_section : 0 as * mut sys :: godot_method_bind , has_section_key : 0 as * mut sys :: godot_method_bind , load : 0 as * mut sys :: godot_method_bind , load_encrypted : 0 as * mut sys :: godot_method_bind , load_encrypted_pass : 0 as * mut sys :: godot_method_bind , parse : 0 as * mut sys :: godot_method_bind , save : 0 as * mut sys :: godot_method_bind , save_encrypted : 0 as * mut sys :: godot_method_bind , save_encrypted_pass : 0 as * mut sys :: godot_method_bind , set_value : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ConfigFileMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ConfigFile\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . erase_section = (gd_api . godot_method_bind_get_method) (class_name , "erase_section\0" . as_ptr () as * const c_char) ; table . erase_section_key = (gd_api . godot_method_bind_get_method) (class_name , "erase_section_key\0" . as_ptr () as * const c_char) ; table . get_section_keys = (gd_api . godot_method_bind_get_method) (class_name , "get_section_keys\0" . as_ptr () as * const c_char) ; table . get_sections = (gd_api . godot_method_bind_get_method) (class_name , "get_sections\0" . as_ptr () as * const c_char) ; table . get_value = (gd_api . godot_method_bind_get_method) (class_name , "get_value\0" . as_ptr () as * const c_char) ; table . has_section = (gd_api . godot_method_bind_get_method) (class_name , "has_section\0" . as_ptr () as * const c_char) ; table . has_section_key = (gd_api . godot_method_bind_get_method) (class_name , "has_section_key\0" . as_ptr () as * const c_char) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\0" . as_ptr () as * const c_char) ; table . load_encrypted = (gd_api . godot_method_bind_get_method) (class_name , "load_encrypted\0" . as_ptr () as * const c_char) ; table . load_encrypted_pass = (gd_api . godot_method_bind_get_method) (class_name , "load_encrypted_pass\0" . as_ptr () as * const c_char) ; table . parse = (gd_api . godot_method_bind_get_method) (class_name , "parse\0" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\0" . as_ptr () as * const c_char) ; table . save_encrypted = (gd_api . godot_method_bind_get_method) (class_name , "save_encrypted\0" . as_ptr () as * const c_char) ; table . save_encrypted_pass = (gd_api . godot_method_bind_get_method) (class_name , "save_encrypted_pass\0" . as_ptr () as * const c_char) ; table . set_value = (gd_api . godot_method_bind_get_method) (class_name , "set_value\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::config_file::private::ConfigFile;
            
            pub(crate) mod confirmation_dialog {
                # ! [doc = "This module contains types related to the API class [`ConfirmationDialog`][super::ConfirmationDialog]."] pub (crate) mod private { # [doc = "`core class ConfirmationDialog` inherits `AcceptDialog` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_confirmationdialog.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ConfirmationDialog` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ConfirmationDialog>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nConfirmationDialog inherits methods from:\n - [AcceptDialog](struct.AcceptDialog.html)\n - [WindowDialog](struct.WindowDialog.html)\n - [Popup](struct.Popup.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ConfirmationDialog { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ConfirmationDialog ; impl ConfirmationDialog { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ConfirmationDialogMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the cancel button.\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_cancel (& self) -> Option < Ref < crate :: generated :: Button , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ConfirmationDialogMethodTable :: get (get_api ()) . get_cancel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Button , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for ConfirmationDialog { } unsafe impl GodotObject for ConfirmationDialog { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ConfirmationDialog" } } impl QueueFree for ConfirmationDialog { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ConfirmationDialog { type Target = crate :: generated :: AcceptDialog ; # [inline] fn deref (& self) -> & crate :: generated :: AcceptDialog { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConfirmationDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: AcceptDialog { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: AcceptDialog > for ConfirmationDialog { } unsafe impl SubClass < crate :: generated :: WindowDialog > for ConfirmationDialog { } unsafe impl SubClass < crate :: generated :: Popup > for ConfirmationDialog { } unsafe impl SubClass < crate :: generated :: Control > for ConfirmationDialog { } unsafe impl SubClass < crate :: generated :: CanvasItem > for ConfirmationDialog { } unsafe impl SubClass < crate :: generated :: Node > for ConfirmationDialog { } unsafe impl SubClass < crate :: generated :: Object > for ConfirmationDialog { } impl Instanciable for ConfirmationDialog { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ConfirmationDialog :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ConfirmationDialogMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_cancel : * mut sys :: godot_method_bind } impl ConfirmationDialogMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ConfirmationDialogMethodTable = ConfirmationDialogMethodTable { class_constructor : None , get_cancel : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ConfirmationDialogMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ConfirmationDialog\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cancel = (gd_api . godot_method_bind_get_method) (class_name , "get_cancel\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::confirmation_dialog::private::ConfirmationDialog;
            
            pub(crate) mod container {
                # ! [doc = "This module contains types related to the API class [`Container`][super::Container]."] pub (crate) mod private { # [doc = "`core class Container` inherits `Control` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_container.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Container` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Container>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nContainer inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Container { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Container ; # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Container { pub const NOTIFICATION_SORT_CHILDREN : i64 = 50i64 ; } impl Container { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Fit a child control in a given rect. This is mainly a helper for creating custom container classes."] # [doc = ""] # [inline] pub fn fit_child_in_rect (& self , child : impl AsArg < crate :: generated :: Control > , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ContainerMethodTable :: get (get_api ()) . fit_child_in_rect ; let ret = crate :: icalls :: icallvar__obj_rect2 (method_bind , self . this . sys () . as_ptr () , child . as_arg_ptr () , rect) ; } } # [doc = "Queue resort of the contained children. This is called automatically anyway, but can be called upon request."] # [doc = ""] # [inline] pub fn queue_sort (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ContainerMethodTable :: get (get_api ()) . queue_sort ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Container { } unsafe impl GodotObject for Container { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Container" } } impl QueueFree for Container { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Container { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Container { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for Container { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Container { } unsafe impl SubClass < crate :: generated :: Node > for Container { } unsafe impl SubClass < crate :: generated :: Object > for Container { } impl Instanciable for Container { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Container :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub fit_child_in_rect : * mut sys :: godot_method_bind , pub queue_sort : * mut sys :: godot_method_bind } impl ContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ContainerMethodTable = ContainerMethodTable { class_constructor : None , fit_child_in_rect : 0 as * mut sys :: godot_method_bind , queue_sort : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Container\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . fit_child_in_rect = (gd_api . godot_method_bind_get_method) (class_name , "fit_child_in_rect\0" . as_ptr () as * const c_char) ; table . queue_sort = (gd_api . godot_method_bind_get_method) (class_name , "queue_sort\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::container::private::Container;
            
            pub mod control {
                # ! [doc = "This module contains types related to the API class [`Control`][super::Control]."] pub (crate) mod private { # [doc = "`core class Control` inherits `CanvasItem` (manually managed).\n\nThis class has related types in the [`control`][super::control] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_control.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Control` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Control>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nControl inherits methods from:\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Control { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Control ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Anchor (pub i64) ; impl Anchor { pub const BEGIN : Anchor = Anchor (0i64) ; pub const END : Anchor = Anchor (1i64) ; } impl From < i64 > for Anchor { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Anchor > for i64 { # [inline] fn from (v : Anchor) -> Self { v . 0 } } impl FromVariant for Anchor { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CursorShape (pub i64) ; impl CursorShape { pub const ARROW : CursorShape = CursorShape (0i64) ; pub const IBEAM : CursorShape = CursorShape (1i64) ; pub const POINTING_HAND : CursorShape = CursorShape (2i64) ; pub const CROSS : CursorShape = CursorShape (3i64) ; pub const WAIT : CursorShape = CursorShape (4i64) ; pub const BUSY : CursorShape = CursorShape (5i64) ; pub const DRAG : CursorShape = CursorShape (6i64) ; pub const CAN_DROP : CursorShape = CursorShape (7i64) ; pub const FORBIDDEN : CursorShape = CursorShape (8i64) ; pub const VSIZE : CursorShape = CursorShape (9i64) ; pub const HSIZE : CursorShape = CursorShape (10i64) ; pub const BDIAGSIZE : CursorShape = CursorShape (11i64) ; pub const FDIAGSIZE : CursorShape = CursorShape (12i64) ; pub const MOVE : CursorShape = CursorShape (13i64) ; pub const VSPLIT : CursorShape = CursorShape (14i64) ; pub const HSPLIT : CursorShape = CursorShape (15i64) ; pub const HELP : CursorShape = CursorShape (16i64) ; } impl From < i64 > for CursorShape { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CursorShape > for i64 { # [inline] fn from (v : CursorShape) -> Self { v . 0 } } impl FromVariant for CursorShape { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct FocusMode (pub i64) ; impl FocusMode { pub const NONE : FocusMode = FocusMode (0i64) ; pub const CLICK : FocusMode = FocusMode (1i64) ; pub const ALL : FocusMode = FocusMode (2i64) ; } impl From < i64 > for FocusMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < FocusMode > for i64 { # [inline] fn from (v : FocusMode) -> Self { v . 0 } } impl FromVariant for FocusMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct GrowDirection (pub i64) ; impl GrowDirection { pub const BEGIN : GrowDirection = GrowDirection (0i64) ; pub const END : GrowDirection = GrowDirection (1i64) ; pub const BOTH : GrowDirection = GrowDirection (2i64) ; } impl From < i64 > for GrowDirection { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < GrowDirection > for i64 { # [inline] fn from (v : GrowDirection) -> Self { v . 0 } } impl FromVariant for GrowDirection { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LayoutPreset (pub i64) ; impl LayoutPreset { pub const TOP_LEFT : LayoutPreset = LayoutPreset (0i64) ; pub const TOP_RIGHT : LayoutPreset = LayoutPreset (1i64) ; pub const BOTTOM_LEFT : LayoutPreset = LayoutPreset (2i64) ; pub const BOTTOM_RIGHT : LayoutPreset = LayoutPreset (3i64) ; pub const CENTER_LEFT : LayoutPreset = LayoutPreset (4i64) ; pub const CENTER_TOP : LayoutPreset = LayoutPreset (5i64) ; pub const CENTER_RIGHT : LayoutPreset = LayoutPreset (6i64) ; pub const CENTER_BOTTOM : LayoutPreset = LayoutPreset (7i64) ; pub const CENTER : LayoutPreset = LayoutPreset (8i64) ; pub const LEFT_WIDE : LayoutPreset = LayoutPreset (9i64) ; pub const TOP_WIDE : LayoutPreset = LayoutPreset (10i64) ; pub const RIGHT_WIDE : LayoutPreset = LayoutPreset (11i64) ; pub const BOTTOM_WIDE : LayoutPreset = LayoutPreset (12i64) ; pub const VCENTER_WIDE : LayoutPreset = LayoutPreset (13i64) ; pub const HCENTER_WIDE : LayoutPreset = LayoutPreset (14i64) ; pub const WIDE : LayoutPreset = LayoutPreset (15i64) ; } impl From < i64 > for LayoutPreset { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LayoutPreset > for i64 { # [inline] fn from (v : LayoutPreset) -> Self { v . 0 } } impl FromVariant for LayoutPreset { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LayoutPresetMode (pub i64) ; impl LayoutPresetMode { pub const MINSIZE : LayoutPresetMode = LayoutPresetMode (0i64) ; pub const KEEP_WIDTH : LayoutPresetMode = LayoutPresetMode (1i64) ; pub const KEEP_HEIGHT : LayoutPresetMode = LayoutPresetMode (2i64) ; pub const KEEP_SIZE : LayoutPresetMode = LayoutPresetMode (3i64) ; } impl From < i64 > for LayoutPresetMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LayoutPresetMode > for i64 { # [inline] fn from (v : LayoutPresetMode) -> Self { v . 0 } } impl FromVariant for LayoutPresetMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MouseFilter (pub i64) ; impl MouseFilter { pub const STOP : MouseFilter = MouseFilter (0i64) ; pub const PASS : MouseFilter = MouseFilter (1i64) ; pub const IGNORE : MouseFilter = MouseFilter (2i64) ; } impl From < i64 > for MouseFilter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MouseFilter > for i64 { # [inline] fn from (v : MouseFilter) -> Self { v . 0 } } impl FromVariant for MouseFilter { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SizeFlags (pub i64) ; impl SizeFlags { pub const FILL : SizeFlags = SizeFlags (1i64) ; pub const EXPAND : SizeFlags = SizeFlags (2i64) ; pub const EXPAND_FILL : SizeFlags = SizeFlags (3i64) ; pub const SHRINK_CENTER : SizeFlags = SizeFlags (4i64) ; pub const SHRINK_END : SizeFlags = SizeFlags (8i64) ; } impl From < i64 > for SizeFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SizeFlags > for i64 { # [inline] fn from (v : SizeFlags) -> Self { v . 0 } } impl FromVariant for SizeFlags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Control { pub const ANCHOR_BEGIN : i64 = 0i64 ; pub const CURSOR_ARROW : i64 = 0i64 ; pub const FOCUS_NONE : i64 = 0i64 ; pub const GROW_DIRECTION_BEGIN : i64 = 0i64 ; pub const MOUSE_FILTER_STOP : i64 = 0i64 ; pub const PRESET_MODE_MINSIZE : i64 = 0i64 ; pub const PRESET_TOP_LEFT : i64 = 0i64 ; pub const ANCHOR_END : i64 = 1i64 ; pub const CURSOR_IBEAM : i64 = 1i64 ; pub const FOCUS_CLICK : i64 = 1i64 ; pub const GROW_DIRECTION_END : i64 = 1i64 ; pub const MOUSE_FILTER_PASS : i64 = 1i64 ; pub const PRESET_MODE_KEEP_WIDTH : i64 = 1i64 ; pub const PRESET_TOP_RIGHT : i64 = 1i64 ; pub const SIZE_FILL : i64 = 1i64 ; pub const CURSOR_POINTING_HAND : i64 = 2i64 ; pub const FOCUS_ALL : i64 = 2i64 ; pub const GROW_DIRECTION_BOTH : i64 = 2i64 ; pub const MOUSE_FILTER_IGNORE : i64 = 2i64 ; pub const PRESET_BOTTOM_LEFT : i64 = 2i64 ; pub const PRESET_MODE_KEEP_HEIGHT : i64 = 2i64 ; pub const SIZE_EXPAND : i64 = 2i64 ; pub const CURSOR_CROSS : i64 = 3i64 ; pub const PRESET_BOTTOM_RIGHT : i64 = 3i64 ; pub const PRESET_MODE_KEEP_SIZE : i64 = 3i64 ; pub const SIZE_EXPAND_FILL : i64 = 3i64 ; pub const CURSOR_WAIT : i64 = 4i64 ; pub const PRESET_CENTER_LEFT : i64 = 4i64 ; pub const SIZE_SHRINK_CENTER : i64 = 4i64 ; pub const CURSOR_BUSY : i64 = 5i64 ; pub const PRESET_CENTER_TOP : i64 = 5i64 ; pub const CURSOR_DRAG : i64 = 6i64 ; pub const PRESET_CENTER_RIGHT : i64 = 6i64 ; pub const CURSOR_CAN_DROP : i64 = 7i64 ; pub const PRESET_CENTER_BOTTOM : i64 = 7i64 ; pub const CURSOR_FORBIDDEN : i64 = 8i64 ; pub const PRESET_CENTER : i64 = 8i64 ; pub const SIZE_SHRINK_END : i64 = 8i64 ; pub const CURSOR_VSIZE : i64 = 9i64 ; pub const PRESET_LEFT_WIDE : i64 = 9i64 ; pub const CURSOR_HSIZE : i64 = 10i64 ; pub const PRESET_TOP_WIDE : i64 = 10i64 ; pub const CURSOR_BDIAGSIZE : i64 = 11i64 ; pub const PRESET_RIGHT_WIDE : i64 = 11i64 ; pub const CURSOR_FDIAGSIZE : i64 = 12i64 ; pub const PRESET_BOTTOM_WIDE : i64 = 12i64 ; pub const CURSOR_MOVE : i64 = 13i64 ; pub const PRESET_VCENTER_WIDE : i64 = 13i64 ; pub const CURSOR_VSPLIT : i64 = 14i64 ; pub const PRESET_HCENTER_WIDE : i64 = 14i64 ; pub const CURSOR_HSPLIT : i64 = 15i64 ; pub const PRESET_WIDE : i64 = 15i64 ; pub const CURSOR_HELP : i64 = 16i64 ; pub const NOTIFICATION_RESIZED : i64 = 40i64 ; pub const NOTIFICATION_MOUSE_ENTER : i64 = 41i64 ; pub const NOTIFICATION_MOUSE_EXIT : i64 = 42i64 ; pub const NOTIFICATION_FOCUS_ENTER : i64 = 43i64 ; pub const NOTIFICATION_FOCUS_EXIT : i64 = 44i64 ; pub const NOTIFICATION_THEME_CHANGED : i64 = 45i64 ; pub const NOTIFICATION_MODAL_CLOSE : i64 = 46i64 ; pub const NOTIFICATION_SCROLL_BEGIN : i64 = 47i64 ; pub const NOTIFICATION_SCROLL_END : i64 = 48i64 ; } impl Control { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ControlMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to [`Node._unhandled_input`][Node::_unhandled_input] or [`Node._unhandled_key_input`][Node::_unhandled_key_input]."] # [doc = ""] # [inline] pub fn accept_event (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . accept_event ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCreates a local override for a theme [`Color`][Color] with the specified `name`. Local overrides always take precedence when fetching theme items for the control.\nSee also [`get_color`][Self::get_color], [`remove_color_override`][Self::remove_color_override].\n**Example of overriding a label's color and resetting it later:**\n```gdscript\n# Given the child Label node \"MyLabel\", override its font color with a custom value.\n$MyLabel.add_color_override(\"font_color\", Color(1, 0.5, 0))\n# Reset the font color of the child label.\n$MyLabel.add_color_override(\"font_color\", get_color(\"font_color\", \"Label\"))\n```"] # [doc = ""] # [inline] pub fn add_color_override (& self , name : impl Into < GodotString > , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . add_color_override ; let ret = crate :: icalls :: icallvar__str_color (method_bind , self . this . sys () . as_ptr () , name . into () , color) ; } } # [doc = "Creates a local override for a theme constant with the specified `name`. Local overrides always take precedence when fetching theme items for the control.\nSee also [`get_constant`][Self::get_constant], [`remove_constant_override`][Self::remove_constant_override]."] # [doc = ""] # [inline] pub fn add_constant_override (& self , name : impl Into < GodotString > , constant : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . add_constant_override ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , constant as _) ; } } # [doc = "Creates a local override for a theme [`Font`][Font] with the specified `name`. Local overrides always take precedence when fetching theme items for the control.\n**Note:** An override can be removed by assigning it a `null` value. This behavior is deprecated and will be removed in 4.0, use [`remove_font_override`][Self::remove_font_override] instead.\nSee also [`get_font`][Self::get_font]."] # [doc = ""] # [inline] pub fn add_font_override (& self , name : impl Into < GodotString > , font : impl AsArg < crate :: generated :: Font >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . add_font_override ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , font . as_arg_ptr ()) ; } } # [doc = "Creates a local override for a theme icon with the specified `name`. Local overrides always take precedence when fetching theme items for the control.\n**Note:** An override can be removed by assigning it a `null` value. This behavior is deprecated and will be removed in 4.0, use [`remove_icon_override`][Self::remove_icon_override] instead.\nSee also [`get_icon`][Self::get_icon]."] # [doc = ""] # [inline] pub fn add_icon_override (& self , name : impl Into < GodotString > , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . add_icon_override ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , texture . as_arg_ptr ()) ; } } # [doc = "Creates a local override for a theme shader with the specified `name`. Local overrides always take precedence when fetching theme items for the control.\n**Note:** An override can be removed by assigning it a `null` value. This behavior is deprecated and will be removed in 4.0, use [`remove_shader_override`][Self::remove_shader_override] instead."] # [doc = ""] # [inline] pub fn add_shader_override (& self , name : impl Into < GodotString > , shader : impl AsArg < crate :: generated :: Shader >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . add_shader_override ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , shader . as_arg_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCreates a local override for a theme [`StyleBox`][StyleBox] with the specified `name`. Local overrides always take precedence when fetching theme items for the control.\n**Note:** An override can be removed by assigning it a `null` value. This behavior is deprecated and will be removed in 4.0, use [`remove_stylebox_override`][Self::remove_stylebox_override] instead.\nSee also [`get_stylebox`][Self::get_stylebox].\n**Example of modifying a property in a StyleBox by duplicating it:**\n```gdscript\n# The snippet below assumes the child node MyButton has a StyleBoxFlat assigned.\n# Resources are shared across instances, so we need to duplicate it\n# to avoid modifying the appearance of all other buttons.\nvar new_stylebox_normal = $MyButton.get_stylebox(\"normal\").duplicate()\nnew_stylebox_normal.border_width_top = 3\nnew_stylebox_normal.border_color = Color(0, 1, 0.5)\n$MyButton.add_stylebox_override(\"normal\", new_stylebox_normal)\n# Remove the stylebox override.\n$MyButton.add_stylebox_override(\"normal\", null)\n```"] # [doc = ""] # [inline] pub fn add_stylebox_override (& self , name : impl Into < GodotString > , stylebox : impl AsArg < crate :: generated :: StyleBox >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . add_stylebox_override ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , stylebox . as_arg_ptr ()) ; } } # [doc = "Finds the next (below in the tree) [`Control`][Control] that can receive the focus."] # [doc = ""] # [inline] pub fn find_next_valid_focus (& self) -> Option < Ref < crate :: generated :: Control , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . find_next_valid_focus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Control , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Finds the previous (above in the tree) [`Control`][Control] that can receive the focus."] # [doc = ""] # [inline] pub fn find_prev_valid_focus (& self) -> Option < Ref < crate :: generated :: Control , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . find_prev_valid_focus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Control , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Forces drag and bypasses [`get_drag_data`][Self::get_drag_data] and [`set_drag_preview`][Self::set_drag_preview] by passing `data` and `preview`. Drag will start even if the mouse is neither over nor pressed on this control.\nThe methods [`can_drop_data`][Self::can_drop_data] and [`drop_data`][Self::drop_data] must be implemented on controls that want to receive drop data."] # [doc = ""] # [inline] pub fn force_drag (& self , data : impl OwnedToVariant , preview : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . force_drag ; let ret = crate :: icalls :: icallvar__var_obj (method_bind , self . this . sys () . as_ptr () , data . owned_to_variant () , preview . as_arg_ptr ()) ; } } # [doc = "Returns the anchor identified by `margin` constant from [`Margin`][Margin] enum. A getter method for [`anchor_bottom`][Self::anchor_bottom], [`anchor_left`][Self::anchor_left], [`anchor_right`][Self::anchor_right] and [`anchor_top`][Self::anchor_top]."] # [doc = ""] # [inline] pub fn anchor (& self , margin : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_anchor ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns [`margin_left`][Self::margin_left] and [`margin_top`][Self::margin_top]. See also [`rect_position`][Self::rect_position]."] # [doc = ""] # [inline] pub fn get_begin (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_begin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns a [`Color`][Color] from the first matching [`Theme`][Theme] in the tree if that [`Theme`][Theme] has a color item with the specified `name` and `theme_type`. If `theme_type` is omitted the class name of the current control is used as the type, or [`theme_type_variation`][Self::theme_type_variation] if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance.\nFor the current control its local overrides are considered first (see [`add_color_override`][Self::add_color_override]), then its assigned [`theme`][Self::theme]. After the current control, each parent control and its assigned [`theme`][Self::theme] are considered; controls without a [`theme`][Self::theme] assigned are skipped. If no matching [`Theme`][Theme] is found in the tree, a custom project [`Theme`][Theme] (see [member ProjectSettings.gui/theme/custom]) and the default [`Theme`][Theme] are used.\n```gdscript\nfunc _ready():\n    # Get the font color defined for the current Control's class, if it exists.\n    modulate = get_color(\"font_color\")\n    # Get the font color defined for the Button class.\n    modulate = get_color(\"font_color\", \"Button\")\n```\n# Default Arguments\n* `theme_type` - `\"\"`"] # [doc = ""] # [inline] pub fn get_color (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns combined minimum size from [`rect_min_size`][Self::rect_min_size] and [`get_minimum_size`][Self::get_minimum_size]."] # [doc = ""] # [inline] pub fn get_combined_minimum_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_combined_minimum_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a constant from the first matching [`Theme`][Theme] in the tree if that [`Theme`][Theme] has a constant item with the specified `name` and `theme_type`.\nSee [`get_color`][Self::get_color] for details.\n# Default Arguments\n* `theme_type` - `\"\"`"] # [doc = ""] # [inline] pub fn get_constant (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_constant ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the mouse cursor shape the control displays on mouse hover. See [`CursorShape`][CursorShape].\n# Default Arguments\n* `position` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn get_cursor_shape (& self , position : Vector2) -> crate :: generated :: control :: CursorShape { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_cursor_shape ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; < crate :: generated :: control :: CursorShape > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes."] # [doc = ""] # [inline] pub fn custom_minimum_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_custom_minimum_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors.\n**Note:** On Linux, shapes may vary depending on the cursor theme of the system."] # [doc = ""] # [inline] pub fn default_cursor_shape (& self) -> crate :: generated :: control :: CursorShape { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_default_cursor_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: control :: CursorShape > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns [`margin_right`][Self::margin_right] and [`margin_bottom`][Self::margin_bottom]."] # [doc = ""] # [inline] pub fn get_end (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_end ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals."] # [doc = ""] # [inline] pub fn focus_mode (& self) -> crate :: generated :: control :: FocusMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_focus_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: control :: FocusMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the focus neighbour identified by `margin` constant from [`Margin`][Margin] enum. A getter method for [`focus_neighbour_bottom`][Self::focus_neighbour_bottom], [`focus_neighbour_left`][Self::focus_neighbour_left], [`focus_neighbour_right`][Self::focus_neighbour_right] and [`focus_neighbour_top`][Self::focus_neighbour_top]."] # [doc = ""] # [inline] pub fn focus_neighbour (& self , margin : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_focus_neighbour ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Tells Godot which node it should give keyboard focus to if the user presses Tab on a keyboard by default. You can change the key by editing the `ui_focus_next` input action.\nIf this property is not set, Godot will select a \"best guess\" based on surrounding nodes in the scene tree."] # [doc = ""] # [inline] pub fn focus_next (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_focus_next ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the control that has the keyboard focus or `null` if none."] # [doc = ""] # [inline] pub fn get_focus_owner (& self) -> Option < Ref < crate :: generated :: Control , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_focus_owner ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Control , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab on a keyboard by default. You can change the key by editing the `ui_focus_prev` input action.\nIf this property is not set, Godot will select a \"best guess\" based on surrounding nodes in the scene tree."] # [doc = ""] # [inline] pub fn focus_previous (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_focus_previous ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [`Font`][Font] from the first matching [`Theme`][Theme] in the tree if that [`Theme`][Theme] has a font item with the specified `name` and `theme_type`.\nSee [`get_color`][Self::get_color] for details.\n# Default Arguments\n* `theme_type` - `\"\"`"] # [doc = ""] # [inline] pub fn get_font (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> Option < Ref < crate :: generated :: Font , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_font ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < Option < Ref < crate :: generated :: Font , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The node's global position, relative to the world (usually to the top-left corner of the window)."] # [doc = ""] # [inline] pub fn global_position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_global_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position and size of the control relative to the top-left corner of the screen. See [`rect_position`][Self::rect_position] and [`rect_size`][Self::rect_size]."] # [doc = ""] # [inline] pub fn get_global_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_global_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Controls the direction on the horizontal axis in which the control should grow if its horizontal minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size."] # [doc = ""] # [inline] pub fn h_grow_direction (& self) -> crate :: generated :: control :: GrowDirection { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_h_grow_direction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: control :: GrowDirection > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Tells the parent [`Container`][Container] nodes how they should resize and place the node on the X axis. Use one of the [`SizeFlags`][SizeFlags] constants to change the flags. See the constants to learn what each does."] # [doc = ""] # [inline] pub fn h_size_flags (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_h_size_flags ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an icon from the first matching [`Theme`][Theme] in the tree if that [`Theme`][Theme] has an icon item with the specified `name` and `theme_type`.\nSee [`get_color`][Self::get_color] for details.\n# Default Arguments\n* `theme_type` - `\"\"`"] # [doc = ""] # [inline] pub fn get_icon (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_icon ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the anchor identified by `margin` constant from [`Margin`][Margin] enum. A getter method for [`margin_bottom`][Self::margin_bottom], [`margin_left`][Self::margin_left], [`margin_right`][Self::margin_right] and [`margin_top`][Self::margin_top]."] # [doc = ""] # [inline] pub fn margin (& self , margin : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the minimum size for this control. See [`rect_min_size`][Self::rect_min_size]."] # [doc = ""] # [inline] pub fn get_minimum_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_minimum_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Controls whether the control will be able to receive mouse button input events through [`_gui_input`][Self::_gui_input] and how these events should be handled. Also controls whether the control can receive the `mouse_entered`, and `mouse_exited` signals. See the constants to learn what each does."] # [doc = ""] # [inline] pub fn mouse_filter (& self) -> crate :: generated :: control :: MouseFilter { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_mouse_filter ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: control :: MouseFilter > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the width/height occupied in the parent control."] # [doc = ""] # [inline] pub fn get_parent_area_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_parent_area_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the parent control node."] # [doc = ""] # [inline] pub fn get_parent_control (& self) -> Option < Ref < crate :: generated :: Control , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_parent_control ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Control , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Enables whether input should propagate when you close the control as modal.\nIf `false`, stops event handling at the viewport input event handling. The viewport first hides the modal and after marks the input as handled."] # [doc = ""] # [inline] pub fn pass_on_modal_close_click (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_pass_on_modal_close_click ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "By default, the node's pivot is its top-left corner. When you change its [`rect_rotation`][Self::rect_rotation] or [`rect_scale`][Self::rect_scale], it will rotate or scale around this pivot. Set this property to [`rect_size`][Self::rect_size] / 2 to pivot around the Control's center."] # [doc = ""] # [inline] pub fn pivot_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_pivot_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by [`rect_pivot_offset`][Self::rect_pivot_offset]."] # [doc = ""] # [inline] pub fn position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position and size of the control relative to the top-left corner of the parent Control. See [`rect_position`][Self::rect_position] and [`rect_size`][Self::rect_size]."] # [doc = ""] # [inline] pub fn get_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the rotation (in radians)."] # [doc = ""] # [inline] pub fn get_rotation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_rotation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The node's rotation around its pivot, in degrees. See [`rect_pivot_offset`][Self::rect_pivot_offset] to change the pivot's position."] # [doc = ""] # [inline] pub fn rotation_degrees (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_rotation_degrees ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The node's scale, relative to its [`rect_size`][Self::rect_size]. Change this property to scale the node around its [`rect_pivot_offset`][Self::rect_pivot_offset]. The Control's [`hint_tooltip`][Self::hint_tooltip] will also scale according to this value.\n**Note:** This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [`documentation`][documentation](https://docs.godotengine.org/en/3.5.1/tutorials/rendering/multiple_resolutions.html) instead of scaling Controls individually.\n**Note:** If the Control node is a child of a [`Container`][Container] node, the scale will be reset to `Vector2(1, 1)` when the scene is instanced. To set the Control's scale when it's instanced, wait for one frame using `yield(get_tree(), \"idle_frame\")` then set its [`rect_scale`][Self::rect_scale] property."] # [doc = ""] # [inline] pub fn scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The size of the node's bounding rectangle, in pixels. [`Container`][Container] nodes update this property automatically."] # [doc = ""] # [inline] pub fn size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If the node and at least one of its neighbours uses the [`SIZE_EXPAND`][Self::SIZE_EXPAND] size flag, the parent [`Container`][Container] will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbour a ratio of 1, this node will take two thirds of the available space."] # [doc = ""] # [inline] pub fn stretch_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_stretch_ratio ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a [`StyleBox`][StyleBox] from the first matching [`Theme`][Theme] in the tree if that [`Theme`][Theme] has a stylebox item with the specified `name` and `theme_type`.\nSee [`get_color`][Self::get_color] for details.\n# Default Arguments\n* `theme_type` - `\"\"`"] # [doc = ""] # [inline] pub fn get_stylebox (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> Option < Ref < crate :: generated :: StyleBox , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_stylebox ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < Option < Ref < crate :: generated :: StyleBox , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Changing this property replaces the current [`Theme`][Theme] resource this node and all its [`Control`][Control] children use."] # [doc = ""] # [inline] pub fn theme (& self) -> Option < Ref < crate :: generated :: Theme , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_theme ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Theme , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the default font from the first matching [`Theme`][Theme] in the tree if that [`Theme`][Theme] has a valid [`Theme.default_font`][Theme::default_font] value.\nSee [`get_color`][Self::get_color] for details."] # [doc = ""] # [inline] pub fn get_theme_default_font (& self) -> Option < Ref < crate :: generated :: Font , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_theme_default_font ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Font , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The name of a theme type variation used by this [`Control`][Control] to look up its own theme items. When empty, the class name of the node is used (e.g. `Button` for the [`Button`][Button] control), as well as the class names of all parent classes (in order of inheritance).\nWhen set, this property gives the highest priority to the type of the specified name. This type can in turn extend another type, forming a dependency chain. See [`Theme.set_type_variation`][Theme::set_type_variation]. If the theme item cannot be found using this type or its base types, lookup falls back on the class names.\n**Note:** To look up [`Control`][Control]'s own items use various `get_*` methods without specifying `theme_type`.\n**Note:** Theme items are looked for in the tree order, from branch to root, where each [`Control`][Control] node is checked for its [`theme`][Self::theme] property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last."] # [doc = ""] # [inline] pub fn theme_type_variation (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_theme_type_variation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tooltip, which will appear when the cursor is resting over this control. See [`hint_tooltip`][Self::hint_tooltip].\n# Default Arguments\n* `at_position` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn get_tooltip (& self , at_position : Vector2) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_tooltip ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , at_position) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Controls the direction on the vertical axis in which the control should grow if its vertical minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size."] # [doc = ""] # [inline] pub fn v_grow_direction (& self) -> crate :: generated :: control :: GrowDirection { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_v_grow_direction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: control :: GrowDirection > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Tells the parent [`Container`][Container] nodes how they should resize and place the node on the Y axis. Use one of the [`SizeFlags`][SizeFlags] constants to change the flags. See the constants to learn what each does."] # [doc = ""] # [inline] pub fn v_size_flags (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_v_size_flags ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCreates an [`InputEventMouseButton`][InputEventMouseButton] that attempts to click the control. If the event is received, the control acquires focus.\n```gdscript\nfunc _process(delta):\n    grab_click_focus() #when clicking another Control node, this node will be clicked instead\n```"] # [doc = ""] # [inline] pub fn grab_click_focus (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . grab_click_focus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Steal the focus from another control and become the focused control (see [`focus_mode`][Self::focus_mode]).\n**Note**: Using this method together with [`Object.call_deferred`][Object::call_deferred] makes it more reliable, especially when called inside [`Node._ready`][Node::_ready]."] # [doc = ""] # [inline] pub fn grab_focus (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . grab_focus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns `true` if there is a matching [`Theme`][Theme] in the tree that has a color item with the specified `name` and `theme_type`.\nSee [`get_color`][Self::get_color] for details.\n# Default Arguments\n* `theme_type` - `\"\"`"] # [doc = ""] # [inline] pub fn has_color (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_color ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if there is a local override for a theme [`Color`][Color] with the specified `name` in this [`Control`][Control] node.\nSee [`add_color_override`][Self::add_color_override]."] # [doc = ""] # [inline] pub fn has_color_override (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_color_override ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if there is a matching [`Theme`][Theme] in the tree that has a constant item with the specified `name` and `theme_type`.\nSee [`get_color`][Self::get_color] for details.\n# Default Arguments\n* `theme_type` - `\"\"`"] # [doc = ""] # [inline] pub fn has_constant (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_constant ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if there is a local override for a theme constant with the specified `name` in this [`Control`][Control] node.\nSee [`add_constant_override`][Self::add_constant_override]."] # [doc = ""] # [inline] pub fn has_constant_override (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_constant_override ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this is the current focused control. See [`focus_mode`][Self::focus_mode]."] # [doc = ""] # [inline] pub fn has_focus (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_focus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if there is a matching [`Theme`][Theme] in the tree that has a font item with the specified `name` and `theme_type`.\nSee [`get_color`][Self::get_color] for details.\n# Default Arguments\n* `theme_type` - `\"\"`"] # [doc = ""] # [inline] pub fn has_font (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_font ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if there is a local override for a theme [`Font`][Font] with the specified `name` in this [`Control`][Control] node.\nSee [`add_font_override`][Self::add_font_override]."] # [doc = ""] # [inline] pub fn has_font_override (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_font_override ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if there is a matching [`Theme`][Theme] in the tree that has an icon item with the specified `name` and `theme_type`.\nSee [`get_color`][Self::get_color] for details.\n# Default Arguments\n* `theme_type` - `\"\"`"] # [doc = ""] # [inline] pub fn has_icon (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_icon ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if there is a local override for a theme icon with the specified `name` in this [`Control`][Control] node.\nSee [`add_icon_override`][Self::add_icon_override]."] # [doc = ""] # [inline] pub fn has_icon_override (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_icon_override ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if there is a local override for a theme shader with the specified `name` in this [`Control`][Control] node.\nSee [`add_shader_override`][Self::add_shader_override]."] # [doc = ""] # [inline] pub fn has_shader_override (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_shader_override ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if there is a matching [`Theme`][Theme] in the tree that has a stylebox item with the specified `name` and `theme_type`.\nSee [`get_color`][Self::get_color] for details.\n# Default Arguments\n* `theme_type` - `\"\"`"] # [doc = ""] # [inline] pub fn has_stylebox (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_stylebox ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if there is a local override for a theme [`StyleBox`][StyleBox] with the specified `name` in this [`Control`][Control] node.\nSee [`add_stylebox_override`][Self::add_stylebox_override]."] # [doc = ""] # [inline] pub fn has_stylebox_override (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . has_stylebox_override ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Enables whether rendering of [`CanvasItem`][CanvasItem] based children should be clipped to this control's rectangle. If `true`, parts of a child which would be visibly outside of this control's rectangle will not be rendered."] # [doc = ""] # [inline] pub fn is_clipping_contents (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . is_clipping_contents ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if a drag operation is successful. Alternative to [`Viewport.gui_is_drag_successful`][Viewport::gui_is_drag_successful].\nBest used with [`Node.NOTIFICATION_DRAG_END`][Node::NOTIFICATION_DRAG_END]."] # [doc = ""] # [inline] pub fn is_drag_successful (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . is_drag_successful ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Invalidates the size cache in this node and in parent nodes up to toplevel. Intended to be used with [`get_minimum_size`][Self::get_minimum_size] when the return value is changed. Setting [`rect_min_size`][Self::rect_min_size] directly calls this method automatically."] # [doc = ""] # [inline] pub fn minimum_size_changed (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . minimum_size_changed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Give up the focus. No other control will be able to receive keyboard input."] # [doc = ""] # [inline] pub fn release_focus (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . release_focus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes a theme override for a [`Color`][Color] with the given `name`."] # [doc = ""] # [inline] pub fn remove_color_override (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . remove_color_override ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Removes a theme override for a constant with the given `name`."] # [doc = ""] # [inline] pub fn remove_constant_override (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . remove_constant_override ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Removes a theme override for a [`Font`][Font] with the given `name`."] # [doc = ""] # [inline] pub fn remove_font_override (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . remove_font_override ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Removes a theme override for an icon with the given `name`."] # [doc = ""] # [inline] pub fn remove_icon_override (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . remove_icon_override ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Removes a theme override for a shader with the given `name`."] # [doc = ""] # [inline] pub fn remove_shader_override (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . remove_shader_override ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Removes a theme override for a [`StyleBox`][StyleBox] with the given `name`."] # [doc = ""] # [inline] pub fn remove_stylebox_override (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . remove_stylebox_override ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Sets the anchor identified by `margin` constant from [`Margin`][Margin] enum to value `anchor`. A setter method for [`anchor_bottom`][Self::anchor_bottom], [`anchor_left`][Self::anchor_left], [`anchor_right`][Self::anchor_right] and [`anchor_top`][Self::anchor_top].\nIf `keep_margin` is `true`, margins aren't updated after this operation.\nIf `push_opposite_anchor` is `true` and the opposite anchor overlaps this anchor, the opposite one will have its value overridden. For example, when setting left anchor to 1 and the right anchor has value of 0.5, the right anchor will also get value of 1. If `push_opposite_anchor` was `false`, the left anchor would get value 0.5.\n# Default Arguments\n* `keep_margin` - `false`\n* `push_opposite_anchor` - `true`"] # [doc = ""] # [inline] pub fn set_anchor (& self , margin : i64 , anchor : f64 , keep_margin : bool , push_opposite_anchor : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_anchor ; let ret = crate :: icalls :: icallvar__i64_f64_bool_bool (method_bind , self . this . sys () . as_ptr () , margin as _ , anchor as _ , keep_margin as _ , push_opposite_anchor as _) ; } } # [doc = "Works the same as [`set_anchor`][Self::set_anchor], but instead of `keep_margin` argument and automatic update of margin, it allows to set the margin offset yourself (see [`set_margin`][Self::set_margin]).\n# Default Arguments\n* `push_opposite_anchor` - `false`"] # [doc = ""] # [inline] pub fn set_anchor_and_margin (& self , margin : i64 , anchor : f64 , offset : f64 , push_opposite_anchor : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_anchor_and_margin ; let ret = crate :: icalls :: icallvar__i64_f64_f64_bool (method_bind , self . this . sys () . as_ptr () , margin as _ , anchor as _ , offset as _ , push_opposite_anchor as _) ; } } # [doc = "Sets both anchor preset and margin preset. See [`set_anchors_preset`][Self::set_anchors_preset] and [`set_margins_preset`][Self::set_margins_preset].\n# Default Arguments\n* `resize_mode` - `0`\n* `margin` - `0`"] # [doc = ""] # [inline] pub fn set_anchors_and_margins_preset (& self , preset : i64 , resize_mode : i64 , margin : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_anchors_and_margins_preset ; let ret = crate :: icalls :: icallvar__i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , preset as _ , resize_mode as _ , margin as _) ; } } # [doc = "Sets the anchors to a `preset` from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor.\nIf `keep_margins` is `true`, control's position will also be updated.\n# Default Arguments\n* `keep_margins` - `false`"] # [doc = ""] # [inline] pub fn set_anchors_preset (& self , preset : i64 , keep_margins : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_anchors_preset ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , preset as _ , keep_margins as _) ; } } # [doc = "Sets [`margin_left`][Self::margin_left] and [`margin_top`][Self::margin_top] at the same time. Equivalent of changing [`rect_position`][Self::rect_position]."] # [doc = ""] # [inline] pub fn set_begin (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_begin ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "Enables whether rendering of [`CanvasItem`][CanvasItem] based children should be clipped to this control's rectangle. If `true`, parts of a child which would be visibly outside of this control's rectangle will not be rendered."] # [doc = ""] # [inline] pub fn set_clip_contents (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_clip_contents ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes."] # [doc = ""] # [inline] pub fn set_custom_minimum_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_custom_minimum_size ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors.\n**Note:** On Linux, shapes may vary depending on the cursor theme of the system."] # [doc = ""] # [inline] pub fn set_default_cursor_shape (& self , shape : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_default_cursor_shape ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , shape as _) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nForwards the handling of this control's drag and drop to `target` control.\nForwarding can be implemented in the target control similar to the methods [`get_drag_data`][Self::get_drag_data], [`can_drop_data`][Self::can_drop_data], and [`drop_data`][Self::drop_data] but with two differences:\n1. The function name must be suffixed with **_fw**\n2. The function must take an extra argument that is the control doing the forwarding\n```gdscript\n# ThisControl.gd\nextends Control\nfunc _ready():\n    set_drag_forwarding(target_control)\n\n# TargetControl.gd\nextends Control\nfunc can_drop_data_fw(position, data, from_control):\n    return true\n\nfunc drop_data_fw(position, data, from_control):\n    my_handle_data(data)\n\nfunc get_drag_data_fw(position, from_control):\n    set_drag_preview(my_preview)\n    return my_data()\n```"] # [doc = ""] # [inline] pub fn set_drag_forwarding (& self , target : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_drag_forwarding ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , target . as_arg_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nShows the given control at the mouse pointer. A good time to call this method is in [`get_drag_data`][Self::get_drag_data]. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended.\n```gdscript\nexport (Color, RGBA) var color = Color(1, 0, 0, 1)\n\nfunc get_drag_data(position):\n    # Use a control that is not in the tree\n    var cpb = ColorPickerButton.new()\n    cpb.color = color\n    cpb.rect_size = Vector2(50, 50)\n    set_drag_preview(cpb)\n    return color\n```"] # [doc = ""] # [inline] pub fn set_drag_preview (& self , control : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_drag_preview ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr ()) ; } } # [doc = "Sets [`margin_right`][Self::margin_right] and [`margin_bottom`][Self::margin_bottom] at the same time."] # [doc = ""] # [inline] pub fn set_end (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_end ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals."] # [doc = ""] # [inline] pub fn set_focus_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_focus_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Sets the anchor identified by `margin` constant from [`Margin`][Margin] enum to [`Control`][Control] at `neighbor` node path. A setter method for [`focus_neighbour_bottom`][Self::focus_neighbour_bottom], [`focus_neighbour_left`][Self::focus_neighbour_left], [`focus_neighbour_right`][Self::focus_neighbour_right] and [`focus_neighbour_top`][Self::focus_neighbour_top]."] # [doc = ""] # [inline] pub fn set_focus_neighbour (& self , margin : i64 , neighbour : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_focus_neighbour ; let ret = crate :: icalls :: icallvar__i64_nodepath (method_bind , self . this . sys () . as_ptr () , margin as _ , neighbour . into ()) ; } } # [doc = "Tells Godot which node it should give keyboard focus to if the user presses Tab on a keyboard by default. You can change the key by editing the `ui_focus_next` input action.\nIf this property is not set, Godot will select a \"best guess\" based on surrounding nodes in the scene tree."] # [doc = ""] # [inline] pub fn set_focus_next (& self , next : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_focus_next ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , next . into ()) ; } } # [doc = "Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab on a keyboard by default. You can change the key by editing the `ui_focus_prev` input action.\nIf this property is not set, Godot will select a \"best guess\" based on surrounding nodes in the scene tree."] # [doc = ""] # [inline] pub fn set_focus_previous (& self , previous : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_focus_previous ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , previous . into ()) ; } } # [doc = "Sets the [`rect_global_position`][Self::rect_global_position] to given `position`.\nIf `keep_margins` is `true`, control's anchors will be updated instead of margins.\n# Default Arguments\n* `keep_margins` - `false`"] # [doc = ""] # [inline] pub fn set_global_position (& self , position : Vector2 , keep_margins : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_global_position ; let ret = crate :: icalls :: icallvar__vec2_bool (method_bind , self . this . sys () . as_ptr () , position , keep_margins as _) ; } } # [doc = "Controls the direction on the horizontal axis in which the control should grow if its horizontal minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size."] # [doc = ""] # [inline] pub fn set_h_grow_direction (& self , direction : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_h_grow_direction ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , direction as _) ; } } # [doc = "Tells the parent [`Container`][Container] nodes how they should resize and place the node on the X axis. Use one of the [`SizeFlags`][SizeFlags] constants to change the flags. See the constants to learn what each does."] # [doc = ""] # [inline] pub fn set_h_size_flags (& self , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_h_size_flags ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flags as _) ; } } # [doc = "Sets the margin identified by `margin` constant from [`Margin`][Margin] enum to given `offset`. A setter method for [`margin_bottom`][Self::margin_bottom], [`margin_left`][Self::margin_left], [`margin_right`][Self::margin_right] and [`margin_top`][Self::margin_top]."] # [doc = ""] # [inline] pub fn set_margin (& self , margin : i64 , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , margin as _ , offset as _) ; } } # [doc = "Sets the margins to a `preset` from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor.\nUse parameter `resize_mode` with constants from [enum Control.LayoutPresetMode] to better determine the resulting size of the [`Control`][Control]. Constant size will be ignored if used with presets that change size, e.g. `PRESET_LEFT_WIDE`.\nUse parameter `margin` to determine the gap between the [`Control`][Control] and the edges.\n# Default Arguments\n* `resize_mode` - `0`\n* `margin` - `0`"] # [doc = ""] # [inline] pub fn set_margins_preset (& self , preset : i64 , resize_mode : i64 , margin : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_margins_preset ; let ret = crate :: icalls :: icallvar__i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , preset as _ , resize_mode as _ , margin as _) ; } } # [doc = "Controls whether the control will be able to receive mouse button input events through [`_gui_input`][Self::_gui_input] and how these events should be handled. Also controls whether the control can receive the `mouse_entered`, and `mouse_exited` signals. See the constants to learn what each does."] # [doc = ""] # [inline] pub fn set_mouse_filter (& self , filter : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_mouse_filter ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , filter as _) ; } } # [doc = "Enables whether input should propagate when you close the control as modal.\nIf `false`, stops event handling at the viewport input event handling. The viewport first hides the modal and after marks the input as handled."] # [doc = ""] # [inline] pub fn set_pass_on_modal_close_click (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_pass_on_modal_close_click ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "By default, the node's pivot is its top-left corner. When you change its [`rect_rotation`][Self::rect_rotation] or [`rect_scale`][Self::rect_scale], it will rotate or scale around this pivot. Set this property to [`rect_size`][Self::rect_size] / 2 to pivot around the Control's center."] # [doc = ""] # [inline] pub fn set_pivot_offset (& self , pivot_offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_pivot_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , pivot_offset) ; } } # [doc = "Sets the [`rect_position`][Self::rect_position] to given `position`.\nIf `keep_margins` is `true`, control's anchors will be updated instead of margins.\n# Default Arguments\n* `keep_margins` - `false`"] # [doc = ""] # [inline] pub fn set_position (& self , position : Vector2 , keep_margins : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_position ; let ret = crate :: icalls :: icallvar__vec2_bool (method_bind , self . this . sys () . as_ptr () , position , keep_margins as _) ; } } # [doc = "Sets the rotation (in radians)."] # [doc = ""] # [inline] pub fn set_rotation (& self , radians : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_rotation ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radians as _) ; } } # [doc = "The node's rotation around its pivot, in degrees. See [`rect_pivot_offset`][Self::rect_pivot_offset] to change the pivot's position."] # [doc = ""] # [inline] pub fn set_rotation_degrees (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_rotation_degrees ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , degrees as _) ; } } # [doc = "The node's scale, relative to its [`rect_size`][Self::rect_size]. Change this property to scale the node around its [`rect_pivot_offset`][Self::rect_pivot_offset]. The Control's [`hint_tooltip`][Self::hint_tooltip] will also scale according to this value.\n**Note:** This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [`documentation`][documentation](https://docs.godotengine.org/en/3.5.1/tutorials/rendering/multiple_resolutions.html) instead of scaling Controls individually.\n**Note:** If the Control node is a child of a [`Container`][Container] node, the scale will be reset to `Vector2(1, 1)` when the scene is instanced. To set the Control's scale when it's instanced, wait for one frame using `yield(get_tree(), \"idle_frame\")` then set its [`rect_scale`][Self::rect_scale] property."] # [doc = ""] # [inline] pub fn set_scale (& self , scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_scale ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Sets the size (see [`rect_size`][Self::rect_size]).\nIf `keep_margins` is `true`, control's anchors will be updated instead of margins.\n# Default Arguments\n* `keep_margins` - `false`"] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector2 , keep_margins : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallvar__vec2_bool (method_bind , self . this . sys () . as_ptr () , size , keep_margins as _) ; } } # [doc = "If the node and at least one of its neighbours uses the [`SIZE_EXPAND`][Self::SIZE_EXPAND] size flag, the parent [`Container`][Container] will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbour a ratio of 1, this node will take two thirds of the available space."] # [doc = ""] # [inline] pub fn set_stretch_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_stretch_ratio ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ratio as _) ; } } # [doc = "Changing this property replaces the current [`Theme`][Theme] resource this node and all its [`Control`][Control] children use."] # [doc = ""] # [inline] pub fn set_theme (& self , theme : impl AsArg < crate :: generated :: Theme >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_theme ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , theme . as_arg_ptr ()) ; } } # [doc = "The name of a theme type variation used by this [`Control`][Control] to look up its own theme items. When empty, the class name of the node is used (e.g. `Button` for the [`Button`][Button] control), as well as the class names of all parent classes (in order of inheritance).\nWhen set, this property gives the highest priority to the type of the specified name. This type can in turn extend another type, forming a dependency chain. See [`Theme.set_type_variation`][Theme::set_type_variation]. If the theme item cannot be found using this type or its base types, lookup falls back on the class names.\n**Note:** To look up [`Control`][Control]'s own items use various `get_*` methods without specifying `theme_type`.\n**Note:** Theme items are looked for in the tree order, from branch to root, where each [`Control`][Control] node is checked for its [`theme`][Self::theme] property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last."] # [doc = ""] # [inline] pub fn set_theme_type_variation (& self , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_theme_type_variation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , theme_type . into ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nChanges the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the [`mouse_filter`][Self::mouse_filter] property is not [`MOUSE_FILTER_IGNORE`][Self::MOUSE_FILTER_IGNORE]. You can change the time required for the tooltip to appear with `gui/timers/tooltip_delay_sec` option in Project Settings.\nThe tooltip popup will use either a default implementation, or a custom one that you can provide by overriding [`_make_custom_tooltip`][Self::_make_custom_tooltip]. The default tooltip includes a [`PopupPanel`][PopupPanel] and [`Label`][Label] whose theme properties can be customized using [`Theme`][Theme] methods with the `\"TooltipPanel\"` and `\"TooltipLabel\"` respectively. For example:\n```gdscript\nvar style_box = StyleBoxFlat.new()\nstyle_box.set_bg_color(Color(1, 1, 0))\nstyle_box.set_border_width_all(2)\n# We assume here that the `theme` property has been assigned a custom Theme beforehand.\ntheme.set_stylebox(\"panel\", \"TooltipPanel\", style_box)\ntheme.set_color(\"font_color\", \"TooltipLabel\", Color(0, 1, 1))\n```"] # [doc = ""] # [inline] pub fn set_tooltip (& self , tooltip : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_tooltip ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , tooltip . into ()) ; } } # [doc = "Controls the direction on the vertical axis in which the control should grow if its vertical minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size."] # [doc = ""] # [inline] pub fn set_v_grow_direction (& self , direction : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_v_grow_direction ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , direction as _) ; } } # [doc = "Tells the parent [`Container`][Container] nodes how they should resize and place the node on the Y axis. Use one of the [`SizeFlags`][SizeFlags] constants to change the flags. See the constants to learn what each does."] # [doc = ""] # [inline] pub fn set_v_size_flags (& self , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_v_size_flags ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flags as _) ; } } # [doc = "Displays a control as modal. Control must be a subwindow. Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus.\nIf `exclusive` is `true`, other controls will not receive input and clicking outside this control will not close it.\n# Default Arguments\n* `exclusive` - `false`"] # [doc = ""] # [inline] pub fn show_modal (& self , exclusive : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . show_modal ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , exclusive as _) ; } } # [doc = "Moves the mouse cursor to `to_position`, relative to [`rect_position`][Self::rect_position] of this [`Control`][Control]."] # [doc = ""] # [inline] pub fn warp_mouse (& self , to_position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . warp_mouse ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , to_position) ; } } # [doc = "Anchors the bottom edge of the node to the origin, the center, or the end of its parent control. It changes how the bottom margin updates when the node moves or changes size. You can use one of the [`Anchor`][Anchor] constants for convenience."] # [doc = ""] # [inline] pub fn anchor_bottom (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_anchor ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Anchors the left edge of the node to the origin, the center or the end of its parent control. It changes how the left margin updates when the node moves or changes size. You can use one of the [`Anchor`][Anchor] constants for convenience."] # [doc = ""] # [inline] pub fn anchor_left (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_anchor ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right margin updates when the node moves or changes size. You can use one of the [`Anchor`][Anchor] constants for convenience."] # [doc = ""] # [inline] pub fn anchor_right (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_anchor ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top margin updates when the node moves or changes size. You can use one of the [`Anchor`][Anchor] constants for convenience."] # [doc = ""] # [inline] pub fn anchor_top (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_anchor ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Tells Godot which node it should give keyboard focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the `ui_down` input action. The node must be a [`Control`][Control]. If this property is not set, Godot will give focus to the closest [`Control`][Control] to the bottom of this one."] # [doc = ""] # [inline] pub fn focus_neighbour_bottom (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_focus_neighbour ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Tells Godot which node it should give keyboard focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the `ui_down` input action. The node must be a [`Control`][Control]. If this property is not set, Godot will give focus to the closest [`Control`][Control] to the bottom of this one."] # [doc = ""] # [inline] pub fn set_focus_neighbour_bottom (& self , value : impl Into < NodePath >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_focus_neighbour ; let ret = crate :: icalls :: icallvar__i64_nodepath (method_bind , self . this . sys () . as_ptr () , 3i64 , value . into ()) ; } } # [doc = "Tells Godot which node it should give keyboard focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the `ui_left` input action. The node must be a [`Control`][Control]. If this property is not set, Godot will give focus to the closest [`Control`][Control] to the left of this one."] # [doc = ""] # [inline] pub fn focus_neighbour_left (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_focus_neighbour ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Tells Godot which node it should give keyboard focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the `ui_left` input action. The node must be a [`Control`][Control]. If this property is not set, Godot will give focus to the closest [`Control`][Control] to the left of this one."] # [doc = ""] # [inline] pub fn set_focus_neighbour_left (& self , value : impl Into < NodePath >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_focus_neighbour ; let ret = crate :: icalls :: icallvar__i64_nodepath (method_bind , self . this . sys () . as_ptr () , 0i64 , value . into ()) ; } } # [doc = "Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the `ui_right` input action. The node must be a [`Control`][Control]. If this property is not set, Godot will give focus to the closest [`Control`][Control] to the bottom of this one."] # [doc = ""] # [inline] pub fn focus_neighbour_right (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_focus_neighbour ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the `ui_right` input action. The node must be a [`Control`][Control]. If this property is not set, Godot will give focus to the closest [`Control`][Control] to the bottom of this one."] # [doc = ""] # [inline] pub fn set_focus_neighbour_right (& self , value : impl Into < NodePath >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_focus_neighbour ; let ret = crate :: icalls :: icallvar__i64_nodepath (method_bind , self . this . sys () . as_ptr () , 2i64 , value . into ()) ; } } # [doc = "Tells Godot which node it should give keyboard focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the `ui_top` input action. The node must be a [`Control`][Control]. If this property is not set, Godot will give focus to the closest [`Control`][Control] to the bottom of this one."] # [doc = ""] # [inline] pub fn focus_neighbour_top (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_focus_neighbour ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Tells Godot which node it should give keyboard focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the `ui_top` input action. The node must be a [`Control`][Control]. If this property is not set, Godot will give focus to the closest [`Control`][Control] to the bottom of this one."] # [doc = ""] # [inline] pub fn set_focus_neighbour_top (& self , value : impl Into < NodePath >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_focus_neighbour ; let ret = crate :: icalls :: icallvar__i64_nodepath (method_bind , self . this . sys () . as_ptr () , 1i64 , value . into ()) ; } } # [doc = "Distance between the node's bottom edge and its parent control, based on [`anchor_bottom`][Self::anchor_bottom].\nMargins are often controlled by one or multiple parent [`Container`][Container] nodes, so you should not modify them manually if your node is a direct child of a [`Container`][Container]. Margins update automatically when you move or resize the node."] # [doc = ""] # [inline] pub fn margin_bottom (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Distance between the node's bottom edge and its parent control, based on [`anchor_bottom`][Self::anchor_bottom].\nMargins are often controlled by one or multiple parent [`Container`][Container] nodes, so you should not modify them manually if your node is a direct child of a [`Container`][Container]. Margins update automatically when you move or resize the node."] # [doc = ""] # [inline] pub fn set_margin_bottom (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Distance between the node's left edge and its parent control, based on [`anchor_left`][Self::anchor_left].\nMargins are often controlled by one or multiple parent [`Container`][Container] nodes, so you should not modify them manually if your node is a direct child of a [`Container`][Container]. Margins update automatically when you move or resize the node."] # [doc = ""] # [inline] pub fn margin_left (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Distance between the node's left edge and its parent control, based on [`anchor_left`][Self::anchor_left].\nMargins are often controlled by one or multiple parent [`Container`][Container] nodes, so you should not modify them manually if your node is a direct child of a [`Container`][Container]. Margins update automatically when you move or resize the node."] # [doc = ""] # [inline] pub fn set_margin_left (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "Distance between the node's right edge and its parent control, based on [`anchor_right`][Self::anchor_right].\nMargins are often controlled by one or multiple parent [`Container`][Container] nodes, so you should not modify them manually if your node is a direct child of a [`Container`][Container]. Margins update automatically when you move or resize the node."] # [doc = ""] # [inline] pub fn margin_right (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Distance between the node's right edge and its parent control, based on [`anchor_right`][Self::anchor_right].\nMargins are often controlled by one or multiple parent [`Container`][Container] nodes, so you should not modify them manually if your node is a direct child of a [`Container`][Container]. Margins update automatically when you move or resize the node."] # [doc = ""] # [inline] pub fn set_margin_right (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Distance between the node's top edge and its parent control, based on [`anchor_top`][Self::anchor_top].\nMargins are often controlled by one or multiple parent [`Container`][Container] nodes, so you should not modify them manually if your node is a direct child of a [`Container`][Container]. Margins update automatically when you move or resize the node."] # [doc = ""] # [inline] pub fn margin_top (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Distance between the node's top edge and its parent control, based on [`anchor_top`][Self::anchor_top].\nMargins are often controlled by one or multiple parent [`Container`][Container] nodes, so you should not modify them manually if your node is a direct child of a [`Container`][Container]. Margins update automatically when you move or resize the node."] # [doc = ""] # [inline] pub fn set_margin_top (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ControlMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Control { } unsafe impl GodotObject for Control { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Control" } } impl QueueFree for Control { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Control { type Target = crate :: generated :: CanvasItem ; # [inline] fn deref (& self) -> & crate :: generated :: CanvasItem { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Control { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CanvasItem { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CanvasItem > for Control { } unsafe impl SubClass < crate :: generated :: Node > for Control { } unsafe impl SubClass < crate :: generated :: Object > for Control { } impl Instanciable for Control { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Control :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ControlMethodTable { pub class_constructor : sys :: godot_class_constructor , pub accept_event : * mut sys :: godot_method_bind , pub add_color_override : * mut sys :: godot_method_bind , pub add_constant_override : * mut sys :: godot_method_bind , pub add_font_override : * mut sys :: godot_method_bind , pub add_icon_override : * mut sys :: godot_method_bind , pub add_shader_override : * mut sys :: godot_method_bind , pub add_stylebox_override : * mut sys :: godot_method_bind , pub find_next_valid_focus : * mut sys :: godot_method_bind , pub find_prev_valid_focus : * mut sys :: godot_method_bind , pub force_drag : * mut sys :: godot_method_bind , pub get_anchor : * mut sys :: godot_method_bind , pub get_begin : * mut sys :: godot_method_bind , pub get_color : * mut sys :: godot_method_bind , pub get_combined_minimum_size : * mut sys :: godot_method_bind , pub get_constant : * mut sys :: godot_method_bind , pub get_cursor_shape : * mut sys :: godot_method_bind , pub get_custom_minimum_size : * mut sys :: godot_method_bind , pub get_default_cursor_shape : * mut sys :: godot_method_bind , pub get_end : * mut sys :: godot_method_bind , pub get_focus_mode : * mut sys :: godot_method_bind , pub get_focus_neighbour : * mut sys :: godot_method_bind , pub get_focus_next : * mut sys :: godot_method_bind , pub get_focus_owner : * mut sys :: godot_method_bind , pub get_focus_previous : * mut sys :: godot_method_bind , pub get_font : * mut sys :: godot_method_bind , pub get_global_position : * mut sys :: godot_method_bind , pub get_global_rect : * mut sys :: godot_method_bind , pub get_h_grow_direction : * mut sys :: godot_method_bind , pub get_h_size_flags : * mut sys :: godot_method_bind , pub get_icon : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub get_minimum_size : * mut sys :: godot_method_bind , pub get_mouse_filter : * mut sys :: godot_method_bind , pub get_parent_area_size : * mut sys :: godot_method_bind , pub get_parent_control : * mut sys :: godot_method_bind , pub get_pass_on_modal_close_click : * mut sys :: godot_method_bind , pub get_pivot_offset : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub get_rect : * mut sys :: godot_method_bind , pub get_rotation : * mut sys :: godot_method_bind , pub get_rotation_degrees : * mut sys :: godot_method_bind , pub get_scale : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_stretch_ratio : * mut sys :: godot_method_bind , pub get_stylebox : * mut sys :: godot_method_bind , pub get_theme : * mut sys :: godot_method_bind , pub get_theme_default_font : * mut sys :: godot_method_bind , pub get_theme_type_variation : * mut sys :: godot_method_bind , pub get_tooltip : * mut sys :: godot_method_bind , pub get_v_grow_direction : * mut sys :: godot_method_bind , pub get_v_size_flags : * mut sys :: godot_method_bind , pub grab_click_focus : * mut sys :: godot_method_bind , pub grab_focus : * mut sys :: godot_method_bind , pub has_color : * mut sys :: godot_method_bind , pub has_color_override : * mut sys :: godot_method_bind , pub has_constant : * mut sys :: godot_method_bind , pub has_constant_override : * mut sys :: godot_method_bind , pub has_focus : * mut sys :: godot_method_bind , pub has_font : * mut sys :: godot_method_bind , pub has_font_override : * mut sys :: godot_method_bind , pub has_icon : * mut sys :: godot_method_bind , pub has_icon_override : * mut sys :: godot_method_bind , pub has_shader_override : * mut sys :: godot_method_bind , pub has_stylebox : * mut sys :: godot_method_bind , pub has_stylebox_override : * mut sys :: godot_method_bind , pub is_clipping_contents : * mut sys :: godot_method_bind , pub is_drag_successful : * mut sys :: godot_method_bind , pub minimum_size_changed : * mut sys :: godot_method_bind , pub release_focus : * mut sys :: godot_method_bind , pub remove_color_override : * mut sys :: godot_method_bind , pub remove_constant_override : * mut sys :: godot_method_bind , pub remove_font_override : * mut sys :: godot_method_bind , pub remove_icon_override : * mut sys :: godot_method_bind , pub remove_shader_override : * mut sys :: godot_method_bind , pub remove_stylebox_override : * mut sys :: godot_method_bind , pub set_anchor : * mut sys :: godot_method_bind , pub set_anchor_and_margin : * mut sys :: godot_method_bind , pub set_anchors_and_margins_preset : * mut sys :: godot_method_bind , pub set_anchors_preset : * mut sys :: godot_method_bind , pub set_begin : * mut sys :: godot_method_bind , pub set_clip_contents : * mut sys :: godot_method_bind , pub set_custom_minimum_size : * mut sys :: godot_method_bind , pub set_default_cursor_shape : * mut sys :: godot_method_bind , pub set_drag_forwarding : * mut sys :: godot_method_bind , pub set_drag_preview : * mut sys :: godot_method_bind , pub set_end : * mut sys :: godot_method_bind , pub set_focus_mode : * mut sys :: godot_method_bind , pub set_focus_neighbour : * mut sys :: godot_method_bind , pub set_focus_next : * mut sys :: godot_method_bind , pub set_focus_previous : * mut sys :: godot_method_bind , pub set_global_position : * mut sys :: godot_method_bind , pub set_h_grow_direction : * mut sys :: godot_method_bind , pub set_h_size_flags : * mut sys :: godot_method_bind , pub set_margin : * mut sys :: godot_method_bind , pub set_margins_preset : * mut sys :: godot_method_bind , pub set_mouse_filter : * mut sys :: godot_method_bind , pub set_pass_on_modal_close_click : * mut sys :: godot_method_bind , pub set_pivot_offset : * mut sys :: godot_method_bind , pub set_position : * mut sys :: godot_method_bind , pub set_rotation : * mut sys :: godot_method_bind , pub set_rotation_degrees : * mut sys :: godot_method_bind , pub set_scale : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind , pub set_stretch_ratio : * mut sys :: godot_method_bind , pub set_theme : * mut sys :: godot_method_bind , pub set_theme_type_variation : * mut sys :: godot_method_bind , pub set_tooltip : * mut sys :: godot_method_bind , pub set_v_grow_direction : * mut sys :: godot_method_bind , pub set_v_size_flags : * mut sys :: godot_method_bind , pub show_modal : * mut sys :: godot_method_bind , pub warp_mouse : * mut sys :: godot_method_bind } impl ControlMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ControlMethodTable = ControlMethodTable { class_constructor : None , accept_event : 0 as * mut sys :: godot_method_bind , add_color_override : 0 as * mut sys :: godot_method_bind , add_constant_override : 0 as * mut sys :: godot_method_bind , add_font_override : 0 as * mut sys :: godot_method_bind , add_icon_override : 0 as * mut sys :: godot_method_bind , add_shader_override : 0 as * mut sys :: godot_method_bind , add_stylebox_override : 0 as * mut sys :: godot_method_bind , find_next_valid_focus : 0 as * mut sys :: godot_method_bind , find_prev_valid_focus : 0 as * mut sys :: godot_method_bind , force_drag : 0 as * mut sys :: godot_method_bind , get_anchor : 0 as * mut sys :: godot_method_bind , get_begin : 0 as * mut sys :: godot_method_bind , get_color : 0 as * mut sys :: godot_method_bind , get_combined_minimum_size : 0 as * mut sys :: godot_method_bind , get_constant : 0 as * mut sys :: godot_method_bind , get_cursor_shape : 0 as * mut sys :: godot_method_bind , get_custom_minimum_size : 0 as * mut sys :: godot_method_bind , get_default_cursor_shape : 0 as * mut sys :: godot_method_bind , get_end : 0 as * mut sys :: godot_method_bind , get_focus_mode : 0 as * mut sys :: godot_method_bind , get_focus_neighbour : 0 as * mut sys :: godot_method_bind , get_focus_next : 0 as * mut sys :: godot_method_bind , get_focus_owner : 0 as * mut sys :: godot_method_bind , get_focus_previous : 0 as * mut sys :: godot_method_bind , get_font : 0 as * mut sys :: godot_method_bind , get_global_position : 0 as * mut sys :: godot_method_bind , get_global_rect : 0 as * mut sys :: godot_method_bind , get_h_grow_direction : 0 as * mut sys :: godot_method_bind , get_h_size_flags : 0 as * mut sys :: godot_method_bind , get_icon : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , get_minimum_size : 0 as * mut sys :: godot_method_bind , get_mouse_filter : 0 as * mut sys :: godot_method_bind , get_parent_area_size : 0 as * mut sys :: godot_method_bind , get_parent_control : 0 as * mut sys :: godot_method_bind , get_pass_on_modal_close_click : 0 as * mut sys :: godot_method_bind , get_pivot_offset : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , get_rect : 0 as * mut sys :: godot_method_bind , get_rotation : 0 as * mut sys :: godot_method_bind , get_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_scale : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_stretch_ratio : 0 as * mut sys :: godot_method_bind , get_stylebox : 0 as * mut sys :: godot_method_bind , get_theme : 0 as * mut sys :: godot_method_bind , get_theme_default_font : 0 as * mut sys :: godot_method_bind , get_theme_type_variation : 0 as * mut sys :: godot_method_bind , get_tooltip : 0 as * mut sys :: godot_method_bind , get_v_grow_direction : 0 as * mut sys :: godot_method_bind , get_v_size_flags : 0 as * mut sys :: godot_method_bind , grab_click_focus : 0 as * mut sys :: godot_method_bind , grab_focus : 0 as * mut sys :: godot_method_bind , has_color : 0 as * mut sys :: godot_method_bind , has_color_override : 0 as * mut sys :: godot_method_bind , has_constant : 0 as * mut sys :: godot_method_bind , has_constant_override : 0 as * mut sys :: godot_method_bind , has_focus : 0 as * mut sys :: godot_method_bind , has_font : 0 as * mut sys :: godot_method_bind , has_font_override : 0 as * mut sys :: godot_method_bind , has_icon : 0 as * mut sys :: godot_method_bind , has_icon_override : 0 as * mut sys :: godot_method_bind , has_shader_override : 0 as * mut sys :: godot_method_bind , has_stylebox : 0 as * mut sys :: godot_method_bind , has_stylebox_override : 0 as * mut sys :: godot_method_bind , is_clipping_contents : 0 as * mut sys :: godot_method_bind , is_drag_successful : 0 as * mut sys :: godot_method_bind , minimum_size_changed : 0 as * mut sys :: godot_method_bind , release_focus : 0 as * mut sys :: godot_method_bind , remove_color_override : 0 as * mut sys :: godot_method_bind , remove_constant_override : 0 as * mut sys :: godot_method_bind , remove_font_override : 0 as * mut sys :: godot_method_bind , remove_icon_override : 0 as * mut sys :: godot_method_bind , remove_shader_override : 0 as * mut sys :: godot_method_bind , remove_stylebox_override : 0 as * mut sys :: godot_method_bind , set_anchor : 0 as * mut sys :: godot_method_bind , set_anchor_and_margin : 0 as * mut sys :: godot_method_bind , set_anchors_and_margins_preset : 0 as * mut sys :: godot_method_bind , set_anchors_preset : 0 as * mut sys :: godot_method_bind , set_begin : 0 as * mut sys :: godot_method_bind , set_clip_contents : 0 as * mut sys :: godot_method_bind , set_custom_minimum_size : 0 as * mut sys :: godot_method_bind , set_default_cursor_shape : 0 as * mut sys :: godot_method_bind , set_drag_forwarding : 0 as * mut sys :: godot_method_bind , set_drag_preview : 0 as * mut sys :: godot_method_bind , set_end : 0 as * mut sys :: godot_method_bind , set_focus_mode : 0 as * mut sys :: godot_method_bind , set_focus_neighbour : 0 as * mut sys :: godot_method_bind , set_focus_next : 0 as * mut sys :: godot_method_bind , set_focus_previous : 0 as * mut sys :: godot_method_bind , set_global_position : 0 as * mut sys :: godot_method_bind , set_h_grow_direction : 0 as * mut sys :: godot_method_bind , set_h_size_flags : 0 as * mut sys :: godot_method_bind , set_margin : 0 as * mut sys :: godot_method_bind , set_margins_preset : 0 as * mut sys :: godot_method_bind , set_mouse_filter : 0 as * mut sys :: godot_method_bind , set_pass_on_modal_close_click : 0 as * mut sys :: godot_method_bind , set_pivot_offset : 0 as * mut sys :: godot_method_bind , set_position : 0 as * mut sys :: godot_method_bind , set_rotation : 0 as * mut sys :: godot_method_bind , set_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_scale : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind , set_stretch_ratio : 0 as * mut sys :: godot_method_bind , set_theme : 0 as * mut sys :: godot_method_bind , set_theme_type_variation : 0 as * mut sys :: godot_method_bind , set_tooltip : 0 as * mut sys :: godot_method_bind , set_v_grow_direction : 0 as * mut sys :: godot_method_bind , set_v_size_flags : 0 as * mut sys :: godot_method_bind , show_modal : 0 as * mut sys :: godot_method_bind , warp_mouse : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ControlMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Control\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . accept_event = (gd_api . godot_method_bind_get_method) (class_name , "accept_event\0" . as_ptr () as * const c_char) ; table . add_color_override = (gd_api . godot_method_bind_get_method) (class_name , "add_color_override\0" . as_ptr () as * const c_char) ; table . add_constant_override = (gd_api . godot_method_bind_get_method) (class_name , "add_constant_override\0" . as_ptr () as * const c_char) ; table . add_font_override = (gd_api . godot_method_bind_get_method) (class_name , "add_font_override\0" . as_ptr () as * const c_char) ; table . add_icon_override = (gd_api . godot_method_bind_get_method) (class_name , "add_icon_override\0" . as_ptr () as * const c_char) ; table . add_shader_override = (gd_api . godot_method_bind_get_method) (class_name , "add_shader_override\0" . as_ptr () as * const c_char) ; table . add_stylebox_override = (gd_api . godot_method_bind_get_method) (class_name , "add_stylebox_override\0" . as_ptr () as * const c_char) ; table . find_next_valid_focus = (gd_api . godot_method_bind_get_method) (class_name , "find_next_valid_focus\0" . as_ptr () as * const c_char) ; table . find_prev_valid_focus = (gd_api . godot_method_bind_get_method) (class_name , "find_prev_valid_focus\0" . as_ptr () as * const c_char) ; table . force_drag = (gd_api . godot_method_bind_get_method) (class_name , "force_drag\0" . as_ptr () as * const c_char) ; table . get_anchor = (gd_api . godot_method_bind_get_method) (class_name , "get_anchor\0" . as_ptr () as * const c_char) ; table . get_begin = (gd_api . godot_method_bind_get_method) (class_name , "get_begin\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_combined_minimum_size = (gd_api . godot_method_bind_get_method) (class_name , "get_combined_minimum_size\0" . as_ptr () as * const c_char) ; table . get_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_constant\0" . as_ptr () as * const c_char) ; table . get_cursor_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_cursor_shape\0" . as_ptr () as * const c_char) ; table . get_custom_minimum_size = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_minimum_size\0" . as_ptr () as * const c_char) ; table . get_default_cursor_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_default_cursor_shape\0" . as_ptr () as * const c_char) ; table . get_end = (gd_api . godot_method_bind_get_method) (class_name , "get_end\0" . as_ptr () as * const c_char) ; table . get_focus_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_focus_mode\0" . as_ptr () as * const c_char) ; table . get_focus_neighbour = (gd_api . godot_method_bind_get_method) (class_name , "get_focus_neighbour\0" . as_ptr () as * const c_char) ; table . get_focus_next = (gd_api . godot_method_bind_get_method) (class_name , "get_focus_next\0" . as_ptr () as * const c_char) ; table . get_focus_owner = (gd_api . godot_method_bind_get_method) (class_name , "get_focus_owner\0" . as_ptr () as * const c_char) ; table . get_focus_previous = (gd_api . godot_method_bind_get_method) (class_name , "get_focus_previous\0" . as_ptr () as * const c_char) ; table . get_font = (gd_api . godot_method_bind_get_method) (class_name , "get_font\0" . as_ptr () as * const c_char) ; table . get_global_position = (gd_api . godot_method_bind_get_method) (class_name , "get_global_position\0" . as_ptr () as * const c_char) ; table . get_global_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_global_rect\0" . as_ptr () as * const c_char) ; table . get_h_grow_direction = (gd_api . godot_method_bind_get_method) (class_name , "get_h_grow_direction\0" . as_ptr () as * const c_char) ; table . get_h_size_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_h_size_flags\0" . as_ptr () as * const c_char) ; table . get_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_icon\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . get_minimum_size = (gd_api . godot_method_bind_get_method) (class_name , "get_minimum_size\0" . as_ptr () as * const c_char) ; table . get_mouse_filter = (gd_api . godot_method_bind_get_method) (class_name , "get_mouse_filter\0" . as_ptr () as * const c_char) ; table . get_parent_area_size = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_area_size\0" . as_ptr () as * const c_char) ; table . get_parent_control = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_control\0" . as_ptr () as * const c_char) ; table . get_pass_on_modal_close_click = (gd_api . godot_method_bind_get_method) (class_name , "get_pass_on_modal_close_click\0" . as_ptr () as * const c_char) ; table . get_pivot_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_pivot_offset\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_rect\0" . as_ptr () as * const c_char) ; table . get_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation\0" . as_ptr () as * const c_char) ; table . get_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_scale\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_stretch_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_ratio\0" . as_ptr () as * const c_char) ; table . get_stylebox = (gd_api . godot_method_bind_get_method) (class_name , "get_stylebox\0" . as_ptr () as * const c_char) ; table . get_theme = (gd_api . godot_method_bind_get_method) (class_name , "get_theme\0" . as_ptr () as * const c_char) ; table . get_theme_default_font = (gd_api . godot_method_bind_get_method) (class_name , "get_theme_default_font\0" . as_ptr () as * const c_char) ; table . get_theme_type_variation = (gd_api . godot_method_bind_get_method) (class_name , "get_theme_type_variation\0" . as_ptr () as * const c_char) ; table . get_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "get_tooltip\0" . as_ptr () as * const c_char) ; table . get_v_grow_direction = (gd_api . godot_method_bind_get_method) (class_name , "get_v_grow_direction\0" . as_ptr () as * const c_char) ; table . get_v_size_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_v_size_flags\0" . as_ptr () as * const c_char) ; table . grab_click_focus = (gd_api . godot_method_bind_get_method) (class_name , "grab_click_focus\0" . as_ptr () as * const c_char) ; table . grab_focus = (gd_api . godot_method_bind_get_method) (class_name , "grab_focus\0" . as_ptr () as * const c_char) ; table . has_color = (gd_api . godot_method_bind_get_method) (class_name , "has_color\0" . as_ptr () as * const c_char) ; table . has_color_override = (gd_api . godot_method_bind_get_method) (class_name , "has_color_override\0" . as_ptr () as * const c_char) ; table . has_constant = (gd_api . godot_method_bind_get_method) (class_name , "has_constant\0" . as_ptr () as * const c_char) ; table . has_constant_override = (gd_api . godot_method_bind_get_method) (class_name , "has_constant_override\0" . as_ptr () as * const c_char) ; table . has_focus = (gd_api . godot_method_bind_get_method) (class_name , "has_focus\0" . as_ptr () as * const c_char) ; table . has_font = (gd_api . godot_method_bind_get_method) (class_name , "has_font\0" . as_ptr () as * const c_char) ; table . has_font_override = (gd_api . godot_method_bind_get_method) (class_name , "has_font_override\0" . as_ptr () as * const c_char) ; table . has_icon = (gd_api . godot_method_bind_get_method) (class_name , "has_icon\0" . as_ptr () as * const c_char) ; table . has_icon_override = (gd_api . godot_method_bind_get_method) (class_name , "has_icon_override\0" . as_ptr () as * const c_char) ; table . has_shader_override = (gd_api . godot_method_bind_get_method) (class_name , "has_shader_override\0" . as_ptr () as * const c_char) ; table . has_stylebox = (gd_api . godot_method_bind_get_method) (class_name , "has_stylebox\0" . as_ptr () as * const c_char) ; table . has_stylebox_override = (gd_api . godot_method_bind_get_method) (class_name , "has_stylebox_override\0" . as_ptr () as * const c_char) ; table . is_clipping_contents = (gd_api . godot_method_bind_get_method) (class_name , "is_clipping_contents\0" . as_ptr () as * const c_char) ; table . is_drag_successful = (gd_api . godot_method_bind_get_method) (class_name , "is_drag_successful\0" . as_ptr () as * const c_char) ; table . minimum_size_changed = (gd_api . godot_method_bind_get_method) (class_name , "minimum_size_changed\0" . as_ptr () as * const c_char) ; table . release_focus = (gd_api . godot_method_bind_get_method) (class_name , "release_focus\0" . as_ptr () as * const c_char) ; table . remove_color_override = (gd_api . godot_method_bind_get_method) (class_name , "remove_color_override\0" . as_ptr () as * const c_char) ; table . remove_constant_override = (gd_api . godot_method_bind_get_method) (class_name , "remove_constant_override\0" . as_ptr () as * const c_char) ; table . remove_font_override = (gd_api . godot_method_bind_get_method) (class_name , "remove_font_override\0" . as_ptr () as * const c_char) ; table . remove_icon_override = (gd_api . godot_method_bind_get_method) (class_name , "remove_icon_override\0" . as_ptr () as * const c_char) ; table . remove_shader_override = (gd_api . godot_method_bind_get_method) (class_name , "remove_shader_override\0" . as_ptr () as * const c_char) ; table . remove_stylebox_override = (gd_api . godot_method_bind_get_method) (class_name , "remove_stylebox_override\0" . as_ptr () as * const c_char) ; table . set_anchor = (gd_api . godot_method_bind_get_method) (class_name , "set_anchor\0" . as_ptr () as * const c_char) ; table . set_anchor_and_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_anchor_and_margin\0" . as_ptr () as * const c_char) ; table . set_anchors_and_margins_preset = (gd_api . godot_method_bind_get_method) (class_name , "set_anchors_and_margins_preset\0" . as_ptr () as * const c_char) ; table . set_anchors_preset = (gd_api . godot_method_bind_get_method) (class_name , "set_anchors_preset\0" . as_ptr () as * const c_char) ; table . set_begin = (gd_api . godot_method_bind_get_method) (class_name , "set_begin\0" . as_ptr () as * const c_char) ; table . set_clip_contents = (gd_api . godot_method_bind_get_method) (class_name , "set_clip_contents\0" . as_ptr () as * const c_char) ; table . set_custom_minimum_size = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_minimum_size\0" . as_ptr () as * const c_char) ; table . set_default_cursor_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_default_cursor_shape\0" . as_ptr () as * const c_char) ; table . set_drag_forwarding = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_forwarding\0" . as_ptr () as * const c_char) ; table . set_drag_preview = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_preview\0" . as_ptr () as * const c_char) ; table . set_end = (gd_api . godot_method_bind_get_method) (class_name , "set_end\0" . as_ptr () as * const c_char) ; table . set_focus_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_focus_mode\0" . as_ptr () as * const c_char) ; table . set_focus_neighbour = (gd_api . godot_method_bind_get_method) (class_name , "set_focus_neighbour\0" . as_ptr () as * const c_char) ; table . set_focus_next = (gd_api . godot_method_bind_get_method) (class_name , "set_focus_next\0" . as_ptr () as * const c_char) ; table . set_focus_previous = (gd_api . godot_method_bind_get_method) (class_name , "set_focus_previous\0" . as_ptr () as * const c_char) ; table . set_global_position = (gd_api . godot_method_bind_get_method) (class_name , "set_global_position\0" . as_ptr () as * const c_char) ; table . set_h_grow_direction = (gd_api . godot_method_bind_get_method) (class_name , "set_h_grow_direction\0" . as_ptr () as * const c_char) ; table . set_h_size_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_h_size_flags\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; table . set_margins_preset = (gd_api . godot_method_bind_get_method) (class_name , "set_margins_preset\0" . as_ptr () as * const c_char) ; table . set_mouse_filter = (gd_api . godot_method_bind_get_method) (class_name , "set_mouse_filter\0" . as_ptr () as * const c_char) ; table . set_pass_on_modal_close_click = (gd_api . godot_method_bind_get_method) (class_name , "set_pass_on_modal_close_click\0" . as_ptr () as * const c_char) ; table . set_pivot_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_pivot_offset\0" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\0" . as_ptr () as * const c_char) ; table . set_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation\0" . as_ptr () as * const c_char) ; table . set_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_scale\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; table . set_stretch_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_ratio\0" . as_ptr () as * const c_char) ; table . set_theme = (gd_api . godot_method_bind_get_method) (class_name , "set_theme\0" . as_ptr () as * const c_char) ; table . set_theme_type_variation = (gd_api . godot_method_bind_get_method) (class_name , "set_theme_type_variation\0" . as_ptr () as * const c_char) ; table . set_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "set_tooltip\0" . as_ptr () as * const c_char) ; table . set_v_grow_direction = (gd_api . godot_method_bind_get_method) (class_name , "set_v_grow_direction\0" . as_ptr () as * const c_char) ; table . set_v_size_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_v_size_flags\0" . as_ptr () as * const c_char) ; table . show_modal = (gd_api . godot_method_bind_get_method) (class_name , "show_modal\0" . as_ptr () as * const c_char) ; table . warp_mouse = (gd_api . godot_method_bind_get_method) (class_name , "warp_mouse\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::control::private::Control;
            
            pub(crate) mod convex_polygon_shape {
                # ! [doc = "This module contains types related to the API class [`ConvexPolygonShape`][super::ConvexPolygonShape]."] pub (crate) mod private { # [doc = "`core class ConvexPolygonShape` inherits `Shape` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_convexpolygonshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nConvexPolygonShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ConvexPolygonShape { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ConvexPolygonShape ; impl ConvexPolygonShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ConvexPolygonShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The list of 3D points forming the convex polygon shape."] # [doc = ""] # [inline] pub fn points (& self) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = ConvexPolygonShapeMethodTable :: get (get_api ()) . get_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The list of 3D points forming the convex polygon shape."] # [doc = ""] # [inline] pub fn set_points (& self , points : PoolArray < Vector3 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConvexPolygonShapeMethodTable :: get (get_api ()) . set_points ; let ret = crate :: icalls :: icallvar__vec3arr (method_bind , self . this . sys () . as_ptr () , points) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConvexPolygonShape { } unsafe impl GodotObject for ConvexPolygonShape { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ConvexPolygonShape" } } impl std :: ops :: Deref for ConvexPolygonShape { type Target = crate :: generated :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConvexPolygonShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape > for ConvexPolygonShape { } unsafe impl SubClass < crate :: generated :: Resource > for ConvexPolygonShape { } unsafe impl SubClass < crate :: generated :: Reference > for ConvexPolygonShape { } unsafe impl SubClass < crate :: generated :: Object > for ConvexPolygonShape { } impl Instanciable for ConvexPolygonShape { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ConvexPolygonShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ConvexPolygonShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_points : * mut sys :: godot_method_bind , pub set_points : * mut sys :: godot_method_bind } impl ConvexPolygonShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ConvexPolygonShapeMethodTable = ConvexPolygonShapeMethodTable { class_constructor : None , get_points : 0 as * mut sys :: godot_method_bind , set_points : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ConvexPolygonShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ConvexPolygonShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_points = (gd_api . godot_method_bind_get_method) (class_name , "get_points\0" . as_ptr () as * const c_char) ; table . set_points = (gd_api . godot_method_bind_get_method) (class_name , "set_points\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::convex_polygon_shape::private::ConvexPolygonShape;
            
            pub(crate) mod convex_polygon_shape_2d {
                # ! [doc = "This module contains types related to the API class [`ConvexPolygonShape2D`][super::ConvexPolygonShape2D]."] pub (crate) mod private { # [doc = "`core class ConvexPolygonShape2D` inherits `Shape2D` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_convexpolygonshape2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nConvexPolygonShape2D inherits methods from:\n - [Shape2D](struct.Shape2D.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ConvexPolygonShape2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ConvexPolygonShape2D ; impl ConvexPolygonShape2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ConvexPolygonShape2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The polygon's list of vertices. Can be in either clockwise or counterclockwise order. Only set this property with convex hull points, use [`set_point_cloud`][Self::set_point_cloud] to generate a convex hull shape from concave shape points."] # [doc = ""] # [inline] pub fn points (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = ConvexPolygonShape2DMethodTable :: get (get_api ()) . get_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Based on the set of points provided, this creates and assigns the [`points`][Self::points] property using the convex hull algorithm. Removing all unneeded points. See [`Geometry.convex_hull_2d`][Geometry::convex_hull_2d] for details."] # [doc = ""] # [inline] pub fn set_point_cloud (& self , point_cloud : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConvexPolygonShape2DMethodTable :: get (get_api ()) . set_point_cloud ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , point_cloud) ; } } # [doc = "The polygon's list of vertices. Can be in either clockwise or counterclockwise order. Only set this property with convex hull points, use [`set_point_cloud`][Self::set_point_cloud] to generate a convex hull shape from concave shape points."] # [doc = ""] # [inline] pub fn set_points (& self , points : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ConvexPolygonShape2DMethodTable :: get (get_api ()) . set_points ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , points) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ConvexPolygonShape2D { } unsafe impl GodotObject for ConvexPolygonShape2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ConvexPolygonShape2D" } } impl std :: ops :: Deref for ConvexPolygonShape2D { type Target = crate :: generated :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ConvexPolygonShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape2D > for ConvexPolygonShape2D { } unsafe impl SubClass < crate :: generated :: Resource > for ConvexPolygonShape2D { } unsafe impl SubClass < crate :: generated :: Reference > for ConvexPolygonShape2D { } unsafe impl SubClass < crate :: generated :: Object > for ConvexPolygonShape2D { } impl Instanciable for ConvexPolygonShape2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ConvexPolygonShape2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ConvexPolygonShape2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_points : * mut sys :: godot_method_bind , pub set_point_cloud : * mut sys :: godot_method_bind , pub set_points : * mut sys :: godot_method_bind } impl ConvexPolygonShape2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ConvexPolygonShape2DMethodTable = ConvexPolygonShape2DMethodTable { class_constructor : None , get_points : 0 as * mut sys :: godot_method_bind , set_point_cloud : 0 as * mut sys :: godot_method_bind , set_points : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ConvexPolygonShape2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ConvexPolygonShape2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_points = (gd_api . godot_method_bind_get_method) (class_name , "get_points\0" . as_ptr () as * const c_char) ; table . set_point_cloud = (gd_api . godot_method_bind_get_method) (class_name , "set_point_cloud\0" . as_ptr () as * const c_char) ; table . set_points = (gd_api . godot_method_bind_get_method) (class_name , "set_points\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::convex_polygon_shape_2d::private::ConvexPolygonShape2D;
            
            pub(crate) mod crypto {
                # ! [doc = "This module contains types related to the API class [`Crypto`][super::Crypto]."] pub (crate) mod private { # [doc = "`core class Crypto` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_crypto.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCrypto inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Crypto { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Crypto ; impl Crypto { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CryptoMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Compares two [`PoolByteArray`][PoolArray<u8>]s for equality without leaking timing information in order to prevent timing attacks.\nSee [this blog post](https://paragonie.com/blog/2015/11/preventing-timing-attacks-on-string-comparison-with-double-hmac-strategy) for more information."] # [doc = ""] # [inline] pub fn constant_time_compare (& self , trusted : PoolArray < u8 > , received : PoolArray < u8 >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoMethodTable :: get (get_api ()) . constant_time_compare ; let ret = crate :: icalls :: icallvar__bytearr_bytearr (method_bind , self . this . sys () . as_ptr () , trusted , received) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Decrypt the given `ciphertext` with the provided private `key`.\n**Note:** The maximum size of accepted ciphertext is limited by the key size."] # [doc = ""] # [inline] pub fn decrypt (& self , key : impl AsArg < crate :: generated :: CryptoKey > , ciphertext : PoolArray < u8 >) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoMethodTable :: get (get_api ()) . decrypt ; let ret = crate :: icalls :: icallvar__obj_bytearr (method_bind , self . this . sys () . as_ptr () , key . as_arg_ptr () , ciphertext) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Encrypt the given `plaintext` with the provided public `key`.\n**Note:** The maximum size of accepted plaintext is limited by the key size."] # [doc = ""] # [inline] pub fn encrypt (& self , key : impl AsArg < crate :: generated :: CryptoKey > , plaintext : PoolArray < u8 >) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoMethodTable :: get (get_api ()) . encrypt ; let ret = crate :: icalls :: icallvar__obj_bytearr (method_bind , self . this . sys () . as_ptr () , key . as_arg_ptr () , plaintext) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Generates a [`PoolByteArray`][PoolArray<u8>] of cryptographically secure random bytes with given `size`."] # [doc = ""] # [inline] pub fn generate_random_bytes (& self , size : i64) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoMethodTable :: get (get_api ()) . generate_random_bytes ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , size as _) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Generates an RSA [`CryptoKey`][CryptoKey] that can be used for creating self-signed certificates and passed to [`StreamPeerSSL.accept_stream`][StreamPeerSSL::accept_stream]."] # [doc = ""] # [inline] pub fn generate_rsa (& self , size : i64) -> Option < Ref < crate :: generated :: CryptoKey , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoMethodTable :: get (get_api ()) . generate_rsa ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , size as _) ; < Option < Ref < crate :: generated :: CryptoKey , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nGenerates a self-signed [`X509Certificate`][X509Certificate] from the given [`CryptoKey`][CryptoKey] and `issuer_name`. The certificate validity will be defined by `not_before` and `not_after` (first valid date and last valid date). The `issuer_name` must contain at least \"CN=\" (common name, i.e. the domain name), \"O=\" (organization, i.e. your company name), \"C=\" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in).\nA small example to generate an RSA key and a X509 self-signed certificate.\n```gdscript\nvar crypto = Crypto.new()\n# Generate 4096 bits RSA key.\nvar key = crypto.generate_rsa(4096)\n# Generate self-signed certificate using the given key.\nvar cert = crypto.generate_self_signed_certificate(key, \"CN=example.com,O=A Game Company,C=IT\")\n```\n# Default Arguments\n* `issuer_name` - `\"CN=myserver,O=myorganisation,C=IT\"`\n* `not_before` - `\"20140101000000\"`\n* `not_after` - `\"20340101000000\"`"] # [doc = ""] # [inline] pub fn generate_self_signed_certificate (& self , key : impl AsArg < crate :: generated :: CryptoKey > , issuer_name : impl Into < GodotString > , not_before : impl Into < GodotString > , not_after : impl Into < GodotString >) -> Option < Ref < crate :: generated :: X509Certificate , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoMethodTable :: get (get_api ()) . generate_self_signed_certificate ; let ret = crate :: icalls :: icallvar__obj_str_str_str (method_bind , self . this . sys () . as_ptr () , key . as_arg_ptr () , issuer_name . into () , not_before . into () , not_after . into ()) ; < Option < Ref < crate :: generated :: X509Certificate , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Generates an [`HMAC`][HMAC](https://en.wikipedia.org/wiki/HMAC) digest of `msg` using `key`. The `hash_type` parameter is the hashing algorithm that is used for the inner and outer hashes.\nCurrently, only [`HashingContext.HASH_SHA256`][HashingContext::HASH_SHA256] and [`HashingContext.HASH_SHA1`][HashingContext::HASH_SHA1] are supported."] # [doc = ""] # [inline] pub fn hmac_digest (& self , hash_type : i64 , key : PoolArray < u8 > , msg : PoolArray < u8 >) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoMethodTable :: get (get_api ()) . hmac_digest ; let ret = crate :: icalls :: icallvar__i64_bytearr_bytearr (method_bind , self . this . sys () . as_ptr () , hash_type as _ , key , msg) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sign a given `hash` of type `hash_type` with the provided private `key`."] # [doc = ""] # [inline] pub fn sign (& self , hash_type : i64 , hash : PoolArray < u8 > , key : impl AsArg < crate :: generated :: CryptoKey >) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoMethodTable :: get (get_api ()) . sign ; let ret = crate :: icalls :: icallvar__i64_bytearr_obj (method_bind , self . this . sys () . as_ptr () , hash_type as _ , hash , key . as_arg_ptr ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Verify that a given `signature` for `hash` of type `hash_type` against the provided public `key`."] # [doc = ""] # [inline] pub fn verify (& self , hash_type : i64 , hash : PoolArray < u8 > , signature : PoolArray < u8 > , key : impl AsArg < crate :: generated :: CryptoKey >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoMethodTable :: get (get_api ()) . verify ; let ret = crate :: icalls :: icallvar__i64_bytearr_bytearr_obj (method_bind , self . this . sys () . as_ptr () , hash_type as _ , hash , signature , key . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Crypto { } unsafe impl GodotObject for Crypto { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Crypto" } } impl std :: ops :: Deref for Crypto { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Crypto { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for Crypto { } unsafe impl SubClass < crate :: generated :: Object > for Crypto { } impl Instanciable for Crypto { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Crypto :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CryptoMethodTable { pub class_constructor : sys :: godot_class_constructor , pub constant_time_compare : * mut sys :: godot_method_bind , pub decrypt : * mut sys :: godot_method_bind , pub encrypt : * mut sys :: godot_method_bind , pub generate_random_bytes : * mut sys :: godot_method_bind , pub generate_rsa : * mut sys :: godot_method_bind , pub generate_self_signed_certificate : * mut sys :: godot_method_bind , pub hmac_digest : * mut sys :: godot_method_bind , pub sign : * mut sys :: godot_method_bind , pub verify : * mut sys :: godot_method_bind } impl CryptoMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CryptoMethodTable = CryptoMethodTable { class_constructor : None , constant_time_compare : 0 as * mut sys :: godot_method_bind , decrypt : 0 as * mut sys :: godot_method_bind , encrypt : 0 as * mut sys :: godot_method_bind , generate_random_bytes : 0 as * mut sys :: godot_method_bind , generate_rsa : 0 as * mut sys :: godot_method_bind , generate_self_signed_certificate : 0 as * mut sys :: godot_method_bind , hmac_digest : 0 as * mut sys :: godot_method_bind , sign : 0 as * mut sys :: godot_method_bind , verify : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CryptoMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Crypto\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . constant_time_compare = (gd_api . godot_method_bind_get_method) (class_name , "constant_time_compare\0" . as_ptr () as * const c_char) ; table . decrypt = (gd_api . godot_method_bind_get_method) (class_name , "decrypt\0" . as_ptr () as * const c_char) ; table . encrypt = (gd_api . godot_method_bind_get_method) (class_name , "encrypt\0" . as_ptr () as * const c_char) ; table . generate_random_bytes = (gd_api . godot_method_bind_get_method) (class_name , "generate_random_bytes\0" . as_ptr () as * const c_char) ; table . generate_rsa = (gd_api . godot_method_bind_get_method) (class_name , "generate_rsa\0" . as_ptr () as * const c_char) ; table . generate_self_signed_certificate = (gd_api . godot_method_bind_get_method) (class_name , "generate_self_signed_certificate\0" . as_ptr () as * const c_char) ; table . hmac_digest = (gd_api . godot_method_bind_get_method) (class_name , "hmac_digest\0" . as_ptr () as * const c_char) ; table . sign = (gd_api . godot_method_bind_get_method) (class_name , "sign\0" . as_ptr () as * const c_char) ; table . verify = (gd_api . godot_method_bind_get_method) (class_name , "verify\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::crypto::private::Crypto;
            
            pub(crate) mod crypto_key {
                # ! [doc = "This module contains types related to the API class [`CryptoKey`][super::CryptoKey]."] pub (crate) mod private { # [doc = "`core class CryptoKey` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_cryptokey.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCryptoKey inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CryptoKey { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CryptoKey ; impl CryptoKey { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CryptoKeyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Return `true` if this CryptoKey only has the public part, and not the private one."] # [doc = ""] # [inline] pub fn is_public_only (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoKeyMethodTable :: get (get_api ()) . is_public_only ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Loads a key from `path`. If `public_only` is `true`, only the public key will be loaded.\n**Note:** `path` should be a \"*.pub\" file if `public_only` is `true`, a \"*.key\" file otherwise.\n# Default Arguments\n* `public_only` - `false`"] # [doc = ""] # [inline] pub fn load (& self , path : impl Into < GodotString > , public_only : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoKeyMethodTable :: get (get_api ()) . load ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , path . into () , public_only as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Loads a key from the given `string`. If `public_only` is `true`, only the public key will be loaded.\n# Default Arguments\n* `public_only` - `false`"] # [doc = ""] # [inline] pub fn load_from_string (& self , string_key : impl Into < GodotString > , public_only : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoKeyMethodTable :: get (get_api ()) . load_from_string ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , string_key . into () , public_only as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Saves a key to the given `path`. If `public_only` is `true`, only the public key will be saved.\n**Note:** `path` should be a \"*.pub\" file if `public_only` is `true`, a \"*.key\" file otherwise.\n# Default Arguments\n* `public_only` - `false`"] # [doc = ""] # [inline] pub fn save (& self , path : impl Into < GodotString > , public_only : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoKeyMethodTable :: get (get_api ()) . save ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , path . into () , public_only as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Returns a string containing the key in PEM format. If `public_only` is `true`, only the public key will be included.\n# Default Arguments\n* `public_only` - `false`"] # [doc = ""] # [inline] pub fn save_to_string (& self , public_only : bool) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = CryptoKeyMethodTable :: get (get_api ()) . save_to_string ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , public_only as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for CryptoKey { } unsafe impl GodotObject for CryptoKey { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CryptoKey" } } impl std :: ops :: Deref for CryptoKey { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CryptoKey { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for CryptoKey { } unsafe impl SubClass < crate :: generated :: Reference > for CryptoKey { } unsafe impl SubClass < crate :: generated :: Object > for CryptoKey { } impl Instanciable for CryptoKey { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CryptoKey :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CryptoKeyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_public_only : * mut sys :: godot_method_bind , pub load : * mut sys :: godot_method_bind , pub load_from_string : * mut sys :: godot_method_bind , pub save : * mut sys :: godot_method_bind , pub save_to_string : * mut sys :: godot_method_bind } impl CryptoKeyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CryptoKeyMethodTable = CryptoKeyMethodTable { class_constructor : None , is_public_only : 0 as * mut sys :: godot_method_bind , load : 0 as * mut sys :: godot_method_bind , load_from_string : 0 as * mut sys :: godot_method_bind , save : 0 as * mut sys :: godot_method_bind , save_to_string : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CryptoKeyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CryptoKey\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_public_only = (gd_api . godot_method_bind_get_method) (class_name , "is_public_only\0" . as_ptr () as * const c_char) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\0" . as_ptr () as * const c_char) ; table . load_from_string = (gd_api . godot_method_bind_get_method) (class_name , "load_from_string\0" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\0" . as_ptr () as * const c_char) ; table . save_to_string = (gd_api . godot_method_bind_get_method) (class_name , "save_to_string\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::crypto_key::private::CryptoKey;
            
            pub mod cube_map {
                # ! [doc = "This module contains types related to the API class [`CubeMap`][super::CubeMap]."] pub (crate) mod private { # [doc = "`core class CubeMap` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`cube_map`][super::cube_map] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_cubemap.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCubeMap inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CubeMap { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CubeMap ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flags (pub i64) ; impl Flags { pub const FLAG_MIPMAPS : Flags = Flags (1i64) ; pub const FLAG_REPEAT : Flags = Flags (2i64) ; pub const FLAG_FILTER : Flags = Flags (4i64) ; pub const FLAGS_DEFAULT : Flags = Flags (7i64) ; } impl From < i64 > for Flags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flags > for i64 { # [inline] fn from (v : Flags) -> Self { v . 0 } } impl FromVariant for Flags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Side (pub i64) ; impl Side { pub const LEFT : Side = Side (0i64) ; pub const RIGHT : Side = Side (1i64) ; pub const BOTTOM : Side = Side (2i64) ; pub const TOP : Side = Side (3i64) ; pub const FRONT : Side = Side (4i64) ; pub const BACK : Side = Side (5i64) ; } impl From < i64 > for Side { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Side > for i64 { # [inline] fn from (v : Side) -> Self { v . 0 } } impl FromVariant for Side { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Storage (pub i64) ; impl Storage { pub const RAW : Storage = Storage (0i64) ; pub const COMPRESS_LOSSY : Storage = Storage (1i64) ; pub const COMPRESS_LOSSLESS : Storage = Storage (2i64) ; } impl From < i64 > for Storage { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Storage > for i64 { # [inline] fn from (v : Storage) -> Self { v . 0 } } impl FromVariant for Storage { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CubeMap { pub const SIDE_LEFT : i64 = 0i64 ; pub const STORAGE_RAW : i64 = 0i64 ; pub const FLAG_MIPMAPS : i64 = 1i64 ; pub const SIDE_RIGHT : i64 = 1i64 ; pub const STORAGE_COMPRESS_LOSSY : i64 = 1i64 ; pub const FLAG_REPEAT : i64 = 2i64 ; pub const SIDE_BOTTOM : i64 = 2i64 ; pub const STORAGE_COMPRESS_LOSSLESS : i64 = 2i64 ; pub const SIDE_TOP : i64 = 3i64 ; pub const FLAG_FILTER : i64 = 4i64 ; pub const SIDE_FRONT : i64 = 4i64 ; pub const SIDE_BACK : i64 = 5i64 ; pub const FLAGS_DEFAULT : i64 = 7i64 ; } impl CubeMap { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CubeMapMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The render flags for the [`CubeMap`][CubeMap]. See the [`Flags`][Flags] constants for details."] # [doc = ""] # [inline] pub fn flags (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . get_flags ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`CubeMap`][CubeMap]'s height."] # [doc = ""] # [inline] pub fn get_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The lossy storage quality of the [`CubeMap`][CubeMap] if the storage mode is set to [`STORAGE_COMPRESS_LOSSY`][Self::STORAGE_COMPRESS_LOSSY]."] # [doc = ""] # [inline] pub fn lossy_storage_quality (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . get_lossy_storage_quality ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an [`Image`][Image] for a side of the [`CubeMap`][CubeMap] using one of the [`Side`][Side] constants."] # [doc = ""] # [inline] pub fn get_side (& self , side : i64) -> Option < Ref < crate :: generated :: Image , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . get_side ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , side as _) ; < Option < Ref < crate :: generated :: Image , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`CubeMap`][CubeMap]'s storage mode. See [`Storage`][Storage] constants."] # [doc = ""] # [inline] pub fn storage (& self) -> crate :: generated :: cube_map :: Storage { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . get_storage ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: cube_map :: Storage > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`CubeMap`][CubeMap]'s width."] # [doc = ""] # [inline] pub fn get_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . get_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The render flags for the [`CubeMap`][CubeMap]. See the [`Flags`][Flags] constants for details."] # [doc = ""] # [inline] pub fn set_flags (& self , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . set_flags ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flags as _) ; } } # [doc = "The lossy storage quality of the [`CubeMap`][CubeMap] if the storage mode is set to [`STORAGE_COMPRESS_LOSSY`][Self::STORAGE_COMPRESS_LOSSY]."] # [doc = ""] # [inline] pub fn set_lossy_storage_quality (& self , quality : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . set_lossy_storage_quality ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , quality as _) ; } } # [doc = "Sets an [`Image`][Image] for a side of the [`CubeMap`][CubeMap] using one of the [`Side`][Side] constants."] # [doc = ""] # [inline] pub fn set_side (& self , side : i64 , image : impl AsArg < crate :: generated :: Image >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . set_side ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , side as _ , image . as_arg_ptr ()) ; } } # [doc = "The [`CubeMap`][CubeMap]'s storage mode. See [`Storage`][Storage] constants."] # [doc = ""] # [inline] pub fn set_storage (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMapMethodTable :: get (get_api ()) . set_storage ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CubeMap { } unsafe impl GodotObject for CubeMap { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CubeMap" } } impl std :: ops :: Deref for CubeMap { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CubeMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for CubeMap { } unsafe impl SubClass < crate :: generated :: Reference > for CubeMap { } unsafe impl SubClass < crate :: generated :: Object > for CubeMap { } impl Instanciable for CubeMap { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CubeMap :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CubeMapMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_flags : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_lossy_storage_quality : * mut sys :: godot_method_bind , pub get_side : * mut sys :: godot_method_bind , pub get_storage : * mut sys :: godot_method_bind , pub get_width : * mut sys :: godot_method_bind , pub set_flags : * mut sys :: godot_method_bind , pub set_lossy_storage_quality : * mut sys :: godot_method_bind , pub set_side : * mut sys :: godot_method_bind , pub set_storage : * mut sys :: godot_method_bind } impl CubeMapMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CubeMapMethodTable = CubeMapMethodTable { class_constructor : None , get_flags : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_lossy_storage_quality : 0 as * mut sys :: godot_method_bind , get_side : 0 as * mut sys :: godot_method_bind , get_storage : 0 as * mut sys :: godot_method_bind , get_width : 0 as * mut sys :: godot_method_bind , set_flags : 0 as * mut sys :: godot_method_bind , set_lossy_storage_quality : 0 as * mut sys :: godot_method_bind , set_side : 0 as * mut sys :: godot_method_bind , set_storage : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CubeMapMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CubeMap\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_flags\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_lossy_storage_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_lossy_storage_quality\0" . as_ptr () as * const c_char) ; table . get_side = (gd_api . godot_method_bind_get_method) (class_name , "get_side\0" . as_ptr () as * const c_char) ; table . get_storage = (gd_api . godot_method_bind_get_method) (class_name , "get_storage\0" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\0" . as_ptr () as * const c_char) ; table . set_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_flags\0" . as_ptr () as * const c_char) ; table . set_lossy_storage_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_lossy_storage_quality\0" . as_ptr () as * const c_char) ; table . set_side = (gd_api . godot_method_bind_get_method) (class_name , "set_side\0" . as_ptr () as * const c_char) ; table . set_storage = (gd_api . godot_method_bind_get_method) (class_name , "set_storage\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::cube_map::private::CubeMap;
            
            pub(crate) mod cube_mesh {
                # ! [doc = "This module contains types related to the API class [`CubeMesh`][super::CubeMesh]."] pub (crate) mod private { # [doc = "`core class CubeMesh` inherits `PrimitiveMesh` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_cubemesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCubeMesh inherits methods from:\n - [PrimitiveMesh](struct.PrimitiveMesh.html)\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CubeMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CubeMesh ; impl CubeMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CubeMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Size of the cuboid mesh."] # [doc = ""] # [inline] pub fn size (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Number of extra edge loops inserted along the Z axis."] # [doc = ""] # [inline] pub fn subdivide_depth (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . get_subdivide_depth ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Number of extra edge loops inserted along the Y axis."] # [doc = ""] # [inline] pub fn subdivide_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . get_subdivide_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Number of extra edge loops inserted along the X axis."] # [doc = ""] # [inline] pub fn subdivide_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . get_subdivide_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Size of the cuboid mesh."] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Number of extra edge loops inserted along the Z axis."] # [doc = ""] # [inline] pub fn set_subdivide_depth (& self , divisions : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . set_subdivide_depth ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , divisions as _) ; } } # [doc = "Number of extra edge loops inserted along the Y axis."] # [doc = ""] # [inline] pub fn set_subdivide_height (& self , divisions : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . set_subdivide_height ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , divisions as _) ; } } # [doc = "Number of extra edge loops inserted along the X axis."] # [doc = ""] # [inline] pub fn set_subdivide_width (& self , subdivide : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CubeMeshMethodTable :: get (get_api ()) . set_subdivide_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , subdivide as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CubeMesh { } unsafe impl GodotObject for CubeMesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CubeMesh" } } impl std :: ops :: Deref for CubeMesh { type Target = crate :: generated :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CubeMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PrimitiveMesh > for CubeMesh { } unsafe impl SubClass < crate :: generated :: Mesh > for CubeMesh { } unsafe impl SubClass < crate :: generated :: Resource > for CubeMesh { } unsafe impl SubClass < crate :: generated :: Reference > for CubeMesh { } unsafe impl SubClass < crate :: generated :: Object > for CubeMesh { } impl Instanciable for CubeMesh { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CubeMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CubeMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_size : * mut sys :: godot_method_bind , pub get_subdivide_depth : * mut sys :: godot_method_bind , pub get_subdivide_height : * mut sys :: godot_method_bind , pub get_subdivide_width : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind , pub set_subdivide_depth : * mut sys :: godot_method_bind , pub set_subdivide_height : * mut sys :: godot_method_bind , pub set_subdivide_width : * mut sys :: godot_method_bind } impl CubeMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CubeMeshMethodTable = CubeMeshMethodTable { class_constructor : None , get_size : 0 as * mut sys :: godot_method_bind , get_subdivide_depth : 0 as * mut sys :: godot_method_bind , get_subdivide_height : 0 as * mut sys :: godot_method_bind , get_subdivide_width : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind , set_subdivide_depth : 0 as * mut sys :: godot_method_bind , set_subdivide_height : 0 as * mut sys :: godot_method_bind , set_subdivide_width : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CubeMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CubeMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_depth\0" . as_ptr () as * const c_char) ; table . get_subdivide_height = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_height\0" . as_ptr () as * const c_char) ; table . get_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_width\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; table . set_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_depth\0" . as_ptr () as * const c_char) ; table . set_subdivide_height = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_height\0" . as_ptr () as * const c_char) ; table . set_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_width\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::cube_mesh::private::CubeMesh;
            
            pub mod cull_instance {
                # ! [doc = "This module contains types related to the API class [`CullInstance`][super::CullInstance]."] pub (crate) mod private { # [doc = "`core class CullInstance` inherits `Spatial` (manually managed).\n\nThis class has related types in the [`cull_instance`][super::cull_instance] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_cullinstance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nCullInstance inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CullInstance { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CullInstance ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PortalMode (pub i64) ; impl PortalMode { pub const STATIC : PortalMode = PortalMode (0i64) ; pub const DYNAMIC : PortalMode = PortalMode (1i64) ; pub const ROAMING : PortalMode = PortalMode (2i64) ; pub const GLOBAL : PortalMode = PortalMode (3i64) ; pub const IGNORE : PortalMode = PortalMode (4i64) ; } impl From < i64 > for PortalMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PortalMode > for i64 { # [inline] fn from (v : PortalMode) -> Self { v . 0 } } impl FromVariant for PortalMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl CullInstance { pub const PORTAL_MODE_STATIC : i64 = 0i64 ; pub const PORTAL_MODE_DYNAMIC : i64 = 1i64 ; pub const PORTAL_MODE_ROAMING : i64 = 2i64 ; pub const PORTAL_MODE_GLOBAL : i64 = 3i64 ; pub const PORTAL_MODE_IGNORE : i64 = 4i64 ; } impl CullInstance { # [doc = "This allows fine control over the mesh merging feature in the [`RoomManager`][RoomManager].\nSetting this option to `false` can be used to prevent an instance being merged."] # [doc = ""] # [inline] pub fn allow_merging (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CullInstanceMethodTable :: get (get_api ()) . get_allow_merging ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "When a manual bound has not been explicitly specified for a [`Room`][Room], the convex hull bound will be estimated from the geometry of the objects within the room. This setting determines whether the geometry of an object is included in this estimate of the room bound.\n**Note:** This setting is only relevant when the object is set to `PORTAL_MODE_STATIC` or `PORTAL_MODE_DYNAMIC`, and for [`Portal`][Portal]s."] # [doc = ""] # [inline] pub fn include_in_bound (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = CullInstanceMethodTable :: get (get_api ()) . get_include_in_bound ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "When set to `0`, [`CullInstance`][CullInstance]s will be autoplaced in the [`Room`][Room] with the highest priority.\nWhen set to a value other than `0`, the system will attempt to autoplace in a [`Room`][Room] with the `autoplace_priority`, if it is present.\nThis can be used to control autoplacement of building exteriors in an outer [`RoomGroup`][RoomGroup]."] # [doc = ""] # [inline] pub fn portal_autoplace_priority (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CullInstanceMethodTable :: get (get_api ()) . get_portal_autoplace_priority ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "When using [`Room`][Room]s and [`Portal`][Portal]s, this specifies how the [`CullInstance`][CullInstance] is processed in the system."] # [doc = ""] # [inline] pub fn portal_mode (& self) -> crate :: generated :: cull_instance :: PortalMode { unsafe { let method_bind : * mut sys :: godot_method_bind = CullInstanceMethodTable :: get (get_api ()) . get_portal_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: cull_instance :: PortalMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "This allows fine control over the mesh merging feature in the [`RoomManager`][RoomManager].\nSetting this option to `false` can be used to prevent an instance being merged."] # [doc = ""] # [inline] pub fn set_allow_merging (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CullInstanceMethodTable :: get (get_api ()) . set_allow_merging ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "When a manual bound has not been explicitly specified for a [`Room`][Room], the convex hull bound will be estimated from the geometry of the objects within the room. This setting determines whether the geometry of an object is included in this estimate of the room bound.\n**Note:** This setting is only relevant when the object is set to `PORTAL_MODE_STATIC` or `PORTAL_MODE_DYNAMIC`, and for [`Portal`][Portal]s."] # [doc = ""] # [inline] pub fn set_include_in_bound (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CullInstanceMethodTable :: get (get_api ()) . set_include_in_bound ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "When set to `0`, [`CullInstance`][CullInstance]s will be autoplaced in the [`Room`][Room] with the highest priority.\nWhen set to a value other than `0`, the system will attempt to autoplace in a [`Room`][Room] with the `autoplace_priority`, if it is present.\nThis can be used to control autoplacement of building exteriors in an outer [`RoomGroup`][RoomGroup]."] # [doc = ""] # [inline] pub fn set_portal_autoplace_priority (& self , priority : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CullInstanceMethodTable :: get (get_api ()) . set_portal_autoplace_priority ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , priority as _) ; } } # [doc = "When using [`Room`][Room]s and [`Portal`][Portal]s, this specifies how the [`CullInstance`][CullInstance] is processed in the system."] # [doc = ""] # [inline] pub fn set_portal_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CullInstanceMethodTable :: get (get_api ()) . set_portal_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CullInstance { } unsafe impl GodotObject for CullInstance { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "CullInstance" } } impl QueueFree for CullInstance { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for CullInstance { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CullInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for CullInstance { } unsafe impl SubClass < crate :: generated :: Node > for CullInstance { } unsafe impl SubClass < crate :: generated :: Object > for CullInstance { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CullInstanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_allow_merging : * mut sys :: godot_method_bind , pub get_include_in_bound : * mut sys :: godot_method_bind , pub get_portal_autoplace_priority : * mut sys :: godot_method_bind , pub get_portal_mode : * mut sys :: godot_method_bind , pub set_allow_merging : * mut sys :: godot_method_bind , pub set_include_in_bound : * mut sys :: godot_method_bind , pub set_portal_autoplace_priority : * mut sys :: godot_method_bind , pub set_portal_mode : * mut sys :: godot_method_bind } impl CullInstanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CullInstanceMethodTable = CullInstanceMethodTable { class_constructor : None , get_allow_merging : 0 as * mut sys :: godot_method_bind , get_include_in_bound : 0 as * mut sys :: godot_method_bind , get_portal_autoplace_priority : 0 as * mut sys :: godot_method_bind , get_portal_mode : 0 as * mut sys :: godot_method_bind , set_allow_merging : 0 as * mut sys :: godot_method_bind , set_include_in_bound : 0 as * mut sys :: godot_method_bind , set_portal_autoplace_priority : 0 as * mut sys :: godot_method_bind , set_portal_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CullInstanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CullInstance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_allow_merging = (gd_api . godot_method_bind_get_method) (class_name , "get_allow_merging\0" . as_ptr () as * const c_char) ; table . get_include_in_bound = (gd_api . godot_method_bind_get_method) (class_name , "get_include_in_bound\0" . as_ptr () as * const c_char) ; table . get_portal_autoplace_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_portal_autoplace_priority\0" . as_ptr () as * const c_char) ; table . get_portal_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_portal_mode\0" . as_ptr () as * const c_char) ; table . set_allow_merging = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_merging\0" . as_ptr () as * const c_char) ; table . set_include_in_bound = (gd_api . godot_method_bind_get_method) (class_name , "set_include_in_bound\0" . as_ptr () as * const c_char) ; table . set_portal_autoplace_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_portal_autoplace_priority\0" . as_ptr () as * const c_char) ; table . set_portal_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_portal_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::cull_instance::private::CullInstance;
            
            pub mod curve {
                # ! [doc = "This module contains types related to the API class [`Curve`][super::Curve]."] pub (crate) mod private { # [doc = "`core class Curve` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`curve`][super::curve] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_curve.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCurve inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Curve { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Curve ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TangentMode (pub i64) ; impl TangentMode { pub const FREE : TangentMode = TangentMode (0i64) ; pub const LINEAR : TangentMode = TangentMode (1i64) ; pub const MODE_COUNT : TangentMode = TangentMode (2i64) ; } impl From < i64 > for TangentMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TangentMode > for i64 { # [inline] fn from (v : TangentMode) -> Self { v . 0 } } impl FromVariant for TangentMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Curve { pub const TANGENT_FREE : i64 = 0i64 ; pub const TANGENT_LINEAR : i64 = 1i64 ; pub const TANGENT_MODE_COUNT : i64 = 2i64 ; } impl Curve { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CurveMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a point to the curve. For each side, if the `*_mode` is [`TANGENT_LINEAR`][Self::TANGENT_LINEAR], the `*_tangent` angle (in degrees) uses the slope of the curve halfway to the adjacent point. Allows custom assignments to the `*_tangent` angle if `*_mode` is set to [`TANGENT_FREE`][Self::TANGENT_FREE].\n# Default Arguments\n* `left_tangent` - `0`\n* `right_tangent` - `0`\n* `left_mode` - `0`\n* `right_mode` - `0`"] # [doc = ""] # [inline] pub fn add_point (& self , position : Vector2 , left_tangent : f64 , right_tangent : f64 , left_mode : i64 , right_mode : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . add_point ; let ret = crate :: icalls :: icallvar__vec2_f64_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , position , left_tangent as _ , right_tangent as _ , left_mode as _ , right_mode as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Recomputes the baked cache of points for the curve."] # [doc = ""] # [inline] pub fn bake (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . bake ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes points that are closer than `CMP_EPSILON` (0.00001) units to their neighbor on the curve."] # [doc = ""] # [inline] pub fn clean_dupes (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . clean_dupes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes all points from the curve."] # [doc = ""] # [inline] pub fn clear_points (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . clear_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The number of points to include in the baked (i.e. cached) curve data."] # [doc = ""] # [inline] pub fn bake_resolution (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_bake_resolution ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum value the curve can reach."] # [doc = ""] # [inline] pub fn max_value (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_max_value ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The minimum value the curve can reach."] # [doc = ""] # [inline] pub fn min_value (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_min_value ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of points describing the curve."] # [doc = ""] # [inline] pub fn get_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the left [`TangentMode`][TangentMode] for the point at `index`."] # [doc = ""] # [inline] pub fn get_point_left_mode (& self , index : i64) -> crate :: generated :: curve :: TangentMode { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_left_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; < crate :: generated :: curve :: TangentMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the left tangent angle (in degrees) for the point at `index`."] # [doc = ""] # [inline] pub fn get_point_left_tangent (& self , index : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_left_tangent ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the curve coordinates for the point at `index`."] # [doc = ""] # [inline] pub fn get_point_position (& self , index : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the right [`TangentMode`][TangentMode] for the point at `index`."] # [doc = ""] # [inline] pub fn get_point_right_mode (& self , index : i64) -> crate :: generated :: curve :: TangentMode { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_right_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; < crate :: generated :: curve :: TangentMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the right tangent angle (in degrees) for the point at `index`."] # [doc = ""] # [inline] pub fn get_point_right_tangent (& self , index : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . get_point_right_tangent ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the Y value for the point that would exist at the X position `offset` along the curve."] # [doc = ""] # [inline] pub fn interpolate (& self , offset : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . interpolate ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , offset as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the Y value for the point that would exist at the X position `offset` along the curve using the baked cache. Bakes the curve's points if not already baked."] # [doc = ""] # [inline] pub fn interpolate_baked (& self , offset : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . interpolate_baked ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , offset as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Removes the point at `index` from the curve."] # [doc = ""] # [inline] pub fn remove_point (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . remove_point ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } # [doc = "The number of points to include in the baked (i.e. cached) curve data."] # [doc = ""] # [inline] pub fn set_bake_resolution (& self , resolution : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_bake_resolution ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , resolution as _) ; } } # [doc = "The maximum value the curve can reach."] # [doc = ""] # [inline] pub fn set_max_value (& self , max : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_max_value ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , max as _) ; } } # [doc = "The minimum value the curve can reach."] # [doc = ""] # [inline] pub fn set_min_value (& self , min : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_min_value ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , min as _) ; } } # [doc = "Sets the left [`TangentMode`][TangentMode] for the point at `index` to `mode`."] # [doc = ""] # [inline] pub fn set_point_left_mode (& self , index : i64 , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_left_mode ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , index as _ , mode as _) ; } } # [doc = "Sets the left tangent angle for the point at `index` to `tangent`."] # [doc = ""] # [inline] pub fn set_point_left_tangent (& self , index : i64 , tangent : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_left_tangent ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , index as _ , tangent as _) ; } } # [doc = "Sets the offset from `0.5`."] # [doc = ""] # [inline] pub fn set_point_offset (& self , index : i64 , offset : f64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_offset ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , index as _ , offset as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the right [`TangentMode`][TangentMode] for the point at `index` to `mode`."] # [doc = ""] # [inline] pub fn set_point_right_mode (& self , index : i64 , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_right_mode ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , index as _ , mode as _) ; } } # [doc = "Sets the right tangent angle for the point at `index` to `tangent`."] # [doc = ""] # [inline] pub fn set_point_right_tangent (& self , index : i64 , tangent : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_right_tangent ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , index as _ , tangent as _) ; } } # [doc = "Assigns the vertical position `y` to the point at `index`."] # [doc = ""] # [inline] pub fn set_point_value (& self , index : i64 , y : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveMethodTable :: get (get_api ()) . set_point_value ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , index as _ , y as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Curve { } unsafe impl GodotObject for Curve { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Curve" } } impl std :: ops :: Deref for Curve { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Curve { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Curve { } unsafe impl SubClass < crate :: generated :: Reference > for Curve { } unsafe impl SubClass < crate :: generated :: Object > for Curve { } impl Instanciable for Curve { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Curve :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CurveMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_point : * mut sys :: godot_method_bind , pub bake : * mut sys :: godot_method_bind , pub clean_dupes : * mut sys :: godot_method_bind , pub clear_points : * mut sys :: godot_method_bind , pub get_bake_resolution : * mut sys :: godot_method_bind , pub get_max_value : * mut sys :: godot_method_bind , pub get_min_value : * mut sys :: godot_method_bind , pub get_point_count : * mut sys :: godot_method_bind , pub get_point_left_mode : * mut sys :: godot_method_bind , pub get_point_left_tangent : * mut sys :: godot_method_bind , pub get_point_position : * mut sys :: godot_method_bind , pub get_point_right_mode : * mut sys :: godot_method_bind , pub get_point_right_tangent : * mut sys :: godot_method_bind , pub interpolate : * mut sys :: godot_method_bind , pub interpolate_baked : * mut sys :: godot_method_bind , pub remove_point : * mut sys :: godot_method_bind , pub set_bake_resolution : * mut sys :: godot_method_bind , pub set_max_value : * mut sys :: godot_method_bind , pub set_min_value : * mut sys :: godot_method_bind , pub set_point_left_mode : * mut sys :: godot_method_bind , pub set_point_left_tangent : * mut sys :: godot_method_bind , pub set_point_offset : * mut sys :: godot_method_bind , pub set_point_right_mode : * mut sys :: godot_method_bind , pub set_point_right_tangent : * mut sys :: godot_method_bind , pub set_point_value : * mut sys :: godot_method_bind } impl CurveMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CurveMethodTable = CurveMethodTable { class_constructor : None , add_point : 0 as * mut sys :: godot_method_bind , bake : 0 as * mut sys :: godot_method_bind , clean_dupes : 0 as * mut sys :: godot_method_bind , clear_points : 0 as * mut sys :: godot_method_bind , get_bake_resolution : 0 as * mut sys :: godot_method_bind , get_max_value : 0 as * mut sys :: godot_method_bind , get_min_value : 0 as * mut sys :: godot_method_bind , get_point_count : 0 as * mut sys :: godot_method_bind , get_point_left_mode : 0 as * mut sys :: godot_method_bind , get_point_left_tangent : 0 as * mut sys :: godot_method_bind , get_point_position : 0 as * mut sys :: godot_method_bind , get_point_right_mode : 0 as * mut sys :: godot_method_bind , get_point_right_tangent : 0 as * mut sys :: godot_method_bind , interpolate : 0 as * mut sys :: godot_method_bind , interpolate_baked : 0 as * mut sys :: godot_method_bind , remove_point : 0 as * mut sys :: godot_method_bind , set_bake_resolution : 0 as * mut sys :: godot_method_bind , set_max_value : 0 as * mut sys :: godot_method_bind , set_min_value : 0 as * mut sys :: godot_method_bind , set_point_left_mode : 0 as * mut sys :: godot_method_bind , set_point_left_tangent : 0 as * mut sys :: godot_method_bind , set_point_offset : 0 as * mut sys :: godot_method_bind , set_point_right_mode : 0 as * mut sys :: godot_method_bind , set_point_right_tangent : 0 as * mut sys :: godot_method_bind , set_point_value : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CurveMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Curve\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_point = (gd_api . godot_method_bind_get_method) (class_name , "add_point\0" . as_ptr () as * const c_char) ; table . bake = (gd_api . godot_method_bind_get_method) (class_name , "bake\0" . as_ptr () as * const c_char) ; table . clean_dupes = (gd_api . godot_method_bind_get_method) (class_name , "clean_dupes\0" . as_ptr () as * const c_char) ; table . clear_points = (gd_api . godot_method_bind_get_method) (class_name , "clear_points\0" . as_ptr () as * const c_char) ; table . get_bake_resolution = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_resolution\0" . as_ptr () as * const c_char) ; table . get_max_value = (gd_api . godot_method_bind_get_method) (class_name , "get_max_value\0" . as_ptr () as * const c_char) ; table . get_min_value = (gd_api . godot_method_bind_get_method) (class_name , "get_min_value\0" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\0" . as_ptr () as * const c_char) ; table . get_point_left_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_point_left_mode\0" . as_ptr () as * const c_char) ; table . get_point_left_tangent = (gd_api . godot_method_bind_get_method) (class_name , "get_point_left_tangent\0" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\0" . as_ptr () as * const c_char) ; table . get_point_right_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_point_right_mode\0" . as_ptr () as * const c_char) ; table . get_point_right_tangent = (gd_api . godot_method_bind_get_method) (class_name , "get_point_right_tangent\0" . as_ptr () as * const c_char) ; table . interpolate = (gd_api . godot_method_bind_get_method) (class_name , "interpolate\0" . as_ptr () as * const c_char) ; table . interpolate_baked = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_baked\0" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\0" . as_ptr () as * const c_char) ; table . set_bake_resolution = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_resolution\0" . as_ptr () as * const c_char) ; table . set_max_value = (gd_api . godot_method_bind_get_method) (class_name , "set_max_value\0" . as_ptr () as * const c_char) ; table . set_min_value = (gd_api . godot_method_bind_get_method) (class_name , "set_min_value\0" . as_ptr () as * const c_char) ; table . set_point_left_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_point_left_mode\0" . as_ptr () as * const c_char) ; table . set_point_left_tangent = (gd_api . godot_method_bind_get_method) (class_name , "set_point_left_tangent\0" . as_ptr () as * const c_char) ; table . set_point_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_point_offset\0" . as_ptr () as * const c_char) ; table . set_point_right_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_point_right_mode\0" . as_ptr () as * const c_char) ; table . set_point_right_tangent = (gd_api . godot_method_bind_get_method) (class_name , "set_point_right_tangent\0" . as_ptr () as * const c_char) ; table . set_point_value = (gd_api . godot_method_bind_get_method) (class_name , "set_point_value\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::curve::private::Curve;
            
            pub(crate) mod curve_2d {
                # ! [doc = "This module contains types related to the API class [`Curve2D`][super::Curve2D]."] pub (crate) mod private { # [doc = "`core class Curve2D` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_curve2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCurve2D inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Curve2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Curve2D ; impl Curve2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Curve2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a point with the specified `position` relative to the curve's own position, with control points `in` and `out`. Appends the new point at the end of the point list.\nIf `index` is given, the new point is inserted before the existing point identified by index `index`. Every existing point starting from `index` is shifted further down the list of points. The index must be greater than or equal to `0` and must not exceed the number of existing points in the line. See [`get_point_count`][Self::get_point_count].\n# Default Arguments\n* `in` - `Vector2( 0, 0 )`\n* `out` - `Vector2( 0, 0 )`\n* `index` - `-1`"] # [doc = ""] # [inline] pub fn add_point (& self , position : Vector2 , in_ : Vector2 , out : Vector2 , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . add_point ; let ret = crate :: icalls :: icallvar__vec2_vec2_vec2_i64 (method_bind , self . this . sys () . as_ptr () , position , in_ , out , index as _) ; } } # [doc = "Removes all points from the curve."] # [doc = ""] # [inline] pub fn clear_points (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . clear_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [`get_baked_points`][Self::get_baked_points] or [`get_baked_length`][Self::get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care."] # [doc = ""] # [inline] pub fn bake_interval (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . get_bake_interval ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the total length of the curve, based on the cached points. Given enough density (see [`bake_interval`][Self::bake_interval]), it should be approximate enough."] # [doc = ""] # [inline] pub fn get_baked_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . get_baked_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the cache of points as a [`PoolVector2Array`][PoolArray<Vector2>]."] # [doc = ""] # [inline] pub fn get_baked_points (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . get_baked_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the closest offset to `to_point`. This offset is meant to be used in [`interpolate_baked`][Self::interpolate_baked].\n`to_point` must be in this curve's local space."] # [doc = ""] # [inline] pub fn get_closest_offset (& self , to_point : Vector2) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . get_closest_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , to_point) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the closest baked point (in curve's local space) to `to_point`.\n`to_point` must be in this curve's local space."] # [doc = ""] # [inline] pub fn get_closest_point (& self , to_point : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . get_closest_point ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , to_point) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of points describing the curve."] # [doc = ""] # [inline] pub fn get_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . get_point_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the position of the control point leading to the vertex `idx`. The returned position is relative to the vertex `idx`. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0)`."] # [doc = ""] # [inline] pub fn get_point_in (& self , idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . get_point_in ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position of the control point leading out of the vertex `idx`. The returned position is relative to the vertex `idx`. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0)`."] # [doc = ""] # [inline] pub fn get_point_out (& self , idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . get_point_out ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position of the vertex `idx`. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0)`."] # [doc = ""] # [inline] pub fn get_point_position (& self , idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . get_point_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position between the vertex `idx` and the vertex `idx + 1`, where `t` controls if the point is the first vertex (`t = 0.0`), the last vertex (`t = 1.0`), or in between. Values of `t` outside the range (`0.0 >= t <=1`) give strange, but predictable results.\nIf `idx` is out of bounds it is truncated to the first or last vertex, and `t` is ignored. If the curve has no points, the function sends an error to the console, and returns `(0, 0)`."] # [doc = ""] # [inline] pub fn interpolate (& self , idx : i64 , t : f64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . interpolate ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , idx as _ , t as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a point within the curve at position `offset`, where `offset` is measured as a pixel distance along the curve.\nTo do that, it finds the two cached points where the `offset` lies between, then interpolates the values. This interpolation is cubic if `cubic` is set to `true`, or linear if set to `false`.\nCubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).\n# Default Arguments\n* `cubic` - `false`"] # [doc = ""] # [inline] pub fn interpolate_baked (& self , offset : f64 , cubic : bool) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . interpolate_baked ; let ret = crate :: icalls :: icallvar__f64_bool (method_bind , self . this . sys () . as_ptr () , offset as _ , cubic as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position at the vertex `fofs`. It calls [`interpolate`][Self::interpolate] using the integer part of `fofs` as `idx`, and its fractional part as `t`."] # [doc = ""] # [inline] pub fn interpolatef (& self , fofs : f64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . interpolatef ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , fofs as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Deletes the point `idx` from the curve. Sends an error to the console if `idx` is out of bounds."] # [doc = ""] # [inline] pub fn remove_point (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . remove_point ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; } } # [doc = "The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [`get_baked_points`][Self::get_baked_points] or [`get_baked_length`][Self::get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care."] # [doc = ""] # [inline] pub fn set_bake_interval (& self , distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . set_bake_interval ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , distance as _) ; } } # [doc = "Sets the position of the control point leading to the vertex `idx`. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex."] # [doc = ""] # [inline] pub fn set_point_in (& self , idx : i64 , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . set_point_in ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , idx as _ , position) ; } } # [doc = "Sets the position of the control point leading out of the vertex `idx`. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex."] # [doc = ""] # [inline] pub fn set_point_out (& self , idx : i64 , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . set_point_out ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , idx as _ , position) ; } } # [doc = "Sets the position for the vertex `idx`. If the index is out of bounds, the function sends an error to the console."] # [doc = ""] # [inline] pub fn set_point_position (& self , idx : i64 , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . set_point_position ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , idx as _ , position) ; } } # [doc = "Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.\nThis approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.\n`max_stages` controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!\n`tolerance_degrees` controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.\n# Default Arguments\n* `max_stages` - `5`\n* `tolerance_degrees` - `4`"] # [doc = ""] # [inline] pub fn tessellate (& self , max_stages : i64 , tolerance_degrees : f64) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve2DMethodTable :: get (get_api ()) . tessellate ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , max_stages as _ , tolerance_degrees as _) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for Curve2D { } unsafe impl GodotObject for Curve2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Curve2D" } } impl std :: ops :: Deref for Curve2D { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Curve2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Curve2D { } unsafe impl SubClass < crate :: generated :: Reference > for Curve2D { } unsafe impl SubClass < crate :: generated :: Object > for Curve2D { } impl Instanciable for Curve2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Curve2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Curve2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_point : * mut sys :: godot_method_bind , pub clear_points : * mut sys :: godot_method_bind , pub get_bake_interval : * mut sys :: godot_method_bind , pub get_baked_length : * mut sys :: godot_method_bind , pub get_baked_points : * mut sys :: godot_method_bind , pub get_closest_offset : * mut sys :: godot_method_bind , pub get_closest_point : * mut sys :: godot_method_bind , pub get_point_count : * mut sys :: godot_method_bind , pub get_point_in : * mut sys :: godot_method_bind , pub get_point_out : * mut sys :: godot_method_bind , pub get_point_position : * mut sys :: godot_method_bind , pub interpolate : * mut sys :: godot_method_bind , pub interpolate_baked : * mut sys :: godot_method_bind , pub interpolatef : * mut sys :: godot_method_bind , pub remove_point : * mut sys :: godot_method_bind , pub set_bake_interval : * mut sys :: godot_method_bind , pub set_point_in : * mut sys :: godot_method_bind , pub set_point_out : * mut sys :: godot_method_bind , pub set_point_position : * mut sys :: godot_method_bind , pub tessellate : * mut sys :: godot_method_bind } impl Curve2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Curve2DMethodTable = Curve2DMethodTable { class_constructor : None , add_point : 0 as * mut sys :: godot_method_bind , clear_points : 0 as * mut sys :: godot_method_bind , get_bake_interval : 0 as * mut sys :: godot_method_bind , get_baked_length : 0 as * mut sys :: godot_method_bind , get_baked_points : 0 as * mut sys :: godot_method_bind , get_closest_offset : 0 as * mut sys :: godot_method_bind , get_closest_point : 0 as * mut sys :: godot_method_bind , get_point_count : 0 as * mut sys :: godot_method_bind , get_point_in : 0 as * mut sys :: godot_method_bind , get_point_out : 0 as * mut sys :: godot_method_bind , get_point_position : 0 as * mut sys :: godot_method_bind , interpolate : 0 as * mut sys :: godot_method_bind , interpolate_baked : 0 as * mut sys :: godot_method_bind , interpolatef : 0 as * mut sys :: godot_method_bind , remove_point : 0 as * mut sys :: godot_method_bind , set_bake_interval : 0 as * mut sys :: godot_method_bind , set_point_in : 0 as * mut sys :: godot_method_bind , set_point_out : 0 as * mut sys :: godot_method_bind , set_point_position : 0 as * mut sys :: godot_method_bind , tessellate : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Curve2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Curve2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_point = (gd_api . godot_method_bind_get_method) (class_name , "add_point\0" . as_ptr () as * const c_char) ; table . clear_points = (gd_api . godot_method_bind_get_method) (class_name , "clear_points\0" . as_ptr () as * const c_char) ; table . get_bake_interval = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_interval\0" . as_ptr () as * const c_char) ; table . get_baked_length = (gd_api . godot_method_bind_get_method) (class_name , "get_baked_length\0" . as_ptr () as * const c_char) ; table . get_baked_points = (gd_api . godot_method_bind_get_method) (class_name , "get_baked_points\0" . as_ptr () as * const c_char) ; table . get_closest_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_offset\0" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\0" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\0" . as_ptr () as * const c_char) ; table . get_point_in = (gd_api . godot_method_bind_get_method) (class_name , "get_point_in\0" . as_ptr () as * const c_char) ; table . get_point_out = (gd_api . godot_method_bind_get_method) (class_name , "get_point_out\0" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\0" . as_ptr () as * const c_char) ; table . interpolate = (gd_api . godot_method_bind_get_method) (class_name , "interpolate\0" . as_ptr () as * const c_char) ; table . interpolate_baked = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_baked\0" . as_ptr () as * const c_char) ; table . interpolatef = (gd_api . godot_method_bind_get_method) (class_name , "interpolatef\0" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\0" . as_ptr () as * const c_char) ; table . set_bake_interval = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_interval\0" . as_ptr () as * const c_char) ; table . set_point_in = (gd_api . godot_method_bind_get_method) (class_name , "set_point_in\0" . as_ptr () as * const c_char) ; table . set_point_out = (gd_api . godot_method_bind_get_method) (class_name , "set_point_out\0" . as_ptr () as * const c_char) ; table . set_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_point_position\0" . as_ptr () as * const c_char) ; table . tessellate = (gd_api . godot_method_bind_get_method) (class_name , "tessellate\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::curve_2d::private::Curve2D;
            
            pub(crate) mod curve_3d {
                # ! [doc = "This module contains types related to the API class [`Curve3D`][super::Curve3D]."] pub (crate) mod private { # [doc = "`core class Curve3D` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_curve3d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCurve3D inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Curve3D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Curve3D ; impl Curve3D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Curve3DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a point with the specified `position` relative to the curve's own position, with control points `in` and `out`. Appends the new point at the end of the point list.\nIf `index` is given, the new point is inserted before the existing point identified by index `index`. Every existing point starting from `index` is shifted further down the list of points. The index must be greater than or equal to `0` and must not exceed the number of existing points in the line. See [`get_point_count`][Self::get_point_count].\n# Default Arguments\n* `in` - `Vector3( 0, 0, 0 )`\n* `out` - `Vector3( 0, 0, 0 )`\n* `index` - `-1`"] # [doc = ""] # [inline] pub fn add_point (& self , position : Vector3 , in_ : Vector3 , out : Vector3 , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . add_point ; let ret = crate :: icalls :: icallvar__vec3_vec3_vec3_i64 (method_bind , self . this . sys () . as_ptr () , position , in_ , out , index as _) ; } } # [doc = "Removes all points from the curve."] # [doc = ""] # [inline] pub fn clear_points (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . clear_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [`get_baked_points`][Self::get_baked_points] or [`get_baked_length`][Self::get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care."] # [doc = ""] # [inline] pub fn bake_interval (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . get_bake_interval ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the total length of the curve, based on the cached points. Given enough density (see [`bake_interval`][Self::bake_interval]), it should be approximate enough."] # [doc = ""] # [inline] pub fn get_baked_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . get_baked_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the cache of points as a [`PoolVector3Array`][PoolArray<Vector3>]."] # [doc = ""] # [inline] pub fn get_baked_points (& self) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . get_baked_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the cache of tilts as a [`PoolRealArray`][PoolArray<f32>]."] # [doc = ""] # [inline] pub fn get_baked_tilts (& self) -> PoolArray < f32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . get_baked_tilts ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < f32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the cache of up vectors as a [`PoolVector3Array`][PoolArray<Vector3>].\nIf [`up_vector_enabled`][Self::up_vector_enabled] is `false`, the cache will be empty."] # [doc = ""] # [inline] pub fn get_baked_up_vectors (& self) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . get_baked_up_vectors ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the closest offset to `to_point`. This offset is meant to be used in [`interpolate_baked`][Self::interpolate_baked] or [`interpolate_baked_up_vector`][Self::interpolate_baked_up_vector].\n`to_point` must be in this curve's local space."] # [doc = ""] # [inline] pub fn get_closest_offset (& self , to_point : Vector3) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . get_closest_offset ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , to_point) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the closest baked point (in curve's local space) to `to_point`.\n`to_point` must be in this curve's local space."] # [doc = ""] # [inline] pub fn get_closest_point (& self , to_point : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . get_closest_point ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , to_point) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of points describing the curve."] # [doc = ""] # [inline] pub fn get_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . get_point_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the position of the control point leading to the vertex `idx`. The returned position is relative to the vertex `idx`. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0, 0)`."] # [doc = ""] # [inline] pub fn get_point_in (& self , idx : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . get_point_in ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position of the control point leading out of the vertex `idx`. The returned position is relative to the vertex `idx`. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0, 0)`."] # [doc = ""] # [inline] pub fn get_point_out (& self , idx : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . get_point_out ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position of the vertex `idx`. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0, 0)`."] # [doc = ""] # [inline] pub fn get_point_position (& self , idx : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . get_point_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tilt angle in radians for the point `idx`. If the index is out of bounds, the function sends an error to the console, and returns `0`."] # [doc = ""] # [inline] pub fn get_point_tilt (& self , idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . get_point_tilt ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the position between the vertex `idx` and the vertex `idx + 1`, where `t` controls if the point is the first vertex (`t = 0.0`), the last vertex (`t = 1.0`), or in between. Values of `t` outside the range (`0.0 >= t <=1`) give strange, but predictable results.\nIf `idx` is out of bounds it is truncated to the first or last vertex, and `t` is ignored. If the curve has no points, the function sends an error to the console, and returns `(0, 0, 0)`."] # [doc = ""] # [inline] pub fn interpolate (& self , idx : i64 , t : f64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . interpolate ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , idx as _ , t as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a point within the curve at position `offset`, where `offset` is measured as a distance in 3D units along the curve.\nTo do that, it finds the two cached points where the `offset` lies between, then interpolates the values. This interpolation is cubic if `cubic` is set to `true`, or linear if set to `false`.\nCubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).\n# Default Arguments\n* `cubic` - `false`"] # [doc = ""] # [inline] pub fn interpolate_baked (& self , offset : f64 , cubic : bool) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . interpolate_baked ; let ret = crate :: icalls :: icallvar__f64_bool (method_bind , self . this . sys () . as_ptr () , offset as _ , cubic as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an up vector within the curve at position `offset`, where `offset` is measured as a distance in 3D units along the curve.\nTo do that, it finds the two cached up vectors where the `offset` lies between, then interpolates the values. If `apply_tilt` is `true`, an interpolated tilt is applied to the interpolated up vector.\nIf the curve has no up vectors, the function sends an error to the console, and returns `(0, 1, 0)`.\n# Default Arguments\n* `apply_tilt` - `false`"] # [doc = ""] # [inline] pub fn interpolate_baked_up_vector (& self , offset : f64 , apply_tilt : bool) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . interpolate_baked_up_vector ; let ret = crate :: icalls :: icallvar__f64_bool (method_bind , self . this . sys () . as_ptr () , offset as _ , apply_tilt as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position at the vertex `fofs`. It calls [`interpolate`][Self::interpolate] using the integer part of `fofs` as `idx`, and its fractional part as `t`."] # [doc = ""] # [inline] pub fn interpolatef (& self , fofs : f64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . interpolatef ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , fofs as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the curve will bake up vectors used for orientation. This is used when [`PathFollow.rotation_mode`][PathFollow::rotation_mode] is set to [`PathFollow.ROTATION_ORIENTED`][PathFollow::ROTATION_ORIENTED]. Changing it forces the cache to be recomputed."] # [doc = ""] # [inline] pub fn is_up_vector_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . is_up_vector_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Deletes the point `idx` from the curve. Sends an error to the console if `idx` is out of bounds."] # [doc = ""] # [inline] pub fn remove_point (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . remove_point ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; } } # [doc = "The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [`get_baked_points`][Self::get_baked_points] or [`get_baked_length`][Self::get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care."] # [doc = ""] # [inline] pub fn set_bake_interval (& self , distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . set_bake_interval ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , distance as _) ; } } # [doc = "Sets the position of the control point leading to the vertex `idx`. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex."] # [doc = ""] # [inline] pub fn set_point_in (& self , idx : i64 , position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . set_point_in ; let ret = crate :: icalls :: icallvar__i64_vec3 (method_bind , self . this . sys () . as_ptr () , idx as _ , position) ; } } # [doc = "Sets the position of the control point leading out of the vertex `idx`. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex."] # [doc = ""] # [inline] pub fn set_point_out (& self , idx : i64 , position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . set_point_out ; let ret = crate :: icalls :: icallvar__i64_vec3 (method_bind , self . this . sys () . as_ptr () , idx as _ , position) ; } } # [doc = "Sets the position for the vertex `idx`. If the index is out of bounds, the function sends an error to the console."] # [doc = ""] # [inline] pub fn set_point_position (& self , idx : i64 , position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . set_point_position ; let ret = crate :: icalls :: icallvar__i64_vec3 (method_bind , self . this . sys () . as_ptr () , idx as _ , position) ; } } # [doc = "Sets the tilt angle in radians for the point `idx`. If the index is out of bounds, the function sends an error to the console.\nThe tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [`PathFollow`][PathFollow], this tilt is an offset over the natural tilt the [`PathFollow`][PathFollow] calculates."] # [doc = ""] # [inline] pub fn set_point_tilt (& self , idx : i64 , tilt : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . set_point_tilt ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , idx as _ , tilt as _) ; } } # [doc = "If `true`, the curve will bake up vectors used for orientation. This is used when [`PathFollow.rotation_mode`][PathFollow::rotation_mode] is set to [`PathFollow.ROTATION_ORIENTED`][PathFollow::ROTATION_ORIENTED]. Changing it forces the cache to be recomputed."] # [doc = ""] # [inline] pub fn set_up_vector_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . set_up_vector_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.\nThis approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough.\n`max_stages` controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care!\n`tolerance_degrees` controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided.\n# Default Arguments\n* `max_stages` - `5`\n* `tolerance_degrees` - `4`"] # [doc = ""] # [inline] pub fn tessellate (& self , max_stages : i64 , tolerance_degrees : f64) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = Curve3DMethodTable :: get (get_api ()) . tessellate ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , max_stages as _ , tolerance_degrees as _) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for Curve3D { } unsafe impl GodotObject for Curve3D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Curve3D" } } impl std :: ops :: Deref for Curve3D { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Curve3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Curve3D { } unsafe impl SubClass < crate :: generated :: Reference > for Curve3D { } unsafe impl SubClass < crate :: generated :: Object > for Curve3D { } impl Instanciable for Curve3D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Curve3D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Curve3DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_point : * mut sys :: godot_method_bind , pub clear_points : * mut sys :: godot_method_bind , pub get_bake_interval : * mut sys :: godot_method_bind , pub get_baked_length : * mut sys :: godot_method_bind , pub get_baked_points : * mut sys :: godot_method_bind , pub get_baked_tilts : * mut sys :: godot_method_bind , pub get_baked_up_vectors : * mut sys :: godot_method_bind , pub get_closest_offset : * mut sys :: godot_method_bind , pub get_closest_point : * mut sys :: godot_method_bind , pub get_point_count : * mut sys :: godot_method_bind , pub get_point_in : * mut sys :: godot_method_bind , pub get_point_out : * mut sys :: godot_method_bind , pub get_point_position : * mut sys :: godot_method_bind , pub get_point_tilt : * mut sys :: godot_method_bind , pub interpolate : * mut sys :: godot_method_bind , pub interpolate_baked : * mut sys :: godot_method_bind , pub interpolate_baked_up_vector : * mut sys :: godot_method_bind , pub interpolatef : * mut sys :: godot_method_bind , pub is_up_vector_enabled : * mut sys :: godot_method_bind , pub remove_point : * mut sys :: godot_method_bind , pub set_bake_interval : * mut sys :: godot_method_bind , pub set_point_in : * mut sys :: godot_method_bind , pub set_point_out : * mut sys :: godot_method_bind , pub set_point_position : * mut sys :: godot_method_bind , pub set_point_tilt : * mut sys :: godot_method_bind , pub set_up_vector_enabled : * mut sys :: godot_method_bind , pub tessellate : * mut sys :: godot_method_bind } impl Curve3DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Curve3DMethodTable = Curve3DMethodTable { class_constructor : None , add_point : 0 as * mut sys :: godot_method_bind , clear_points : 0 as * mut sys :: godot_method_bind , get_bake_interval : 0 as * mut sys :: godot_method_bind , get_baked_length : 0 as * mut sys :: godot_method_bind , get_baked_points : 0 as * mut sys :: godot_method_bind , get_baked_tilts : 0 as * mut sys :: godot_method_bind , get_baked_up_vectors : 0 as * mut sys :: godot_method_bind , get_closest_offset : 0 as * mut sys :: godot_method_bind , get_closest_point : 0 as * mut sys :: godot_method_bind , get_point_count : 0 as * mut sys :: godot_method_bind , get_point_in : 0 as * mut sys :: godot_method_bind , get_point_out : 0 as * mut sys :: godot_method_bind , get_point_position : 0 as * mut sys :: godot_method_bind , get_point_tilt : 0 as * mut sys :: godot_method_bind , interpolate : 0 as * mut sys :: godot_method_bind , interpolate_baked : 0 as * mut sys :: godot_method_bind , interpolate_baked_up_vector : 0 as * mut sys :: godot_method_bind , interpolatef : 0 as * mut sys :: godot_method_bind , is_up_vector_enabled : 0 as * mut sys :: godot_method_bind , remove_point : 0 as * mut sys :: godot_method_bind , set_bake_interval : 0 as * mut sys :: godot_method_bind , set_point_in : 0 as * mut sys :: godot_method_bind , set_point_out : 0 as * mut sys :: godot_method_bind , set_point_position : 0 as * mut sys :: godot_method_bind , set_point_tilt : 0 as * mut sys :: godot_method_bind , set_up_vector_enabled : 0 as * mut sys :: godot_method_bind , tessellate : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Curve3DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Curve3D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_point = (gd_api . godot_method_bind_get_method) (class_name , "add_point\0" . as_ptr () as * const c_char) ; table . clear_points = (gd_api . godot_method_bind_get_method) (class_name , "clear_points\0" . as_ptr () as * const c_char) ; table . get_bake_interval = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_interval\0" . as_ptr () as * const c_char) ; table . get_baked_length = (gd_api . godot_method_bind_get_method) (class_name , "get_baked_length\0" . as_ptr () as * const c_char) ; table . get_baked_points = (gd_api . godot_method_bind_get_method) (class_name , "get_baked_points\0" . as_ptr () as * const c_char) ; table . get_baked_tilts = (gd_api . godot_method_bind_get_method) (class_name , "get_baked_tilts\0" . as_ptr () as * const c_char) ; table . get_baked_up_vectors = (gd_api . godot_method_bind_get_method) (class_name , "get_baked_up_vectors\0" . as_ptr () as * const c_char) ; table . get_closest_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_offset\0" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\0" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\0" . as_ptr () as * const c_char) ; table . get_point_in = (gd_api . godot_method_bind_get_method) (class_name , "get_point_in\0" . as_ptr () as * const c_char) ; table . get_point_out = (gd_api . godot_method_bind_get_method) (class_name , "get_point_out\0" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\0" . as_ptr () as * const c_char) ; table . get_point_tilt = (gd_api . godot_method_bind_get_method) (class_name , "get_point_tilt\0" . as_ptr () as * const c_char) ; table . interpolate = (gd_api . godot_method_bind_get_method) (class_name , "interpolate\0" . as_ptr () as * const c_char) ; table . interpolate_baked = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_baked\0" . as_ptr () as * const c_char) ; table . interpolate_baked_up_vector = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_baked_up_vector\0" . as_ptr () as * const c_char) ; table . interpolatef = (gd_api . godot_method_bind_get_method) (class_name , "interpolatef\0" . as_ptr () as * const c_char) ; table . is_up_vector_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_up_vector_enabled\0" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\0" . as_ptr () as * const c_char) ; table . set_bake_interval = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_interval\0" . as_ptr () as * const c_char) ; table . set_point_in = (gd_api . godot_method_bind_get_method) (class_name , "set_point_in\0" . as_ptr () as * const c_char) ; table . set_point_out = (gd_api . godot_method_bind_get_method) (class_name , "set_point_out\0" . as_ptr () as * const c_char) ; table . set_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_point_position\0" . as_ptr () as * const c_char) ; table . set_point_tilt = (gd_api . godot_method_bind_get_method) (class_name , "set_point_tilt\0" . as_ptr () as * const c_char) ; table . set_up_vector_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_up_vector_enabled\0" . as_ptr () as * const c_char) ; table . tessellate = (gd_api . godot_method_bind_get_method) (class_name , "tessellate\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::curve_3d::private::Curve3D;
            
            pub(crate) mod curve_texture {
                # ! [doc = "This module contains types related to the API class [`CurveTexture`][super::CurveTexture]."] pub (crate) mod private { # [doc = "`core class CurveTexture` inherits `Texture` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_curvetexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCurveTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CurveTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CurveTexture ; impl CurveTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CurveTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [`Curve`][Curve] that is rendered onto the texture."] # [doc = ""] # [inline] pub fn curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveTextureMethodTable :: get (get_api ()) . get_curve ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Curve`][Curve] that is rendered onto the texture."] # [doc = ""] # [inline] pub fn set_curve (& self , curve : impl AsArg < crate :: generated :: Curve >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveTextureMethodTable :: get (get_api ()) . set_curve ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , curve . as_arg_ptr ()) ; } } # [doc = "The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage."] # [doc = ""] # [inline] pub fn set_width (& self , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CurveTextureMethodTable :: get (get_api ()) . set_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , width as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CurveTexture { } unsafe impl GodotObject for CurveTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CurveTexture" } } impl std :: ops :: Deref for CurveTexture { type Target = crate :: generated :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CurveTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Texture > for CurveTexture { } unsafe impl SubClass < crate :: generated :: Resource > for CurveTexture { } unsafe impl SubClass < crate :: generated :: Reference > for CurveTexture { } unsafe impl SubClass < crate :: generated :: Object > for CurveTexture { } impl Instanciable for CurveTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CurveTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CurveTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_curve : * mut sys :: godot_method_bind , pub set_curve : * mut sys :: godot_method_bind , pub set_width : * mut sys :: godot_method_bind } impl CurveTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CurveTextureMethodTable = CurveTextureMethodTable { class_constructor : None , get_curve : 0 as * mut sys :: godot_method_bind , set_curve : 0 as * mut sys :: godot_method_bind , set_width : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CurveTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CurveTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_curve\0" . as_ptr () as * const c_char) ; table . set_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_curve\0" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::curve_texture::private::CurveTexture;
            
            pub(crate) mod cylinder_mesh {
                # ! [doc = "This module contains types related to the API class [`CylinderMesh`][super::CylinderMesh]."] pub (crate) mod private { # [doc = "`core class CylinderMesh` inherits `PrimitiveMesh` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_cylindermesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCylinderMesh inherits methods from:\n - [PrimitiveMesh](struct.PrimitiveMesh.html)\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CylinderMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CylinderMesh ; impl CylinderMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CylinderMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Bottom radius of the cylinder. If set to `0.0`, the bottom faces will not be generated, resulting in a conic shape."] # [doc = ""] # [inline] pub fn bottom_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderMeshMethodTable :: get (get_api ()) . get_bottom_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Full height of the cylinder."] # [doc = ""] # [inline] pub fn height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderMeshMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Number of radial segments on the cylinder. Higher values result in a more detailed cylinder/cone at the cost of performance."] # [doc = ""] # [inline] pub fn radial_segments (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderMeshMethodTable :: get (get_api ()) . get_radial_segments ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Number of edge rings along the height of the cylinder. Changing [`rings`][Self::rings] does not have any visual impact unless a shader or procedural mesh tool is used to alter the vertex data. Higher values result in more subdivisions, which can be used to create smoother-looking effects with shaders or procedural mesh tools (at the cost of performance). When not altering the vertex data using a shader or procedural mesh tool, [`rings`][Self::rings] should be kept to its default value."] # [doc = ""] # [inline] pub fn rings (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderMeshMethodTable :: get (get_api ()) . get_rings ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Top radius of the cylinder. If set to `0.0`, the top faces will not be generated, resulting in a conic shape."] # [doc = ""] # [inline] pub fn top_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderMeshMethodTable :: get (get_api ()) . get_top_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Bottom radius of the cylinder. If set to `0.0`, the bottom faces will not be generated, resulting in a conic shape."] # [doc = ""] # [inline] pub fn set_bottom_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderMeshMethodTable :: get (get_api ()) . set_bottom_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = "Full height of the cylinder."] # [doc = ""] # [inline] pub fn set_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderMeshMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = "Number of radial segments on the cylinder. Higher values result in a more detailed cylinder/cone at the cost of performance."] # [doc = ""] # [inline] pub fn set_radial_segments (& self , segments : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderMeshMethodTable :: get (get_api ()) . set_radial_segments ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , segments as _) ; } } # [doc = "Number of edge rings along the height of the cylinder. Changing [`rings`][Self::rings] does not have any visual impact unless a shader or procedural mesh tool is used to alter the vertex data. Higher values result in more subdivisions, which can be used to create smoother-looking effects with shaders or procedural mesh tools (at the cost of performance). When not altering the vertex data using a shader or procedural mesh tool, [`rings`][Self::rings] should be kept to its default value."] # [doc = ""] # [inline] pub fn set_rings (& self , rings : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderMeshMethodTable :: get (get_api ()) . set_rings ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , rings as _) ; } } # [doc = "Top radius of the cylinder. If set to `0.0`, the top faces will not be generated, resulting in a conic shape."] # [doc = ""] # [inline] pub fn set_top_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderMeshMethodTable :: get (get_api ()) . set_top_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CylinderMesh { } unsafe impl GodotObject for CylinderMesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CylinderMesh" } } impl std :: ops :: Deref for CylinderMesh { type Target = crate :: generated :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CylinderMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PrimitiveMesh > for CylinderMesh { } unsafe impl SubClass < crate :: generated :: Mesh > for CylinderMesh { } unsafe impl SubClass < crate :: generated :: Resource > for CylinderMesh { } unsafe impl SubClass < crate :: generated :: Reference > for CylinderMesh { } unsafe impl SubClass < crate :: generated :: Object > for CylinderMesh { } impl Instanciable for CylinderMesh { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CylinderMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CylinderMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bottom_radius : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_radial_segments : * mut sys :: godot_method_bind , pub get_rings : * mut sys :: godot_method_bind , pub get_top_radius : * mut sys :: godot_method_bind , pub set_bottom_radius : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_radial_segments : * mut sys :: godot_method_bind , pub set_rings : * mut sys :: godot_method_bind , pub set_top_radius : * mut sys :: godot_method_bind } impl CylinderMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CylinderMeshMethodTable = CylinderMeshMethodTable { class_constructor : None , get_bottom_radius : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_radial_segments : 0 as * mut sys :: godot_method_bind , get_rings : 0 as * mut sys :: godot_method_bind , get_top_radius : 0 as * mut sys :: godot_method_bind , set_bottom_radius : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_radial_segments : 0 as * mut sys :: godot_method_bind , set_rings : 0 as * mut sys :: godot_method_bind , set_top_radius : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CylinderMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CylinderMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bottom_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_bottom_radius\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_radial_segments\0" . as_ptr () as * const c_char) ; table . get_rings = (gd_api . godot_method_bind_get_method) (class_name , "get_rings\0" . as_ptr () as * const c_char) ; table . get_top_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_top_radius\0" . as_ptr () as * const c_char) ; table . set_bottom_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_bottom_radius\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "set_radial_segments\0" . as_ptr () as * const c_char) ; table . set_rings = (gd_api . godot_method_bind_get_method) (class_name , "set_rings\0" . as_ptr () as * const c_char) ; table . set_top_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_top_radius\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::cylinder_mesh::private::CylinderMesh;
            
            pub(crate) mod cylinder_shape {
                # ! [doc = "This module contains types related to the API class [`CylinderShape`][super::CylinderShape]."] pub (crate) mod private { # [doc = "`core class CylinderShape` inherits `Shape` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_cylindershape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nCylinderShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct CylinderShape { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: CylinderShape ; impl CylinderShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = CylinderShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The cylinder's height."] # [doc = ""] # [inline] pub fn height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderShapeMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The cylinder's radius."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderShapeMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The cylinder's height."] # [doc = ""] # [inline] pub fn set_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderShapeMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = "The cylinder's radius."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = CylinderShapeMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for CylinderShape { } unsafe impl GodotObject for CylinderShape { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "CylinderShape" } } impl std :: ops :: Deref for CylinderShape { type Target = crate :: generated :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for CylinderShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape > for CylinderShape { } unsafe impl SubClass < crate :: generated :: Resource > for CylinderShape { } unsafe impl SubClass < crate :: generated :: Reference > for CylinderShape { } unsafe impl SubClass < crate :: generated :: Object > for CylinderShape { } impl Instanciable for CylinderShape { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { CylinderShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct CylinderShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_height : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind } impl CylinderShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : CylinderShapeMethodTable = CylinderShapeMethodTable { class_constructor : None , get_height : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { CylinderShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "CylinderShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::cylinder_shape::private::CylinderShape;
            
            pub(crate) mod dtls_server {
                # ! [doc = "This module contains types related to the API class [`DTLSServer`][super::DTLSServer]."] pub (crate) mod private { # [doc = "`core class DTLSServer` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_dtlsserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nDTLSServer inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct DTLSServer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: DTLSServer ; impl DTLSServer { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = DTLSServerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Setup the DTLS server to use the given `private_key` and provide the given `certificate` to clients. You can pass the optional `chain` parameter to provide additional CA chain information along with the certificate.\n# Default Arguments\n* `chain` - `null`"] # [doc = ""] # [inline] pub fn setup (& self , key : impl AsArg < crate :: generated :: CryptoKey > , certificate : impl AsArg < crate :: generated :: X509Certificate > , chain : impl AsArg < crate :: generated :: X509Certificate >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DTLSServerMethodTable :: get (get_api ()) . setup ; let ret = crate :: icalls :: icallvar__obj_obj_obj (method_bind , self . this . sys () . as_ptr () , key . as_arg_ptr () , certificate . as_arg_ptr () , chain . as_arg_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Try to initiate the DTLS handshake with the given `udp_peer` which must be already connected (see [`PacketPeerUDP.connect_to_host`][PacketPeerUDP::connect_to_host]).\n**Note:** You must check that the state of the return PacketPeerUDP is [`PacketPeerDTLS.STATUS_HANDSHAKING`][PacketPeerDTLS::STATUS_HANDSHAKING], as it is normal that 50% of the new connections will be invalid due to cookie exchange."] # [doc = ""] # [inline] pub fn take_connection (& self , udp_peer : impl AsArg < crate :: generated :: PacketPeerUDP >) -> Option < Ref < crate :: generated :: PacketPeerDTLS , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = DTLSServerMethodTable :: get (get_api ()) . take_connection ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , udp_peer . as_arg_ptr ()) ; < Option < Ref < crate :: generated :: PacketPeerDTLS , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for DTLSServer { } unsafe impl GodotObject for DTLSServer { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "DTLSServer" } } impl std :: ops :: Deref for DTLSServer { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for DTLSServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for DTLSServer { } unsafe impl SubClass < crate :: generated :: Object > for DTLSServer { } impl Instanciable for DTLSServer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { DTLSServer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct DTLSServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub setup : * mut sys :: godot_method_bind , pub take_connection : * mut sys :: godot_method_bind } impl DTLSServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : DTLSServerMethodTable = DTLSServerMethodTable { class_constructor : None , setup : 0 as * mut sys :: godot_method_bind , take_connection : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { DTLSServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "DTLSServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . setup = (gd_api . godot_method_bind_get_method) (class_name , "setup\0" . as_ptr () as * const c_char) ; table . take_connection = (gd_api . godot_method_bind_get_method) (class_name , "take_connection\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::dtls_server::private::DTLSServer;
            
            pub(crate) mod damped_spring_joint_2d {
                # ! [doc = "This module contains types related to the API class [`DampedSpringJoint2D`][super::DampedSpringJoint2D]."] pub (crate) mod private { # [doc = "`core class DampedSpringJoint2D` inherits `Joint2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_dampedspringjoint2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`DampedSpringJoint2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<DampedSpringJoint2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nDampedSpringJoint2D inherits methods from:\n - [Joint2D](struct.Joint2D.html)\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct DampedSpringJoint2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: DampedSpringJoint2D ; impl DampedSpringJoint2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = DampedSpringJoint2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The spring joint's damping ratio. A value between `0` and `1`. When the two bodies move into different directions the system tries to align them to the spring axis again. A high `damping` value forces the attached bodies to align faster."] # [doc = ""] # [inline] pub fn damping (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DampedSpringJoint2DMethodTable :: get (get_api ()) . get_damping ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The spring joint's maximum length. The two attached bodies cannot stretch it past this value."] # [doc = ""] # [inline] pub fn length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DampedSpringJoint2DMethodTable :: get (get_api ()) . get_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "When the bodies attached to the spring joint move they stretch or squash it. The joint always tries to resize towards this length."] # [doc = ""] # [inline] pub fn rest_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DampedSpringJoint2DMethodTable :: get (get_api ()) . get_rest_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length."] # [doc = ""] # [inline] pub fn stiffness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DampedSpringJoint2DMethodTable :: get (get_api ()) . get_stiffness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The spring joint's damping ratio. A value between `0` and `1`. When the two bodies move into different directions the system tries to align them to the spring axis again. A high `damping` value forces the attached bodies to align faster."] # [doc = ""] # [inline] pub fn set_damping (& self , damping : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DampedSpringJoint2DMethodTable :: get (get_api ()) . set_damping ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , damping as _) ; } } # [doc = "The spring joint's maximum length. The two attached bodies cannot stretch it past this value."] # [doc = ""] # [inline] pub fn set_length (& self , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DampedSpringJoint2DMethodTable :: get (get_api ()) . set_length ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , length as _) ; } } # [doc = "When the bodies attached to the spring joint move they stretch or squash it. The joint always tries to resize towards this length."] # [doc = ""] # [inline] pub fn set_rest_length (& self , rest_length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DampedSpringJoint2DMethodTable :: get (get_api ()) . set_rest_length ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , rest_length as _) ; } } # [doc = "The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length."] # [doc = ""] # [inline] pub fn set_stiffness (& self , stiffness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DampedSpringJoint2DMethodTable :: get (get_api ()) . set_stiffness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , stiffness as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for DampedSpringJoint2D { } unsafe impl GodotObject for DampedSpringJoint2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "DampedSpringJoint2D" } } impl QueueFree for DampedSpringJoint2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for DampedSpringJoint2D { type Target = crate :: generated :: Joint2D ; # [inline] fn deref (& self) -> & crate :: generated :: Joint2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for DampedSpringJoint2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Joint2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Joint2D > for DampedSpringJoint2D { } unsafe impl SubClass < crate :: generated :: Node2D > for DampedSpringJoint2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for DampedSpringJoint2D { } unsafe impl SubClass < crate :: generated :: Node > for DampedSpringJoint2D { } unsafe impl SubClass < crate :: generated :: Object > for DampedSpringJoint2D { } impl Instanciable for DampedSpringJoint2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { DampedSpringJoint2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct DampedSpringJoint2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_damping : * mut sys :: godot_method_bind , pub get_length : * mut sys :: godot_method_bind , pub get_rest_length : * mut sys :: godot_method_bind , pub get_stiffness : * mut sys :: godot_method_bind , pub set_damping : * mut sys :: godot_method_bind , pub set_length : * mut sys :: godot_method_bind , pub set_rest_length : * mut sys :: godot_method_bind , pub set_stiffness : * mut sys :: godot_method_bind } impl DampedSpringJoint2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : DampedSpringJoint2DMethodTable = DampedSpringJoint2DMethodTable { class_constructor : None , get_damping : 0 as * mut sys :: godot_method_bind , get_length : 0 as * mut sys :: godot_method_bind , get_rest_length : 0 as * mut sys :: godot_method_bind , get_stiffness : 0 as * mut sys :: godot_method_bind , set_damping : 0 as * mut sys :: godot_method_bind , set_length : 0 as * mut sys :: godot_method_bind , set_rest_length : 0 as * mut sys :: godot_method_bind , set_stiffness : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { DampedSpringJoint2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "DampedSpringJoint2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_damping = (gd_api . godot_method_bind_get_method) (class_name , "get_damping\0" . as_ptr () as * const c_char) ; table . get_length = (gd_api . godot_method_bind_get_method) (class_name , "get_length\0" . as_ptr () as * const c_char) ; table . get_rest_length = (gd_api . godot_method_bind_get_method) (class_name , "get_rest_length\0" . as_ptr () as * const c_char) ; table . get_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "get_stiffness\0" . as_ptr () as * const c_char) ; table . set_damping = (gd_api . godot_method_bind_get_method) (class_name , "set_damping\0" . as_ptr () as * const c_char) ; table . set_length = (gd_api . godot_method_bind_get_method) (class_name , "set_length\0" . as_ptr () as * const c_char) ; table . set_rest_length = (gd_api . godot_method_bind_get_method) (class_name , "set_rest_length\0" . as_ptr () as * const c_char) ; table . set_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "set_stiffness\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::damped_spring_joint_2d::private::DampedSpringJoint2D;
            
            pub mod directional_light {
                # ! [doc = "This module contains types related to the API class [`DirectionalLight`][super::DirectionalLight]."] pub (crate) mod private { # [doc = "`core class DirectionalLight` inherits `Light` (manually managed).\n\nThis class has related types in the [`directional_light`][super::directional_light] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_directionallight.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`DirectionalLight` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<DirectionalLight>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nDirectionalLight inherits methods from:\n - [Light](struct.Light.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct DirectionalLight { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: DirectionalLight ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShadowDepthRange (pub i64) ; impl ShadowDepthRange { pub const STABLE : ShadowDepthRange = ShadowDepthRange (0i64) ; pub const OPTIMIZED : ShadowDepthRange = ShadowDepthRange (1i64) ; } impl From < i64 > for ShadowDepthRange { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShadowDepthRange > for i64 { # [inline] fn from (v : ShadowDepthRange) -> Self { v . 0 } } impl FromVariant for ShadowDepthRange { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShadowMode (pub i64) ; impl ShadowMode { pub const ORTHOGONAL : ShadowMode = ShadowMode (0i64) ; pub const PARALLEL_2_SPLITS : ShadowMode = ShadowMode (1i64) ; pub const PARALLEL_4_SPLITS : ShadowMode = ShadowMode (2i64) ; } impl From < i64 > for ShadowMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShadowMode > for i64 { # [inline] fn from (v : ShadowMode) -> Self { v . 0 } } impl FromVariant for ShadowMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl DirectionalLight { pub const SHADOW_DEPTH_RANGE_STABLE : i64 = 0i64 ; pub const SHADOW_ORTHOGONAL : i64 = 0i64 ; pub const SHADOW_DEPTH_RANGE_OPTIMIZED : i64 = 1i64 ; pub const SHADOW_PARALLEL_2_SPLITS : i64 = 1i64 ; pub const SHADOW_PARALLEL_4_SPLITS : i64 = 2i64 ; } impl DirectionalLight { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = DirectionalLightMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Optimizes shadow rendering for detail versus movement. See [`ShadowDepthRange`][ShadowDepthRange]."] # [doc = ""] # [inline] pub fn shadow_depth_range (& self) -> crate :: generated :: directional_light :: ShadowDepthRange { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectionalLightMethodTable :: get (get_api ()) . get_shadow_depth_range ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: directional_light :: ShadowDepthRange > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The light's shadow rendering algorithm. See [`ShadowMode`][ShadowMode]."] # [doc = ""] # [inline] pub fn shadow_mode (& self) -> crate :: generated :: directional_light :: ShadowMode { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectionalLightMethodTable :: get (get_api ()) . get_shadow_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: directional_light :: ShadowMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, shadow detail is sacrificed in exchange for smoother transitions between splits. Enabling shadow blend splitting also has a moderate performance cost. This is ignored when [`directional_shadow_mode`][Self::directional_shadow_mode] is [`SHADOW_ORTHOGONAL`][Self::SHADOW_ORTHOGONAL]."] # [doc = ""] # [inline] pub fn is_blend_splits_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectionalLightMethodTable :: get (get_api ()) . is_blend_splits_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, shadow detail is sacrificed in exchange for smoother transitions between splits. Enabling shadow blend splitting also has a moderate performance cost. This is ignored when [`directional_shadow_mode`][Self::directional_shadow_mode] is [`SHADOW_ORTHOGONAL`][Self::SHADOW_ORTHOGONAL]."] # [doc = ""] # [inline] pub fn set_blend_splits (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectionalLightMethodTable :: get (get_api ()) . set_blend_splits ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Optimizes shadow rendering for detail versus movement. See [`ShadowDepthRange`][ShadowDepthRange]."] # [doc = ""] # [inline] pub fn set_shadow_depth_range (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectionalLightMethodTable :: get (get_api ()) . set_shadow_depth_range ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The light's shadow rendering algorithm. See [`ShadowMode`][ShadowMode]."] # [doc = ""] # [inline] pub fn set_shadow_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectionalLightMethodTable :: get (get_api ()) . set_shadow_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for DirectionalLight { } unsafe impl GodotObject for DirectionalLight { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "DirectionalLight" } } impl QueueFree for DirectionalLight { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for DirectionalLight { type Target = crate :: generated :: Light ; # [inline] fn deref (& self) -> & crate :: generated :: Light { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for DirectionalLight { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Light { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Light > for DirectionalLight { } unsafe impl SubClass < crate :: generated :: VisualInstance > for DirectionalLight { } unsafe impl SubClass < crate :: generated :: CullInstance > for DirectionalLight { } unsafe impl SubClass < crate :: generated :: Spatial > for DirectionalLight { } unsafe impl SubClass < crate :: generated :: Node > for DirectionalLight { } unsafe impl SubClass < crate :: generated :: Object > for DirectionalLight { } impl Instanciable for DirectionalLight { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { DirectionalLight :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct DirectionalLightMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_shadow_depth_range : * mut sys :: godot_method_bind , pub get_shadow_mode : * mut sys :: godot_method_bind , pub is_blend_splits_enabled : * mut sys :: godot_method_bind , pub set_blend_splits : * mut sys :: godot_method_bind , pub set_shadow_depth_range : * mut sys :: godot_method_bind , pub set_shadow_mode : * mut sys :: godot_method_bind } impl DirectionalLightMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : DirectionalLightMethodTable = DirectionalLightMethodTable { class_constructor : None , get_shadow_depth_range : 0 as * mut sys :: godot_method_bind , get_shadow_mode : 0 as * mut sys :: godot_method_bind , is_blend_splits_enabled : 0 as * mut sys :: godot_method_bind , set_blend_splits : 0 as * mut sys :: godot_method_bind , set_shadow_depth_range : 0 as * mut sys :: godot_method_bind , set_shadow_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { DirectionalLightMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "DirectionalLight\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_shadow_depth_range = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_depth_range\0" . as_ptr () as * const c_char) ; table . get_shadow_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_mode\0" . as_ptr () as * const c_char) ; table . is_blend_splits_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_blend_splits_enabled\0" . as_ptr () as * const c_char) ; table . set_blend_splits = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_splits\0" . as_ptr () as * const c_char) ; table . set_shadow_depth_range = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_depth_range\0" . as_ptr () as * const c_char) ; table . set_shadow_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::directional_light::private::DirectionalLight;
            
            pub mod dynamic_font {
                # ! [doc = "This module contains types related to the API class [`DynamicFont`][super::DynamicFont]."] pub (crate) mod private { # [doc = "`core class DynamicFont` inherits `Font` (reference-counted).\n\nThis class has related types in the [`dynamic_font`][super::dynamic_font] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_dynamicfont.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nDynamicFont inherits methods from:\n - [Font](struct.Font.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct DynamicFont { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: DynamicFont ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SpacingType (pub i64) ; impl SpacingType { pub const TOP : SpacingType = SpacingType (0i64) ; pub const BOTTOM : SpacingType = SpacingType (1i64) ; pub const CHAR : SpacingType = SpacingType (2i64) ; pub const SPACE : SpacingType = SpacingType (3i64) ; } impl From < i64 > for SpacingType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SpacingType > for i64 { # [inline] fn from (v : SpacingType) -> Self { v . 0 } } impl FromVariant for SpacingType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl DynamicFont { pub const SPACING_TOP : i64 = 0i64 ; pub const SPACING_BOTTOM : i64 = 1i64 ; pub const SPACING_CHAR : i64 = 2i64 ; pub const SPACING_SPACE : i64 = 3i64 ; } impl DynamicFont { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = DynamicFontMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a fallback font."] # [doc = ""] # [inline] pub fn add_fallback (& self , data : impl AsArg < crate :: generated :: DynamicFontData >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . add_fallback ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , data . as_arg_ptr ()) ; } } # [doc = "Returns a string containing all the characters available in the main and all the fallback fonts.\nIf a given character is included in more than one font, it appears only once in the returned string."] # [doc = ""] # [inline] pub fn get_available_chars (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_available_chars ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the fallback font at index `idx`."] # [doc = ""] # [inline] pub fn get_fallback (& self , idx : i64) -> Option < Ref < crate :: generated :: DynamicFontData , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_fallback ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: DynamicFontData , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of fallback fonts."] # [doc = ""] # [inline] pub fn get_fallback_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_fallback_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The font data."] # [doc = ""] # [inline] pub fn font_data (& self) -> Option < Ref < crate :: generated :: DynamicFontData , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_font_data ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: DynamicFontData , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The font outline's color.\n**Note:** It's recommended to leave this at the default value so that you can adjust it in individual controls. For example, if the outline is made black here, it won't be possible to change its color using a Label's font outline modulate theme item."] # [doc = ""] # [inline] pub fn outline_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_outline_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The font outline's thickness in pixels (not relative to the font size)."] # [doc = ""] # [inline] pub fn outline_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_outline_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The font size in pixels."] # [doc = ""] # [inline] pub fn size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the spacing for the given `type` (see [`SpacingType`][SpacingType])."] # [doc = ""] # [inline] pub fn spacing (& self , type_ : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_spacing ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, filtering is used. This makes the font blurry instead of pixelated when scaling it if font oversampling is disabled or ineffective. It's recommended to enable this when using the font in a control whose size changes over time, unless a pixel art aesthetic is desired."] # [doc = ""] # [inline] pub fn use_filter (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_use_filter ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, mipmapping is used. This improves the font's appearance when downscaling it if font oversampling is disabled or ineffective."] # [doc = ""] # [inline] pub fn use_mipmaps (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_use_mipmaps ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes the fallback font at index `idx`."] # [doc = ""] # [inline] pub fn remove_fallback (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . remove_fallback ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; } } # [doc = "Sets the fallback font at index `idx`."] # [doc = ""] # [inline] pub fn set_fallback (& self , idx : i64 , data : impl AsArg < crate :: generated :: DynamicFontData >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . set_fallback ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , idx as _ , data . as_arg_ptr ()) ; } } # [doc = "The font data."] # [doc = ""] # [inline] pub fn set_font_data (& self , data : impl AsArg < crate :: generated :: DynamicFontData >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . set_font_data ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , data . as_arg_ptr ()) ; } } # [doc = "The font outline's color.\n**Note:** It's recommended to leave this at the default value so that you can adjust it in individual controls. For example, if the outline is made black here, it won't be possible to change its color using a Label's font outline modulate theme item."] # [doc = ""] # [inline] pub fn set_outline_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . set_outline_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The font outline's thickness in pixels (not relative to the font size)."] # [doc = ""] # [inline] pub fn set_outline_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . set_outline_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } # [doc = "The font size in pixels."] # [doc = ""] # [inline] pub fn set_size (& self , data : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , data as _) ; } } # [doc = "Sets the spacing for `type` (see [`SpacingType`][SpacingType]) to `value` in pixels (not relative to the font size)."] # [doc = ""] # [inline] pub fn set_spacing (& self , type_ : i64 , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . set_spacing ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , type_ as _ , value as _) ; } } # [doc = "If `true`, filtering is used. This makes the font blurry instead of pixelated when scaling it if font oversampling is disabled or ineffective. It's recommended to enable this when using the font in a control whose size changes over time, unless a pixel art aesthetic is desired."] # [doc = ""] # [inline] pub fn set_use_filter (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . set_use_filter ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, mipmapping is used. This improves the font's appearance when downscaling it if font oversampling is disabled or ineffective."] # [doc = ""] # [inline] pub fn set_use_mipmaps (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . set_use_mipmaps ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Extra spacing at the bottom in pixels."] # [doc = ""] # [inline] pub fn extra_spacing_bottom (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_spacing ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Extra spacing at the bottom in pixels."] # [doc = ""] # [inline] pub fn set_extra_spacing_bottom (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . set_spacing ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Extra spacing for each character in pixels.\nThis can be a negative number to make the distance between characters smaller."] # [doc = ""] # [inline] pub fn extra_spacing_char (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_spacing ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Extra spacing for each character in pixels.\nThis can be a negative number to make the distance between characters smaller."] # [doc = ""] # [inline] pub fn set_extra_spacing_char (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . set_spacing ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Extra spacing for the space character (in addition to [`extra_spacing_char`][Self::extra_spacing_char]) in pixels.\nThis can be a negative number to make the distance between words smaller."] # [doc = ""] # [inline] pub fn extra_spacing_space (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_spacing ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Extra spacing for the space character (in addition to [`extra_spacing_char`][Self::extra_spacing_char]) in pixels.\nThis can be a negative number to make the distance between words smaller."] # [doc = ""] # [inline] pub fn set_extra_spacing_space (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . set_spacing ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Extra spacing at the top in pixels."] # [doc = ""] # [inline] pub fn extra_spacing_top (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . get_spacing ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Extra spacing at the top in pixels."] # [doc = ""] # [inline] pub fn set_extra_spacing_top (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontMethodTable :: get (get_api ()) . set_spacing ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for DynamicFont { } unsafe impl GodotObject for DynamicFont { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "DynamicFont" } } impl std :: ops :: Deref for DynamicFont { type Target = crate :: generated :: Font ; # [inline] fn deref (& self) -> & crate :: generated :: Font { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for DynamicFont { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Font { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Font > for DynamicFont { } unsafe impl SubClass < crate :: generated :: Resource > for DynamicFont { } unsafe impl SubClass < crate :: generated :: Reference > for DynamicFont { } unsafe impl SubClass < crate :: generated :: Object > for DynamicFont { } impl Instanciable for DynamicFont { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { DynamicFont :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct DynamicFontMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_fallback : * mut sys :: godot_method_bind , pub get_available_chars : * mut sys :: godot_method_bind , pub get_fallback : * mut sys :: godot_method_bind , pub get_fallback_count : * mut sys :: godot_method_bind , pub get_font_data : * mut sys :: godot_method_bind , pub get_outline_color : * mut sys :: godot_method_bind , pub get_outline_size : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_spacing : * mut sys :: godot_method_bind , pub get_use_filter : * mut sys :: godot_method_bind , pub get_use_mipmaps : * mut sys :: godot_method_bind , pub remove_fallback : * mut sys :: godot_method_bind , pub set_fallback : * mut sys :: godot_method_bind , pub set_font_data : * mut sys :: godot_method_bind , pub set_outline_color : * mut sys :: godot_method_bind , pub set_outline_size : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind , pub set_spacing : * mut sys :: godot_method_bind , pub set_use_filter : * mut sys :: godot_method_bind , pub set_use_mipmaps : * mut sys :: godot_method_bind } impl DynamicFontMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : DynamicFontMethodTable = DynamicFontMethodTable { class_constructor : None , add_fallback : 0 as * mut sys :: godot_method_bind , get_available_chars : 0 as * mut sys :: godot_method_bind , get_fallback : 0 as * mut sys :: godot_method_bind , get_fallback_count : 0 as * mut sys :: godot_method_bind , get_font_data : 0 as * mut sys :: godot_method_bind , get_outline_color : 0 as * mut sys :: godot_method_bind , get_outline_size : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_spacing : 0 as * mut sys :: godot_method_bind , get_use_filter : 0 as * mut sys :: godot_method_bind , get_use_mipmaps : 0 as * mut sys :: godot_method_bind , remove_fallback : 0 as * mut sys :: godot_method_bind , set_fallback : 0 as * mut sys :: godot_method_bind , set_font_data : 0 as * mut sys :: godot_method_bind , set_outline_color : 0 as * mut sys :: godot_method_bind , set_outline_size : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind , set_spacing : 0 as * mut sys :: godot_method_bind , set_use_filter : 0 as * mut sys :: godot_method_bind , set_use_mipmaps : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { DynamicFontMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "DynamicFont\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_fallback = (gd_api . godot_method_bind_get_method) (class_name , "add_fallback\0" . as_ptr () as * const c_char) ; table . get_available_chars = (gd_api . godot_method_bind_get_method) (class_name , "get_available_chars\0" . as_ptr () as * const c_char) ; table . get_fallback = (gd_api . godot_method_bind_get_method) (class_name , "get_fallback\0" . as_ptr () as * const c_char) ; table . get_fallback_count = (gd_api . godot_method_bind_get_method) (class_name , "get_fallback_count\0" . as_ptr () as * const c_char) ; table . get_font_data = (gd_api . godot_method_bind_get_method) (class_name , "get_font_data\0" . as_ptr () as * const c_char) ; table . get_outline_color = (gd_api . godot_method_bind_get_method) (class_name , "get_outline_color\0" . as_ptr () as * const c_char) ; table . get_outline_size = (gd_api . godot_method_bind_get_method) (class_name , "get_outline_size\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_spacing = (gd_api . godot_method_bind_get_method) (class_name , "get_spacing\0" . as_ptr () as * const c_char) ; table . get_use_filter = (gd_api . godot_method_bind_get_method) (class_name , "get_use_filter\0" . as_ptr () as * const c_char) ; table . get_use_mipmaps = (gd_api . godot_method_bind_get_method) (class_name , "get_use_mipmaps\0" . as_ptr () as * const c_char) ; table . remove_fallback = (gd_api . godot_method_bind_get_method) (class_name , "remove_fallback\0" . as_ptr () as * const c_char) ; table . set_fallback = (gd_api . godot_method_bind_get_method) (class_name , "set_fallback\0" . as_ptr () as * const c_char) ; table . set_font_data = (gd_api . godot_method_bind_get_method) (class_name , "set_font_data\0" . as_ptr () as * const c_char) ; table . set_outline_color = (gd_api . godot_method_bind_get_method) (class_name , "set_outline_color\0" . as_ptr () as * const c_char) ; table . set_outline_size = (gd_api . godot_method_bind_get_method) (class_name , "set_outline_size\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; table . set_spacing = (gd_api . godot_method_bind_get_method) (class_name , "set_spacing\0" . as_ptr () as * const c_char) ; table . set_use_filter = (gd_api . godot_method_bind_get_method) (class_name , "set_use_filter\0" . as_ptr () as * const c_char) ; table . set_use_mipmaps = (gd_api . godot_method_bind_get_method) (class_name , "set_use_mipmaps\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::dynamic_font::private::DynamicFont;
            
            pub mod dynamic_font_data {
                # ! [doc = "This module contains types related to the API class [`DynamicFontData`][super::DynamicFontData]."] pub (crate) mod private { # [doc = "`core class DynamicFontData` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`dynamic_font_data`][super::dynamic_font_data] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_dynamicfontdata.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nDynamicFontData inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct DynamicFontData { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: DynamicFontData ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Hinting (pub i64) ; impl Hinting { pub const NONE : Hinting = Hinting (0i64) ; pub const LIGHT : Hinting = Hinting (1i64) ; pub const NORMAL : Hinting = Hinting (2i64) ; } impl From < i64 > for Hinting { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Hinting > for i64 { # [inline] fn from (v : Hinting) -> Self { v . 0 } } impl FromVariant for Hinting { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl DynamicFontData { pub const HINTING_NONE : i64 = 0i64 ; pub const HINTING_LIGHT : i64 = 1i64 ; pub const HINTING_NORMAL : i64 = 2i64 ; } impl DynamicFontData { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = DynamicFontDataMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The path to the vector font file."] # [doc = ""] # [inline] pub fn font_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontDataMethodTable :: get (get_api ()) . get_font_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The font hinting mode used by FreeType. See [`Hinting`][Hinting] for options."] # [doc = ""] # [inline] pub fn hinting (& self) -> crate :: generated :: dynamic_font_data :: Hinting { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontDataMethodTable :: get (get_api ()) . get_hinting ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: dynamic_font_data :: Hinting > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If set to a value greater than `0.0`, it will override default font oversampling, ignoring [`SceneTree.use_font_oversampling`][SceneTree::use_font_oversampling] value and viewport stretch mode."] # [doc = ""] # [inline] pub fn override_oversampling (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontDataMethodTable :: get (get_api ()) . get_override_oversampling ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the font is rendered with anti-aliasing. This property applies both to the main font and its outline (if it has one)."] # [doc = ""] # [inline] pub fn is_antialiased (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontDataMethodTable :: get (get_api ()) . is_antialiased ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the font is rendered with anti-aliasing. This property applies both to the main font and its outline (if it has one)."] # [doc = ""] # [inline] pub fn set_antialiased (& self , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontDataMethodTable :: get (get_api ()) . set_antialiased ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , antialiased as _) ; } } # [doc = "The path to the vector font file."] # [doc = ""] # [inline] pub fn set_font_path (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontDataMethodTable :: get (get_api ()) . set_font_path ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "The font hinting mode used by FreeType. See [`Hinting`][Hinting] for options."] # [doc = ""] # [inline] pub fn set_hinting (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontDataMethodTable :: get (get_api ()) . set_hinting ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "If set to a value greater than `0.0`, it will override default font oversampling, ignoring [`SceneTree.use_font_oversampling`][SceneTree::use_font_oversampling] value and viewport stretch mode."] # [doc = ""] # [inline] pub fn set_override_oversampling (& self , oversampling : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DynamicFontDataMethodTable :: get (get_api ()) . set_override_oversampling ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , oversampling as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for DynamicFontData { } unsafe impl GodotObject for DynamicFontData { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "DynamicFontData" } } impl std :: ops :: Deref for DynamicFontData { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for DynamicFontData { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for DynamicFontData { } unsafe impl SubClass < crate :: generated :: Reference > for DynamicFontData { } unsafe impl SubClass < crate :: generated :: Object > for DynamicFontData { } impl Instanciable for DynamicFontData { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { DynamicFontData :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct DynamicFontDataMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_font_path : * mut sys :: godot_method_bind , pub get_hinting : * mut sys :: godot_method_bind , pub get_override_oversampling : * mut sys :: godot_method_bind , pub is_antialiased : * mut sys :: godot_method_bind , pub set_antialiased : * mut sys :: godot_method_bind , pub set_font_path : * mut sys :: godot_method_bind , pub set_hinting : * mut sys :: godot_method_bind , pub set_override_oversampling : * mut sys :: godot_method_bind } impl DynamicFontDataMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : DynamicFontDataMethodTable = DynamicFontDataMethodTable { class_constructor : None , get_font_path : 0 as * mut sys :: godot_method_bind , get_hinting : 0 as * mut sys :: godot_method_bind , get_override_oversampling : 0 as * mut sys :: godot_method_bind , is_antialiased : 0 as * mut sys :: godot_method_bind , set_antialiased : 0 as * mut sys :: godot_method_bind , set_font_path : 0 as * mut sys :: godot_method_bind , set_hinting : 0 as * mut sys :: godot_method_bind , set_override_oversampling : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { DynamicFontDataMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "DynamicFontData\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_font_path = (gd_api . godot_method_bind_get_method) (class_name , "get_font_path\0" . as_ptr () as * const c_char) ; table . get_hinting = (gd_api . godot_method_bind_get_method) (class_name , "get_hinting\0" . as_ptr () as * const c_char) ; table . get_override_oversampling = (gd_api . godot_method_bind_get_method) (class_name , "get_override_oversampling\0" . as_ptr () as * const c_char) ; table . is_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "is_antialiased\0" . as_ptr () as * const c_char) ; table . set_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "set_antialiased\0" . as_ptr () as * const c_char) ; table . set_font_path = (gd_api . godot_method_bind_get_method) (class_name , "set_font_path\0" . as_ptr () as * const c_char) ; table . set_hinting = (gd_api . godot_method_bind_get_method) (class_name , "set_hinting\0" . as_ptr () as * const c_char) ; table . set_override_oversampling = (gd_api . godot_method_bind_get_method) (class_name , "set_override_oversampling\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::dynamic_font_data::private::DynamicFontData;
            
            pub(crate) mod editor_export_plugin {
                # ! [doc = "This module contains types related to the API class [`EditorExportPlugin`][super::EditorExportPlugin]."] pub (crate) mod private { # [doc = "`tools class EditorExportPlugin` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorexportplugin.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorExportPlugin inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorExportPlugin { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorExportPlugin ; impl EditorExportPlugin { # [doc = "Adds a custom file to be exported. `path` is the virtual path that can be used to load the file, `file` is the binary data of the file. If `remap` is `true`, file will not be exported, but instead remapped to the given `path`."] # [doc = ""] # [inline] pub fn add_file (& self , path : impl Into < GodotString > , file : PoolArray < u8 > , remap : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_file ; let ret = crate :: icalls :: icallvar__str_bytearr_bool (method_bind , self . this . sys () . as_ptr () , path . into () , file , remap as _) ; } } # [doc = "Adds an iOS bundle file from the given `path` to the exported project."] # [doc = ""] # [inline] pub fn add_ios_bundle_file (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_ios_bundle_file ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "Adds a C++ code to the iOS export. The final code is created from the code appended by each active export plugin."] # [doc = ""] # [inline] pub fn add_ios_cpp_code (& self , code : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_ios_cpp_code ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , code . into ()) ; } } # [doc = "Adds a dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary.\n**Note:** For static libraries (*.a) works in same way as [`add_ios_framework`][Self::add_ios_framework].\nThis method should not be used for System libraries as they are already present on the device."] # [doc = ""] # [inline] pub fn add_ios_embedded_framework (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_ios_embedded_framework ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "Adds a static library (*.a) or dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project."] # [doc = ""] # [inline] pub fn add_ios_framework (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_ios_framework ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "Adds linker flags for the iOS export."] # [doc = ""] # [inline] pub fn add_ios_linker_flags (& self , flags : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_ios_linker_flags ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , flags . into ()) ; } } # [doc = "Adds content for iOS Property List files."] # [doc = ""] # [inline] pub fn add_ios_plist_content (& self , plist_content : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_ios_plist_content ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , plist_content . into ()) ; } } # [doc = "Adds a static lib from the given `path` to the iOS project."] # [doc = ""] # [inline] pub fn add_ios_project_static_lib (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_ios_project_static_lib ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "Adds file or directory matching `path` to `PlugIns` directory of macOS app bundle.\n**Note:** This is useful only for macOS exports."] # [doc = ""] # [inline] pub fn add_osx_plugin_file (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_osx_plugin_file ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "Adds a shared object or a directory containing only shared objects with the given `tags` and destination `path`.\n**Note:** In case of macOS exports, those shared objects will be added to `Frameworks` directory of app bundle.\nIn case of a directory code-sign will error if you place non code object in directory."] # [doc = ""] # [inline] pub fn add_shared_object (& self , path : impl Into < GodotString > , tags : PoolArray < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . add_shared_object ; let ret = crate :: icalls :: icallvar__str_strarr (method_bind , self . this . sys () . as_ptr () , path . into () , tags) ; } } # [doc = "To be called inside [`_export_file`][Self::_export_file]. Skips the current file, so it's not included in the export."] # [doc = ""] # [inline] pub fn skip (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorExportPluginMethodTable :: get (get_api ()) . skip ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorExportPlugin { } unsafe impl GodotObject for EditorExportPlugin { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorExportPlugin" } } impl std :: ops :: Deref for EditorExportPlugin { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorExportPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for EditorExportPlugin { } unsafe impl SubClass < crate :: generated :: Object > for EditorExportPlugin { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorExportPluginMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_file : * mut sys :: godot_method_bind , pub add_ios_bundle_file : * mut sys :: godot_method_bind , pub add_ios_cpp_code : * mut sys :: godot_method_bind , pub add_ios_embedded_framework : * mut sys :: godot_method_bind , pub add_ios_framework : * mut sys :: godot_method_bind , pub add_ios_linker_flags : * mut sys :: godot_method_bind , pub add_ios_plist_content : * mut sys :: godot_method_bind , pub add_ios_project_static_lib : * mut sys :: godot_method_bind , pub add_osx_plugin_file : * mut sys :: godot_method_bind , pub add_shared_object : * mut sys :: godot_method_bind , pub skip : * mut sys :: godot_method_bind } impl EditorExportPluginMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorExportPluginMethodTable = EditorExportPluginMethodTable { class_constructor : None , add_file : 0 as * mut sys :: godot_method_bind , add_ios_bundle_file : 0 as * mut sys :: godot_method_bind , add_ios_cpp_code : 0 as * mut sys :: godot_method_bind , add_ios_embedded_framework : 0 as * mut sys :: godot_method_bind , add_ios_framework : 0 as * mut sys :: godot_method_bind , add_ios_linker_flags : 0 as * mut sys :: godot_method_bind , add_ios_plist_content : 0 as * mut sys :: godot_method_bind , add_ios_project_static_lib : 0 as * mut sys :: godot_method_bind , add_osx_plugin_file : 0 as * mut sys :: godot_method_bind , add_shared_object : 0 as * mut sys :: godot_method_bind , skip : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorExportPluginMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorExportPlugin\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_file = (gd_api . godot_method_bind_get_method) (class_name , "add_file\0" . as_ptr () as * const c_char) ; table . add_ios_bundle_file = (gd_api . godot_method_bind_get_method) (class_name , "add_ios_bundle_file\0" . as_ptr () as * const c_char) ; table . add_ios_cpp_code = (gd_api . godot_method_bind_get_method) (class_name , "add_ios_cpp_code\0" . as_ptr () as * const c_char) ; table . add_ios_embedded_framework = (gd_api . godot_method_bind_get_method) (class_name , "add_ios_embedded_framework\0" . as_ptr () as * const c_char) ; table . add_ios_framework = (gd_api . godot_method_bind_get_method) (class_name , "add_ios_framework\0" . as_ptr () as * const c_char) ; table . add_ios_linker_flags = (gd_api . godot_method_bind_get_method) (class_name , "add_ios_linker_flags\0" . as_ptr () as * const c_char) ; table . add_ios_plist_content = (gd_api . godot_method_bind_get_method) (class_name , "add_ios_plist_content\0" . as_ptr () as * const c_char) ; table . add_ios_project_static_lib = (gd_api . godot_method_bind_get_method) (class_name , "add_ios_project_static_lib\0" . as_ptr () as * const c_char) ; table . add_osx_plugin_file = (gd_api . godot_method_bind_get_method) (class_name , "add_osx_plugin_file\0" . as_ptr () as * const c_char) ; table . add_shared_object = (gd_api . godot_method_bind_get_method) (class_name , "add_shared_object\0" . as_ptr () as * const c_char) ; table . skip = (gd_api . godot_method_bind_get_method) (class_name , "skip\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_export_plugin::private::EditorExportPlugin;
            
            pub mod editor_feature_profile {
                # ! [doc = "This module contains types related to the API class [`EditorFeatureProfile`][super::EditorFeatureProfile]."] pub (crate) mod private { # [doc = "`tools class EditorFeatureProfile` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`editor_feature_profile`][super::editor_feature_profile] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorfeatureprofile.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorFeatureProfile inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorFeatureProfile { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorFeatureProfile ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Feature (pub i64) ; impl Feature { pub const _3D : Feature = Feature (0i64) ; pub const SCRIPT : Feature = Feature (1i64) ; pub const ASSET_LIB : Feature = Feature (2i64) ; pub const SCENE_TREE : Feature = Feature (3i64) ; pub const NODE_DOCK : Feature = Feature (4i64) ; pub const FILESYSTEM_DOCK : Feature = Feature (5i64) ; pub const IMPORT_DOCK : Feature = Feature (6i64) ; pub const MAX : Feature = Feature (7i64) ; } impl From < i64 > for Feature { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Feature > for i64 { # [inline] fn from (v : Feature) -> Self { v . 0 } } impl FromVariant for Feature { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl EditorFeatureProfile { pub const FEATURE_3D : i64 = 0i64 ; pub const FEATURE_SCRIPT : i64 = 1i64 ; pub const FEATURE_ASSET_LIB : i64 = 2i64 ; pub const FEATURE_SCENE_TREE : i64 = 3i64 ; pub const FEATURE_NODE_DOCK : i64 = 4i64 ; pub const FEATURE_FILESYSTEM_DOCK : i64 = 5i64 ; pub const FEATURE_IMPORT_DOCK : i64 = 6i64 ; pub const FEATURE_MAX : i64 = 7i64 ; } impl EditorFeatureProfile { # [doc = "Returns the specified `feature`'s human-readable name."] # [doc = ""] # [inline] pub fn get_feature_name (& self , feature : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFeatureProfileMethodTable :: get (get_api ()) . get_feature_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , feature as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the class specified by `class_name` is disabled. When disabled, the class won't appear in the Create New Node dialog."] # [doc = ""] # [inline] pub fn is_class_disabled (& self , class_name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFeatureProfileMethodTable :: get (get_api ()) . is_class_disabled ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , class_name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if editing for the class specified by `class_name` is disabled. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class."] # [doc = ""] # [inline] pub fn is_class_editor_disabled (& self , class_name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFeatureProfileMethodTable :: get (get_api ()) . is_class_editor_disabled ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , class_name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if `property` is disabled in the class specified by `class_name`. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by `class_name`."] # [doc = ""] # [inline] pub fn is_class_property_disabled (& self , class_name : impl Into < GodotString > , property : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFeatureProfileMethodTable :: get (get_api ()) . is_class_property_disabled ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , class_name . into () , property . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the `feature` is disabled. When a feature is disabled, it will disappear from the editor entirely."] # [doc = ""] # [inline] pub fn is_feature_disabled (& self , feature : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFeatureProfileMethodTable :: get (get_api ()) . is_feature_disabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , feature as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's **Export** button or the [`save_to_file`][Self::save_to_file] method."] # [doc = ""] # [inline] pub fn load_from_file (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFeatureProfileMethodTable :: get (get_api ()) . load_from_file ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's **Import** button or the [`load_from_file`][Self::load_from_file] method."] # [doc = ""] # [inline] pub fn save_to_file (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFeatureProfileMethodTable :: get (get_api ()) . save_to_file ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "If `disable` is `true`, disables the class specified by `class_name`. When disabled, the class won't appear in the Create New Node dialog."] # [doc = ""] # [inline] pub fn set_disable_class (& self , class_name : impl Into < GodotString > , disable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFeatureProfileMethodTable :: get (get_api ()) . set_disable_class ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , class_name . into () , disable as _) ; } } # [doc = "If `disable` is `true`, disables editing for the class specified by `class_name`. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class."] # [doc = ""] # [inline] pub fn set_disable_class_editor (& self , class_name : impl Into < GodotString > , disable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFeatureProfileMethodTable :: get (get_api ()) . set_disable_class_editor ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , class_name . into () , disable as _) ; } } # [doc = "If `disable` is `true`, disables editing for `property` in the class specified by `class_name`. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by `class_name`."] # [doc = ""] # [inline] pub fn set_disable_class_property (& self , class_name : impl Into < GodotString > , property : impl Into < GodotString > , disable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFeatureProfileMethodTable :: get (get_api ()) . set_disable_class_property ; let ret = crate :: icalls :: icallvar__str_str_bool (method_bind , self . this . sys () . as_ptr () , class_name . into () , property . into () , disable as _) ; } } # [doc = "If `disable` is `true`, disables the editor feature specified in `feature`. When a feature is disabled, it will disappear from the editor entirely."] # [doc = ""] # [inline] pub fn set_disable_feature (& self , feature : i64 , disable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFeatureProfileMethodTable :: get (get_api ()) . set_disable_feature ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , feature as _ , disable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorFeatureProfile { } unsafe impl GodotObject for EditorFeatureProfile { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorFeatureProfile" } } impl std :: ops :: Deref for EditorFeatureProfile { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorFeatureProfile { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for EditorFeatureProfile { } unsafe impl SubClass < crate :: generated :: Object > for EditorFeatureProfile { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorFeatureProfileMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_feature_name : * mut sys :: godot_method_bind , pub is_class_disabled : * mut sys :: godot_method_bind , pub is_class_editor_disabled : * mut sys :: godot_method_bind , pub is_class_property_disabled : * mut sys :: godot_method_bind , pub is_feature_disabled : * mut sys :: godot_method_bind , pub load_from_file : * mut sys :: godot_method_bind , pub save_to_file : * mut sys :: godot_method_bind , pub set_disable_class : * mut sys :: godot_method_bind , pub set_disable_class_editor : * mut sys :: godot_method_bind , pub set_disable_class_property : * mut sys :: godot_method_bind , pub set_disable_feature : * mut sys :: godot_method_bind } impl EditorFeatureProfileMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorFeatureProfileMethodTable = EditorFeatureProfileMethodTable { class_constructor : None , get_feature_name : 0 as * mut sys :: godot_method_bind , is_class_disabled : 0 as * mut sys :: godot_method_bind , is_class_editor_disabled : 0 as * mut sys :: godot_method_bind , is_class_property_disabled : 0 as * mut sys :: godot_method_bind , is_feature_disabled : 0 as * mut sys :: godot_method_bind , load_from_file : 0 as * mut sys :: godot_method_bind , save_to_file : 0 as * mut sys :: godot_method_bind , set_disable_class : 0 as * mut sys :: godot_method_bind , set_disable_class_editor : 0 as * mut sys :: godot_method_bind , set_disable_class_property : 0 as * mut sys :: godot_method_bind , set_disable_feature : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorFeatureProfileMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorFeatureProfile\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_feature_name = (gd_api . godot_method_bind_get_method) (class_name , "get_feature_name\0" . as_ptr () as * const c_char) ; table . is_class_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_class_disabled\0" . as_ptr () as * const c_char) ; table . is_class_editor_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_class_editor_disabled\0" . as_ptr () as * const c_char) ; table . is_class_property_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_class_property_disabled\0" . as_ptr () as * const c_char) ; table . is_feature_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_feature_disabled\0" . as_ptr () as * const c_char) ; table . load_from_file = (gd_api . godot_method_bind_get_method) (class_name , "load_from_file\0" . as_ptr () as * const c_char) ; table . save_to_file = (gd_api . godot_method_bind_get_method) (class_name , "save_to_file\0" . as_ptr () as * const c_char) ; table . set_disable_class = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_class\0" . as_ptr () as * const c_char) ; table . set_disable_class_editor = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_class_editor\0" . as_ptr () as * const c_char) ; table . set_disable_class_property = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_class_property\0" . as_ptr () as * const c_char) ; table . set_disable_feature = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_feature\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_feature_profile::private::EditorFeatureProfile;
            
            pub mod editor_file_dialog {
                # ! [doc = "This module contains types related to the API class [`EditorFileDialog`][super::EditorFileDialog]."] pub (crate) mod private { # [doc = "`tools class EditorFileDialog` inherits `ConfirmationDialog` (manually managed).\n\nThis class has related types in the [`editor_file_dialog`][super::editor_file_dialog] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorfiledialog.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorFileDialog inherits methods from:\n - [ConfirmationDialog](struct.ConfirmationDialog.html)\n - [AcceptDialog](struct.AcceptDialog.html)\n - [WindowDialog](struct.WindowDialog.html)\n - [Popup](struct.Popup.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorFileDialog { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorFileDialog ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Access (pub i64) ; impl Access { pub const RESOURCES : Access = Access (0i64) ; pub const USERDATA : Access = Access (1i64) ; pub const FILESYSTEM : Access = Access (2i64) ; } impl From < i64 > for Access { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Access > for i64 { # [inline] fn from (v : Access) -> Self { v . 0 } } impl FromVariant for Access { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DisplayMode (pub i64) ; impl DisplayMode { pub const THUMBNAILS : DisplayMode = DisplayMode (0i64) ; pub const LIST : DisplayMode = DisplayMode (1i64) ; } impl From < i64 > for DisplayMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DisplayMode > for i64 { # [inline] fn from (v : DisplayMode) -> Self { v . 0 } } impl FromVariant for DisplayMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const OPEN_FILE : Mode = Mode (0i64) ; pub const OPEN_FILES : Mode = Mode (1i64) ; pub const OPEN_DIR : Mode = Mode (2i64) ; pub const OPEN_ANY : Mode = Mode (3i64) ; pub const SAVE_FILE : Mode = Mode (4i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } impl FromVariant for Mode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl EditorFileDialog { pub const ACCESS_RESOURCES : i64 = 0i64 ; pub const DISPLAY_THUMBNAILS : i64 = 0i64 ; pub const MODE_OPEN_FILE : i64 = 0i64 ; pub const ACCESS_USERDATA : i64 = 1i64 ; pub const DISPLAY_LIST : i64 = 1i64 ; pub const MODE_OPEN_FILES : i64 = 1i64 ; pub const ACCESS_FILESYSTEM : i64 = 2i64 ; pub const MODE_OPEN_DIR : i64 = 2i64 ; pub const MODE_OPEN_ANY : i64 = 3i64 ; pub const MODE_SAVE_FILE : i64 = 4i64 ; } impl EditorFileDialog { # [doc = "Adds a comma-delimited file extension filter option to the [`EditorFileDialog`][EditorFileDialog] with an optional semi-colon-delimited label.\nFor example, `\"*.tscn, *.scn; Scenes\"` results in filter text \"Scenes (*.tscn, *.scn)\"."] # [doc = ""] # [inline] pub fn add_filter (& self , filter : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . add_filter ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , filter . into ()) ; } } # [doc = "Removes all filters except for \"All Files (*)\"."] # [doc = ""] # [inline] pub fn clear_filters (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . clear_filters ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The location from which the user may select a file, including `res://`, `user://`, and the local file system."] # [doc = ""] # [inline] pub fn access (& self) -> crate :: generated :: editor_file_dialog :: Access { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . get_access ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: editor_file_dialog :: Access > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The currently occupied directory."] # [doc = ""] # [inline] pub fn current_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . get_current_dir ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The currently selected file."] # [doc = ""] # [inline] pub fn current_file (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . get_current_file ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The file system path in the address bar."] # [doc = ""] # [inline] pub fn current_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . get_current_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The view format in which the [`EditorFileDialog`][EditorFileDialog] displays resources to the user."] # [doc = ""] # [inline] pub fn display_mode (& self) -> crate :: generated :: editor_file_dialog :: DisplayMode { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . get_display_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: editor_file_dialog :: DisplayMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The purpose of the [`EditorFileDialog`][EditorFileDialog], which defines the allowed behaviors."] # [doc = ""] # [inline] pub fn mode (& self) -> crate :: generated :: editor_file_dialog :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: editor_file_dialog :: Mode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the `VBoxContainer` used to display the file system.\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_vbox (& self) -> Option < Ref < crate :: generated :: VBoxContainer , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . get_vbox ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: VBoxContainer , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Notify the [`EditorFileDialog`][EditorFileDialog] that its view of the data is no longer accurate. Updates the view contents on next view update."] # [doc = ""] # [inline] pub fn invalidate (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . invalidate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the [`EditorFileDialog`][EditorFileDialog] will not warn the user before overwriting files."] # [doc = ""] # [inline] pub fn is_overwrite_warning_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . is_overwrite_warning_disabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, hidden files and directories will be visible in the [`EditorFileDialog`][EditorFileDialog]."] # [doc = ""] # [inline] pub fn is_showing_hidden_files (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . is_showing_hidden_files ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The location from which the user may select a file, including `res://`, `user://`, and the local file system."] # [doc = ""] # [inline] pub fn set_access (& self , access : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_access ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , access as _) ; } } # [doc = "The currently occupied directory."] # [doc = ""] # [inline] pub fn set_current_dir (& self , dir : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_current_dir ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , dir . into ()) ; } } # [doc = "The currently selected file."] # [doc = ""] # [inline] pub fn set_current_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_current_file ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } # [doc = "The file system path in the address bar."] # [doc = ""] # [inline] pub fn set_current_path (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_current_path ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "If `true`, the [`EditorFileDialog`][EditorFileDialog] will not warn the user before overwriting files."] # [doc = ""] # [inline] pub fn set_disable_overwrite_warning (& self , disable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_disable_overwrite_warning ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , disable as _) ; } } # [doc = "The view format in which the [`EditorFileDialog`][EditorFileDialog] displays resources to the user."] # [doc = ""] # [inline] pub fn set_display_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_display_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The purpose of the [`EditorFileDialog`][EditorFileDialog], which defines the allowed behaviors."] # [doc = ""] # [inline] pub fn set_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "If `true`, hidden files and directories will be visible in the [`EditorFileDialog`][EditorFileDialog]."] # [doc = ""] # [inline] pub fn set_show_hidden_files (& self , show : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileDialogMethodTable :: get (get_api ()) . set_show_hidden_files ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , show as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorFileDialog { } unsafe impl GodotObject for EditorFileDialog { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorFileDialog" } } impl QueueFree for EditorFileDialog { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for EditorFileDialog { type Target = crate :: generated :: ConfirmationDialog ; # [inline] fn deref (& self) -> & crate :: generated :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorFileDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: ConfirmationDialog > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: AcceptDialog > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: WindowDialog > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: Popup > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: Control > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: CanvasItem > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: Node > for EditorFileDialog { } unsafe impl SubClass < crate :: generated :: Object > for EditorFileDialog { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorFileDialogMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_filter : * mut sys :: godot_method_bind , pub clear_filters : * mut sys :: godot_method_bind , pub get_access : * mut sys :: godot_method_bind , pub get_current_dir : * mut sys :: godot_method_bind , pub get_current_file : * mut sys :: godot_method_bind , pub get_current_path : * mut sys :: godot_method_bind , pub get_display_mode : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub get_vbox : * mut sys :: godot_method_bind , pub invalidate : * mut sys :: godot_method_bind , pub is_overwrite_warning_disabled : * mut sys :: godot_method_bind , pub is_showing_hidden_files : * mut sys :: godot_method_bind , pub set_access : * mut sys :: godot_method_bind , pub set_current_dir : * mut sys :: godot_method_bind , pub set_current_file : * mut sys :: godot_method_bind , pub set_current_path : * mut sys :: godot_method_bind , pub set_disable_overwrite_warning : * mut sys :: godot_method_bind , pub set_display_mode : * mut sys :: godot_method_bind , pub set_mode : * mut sys :: godot_method_bind , pub set_show_hidden_files : * mut sys :: godot_method_bind } impl EditorFileDialogMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorFileDialogMethodTable = EditorFileDialogMethodTable { class_constructor : None , add_filter : 0 as * mut sys :: godot_method_bind , clear_filters : 0 as * mut sys :: godot_method_bind , get_access : 0 as * mut sys :: godot_method_bind , get_current_dir : 0 as * mut sys :: godot_method_bind , get_current_file : 0 as * mut sys :: godot_method_bind , get_current_path : 0 as * mut sys :: godot_method_bind , get_display_mode : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , get_vbox : 0 as * mut sys :: godot_method_bind , invalidate : 0 as * mut sys :: godot_method_bind , is_overwrite_warning_disabled : 0 as * mut sys :: godot_method_bind , is_showing_hidden_files : 0 as * mut sys :: godot_method_bind , set_access : 0 as * mut sys :: godot_method_bind , set_current_dir : 0 as * mut sys :: godot_method_bind , set_current_file : 0 as * mut sys :: godot_method_bind , set_current_path : 0 as * mut sys :: godot_method_bind , set_disable_overwrite_warning : 0 as * mut sys :: godot_method_bind , set_display_mode : 0 as * mut sys :: godot_method_bind , set_mode : 0 as * mut sys :: godot_method_bind , set_show_hidden_files : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorFileDialogMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorFileDialog\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_filter = (gd_api . godot_method_bind_get_method) (class_name , "add_filter\0" . as_ptr () as * const c_char) ; table . clear_filters = (gd_api . godot_method_bind_get_method) (class_name , "clear_filters\0" . as_ptr () as * const c_char) ; table . get_access = (gd_api . godot_method_bind_get_method) (class_name , "get_access\0" . as_ptr () as * const c_char) ; table . get_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_current_dir\0" . as_ptr () as * const c_char) ; table . get_current_file = (gd_api . godot_method_bind_get_method) (class_name , "get_current_file\0" . as_ptr () as * const c_char) ; table . get_current_path = (gd_api . godot_method_bind_get_method) (class_name , "get_current_path\0" . as_ptr () as * const c_char) ; table . get_display_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_display_mode\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_vbox = (gd_api . godot_method_bind_get_method) (class_name , "get_vbox\0" . as_ptr () as * const c_char) ; table . invalidate = (gd_api . godot_method_bind_get_method) (class_name , "invalidate\0" . as_ptr () as * const c_char) ; table . is_overwrite_warning_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_overwrite_warning_disabled\0" . as_ptr () as * const c_char) ; table . is_showing_hidden_files = (gd_api . godot_method_bind_get_method) (class_name , "is_showing_hidden_files\0" . as_ptr () as * const c_char) ; table . set_access = (gd_api . godot_method_bind_get_method) (class_name , "set_access\0" . as_ptr () as * const c_char) ; table . set_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "set_current_dir\0" . as_ptr () as * const c_char) ; table . set_current_file = (gd_api . godot_method_bind_get_method) (class_name , "set_current_file\0" . as_ptr () as * const c_char) ; table . set_current_path = (gd_api . godot_method_bind_get_method) (class_name , "set_current_path\0" . as_ptr () as * const c_char) ; table . set_disable_overwrite_warning = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_overwrite_warning\0" . as_ptr () as * const c_char) ; table . set_display_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_display_mode\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_show_hidden_files = (gd_api . godot_method_bind_get_method) (class_name , "set_show_hidden_files\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_file_dialog::private::EditorFileDialog;
            
            pub(crate) mod editor_file_system {
                # ! [doc = "This module contains types related to the API class [`EditorFileSystem`][super::EditorFileSystem]."] pub (crate) mod private { # [doc = "`tools class EditorFileSystem` inherits `Node` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorfilesystem.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorFileSystem inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorFileSystem { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorFileSystem ; impl EditorFileSystem { # [doc = "Returns the resource type of the file, given the full path. This returns a string such as `\"Resource\"` or `\"GDScript\"`, _not_ a file extension such as `\".gd\"`."] # [doc = ""] # [inline] pub fn get_file_type (& self , path : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . get_file_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the root directory object."] # [doc = ""] # [inline] pub fn get_filesystem (& self) -> Option < Ref < crate :: generated :: EditorFileSystemDirectory , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . get_filesystem ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: EditorFileSystemDirectory , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a view into the filesystem at `path`."] # [doc = ""] # [inline] pub fn get_filesystem_path (& self , path : impl Into < GodotString >) -> Option < Ref < crate :: generated :: EditorFileSystemDirectory , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . get_filesystem_path ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < Option < Ref < crate :: generated :: EditorFileSystemDirectory , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the scan progress for 0 to 1 if the FS is being scanned."] # [doc = ""] # [inline] pub fn get_scanning_progress (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . get_scanning_progress ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the filesystem is being scanned."] # [doc = ""] # [inline] pub fn is_scanning (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . is_scanning ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Scan the filesystem for changes."] # [doc = ""] # [inline] pub fn scan (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . scan ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Check if the source of any imported resource changed."] # [doc = ""] # [inline] pub fn scan_sources (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . scan_sources ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Update a file information. Call this if an external program (not Godot) modified the file."] # [doc = ""] # [inline] pub fn update_file (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . update_file ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "Scans the script files and updates the list of custom class names."] # [doc = ""] # [inline] pub fn update_script_classes (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemMethodTable :: get (get_api ()) . update_script_classes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorFileSystem { } unsafe impl GodotObject for EditorFileSystem { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorFileSystem" } } impl QueueFree for EditorFileSystem { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for EditorFileSystem { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorFileSystem { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for EditorFileSystem { } unsafe impl SubClass < crate :: generated :: Object > for EditorFileSystem { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorFileSystemMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_file_type : * mut sys :: godot_method_bind , pub get_filesystem : * mut sys :: godot_method_bind , pub get_filesystem_path : * mut sys :: godot_method_bind , pub get_scanning_progress : * mut sys :: godot_method_bind , pub is_scanning : * mut sys :: godot_method_bind , pub scan : * mut sys :: godot_method_bind , pub scan_sources : * mut sys :: godot_method_bind , pub update_file : * mut sys :: godot_method_bind , pub update_script_classes : * mut sys :: godot_method_bind } impl EditorFileSystemMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorFileSystemMethodTable = EditorFileSystemMethodTable { class_constructor : None , get_file_type : 0 as * mut sys :: godot_method_bind , get_filesystem : 0 as * mut sys :: godot_method_bind , get_filesystem_path : 0 as * mut sys :: godot_method_bind , get_scanning_progress : 0 as * mut sys :: godot_method_bind , is_scanning : 0 as * mut sys :: godot_method_bind , scan : 0 as * mut sys :: godot_method_bind , scan_sources : 0 as * mut sys :: godot_method_bind , update_file : 0 as * mut sys :: godot_method_bind , update_script_classes : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorFileSystemMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorFileSystem\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_file_type = (gd_api . godot_method_bind_get_method) (class_name , "get_file_type\0" . as_ptr () as * const c_char) ; table . get_filesystem = (gd_api . godot_method_bind_get_method) (class_name , "get_filesystem\0" . as_ptr () as * const c_char) ; table . get_filesystem_path = (gd_api . godot_method_bind_get_method) (class_name , "get_filesystem_path\0" . as_ptr () as * const c_char) ; table . get_scanning_progress = (gd_api . godot_method_bind_get_method) (class_name , "get_scanning_progress\0" . as_ptr () as * const c_char) ; table . is_scanning = (gd_api . godot_method_bind_get_method) (class_name , "is_scanning\0" . as_ptr () as * const c_char) ; table . scan = (gd_api . godot_method_bind_get_method) (class_name , "scan\0" . as_ptr () as * const c_char) ; table . scan_sources = (gd_api . godot_method_bind_get_method) (class_name , "scan_sources\0" . as_ptr () as * const c_char) ; table . update_file = (gd_api . godot_method_bind_get_method) (class_name , "update_file\0" . as_ptr () as * const c_char) ; table . update_script_classes = (gd_api . godot_method_bind_get_method) (class_name , "update_script_classes\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_file_system::private::EditorFileSystem;
            
            pub(crate) mod editor_file_system_directory {
                # ! [doc = "This module contains types related to the API class [`EditorFileSystemDirectory`][super::EditorFileSystemDirectory]."] pub (crate) mod private { # [doc = "`tools class EditorFileSystemDirectory` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorfilesystemdirectory.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorFileSystemDirectory inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorFileSystemDirectory { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorFileSystemDirectory ; impl EditorFileSystemDirectory { # [doc = "Returns the index of the directory with name `name` or `-1` if not found."] # [doc = ""] # [inline] pub fn find_dir_index (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . find_dir_index ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the index of the file with name `name` or `-1` if not found."] # [doc = ""] # [inline] pub fn find_file_index (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . find_file_index ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the name of the file at index `idx`."] # [doc = ""] # [inline] pub fn get_file (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_file ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of files in this directory."] # [doc = ""] # [inline] pub fn get_file_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_file_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the file at index `idx` imported properly."] # [doc = ""] # [inline] pub fn get_file_import_is_valid (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_file_import_is_valid ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the path to the file at index `idx`."] # [doc = ""] # [inline] pub fn get_file_path (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_file_path ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the base class of the script class defined in the file at index `idx`. If the file doesn't define a script class using the `class_name` syntax, this will return an empty string."] # [doc = ""] # [inline] pub fn get_file_script_class_extends (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_file_script_class_extends ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the name of the script class defined in the file at index `idx`. If the file doesn't define a script class using the `class_name` syntax, this will return an empty string."] # [doc = ""] # [inline] pub fn get_file_script_class_name (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_file_script_class_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the resource type of the file at index `idx`. This returns a string such as `\"Resource\"` or `\"GDScript\"`, _not_ a file extension such as `\".gd\"`."] # [doc = ""] # [inline] pub fn get_file_type (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_file_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the name of this directory."] # [doc = ""] # [inline] pub fn get_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the parent directory for this directory or `null` if called on a directory at `res://` or `user://`."] # [doc = ""] # [inline] pub fn get_parent (& self) -> Option < Ref < crate :: generated :: EditorFileSystemDirectory , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_parent ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: EditorFileSystemDirectory , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the path to this directory."] # [doc = ""] # [inline] pub fn get_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the subdirectory at index `idx`."] # [doc = ""] # [inline] pub fn get_subdir (& self , idx : i64) -> Option < Ref < crate :: generated :: EditorFileSystemDirectory , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_subdir ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: EditorFileSystemDirectory , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of subdirectories in this directory."] # [doc = ""] # [inline] pub fn get_subdir_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorFileSystemDirectoryMethodTable :: get (get_api ()) . get_subdir_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorFileSystemDirectory { } unsafe impl GodotObject for EditorFileSystemDirectory { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorFileSystemDirectory" } } impl std :: ops :: Deref for EditorFileSystemDirectory { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorFileSystemDirectory { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for EditorFileSystemDirectory { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorFileSystemDirectoryMethodTable { pub class_constructor : sys :: godot_class_constructor , pub find_dir_index : * mut sys :: godot_method_bind , pub find_file_index : * mut sys :: godot_method_bind , pub get_file : * mut sys :: godot_method_bind , pub get_file_count : * mut sys :: godot_method_bind , pub get_file_import_is_valid : * mut sys :: godot_method_bind , pub get_file_path : * mut sys :: godot_method_bind , pub get_file_script_class_extends : * mut sys :: godot_method_bind , pub get_file_script_class_name : * mut sys :: godot_method_bind , pub get_file_type : * mut sys :: godot_method_bind , pub get_name : * mut sys :: godot_method_bind , pub get_parent : * mut sys :: godot_method_bind , pub get_path : * mut sys :: godot_method_bind , pub get_subdir : * mut sys :: godot_method_bind , pub get_subdir_count : * mut sys :: godot_method_bind } impl EditorFileSystemDirectoryMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorFileSystemDirectoryMethodTable = EditorFileSystemDirectoryMethodTable { class_constructor : None , find_dir_index : 0 as * mut sys :: godot_method_bind , find_file_index : 0 as * mut sys :: godot_method_bind , get_file : 0 as * mut sys :: godot_method_bind , get_file_count : 0 as * mut sys :: godot_method_bind , get_file_import_is_valid : 0 as * mut sys :: godot_method_bind , get_file_path : 0 as * mut sys :: godot_method_bind , get_file_script_class_extends : 0 as * mut sys :: godot_method_bind , get_file_script_class_name : 0 as * mut sys :: godot_method_bind , get_file_type : 0 as * mut sys :: godot_method_bind , get_name : 0 as * mut sys :: godot_method_bind , get_parent : 0 as * mut sys :: godot_method_bind , get_path : 0 as * mut sys :: godot_method_bind , get_subdir : 0 as * mut sys :: godot_method_bind , get_subdir_count : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorFileSystemDirectoryMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorFileSystemDirectory\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . find_dir_index = (gd_api . godot_method_bind_get_method) (class_name , "find_dir_index\0" . as_ptr () as * const c_char) ; table . find_file_index = (gd_api . godot_method_bind_get_method) (class_name , "find_file_index\0" . as_ptr () as * const c_char) ; table . get_file = (gd_api . godot_method_bind_get_method) (class_name , "get_file\0" . as_ptr () as * const c_char) ; table . get_file_count = (gd_api . godot_method_bind_get_method) (class_name , "get_file_count\0" . as_ptr () as * const c_char) ; table . get_file_import_is_valid = (gd_api . godot_method_bind_get_method) (class_name , "get_file_import_is_valid\0" . as_ptr () as * const c_char) ; table . get_file_path = (gd_api . godot_method_bind_get_method) (class_name , "get_file_path\0" . as_ptr () as * const c_char) ; table . get_file_script_class_extends = (gd_api . godot_method_bind_get_method) (class_name , "get_file_script_class_extends\0" . as_ptr () as * const c_char) ; table . get_file_script_class_name = (gd_api . godot_method_bind_get_method) (class_name , "get_file_script_class_name\0" . as_ptr () as * const c_char) ; table . get_file_type = (gd_api . godot_method_bind_get_method) (class_name , "get_file_type\0" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\0" . as_ptr () as * const c_char) ; table . get_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_parent\0" . as_ptr () as * const c_char) ; table . get_path = (gd_api . godot_method_bind_get_method) (class_name , "get_path\0" . as_ptr () as * const c_char) ; table . get_subdir = (gd_api . godot_method_bind_get_method) (class_name , "get_subdir\0" . as_ptr () as * const c_char) ; table . get_subdir_count = (gd_api . godot_method_bind_get_method) (class_name , "get_subdir_count\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_file_system_directory::private::EditorFileSystemDirectory;
            
            pub(crate) mod editor_import_plugin {
                # ! [doc = "This module contains types related to the API class [`EditorImportPlugin`][super::EditorImportPlugin]."] pub (crate) mod private { # [doc = "`tools class EditorImportPlugin` inherits `ResourceImporter` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorimportplugin.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorImportPlugin inherits methods from:\n - [ResourceImporter](struct.ResourceImporter.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorImportPlugin { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorImportPlugin ; impl EditorImportPlugin { } impl gdnative_core :: private :: godot_object :: Sealed for EditorImportPlugin { } unsafe impl GodotObject for EditorImportPlugin { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorImportPlugin" } } impl std :: ops :: Deref for EditorImportPlugin { type Target = crate :: generated :: ResourceImporter ; # [inline] fn deref (& self) -> & crate :: generated :: ResourceImporter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorImportPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: ResourceImporter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: ResourceImporter > for EditorImportPlugin { } unsafe impl SubClass < crate :: generated :: Reference > for EditorImportPlugin { } unsafe impl SubClass < crate :: generated :: Object > for EditorImportPlugin { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorImportPluginMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl EditorImportPluginMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorImportPluginMethodTable = EditorImportPluginMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorImportPluginMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorImportPlugin\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_import_plugin::private::EditorImportPlugin;
            
            pub(crate) mod editor_inspector {
                # ! [doc = "This module contains types related to the API class [`EditorInspector`][super::EditorInspector]."] pub (crate) mod private { # [doc = "`tools class EditorInspector` inherits `ScrollContainer` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorinspector.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorInspector inherits methods from:\n - [ScrollContainer](struct.ScrollContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorInspector { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorInspector ; impl EditorInspector { # [doc = "Refreshes the inspector.\n**Note:** To save on CPU resources, calling this method will do nothing if the time specified in `docks/property_editor/auto_refresh_interval` editor setting hasn't passed yet since this method was last called. (By default, this interval is set to 0.3 seconds.)"] # [doc = ""] # [inline] pub fn refresh (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInspectorMethodTable :: get (get_api ()) . refresh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorInspector { } unsafe impl GodotObject for EditorInspector { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorInspector" } } impl QueueFree for EditorInspector { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for EditorInspector { type Target = crate :: generated :: ScrollContainer ; # [inline] fn deref (& self) -> & crate :: generated :: ScrollContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorInspector { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: ScrollContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: ScrollContainer > for EditorInspector { } unsafe impl SubClass < crate :: generated :: Container > for EditorInspector { } unsafe impl SubClass < crate :: generated :: Control > for EditorInspector { } unsafe impl SubClass < crate :: generated :: CanvasItem > for EditorInspector { } unsafe impl SubClass < crate :: generated :: Node > for EditorInspector { } unsafe impl SubClass < crate :: generated :: Object > for EditorInspector { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorInspectorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub refresh : * mut sys :: godot_method_bind } impl EditorInspectorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorInspectorMethodTable = EditorInspectorMethodTable { class_constructor : None , refresh : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorInspectorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorInspector\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . refresh = (gd_api . godot_method_bind_get_method) (class_name , "refresh\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_inspector::private::EditorInspector;
            
            pub(crate) mod editor_inspector_plugin {
                # ! [doc = "This module contains types related to the API class [`EditorInspectorPlugin`][super::EditorInspectorPlugin]."] pub (crate) mod private { # [doc = "`tools class EditorInspectorPlugin` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorinspectorplugin.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorInspectorPlugin inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorInspectorPlugin { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorInspectorPlugin ; impl EditorInspectorPlugin { # [doc = "Adds a custom control, which is not necessarily a property editor."] # [doc = ""] # [inline] pub fn add_custom_control (& self , control : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInspectorPluginMethodTable :: get (get_api ()) . add_custom_control ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr ()) ; } } # [doc = "Adds a property editor for an individual property. The `editor` control must extend [`EditorProperty`][EditorProperty]."] # [doc = ""] # [inline] pub fn add_property_editor (& self , property : impl Into < GodotString > , editor : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInspectorPluginMethodTable :: get (get_api ()) . add_property_editor ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , property . into () , editor . as_arg_ptr ()) ; } } # [doc = "Adds an editor that allows modifying multiple properties. The `editor` control must extend [`EditorProperty`][EditorProperty]."] # [doc = ""] # [inline] pub fn add_property_editor_for_multiple_properties (& self , label : impl Into < GodotString > , properties : PoolArray < GodotString > , editor : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInspectorPluginMethodTable :: get (get_api ()) . add_property_editor_for_multiple_properties ; let ret = crate :: icalls :: icallvar__str_strarr_obj (method_bind , self . this . sys () . as_ptr () , label . into () , properties , editor . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorInspectorPlugin { } unsafe impl GodotObject for EditorInspectorPlugin { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorInspectorPlugin" } } impl std :: ops :: Deref for EditorInspectorPlugin { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorInspectorPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for EditorInspectorPlugin { } unsafe impl SubClass < crate :: generated :: Object > for EditorInspectorPlugin { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorInspectorPluginMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_custom_control : * mut sys :: godot_method_bind , pub add_property_editor : * mut sys :: godot_method_bind , pub add_property_editor_for_multiple_properties : * mut sys :: godot_method_bind } impl EditorInspectorPluginMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorInspectorPluginMethodTable = EditorInspectorPluginMethodTable { class_constructor : None , add_custom_control : 0 as * mut sys :: godot_method_bind , add_property_editor : 0 as * mut sys :: godot_method_bind , add_property_editor_for_multiple_properties : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorInspectorPluginMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorInspectorPlugin\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_custom_control = (gd_api . godot_method_bind_get_method) (class_name , "add_custom_control\0" . as_ptr () as * const c_char) ; table . add_property_editor = (gd_api . godot_method_bind_get_method) (class_name , "add_property_editor\0" . as_ptr () as * const c_char) ; table . add_property_editor_for_multiple_properties = (gd_api . godot_method_bind_get_method) (class_name , "add_property_editor_for_multiple_properties\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_inspector_plugin::private::EditorInspectorPlugin;
            
            pub(crate) mod editor_interface {
                # ! [doc = "This module contains types related to the API class [`EditorInterface`][super::EditorInterface]."] pub (crate) mod private { # [doc = "`tools class EditorInterface` inherits `Node` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorinterface.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorInterface inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorInterface { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorInterface ; impl EditorInterface { # [doc = "Edits the given [`Node`][Node]. The node will be also selected if it's inside the scene tree."] # [doc = ""] # [inline] pub fn edit_node (& self , node : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . edit_node ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Edits the given [`Resource`][Resource]. If the resource is a [`Script`][Script] you can also edit it with [`edit_script`][Self::edit_script] to specify the line and column position."] # [doc = ""] # [inline] pub fn edit_resource (& self , resource : impl AsArg < crate :: generated :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . edit_resource ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , resource . as_arg_ptr ()) ; } } # [doc = "Edits the given [`Script`][Script]. The line and column on which to open the script can also be specified. The script will be open with the user-configured editor for the script's language which may be an external editor.\n# Default Arguments\n* `line` - `-1`\n* `column` - `0`\n* `grab_focus` - `true`"] # [doc = ""] # [inline] pub fn edit_script (& self , script : impl AsArg < crate :: generated :: Script > , line : i64 , column : i64 , grab_focus : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . edit_script ; let ret = crate :: icalls :: icallvar__obj_i64_i64_bool (method_bind , self . this . sys () . as_ptr () , script . as_arg_ptr () , line as _ , column as _ , grab_focus as _) ; } } # [doc = "Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly.\n**Warning:** Removing and freeing this node will render the editor useless and may cause a crash."] # [doc = ""] # [inline] pub fn get_base_control (& self) -> Option < Ref < crate :: generated :: Control , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_base_control ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Control , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current path being viewed in the [`FileSystemDock`][FileSystemDock]."] # [doc = ""] # [inline] pub fn get_current_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_current_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the edited (current) scene's root [`Node`][Node]."] # [doc = ""] # [inline] pub fn get_edited_scene_root (& self) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_edited_scene_root ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the actual scale of the editor UI (`1.0` being 100% scale). This can be used to adjust position and dimensions of the UI added by plugins.\n**Note:** This value is set via the `interface/editor/display_scale` and `interface/editor/custom_display_scale` editor settings. Editor must be restarted for changes to be properly applied."] # [doc = ""] # [inline] pub fn get_editor_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_editor_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the editor's [`EditorSettings`][EditorSettings] instance."] # [doc = ""] # [inline] pub fn get_editor_settings (& self) -> Option < Ref < crate :: generated :: EditorSettings , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_editor_settings ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: EditorSettings , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the main editor control. Use this as a parent for main screens.\n**Note:** This returns the main editor control containing the whole editor, not the 2D or 3D viewports specifically.\n**Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash."] # [doc = ""] # [inline] pub fn get_editor_viewport (& self) -> Option < Ref < crate :: generated :: Control , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_editor_viewport ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Control , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the editor's [`FileSystemDock`][FileSystemDock] instance.\n**Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash."] # [doc = ""] # [inline] pub fn get_file_system_dock (& self) -> Option < Ref < crate :: generated :: FileSystemDock , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_file_system_dock ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: FileSystemDock , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the editor's [`EditorInspector`][EditorInspector] instance.\n**Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash."] # [doc = ""] # [inline] pub fn get_inspector (& self) -> Option < Ref < crate :: generated :: EditorInspector , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_inspector ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: EditorInspector , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an [`Array`][VariantArray] with the file paths of the currently opened scenes."] # [doc = ""] # [inline] pub fn get_open_scenes (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_open_scenes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the name of the scene that is being played. If no scene is currently being played, returns an empty string."] # [doc = ""] # [inline] pub fn get_playing_scene (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_playing_scene ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the editor's [`EditorFileSystem`][EditorFileSystem] instance."] # [doc = ""] # [inline] pub fn get_resource_filesystem (& self) -> Option < Ref < crate :: generated :: EditorFileSystem , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_resource_filesystem ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: EditorFileSystem , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the editor's [`EditorResourcePreview`][EditorResourcePreview] instance."] # [doc = ""] # [inline] pub fn get_resource_previewer (& self) -> Option < Ref < crate :: generated :: EditorResourcePreview , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_resource_previewer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: EditorResourcePreview , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the editor's [`ScriptEditor`][ScriptEditor] instance.\n**Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash."] # [doc = ""] # [inline] pub fn get_script_editor (& self) -> Option < Ref < crate :: generated :: ScriptEditor , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_script_editor ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: ScriptEditor , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the path of the directory currently selected in the [`FileSystemDock`][FileSystemDock]. If a file is selected, its base directory will be returned using [`String.get_base_dir`][GodotString::get_base_dir] instead."] # [doc = ""] # [inline] pub fn get_selected_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_selected_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the editor's [`EditorSelection`][EditorSelection] instance."] # [doc = ""] # [inline] pub fn get_selection (& self) -> Option < Ref < crate :: generated :: EditorSelection , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . get_selection ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: EditorSelection , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Shows the given property on the given `object` in the editor's Inspector dock. If `inspector_only` is `true`, plugins will not attempt to edit `object`.\n# Default Arguments\n* `for_property` - `\"\"`\n* `inspector_only` - `false`"] # [doc = ""] # [inline] pub fn inspect_object (& self , object : impl AsArg < crate :: generated :: Object > , for_property : impl Into < GodotString > , inspector_only : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . inspect_object ; let ret = crate :: icalls :: icallvar__obj_str_bool (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , for_property . into () , inspector_only as _) ; } } # [doc = "If `true`, enables distraction-free mode which hides side docks to increase the space available for the main view."] # [doc = ""] # [inline] pub fn is_distraction_free_mode_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . is_distraction_free_mode_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if a scene is currently being played, `false` otherwise. Paused scenes are considered as being played."] # [doc = ""] # [inline] pub fn is_playing_scene (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . is_playing_scene ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the specified `plugin` is enabled. The plugin name is the same as its directory name."] # [doc = ""] # [inline] pub fn is_plugin_enabled (& self , plugin : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . is_plugin_enabled ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , plugin . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns mesh previews rendered at the given size as an [`Array`][VariantArray] of [`Texture`][Texture]s."] # [doc = ""] # [inline] pub fn make_mesh_previews (& self , meshes : VariantArray , preview_size : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . make_mesh_previews ; let ret = crate :: icalls :: icallvar__arr_i64 (method_bind , self . this . sys () . as_ptr () , meshes , preview_size as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Opens the scene at the given path."] # [doc = ""] # [inline] pub fn open_scene_from_path (& self , scene_filepath : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . open_scene_from_path ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , scene_filepath . into ()) ; } } # [doc = "Plays the currently active scene."] # [doc = ""] # [inline] pub fn play_current_scene (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . play_current_scene ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Plays the scene specified by its filepath."] # [doc = ""] # [inline] pub fn play_custom_scene (& self , scene_filepath : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . play_custom_scene ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , scene_filepath . into ()) ; } } # [doc = "Plays the main scene."] # [doc = ""] # [inline] pub fn play_main_scene (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . play_main_scene ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Reloads the scene at the given path."] # [doc = ""] # [inline] pub fn reload_scene_from_path (& self , scene_filepath : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . reload_scene_from_path ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , scene_filepath . into ()) ; } } # [doc = "Saves the scene. Returns either `OK` or `ERR_CANT_CREATE` (see [@GlobalScope] constants)."] # [doc = ""] # [inline] pub fn save_scene (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . save_scene ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Saves the scene as a file at `path`.\n# Default Arguments\n* `with_preview` - `true`"] # [doc = ""] # [inline] pub fn save_scene_as (& self , path : impl Into < GodotString > , with_preview : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . save_scene_as ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , path . into () , with_preview as _) ; } } # [doc = "Selects the file, with the path provided by `file`, in the FileSystem dock."] # [doc = ""] # [inline] pub fn select_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . select_file ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } # [doc = "If `true`, enables distraction-free mode which hides side docks to increase the space available for the main view."] # [doc = ""] # [inline] pub fn set_distraction_free_mode (& self , enter : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . set_distraction_free_mode ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enter as _) ; } } # [doc = "Sets the editor's current main screen to the one specified in `name`. `name` must match the text of the tab in question exactly (`2D`, `3D`, `Script`, `AssetLib`)."] # [doc = ""] # [inline] pub fn set_main_screen_editor (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . set_main_screen_editor ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Sets the enabled status of a plugin. The plugin name is the same as its directory name."] # [doc = ""] # [inline] pub fn set_plugin_enabled (& self , plugin : impl Into < GodotString > , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . set_plugin_enabled ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , plugin . into () , enabled as _) ; } } # [doc = "Stops the scene that is currently playing."] # [doc = ""] # [inline] pub fn stop_playing_scene (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorInterfaceMethodTable :: get (get_api ()) . stop_playing_scene ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorInterface { } unsafe impl GodotObject for EditorInterface { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorInterface" } } impl QueueFree for EditorInterface { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for EditorInterface { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorInterface { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for EditorInterface { } unsafe impl SubClass < crate :: generated :: Object > for EditorInterface { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorInterfaceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub edit_node : * mut sys :: godot_method_bind , pub edit_resource : * mut sys :: godot_method_bind , pub edit_script : * mut sys :: godot_method_bind , pub get_base_control : * mut sys :: godot_method_bind , pub get_current_path : * mut sys :: godot_method_bind , pub get_edited_scene_root : * mut sys :: godot_method_bind , pub get_editor_scale : * mut sys :: godot_method_bind , pub get_editor_settings : * mut sys :: godot_method_bind , pub get_editor_viewport : * mut sys :: godot_method_bind , pub get_file_system_dock : * mut sys :: godot_method_bind , pub get_inspector : * mut sys :: godot_method_bind , pub get_open_scenes : * mut sys :: godot_method_bind , pub get_playing_scene : * mut sys :: godot_method_bind , pub get_resource_filesystem : * mut sys :: godot_method_bind , pub get_resource_previewer : * mut sys :: godot_method_bind , pub get_script_editor : * mut sys :: godot_method_bind , pub get_selected_path : * mut sys :: godot_method_bind , pub get_selection : * mut sys :: godot_method_bind , pub inspect_object : * mut sys :: godot_method_bind , pub is_distraction_free_mode_enabled : * mut sys :: godot_method_bind , pub is_playing_scene : * mut sys :: godot_method_bind , pub is_plugin_enabled : * mut sys :: godot_method_bind , pub make_mesh_previews : * mut sys :: godot_method_bind , pub open_scene_from_path : * mut sys :: godot_method_bind , pub play_current_scene : * mut sys :: godot_method_bind , pub play_custom_scene : * mut sys :: godot_method_bind , pub play_main_scene : * mut sys :: godot_method_bind , pub reload_scene_from_path : * mut sys :: godot_method_bind , pub save_scene : * mut sys :: godot_method_bind , pub save_scene_as : * mut sys :: godot_method_bind , pub select_file : * mut sys :: godot_method_bind , pub set_distraction_free_mode : * mut sys :: godot_method_bind , pub set_main_screen_editor : * mut sys :: godot_method_bind , pub set_plugin_enabled : * mut sys :: godot_method_bind , pub stop_playing_scene : * mut sys :: godot_method_bind } impl EditorInterfaceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorInterfaceMethodTable = EditorInterfaceMethodTable { class_constructor : None , edit_node : 0 as * mut sys :: godot_method_bind , edit_resource : 0 as * mut sys :: godot_method_bind , edit_script : 0 as * mut sys :: godot_method_bind , get_base_control : 0 as * mut sys :: godot_method_bind , get_current_path : 0 as * mut sys :: godot_method_bind , get_edited_scene_root : 0 as * mut sys :: godot_method_bind , get_editor_scale : 0 as * mut sys :: godot_method_bind , get_editor_settings : 0 as * mut sys :: godot_method_bind , get_editor_viewport : 0 as * mut sys :: godot_method_bind , get_file_system_dock : 0 as * mut sys :: godot_method_bind , get_inspector : 0 as * mut sys :: godot_method_bind , get_open_scenes : 0 as * mut sys :: godot_method_bind , get_playing_scene : 0 as * mut sys :: godot_method_bind , get_resource_filesystem : 0 as * mut sys :: godot_method_bind , get_resource_previewer : 0 as * mut sys :: godot_method_bind , get_script_editor : 0 as * mut sys :: godot_method_bind , get_selected_path : 0 as * mut sys :: godot_method_bind , get_selection : 0 as * mut sys :: godot_method_bind , inspect_object : 0 as * mut sys :: godot_method_bind , is_distraction_free_mode_enabled : 0 as * mut sys :: godot_method_bind , is_playing_scene : 0 as * mut sys :: godot_method_bind , is_plugin_enabled : 0 as * mut sys :: godot_method_bind , make_mesh_previews : 0 as * mut sys :: godot_method_bind , open_scene_from_path : 0 as * mut sys :: godot_method_bind , play_current_scene : 0 as * mut sys :: godot_method_bind , play_custom_scene : 0 as * mut sys :: godot_method_bind , play_main_scene : 0 as * mut sys :: godot_method_bind , reload_scene_from_path : 0 as * mut sys :: godot_method_bind , save_scene : 0 as * mut sys :: godot_method_bind , save_scene_as : 0 as * mut sys :: godot_method_bind , select_file : 0 as * mut sys :: godot_method_bind , set_distraction_free_mode : 0 as * mut sys :: godot_method_bind , set_main_screen_editor : 0 as * mut sys :: godot_method_bind , set_plugin_enabled : 0 as * mut sys :: godot_method_bind , stop_playing_scene : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorInterfaceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorInterface\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . edit_node = (gd_api . godot_method_bind_get_method) (class_name , "edit_node\0" . as_ptr () as * const c_char) ; table . edit_resource = (gd_api . godot_method_bind_get_method) (class_name , "edit_resource\0" . as_ptr () as * const c_char) ; table . edit_script = (gd_api . godot_method_bind_get_method) (class_name , "edit_script\0" . as_ptr () as * const c_char) ; table . get_base_control = (gd_api . godot_method_bind_get_method) (class_name , "get_base_control\0" . as_ptr () as * const c_char) ; table . get_current_path = (gd_api . godot_method_bind_get_method) (class_name , "get_current_path\0" . as_ptr () as * const c_char) ; table . get_edited_scene_root = (gd_api . godot_method_bind_get_method) (class_name , "get_edited_scene_root\0" . as_ptr () as * const c_char) ; table . get_editor_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_scale\0" . as_ptr () as * const c_char) ; table . get_editor_settings = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_settings\0" . as_ptr () as * const c_char) ; table . get_editor_viewport = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_viewport\0" . as_ptr () as * const c_char) ; table . get_file_system_dock = (gd_api . godot_method_bind_get_method) (class_name , "get_file_system_dock\0" . as_ptr () as * const c_char) ; table . get_inspector = (gd_api . godot_method_bind_get_method) (class_name , "get_inspector\0" . as_ptr () as * const c_char) ; table . get_open_scenes = (gd_api . godot_method_bind_get_method) (class_name , "get_open_scenes\0" . as_ptr () as * const c_char) ; table . get_playing_scene = (gd_api . godot_method_bind_get_method) (class_name , "get_playing_scene\0" . as_ptr () as * const c_char) ; table . get_resource_filesystem = (gd_api . godot_method_bind_get_method) (class_name , "get_resource_filesystem\0" . as_ptr () as * const c_char) ; table . get_resource_previewer = (gd_api . godot_method_bind_get_method) (class_name , "get_resource_previewer\0" . as_ptr () as * const c_char) ; table . get_script_editor = (gd_api . godot_method_bind_get_method) (class_name , "get_script_editor\0" . as_ptr () as * const c_char) ; table . get_selected_path = (gd_api . godot_method_bind_get_method) (class_name , "get_selected_path\0" . as_ptr () as * const c_char) ; table . get_selection = (gd_api . godot_method_bind_get_method) (class_name , "get_selection\0" . as_ptr () as * const c_char) ; table . inspect_object = (gd_api . godot_method_bind_get_method) (class_name , "inspect_object\0" . as_ptr () as * const c_char) ; table . is_distraction_free_mode_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_distraction_free_mode_enabled\0" . as_ptr () as * const c_char) ; table . is_playing_scene = (gd_api . godot_method_bind_get_method) (class_name , "is_playing_scene\0" . as_ptr () as * const c_char) ; table . is_plugin_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_plugin_enabled\0" . as_ptr () as * const c_char) ; table . make_mesh_previews = (gd_api . godot_method_bind_get_method) (class_name , "make_mesh_previews\0" . as_ptr () as * const c_char) ; table . open_scene_from_path = (gd_api . godot_method_bind_get_method) (class_name , "open_scene_from_path\0" . as_ptr () as * const c_char) ; table . play_current_scene = (gd_api . godot_method_bind_get_method) (class_name , "play_current_scene\0" . as_ptr () as * const c_char) ; table . play_custom_scene = (gd_api . godot_method_bind_get_method) (class_name , "play_custom_scene\0" . as_ptr () as * const c_char) ; table . play_main_scene = (gd_api . godot_method_bind_get_method) (class_name , "play_main_scene\0" . as_ptr () as * const c_char) ; table . reload_scene_from_path = (gd_api . godot_method_bind_get_method) (class_name , "reload_scene_from_path\0" . as_ptr () as * const c_char) ; table . save_scene = (gd_api . godot_method_bind_get_method) (class_name , "save_scene\0" . as_ptr () as * const c_char) ; table . save_scene_as = (gd_api . godot_method_bind_get_method) (class_name , "save_scene_as\0" . as_ptr () as * const c_char) ; table . select_file = (gd_api . godot_method_bind_get_method) (class_name , "select_file\0" . as_ptr () as * const c_char) ; table . set_distraction_free_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_distraction_free_mode\0" . as_ptr () as * const c_char) ; table . set_main_screen_editor = (gd_api . godot_method_bind_get_method) (class_name , "set_main_screen_editor\0" . as_ptr () as * const c_char) ; table . set_plugin_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_plugin_enabled\0" . as_ptr () as * const c_char) ; table . stop_playing_scene = (gd_api . godot_method_bind_get_method) (class_name , "stop_playing_scene\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_interface::private::EditorInterface;
            
            pub mod editor_plugin {
                # ! [doc = "This module contains types related to the API class [`EditorPlugin`][super::EditorPlugin]."] pub (crate) mod private { # [doc = "`tools class EditorPlugin` inherits `Node` (manually managed).\n\nThis class has related types in the [`editor_plugin`][super::editor_plugin] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorplugin.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorPlugin inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorPlugin { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorPlugin ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CustomControlContainer (pub i64) ; impl CustomControlContainer { pub const TOOLBAR : CustomControlContainer = CustomControlContainer (0i64) ; pub const SPATIAL_EDITOR_MENU : CustomControlContainer = CustomControlContainer (1i64) ; pub const SPATIAL_EDITOR_SIDE_LEFT : CustomControlContainer = CustomControlContainer (2i64) ; pub const SPATIAL_EDITOR_SIDE_RIGHT : CustomControlContainer = CustomControlContainer (3i64) ; pub const SPATIAL_EDITOR_BOTTOM : CustomControlContainer = CustomControlContainer (4i64) ; pub const CANVAS_EDITOR_MENU : CustomControlContainer = CustomControlContainer (5i64) ; pub const CANVAS_EDITOR_SIDE_LEFT : CustomControlContainer = CustomControlContainer (6i64) ; pub const CANVAS_EDITOR_SIDE_RIGHT : CustomControlContainer = CustomControlContainer (7i64) ; pub const CANVAS_EDITOR_BOTTOM : CustomControlContainer = CustomControlContainer (8i64) ; pub const PROPERTY_EDITOR_BOTTOM : CustomControlContainer = CustomControlContainer (9i64) ; pub const PROJECT_SETTING_TAB_LEFT : CustomControlContainer = CustomControlContainer (10i64) ; pub const PROJECT_SETTING_TAB_RIGHT : CustomControlContainer = CustomControlContainer (11i64) ; } impl From < i64 > for CustomControlContainer { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CustomControlContainer > for i64 { # [inline] fn from (v : CustomControlContainer) -> Self { v . 0 } } impl FromVariant for CustomControlContainer { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DockSlot (pub i64) ; impl DockSlot { pub const LEFT_UL : DockSlot = DockSlot (0i64) ; pub const LEFT_BL : DockSlot = DockSlot (1i64) ; pub const LEFT_UR : DockSlot = DockSlot (2i64) ; pub const LEFT_BR : DockSlot = DockSlot (3i64) ; pub const RIGHT_UL : DockSlot = DockSlot (4i64) ; pub const RIGHT_BL : DockSlot = DockSlot (5i64) ; pub const RIGHT_UR : DockSlot = DockSlot (6i64) ; pub const RIGHT_BR : DockSlot = DockSlot (7i64) ; pub const MAX : DockSlot = DockSlot (8i64) ; } impl From < i64 > for DockSlot { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DockSlot > for i64 { # [inline] fn from (v : DockSlot) -> Self { v . 0 } } impl FromVariant for DockSlot { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl EditorPlugin { pub const CONTAINER_TOOLBAR : i64 = 0i64 ; pub const DOCK_SLOT_LEFT_UL : i64 = 0i64 ; pub const CONTAINER_SPATIAL_EDITOR_MENU : i64 = 1i64 ; pub const DOCK_SLOT_LEFT_BL : i64 = 1i64 ; pub const CONTAINER_SPATIAL_EDITOR_SIDE_LEFT : i64 = 2i64 ; pub const DOCK_SLOT_LEFT_UR : i64 = 2i64 ; pub const CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT : i64 = 3i64 ; pub const DOCK_SLOT_LEFT_BR : i64 = 3i64 ; pub const CONTAINER_SPATIAL_EDITOR_BOTTOM : i64 = 4i64 ; pub const DOCK_SLOT_RIGHT_UL : i64 = 4i64 ; pub const CONTAINER_CANVAS_EDITOR_MENU : i64 = 5i64 ; pub const DOCK_SLOT_RIGHT_BL : i64 = 5i64 ; pub const CONTAINER_CANVAS_EDITOR_SIDE_LEFT : i64 = 6i64 ; pub const DOCK_SLOT_RIGHT_UR : i64 = 6i64 ; pub const CONTAINER_CANVAS_EDITOR_SIDE_RIGHT : i64 = 7i64 ; pub const DOCK_SLOT_RIGHT_BR : i64 = 7i64 ; pub const CONTAINER_CANVAS_EDITOR_BOTTOM : i64 = 8i64 ; pub const DOCK_SLOT_MAX : i64 = 8i64 ; pub const CONTAINER_PROPERTY_EDITOR_BOTTOM : i64 = 9i64 ; pub const CONTAINER_PROJECT_SETTING_TAB_LEFT : i64 = 10i64 ; pub const CONTAINER_PROJECT_SETTING_TAB_RIGHT : i64 = 11i64 ; } impl EditorPlugin { # [doc = "Adds a script at `path` to the Autoload list as `name`."] # [doc = ""] # [inline] pub fn add_autoload_singleton (& self , name : impl Into < GodotString > , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_autoload_singleton ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , path . into ()) ; } } # [doc = "Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [`remove_control_from_bottom_panel`][Self::remove_control_from_bottom_panel] and free it with [`Node.queue_free`][Node::queue_free]."] # [doc = ""] # [inline] pub fn add_control_to_bottom_panel (& self , control : impl AsArg < crate :: generated :: Control > , title : impl Into < GodotString >) -> Option < Ref < crate :: generated :: ToolButton , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_control_to_bottom_panel ; let ret = crate :: icalls :: icallvar__obj_str (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr () , title . into ()) ; < Option < Ref < crate :: generated :: ToolButton , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Adds a custom control to a container (see [`CustomControlContainer`][CustomControlContainer]). There are many locations where custom controls can be added in the editor UI.\nPlease remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).\nWhen your plugin is deactivated, make sure to remove your custom control with [`remove_control_from_container`][Self::remove_control_from_container] and free it with [`Node.queue_free`][Node::queue_free]."] # [doc = ""] # [inline] pub fn add_control_to_container (& self , container : i64 , control : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_control_to_container ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , container as _ , control . as_arg_ptr ()) ; } } # [doc = "Adds the control to a specific dock slot (see [`DockSlot`][DockSlot] for options).\nIf the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.\nWhen your plugin is deactivated, make sure to remove your custom control with [`remove_control_from_docks`][Self::remove_control_from_docks] and free it with [`Node.queue_free`][Node::queue_free]."] # [doc = ""] # [inline] pub fn add_control_to_dock (& self , slot : i64 , control : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_control_to_dock ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , slot as _ , control . as_arg_ptr ()) ; } } # [doc = "Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.\nWhen given node or resource is selected, the base type will be instanced (ie, \"Spatial\", \"Control\", \"Resource\"), then the script will be loaded and set to this object.\nYou can use the virtual method [`handles`][Self::handles] to check if your custom object is being edited by checking the script or using the `is` keyword.\nDuring run-time, this will be a simple object with a script so this function does not need to be called then."] # [doc = ""] # [inline] pub fn add_custom_type (& self , type_ : impl Into < GodotString > , base : impl Into < GodotString > , script : impl AsArg < crate :: generated :: Script > , icon : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_custom_type ; let ret = crate :: icalls :: icallvar__str_str_obj_obj (method_bind , self . this . sys () . as_ptr () , type_ . into () , base . into () , script . as_arg_ptr () , icon . as_arg_ptr ()) ; } } # [doc = "Registers a new [`EditorExportPlugin`][EditorExportPlugin]. Export plugins are used to perform tasks when the project is being exported.\nSee [`add_inspector_plugin`][Self::add_inspector_plugin] for an example of how to register a plugin."] # [doc = ""] # [inline] pub fn add_export_plugin (& self , plugin : impl AsArg < crate :: generated :: EditorExportPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_export_plugin ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = "Registers a new [`EditorImportPlugin`][EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [`Resource`][Resource] type.\n**Note:** If you want to import custom 3D asset formats use [`add_scene_import_plugin`][Self::add_scene_import_plugin] instead.\nSee [`add_inspector_plugin`][Self::add_inspector_plugin] for an example of how to register a plugin."] # [doc = ""] # [inline] pub fn add_import_plugin (& self , importer : impl AsArg < crate :: generated :: EditorImportPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_import_plugin ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , importer . as_arg_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nRegisters a new [`EditorInspectorPlugin`][EditorInspectorPlugin]. Inspector plugins are used to extend [`EditorInspector`][EditorInspector] and provide custom configuration tools for your object's properties.\n**Note:** Always use [`remove_inspector_plugin`][Self::remove_inspector_plugin] to remove the registered [`EditorInspectorPlugin`][EditorInspectorPlugin] when your [`EditorPlugin`][EditorPlugin] is disabled to prevent leaks and an unexpected behavior.\n```gdscript\nconst MyInspectorPlugin = preload(\"res://addons/your_addon/path/to/your/script.gd\")\nvar inspector_plugin = MyInspectorPlugin.new()\n\nfunc _enter_tree():\n    add_inspector_plugin(inspector_plugin)\n\nfunc _exit_tree():\n    remove_inspector_plugin(inspector_plugin)\n```"] # [doc = ""] # [inline] pub fn add_inspector_plugin (& self , plugin : impl AsArg < crate :: generated :: EditorInspectorPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_inspector_plugin ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = "Registers a new [`EditorSceneImporter`][EditorSceneImporter]. Scene importers are used to import custom 3D asset formats as scenes."] # [doc = ""] # [inline] pub fn add_scene_import_plugin (& self , scene_importer : impl AsArg < crate :: generated :: EditorSceneImporter >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_scene_import_plugin ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , scene_importer . as_arg_ptr ()) ; } } # [doc = "Registers a new [`EditorSpatialGizmoPlugin`][EditorSpatialGizmoPlugin]. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a [`Spatial`][Spatial].\nSee [`add_inspector_plugin`][Self::add_inspector_plugin] for an example of how to register a plugin."] # [doc = ""] # [inline] pub fn add_spatial_gizmo_plugin (& self , plugin : impl AsArg < crate :: generated :: EditorSpatialGizmoPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_spatial_gizmo_plugin ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = "Adds a custom menu item to **Project > Tools** as `name` that calls `callback` on an instance of `handler` with a parameter `ud` when user activates it.\n# Default Arguments\n* `ud` - `null`"] # [doc = ""] # [inline] pub fn add_tool_menu_item (& self , name : impl Into < GodotString > , handler : impl AsArg < crate :: generated :: Object > , callback : impl Into < GodotString > , ud : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_tool_menu_item ; let ret = crate :: icalls :: icallvar__str_obj_str_var (method_bind , self . this . sys () . as_ptr () , name . into () , handler . as_arg_ptr () , callback . into () , ud . owned_to_variant ()) ; } } # [doc = "Adds a custom submenu under **Project > Tools >** `name`. `submenu` should be an object of class [`PopupMenu`][PopupMenu]. This submenu should be cleaned up using `remove_tool_menu_item(name)`."] # [doc = ""] # [inline] pub fn add_tool_submenu_item (& self , name : impl Into < GodotString > , submenu : impl AsArg < crate :: generated :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . add_tool_submenu_item ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , submenu . as_arg_ptr ()) ; } } # [doc = "Returns the [`EditorInterface`][EditorInterface] object that gives you control over Godot editor's window and its functionalities."] # [doc = ""] # [inline] pub fn get_editor_interface (& self) -> Option < Ref < crate :: generated :: EditorInterface , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . get_editor_interface ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: EditorInterface , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the Editor's dialog used for making scripts.\n**Note:** Users can configure it before use.\n**Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash."] # [doc = ""] # [inline] pub fn get_script_create_dialog (& self) -> Option < Ref < crate :: generated :: ScriptCreateDialog , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . get_script_create_dialog ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: ScriptCreateDialog , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it."] # [doc = ""] # [inline] pub fn get_undo_redo (& self) -> Option < Ref < crate :: generated :: UndoRedo , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . get_undo_redo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: UndoRedo , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Minimizes the bottom panel."] # [doc = ""] # [inline] pub fn hide_bottom_panel (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . hide_bottom_panel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Makes a specific item in the bottom panel visible."] # [doc = ""] # [inline] pub fn make_bottom_panel_item_visible (& self , item : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . make_bottom_panel_item_visible ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , item . as_arg_ptr ()) ; } } # [doc = "Queue save the project's editor layout."] # [doc = ""] # [inline] pub fn queue_save_layout (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . queue_save_layout ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes an Autoload `name` from the list."] # [doc = ""] # [inline] pub fn remove_autoload_singleton (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_autoload_singleton ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Removes the control from the bottom panel. You have to manually [`Node.queue_free`][Node::queue_free] the control."] # [doc = ""] # [inline] pub fn remove_control_from_bottom_panel (& self , control : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_control_from_bottom_panel ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr ()) ; } } # [doc = "Removes the control from the specified container. You have to manually [`Node.queue_free`][Node::queue_free] the control."] # [doc = ""] # [inline] pub fn remove_control_from_container (& self , container : i64 , control : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_control_from_container ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , container as _ , control . as_arg_ptr ()) ; } } # [doc = "Removes the control from the dock. You have to manually [`Node.queue_free`][Node::queue_free] the control."] # [doc = ""] # [inline] pub fn remove_control_from_docks (& self , control : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_control_from_docks ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr ()) ; } } # [doc = "Removes a custom type added by [`add_custom_type`][Self::add_custom_type]."] # [doc = ""] # [inline] pub fn remove_custom_type (& self , type_ : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_custom_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , type_ . into ()) ; } } # [doc = "Removes an export plugin registered by [`add_export_plugin`][Self::add_export_plugin]."] # [doc = ""] # [inline] pub fn remove_export_plugin (& self , plugin : impl AsArg < crate :: generated :: EditorExportPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_export_plugin ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = "Removes an import plugin registered by [`add_import_plugin`][Self::add_import_plugin]."] # [doc = ""] # [inline] pub fn remove_import_plugin (& self , importer : impl AsArg < crate :: generated :: EditorImportPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_import_plugin ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , importer . as_arg_ptr ()) ; } } # [doc = "Removes an inspector plugin registered by [`add_import_plugin`][Self::add_import_plugin]"] # [doc = ""] # [inline] pub fn remove_inspector_plugin (& self , plugin : impl AsArg < crate :: generated :: EditorInspectorPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_inspector_plugin ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = "Removes a scene importer registered by [`add_scene_import_plugin`][Self::add_scene_import_plugin]."] # [doc = ""] # [inline] pub fn remove_scene_import_plugin (& self , scene_importer : impl AsArg < crate :: generated :: EditorSceneImporter >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_scene_import_plugin ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , scene_importer . as_arg_ptr ()) ; } } # [doc = "Removes a gizmo plugin registered by [`add_spatial_gizmo_plugin`][Self::add_spatial_gizmo_plugin]."] # [doc = ""] # [inline] pub fn remove_spatial_gizmo_plugin (& self , plugin : impl AsArg < crate :: generated :: EditorSpatialGizmoPlugin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_spatial_gizmo_plugin ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , plugin . as_arg_ptr ()) ; } } # [doc = "Removes a menu `name` from **Project > Tools**."] # [doc = ""] # [inline] pub fn remove_tool_menu_item (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . remove_tool_menu_item ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Enables calling of [`forward_canvas_force_draw_over_viewport`][Self::forward_canvas_force_draw_over_viewport] for the 2D editor and [`forward_spatial_force_draw_over_viewport`][Self::forward_spatial_force_draw_over_viewport] for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin."] # [doc = ""] # [inline] pub fn set_force_draw_over_forwarding_enabled (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . set_force_draw_over_forwarding_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Use this method if you always want to receive inputs from 3D view screen inside [`forward_spatial_gui_input`][Self::forward_spatial_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene."] # [doc = ""] # [inline] pub fn set_input_event_forwarding_always_enabled (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . set_input_event_forwarding_always_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Updates the overlays of the 2D and 3D editor viewport. Causes methods [`forward_canvas_draw_over_viewport`][Self::forward_canvas_draw_over_viewport], [`forward_canvas_force_draw_over_viewport`][Self::forward_canvas_force_draw_over_viewport], [`forward_spatial_draw_over_viewport`][Self::forward_spatial_draw_over_viewport] and [`forward_spatial_force_draw_over_viewport`][Self::forward_spatial_force_draw_over_viewport] to be called."] # [doc = ""] # [inline] pub fn update_overlays (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPluginMethodTable :: get (get_api ()) . update_overlays ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorPlugin { } unsafe impl GodotObject for EditorPlugin { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorPlugin" } } impl QueueFree for EditorPlugin { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for EditorPlugin { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for EditorPlugin { } unsafe impl SubClass < crate :: generated :: Object > for EditorPlugin { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorPluginMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_autoload_singleton : * mut sys :: godot_method_bind , pub add_control_to_bottom_panel : * mut sys :: godot_method_bind , pub add_control_to_container : * mut sys :: godot_method_bind , pub add_control_to_dock : * mut sys :: godot_method_bind , pub add_custom_type : * mut sys :: godot_method_bind , pub add_export_plugin : * mut sys :: godot_method_bind , pub add_import_plugin : * mut sys :: godot_method_bind , pub add_inspector_plugin : * mut sys :: godot_method_bind , pub add_scene_import_plugin : * mut sys :: godot_method_bind , pub add_spatial_gizmo_plugin : * mut sys :: godot_method_bind , pub add_tool_menu_item : * mut sys :: godot_method_bind , pub add_tool_submenu_item : * mut sys :: godot_method_bind , pub get_editor_interface : * mut sys :: godot_method_bind , pub get_script_create_dialog : * mut sys :: godot_method_bind , pub get_undo_redo : * mut sys :: godot_method_bind , pub hide_bottom_panel : * mut sys :: godot_method_bind , pub make_bottom_panel_item_visible : * mut sys :: godot_method_bind , pub queue_save_layout : * mut sys :: godot_method_bind , pub remove_autoload_singleton : * mut sys :: godot_method_bind , pub remove_control_from_bottom_panel : * mut sys :: godot_method_bind , pub remove_control_from_container : * mut sys :: godot_method_bind , pub remove_control_from_docks : * mut sys :: godot_method_bind , pub remove_custom_type : * mut sys :: godot_method_bind , pub remove_export_plugin : * mut sys :: godot_method_bind , pub remove_import_plugin : * mut sys :: godot_method_bind , pub remove_inspector_plugin : * mut sys :: godot_method_bind , pub remove_scene_import_plugin : * mut sys :: godot_method_bind , pub remove_spatial_gizmo_plugin : * mut sys :: godot_method_bind , pub remove_tool_menu_item : * mut sys :: godot_method_bind , pub set_force_draw_over_forwarding_enabled : * mut sys :: godot_method_bind , pub set_input_event_forwarding_always_enabled : * mut sys :: godot_method_bind , pub update_overlays : * mut sys :: godot_method_bind } impl EditorPluginMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorPluginMethodTable = EditorPluginMethodTable { class_constructor : None , add_autoload_singleton : 0 as * mut sys :: godot_method_bind , add_control_to_bottom_panel : 0 as * mut sys :: godot_method_bind , add_control_to_container : 0 as * mut sys :: godot_method_bind , add_control_to_dock : 0 as * mut sys :: godot_method_bind , add_custom_type : 0 as * mut sys :: godot_method_bind , add_export_plugin : 0 as * mut sys :: godot_method_bind , add_import_plugin : 0 as * mut sys :: godot_method_bind , add_inspector_plugin : 0 as * mut sys :: godot_method_bind , add_scene_import_plugin : 0 as * mut sys :: godot_method_bind , add_spatial_gizmo_plugin : 0 as * mut sys :: godot_method_bind , add_tool_menu_item : 0 as * mut sys :: godot_method_bind , add_tool_submenu_item : 0 as * mut sys :: godot_method_bind , get_editor_interface : 0 as * mut sys :: godot_method_bind , get_script_create_dialog : 0 as * mut sys :: godot_method_bind , get_undo_redo : 0 as * mut sys :: godot_method_bind , hide_bottom_panel : 0 as * mut sys :: godot_method_bind , make_bottom_panel_item_visible : 0 as * mut sys :: godot_method_bind , queue_save_layout : 0 as * mut sys :: godot_method_bind , remove_autoload_singleton : 0 as * mut sys :: godot_method_bind , remove_control_from_bottom_panel : 0 as * mut sys :: godot_method_bind , remove_control_from_container : 0 as * mut sys :: godot_method_bind , remove_control_from_docks : 0 as * mut sys :: godot_method_bind , remove_custom_type : 0 as * mut sys :: godot_method_bind , remove_export_plugin : 0 as * mut sys :: godot_method_bind , remove_import_plugin : 0 as * mut sys :: godot_method_bind , remove_inspector_plugin : 0 as * mut sys :: godot_method_bind , remove_scene_import_plugin : 0 as * mut sys :: godot_method_bind , remove_spatial_gizmo_plugin : 0 as * mut sys :: godot_method_bind , remove_tool_menu_item : 0 as * mut sys :: godot_method_bind , set_force_draw_over_forwarding_enabled : 0 as * mut sys :: godot_method_bind , set_input_event_forwarding_always_enabled : 0 as * mut sys :: godot_method_bind , update_overlays : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorPluginMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorPlugin\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_autoload_singleton = (gd_api . godot_method_bind_get_method) (class_name , "add_autoload_singleton\0" . as_ptr () as * const c_char) ; table . add_control_to_bottom_panel = (gd_api . godot_method_bind_get_method) (class_name , "add_control_to_bottom_panel\0" . as_ptr () as * const c_char) ; table . add_control_to_container = (gd_api . godot_method_bind_get_method) (class_name , "add_control_to_container\0" . as_ptr () as * const c_char) ; table . add_control_to_dock = (gd_api . godot_method_bind_get_method) (class_name , "add_control_to_dock\0" . as_ptr () as * const c_char) ; table . add_custom_type = (gd_api . godot_method_bind_get_method) (class_name , "add_custom_type\0" . as_ptr () as * const c_char) ; table . add_export_plugin = (gd_api . godot_method_bind_get_method) (class_name , "add_export_plugin\0" . as_ptr () as * const c_char) ; table . add_import_plugin = (gd_api . godot_method_bind_get_method) (class_name , "add_import_plugin\0" . as_ptr () as * const c_char) ; table . add_inspector_plugin = (gd_api . godot_method_bind_get_method) (class_name , "add_inspector_plugin\0" . as_ptr () as * const c_char) ; table . add_scene_import_plugin = (gd_api . godot_method_bind_get_method) (class_name , "add_scene_import_plugin\0" . as_ptr () as * const c_char) ; table . add_spatial_gizmo_plugin = (gd_api . godot_method_bind_get_method) (class_name , "add_spatial_gizmo_plugin\0" . as_ptr () as * const c_char) ; table . add_tool_menu_item = (gd_api . godot_method_bind_get_method) (class_name , "add_tool_menu_item\0" . as_ptr () as * const c_char) ; table . add_tool_submenu_item = (gd_api . godot_method_bind_get_method) (class_name , "add_tool_submenu_item\0" . as_ptr () as * const c_char) ; table . get_editor_interface = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_interface\0" . as_ptr () as * const c_char) ; table . get_script_create_dialog = (gd_api . godot_method_bind_get_method) (class_name , "get_script_create_dialog\0" . as_ptr () as * const c_char) ; table . get_undo_redo = (gd_api . godot_method_bind_get_method) (class_name , "get_undo_redo\0" . as_ptr () as * const c_char) ; table . hide_bottom_panel = (gd_api . godot_method_bind_get_method) (class_name , "hide_bottom_panel\0" . as_ptr () as * const c_char) ; table . make_bottom_panel_item_visible = (gd_api . godot_method_bind_get_method) (class_name , "make_bottom_panel_item_visible\0" . as_ptr () as * const c_char) ; table . queue_save_layout = (gd_api . godot_method_bind_get_method) (class_name , "queue_save_layout\0" . as_ptr () as * const c_char) ; table . remove_autoload_singleton = (gd_api . godot_method_bind_get_method) (class_name , "remove_autoload_singleton\0" . as_ptr () as * const c_char) ; table . remove_control_from_bottom_panel = (gd_api . godot_method_bind_get_method) (class_name , "remove_control_from_bottom_panel\0" . as_ptr () as * const c_char) ; table . remove_control_from_container = (gd_api . godot_method_bind_get_method) (class_name , "remove_control_from_container\0" . as_ptr () as * const c_char) ; table . remove_control_from_docks = (gd_api . godot_method_bind_get_method) (class_name , "remove_control_from_docks\0" . as_ptr () as * const c_char) ; table . remove_custom_type = (gd_api . godot_method_bind_get_method) (class_name , "remove_custom_type\0" . as_ptr () as * const c_char) ; table . remove_export_plugin = (gd_api . godot_method_bind_get_method) (class_name , "remove_export_plugin\0" . as_ptr () as * const c_char) ; table . remove_import_plugin = (gd_api . godot_method_bind_get_method) (class_name , "remove_import_plugin\0" . as_ptr () as * const c_char) ; table . remove_inspector_plugin = (gd_api . godot_method_bind_get_method) (class_name , "remove_inspector_plugin\0" . as_ptr () as * const c_char) ; table . remove_scene_import_plugin = (gd_api . godot_method_bind_get_method) (class_name , "remove_scene_import_plugin\0" . as_ptr () as * const c_char) ; table . remove_spatial_gizmo_plugin = (gd_api . godot_method_bind_get_method) (class_name , "remove_spatial_gizmo_plugin\0" . as_ptr () as * const c_char) ; table . remove_tool_menu_item = (gd_api . godot_method_bind_get_method) (class_name , "remove_tool_menu_item\0" . as_ptr () as * const c_char) ; table . set_force_draw_over_forwarding_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_force_draw_over_forwarding_enabled\0" . as_ptr () as * const c_char) ; table . set_input_event_forwarding_always_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_input_event_forwarding_always_enabled\0" . as_ptr () as * const c_char) ; table . update_overlays = (gd_api . godot_method_bind_get_method) (class_name , "update_overlays\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_plugin::private::EditorPlugin;
            
            pub(crate) mod editor_property {
                # ! [doc = "This module contains types related to the API class [`EditorProperty`][super::EditorProperty]."] pub (crate) mod private { # [doc = "`tools class EditorProperty` inherits `Container` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorproperty.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorProperty inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorProperty { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorProperty ; impl EditorProperty { # [doc = "If any of the controls added can gain keyboard focus, add it here. This ensures that focus will be restored if the inspector is refreshed."] # [doc = ""] # [inline] pub fn add_focusable (& self , control : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . add_focusable ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr ()) ; } } # [doc = "If one or several properties have changed, this must be called. `field` is used in case your editor can modify fields separately (as an example, Vector3.x). The `changing` argument avoids the editor requesting this property to be refreshed (leave as `false` if unsure).\n# Default Arguments\n* `field` - `\"\"`\n* `changing` - `false`"] # [doc = ""] # [inline] pub fn emit_changed (& self , property : impl Into < GodotString > , value : impl OwnedToVariant , field : impl Into < GodotString > , changing : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . emit_changed ; let ret = crate :: icalls :: icallvar__str_var_str_bool (method_bind , self . this . sys () . as_ptr () , property . into () , value . owned_to_variant () , field . into () , changing as _) ; } } # [doc = "Gets the edited object."] # [doc = ""] # [inline] pub fn get_edited_object (& self) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . get_edited_object ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the edited property. If your editor is for a single property (added via [`EditorInspectorPlugin.parse_property`][EditorInspectorPlugin::parse_property]), then this will return the property."] # [doc = ""] # [inline] pub fn get_edited_property (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . get_edited_property ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Set this property to change the label (if you want to show one)."] # [doc = ""] # [inline] pub fn label (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . get_label ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Must be implemented to provide a custom tooltip to the property editor."] # [doc = ""] # [inline] pub fn get_tooltip_text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . get_tooltip_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Used by the inspector, set to `true` when the property is checkable."] # [doc = ""] # [inline] pub fn is_checkable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . is_checkable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Used by the inspector, set to `true` when the property is checked."] # [doc = ""] # [inline] pub fn is_checked (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . is_checked ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Used by the inspector, set to `true` when the property is drawn with the editor theme's warning color. This is used for editable children's properties."] # [doc = ""] # [inline] pub fn is_draw_red (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . is_draw_red ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Used by the inspector, set to `true` when the property can add keys for animation."] # [doc = ""] # [inline] pub fn is_keying (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . is_keying ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Used by the inspector, set to `true` when the property is read-only."] # [doc = ""] # [inline] pub fn is_read_only (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . is_read_only ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Puts the `editor` control below the property label. The control must be previously added using [`Node.add_child`][Node::add_child]."] # [doc = ""] # [inline] pub fn set_bottom_editor (& self , editor : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . set_bottom_editor ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , editor . as_arg_ptr ()) ; } } # [doc = "Used by the inspector, set to `true` when the property is checkable."] # [doc = ""] # [inline] pub fn set_checkable (& self , checkable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . set_checkable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , checkable as _) ; } } # [doc = "Used by the inspector, set to `true` when the property is checked."] # [doc = ""] # [inline] pub fn set_checked (& self , checked : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . set_checked ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , checked as _) ; } } # [doc = "Used by the inspector, set to `true` when the property is drawn with the editor theme's warning color. This is used for editable children's properties."] # [doc = ""] # [inline] pub fn set_draw_red (& self , draw_red : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . set_draw_red ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , draw_red as _) ; } } # [doc = "Used by the inspector, set to `true` when the property can add keys for animation."] # [doc = ""] # [inline] pub fn set_keying (& self , keying : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . set_keying ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , keying as _) ; } } # [doc = "Set this property to change the label (if you want to show one)."] # [doc = ""] # [inline] pub fn set_label (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . set_label ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Used by the inspector, set to `true` when the property is read-only."] # [doc = ""] # [inline] pub fn set_read_only (& self , read_only : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorPropertyMethodTable :: get (get_api ()) . set_read_only ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , read_only as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorProperty { } unsafe impl GodotObject for EditorProperty { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorProperty" } } impl QueueFree for EditorProperty { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for EditorProperty { type Target = crate :: generated :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorProperty { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Container > for EditorProperty { } unsafe impl SubClass < crate :: generated :: Control > for EditorProperty { } unsafe impl SubClass < crate :: generated :: CanvasItem > for EditorProperty { } unsafe impl SubClass < crate :: generated :: Node > for EditorProperty { } unsafe impl SubClass < crate :: generated :: Object > for EditorProperty { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorPropertyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_focusable : * mut sys :: godot_method_bind , pub emit_changed : * mut sys :: godot_method_bind , pub get_edited_object : * mut sys :: godot_method_bind , pub get_edited_property : * mut sys :: godot_method_bind , pub get_label : * mut sys :: godot_method_bind , pub get_tooltip_text : * mut sys :: godot_method_bind , pub is_checkable : * mut sys :: godot_method_bind , pub is_checked : * mut sys :: godot_method_bind , pub is_draw_red : * mut sys :: godot_method_bind , pub is_keying : * mut sys :: godot_method_bind , pub is_read_only : * mut sys :: godot_method_bind , pub set_bottom_editor : * mut sys :: godot_method_bind , pub set_checkable : * mut sys :: godot_method_bind , pub set_checked : * mut sys :: godot_method_bind , pub set_draw_red : * mut sys :: godot_method_bind , pub set_keying : * mut sys :: godot_method_bind , pub set_label : * mut sys :: godot_method_bind , pub set_read_only : * mut sys :: godot_method_bind } impl EditorPropertyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorPropertyMethodTable = EditorPropertyMethodTable { class_constructor : None , add_focusable : 0 as * mut sys :: godot_method_bind , emit_changed : 0 as * mut sys :: godot_method_bind , get_edited_object : 0 as * mut sys :: godot_method_bind , get_edited_property : 0 as * mut sys :: godot_method_bind , get_label : 0 as * mut sys :: godot_method_bind , get_tooltip_text : 0 as * mut sys :: godot_method_bind , is_checkable : 0 as * mut sys :: godot_method_bind , is_checked : 0 as * mut sys :: godot_method_bind , is_draw_red : 0 as * mut sys :: godot_method_bind , is_keying : 0 as * mut sys :: godot_method_bind , is_read_only : 0 as * mut sys :: godot_method_bind , set_bottom_editor : 0 as * mut sys :: godot_method_bind , set_checkable : 0 as * mut sys :: godot_method_bind , set_checked : 0 as * mut sys :: godot_method_bind , set_draw_red : 0 as * mut sys :: godot_method_bind , set_keying : 0 as * mut sys :: godot_method_bind , set_label : 0 as * mut sys :: godot_method_bind , set_read_only : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorPropertyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorProperty\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_focusable = (gd_api . godot_method_bind_get_method) (class_name , "add_focusable\0" . as_ptr () as * const c_char) ; table . emit_changed = (gd_api . godot_method_bind_get_method) (class_name , "emit_changed\0" . as_ptr () as * const c_char) ; table . get_edited_object = (gd_api . godot_method_bind_get_method) (class_name , "get_edited_object\0" . as_ptr () as * const c_char) ; table . get_edited_property = (gd_api . godot_method_bind_get_method) (class_name , "get_edited_property\0" . as_ptr () as * const c_char) ; table . get_label = (gd_api . godot_method_bind_get_method) (class_name , "get_label\0" . as_ptr () as * const c_char) ; table . get_tooltip_text = (gd_api . godot_method_bind_get_method) (class_name , "get_tooltip_text\0" . as_ptr () as * const c_char) ; table . is_checkable = (gd_api . godot_method_bind_get_method) (class_name , "is_checkable\0" . as_ptr () as * const c_char) ; table . is_checked = (gd_api . godot_method_bind_get_method) (class_name , "is_checked\0" . as_ptr () as * const c_char) ; table . is_draw_red = (gd_api . godot_method_bind_get_method) (class_name , "is_draw_red\0" . as_ptr () as * const c_char) ; table . is_keying = (gd_api . godot_method_bind_get_method) (class_name , "is_keying\0" . as_ptr () as * const c_char) ; table . is_read_only = (gd_api . godot_method_bind_get_method) (class_name , "is_read_only\0" . as_ptr () as * const c_char) ; table . set_bottom_editor = (gd_api . godot_method_bind_get_method) (class_name , "set_bottom_editor\0" . as_ptr () as * const c_char) ; table . set_checkable = (gd_api . godot_method_bind_get_method) (class_name , "set_checkable\0" . as_ptr () as * const c_char) ; table . set_checked = (gd_api . godot_method_bind_get_method) (class_name , "set_checked\0" . as_ptr () as * const c_char) ; table . set_draw_red = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_red\0" . as_ptr () as * const c_char) ; table . set_keying = (gd_api . godot_method_bind_get_method) (class_name , "set_keying\0" . as_ptr () as * const c_char) ; table . set_label = (gd_api . godot_method_bind_get_method) (class_name , "set_label\0" . as_ptr () as * const c_char) ; table . set_read_only = (gd_api . godot_method_bind_get_method) (class_name , "set_read_only\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_property::private::EditorProperty;
            
            pub(crate) mod editor_resource_conversion_plugin {
                # ! [doc = "This module contains types related to the API class [`EditorResourceConversionPlugin`][super::EditorResourceConversionPlugin]."] pub (crate) mod private { # [doc = "`tools class EditorResourceConversionPlugin` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorresourceconversionplugin.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorResourceConversionPlugin inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorResourceConversionPlugin { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorResourceConversionPlugin ; impl EditorResourceConversionPlugin { } impl gdnative_core :: private :: godot_object :: Sealed for EditorResourceConversionPlugin { } unsafe impl GodotObject for EditorResourceConversionPlugin { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorResourceConversionPlugin" } } impl std :: ops :: Deref for EditorResourceConversionPlugin { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorResourceConversionPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for EditorResourceConversionPlugin { } unsafe impl SubClass < crate :: generated :: Object > for EditorResourceConversionPlugin { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorResourceConversionPluginMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl EditorResourceConversionPluginMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorResourceConversionPluginMethodTable = EditorResourceConversionPluginMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorResourceConversionPluginMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorResourceConversionPlugin\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_resource_conversion_plugin::private::EditorResourceConversionPlugin;
            
            pub(crate) mod editor_resource_picker {
                # ! [doc = "This module contains types related to the API class [`EditorResourcePicker`][super::EditorResourcePicker]."] pub (crate) mod private { # [doc = "`tools class EditorResourcePicker` inherits `HBoxContainer` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorresourcepicker.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorResourcePicker inherits methods from:\n - [HBoxContainer](struct.HBoxContainer.html)\n - [BoxContainer](struct.BoxContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorResourcePicker { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorResourcePicker ; impl EditorResourcePicker { # [doc = ""] # [doc = ""] # [inline] pub fn can_drop_data_fw (& self , position : Vector2 , data : impl OwnedToVariant , from : impl AsArg < crate :: generated :: Control >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePickerMethodTable :: get (get_api ()) . can_drop_data_fw ; let ret = crate :: icalls :: icallvar__vec2_var_obj (method_bind , self . this . sys () . as_ptr () , position , data . owned_to_variant () , from . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn drop_data_fw (& self , position : Vector2 , data : impl OwnedToVariant , from : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePickerMethodTable :: get (get_api ()) . drop_data_fw ; let ret = crate :: icalls :: icallvar__vec2_var_obj (method_bind , self . this . sys () . as_ptr () , position , data . owned_to_variant () , from . as_arg_ptr ()) ; } } # [doc = "Returns a list of all allowed types and subtypes corresponding to the [`base_type`][Self::base_type]. If the [`base_type`][Self::base_type] is empty, an empty list is returned."] # [doc = ""] # [inline] pub fn get_allowed_types (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePickerMethodTable :: get (get_api ()) . get_allowed_types ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The base type of allowed resource types. Can be a comma-separated list of several options."] # [doc = ""] # [inline] pub fn base_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePickerMethodTable :: get (get_api ()) . get_base_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_drag_data_fw (& self , position : Vector2 , from : impl AsArg < crate :: generated :: Control >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePickerMethodTable :: get (get_api ()) . get_drag_data_fw ; let ret = crate :: icalls :: icallvar__vec2_obj (method_bind , self . this . sys () . as_ptr () , position , from . as_arg_ptr ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The edited resource value."] # [doc = ""] # [inline] pub fn edited_resource (& self) -> Option < Ref < crate :: generated :: Resource , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePickerMethodTable :: get (get_api ()) . get_edited_resource ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Resource , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the value can be selected and edited."] # [doc = ""] # [inline] pub fn is_editable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePickerMethodTable :: get (get_api ()) . is_editable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the main button with the resource preview works in the toggle mode. Use [`set_toggle_pressed`][Self::set_toggle_pressed] to manually set the state."] # [doc = ""] # [inline] pub fn is_toggle_mode (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePickerMethodTable :: get (get_api ()) . is_toggle_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The base type of allowed resource types. Can be a comma-separated list of several options."] # [doc = ""] # [inline] pub fn set_base_type (& self , base_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePickerMethodTable :: get (get_api ()) . set_base_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , base_type . into ()) ; } } # [doc = "If `true`, the value can be selected and edited."] # [doc = ""] # [inline] pub fn set_editable (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePickerMethodTable :: get (get_api ()) . set_editable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The edited resource value."] # [doc = ""] # [inline] pub fn set_edited_resource (& self , resource : impl AsArg < crate :: generated :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePickerMethodTable :: get (get_api ()) . set_edited_resource ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , resource . as_arg_ptr ()) ; } } # [doc = "If `true`, the main button with the resource preview works in the toggle mode. Use [`set_toggle_pressed`][Self::set_toggle_pressed] to manually set the state."] # [doc = ""] # [inline] pub fn set_toggle_mode (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePickerMethodTable :: get (get_api ()) . set_toggle_mode ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Sets the toggle mode state for the main button. Works only if [`toggle_mode`][Self::toggle_mode] is set to `true`."] # [doc = ""] # [inline] pub fn set_toggle_pressed (& self , pressed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePickerMethodTable :: get (get_api ()) . set_toggle_pressed ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , pressed as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorResourcePicker { } unsafe impl GodotObject for EditorResourcePicker { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorResourcePicker" } } impl QueueFree for EditorResourcePicker { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for EditorResourcePicker { type Target = crate :: generated :: HBoxContainer ; # [inline] fn deref (& self) -> & crate :: generated :: HBoxContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorResourcePicker { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: HBoxContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: HBoxContainer > for EditorResourcePicker { } unsafe impl SubClass < crate :: generated :: BoxContainer > for EditorResourcePicker { } unsafe impl SubClass < crate :: generated :: Container > for EditorResourcePicker { } unsafe impl SubClass < crate :: generated :: Control > for EditorResourcePicker { } unsafe impl SubClass < crate :: generated :: CanvasItem > for EditorResourcePicker { } unsafe impl SubClass < crate :: generated :: Node > for EditorResourcePicker { } unsafe impl SubClass < crate :: generated :: Object > for EditorResourcePicker { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorResourcePickerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub can_drop_data_fw : * mut sys :: godot_method_bind , pub drop_data_fw : * mut sys :: godot_method_bind , pub get_allowed_types : * mut sys :: godot_method_bind , pub get_base_type : * mut sys :: godot_method_bind , pub get_drag_data_fw : * mut sys :: godot_method_bind , pub get_edited_resource : * mut sys :: godot_method_bind , pub is_editable : * mut sys :: godot_method_bind , pub is_toggle_mode : * mut sys :: godot_method_bind , pub set_base_type : * mut sys :: godot_method_bind , pub set_editable : * mut sys :: godot_method_bind , pub set_edited_resource : * mut sys :: godot_method_bind , pub set_toggle_mode : * mut sys :: godot_method_bind , pub set_toggle_pressed : * mut sys :: godot_method_bind } impl EditorResourcePickerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorResourcePickerMethodTable = EditorResourcePickerMethodTable { class_constructor : None , can_drop_data_fw : 0 as * mut sys :: godot_method_bind , drop_data_fw : 0 as * mut sys :: godot_method_bind , get_allowed_types : 0 as * mut sys :: godot_method_bind , get_base_type : 0 as * mut sys :: godot_method_bind , get_drag_data_fw : 0 as * mut sys :: godot_method_bind , get_edited_resource : 0 as * mut sys :: godot_method_bind , is_editable : 0 as * mut sys :: godot_method_bind , is_toggle_mode : 0 as * mut sys :: godot_method_bind , set_base_type : 0 as * mut sys :: godot_method_bind , set_editable : 0 as * mut sys :: godot_method_bind , set_edited_resource : 0 as * mut sys :: godot_method_bind , set_toggle_mode : 0 as * mut sys :: godot_method_bind , set_toggle_pressed : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorResourcePickerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorResourcePicker\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . can_drop_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "can_drop_data_fw\0" . as_ptr () as * const c_char) ; table . drop_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "drop_data_fw\0" . as_ptr () as * const c_char) ; table . get_allowed_types = (gd_api . godot_method_bind_get_method) (class_name , "get_allowed_types\0" . as_ptr () as * const c_char) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\0" . as_ptr () as * const c_char) ; table . get_drag_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "get_drag_data_fw\0" . as_ptr () as * const c_char) ; table . get_edited_resource = (gd_api . godot_method_bind_get_method) (class_name , "get_edited_resource\0" . as_ptr () as * const c_char) ; table . is_editable = (gd_api . godot_method_bind_get_method) (class_name , "is_editable\0" . as_ptr () as * const c_char) ; table . is_toggle_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_toggle_mode\0" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\0" . as_ptr () as * const c_char) ; table . set_editable = (gd_api . godot_method_bind_get_method) (class_name , "set_editable\0" . as_ptr () as * const c_char) ; table . set_edited_resource = (gd_api . godot_method_bind_get_method) (class_name , "set_edited_resource\0" . as_ptr () as * const c_char) ; table . set_toggle_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_toggle_mode\0" . as_ptr () as * const c_char) ; table . set_toggle_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_toggle_pressed\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_resource_picker::private::EditorResourcePicker;
            
            pub(crate) mod editor_resource_preview {
                # ! [doc = "This module contains types related to the API class [`EditorResourcePreview`][super::EditorResourcePreview]."] pub (crate) mod private { # [doc = "`tools class EditorResourcePreview` inherits `Node` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorresourcepreview.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorResourcePreview inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorResourcePreview { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorResourcePreview ; impl EditorResourcePreview { # [doc = "Create an own, custom preview generator."] # [doc = ""] # [inline] pub fn add_preview_generator (& self , generator : impl AsArg < crate :: generated :: EditorResourcePreviewGenerator >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePreviewMethodTable :: get (get_api ()) . add_preview_generator ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , generator . as_arg_ptr ()) ; } } # [doc = "Check if the resource changed, if so, it will be invalidated and the corresponding signal emitted."] # [doc = ""] # [inline] pub fn check_for_invalidation (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePreviewMethodTable :: get (get_api ()) . check_for_invalidation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "Queue the `resource` being edited for preview. Once the preview is ready, the `receiver`'s `receiver_func` will be called. The `receiver_func` must take the following four arguments: [`String`][GodotString] path, [`Texture`][Texture] preview, [`Texture`][Texture] thumbnail_preview, [`Variant`][Variant] userdata. `userdata` can be anything, and will be returned when `receiver_func` is called.\n**Note:** If it was not possible to create the preview the `receiver_func` will still be called, but the preview will be null."] # [doc = ""] # [inline] pub fn queue_edited_resource_preview (& self , resource : impl AsArg < crate :: generated :: Resource > , receiver : impl AsArg < crate :: generated :: Object > , receiver_func : impl Into < GodotString > , userdata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePreviewMethodTable :: get (get_api ()) . queue_edited_resource_preview ; let ret = crate :: icalls :: icallvar__obj_obj_str_var (method_bind , self . this . sys () . as_ptr () , resource . as_arg_ptr () , receiver . as_arg_ptr () , receiver_func . into () , userdata . owned_to_variant ()) ; } } # [doc = "Queue a resource file located at `path` for preview. Once the preview is ready, the `receiver`'s `receiver_func` will be called. The `receiver_func` must take the following four arguments: [`String`][GodotString] path, [`Texture`][Texture] preview, [`Texture`][Texture] thumbnail_preview, [`Variant`][Variant] userdata. `userdata` can be anything, and will be returned when `receiver_func` is called.\n**Note:** If it was not possible to create the preview the `receiver_func` will still be called, but the preview will be null."] # [doc = ""] # [inline] pub fn queue_resource_preview (& self , path : impl Into < GodotString > , receiver : impl AsArg < crate :: generated :: Object > , receiver_func : impl Into < GodotString > , userdata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePreviewMethodTable :: get (get_api ()) . queue_resource_preview ; let ret = crate :: icalls :: icallvar__str_obj_str_var (method_bind , self . this . sys () . as_ptr () , path . into () , receiver . as_arg_ptr () , receiver_func . into () , userdata . owned_to_variant ()) ; } } # [doc = "Removes a custom preview generator."] # [doc = ""] # [inline] pub fn remove_preview_generator (& self , generator : impl AsArg < crate :: generated :: EditorResourcePreviewGenerator >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorResourcePreviewMethodTable :: get (get_api ()) . remove_preview_generator ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , generator . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorResourcePreview { } unsafe impl GodotObject for EditorResourcePreview { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorResourcePreview" } } impl QueueFree for EditorResourcePreview { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for EditorResourcePreview { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorResourcePreview { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for EditorResourcePreview { } unsafe impl SubClass < crate :: generated :: Object > for EditorResourcePreview { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorResourcePreviewMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_preview_generator : * mut sys :: godot_method_bind , pub check_for_invalidation : * mut sys :: godot_method_bind , pub queue_edited_resource_preview : * mut sys :: godot_method_bind , pub queue_resource_preview : * mut sys :: godot_method_bind , pub remove_preview_generator : * mut sys :: godot_method_bind } impl EditorResourcePreviewMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorResourcePreviewMethodTable = EditorResourcePreviewMethodTable { class_constructor : None , add_preview_generator : 0 as * mut sys :: godot_method_bind , check_for_invalidation : 0 as * mut sys :: godot_method_bind , queue_edited_resource_preview : 0 as * mut sys :: godot_method_bind , queue_resource_preview : 0 as * mut sys :: godot_method_bind , remove_preview_generator : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorResourcePreviewMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorResourcePreview\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_preview_generator = (gd_api . godot_method_bind_get_method) (class_name , "add_preview_generator\0" . as_ptr () as * const c_char) ; table . check_for_invalidation = (gd_api . godot_method_bind_get_method) (class_name , "check_for_invalidation\0" . as_ptr () as * const c_char) ; table . queue_edited_resource_preview = (gd_api . godot_method_bind_get_method) (class_name , "queue_edited_resource_preview\0" . as_ptr () as * const c_char) ; table . queue_resource_preview = (gd_api . godot_method_bind_get_method) (class_name , "queue_resource_preview\0" . as_ptr () as * const c_char) ; table . remove_preview_generator = (gd_api . godot_method_bind_get_method) (class_name , "remove_preview_generator\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_resource_preview::private::EditorResourcePreview;
            
            pub(crate) mod editor_resource_preview_generator {
                # ! [doc = "This module contains types related to the API class [`EditorResourcePreviewGenerator`][super::EditorResourcePreviewGenerator]."] pub (crate) mod private { # [doc = "`tools class EditorResourcePreviewGenerator` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorresourcepreviewgenerator.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorResourcePreviewGenerator inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorResourcePreviewGenerator { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorResourcePreviewGenerator ; impl EditorResourcePreviewGenerator { } impl gdnative_core :: private :: godot_object :: Sealed for EditorResourcePreviewGenerator { } unsafe impl GodotObject for EditorResourcePreviewGenerator { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorResourcePreviewGenerator" } } impl std :: ops :: Deref for EditorResourcePreviewGenerator { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorResourcePreviewGenerator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for EditorResourcePreviewGenerator { } unsafe impl SubClass < crate :: generated :: Object > for EditorResourcePreviewGenerator { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorResourcePreviewGeneratorMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl EditorResourcePreviewGeneratorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorResourcePreviewGeneratorMethodTable = EditorResourcePreviewGeneratorMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorResourcePreviewGeneratorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorResourcePreviewGenerator\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_resource_preview_generator::private::EditorResourcePreviewGenerator;
            
            pub(crate) mod editor_scene_importer {
                # ! [doc = "This module contains types related to the API class [`EditorSceneImporter`][super::EditorSceneImporter]."] pub (crate) mod private { # [doc = "`tools class EditorSceneImporter` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorsceneimporter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorSceneImporter inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorSceneImporter { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorSceneImporter ; # [doc = "Constants"] # [allow (non_upper_case_globals)] impl EditorSceneImporter { pub const IMPORT_SCENE : i64 = 1i64 ; pub const IMPORT_ANIMATION : i64 = 2i64 ; pub const IMPORT_ANIMATION_DETECT_LOOP : i64 = 4i64 ; pub const IMPORT_ANIMATION_OPTIMIZE : i64 = 8i64 ; pub const IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS : i64 = 16i64 ; pub const IMPORT_ANIMATION_KEEP_VALUE_TRACKS : i64 = 32i64 ; pub const IMPORT_GENERATE_TANGENT_ARRAYS : i64 = 256i64 ; pub const IMPORT_FAIL_ON_MISSING_DEPENDENCIES : i64 = 512i64 ; pub const IMPORT_MATERIALS_IN_INSTANCES : i64 = 1024i64 ; } impl EditorSceneImporter { # [doc = ""] # [doc = ""] # [inline] pub fn import_animation_from_other_importer (& self , path : impl Into < GodotString > , flags : i64 , bake_fps : i64) -> Option < Ref < crate :: generated :: Animation , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSceneImporterMethodTable :: get (get_api ()) . import_animation_from_other_importer ; let ret = crate :: icalls :: icallvar__str_i64_i64 (method_bind , self . this . sys () . as_ptr () , path . into () , flags as _ , bake_fps as _) ; < Option < Ref < crate :: generated :: Animation , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn import_scene_from_other_importer (& self , path : impl Into < GodotString > , flags : i64 , bake_fps : i64 , compress_flags : i64) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSceneImporterMethodTable :: get (get_api ()) . import_scene_from_other_importer ; let ret = crate :: icalls :: icallvar__str_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , path . into () , flags as _ , bake_fps as _ , compress_flags as _) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorSceneImporter { } unsafe impl GodotObject for EditorSceneImporter { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorSceneImporter" } } impl std :: ops :: Deref for EditorSceneImporter { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSceneImporter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for EditorSceneImporter { } unsafe impl SubClass < crate :: generated :: Object > for EditorSceneImporter { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorSceneImporterMethodTable { pub class_constructor : sys :: godot_class_constructor , pub import_animation_from_other_importer : * mut sys :: godot_method_bind , pub import_scene_from_other_importer : * mut sys :: godot_method_bind } impl EditorSceneImporterMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorSceneImporterMethodTable = EditorSceneImporterMethodTable { class_constructor : None , import_animation_from_other_importer : 0 as * mut sys :: godot_method_bind , import_scene_from_other_importer : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorSceneImporterMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorSceneImporter\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . import_animation_from_other_importer = (gd_api . godot_method_bind_get_method) (class_name , "import_animation_from_other_importer\0" . as_ptr () as * const c_char) ; table . import_scene_from_other_importer = (gd_api . godot_method_bind_get_method) (class_name , "import_scene_from_other_importer\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_scene_importer::private::EditorSceneImporter;
            
            pub(crate) mod editor_scene_importer_fbx {
                # ! [doc = "This module contains types related to the API class [`EditorSceneImporterFBX`][super::EditorSceneImporterFBX]."] pub (crate) mod private { # [doc = "`tools class EditorSceneImporterFBX` inherits `EditorSceneImporter` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorsceneimporterfbx.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorSceneImporterFBX inherits methods from:\n - [EditorSceneImporter](struct.EditorSceneImporter.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorSceneImporterFBX { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorSceneImporterFBX ; impl EditorSceneImporterFBX { } impl gdnative_core :: private :: godot_object :: Sealed for EditorSceneImporterFBX { } unsafe impl GodotObject for EditorSceneImporterFBX { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorSceneImporterFBX" } } impl std :: ops :: Deref for EditorSceneImporterFBX { type Target = crate :: generated :: EditorSceneImporter ; # [inline] fn deref (& self) -> & crate :: generated :: EditorSceneImporter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSceneImporterFBX { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: EditorSceneImporter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: EditorSceneImporter > for EditorSceneImporterFBX { } unsafe impl SubClass < crate :: generated :: Reference > for EditorSceneImporterFBX { } unsafe impl SubClass < crate :: generated :: Object > for EditorSceneImporterFBX { }
                use super::*;
            }
            pub use crate::generated::editor_scene_importer_fbx::private::EditorSceneImporterFBX;
            
            pub(crate) mod editor_scene_importer_gltf {
                # ! [doc = "This module contains types related to the API class [`EditorSceneImporterGLTF`][super::EditorSceneImporterGLTF]."] pub (crate) mod private { # [doc = "`tools class EditorSceneImporterGLTF` inherits `EditorSceneImporter` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorsceneimportergltf.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorSceneImporterGLTF inherits methods from:\n - [EditorSceneImporter](struct.EditorSceneImporter.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorSceneImporterGLTF { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorSceneImporterGLTF ; impl EditorSceneImporterGLTF { } impl gdnative_core :: private :: godot_object :: Sealed for EditorSceneImporterGLTF { } unsafe impl GodotObject for EditorSceneImporterGLTF { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorSceneImporterGLTF" } } impl std :: ops :: Deref for EditorSceneImporterGLTF { type Target = crate :: generated :: EditorSceneImporter ; # [inline] fn deref (& self) -> & crate :: generated :: EditorSceneImporter { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSceneImporterGLTF { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: EditorSceneImporter { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: EditorSceneImporter > for EditorSceneImporterGLTF { } unsafe impl SubClass < crate :: generated :: Reference > for EditorSceneImporterGLTF { } unsafe impl SubClass < crate :: generated :: Object > for EditorSceneImporterGLTF { }
                use super::*;
            }
            pub use crate::generated::editor_scene_importer_gltf::private::EditorSceneImporterGLTF;
            
            pub(crate) mod editor_scene_post_import {
                # ! [doc = "This module contains types related to the API class [`EditorScenePostImport`][super::EditorScenePostImport]."] pub (crate) mod private { # [doc = "`tools class EditorScenePostImport` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorscenepostimport.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorScenePostImport inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorScenePostImport { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorScenePostImport ; impl EditorScenePostImport { # [doc = "Returns the source file path which got imported (e.g. `res://scene.dae`)."] # [doc = ""] # [inline] pub fn get_source_file (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorScenePostImportMethodTable :: get (get_api ()) . get_source_file ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the resource folder the imported scene file is located in."] # [doc = ""] # [inline] pub fn get_source_folder (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorScenePostImportMethodTable :: get (get_api ()) . get_source_folder ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorScenePostImport { } unsafe impl GodotObject for EditorScenePostImport { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorScenePostImport" } } impl std :: ops :: Deref for EditorScenePostImport { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorScenePostImport { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for EditorScenePostImport { } unsafe impl SubClass < crate :: generated :: Object > for EditorScenePostImport { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorScenePostImportMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_source_file : * mut sys :: godot_method_bind , pub get_source_folder : * mut sys :: godot_method_bind } impl EditorScenePostImportMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorScenePostImportMethodTable = EditorScenePostImportMethodTable { class_constructor : None , get_source_file : 0 as * mut sys :: godot_method_bind , get_source_folder : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorScenePostImportMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorScenePostImport\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_source_file = (gd_api . godot_method_bind_get_method) (class_name , "get_source_file\0" . as_ptr () as * const c_char) ; table . get_source_folder = (gd_api . godot_method_bind_get_method) (class_name , "get_source_folder\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_scene_post_import::private::EditorScenePostImport;
            
            pub(crate) mod editor_script {
                # ! [doc = "This module contains types related to the API class [`EditorScript`][super::EditorScript]."] pub (crate) mod private { # [doc = "`tools class EditorScript` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorscript.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorScript inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorScript { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorScript ; impl EditorScript { # [doc = "Adds `node` as a child of the root node in the editor context.\n**Warning:** The implementation of this method is currently disabled."] # [doc = ""] # [inline] pub fn add_root_node (& self , node : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorScriptMethodTable :: get (get_api ()) . add_root_node ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Returns the [`EditorInterface`][EditorInterface] singleton instance."] # [doc = ""] # [inline] pub fn get_editor_interface (& self) -> Option < Ref < crate :: generated :: EditorInterface , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorScriptMethodTable :: get (get_api ()) . get_editor_interface ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: EditorInterface , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the Editor's currently active scene."] # [doc = ""] # [inline] pub fn get_scene (& self) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorScriptMethodTable :: get (get_api ()) . get_scene ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorScript { } unsafe impl GodotObject for EditorScript { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorScript" } } impl std :: ops :: Deref for EditorScript { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for EditorScript { } unsafe impl SubClass < crate :: generated :: Object > for EditorScript { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorScriptMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_root_node : * mut sys :: godot_method_bind , pub get_editor_interface : * mut sys :: godot_method_bind , pub get_scene : * mut sys :: godot_method_bind } impl EditorScriptMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorScriptMethodTable = EditorScriptMethodTable { class_constructor : None , add_root_node : 0 as * mut sys :: godot_method_bind , get_editor_interface : 0 as * mut sys :: godot_method_bind , get_scene : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorScriptMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorScript\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_root_node = (gd_api . godot_method_bind_get_method) (class_name , "add_root_node\0" . as_ptr () as * const c_char) ; table . get_editor_interface = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_interface\0" . as_ptr () as * const c_char) ; table . get_scene = (gd_api . godot_method_bind_get_method) (class_name , "get_scene\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_script::private::EditorScript;
            
            pub(crate) mod editor_script_picker {
                # ! [doc = "This module contains types related to the API class [`EditorScriptPicker`][super::EditorScriptPicker]."] pub (crate) mod private { # [doc = "`tools class EditorScriptPicker` inherits `EditorResourcePicker` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorscriptpicker.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorScriptPicker inherits methods from:\n - [EditorResourcePicker](struct.EditorResourcePicker.html)\n - [HBoxContainer](struct.HBoxContainer.html)\n - [BoxContainer](struct.BoxContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorScriptPicker { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorScriptPicker ; impl EditorScriptPicker { # [doc = "The owner [`Node`][Node] of the script property that holds the edited resource."] # [doc = ""] # [inline] pub fn script_owner (& self) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorScriptPickerMethodTable :: get (get_api ()) . get_script_owner ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The owner [`Node`][Node] of the script property that holds the edited resource."] # [doc = ""] # [inline] pub fn set_script_owner (& self , owner_node : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorScriptPickerMethodTable :: get (get_api ()) . set_script_owner ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , owner_node . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorScriptPicker { } unsafe impl GodotObject for EditorScriptPicker { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorScriptPicker" } } impl QueueFree for EditorScriptPicker { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for EditorScriptPicker { type Target = crate :: generated :: EditorResourcePicker ; # [inline] fn deref (& self) -> & crate :: generated :: EditorResourcePicker { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorScriptPicker { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: EditorResourcePicker { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: EditorResourcePicker > for EditorScriptPicker { } unsafe impl SubClass < crate :: generated :: HBoxContainer > for EditorScriptPicker { } unsafe impl SubClass < crate :: generated :: BoxContainer > for EditorScriptPicker { } unsafe impl SubClass < crate :: generated :: Container > for EditorScriptPicker { } unsafe impl SubClass < crate :: generated :: Control > for EditorScriptPicker { } unsafe impl SubClass < crate :: generated :: CanvasItem > for EditorScriptPicker { } unsafe impl SubClass < crate :: generated :: Node > for EditorScriptPicker { } unsafe impl SubClass < crate :: generated :: Object > for EditorScriptPicker { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorScriptPickerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_script_owner : * mut sys :: godot_method_bind , pub set_script_owner : * mut sys :: godot_method_bind } impl EditorScriptPickerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorScriptPickerMethodTable = EditorScriptPickerMethodTable { class_constructor : None , get_script_owner : 0 as * mut sys :: godot_method_bind , set_script_owner : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorScriptPickerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorScriptPicker\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_script_owner = (gd_api . godot_method_bind_get_method) (class_name , "get_script_owner\0" . as_ptr () as * const c_char) ; table . set_script_owner = (gd_api . godot_method_bind_get_method) (class_name , "set_script_owner\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_script_picker::private::EditorScriptPicker;
            
            pub(crate) mod editor_selection {
                # ! [doc = "This module contains types related to the API class [`EditorSelection`][super::EditorSelection]."] pub (crate) mod private { # [doc = "`tools class EditorSelection` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorselection.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorSelection inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorSelection { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorSelection ; impl EditorSelection { # [doc = "Adds a node to the selection.\n**Note:** The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use [`EditorInterface.edit_node`][EditorInterface::edit_node]."] # [doc = ""] # [inline] pub fn add_node (& self , node : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSelectionMethodTable :: get (get_api ()) . add_node ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Clear the selection."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSelectionMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Gets the list of selected nodes."] # [doc = ""] # [inline] pub fn get_selected_nodes (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSelectionMethodTable :: get (get_api ()) . get_selected_nodes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc). This list avoids situations where a node is selected and also child/grandchild."] # [doc = ""] # [inline] pub fn get_transformable_selected_nodes (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSelectionMethodTable :: get (get_api ()) . get_transformable_selected_nodes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Removes a node from the selection."] # [doc = ""] # [inline] pub fn remove_node (& self , node : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSelectionMethodTable :: get (get_api ()) . remove_node ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorSelection { } unsafe impl GodotObject for EditorSelection { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorSelection" } } impl std :: ops :: Deref for EditorSelection { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSelection { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for EditorSelection { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorSelectionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_node : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub get_selected_nodes : * mut sys :: godot_method_bind , pub get_transformable_selected_nodes : * mut sys :: godot_method_bind , pub remove_node : * mut sys :: godot_method_bind } impl EditorSelectionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorSelectionMethodTable = EditorSelectionMethodTable { class_constructor : None , add_node : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , get_selected_nodes : 0 as * mut sys :: godot_method_bind , get_transformable_selected_nodes : 0 as * mut sys :: godot_method_bind , remove_node : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorSelectionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorSelection\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_node = (gd_api . godot_method_bind_get_method) (class_name , "add_node\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_selected_nodes = (gd_api . godot_method_bind_get_method) (class_name , "get_selected_nodes\0" . as_ptr () as * const c_char) ; table . get_transformable_selected_nodes = (gd_api . godot_method_bind_get_method) (class_name , "get_transformable_selected_nodes\0" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_selection::private::EditorSelection;
            
            pub(crate) mod editor_settings {
                # ! [doc = "This module contains types related to the API class [`EditorSettings`][super::EditorSettings]."] pub (crate) mod private { # [doc = "`tools class EditorSettings` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorsettings.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorSettings inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorSettings { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorSettings ; # [doc = "Constants"] # [allow (non_upper_case_globals)] impl EditorSettings { pub const NOTIFICATION_EDITOR_SETTINGS_CHANGED : i64 = 10000i64 ; } impl EditorSettings { # [doc = "_Sample code is GDScript unless otherwise noted._\n\nAdds a custom property info to a property. The dictionary must contain:\n- `name`: [`String`][GodotString] (the name of the property)\n- `type`: [`int`][int] (see [enum Variant.Type])\n- optionally `hint`: [`int`][int] (see [`PropertyHint`][PropertyHint]) and `hint_string`: [`String`][GodotString]\n**Example:**\n```gdscript\neditor_settings.set(\"category/property_name\", 0)\n\nvar property_info = {\n    \"name\": \"category/property_name\",\n    \"type\": TYPE_INT,\n    \"hint\": PROPERTY_HINT_ENUM,\n    \"hint_string\": \"one,two,three\"\n}\n\neditor_settings.add_property_info(property_info)\n```"] # [doc = ""] # [inline] pub fn add_property_info (& self , info : Dictionary) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . add_property_info ; let ret = crate :: icalls :: icallvar__dict (method_bind , self . this . sys () . as_ptr () , info) ; } } # [doc = "Erases the setting whose name is specified by `property`."] # [doc = ""] # [inline] pub fn erase (& self , property : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . erase ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , property . into ()) ; } } # [doc = "Returns the list of favorite files and directories for this project."] # [doc = ""] # [inline] pub fn get_favorites (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . get_favorites ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns project-specific metadata for the `section` and `key` specified. If the metadata doesn't exist, `default` will be returned instead. See also [`set_project_metadata`][Self::set_project_metadata].\n# Default Arguments\n* `default` - `null`"] # [doc = ""] # [inline] pub fn get_project_metadata (& self , section : impl Into < GodotString > , key : impl Into < GodotString > , default : impl OwnedToVariant) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . get_project_metadata ; let ret = crate :: icalls :: icallvar__str_str_var (method_bind , self . this . sys () . as_ptr () , section . into () , key . into () , default . owned_to_variant ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the project-specific settings path. Projects all have a unique subdirectory inside the settings path where project-specific settings are saved."] # [doc = ""] # [inline] pub fn get_project_settings_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . get_project_settings_dir ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the list of recently visited folders in the file dialog for this project."] # [doc = ""] # [inline] pub fn get_recent_dirs (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . get_recent_dirs ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the value of the setting specified by `name`. This is equivalent to using [`Object.get`][Object::get] on the EditorSettings instance."] # [doc = ""] # [inline] pub fn get_setting (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . get_setting ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the global settings path for the engine. Inside this path, you can find some standard paths such as:\n`settings/tmp` - Used for temporary storage of files\n`settings/templates` - Where export templates are located"] # [doc = ""] # [inline] pub fn get_settings_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . get_settings_dir ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the setting specified by `name` exists, `false` otherwise."] # [doc = ""] # [inline] pub fn has_setting (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . has_setting ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the setting specified by `name` can have its value reverted to the default value, `false` otherwise. When this method returns `true`, a Revert button will display next to the setting in the Editor Settings."] # [doc = ""] # [inline] pub fn property_can_revert (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . property_can_revert ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the default value of the setting specified by `name`. This is the value that would be applied when clicking the Revert button in the Editor Settings."] # [doc = ""] # [inline] pub fn property_get_revert (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . property_get_revert ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the list of favorite files and directories for this project."] # [doc = ""] # [inline] pub fn set_favorites (& self , dirs : PoolArray < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . set_favorites ; let ret = crate :: icalls :: icallvar__strarr (method_bind , self . this . sys () . as_ptr () , dirs) ; } } # [doc = "Sets the initial value of the setting specified by `name` to `value`. This is used to provide a value for the Revert button in the Editor Settings. If `update_current` is true, the current value of the setting will be set to `value` as well."] # [doc = ""] # [inline] pub fn set_initial_value (& self , name : impl Into < GodotString > , value : impl OwnedToVariant , update_current : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . set_initial_value ; let ret = crate :: icalls :: icallvar__str_var_bool (method_bind , self . this . sys () . as_ptr () , name . into () , value . owned_to_variant () , update_current as _) ; } } # [doc = "Sets project-specific metadata with the `section`, `key` and `data` specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also [`get_project_metadata`][Self::get_project_metadata]."] # [doc = ""] # [inline] pub fn set_project_metadata (& self , section : impl Into < GodotString > , key : impl Into < GodotString > , data : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . set_project_metadata ; let ret = crate :: icalls :: icallvar__str_str_var (method_bind , self . this . sys () . as_ptr () , section . into () , key . into () , data . owned_to_variant ()) ; } } # [doc = "Sets the list of recently visited folders in the file dialog for this project."] # [doc = ""] # [inline] pub fn set_recent_dirs (& self , dirs : PoolArray < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . set_recent_dirs ; let ret = crate :: icalls :: icallvar__strarr (method_bind , self . this . sys () . as_ptr () , dirs) ; } } # [doc = "Sets the `value` of the setting specified by `name`. This is equivalent to using [`Object.set`][Object::set] on the EditorSettings instance."] # [doc = ""] # [inline] pub fn set_setting (& self , name : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSettingsMethodTable :: get (get_api ()) . set_setting ; let ret = crate :: icalls :: icallvar__str_var (method_bind , self . this . sys () . as_ptr () , name . into () , value . owned_to_variant ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorSettings { } unsafe impl GodotObject for EditorSettings { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorSettings" } } impl std :: ops :: Deref for EditorSettings { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSettings { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for EditorSettings { } unsafe impl SubClass < crate :: generated :: Reference > for EditorSettings { } unsafe impl SubClass < crate :: generated :: Object > for EditorSettings { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorSettingsMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_property_info : * mut sys :: godot_method_bind , pub erase : * mut sys :: godot_method_bind , pub get_favorites : * mut sys :: godot_method_bind , pub get_project_metadata : * mut sys :: godot_method_bind , pub get_project_settings_dir : * mut sys :: godot_method_bind , pub get_recent_dirs : * mut sys :: godot_method_bind , pub get_setting : * mut sys :: godot_method_bind , pub get_settings_dir : * mut sys :: godot_method_bind , pub has_setting : * mut sys :: godot_method_bind , pub property_can_revert : * mut sys :: godot_method_bind , pub property_get_revert : * mut sys :: godot_method_bind , pub set_favorites : * mut sys :: godot_method_bind , pub set_initial_value : * mut sys :: godot_method_bind , pub set_project_metadata : * mut sys :: godot_method_bind , pub set_recent_dirs : * mut sys :: godot_method_bind , pub set_setting : * mut sys :: godot_method_bind } impl EditorSettingsMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorSettingsMethodTable = EditorSettingsMethodTable { class_constructor : None , add_property_info : 0 as * mut sys :: godot_method_bind , erase : 0 as * mut sys :: godot_method_bind , get_favorites : 0 as * mut sys :: godot_method_bind , get_project_metadata : 0 as * mut sys :: godot_method_bind , get_project_settings_dir : 0 as * mut sys :: godot_method_bind , get_recent_dirs : 0 as * mut sys :: godot_method_bind , get_setting : 0 as * mut sys :: godot_method_bind , get_settings_dir : 0 as * mut sys :: godot_method_bind , has_setting : 0 as * mut sys :: godot_method_bind , property_can_revert : 0 as * mut sys :: godot_method_bind , property_get_revert : 0 as * mut sys :: godot_method_bind , set_favorites : 0 as * mut sys :: godot_method_bind , set_initial_value : 0 as * mut sys :: godot_method_bind , set_project_metadata : 0 as * mut sys :: godot_method_bind , set_recent_dirs : 0 as * mut sys :: godot_method_bind , set_setting : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorSettingsMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorSettings\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_property_info = (gd_api . godot_method_bind_get_method) (class_name , "add_property_info\0" . as_ptr () as * const c_char) ; table . erase = (gd_api . godot_method_bind_get_method) (class_name , "erase\0" . as_ptr () as * const c_char) ; table . get_favorites = (gd_api . godot_method_bind_get_method) (class_name , "get_favorites\0" . as_ptr () as * const c_char) ; table . get_project_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_project_metadata\0" . as_ptr () as * const c_char) ; table . get_project_settings_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_project_settings_dir\0" . as_ptr () as * const c_char) ; table . get_recent_dirs = (gd_api . godot_method_bind_get_method) (class_name , "get_recent_dirs\0" . as_ptr () as * const c_char) ; table . get_setting = (gd_api . godot_method_bind_get_method) (class_name , "get_setting\0" . as_ptr () as * const c_char) ; table . get_settings_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_settings_dir\0" . as_ptr () as * const c_char) ; table . has_setting = (gd_api . godot_method_bind_get_method) (class_name , "has_setting\0" . as_ptr () as * const c_char) ; table . property_can_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_can_revert\0" . as_ptr () as * const c_char) ; table . property_get_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_get_revert\0" . as_ptr () as * const c_char) ; table . set_favorites = (gd_api . godot_method_bind_get_method) (class_name , "set_favorites\0" . as_ptr () as * const c_char) ; table . set_initial_value = (gd_api . godot_method_bind_get_method) (class_name , "set_initial_value\0" . as_ptr () as * const c_char) ; table . set_project_metadata = (gd_api . godot_method_bind_get_method) (class_name , "set_project_metadata\0" . as_ptr () as * const c_char) ; table . set_recent_dirs = (gd_api . godot_method_bind_get_method) (class_name , "set_recent_dirs\0" . as_ptr () as * const c_char) ; table . set_setting = (gd_api . godot_method_bind_get_method) (class_name , "set_setting\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_settings::private::EditorSettings;
            
            pub(crate) mod editor_spatial_gizmo {
                # ! [doc = "This module contains types related to the API class [`EditorSpatialGizmo`][super::EditorSpatialGizmo]."] pub (crate) mod private { # [doc = "`tools class EditorSpatialGizmo` inherits `SpatialGizmo` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorspatialgizmo.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorSpatialGizmo inherits methods from:\n - [SpatialGizmo](struct.SpatialGizmo.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorSpatialGizmo { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorSpatialGizmo ; impl EditorSpatialGizmo { # [doc = "Adds the specified `segments` to the gizmo's collision shape for picking. Call this function during [`redraw`][Self::redraw]."] # [doc = ""] # [inline] pub fn add_collision_segments (& self , segments : PoolArray < Vector3 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_collision_segments ; let ret = crate :: icalls :: icallvar__vec3arr (method_bind , self . this . sys () . as_ptr () , segments) ; } } # [doc = "Adds collision triangles to the gizmo for picking. A [`TriangleMesh`][TriangleMesh] can be generated from a regular [`Mesh`][Mesh] too. Call this function during [`redraw`][Self::redraw]."] # [doc = ""] # [inline] pub fn add_collision_triangles (& self , triangles : impl AsArg < crate :: generated :: TriangleMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_collision_triangles ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , triangles . as_arg_ptr ()) ; } } # [doc = "Adds a list of handles (points) which can be used to deform the object being edited.\nThere are virtual functions which will be called upon editing of these handles. Call this function during [`redraw`][Self::redraw].\n# Default Arguments\n* `billboard` - `false`\n* `secondary` - `false`"] # [doc = ""] # [inline] pub fn add_handles (& self , handles : PoolArray < Vector3 > , material : impl AsArg < crate :: generated :: Material > , billboard : bool , secondary : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_handles ; let ret = crate :: icalls :: icallvar__vec3arr_obj_bool_bool (method_bind , self . this . sys () . as_ptr () , handles , material . as_arg_ptr () , billboard as _ , secondary as _) ; } } # [doc = "Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [`redraw`][Self::redraw].\n# Default Arguments\n* `billboard` - `false`\n* `modulate` - `Color( 1, 1, 1, 1 )`"] # [doc = ""] # [inline] pub fn add_lines (& self , lines : PoolArray < Vector3 > , material : impl AsArg < crate :: generated :: Material > , billboard : bool , modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_lines ; let ret = crate :: icalls :: icallvar__vec3arr_obj_bool_color (method_bind , self . this . sys () . as_ptr () , lines , material . as_arg_ptr () , billboard as _ , modulate) ; } } # [doc = "Adds a mesh to the gizmo with the specified `billboard` state, `skeleton` and `material`. If `billboard` is `true`, the mesh will rotate to always face the camera. Call this function during [`redraw`][Self::redraw].\n# Default Arguments\n* `billboard` - `false`\n* `skeleton` - `null`\n* `material` - `null`"] # [doc = ""] # [inline] pub fn add_mesh (& self , mesh : impl AsArg < crate :: generated :: Mesh > , billboard : bool , skeleton : impl AsArg < crate :: generated :: SkinReference > , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_mesh ; let ret = crate :: icalls :: icallvar__obj_bool_obj_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr () , billboard as _ , skeleton . as_arg_ptr () , material . as_arg_ptr ()) ; } } # [doc = "Adds an unscaled billboard for visualization. Call this function during [`redraw`][Self::redraw].\n# Default Arguments\n* `default_scale` - `1`\n* `modulate` - `Color( 1, 1, 1, 1 )`"] # [doc = ""] # [inline] pub fn add_unscaled_billboard (& self , material : impl AsArg < crate :: generated :: Material > , default_scale : f64 , modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . add_unscaled_billboard ; let ret = crate :: icalls :: icallvar__obj_f64_color (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr () , default_scale as _ , modulate) ; } } # [doc = "Removes everything in the gizmo including meshes, collisions and handles."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the [`EditorSpatialGizmoPlugin`][EditorSpatialGizmoPlugin] that owns this gizmo. It's useful to retrieve materials using [`EditorSpatialGizmoPlugin.get_material`][EditorSpatialGizmoPlugin::get_material]."] # [doc = ""] # [inline] pub fn get_plugin (& self) -> Option < Ref < crate :: generated :: EditorSpatialGizmoPlugin , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . get_plugin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: EditorSpatialGizmoPlugin , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the Spatial node associated with this gizmo."] # [doc = ""] # [inline] pub fn get_spatial_node (& self) -> Option < Ref < crate :: generated :: Spatial , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . get_spatial_node ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Spatial , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the gizmo's hidden state. If `true`, the gizmo will be hidden. If `false`, it will be shown."] # [doc = ""] # [inline] pub fn set_hidden (& self , hidden : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . set_hidden ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , hidden as _) ; } } # [doc = "Sets the reference [`Spatial`][Spatial] node for the gizmo. `node` must inherit from [`Spatial`][Spatial]."] # [doc = ""] # [inline] pub fn set_spatial_node (& self , node : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoMethodTable :: get (get_api ()) . set_spatial_node ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorSpatialGizmo { } unsafe impl GodotObject for EditorSpatialGizmo { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorSpatialGizmo" } } impl std :: ops :: Deref for EditorSpatialGizmo { type Target = crate :: generated :: SpatialGizmo ; # [inline] fn deref (& self) -> & crate :: generated :: SpatialGizmo { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSpatialGizmo { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: SpatialGizmo { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: SpatialGizmo > for EditorSpatialGizmo { } unsafe impl SubClass < crate :: generated :: Reference > for EditorSpatialGizmo { } unsafe impl SubClass < crate :: generated :: Object > for EditorSpatialGizmo { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorSpatialGizmoMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_collision_segments : * mut sys :: godot_method_bind , pub add_collision_triangles : * mut sys :: godot_method_bind , pub add_handles : * mut sys :: godot_method_bind , pub add_lines : * mut sys :: godot_method_bind , pub add_mesh : * mut sys :: godot_method_bind , pub add_unscaled_billboard : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub get_plugin : * mut sys :: godot_method_bind , pub get_spatial_node : * mut sys :: godot_method_bind , pub set_hidden : * mut sys :: godot_method_bind , pub set_spatial_node : * mut sys :: godot_method_bind } impl EditorSpatialGizmoMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorSpatialGizmoMethodTable = EditorSpatialGizmoMethodTable { class_constructor : None , add_collision_segments : 0 as * mut sys :: godot_method_bind , add_collision_triangles : 0 as * mut sys :: godot_method_bind , add_handles : 0 as * mut sys :: godot_method_bind , add_lines : 0 as * mut sys :: godot_method_bind , add_mesh : 0 as * mut sys :: godot_method_bind , add_unscaled_billboard : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , get_plugin : 0 as * mut sys :: godot_method_bind , get_spatial_node : 0 as * mut sys :: godot_method_bind , set_hidden : 0 as * mut sys :: godot_method_bind , set_spatial_node : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorSpatialGizmoMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorSpatialGizmo\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_collision_segments = (gd_api . godot_method_bind_get_method) (class_name , "add_collision_segments\0" . as_ptr () as * const c_char) ; table . add_collision_triangles = (gd_api . godot_method_bind_get_method) (class_name , "add_collision_triangles\0" . as_ptr () as * const c_char) ; table . add_handles = (gd_api . godot_method_bind_get_method) (class_name , "add_handles\0" . as_ptr () as * const c_char) ; table . add_lines = (gd_api . godot_method_bind_get_method) (class_name , "add_lines\0" . as_ptr () as * const c_char) ; table . add_mesh = (gd_api . godot_method_bind_get_method) (class_name , "add_mesh\0" . as_ptr () as * const c_char) ; table . add_unscaled_billboard = (gd_api . godot_method_bind_get_method) (class_name , "add_unscaled_billboard\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_plugin = (gd_api . godot_method_bind_get_method) (class_name , "get_plugin\0" . as_ptr () as * const c_char) ; table . get_spatial_node = (gd_api . godot_method_bind_get_method) (class_name , "get_spatial_node\0" . as_ptr () as * const c_char) ; table . set_hidden = (gd_api . godot_method_bind_get_method) (class_name , "set_hidden\0" . as_ptr () as * const c_char) ; table . set_spatial_node = (gd_api . godot_method_bind_get_method) (class_name , "set_spatial_node\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_spatial_gizmo::private::EditorSpatialGizmo;
            
            pub(crate) mod editor_spatial_gizmo_plugin {
                # ! [doc = "This module contains types related to the API class [`EditorSpatialGizmoPlugin`][super::EditorSpatialGizmoPlugin]."] pub (crate) mod private { # [doc = "`tools class EditorSpatialGizmoPlugin` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorspatialgizmoplugin.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEditorSpatialGizmoPlugin inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorSpatialGizmoPlugin { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorSpatialGizmoPlugin ; impl EditorSpatialGizmoPlugin { # [doc = "Adds a new material to the internal material list for the plugin. It can then be accessed with [`get_material`][Self::get_material]. Should not be overridden."] # [doc = ""] # [inline] pub fn add_material (& self , name : impl Into < GodotString > , material : impl AsArg < crate :: generated :: SpatialMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoPluginMethodTable :: get (get_api ()) . add_material ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , material . as_arg_ptr ()) ; } } # [doc = "Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [`get_material`][Self::get_material] and used in [`EditorSpatialGizmo.add_handles`][EditorSpatialGizmo::add_handles]. Should not be overridden.\nYou can optionally provide a texture to use instead of the default icon.\n# Default Arguments\n* `billboard` - `false`\n* `texture` - `null`"] # [doc = ""] # [inline] pub fn create_handle_material (& self , name : impl Into < GodotString > , billboard : bool , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoPluginMethodTable :: get (get_api ()) . create_handle_material ; let ret = crate :: icalls :: icallvar__str_bool_obj (method_bind , self . this . sys () . as_ptr () , name . into () , billboard as _ , texture . as_arg_ptr ()) ; } } # [doc = "Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [`get_material`][Self::get_material] and used in [`EditorSpatialGizmo.add_unscaled_billboard`][EditorSpatialGizmo::add_unscaled_billboard]. Should not be overridden.\n# Default Arguments\n* `on_top` - `false`\n* `color` - `Color( 1, 1, 1, 1 )`"] # [doc = ""] # [inline] pub fn create_icon_material (& self , name : impl Into < GodotString > , texture : impl AsArg < crate :: generated :: Texture > , on_top : bool , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoPluginMethodTable :: get (get_api ()) . create_icon_material ; let ret = crate :: icalls :: icallvar__str_obj_bool_color (method_bind , self . this . sys () . as_ptr () , name . into () , texture . as_arg_ptr () , on_top as _ , color) ; } } # [doc = "Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [`get_material`][Self::get_material] and used in [`EditorSpatialGizmo.add_mesh`][EditorSpatialGizmo::add_mesh] and [`EditorSpatialGizmo.add_lines`][EditorSpatialGizmo::add_lines]. Should not be overridden.\n# Default Arguments\n* `billboard` - `false`\n* `on_top` - `false`\n* `use_vertex_color` - `false`"] # [doc = ""] # [inline] pub fn create_material (& self , name : impl Into < GodotString > , color : Color , billboard : bool , on_top : bool , use_vertex_color : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoPluginMethodTable :: get (get_api ()) . create_material ; let ret = crate :: icalls :: icallvar__str_color_bool_bool_bool (method_bind , self . this . sys () . as_ptr () , name . into () , color , billboard as _ , on_top as _ , use_vertex_color as _) ; } } # [doc = "Gets material from the internal list of materials. If an [`EditorSpatialGizmo`][EditorSpatialGizmo] is provided, it will try to get the corresponding variant (selected and/or editable).\n# Default Arguments\n* `gizmo` - `null`"] # [doc = ""] # [inline] pub fn get_material (& self , name : impl Into < GodotString > , gizmo : impl AsArg < crate :: generated :: EditorSpatialGizmo >) -> Option < Ref < crate :: generated :: SpatialMaterial , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpatialGizmoPluginMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , gizmo . as_arg_ptr ()) ; < Option < Ref < crate :: generated :: SpatialMaterial , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorSpatialGizmoPlugin { } unsafe impl GodotObject for EditorSpatialGizmoPlugin { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EditorSpatialGizmoPlugin" } } impl std :: ops :: Deref for EditorSpatialGizmoPlugin { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSpatialGizmoPlugin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for EditorSpatialGizmoPlugin { } unsafe impl SubClass < crate :: generated :: Reference > for EditorSpatialGizmoPlugin { } unsafe impl SubClass < crate :: generated :: Object > for EditorSpatialGizmoPlugin { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorSpatialGizmoPluginMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_material : * mut sys :: godot_method_bind , pub create_handle_material : * mut sys :: godot_method_bind , pub create_icon_material : * mut sys :: godot_method_bind , pub create_material : * mut sys :: godot_method_bind , pub get_material : * mut sys :: godot_method_bind } impl EditorSpatialGizmoPluginMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorSpatialGizmoPluginMethodTable = EditorSpatialGizmoPluginMethodTable { class_constructor : None , add_material : 0 as * mut sys :: godot_method_bind , create_handle_material : 0 as * mut sys :: godot_method_bind , create_icon_material : 0 as * mut sys :: godot_method_bind , create_material : 0 as * mut sys :: godot_method_bind , get_material : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorSpatialGizmoPluginMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorSpatialGizmoPlugin\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_material = (gd_api . godot_method_bind_get_method) (class_name , "add_material\0" . as_ptr () as * const c_char) ; table . create_handle_material = (gd_api . godot_method_bind_get_method) (class_name , "create_handle_material\0" . as_ptr () as * const c_char) ; table . create_icon_material = (gd_api . godot_method_bind_get_method) (class_name , "create_icon_material\0" . as_ptr () as * const c_char) ; table . create_material = (gd_api . godot_method_bind_get_method) (class_name , "create_material\0" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_spatial_gizmo_plugin::private::EditorSpatialGizmoPlugin;
            
            pub(crate) mod editor_spin_slider {
                # ! [doc = "This module contains types related to the API class [`EditorSpinSlider`][super::EditorSpinSlider]."] pub (crate) mod private { # [doc = "`tools class EditorSpinSlider` inherits `Range` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorspinslider.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorSpinSlider inherits methods from:\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorSpinSlider { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorSpinSlider ; impl EditorSpinSlider { # [doc = ""] # [doc = ""] # [inline] pub fn label (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpinSliderMethodTable :: get (get_api ()) . get_label ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn is_flat (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpinSliderMethodTable :: get (get_api ()) . is_flat ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the slider is hidden."] # [doc = ""] # [inline] pub fn is_hiding_slider (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpinSliderMethodTable :: get (get_api ()) . is_hiding_slider ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_read_only (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpinSliderMethodTable :: get (get_api ()) . is_read_only ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_flat (& self , flat : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpinSliderMethodTable :: get (get_api ()) . set_flat ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , flat as _) ; } } # [doc = "If `true`, the slider is hidden."] # [doc = ""] # [inline] pub fn set_hide_slider (& self , hide_slider : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpinSliderMethodTable :: get (get_api ()) . set_hide_slider ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , hide_slider as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_label (& self , label : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpinSliderMethodTable :: get (get_api ()) . set_label ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , label . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_read_only (& self , read_only : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorSpinSliderMethodTable :: get (get_api ()) . set_read_only ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , read_only as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorSpinSlider { } unsafe impl GodotObject for EditorSpinSlider { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorSpinSlider" } } impl QueueFree for EditorSpinSlider { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for EditorSpinSlider { type Target = crate :: generated :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorSpinSlider { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Range > for EditorSpinSlider { } unsafe impl SubClass < crate :: generated :: Control > for EditorSpinSlider { } unsafe impl SubClass < crate :: generated :: CanvasItem > for EditorSpinSlider { } unsafe impl SubClass < crate :: generated :: Node > for EditorSpinSlider { } unsafe impl SubClass < crate :: generated :: Object > for EditorSpinSlider { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorSpinSliderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_label : * mut sys :: godot_method_bind , pub is_flat : * mut sys :: godot_method_bind , pub is_hiding_slider : * mut sys :: godot_method_bind , pub is_read_only : * mut sys :: godot_method_bind , pub set_flat : * mut sys :: godot_method_bind , pub set_hide_slider : * mut sys :: godot_method_bind , pub set_label : * mut sys :: godot_method_bind , pub set_read_only : * mut sys :: godot_method_bind } impl EditorSpinSliderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorSpinSliderMethodTable = EditorSpinSliderMethodTable { class_constructor : None , get_label : 0 as * mut sys :: godot_method_bind , is_flat : 0 as * mut sys :: godot_method_bind , is_hiding_slider : 0 as * mut sys :: godot_method_bind , is_read_only : 0 as * mut sys :: godot_method_bind , set_flat : 0 as * mut sys :: godot_method_bind , set_hide_slider : 0 as * mut sys :: godot_method_bind , set_label : 0 as * mut sys :: godot_method_bind , set_read_only : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorSpinSliderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorSpinSlider\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_label = (gd_api . godot_method_bind_get_method) (class_name , "get_label\0" . as_ptr () as * const c_char) ; table . is_flat = (gd_api . godot_method_bind_get_method) (class_name , "is_flat\0" . as_ptr () as * const c_char) ; table . is_hiding_slider = (gd_api . godot_method_bind_get_method) (class_name , "is_hiding_slider\0" . as_ptr () as * const c_char) ; table . is_read_only = (gd_api . godot_method_bind_get_method) (class_name , "is_read_only\0" . as_ptr () as * const c_char) ; table . set_flat = (gd_api . godot_method_bind_get_method) (class_name , "set_flat\0" . as_ptr () as * const c_char) ; table . set_hide_slider = (gd_api . godot_method_bind_get_method) (class_name , "set_hide_slider\0" . as_ptr () as * const c_char) ; table . set_label = (gd_api . godot_method_bind_get_method) (class_name , "set_label\0" . as_ptr () as * const c_char) ; table . set_read_only = (gd_api . godot_method_bind_get_method) (class_name , "set_read_only\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_spin_slider::private::EditorSpinSlider;
            
            pub mod editor_vcs_interface {
                # ! [doc = "This module contains types related to the API class [`EditorVCSInterface`][super::EditorVCSInterface]."] pub (crate) mod private { # [doc = "`tools class EditorVCSInterface` inherits `Object` (manually managed).\n\nThis class has related types in the [`editor_vcs_interface`][super::editor_vcs_interface] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_editorvcsinterface.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEditorVCSInterface inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EditorVCSInterface { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EditorVCSInterface ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ChangeType (pub i64) ; impl ChangeType { pub const NEW : ChangeType = ChangeType (0i64) ; pub const MODIFIED : ChangeType = ChangeType (1i64) ; pub const RENAMED : ChangeType = ChangeType (2i64) ; pub const DELETED : ChangeType = ChangeType (3i64) ; pub const TYPECHANGE : ChangeType = ChangeType (4i64) ; pub const UNMERGED : ChangeType = ChangeType (5i64) ; } impl From < i64 > for ChangeType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ChangeType > for i64 { # [inline] fn from (v : ChangeType) -> Self { v . 0 } } impl FromVariant for ChangeType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TreeArea (pub i64) ; impl TreeArea { pub const COMMIT : TreeArea = TreeArea (0i64) ; pub const STAGED : TreeArea = TreeArea (1i64) ; pub const UNSTAGED : TreeArea = TreeArea (2i64) ; } impl From < i64 > for TreeArea { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TreeArea > for i64 { # [inline] fn from (v : TreeArea) -> Self { v . 0 } } impl FromVariant for TreeArea { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl EditorVCSInterface { pub const CHANGE_TYPE_NEW : i64 = 0i64 ; pub const TREE_AREA_COMMIT : i64 = 0i64 ; pub const CHANGE_TYPE_MODIFIED : i64 = 1i64 ; pub const TREE_AREA_STAGED : i64 = 1i64 ; pub const CHANGE_TYPE_RENAMED : i64 = 2i64 ; pub const TREE_AREA_UNSTAGED : i64 = 2i64 ; pub const CHANGE_TYPE_DELETED : i64 = 3i64 ; pub const CHANGE_TYPE_TYPECHANGE : i64 = 4i64 ; pub const CHANGE_TYPE_UNMERGED : i64 = 5i64 ; } impl EditorVCSInterface { # [doc = "Helper function to add an array of `diff_hunks` into a `diff_file`."] # [doc = ""] # [inline] pub fn add_diff_hunks_into_diff_file (& self , diff_file : Dictionary , diff_hunks : VariantArray) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . add_diff_hunks_into_diff_file ; let ret = crate :: icalls :: icallvar__dict_arr (method_bind , self . this . sys () . as_ptr () , diff_file , diff_hunks) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Helper function to add an array of `line_diffs` into a `diff_hunk`."] # [doc = ""] # [inline] pub fn add_line_diffs_into_diff_hunk (& self , diff_hunk : Dictionary , line_diffs : VariantArray) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . add_line_diffs_into_diff_hunk ; let ret = crate :: icalls :: icallvar__dict_arr (method_bind , self . this . sys () . as_ptr () , diff_hunk , line_diffs) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Helper function to create a commit [`Dictionary`][Dictionary] item. `msg` is the commit message of the commit. `author` is a single human-readable string containing all the author's details, e.g. the email and name configured in the VCS. `id` is the identifier of the commit, in whichever format your VCS may provide an identifier to commits. `unix_timestamp` is the UTC Unix timestamp of when the commit was created. `offset_minutes` is the timezone offset in minutes, recorded from the system timezone where the commit was created."] # [doc = ""] # [inline] pub fn create_commit (& self , msg : impl Into < GodotString > , author : impl Into < GodotString > , id : impl Into < GodotString > , unix_timestamp : i64 , offset_minutes : i64) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . create_commit ; let ret = crate :: icalls :: icallvar__str_str_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , msg . into () , author . into () , id . into () , unix_timestamp as _ , offset_minutes as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Helper function to create a `Dictionary` for storing old and new diff file paths."] # [doc = ""] # [inline] pub fn create_diff_file (& self , new_file : impl Into < GodotString > , old_file : impl Into < GodotString >) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . create_diff_file ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , new_file . into () , old_file . into ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Helper function to create a `Dictionary` for storing diff hunk data. `old_start` is the starting line number in old file. `new_start` is the starting line number in new file. `old_lines` is the number of lines in the old file. `new_lines` is the number of lines in the new file."] # [doc = ""] # [inline] pub fn create_diff_hunk (& self , old_start : i64 , new_start : i64 , old_lines : i64 , new_lines : i64) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . create_diff_hunk ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , old_start as _ , new_start as _ , old_lines as _ , new_lines as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Helper function to create a `Dictionary` for storing a line diff. `new_line_no` is the line number in the new file (can be `-1` if the line is deleted). `old_line_no` is the line number in the old file (can be `-1` if the line is added). `content` is the diff text. `status` is a single character string which stores the line origin."] # [doc = ""] # [inline] pub fn create_diff_line (& self , new_line_no : i64 , old_line_no : i64 , content : impl Into < GodotString > , status : impl Into < GodotString >) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . create_diff_line ; let ret = crate :: icalls :: icallvar__i64_i64_str_str (method_bind , self . this . sys () . as_ptr () , new_line_no as _ , old_line_no as _ , content . into () , status . into ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Helper function to create a `Dictionary` used by editor to read the status of a file."] # [doc = ""] # [inline] pub fn create_status_file (& self , file_path : impl Into < GodotString > , change_type : i64 , area : i64) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . create_status_file ; let ret = crate :: icalls :: icallvar__str_i64_i64 (method_bind , self . this . sys () . as_ptr () , file_path . into () , change_type as _ , area as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Pops up an error message in the edior."] # [doc = ""] # [inline] pub fn popup_error (& self , msg : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EditorVCSInterfaceMethodTable :: get (get_api ()) . popup_error ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , msg . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EditorVCSInterface { } unsafe impl GodotObject for EditorVCSInterface { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "EditorVCSInterface" } } impl std :: ops :: Deref for EditorVCSInterface { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EditorVCSInterface { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for EditorVCSInterface { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EditorVCSInterfaceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_diff_hunks_into_diff_file : * mut sys :: godot_method_bind , pub add_line_diffs_into_diff_hunk : * mut sys :: godot_method_bind , pub create_commit : * mut sys :: godot_method_bind , pub create_diff_file : * mut sys :: godot_method_bind , pub create_diff_hunk : * mut sys :: godot_method_bind , pub create_diff_line : * mut sys :: godot_method_bind , pub create_status_file : * mut sys :: godot_method_bind , pub popup_error : * mut sys :: godot_method_bind } impl EditorVCSInterfaceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EditorVCSInterfaceMethodTable = EditorVCSInterfaceMethodTable { class_constructor : None , add_diff_hunks_into_diff_file : 0 as * mut sys :: godot_method_bind , add_line_diffs_into_diff_hunk : 0 as * mut sys :: godot_method_bind , create_commit : 0 as * mut sys :: godot_method_bind , create_diff_file : 0 as * mut sys :: godot_method_bind , create_diff_hunk : 0 as * mut sys :: godot_method_bind , create_diff_line : 0 as * mut sys :: godot_method_bind , create_status_file : 0 as * mut sys :: godot_method_bind , popup_error : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EditorVCSInterfaceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EditorVCSInterface\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_diff_hunks_into_diff_file = (gd_api . godot_method_bind_get_method) (class_name , "add_diff_hunks_into_diff_file\0" . as_ptr () as * const c_char) ; table . add_line_diffs_into_diff_hunk = (gd_api . godot_method_bind_get_method) (class_name , "add_line_diffs_into_diff_hunk\0" . as_ptr () as * const c_char) ; table . create_commit = (gd_api . godot_method_bind_get_method) (class_name , "create_commit\0" . as_ptr () as * const c_char) ; table . create_diff_file = (gd_api . godot_method_bind_get_method) (class_name , "create_diff_file\0" . as_ptr () as * const c_char) ; table . create_diff_hunk = (gd_api . godot_method_bind_get_method) (class_name , "create_diff_hunk\0" . as_ptr () as * const c_char) ; table . create_diff_line = (gd_api . godot_method_bind_get_method) (class_name , "create_diff_line\0" . as_ptr () as * const c_char) ; table . create_status_file = (gd_api . godot_method_bind_get_method) (class_name , "create_status_file\0" . as_ptr () as * const c_char) ; table . popup_error = (gd_api . godot_method_bind_get_method) (class_name , "popup_error\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::editor_vcs_interface::private::EditorVCSInterface;
            
            pub(crate) mod encoded_object_as_id {
                # ! [doc = "This module contains types related to the API class [`EncodedObjectAsID`][super::EncodedObjectAsID]."] pub (crate) mod private { # [doc = "`core class EncodedObjectAsID` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_encodedobjectasid.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEncodedObjectAsID inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct EncodedObjectAsID { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: EncodedObjectAsID ; impl EncodedObjectAsID { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = EncodedObjectAsIDMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [`Object`][Object] identifier stored in this [`EncodedObjectAsID`][EncodedObjectAsID] instance. The object instance can be retrieved with [method @GDScript.instance_from_id]."] # [doc = ""] # [inline] pub fn object_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EncodedObjectAsIDMethodTable :: get (get_api ()) . get_object_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The [`Object`][Object] identifier stored in this [`EncodedObjectAsID`][EncodedObjectAsID] instance. The object instance can be retrieved with [method @GDScript.instance_from_id]."] # [doc = ""] # [inline] pub fn set_object_id (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EncodedObjectAsIDMethodTable :: get (get_api ()) . set_object_id ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for EncodedObjectAsID { } unsafe impl GodotObject for EncodedObjectAsID { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "EncodedObjectAsID" } } impl std :: ops :: Deref for EncodedObjectAsID { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for EncodedObjectAsID { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for EncodedObjectAsID { } unsafe impl SubClass < crate :: generated :: Object > for EncodedObjectAsID { } impl Instanciable for EncodedObjectAsID { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { EncodedObjectAsID :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EncodedObjectAsIDMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_object_id : * mut sys :: godot_method_bind , pub set_object_id : * mut sys :: godot_method_bind } impl EncodedObjectAsIDMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EncodedObjectAsIDMethodTable = EncodedObjectAsIDMethodTable { class_constructor : None , get_object_id : 0 as * mut sys :: godot_method_bind , set_object_id : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EncodedObjectAsIDMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "EncodedObjectAsID\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_object_id = (gd_api . godot_method_bind_get_method) (class_name , "get_object_id\0" . as_ptr () as * const c_char) ; table . set_object_id = (gd_api . godot_method_bind_get_method) (class_name , "set_object_id\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::encoded_object_as_id::private::EncodedObjectAsID;
            
            pub mod environment {
                # ! [doc = "This module contains types related to the API class [`Environment`][super::Environment]."] pub (crate) mod private { # [doc = "`core class Environment` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`environment`][super::environment] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_environment.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nEnvironment inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Environment { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Environment ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BgMode (pub i64) ; impl BgMode { pub const CLEAR_COLOR : BgMode = BgMode (0i64) ; pub const COLOR : BgMode = BgMode (1i64) ; pub const SKY : BgMode = BgMode (2i64) ; pub const COLOR_SKY : BgMode = BgMode (3i64) ; pub const CANVAS : BgMode = BgMode (4i64) ; pub const KEEP : BgMode = BgMode (5i64) ; pub const CAMERA_FEED : BgMode = BgMode (6i64) ; pub const MAX : BgMode = BgMode (7i64) ; } impl From < i64 > for BgMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BgMode > for i64 { # [inline] fn from (v : BgMode) -> Self { v . 0 } } impl FromVariant for BgMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DofBlurQuality (pub i64) ; impl DofBlurQuality { pub const LOW : DofBlurQuality = DofBlurQuality (0i64) ; pub const MEDIUM : DofBlurQuality = DofBlurQuality (1i64) ; pub const HIGH : DofBlurQuality = DofBlurQuality (2i64) ; } impl From < i64 > for DofBlurQuality { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DofBlurQuality > for i64 { # [inline] fn from (v : DofBlurQuality) -> Self { v . 0 } } impl FromVariant for DofBlurQuality { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct GlowBlendMode (pub i64) ; impl GlowBlendMode { pub const ADDITIVE : GlowBlendMode = GlowBlendMode (0i64) ; pub const SCREEN : GlowBlendMode = GlowBlendMode (1i64) ; pub const SOFTLIGHT : GlowBlendMode = GlowBlendMode (2i64) ; pub const REPLACE : GlowBlendMode = GlowBlendMode (3i64) ; } impl From < i64 > for GlowBlendMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < GlowBlendMode > for i64 { # [inline] fn from (v : GlowBlendMode) -> Self { v . 0 } } impl FromVariant for GlowBlendMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SsaoBlur (pub i64) ; impl SsaoBlur { pub const DISABLED : SsaoBlur = SsaoBlur (0i64) ; pub const _1X1 : SsaoBlur = SsaoBlur (1i64) ; pub const _2X2 : SsaoBlur = SsaoBlur (2i64) ; pub const _3X3 : SsaoBlur = SsaoBlur (3i64) ; } impl From < i64 > for SsaoBlur { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SsaoBlur > for i64 { # [inline] fn from (v : SsaoBlur) -> Self { v . 0 } } impl FromVariant for SsaoBlur { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SsaoQuality (pub i64) ; impl SsaoQuality { pub const LOW : SsaoQuality = SsaoQuality (0i64) ; pub const MEDIUM : SsaoQuality = SsaoQuality (1i64) ; pub const HIGH : SsaoQuality = SsaoQuality (2i64) ; } impl From < i64 > for SsaoQuality { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SsaoQuality > for i64 { # [inline] fn from (v : SsaoQuality) -> Self { v . 0 } } impl FromVariant for SsaoQuality { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ToneMapper (pub i64) ; impl ToneMapper { pub const LINEAR : ToneMapper = ToneMapper (0i64) ; pub const REINHARDT : ToneMapper = ToneMapper (1i64) ; pub const FILMIC : ToneMapper = ToneMapper (2i64) ; pub const ACES : ToneMapper = ToneMapper (3i64) ; pub const ACES_FITTED : ToneMapper = ToneMapper (4i64) ; } impl From < i64 > for ToneMapper { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ToneMapper > for i64 { # [inline] fn from (v : ToneMapper) -> Self { v . 0 } } impl FromVariant for ToneMapper { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Environment { pub const BG_CLEAR_COLOR : i64 = 0i64 ; pub const DOF_BLUR_QUALITY_LOW : i64 = 0i64 ; pub const GLOW_BLEND_MODE_ADDITIVE : i64 = 0i64 ; pub const SSAO_BLUR_DISABLED : i64 = 0i64 ; pub const SSAO_QUALITY_LOW : i64 = 0i64 ; pub const TONE_MAPPER_LINEAR : i64 = 0i64 ; pub const BG_COLOR : i64 = 1i64 ; pub const DOF_BLUR_QUALITY_MEDIUM : i64 = 1i64 ; pub const GLOW_BLEND_MODE_SCREEN : i64 = 1i64 ; pub const SSAO_BLUR_1x1 : i64 = 1i64 ; pub const SSAO_QUALITY_MEDIUM : i64 = 1i64 ; pub const TONE_MAPPER_REINHARDT : i64 = 1i64 ; pub const BG_SKY : i64 = 2i64 ; pub const DOF_BLUR_QUALITY_HIGH : i64 = 2i64 ; pub const GLOW_BLEND_MODE_SOFTLIGHT : i64 = 2i64 ; pub const SSAO_BLUR_2x2 : i64 = 2i64 ; pub const SSAO_QUALITY_HIGH : i64 = 2i64 ; pub const TONE_MAPPER_FILMIC : i64 = 2i64 ; pub const BG_COLOR_SKY : i64 = 3i64 ; pub const GLOW_BLEND_MODE_REPLACE : i64 = 3i64 ; pub const SSAO_BLUR_3x3 : i64 = 3i64 ; pub const TONE_MAPPER_ACES : i64 = 3i64 ; pub const BG_CANVAS : i64 = 4i64 ; pub const TONE_MAPPER_ACES_FITTED : i64 = 4i64 ; pub const BG_KEEP : i64 = 5i64 ; pub const BG_CAMERA_FEED : i64 = 6i64 ; pub const BG_MAX : i64 = 7i64 ; } impl Environment { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = EnvironmentMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The global brightness value of the rendered scene. Effective only if `adjustment_enabled` is `true`."] # [doc = ""] # [inline] pub fn adjustment_brightness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_adjustment_brightness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Applies the provided [`Texture`][Texture] resource to affect the global color aspect of the rendered scene. Effective only if `adjustment_enabled` is `true`."] # [doc = ""] # [inline] pub fn adjustment_color_correction (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_adjustment_color_correction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The global contrast value of the rendered scene (default value is 1). Effective only if `adjustment_enabled` is `true`."] # [doc = ""] # [inline] pub fn adjustment_contrast (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_adjustment_contrast ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The global color saturation value of the rendered scene (default value is 1). Effective only if `adjustment_enabled` is `true`."] # [doc = ""] # [inline] pub fn adjustment_saturation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_adjustment_saturation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The ambient light's [`Color`][Color]."] # [doc = ""] # [inline] pub fn ambient_light_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ambient_light_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The ambient light's energy. The higher the value, the stronger the light."] # [doc = ""] # [inline] pub fn ambient_light_energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ambient_light_energy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Defines the amount of light that the sky brings on the scene. A value of `0.0` means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of `1.0` means that _all_ the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene.\n**Note:** [`ambient_light_sky_contribution`][Self::ambient_light_sky_contribution] is internally clamped between `0.0` and `1.0` (inclusive)."] # [doc = ""] # [inline] pub fn ambient_light_sky_contribution (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ambient_light_sky_contribution ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The background mode. See [`BGMode`][BGMode] for possible values."] # [doc = ""] # [inline] pub fn background (& self) -> crate :: generated :: environment :: BgMode { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_background ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: environment :: BgMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Color`][Color] displayed for clear areas of the scene. Only effective when using the [`BG_COLOR`][Self::BG_COLOR] or [`BG_COLOR_SKY`][Self::BG_COLOR_SKY] background modes)."] # [doc = ""] # [inline] pub fn bg_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_bg_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The power of the light emitted by the background."] # [doc = ""] # [inline] pub fn bg_energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_bg_energy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The ID of the camera feed to show in the background."] # [doc = ""] # [inline] pub fn camera_feed_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_camera_feed_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum layer ID to display. Only effective when using the [`BG_CANVAS`][Self::BG_CANVAS] background mode."] # [doc = ""] # [inline] pub fn canvas_max_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_canvas_max_layer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The amount of far blur for the depth-of-field effect."] # [doc = ""] # [inline] pub fn dof_blur_far_amount (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_dof_blur_far_amount ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The distance from the camera where the far blur effect affects the rendering."] # [doc = ""] # [inline] pub fn dof_blur_far_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_dof_blur_far_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The depth-of-field far blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower."] # [doc = ""] # [inline] pub fn dof_blur_far_quality (& self) -> crate :: generated :: environment :: DofBlurQuality { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_dof_blur_far_quality ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: environment :: DofBlurQuality > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The length of the transition between the no-blur area and far blur."] # [doc = ""] # [inline] pub fn dof_blur_far_transition (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_dof_blur_far_transition ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The amount of near blur for the depth-of-field effect."] # [doc = ""] # [inline] pub fn dof_blur_near_amount (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_dof_blur_near_amount ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Distance from the camera where the near blur effect affects the rendering."] # [doc = ""] # [inline] pub fn dof_blur_near_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_dof_blur_near_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The depth-of-field near blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower."] # [doc = ""] # [inline] pub fn dof_blur_near_quality (& self) -> crate :: generated :: environment :: DofBlurQuality { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_dof_blur_near_quality ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: environment :: DofBlurQuality > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The length of the transition between the near blur and no-blur area."] # [doc = ""] # [inline] pub fn dof_blur_near_transition (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_dof_blur_near_transition ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The fog's [`Color`][Color]."] # [doc = ""] # [inline] pub fn fog_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_fog_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The fog's depth starting distance from the camera."] # [doc = ""] # [inline] pub fn fog_depth_begin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_fog_depth_begin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The fog depth's intensity curve. A number of presets are available in the **Inspector** by right-clicking the curve."] # [doc = ""] # [inline] pub fn fog_depth_curve (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_fog_depth_curve ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's [`Camera.far`][Camera::far] value."] # [doc = ""] # [inline] pub fn fog_depth_end (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_fog_depth_end ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The height fog's intensity. A number of presets are available in the **Inspector** by right-clicking the curve."] # [doc = ""] # [inline] pub fn fog_height_curve (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_fog_height_curve ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The Y coordinate where the height fog will be the most intense. If this value is greater than [`fog_height_min`][Self::fog_height_min], fog will be displayed from bottom to top. Otherwise, it will be displayed from top to bottom."] # [doc = ""] # [inline] pub fn fog_height_max (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_fog_height_max ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The Y coordinate where the height fog will be the least intense. If this value is greater than [`fog_height_max`][Self::fog_height_max], fog will be displayed from top to bottom. Otherwise, it will be displayed from bottom to top."] # [doc = ""] # [inline] pub fn fog_height_min (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_fog_height_min ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The intensity of the depth fog color transition when looking towards the sun. The sun's direction is determined automatically using the DirectionalLight node in the scene."] # [doc = ""] # [inline] pub fn fog_sun_amount (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_fog_sun_amount ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The depth fog's [`Color`][Color] when looking towards the sun."] # [doc = ""] # [inline] pub fn fog_sun_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_fog_sun_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The intensity of the fog light transmittance effect. Amount of light that the fog transmits."] # [doc = ""] # [inline] pub fn fog_transmit_curve (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_fog_transmit_curve ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The glow blending mode."] # [doc = ""] # [inline] pub fn glow_blend_mode (& self) -> crate :: generated :: environment :: GlowBlendMode { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_glow_blend_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: environment :: GlowBlendMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The bloom's intensity. If set to a value higher than `0`, this will make glow visible in areas darker than the [`glow_hdr_threshold`][Self::glow_hdr_threshold]."] # [doc = ""] # [inline] pub fn glow_bloom (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_glow_bloom ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The bleed scale of the HDR glow."] # [doc = ""] # [inline] pub fn glow_hdr_bleed_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_glow_hdr_bleed_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The lower threshold of the HDR glow. When using the GLES2 renderer (which doesn't support HDR), this needs to be below `1.0` for glow to be visible. A value of `0.9` works well in this case."] # [doc = ""] # [inline] pub fn glow_hdr_bleed_threshold (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_glow_hdr_bleed_threshold ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect."] # [doc = ""] # [inline] pub fn glow_hdr_luminance_cap (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_glow_hdr_luminance_cap ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The glow intensity. When using the GLES2 renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering."] # [doc = ""] # [inline] pub fn glow_intensity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_glow_intensity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The glow strength. When using the GLES2 renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering."] # [doc = ""] # [inline] pub fn glow_strength (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_glow_strength ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The [`Sky`][Sky] resource defined as background."] # [doc = ""] # [inline] pub fn sky (& self) -> Option < Ref < crate :: generated :: Sky , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_sky ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Sky , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Sky`][Sky] resource's custom field of view."] # [doc = ""] # [inline] pub fn sky_custom_fov (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_sky_custom_fov ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The [`Sky`][Sky] resource's rotation expressed as a [`Basis`][Basis]."] # [doc = ""] # [inline] pub fn sky_orientation (& self) -> Basis { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_sky_orientation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Basis > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Sky`][Sky] resource's rotation expressed as Euler angles in radians."] # [doc = ""] # [inline] pub fn sky_rotation (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_sky_rotation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Sky`][Sky] resource's rotation expressed as Euler angles in degrees."] # [doc = ""] # [inline] pub fn sky_rotation_degrees (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_sky_rotation_degrees ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than `0` will make the SSAO effect visible in areas darkened by AO textures."] # [doc = ""] # [inline] pub fn ssao_ao_channel_affect (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssao_ao_channel_affect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The screen-space ambient occlusion bias. This should be kept high enough to prevent \"smooth\" curves from being affected by ambient occlusion."] # [doc = ""] # [inline] pub fn ssao_bias (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssao_bias ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The screen-space ambient occlusion blur quality. See [`SSAOBlur`][SSAOBlur] for possible values."] # [doc = ""] # [inline] pub fn ssao_blur (& self) -> crate :: generated :: environment :: SsaoBlur { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssao_blur ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: environment :: SsaoBlur > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The screen-space ambient occlusion color."] # [doc = ""] # [inline] pub fn ssao_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssao_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than `0` will make the SSAO effect visible in direct light."] # [doc = ""] # [inline] pub fn ssao_direct_light_affect (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssao_direct_light_affect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The screen-space ambient occlusion edge sharpness."] # [doc = ""] # [inline] pub fn ssao_edge_sharpness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssao_edge_sharpness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The primary screen-space ambient occlusion intensity. See also [`ssao_radius`][Self::ssao_radius]."] # [doc = ""] # [inline] pub fn ssao_intensity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssao_intensity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The secondary screen-space ambient occlusion intensity. See also [`ssao_radius2`][Self::ssao_radius2]."] # [doc = ""] # [inline] pub fn ssao_intensity2 (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssao_intensity2 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The screen-space ambient occlusion quality. Higher qualities will make better use of small objects for ambient occlusion, but are slower."] # [doc = ""] # [inline] pub fn ssao_quality (& self) -> crate :: generated :: environment :: SsaoQuality { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssao_quality ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: environment :: SsaoQuality > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The primary screen-space ambient occlusion radius."] # [doc = ""] # [inline] pub fn ssao_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssao_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The secondary screen-space ambient occlusion radius. If set to a value higher than `0`, enables the secondary screen-space ambient occlusion effect which can be used to improve the effect's appearance (at the cost of performance)."] # [doc = ""] # [inline] pub fn ssao_radius2 (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssao_radius2 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The depth tolerance for screen-space reflections."] # [doc = ""] # [inline] pub fn ssr_depth_tolerance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssr_depth_tolerance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection)."] # [doc = ""] # [inline] pub fn ssr_fade_in (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssr_fade_in ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the \"global\" reflection."] # [doc = ""] # [inline] pub fn ssr_fade_out (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssr_fade_out ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum number of steps for screen-space reflections. Higher values are slower."] # [doc = ""] # [inline] pub fn ssr_max_steps (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_ssr_max_steps ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, enables the tonemapping auto exposure mode of the scene renderer. If `true`, the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light."] # [doc = ""] # [inline] pub fn tonemap_auto_exposure (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_tonemap_auto_exposure ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The scale of the auto exposure effect. Affects the intensity of auto exposure."] # [doc = ""] # [inline] pub fn tonemap_auto_exposure_grey (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_tonemap_auto_exposure_grey ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum luminance value for the auto exposure."] # [doc = ""] # [inline] pub fn tonemap_auto_exposure_max (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_tonemap_auto_exposure_max ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The minimum luminance value for the auto exposure."] # [doc = ""] # [inline] pub fn tonemap_auto_exposure_min (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_tonemap_auto_exposure_min ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure."] # [doc = ""] # [inline] pub fn tonemap_auto_exposure_speed (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_tonemap_auto_exposure_speed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The default exposure used for tonemapping."] # [doc = ""] # [inline] pub fn tonemap_exposure (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_tonemap_exposure ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The white reference value for tonemapping. Only effective if the [`tonemap_mode`][Self::tonemap_mode] isn't set to [`TONE_MAPPER_LINEAR`][Self::TONE_MAPPER_LINEAR]."] # [doc = ""] # [inline] pub fn tonemap_white (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_tonemap_white ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The tonemapping mode to use. Tonemapping is the process that \"converts\" HDR values to be suitable for rendering on a SDR display. (Godot doesn't support rendering on HDR displays yet.)"] # [doc = ""] # [inline] pub fn tonemapper (& self) -> crate :: generated :: environment :: ToneMapper { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . get_tonemapper ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: environment :: ToneMapper > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, enables the `adjustment_*` properties provided by this resource. If `false`, modifications to the `adjustment_*` properties will have no effect on the rendered scene."] # [doc = ""] # [inline] pub fn is_adjustment_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . is_adjustment_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, enables the depth-of-field far blur effect."] # [doc = ""] # [inline] pub fn is_dof_blur_far_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . is_dof_blur_far_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, enables the depth-of-field near blur effect."] # [doc = ""] # [inline] pub fn is_dof_blur_near_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . is_dof_blur_near_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the depth fog effect is enabled. When enabled, fog will appear in the distance (relative to the camera)."] # [doc = ""] # [inline] pub fn is_fog_depth_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . is_fog_depth_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, fog effects are enabled. [`fog_height_enabled`][Self::fog_height_enabled] and/or [`fog_depth_enabled`][Self::fog_depth_enabled] must be set to `true` to actually display fog."] # [doc = ""] # [inline] pub fn is_fog_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . is_fog_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the height fog effect is enabled. When enabled, fog will appear in a defined height range, regardless of the distance from the camera. This can be used to simulate \"deep water\" effects with a lower performance cost compared to a dedicated shader."] # [doc = ""] # [inline] pub fn is_fog_height_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . is_fog_height_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Enables fog's light transmission effect. If `true`, light will be more visible in the fog to simulate light scattering as in real life."] # [doc = ""] # [inline] pub fn is_fog_transmit_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . is_fog_transmit_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Smooths out the blockiness created by sampling higher levels, at the cost of performance.\n**Note:** When using the GLES2 renderer, this is only available if the GPU supports the `GL_EXT_gpu_shader4` extension."] # [doc = ""] # [inline] pub fn is_glow_bicubic_upscale_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . is_glow_bicubic_upscale_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the glow effect is enabled.\n**Note:** Only effective if [member ProjectSettings.rendering/quality/intended_usage/framebuffer_allocation] is **3D** (_not_ **3D Without Effects**). On mobile, [member ProjectSettings.rendering/quality/intended_usage/framebuffer_allocation] defaults to **3D Without Effects** by default, so its `.mobile` override needs to be changed to **3D**.\n**Note:** When using GLES3 on mobile, HDR rendering is disabled by default for performance reasons. This means glow will only be visible if [`glow_hdr_threshold`][Self::glow_hdr_threshold] is decreased below `1.0` or if [`glow_bloom`][Self::glow_bloom] is increased above `0.0`. Also consider increasing [`glow_intensity`][Self::glow_intensity] to `1.5`. If you want glow to behave on mobile like it does on desktop (at a performance cost), enable [member ProjectSettings.rendering/quality/depth/hdr]'s `.mobile` override."] # [doc = ""] # [inline] pub fn is_glow_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . is_glow_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Takes more samples during downsample pass of glow. This ensures that single pixels are captured by glow which makes the glow look smoother and more stable during movement. However, it is very expensive and makes the glow post process take twice as long."] # [doc = ""] # [inline] pub fn is_glow_high_quality_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . is_glow_high_quality_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the glow level `idx` is specified, `false` otherwise."] # [doc = ""] # [inline] pub fn is_glow_level_enabled (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . is_glow_level_enabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. This is a costly effect and should be disabled first when running into performance issues."] # [doc = ""] # [inline] pub fn is_ssao_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . is_ssao_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [`GIProbe`][GIProbe]s or [`ReflectionProbe`][ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others."] # [doc = ""] # [inline] pub fn is_ssr_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . is_ssr_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, screen-space reflections will take the material roughness into account."] # [doc = ""] # [inline] pub fn is_ssr_rough (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . is_ssr_rough ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The global brightness value of the rendered scene. Effective only if `adjustment_enabled` is `true`."] # [doc = ""] # [inline] pub fn set_adjustment_brightness (& self , brightness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_adjustment_brightness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , brightness as _) ; } } # [doc = "Applies the provided [`Texture`][Texture] resource to affect the global color aspect of the rendered scene. Effective only if `adjustment_enabled` is `true`."] # [doc = ""] # [inline] pub fn set_adjustment_color_correction (& self , color_correction : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_adjustment_color_correction ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , color_correction . as_arg_ptr ()) ; } } # [doc = "The global contrast value of the rendered scene (default value is 1). Effective only if `adjustment_enabled` is `true`."] # [doc = ""] # [inline] pub fn set_adjustment_contrast (& self , contrast : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_adjustment_contrast ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , contrast as _) ; } } # [doc = "If `true`, enables the `adjustment_*` properties provided by this resource. If `false`, modifications to the `adjustment_*` properties will have no effect on the rendered scene."] # [doc = ""] # [inline] pub fn set_adjustment_enable (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_adjustment_enable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The global color saturation value of the rendered scene (default value is 1). Effective only if `adjustment_enabled` is `true`."] # [doc = ""] # [inline] pub fn set_adjustment_saturation (& self , saturation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_adjustment_saturation ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , saturation as _) ; } } # [doc = "The ambient light's [`Color`][Color]."] # [doc = ""] # [inline] pub fn set_ambient_light_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ambient_light_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The ambient light's energy. The higher the value, the stronger the light."] # [doc = ""] # [inline] pub fn set_ambient_light_energy (& self , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ambient_light_energy ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , energy as _) ; } } # [doc = "Defines the amount of light that the sky brings on the scene. A value of `0.0` means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of `1.0` means that _all_ the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene.\n**Note:** [`ambient_light_sky_contribution`][Self::ambient_light_sky_contribution] is internally clamped between `0.0` and `1.0` (inclusive)."] # [doc = ""] # [inline] pub fn set_ambient_light_sky_contribution (& self , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ambient_light_sky_contribution ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , energy as _) ; } } # [doc = "The background mode. See [`BGMode`][BGMode] for possible values."] # [doc = ""] # [inline] pub fn set_background (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_background ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The [`Color`][Color] displayed for clear areas of the scene. Only effective when using the [`BG_COLOR`][Self::BG_COLOR] or [`BG_COLOR_SKY`][Self::BG_COLOR_SKY] background modes)."] # [doc = ""] # [inline] pub fn set_bg_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_bg_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The power of the light emitted by the background."] # [doc = ""] # [inline] pub fn set_bg_energy (& self , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_bg_energy ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , energy as _) ; } } # [doc = "The ID of the camera feed to show in the background."] # [doc = ""] # [inline] pub fn set_camera_feed_id (& self , camera_feed_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_camera_feed_id ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , camera_feed_id as _) ; } } # [doc = "The maximum layer ID to display. Only effective when using the [`BG_CANVAS`][Self::BG_CANVAS] background mode."] # [doc = ""] # [inline] pub fn set_canvas_max_layer (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_canvas_max_layer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , layer as _) ; } } # [doc = "The amount of far blur for the depth-of-field effect."] # [doc = ""] # [inline] pub fn set_dof_blur_far_amount (& self , intensity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_dof_blur_far_amount ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , intensity as _) ; } } # [doc = "The distance from the camera where the far blur effect affects the rendering."] # [doc = ""] # [inline] pub fn set_dof_blur_far_distance (& self , intensity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_dof_blur_far_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , intensity as _) ; } } # [doc = "If `true`, enables the depth-of-field far blur effect."] # [doc = ""] # [inline] pub fn set_dof_blur_far_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_dof_blur_far_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The depth-of-field far blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower."] # [doc = ""] # [inline] pub fn set_dof_blur_far_quality (& self , intensity : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_dof_blur_far_quality ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , intensity as _) ; } } # [doc = "The length of the transition between the no-blur area and far blur."] # [doc = ""] # [inline] pub fn set_dof_blur_far_transition (& self , intensity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_dof_blur_far_transition ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , intensity as _) ; } } # [doc = "The amount of near blur for the depth-of-field effect."] # [doc = ""] # [inline] pub fn set_dof_blur_near_amount (& self , intensity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_dof_blur_near_amount ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , intensity as _) ; } } # [doc = "Distance from the camera where the near blur effect affects the rendering."] # [doc = ""] # [inline] pub fn set_dof_blur_near_distance (& self , intensity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_dof_blur_near_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , intensity as _) ; } } # [doc = "If `true`, enables the depth-of-field near blur effect."] # [doc = ""] # [inline] pub fn set_dof_blur_near_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_dof_blur_near_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The depth-of-field near blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower."] # [doc = ""] # [inline] pub fn set_dof_blur_near_quality (& self , level : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_dof_blur_near_quality ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , level as _) ; } } # [doc = "The length of the transition between the near blur and no-blur area."] # [doc = ""] # [inline] pub fn set_dof_blur_near_transition (& self , intensity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_dof_blur_near_transition ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , intensity as _) ; } } # [doc = "The fog's [`Color`][Color]."] # [doc = ""] # [inline] pub fn set_fog_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_fog_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The fog's depth starting distance from the camera."] # [doc = ""] # [inline] pub fn set_fog_depth_begin (& self , distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_fog_depth_begin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , distance as _) ; } } # [doc = "The fog depth's intensity curve. A number of presets are available in the **Inspector** by right-clicking the curve."] # [doc = ""] # [inline] pub fn set_fog_depth_curve (& self , curve : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_fog_depth_curve ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , curve as _) ; } } # [doc = "If `true`, the depth fog effect is enabled. When enabled, fog will appear in the distance (relative to the camera)."] # [doc = ""] # [inline] pub fn set_fog_depth_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_fog_depth_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's [`Camera.far`][Camera::far] value."] # [doc = ""] # [inline] pub fn set_fog_depth_end (& self , distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_fog_depth_end ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , distance as _) ; } } # [doc = "If `true`, fog effects are enabled. [`fog_height_enabled`][Self::fog_height_enabled] and/or [`fog_depth_enabled`][Self::fog_depth_enabled] must be set to `true` to actually display fog."] # [doc = ""] # [inline] pub fn set_fog_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_fog_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The height fog's intensity. A number of presets are available in the **Inspector** by right-clicking the curve."] # [doc = ""] # [inline] pub fn set_fog_height_curve (& self , curve : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_fog_height_curve ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , curve as _) ; } } # [doc = "If `true`, the height fog effect is enabled. When enabled, fog will appear in a defined height range, regardless of the distance from the camera. This can be used to simulate \"deep water\" effects with a lower performance cost compared to a dedicated shader."] # [doc = ""] # [inline] pub fn set_fog_height_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_fog_height_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The Y coordinate where the height fog will be the most intense. If this value is greater than [`fog_height_min`][Self::fog_height_min], fog will be displayed from bottom to top. Otherwise, it will be displayed from top to bottom."] # [doc = ""] # [inline] pub fn set_fog_height_max (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_fog_height_max ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = "The Y coordinate where the height fog will be the least intense. If this value is greater than [`fog_height_max`][Self::fog_height_max], fog will be displayed from top to bottom. Otherwise, it will be displayed from bottom to top."] # [doc = ""] # [inline] pub fn set_fog_height_min (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_fog_height_min ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = "The intensity of the depth fog color transition when looking towards the sun. The sun's direction is determined automatically using the DirectionalLight node in the scene."] # [doc = ""] # [inline] pub fn set_fog_sun_amount (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_fog_sun_amount ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "The depth fog's [`Color`][Color] when looking towards the sun."] # [doc = ""] # [inline] pub fn set_fog_sun_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_fog_sun_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The intensity of the fog light transmittance effect. Amount of light that the fog transmits."] # [doc = ""] # [inline] pub fn set_fog_transmit_curve (& self , curve : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_fog_transmit_curve ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , curve as _) ; } } # [doc = "Enables fog's light transmission effect. If `true`, light will be more visible in the fog to simulate light scattering as in real life."] # [doc = ""] # [inline] pub fn set_fog_transmit_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_fog_transmit_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Smooths out the blockiness created by sampling higher levels, at the cost of performance.\n**Note:** When using the GLES2 renderer, this is only available if the GPU supports the `GL_EXT_gpu_shader4` extension."] # [doc = ""] # [inline] pub fn set_glow_bicubic_upscale (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_glow_bicubic_upscale ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The glow blending mode."] # [doc = ""] # [inline] pub fn set_glow_blend_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_glow_blend_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The bloom's intensity. If set to a value higher than `0`, this will make glow visible in areas darker than the [`glow_hdr_threshold`][Self::glow_hdr_threshold]."] # [doc = ""] # [inline] pub fn set_glow_bloom (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_glow_bloom ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "If `true`, the glow effect is enabled.\n**Note:** Only effective if [member ProjectSettings.rendering/quality/intended_usage/framebuffer_allocation] is **3D** (_not_ **3D Without Effects**). On mobile, [member ProjectSettings.rendering/quality/intended_usage/framebuffer_allocation] defaults to **3D Without Effects** by default, so its `.mobile` override needs to be changed to **3D**.\n**Note:** When using GLES3 on mobile, HDR rendering is disabled by default for performance reasons. This means glow will only be visible if [`glow_hdr_threshold`][Self::glow_hdr_threshold] is decreased below `1.0` or if [`glow_bloom`][Self::glow_bloom] is increased above `0.0`. Also consider increasing [`glow_intensity`][Self::glow_intensity] to `1.5`. If you want glow to behave on mobile like it does on desktop (at a performance cost), enable [member ProjectSettings.rendering/quality/depth/hdr]'s `.mobile` override."] # [doc = ""] # [inline] pub fn set_glow_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_glow_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The bleed scale of the HDR glow."] # [doc = ""] # [inline] pub fn set_glow_hdr_bleed_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_glow_hdr_bleed_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , scale as _) ; } } # [doc = "The lower threshold of the HDR glow. When using the GLES2 renderer (which doesn't support HDR), this needs to be below `1.0` for glow to be visible. A value of `0.9` works well in this case."] # [doc = ""] # [inline] pub fn set_glow_hdr_bleed_threshold (& self , threshold : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_glow_hdr_bleed_threshold ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , threshold as _) ; } } # [doc = "The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect."] # [doc = ""] # [inline] pub fn set_glow_hdr_luminance_cap (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_glow_hdr_luminance_cap ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Takes more samples during downsample pass of glow. This ensures that single pixels are captured by glow which makes the glow look smoother and more stable during movement. However, it is very expensive and makes the glow post process take twice as long."] # [doc = ""] # [inline] pub fn set_glow_high_quality (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_glow_high_quality ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The glow intensity. When using the GLES2 renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering."] # [doc = ""] # [inline] pub fn set_glow_intensity (& self , intensity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_glow_intensity ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , intensity as _) ; } } # [doc = "Enables or disables the glow level at index `idx`. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled."] # [doc = ""] # [inline] pub fn set_glow_level (& self , idx : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_glow_level ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , enabled as _) ; } } # [doc = "The glow strength. When using the GLES2 renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering."] # [doc = ""] # [inline] pub fn set_glow_strength (& self , strength : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_glow_strength ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , strength as _) ; } } # [doc = "The [`Sky`][Sky] resource defined as background."] # [doc = ""] # [inline] pub fn set_sky (& self , sky : impl AsArg < crate :: generated :: Sky >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_sky ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , sky . as_arg_ptr ()) ; } } # [doc = "The [`Sky`][Sky] resource's custom field of view."] # [doc = ""] # [inline] pub fn set_sky_custom_fov (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_sky_custom_fov ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , scale as _) ; } } # [doc = "The [`Sky`][Sky] resource's rotation expressed as a [`Basis`][Basis]."] # [doc = ""] # [inline] pub fn set_sky_orientation (& self , orientation : Basis) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_sky_orientation ; let ret = crate :: icalls :: icallvar__basis (method_bind , self . this . sys () . as_ptr () , orientation) ; } } # [doc = "The [`Sky`][Sky] resource's rotation expressed as Euler angles in radians."] # [doc = ""] # [inline] pub fn set_sky_rotation (& self , euler_radians : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_sky_rotation ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , euler_radians) ; } } # [doc = "The [`Sky`][Sky] resource's rotation expressed as Euler angles in degrees."] # [doc = ""] # [inline] pub fn set_sky_rotation_degrees (& self , euler_degrees : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_sky_rotation_degrees ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , euler_degrees) ; } } # [doc = "The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than `0` will make the SSAO effect visible in areas darkened by AO textures."] # [doc = ""] # [inline] pub fn set_ssao_ao_channel_affect (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssao_ao_channel_affect ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "The screen-space ambient occlusion bias. This should be kept high enough to prevent \"smooth\" curves from being affected by ambient occlusion."] # [doc = ""] # [inline] pub fn set_ssao_bias (& self , bias : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssao_bias ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , bias as _) ; } } # [doc = "The screen-space ambient occlusion blur quality. See [`SSAOBlur`][SSAOBlur] for possible values."] # [doc = ""] # [inline] pub fn set_ssao_blur (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssao_blur ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The screen-space ambient occlusion color."] # [doc = ""] # [inline] pub fn set_ssao_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssao_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than `0` will make the SSAO effect visible in direct light."] # [doc = ""] # [inline] pub fn set_ssao_direct_light_affect (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssao_direct_light_affect ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "The screen-space ambient occlusion edge sharpness."] # [doc = ""] # [inline] pub fn set_ssao_edge_sharpness (& self , edge_sharpness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssao_edge_sharpness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , edge_sharpness as _) ; } } # [doc = "If `true`, the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. This is a costly effect and should be disabled first when running into performance issues."] # [doc = ""] # [inline] pub fn set_ssao_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssao_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The primary screen-space ambient occlusion intensity. See also [`ssao_radius`][Self::ssao_radius]."] # [doc = ""] # [inline] pub fn set_ssao_intensity (& self , intensity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssao_intensity ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , intensity as _) ; } } # [doc = "The secondary screen-space ambient occlusion intensity. See also [`ssao_radius2`][Self::ssao_radius2]."] # [doc = ""] # [inline] pub fn set_ssao_intensity2 (& self , intensity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssao_intensity2 ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , intensity as _) ; } } # [doc = "The screen-space ambient occlusion quality. Higher qualities will make better use of small objects for ambient occlusion, but are slower."] # [doc = ""] # [inline] pub fn set_ssao_quality (& self , quality : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssao_quality ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , quality as _) ; } } # [doc = "The primary screen-space ambient occlusion radius."] # [doc = ""] # [inline] pub fn set_ssao_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssao_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = "The secondary screen-space ambient occlusion radius. If set to a value higher than `0`, enables the secondary screen-space ambient occlusion effect which can be used to improve the effect's appearance (at the cost of performance)."] # [doc = ""] # [inline] pub fn set_ssao_radius2 (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssao_radius2 ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = "The depth tolerance for screen-space reflections."] # [doc = ""] # [inline] pub fn set_ssr_depth_tolerance (& self , depth_tolerance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssr_depth_tolerance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , depth_tolerance as _) ; } } # [doc = "If `true`, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [`GIProbe`][GIProbe]s or [`ReflectionProbe`][ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others."] # [doc = ""] # [inline] pub fn set_ssr_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssr_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection)."] # [doc = ""] # [inline] pub fn set_ssr_fade_in (& self , fade_in : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssr_fade_in ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , fade_in as _) ; } } # [doc = "The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the \"global\" reflection."] # [doc = ""] # [inline] pub fn set_ssr_fade_out (& self , fade_out : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssr_fade_out ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , fade_out as _) ; } } # [doc = "The maximum number of steps for screen-space reflections. Higher values are slower."] # [doc = ""] # [inline] pub fn set_ssr_max_steps (& self , max_steps : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssr_max_steps ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , max_steps as _) ; } } # [doc = "If `true`, screen-space reflections will take the material roughness into account."] # [doc = ""] # [inline] pub fn set_ssr_rough (& self , rough : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_ssr_rough ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , rough as _) ; } } # [doc = "If `true`, enables the tonemapping auto exposure mode of the scene renderer. If `true`, the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light."] # [doc = ""] # [inline] pub fn set_tonemap_auto_exposure (& self , auto_exposure : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_tonemap_auto_exposure ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , auto_exposure as _) ; } } # [doc = "The scale of the auto exposure effect. Affects the intensity of auto exposure."] # [doc = ""] # [inline] pub fn set_tonemap_auto_exposure_grey (& self , exposure_grey : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_tonemap_auto_exposure_grey ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , exposure_grey as _) ; } } # [doc = "The maximum luminance value for the auto exposure."] # [doc = ""] # [inline] pub fn set_tonemap_auto_exposure_max (& self , exposure_max : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_tonemap_auto_exposure_max ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , exposure_max as _) ; } } # [doc = "The minimum luminance value for the auto exposure."] # [doc = ""] # [inline] pub fn set_tonemap_auto_exposure_min (& self , exposure_min : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_tonemap_auto_exposure_min ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , exposure_min as _) ; } } # [doc = "The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure."] # [doc = ""] # [inline] pub fn set_tonemap_auto_exposure_speed (& self , exposure_speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_tonemap_auto_exposure_speed ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , exposure_speed as _) ; } } # [doc = "The default exposure used for tonemapping."] # [doc = ""] # [inline] pub fn set_tonemap_exposure (& self , exposure : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_tonemap_exposure ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , exposure as _) ; } } # [doc = "The white reference value for tonemapping. Only effective if the [`tonemap_mode`][Self::tonemap_mode] isn't set to [`TONE_MAPPER_LINEAR`][Self::TONE_MAPPER_LINEAR]."] # [doc = ""] # [inline] pub fn set_tonemap_white (& self , white : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_tonemap_white ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , white as _) ; } } # [doc = "The tonemapping mode to use. Tonemapping is the process that \"converts\" HDR values to be suitable for rendering on a SDR display. (Godot doesn't support rendering on HDR displays yet.)"] # [doc = ""] # [inline] pub fn set_tonemapper (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EnvironmentMethodTable :: get (get_api ()) . set_tonemapper ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Environment { } unsafe impl GodotObject for Environment { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Environment" } } impl std :: ops :: Deref for Environment { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Environment { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Environment { } unsafe impl SubClass < crate :: generated :: Reference > for Environment { } unsafe impl SubClass < crate :: generated :: Object > for Environment { } impl Instanciable for Environment { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Environment :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EnvironmentMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_adjustment_brightness : * mut sys :: godot_method_bind , pub get_adjustment_color_correction : * mut sys :: godot_method_bind , pub get_adjustment_contrast : * mut sys :: godot_method_bind , pub get_adjustment_saturation : * mut sys :: godot_method_bind , pub get_ambient_light_color : * mut sys :: godot_method_bind , pub get_ambient_light_energy : * mut sys :: godot_method_bind , pub get_ambient_light_sky_contribution : * mut sys :: godot_method_bind , pub get_background : * mut sys :: godot_method_bind , pub get_bg_color : * mut sys :: godot_method_bind , pub get_bg_energy : * mut sys :: godot_method_bind , pub get_camera_feed_id : * mut sys :: godot_method_bind , pub get_canvas_max_layer : * mut sys :: godot_method_bind , pub get_dof_blur_far_amount : * mut sys :: godot_method_bind , pub get_dof_blur_far_distance : * mut sys :: godot_method_bind , pub get_dof_blur_far_quality : * mut sys :: godot_method_bind , pub get_dof_blur_far_transition : * mut sys :: godot_method_bind , pub get_dof_blur_near_amount : * mut sys :: godot_method_bind , pub get_dof_blur_near_distance : * mut sys :: godot_method_bind , pub get_dof_blur_near_quality : * mut sys :: godot_method_bind , pub get_dof_blur_near_transition : * mut sys :: godot_method_bind , pub get_fog_color : * mut sys :: godot_method_bind , pub get_fog_depth_begin : * mut sys :: godot_method_bind , pub get_fog_depth_curve : * mut sys :: godot_method_bind , pub get_fog_depth_end : * mut sys :: godot_method_bind , pub get_fog_height_curve : * mut sys :: godot_method_bind , pub get_fog_height_max : * mut sys :: godot_method_bind , pub get_fog_height_min : * mut sys :: godot_method_bind , pub get_fog_sun_amount : * mut sys :: godot_method_bind , pub get_fog_sun_color : * mut sys :: godot_method_bind , pub get_fog_transmit_curve : * mut sys :: godot_method_bind , pub get_glow_blend_mode : * mut sys :: godot_method_bind , pub get_glow_bloom : * mut sys :: godot_method_bind , pub get_glow_hdr_bleed_scale : * mut sys :: godot_method_bind , pub get_glow_hdr_bleed_threshold : * mut sys :: godot_method_bind , pub get_glow_hdr_luminance_cap : * mut sys :: godot_method_bind , pub get_glow_intensity : * mut sys :: godot_method_bind , pub get_glow_strength : * mut sys :: godot_method_bind , pub get_sky : * mut sys :: godot_method_bind , pub get_sky_custom_fov : * mut sys :: godot_method_bind , pub get_sky_orientation : * mut sys :: godot_method_bind , pub get_sky_rotation : * mut sys :: godot_method_bind , pub get_sky_rotation_degrees : * mut sys :: godot_method_bind , pub get_ssao_ao_channel_affect : * mut sys :: godot_method_bind , pub get_ssao_bias : * mut sys :: godot_method_bind , pub get_ssao_blur : * mut sys :: godot_method_bind , pub get_ssao_color : * mut sys :: godot_method_bind , pub get_ssao_direct_light_affect : * mut sys :: godot_method_bind , pub get_ssao_edge_sharpness : * mut sys :: godot_method_bind , pub get_ssao_intensity : * mut sys :: godot_method_bind , pub get_ssao_intensity2 : * mut sys :: godot_method_bind , pub get_ssao_quality : * mut sys :: godot_method_bind , pub get_ssao_radius : * mut sys :: godot_method_bind , pub get_ssao_radius2 : * mut sys :: godot_method_bind , pub get_ssr_depth_tolerance : * mut sys :: godot_method_bind , pub get_ssr_fade_in : * mut sys :: godot_method_bind , pub get_ssr_fade_out : * mut sys :: godot_method_bind , pub get_ssr_max_steps : * mut sys :: godot_method_bind , pub get_tonemap_auto_exposure : * mut sys :: godot_method_bind , pub get_tonemap_auto_exposure_grey : * mut sys :: godot_method_bind , pub get_tonemap_auto_exposure_max : * mut sys :: godot_method_bind , pub get_tonemap_auto_exposure_min : * mut sys :: godot_method_bind , pub get_tonemap_auto_exposure_speed : * mut sys :: godot_method_bind , pub get_tonemap_exposure : * mut sys :: godot_method_bind , pub get_tonemap_white : * mut sys :: godot_method_bind , pub get_tonemapper : * mut sys :: godot_method_bind , pub is_adjustment_enabled : * mut sys :: godot_method_bind , pub is_dof_blur_far_enabled : * mut sys :: godot_method_bind , pub is_dof_blur_near_enabled : * mut sys :: godot_method_bind , pub is_fog_depth_enabled : * mut sys :: godot_method_bind , pub is_fog_enabled : * mut sys :: godot_method_bind , pub is_fog_height_enabled : * mut sys :: godot_method_bind , pub is_fog_transmit_enabled : * mut sys :: godot_method_bind , pub is_glow_bicubic_upscale_enabled : * mut sys :: godot_method_bind , pub is_glow_enabled : * mut sys :: godot_method_bind , pub is_glow_high_quality_enabled : * mut sys :: godot_method_bind , pub is_glow_level_enabled : * mut sys :: godot_method_bind , pub is_ssao_enabled : * mut sys :: godot_method_bind , pub is_ssr_enabled : * mut sys :: godot_method_bind , pub is_ssr_rough : * mut sys :: godot_method_bind , pub set_adjustment_brightness : * mut sys :: godot_method_bind , pub set_adjustment_color_correction : * mut sys :: godot_method_bind , pub set_adjustment_contrast : * mut sys :: godot_method_bind , pub set_adjustment_enable : * mut sys :: godot_method_bind , pub set_adjustment_saturation : * mut sys :: godot_method_bind , pub set_ambient_light_color : * mut sys :: godot_method_bind , pub set_ambient_light_energy : * mut sys :: godot_method_bind , pub set_ambient_light_sky_contribution : * mut sys :: godot_method_bind , pub set_background : * mut sys :: godot_method_bind , pub set_bg_color : * mut sys :: godot_method_bind , pub set_bg_energy : * mut sys :: godot_method_bind , pub set_camera_feed_id : * mut sys :: godot_method_bind , pub set_canvas_max_layer : * mut sys :: godot_method_bind , pub set_dof_blur_far_amount : * mut sys :: godot_method_bind , pub set_dof_blur_far_distance : * mut sys :: godot_method_bind , pub set_dof_blur_far_enabled : * mut sys :: godot_method_bind , pub set_dof_blur_far_quality : * mut sys :: godot_method_bind , pub set_dof_blur_far_transition : * mut sys :: godot_method_bind , pub set_dof_blur_near_amount : * mut sys :: godot_method_bind , pub set_dof_blur_near_distance : * mut sys :: godot_method_bind , pub set_dof_blur_near_enabled : * mut sys :: godot_method_bind , pub set_dof_blur_near_quality : * mut sys :: godot_method_bind , pub set_dof_blur_near_transition : * mut sys :: godot_method_bind , pub set_fog_color : * mut sys :: godot_method_bind , pub set_fog_depth_begin : * mut sys :: godot_method_bind , pub set_fog_depth_curve : * mut sys :: godot_method_bind , pub set_fog_depth_enabled : * mut sys :: godot_method_bind , pub set_fog_depth_end : * mut sys :: godot_method_bind , pub set_fog_enabled : * mut sys :: godot_method_bind , pub set_fog_height_curve : * mut sys :: godot_method_bind , pub set_fog_height_enabled : * mut sys :: godot_method_bind , pub set_fog_height_max : * mut sys :: godot_method_bind , pub set_fog_height_min : * mut sys :: godot_method_bind , pub set_fog_sun_amount : * mut sys :: godot_method_bind , pub set_fog_sun_color : * mut sys :: godot_method_bind , pub set_fog_transmit_curve : * mut sys :: godot_method_bind , pub set_fog_transmit_enabled : * mut sys :: godot_method_bind , pub set_glow_bicubic_upscale : * mut sys :: godot_method_bind , pub set_glow_blend_mode : * mut sys :: godot_method_bind , pub set_glow_bloom : * mut sys :: godot_method_bind , pub set_glow_enabled : * mut sys :: godot_method_bind , pub set_glow_hdr_bleed_scale : * mut sys :: godot_method_bind , pub set_glow_hdr_bleed_threshold : * mut sys :: godot_method_bind , pub set_glow_hdr_luminance_cap : * mut sys :: godot_method_bind , pub set_glow_high_quality : * mut sys :: godot_method_bind , pub set_glow_intensity : * mut sys :: godot_method_bind , pub set_glow_level : * mut sys :: godot_method_bind , pub set_glow_strength : * mut sys :: godot_method_bind , pub set_sky : * mut sys :: godot_method_bind , pub set_sky_custom_fov : * mut sys :: godot_method_bind , pub set_sky_orientation : * mut sys :: godot_method_bind , pub set_sky_rotation : * mut sys :: godot_method_bind , pub set_sky_rotation_degrees : * mut sys :: godot_method_bind , pub set_ssao_ao_channel_affect : * mut sys :: godot_method_bind , pub set_ssao_bias : * mut sys :: godot_method_bind , pub set_ssao_blur : * mut sys :: godot_method_bind , pub set_ssao_color : * mut sys :: godot_method_bind , pub set_ssao_direct_light_affect : * mut sys :: godot_method_bind , pub set_ssao_edge_sharpness : * mut sys :: godot_method_bind , pub set_ssao_enabled : * mut sys :: godot_method_bind , pub set_ssao_intensity : * mut sys :: godot_method_bind , pub set_ssao_intensity2 : * mut sys :: godot_method_bind , pub set_ssao_quality : * mut sys :: godot_method_bind , pub set_ssao_radius : * mut sys :: godot_method_bind , pub set_ssao_radius2 : * mut sys :: godot_method_bind , pub set_ssr_depth_tolerance : * mut sys :: godot_method_bind , pub set_ssr_enabled : * mut sys :: godot_method_bind , pub set_ssr_fade_in : * mut sys :: godot_method_bind , pub set_ssr_fade_out : * mut sys :: godot_method_bind , pub set_ssr_max_steps : * mut sys :: godot_method_bind , pub set_ssr_rough : * mut sys :: godot_method_bind , pub set_tonemap_auto_exposure : * mut sys :: godot_method_bind , pub set_tonemap_auto_exposure_grey : * mut sys :: godot_method_bind , pub set_tonemap_auto_exposure_max : * mut sys :: godot_method_bind , pub set_tonemap_auto_exposure_min : * mut sys :: godot_method_bind , pub set_tonemap_auto_exposure_speed : * mut sys :: godot_method_bind , pub set_tonemap_exposure : * mut sys :: godot_method_bind , pub set_tonemap_white : * mut sys :: godot_method_bind , pub set_tonemapper : * mut sys :: godot_method_bind } impl EnvironmentMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EnvironmentMethodTable = EnvironmentMethodTable { class_constructor : None , get_adjustment_brightness : 0 as * mut sys :: godot_method_bind , get_adjustment_color_correction : 0 as * mut sys :: godot_method_bind , get_adjustment_contrast : 0 as * mut sys :: godot_method_bind , get_adjustment_saturation : 0 as * mut sys :: godot_method_bind , get_ambient_light_color : 0 as * mut sys :: godot_method_bind , get_ambient_light_energy : 0 as * mut sys :: godot_method_bind , get_ambient_light_sky_contribution : 0 as * mut sys :: godot_method_bind , get_background : 0 as * mut sys :: godot_method_bind , get_bg_color : 0 as * mut sys :: godot_method_bind , get_bg_energy : 0 as * mut sys :: godot_method_bind , get_camera_feed_id : 0 as * mut sys :: godot_method_bind , get_canvas_max_layer : 0 as * mut sys :: godot_method_bind , get_dof_blur_far_amount : 0 as * mut sys :: godot_method_bind , get_dof_blur_far_distance : 0 as * mut sys :: godot_method_bind , get_dof_blur_far_quality : 0 as * mut sys :: godot_method_bind , get_dof_blur_far_transition : 0 as * mut sys :: godot_method_bind , get_dof_blur_near_amount : 0 as * mut sys :: godot_method_bind , get_dof_blur_near_distance : 0 as * mut sys :: godot_method_bind , get_dof_blur_near_quality : 0 as * mut sys :: godot_method_bind , get_dof_blur_near_transition : 0 as * mut sys :: godot_method_bind , get_fog_color : 0 as * mut sys :: godot_method_bind , get_fog_depth_begin : 0 as * mut sys :: godot_method_bind , get_fog_depth_curve : 0 as * mut sys :: godot_method_bind , get_fog_depth_end : 0 as * mut sys :: godot_method_bind , get_fog_height_curve : 0 as * mut sys :: godot_method_bind , get_fog_height_max : 0 as * mut sys :: godot_method_bind , get_fog_height_min : 0 as * mut sys :: godot_method_bind , get_fog_sun_amount : 0 as * mut sys :: godot_method_bind , get_fog_sun_color : 0 as * mut sys :: godot_method_bind , get_fog_transmit_curve : 0 as * mut sys :: godot_method_bind , get_glow_blend_mode : 0 as * mut sys :: godot_method_bind , get_glow_bloom : 0 as * mut sys :: godot_method_bind , get_glow_hdr_bleed_scale : 0 as * mut sys :: godot_method_bind , get_glow_hdr_bleed_threshold : 0 as * mut sys :: godot_method_bind , get_glow_hdr_luminance_cap : 0 as * mut sys :: godot_method_bind , get_glow_intensity : 0 as * mut sys :: godot_method_bind , get_glow_strength : 0 as * mut sys :: godot_method_bind , get_sky : 0 as * mut sys :: godot_method_bind , get_sky_custom_fov : 0 as * mut sys :: godot_method_bind , get_sky_orientation : 0 as * mut sys :: godot_method_bind , get_sky_rotation : 0 as * mut sys :: godot_method_bind , get_sky_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_ssao_ao_channel_affect : 0 as * mut sys :: godot_method_bind , get_ssao_bias : 0 as * mut sys :: godot_method_bind , get_ssao_blur : 0 as * mut sys :: godot_method_bind , get_ssao_color : 0 as * mut sys :: godot_method_bind , get_ssao_direct_light_affect : 0 as * mut sys :: godot_method_bind , get_ssao_edge_sharpness : 0 as * mut sys :: godot_method_bind , get_ssao_intensity : 0 as * mut sys :: godot_method_bind , get_ssao_intensity2 : 0 as * mut sys :: godot_method_bind , get_ssao_quality : 0 as * mut sys :: godot_method_bind , get_ssao_radius : 0 as * mut sys :: godot_method_bind , get_ssao_radius2 : 0 as * mut sys :: godot_method_bind , get_ssr_depth_tolerance : 0 as * mut sys :: godot_method_bind , get_ssr_fade_in : 0 as * mut sys :: godot_method_bind , get_ssr_fade_out : 0 as * mut sys :: godot_method_bind , get_ssr_max_steps : 0 as * mut sys :: godot_method_bind , get_tonemap_auto_exposure : 0 as * mut sys :: godot_method_bind , get_tonemap_auto_exposure_grey : 0 as * mut sys :: godot_method_bind , get_tonemap_auto_exposure_max : 0 as * mut sys :: godot_method_bind , get_tonemap_auto_exposure_min : 0 as * mut sys :: godot_method_bind , get_tonemap_auto_exposure_speed : 0 as * mut sys :: godot_method_bind , get_tonemap_exposure : 0 as * mut sys :: godot_method_bind , get_tonemap_white : 0 as * mut sys :: godot_method_bind , get_tonemapper : 0 as * mut sys :: godot_method_bind , is_adjustment_enabled : 0 as * mut sys :: godot_method_bind , is_dof_blur_far_enabled : 0 as * mut sys :: godot_method_bind , is_dof_blur_near_enabled : 0 as * mut sys :: godot_method_bind , is_fog_depth_enabled : 0 as * mut sys :: godot_method_bind , is_fog_enabled : 0 as * mut sys :: godot_method_bind , is_fog_height_enabled : 0 as * mut sys :: godot_method_bind , is_fog_transmit_enabled : 0 as * mut sys :: godot_method_bind , is_glow_bicubic_upscale_enabled : 0 as * mut sys :: godot_method_bind , is_glow_enabled : 0 as * mut sys :: godot_method_bind , is_glow_high_quality_enabled : 0 as * mut sys :: godot_method_bind , is_glow_level_enabled : 0 as * mut sys :: godot_method_bind , is_ssao_enabled : 0 as * mut sys :: godot_method_bind , is_ssr_enabled : 0 as * mut sys :: godot_method_bind , is_ssr_rough : 0 as * mut sys :: godot_method_bind , set_adjustment_brightness : 0 as * mut sys :: godot_method_bind , set_adjustment_color_correction : 0 as * mut sys :: godot_method_bind , set_adjustment_contrast : 0 as * mut sys :: godot_method_bind , set_adjustment_enable : 0 as * mut sys :: godot_method_bind , set_adjustment_saturation : 0 as * mut sys :: godot_method_bind , set_ambient_light_color : 0 as * mut sys :: godot_method_bind , set_ambient_light_energy : 0 as * mut sys :: godot_method_bind , set_ambient_light_sky_contribution : 0 as * mut sys :: godot_method_bind , set_background : 0 as * mut sys :: godot_method_bind , set_bg_color : 0 as * mut sys :: godot_method_bind , set_bg_energy : 0 as * mut sys :: godot_method_bind , set_camera_feed_id : 0 as * mut sys :: godot_method_bind , set_canvas_max_layer : 0 as * mut sys :: godot_method_bind , set_dof_blur_far_amount : 0 as * mut sys :: godot_method_bind , set_dof_blur_far_distance : 0 as * mut sys :: godot_method_bind , set_dof_blur_far_enabled : 0 as * mut sys :: godot_method_bind , set_dof_blur_far_quality : 0 as * mut sys :: godot_method_bind , set_dof_blur_far_transition : 0 as * mut sys :: godot_method_bind , set_dof_blur_near_amount : 0 as * mut sys :: godot_method_bind , set_dof_blur_near_distance : 0 as * mut sys :: godot_method_bind , set_dof_blur_near_enabled : 0 as * mut sys :: godot_method_bind , set_dof_blur_near_quality : 0 as * mut sys :: godot_method_bind , set_dof_blur_near_transition : 0 as * mut sys :: godot_method_bind , set_fog_color : 0 as * mut sys :: godot_method_bind , set_fog_depth_begin : 0 as * mut sys :: godot_method_bind , set_fog_depth_curve : 0 as * mut sys :: godot_method_bind , set_fog_depth_enabled : 0 as * mut sys :: godot_method_bind , set_fog_depth_end : 0 as * mut sys :: godot_method_bind , set_fog_enabled : 0 as * mut sys :: godot_method_bind , set_fog_height_curve : 0 as * mut sys :: godot_method_bind , set_fog_height_enabled : 0 as * mut sys :: godot_method_bind , set_fog_height_max : 0 as * mut sys :: godot_method_bind , set_fog_height_min : 0 as * mut sys :: godot_method_bind , set_fog_sun_amount : 0 as * mut sys :: godot_method_bind , set_fog_sun_color : 0 as * mut sys :: godot_method_bind , set_fog_transmit_curve : 0 as * mut sys :: godot_method_bind , set_fog_transmit_enabled : 0 as * mut sys :: godot_method_bind , set_glow_bicubic_upscale : 0 as * mut sys :: godot_method_bind , set_glow_blend_mode : 0 as * mut sys :: godot_method_bind , set_glow_bloom : 0 as * mut sys :: godot_method_bind , set_glow_enabled : 0 as * mut sys :: godot_method_bind , set_glow_hdr_bleed_scale : 0 as * mut sys :: godot_method_bind , set_glow_hdr_bleed_threshold : 0 as * mut sys :: godot_method_bind , set_glow_hdr_luminance_cap : 0 as * mut sys :: godot_method_bind , set_glow_high_quality : 0 as * mut sys :: godot_method_bind , set_glow_intensity : 0 as * mut sys :: godot_method_bind , set_glow_level : 0 as * mut sys :: godot_method_bind , set_glow_strength : 0 as * mut sys :: godot_method_bind , set_sky : 0 as * mut sys :: godot_method_bind , set_sky_custom_fov : 0 as * mut sys :: godot_method_bind , set_sky_orientation : 0 as * mut sys :: godot_method_bind , set_sky_rotation : 0 as * mut sys :: godot_method_bind , set_sky_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_ssao_ao_channel_affect : 0 as * mut sys :: godot_method_bind , set_ssao_bias : 0 as * mut sys :: godot_method_bind , set_ssao_blur : 0 as * mut sys :: godot_method_bind , set_ssao_color : 0 as * mut sys :: godot_method_bind , set_ssao_direct_light_affect : 0 as * mut sys :: godot_method_bind , set_ssao_edge_sharpness : 0 as * mut sys :: godot_method_bind , set_ssao_enabled : 0 as * mut sys :: godot_method_bind , set_ssao_intensity : 0 as * mut sys :: godot_method_bind , set_ssao_intensity2 : 0 as * mut sys :: godot_method_bind , set_ssao_quality : 0 as * mut sys :: godot_method_bind , set_ssao_radius : 0 as * mut sys :: godot_method_bind , set_ssao_radius2 : 0 as * mut sys :: godot_method_bind , set_ssr_depth_tolerance : 0 as * mut sys :: godot_method_bind , set_ssr_enabled : 0 as * mut sys :: godot_method_bind , set_ssr_fade_in : 0 as * mut sys :: godot_method_bind , set_ssr_fade_out : 0 as * mut sys :: godot_method_bind , set_ssr_max_steps : 0 as * mut sys :: godot_method_bind , set_ssr_rough : 0 as * mut sys :: godot_method_bind , set_tonemap_auto_exposure : 0 as * mut sys :: godot_method_bind , set_tonemap_auto_exposure_grey : 0 as * mut sys :: godot_method_bind , set_tonemap_auto_exposure_max : 0 as * mut sys :: godot_method_bind , set_tonemap_auto_exposure_min : 0 as * mut sys :: godot_method_bind , set_tonemap_auto_exposure_speed : 0 as * mut sys :: godot_method_bind , set_tonemap_exposure : 0 as * mut sys :: godot_method_bind , set_tonemap_white : 0 as * mut sys :: godot_method_bind , set_tonemapper : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EnvironmentMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Environment\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_adjustment_brightness = (gd_api . godot_method_bind_get_method) (class_name , "get_adjustment_brightness\0" . as_ptr () as * const c_char) ; table . get_adjustment_color_correction = (gd_api . godot_method_bind_get_method) (class_name , "get_adjustment_color_correction\0" . as_ptr () as * const c_char) ; table . get_adjustment_contrast = (gd_api . godot_method_bind_get_method) (class_name , "get_adjustment_contrast\0" . as_ptr () as * const c_char) ; table . get_adjustment_saturation = (gd_api . godot_method_bind_get_method) (class_name , "get_adjustment_saturation\0" . as_ptr () as * const c_char) ; table . get_ambient_light_color = (gd_api . godot_method_bind_get_method) (class_name , "get_ambient_light_color\0" . as_ptr () as * const c_char) ; table . get_ambient_light_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_ambient_light_energy\0" . as_ptr () as * const c_char) ; table . get_ambient_light_sky_contribution = (gd_api . godot_method_bind_get_method) (class_name , "get_ambient_light_sky_contribution\0" . as_ptr () as * const c_char) ; table . get_background = (gd_api . godot_method_bind_get_method) (class_name , "get_background\0" . as_ptr () as * const c_char) ; table . get_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "get_bg_color\0" . as_ptr () as * const c_char) ; table . get_bg_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_bg_energy\0" . as_ptr () as * const c_char) ; table . get_camera_feed_id = (gd_api . godot_method_bind_get_method) (class_name , "get_camera_feed_id\0" . as_ptr () as * const c_char) ; table . get_canvas_max_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_canvas_max_layer\0" . as_ptr () as * const c_char) ; table . get_dof_blur_far_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_far_amount\0" . as_ptr () as * const c_char) ; table . get_dof_blur_far_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_far_distance\0" . as_ptr () as * const c_char) ; table . get_dof_blur_far_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_far_quality\0" . as_ptr () as * const c_char) ; table . get_dof_blur_far_transition = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_far_transition\0" . as_ptr () as * const c_char) ; table . get_dof_blur_near_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_near_amount\0" . as_ptr () as * const c_char) ; table . get_dof_blur_near_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_near_distance\0" . as_ptr () as * const c_char) ; table . get_dof_blur_near_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_near_quality\0" . as_ptr () as * const c_char) ; table . get_dof_blur_near_transition = (gd_api . godot_method_bind_get_method) (class_name , "get_dof_blur_near_transition\0" . as_ptr () as * const c_char) ; table . get_fog_color = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_color\0" . as_ptr () as * const c_char) ; table . get_fog_depth_begin = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_depth_begin\0" . as_ptr () as * const c_char) ; table . get_fog_depth_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_depth_curve\0" . as_ptr () as * const c_char) ; table . get_fog_depth_end = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_depth_end\0" . as_ptr () as * const c_char) ; table . get_fog_height_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_height_curve\0" . as_ptr () as * const c_char) ; table . get_fog_height_max = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_height_max\0" . as_ptr () as * const c_char) ; table . get_fog_height_min = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_height_min\0" . as_ptr () as * const c_char) ; table . get_fog_sun_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_sun_amount\0" . as_ptr () as * const c_char) ; table . get_fog_sun_color = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_sun_color\0" . as_ptr () as * const c_char) ; table . get_fog_transmit_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_fog_transmit_curve\0" . as_ptr () as * const c_char) ; table . get_glow_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_blend_mode\0" . as_ptr () as * const c_char) ; table . get_glow_bloom = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_bloom\0" . as_ptr () as * const c_char) ; table . get_glow_hdr_bleed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_hdr_bleed_scale\0" . as_ptr () as * const c_char) ; table . get_glow_hdr_bleed_threshold = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_hdr_bleed_threshold\0" . as_ptr () as * const c_char) ; table . get_glow_hdr_luminance_cap = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_hdr_luminance_cap\0" . as_ptr () as * const c_char) ; table . get_glow_intensity = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_intensity\0" . as_ptr () as * const c_char) ; table . get_glow_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_glow_strength\0" . as_ptr () as * const c_char) ; table . get_sky = (gd_api . godot_method_bind_get_method) (class_name , "get_sky\0" . as_ptr () as * const c_char) ; table . get_sky_custom_fov = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_custom_fov\0" . as_ptr () as * const c_char) ; table . get_sky_orientation = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_orientation\0" . as_ptr () as * const c_char) ; table . get_sky_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_rotation\0" . as_ptr () as * const c_char) ; table . get_sky_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_ssao_ao_channel_affect = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_ao_channel_affect\0" . as_ptr () as * const c_char) ; table . get_ssao_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_bias\0" . as_ptr () as * const c_char) ; table . get_ssao_blur = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_blur\0" . as_ptr () as * const c_char) ; table . get_ssao_color = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_color\0" . as_ptr () as * const c_char) ; table . get_ssao_direct_light_affect = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_direct_light_affect\0" . as_ptr () as * const c_char) ; table . get_ssao_edge_sharpness = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_edge_sharpness\0" . as_ptr () as * const c_char) ; table . get_ssao_intensity = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_intensity\0" . as_ptr () as * const c_char) ; table . get_ssao_intensity2 = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_intensity2\0" . as_ptr () as * const c_char) ; table . get_ssao_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_quality\0" . as_ptr () as * const c_char) ; table . get_ssao_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_radius\0" . as_ptr () as * const c_char) ; table . get_ssao_radius2 = (gd_api . godot_method_bind_get_method) (class_name , "get_ssao_radius2\0" . as_ptr () as * const c_char) ; table . get_ssr_depth_tolerance = (gd_api . godot_method_bind_get_method) (class_name , "get_ssr_depth_tolerance\0" . as_ptr () as * const c_char) ; table . get_ssr_fade_in = (gd_api . godot_method_bind_get_method) (class_name , "get_ssr_fade_in\0" . as_ptr () as * const c_char) ; table . get_ssr_fade_out = (gd_api . godot_method_bind_get_method) (class_name , "get_ssr_fade_out\0" . as_ptr () as * const c_char) ; table . get_ssr_max_steps = (gd_api . godot_method_bind_get_method) (class_name , "get_ssr_max_steps\0" . as_ptr () as * const c_char) ; table . get_tonemap_auto_exposure = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_auto_exposure\0" . as_ptr () as * const c_char) ; table . get_tonemap_auto_exposure_grey = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_auto_exposure_grey\0" . as_ptr () as * const c_char) ; table . get_tonemap_auto_exposure_max = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_auto_exposure_max\0" . as_ptr () as * const c_char) ; table . get_tonemap_auto_exposure_min = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_auto_exposure_min\0" . as_ptr () as * const c_char) ; table . get_tonemap_auto_exposure_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_auto_exposure_speed\0" . as_ptr () as * const c_char) ; table . get_tonemap_exposure = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_exposure\0" . as_ptr () as * const c_char) ; table . get_tonemap_white = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemap_white\0" . as_ptr () as * const c_char) ; table . get_tonemapper = (gd_api . godot_method_bind_get_method) (class_name , "get_tonemapper\0" . as_ptr () as * const c_char) ; table . is_adjustment_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_adjustment_enabled\0" . as_ptr () as * const c_char) ; table . is_dof_blur_far_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_dof_blur_far_enabled\0" . as_ptr () as * const c_char) ; table . is_dof_blur_near_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_dof_blur_near_enabled\0" . as_ptr () as * const c_char) ; table . is_fog_depth_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_fog_depth_enabled\0" . as_ptr () as * const c_char) ; table . is_fog_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_fog_enabled\0" . as_ptr () as * const c_char) ; table . is_fog_height_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_fog_height_enabled\0" . as_ptr () as * const c_char) ; table . is_fog_transmit_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_fog_transmit_enabled\0" . as_ptr () as * const c_char) ; table . is_glow_bicubic_upscale_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_glow_bicubic_upscale_enabled\0" . as_ptr () as * const c_char) ; table . is_glow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_glow_enabled\0" . as_ptr () as * const c_char) ; table . is_glow_high_quality_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_glow_high_quality_enabled\0" . as_ptr () as * const c_char) ; table . is_glow_level_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_glow_level_enabled\0" . as_ptr () as * const c_char) ; table . is_ssao_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_ssao_enabled\0" . as_ptr () as * const c_char) ; table . is_ssr_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_ssr_enabled\0" . as_ptr () as * const c_char) ; table . is_ssr_rough = (gd_api . godot_method_bind_get_method) (class_name , "is_ssr_rough\0" . as_ptr () as * const c_char) ; table . set_adjustment_brightness = (gd_api . godot_method_bind_get_method) (class_name , "set_adjustment_brightness\0" . as_ptr () as * const c_char) ; table . set_adjustment_color_correction = (gd_api . godot_method_bind_get_method) (class_name , "set_adjustment_color_correction\0" . as_ptr () as * const c_char) ; table . set_adjustment_contrast = (gd_api . godot_method_bind_get_method) (class_name , "set_adjustment_contrast\0" . as_ptr () as * const c_char) ; table . set_adjustment_enable = (gd_api . godot_method_bind_get_method) (class_name , "set_adjustment_enable\0" . as_ptr () as * const c_char) ; table . set_adjustment_saturation = (gd_api . godot_method_bind_get_method) (class_name , "set_adjustment_saturation\0" . as_ptr () as * const c_char) ; table . set_ambient_light_color = (gd_api . godot_method_bind_get_method) (class_name , "set_ambient_light_color\0" . as_ptr () as * const c_char) ; table . set_ambient_light_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_ambient_light_energy\0" . as_ptr () as * const c_char) ; table . set_ambient_light_sky_contribution = (gd_api . godot_method_bind_get_method) (class_name , "set_ambient_light_sky_contribution\0" . as_ptr () as * const c_char) ; table . set_background = (gd_api . godot_method_bind_get_method) (class_name , "set_background\0" . as_ptr () as * const c_char) ; table . set_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "set_bg_color\0" . as_ptr () as * const c_char) ; table . set_bg_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_bg_energy\0" . as_ptr () as * const c_char) ; table . set_camera_feed_id = (gd_api . godot_method_bind_get_method) (class_name , "set_camera_feed_id\0" . as_ptr () as * const c_char) ; table . set_canvas_max_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_canvas_max_layer\0" . as_ptr () as * const c_char) ; table . set_dof_blur_far_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_far_amount\0" . as_ptr () as * const c_char) ; table . set_dof_blur_far_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_far_distance\0" . as_ptr () as * const c_char) ; table . set_dof_blur_far_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_far_enabled\0" . as_ptr () as * const c_char) ; table . set_dof_blur_far_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_far_quality\0" . as_ptr () as * const c_char) ; table . set_dof_blur_far_transition = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_far_transition\0" . as_ptr () as * const c_char) ; table . set_dof_blur_near_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_near_amount\0" . as_ptr () as * const c_char) ; table . set_dof_blur_near_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_near_distance\0" . as_ptr () as * const c_char) ; table . set_dof_blur_near_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_near_enabled\0" . as_ptr () as * const c_char) ; table . set_dof_blur_near_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_near_quality\0" . as_ptr () as * const c_char) ; table . set_dof_blur_near_transition = (gd_api . godot_method_bind_get_method) (class_name , "set_dof_blur_near_transition\0" . as_ptr () as * const c_char) ; table . set_fog_color = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_color\0" . as_ptr () as * const c_char) ; table . set_fog_depth_begin = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_depth_begin\0" . as_ptr () as * const c_char) ; table . set_fog_depth_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_depth_curve\0" . as_ptr () as * const c_char) ; table . set_fog_depth_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_depth_enabled\0" . as_ptr () as * const c_char) ; table . set_fog_depth_end = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_depth_end\0" . as_ptr () as * const c_char) ; table . set_fog_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_enabled\0" . as_ptr () as * const c_char) ; table . set_fog_height_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_height_curve\0" . as_ptr () as * const c_char) ; table . set_fog_height_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_height_enabled\0" . as_ptr () as * const c_char) ; table . set_fog_height_max = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_height_max\0" . as_ptr () as * const c_char) ; table . set_fog_height_min = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_height_min\0" . as_ptr () as * const c_char) ; table . set_fog_sun_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_sun_amount\0" . as_ptr () as * const c_char) ; table . set_fog_sun_color = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_sun_color\0" . as_ptr () as * const c_char) ; table . set_fog_transmit_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_transmit_curve\0" . as_ptr () as * const c_char) ; table . set_fog_transmit_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_fog_transmit_enabled\0" . as_ptr () as * const c_char) ; table . set_glow_bicubic_upscale = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_bicubic_upscale\0" . as_ptr () as * const c_char) ; table . set_glow_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_blend_mode\0" . as_ptr () as * const c_char) ; table . set_glow_bloom = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_bloom\0" . as_ptr () as * const c_char) ; table . set_glow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_enabled\0" . as_ptr () as * const c_char) ; table . set_glow_hdr_bleed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_hdr_bleed_scale\0" . as_ptr () as * const c_char) ; table . set_glow_hdr_bleed_threshold = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_hdr_bleed_threshold\0" . as_ptr () as * const c_char) ; table . set_glow_hdr_luminance_cap = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_hdr_luminance_cap\0" . as_ptr () as * const c_char) ; table . set_glow_high_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_high_quality\0" . as_ptr () as * const c_char) ; table . set_glow_intensity = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_intensity\0" . as_ptr () as * const c_char) ; table . set_glow_level = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_level\0" . as_ptr () as * const c_char) ; table . set_glow_strength = (gd_api . godot_method_bind_get_method) (class_name , "set_glow_strength\0" . as_ptr () as * const c_char) ; table . set_sky = (gd_api . godot_method_bind_get_method) (class_name , "set_sky\0" . as_ptr () as * const c_char) ; table . set_sky_custom_fov = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_custom_fov\0" . as_ptr () as * const c_char) ; table . set_sky_orientation = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_orientation\0" . as_ptr () as * const c_char) ; table . set_sky_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_rotation\0" . as_ptr () as * const c_char) ; table . set_sky_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_ssao_ao_channel_affect = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_ao_channel_affect\0" . as_ptr () as * const c_char) ; table . set_ssao_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_bias\0" . as_ptr () as * const c_char) ; table . set_ssao_blur = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_blur\0" . as_ptr () as * const c_char) ; table . set_ssao_color = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_color\0" . as_ptr () as * const c_char) ; table . set_ssao_direct_light_affect = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_direct_light_affect\0" . as_ptr () as * const c_char) ; table . set_ssao_edge_sharpness = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_edge_sharpness\0" . as_ptr () as * const c_char) ; table . set_ssao_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_enabled\0" . as_ptr () as * const c_char) ; table . set_ssao_intensity = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_intensity\0" . as_ptr () as * const c_char) ; table . set_ssao_intensity2 = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_intensity2\0" . as_ptr () as * const c_char) ; table . set_ssao_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_quality\0" . as_ptr () as * const c_char) ; table . set_ssao_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_radius\0" . as_ptr () as * const c_char) ; table . set_ssao_radius2 = (gd_api . godot_method_bind_get_method) (class_name , "set_ssao_radius2\0" . as_ptr () as * const c_char) ; table . set_ssr_depth_tolerance = (gd_api . godot_method_bind_get_method) (class_name , "set_ssr_depth_tolerance\0" . as_ptr () as * const c_char) ; table . set_ssr_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_ssr_enabled\0" . as_ptr () as * const c_char) ; table . set_ssr_fade_in = (gd_api . godot_method_bind_get_method) (class_name , "set_ssr_fade_in\0" . as_ptr () as * const c_char) ; table . set_ssr_fade_out = (gd_api . godot_method_bind_get_method) (class_name , "set_ssr_fade_out\0" . as_ptr () as * const c_char) ; table . set_ssr_max_steps = (gd_api . godot_method_bind_get_method) (class_name , "set_ssr_max_steps\0" . as_ptr () as * const c_char) ; table . set_ssr_rough = (gd_api . godot_method_bind_get_method) (class_name , "set_ssr_rough\0" . as_ptr () as * const c_char) ; table . set_tonemap_auto_exposure = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_auto_exposure\0" . as_ptr () as * const c_char) ; table . set_tonemap_auto_exposure_grey = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_auto_exposure_grey\0" . as_ptr () as * const c_char) ; table . set_tonemap_auto_exposure_max = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_auto_exposure_max\0" . as_ptr () as * const c_char) ; table . set_tonemap_auto_exposure_min = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_auto_exposure_min\0" . as_ptr () as * const c_char) ; table . set_tonemap_auto_exposure_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_auto_exposure_speed\0" . as_ptr () as * const c_char) ; table . set_tonemap_exposure = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_exposure\0" . as_ptr () as * const c_char) ; table . set_tonemap_white = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemap_white\0" . as_ptr () as * const c_char) ; table . set_tonemapper = (gd_api . godot_method_bind_get_method) (class_name , "set_tonemapper\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::environment::private::Environment;
            
            pub(crate) mod expression {
                # ! [doc = "This module contains types related to the API class [`Expression`][super::Expression]."] pub (crate) mod private { # [doc = "`core class Expression` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_expression.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nExpression inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Expression { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Expression ; impl Expression { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ExpressionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Executes the expression that was previously parsed by [`parse`][Self::parse] and returns the result. Before you use the returned object, you should check if the method failed by calling [`has_execute_failed`][Self::has_execute_failed].\nIf you defined input variables in [`parse`][Self::parse], you can specify their values in the inputs array, in the same order.\n# Default Arguments\n* `inputs` - `[  ]`\n* `base_instance` - `null`\n* `show_error` - `true`"] # [doc = ""] # [inline] pub fn execute (& self , inputs : VariantArray , base_instance : impl AsArg < crate :: generated :: Object > , show_error : bool) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ExpressionMethodTable :: get (get_api ()) . execute ; let ret = crate :: icalls :: icallvar__arr_obj_bool (method_bind , self . this . sys () . as_ptr () , inputs , base_instance . as_arg_ptr () , show_error as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the error text if [`parse`][Self::parse] has failed."] # [doc = ""] # [inline] pub fn get_error_text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ExpressionMethodTable :: get (get_api ()) . get_error_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if [`execute`][Self::execute] has failed."] # [doc = ""] # [inline] pub fn has_execute_failed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ExpressionMethodTable :: get (get_api ()) . has_execute_failed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Parses the expression and returns an [`Error`][GodotError] code.\nYou can optionally specify names of variables that may appear in the expression with `input_names`, so that you can bind them when it gets executed.\n# Default Arguments\n* `input_names` - `PoolStringArray(  )`"] # [doc = ""] # [inline] pub fn parse (& self , expression : impl Into < GodotString > , input_names : PoolArray < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ExpressionMethodTable :: get (get_api ()) . parse ; let ret = crate :: icalls :: icallvar__str_strarr (method_bind , self . this . sys () . as_ptr () , expression . into () , input_names) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } } impl gdnative_core :: private :: godot_object :: Sealed for Expression { } unsafe impl GodotObject for Expression { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Expression" } } impl std :: ops :: Deref for Expression { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Expression { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for Expression { } unsafe impl SubClass < crate :: generated :: Object > for Expression { } impl Instanciable for Expression { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Expression :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ExpressionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub execute : * mut sys :: godot_method_bind , pub get_error_text : * mut sys :: godot_method_bind , pub has_execute_failed : * mut sys :: godot_method_bind , pub parse : * mut sys :: godot_method_bind } impl ExpressionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ExpressionMethodTable = ExpressionMethodTable { class_constructor : None , execute : 0 as * mut sys :: godot_method_bind , get_error_text : 0 as * mut sys :: godot_method_bind , has_execute_failed : 0 as * mut sys :: godot_method_bind , parse : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ExpressionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Expression\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . execute = (gd_api . godot_method_bind_get_method) (class_name , "execute\0" . as_ptr () as * const c_char) ; table . get_error_text = (gd_api . godot_method_bind_get_method) (class_name , "get_error_text\0" . as_ptr () as * const c_char) ; table . has_execute_failed = (gd_api . godot_method_bind_get_method) (class_name , "has_execute_failed\0" . as_ptr () as * const c_char) ; table . parse = (gd_api . godot_method_bind_get_method) (class_name , "parse\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::expression::private::Expression;
            
            pub(crate) mod external_texture {
                # ! [doc = "This module contains types related to the API class [`ExternalTexture`][super::ExternalTexture]."] pub (crate) mod private { # [doc = "`core class ExternalTexture` inherits `Texture` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_externaltexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nExternalTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ExternalTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ExternalTexture ; impl ExternalTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ExternalTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the external texture name."] # [doc = ""] # [inline] pub fn get_external_texture_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ExternalTextureMethodTable :: get (get_api ()) . get_external_texture_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "External texture size."] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ExternalTextureMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ExternalTexture { } unsafe impl GodotObject for ExternalTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ExternalTexture" } } impl std :: ops :: Deref for ExternalTexture { type Target = crate :: generated :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ExternalTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Texture > for ExternalTexture { } unsafe impl SubClass < crate :: generated :: Resource > for ExternalTexture { } unsafe impl SubClass < crate :: generated :: Reference > for ExternalTexture { } unsafe impl SubClass < crate :: generated :: Object > for ExternalTexture { } impl Instanciable for ExternalTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ExternalTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ExternalTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_external_texture_id : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind } impl ExternalTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ExternalTextureMethodTable = ExternalTextureMethodTable { class_constructor : None , get_external_texture_id : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ExternalTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ExternalTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_external_texture_id = (gd_api . godot_method_bind_get_method) (class_name , "get_external_texture_id\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::external_texture::private::ExternalTexture;
            
            pub mod file_dialog {
                # ! [doc = "This module contains types related to the API class [`FileDialog`][super::FileDialog]."] pub (crate) mod private { # [doc = "`core class FileDialog` inherits `ConfirmationDialog` (manually managed).\n\nThis class has related types in the [`file_dialog`][super::file_dialog] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_filedialog.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`FileDialog` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<FileDialog>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nFileDialog inherits methods from:\n - [ConfirmationDialog](struct.ConfirmationDialog.html)\n - [AcceptDialog](struct.AcceptDialog.html)\n - [WindowDialog](struct.WindowDialog.html)\n - [Popup](struct.Popup.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct FileDialog { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: FileDialog ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Access (pub i64) ; impl Access { pub const RESOURCES : Access = Access (0i64) ; pub const USERDATA : Access = Access (1i64) ; pub const FILESYSTEM : Access = Access (2i64) ; } impl From < i64 > for Access { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Access > for i64 { # [inline] fn from (v : Access) -> Self { v . 0 } } impl FromVariant for Access { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const OPEN_FILE : Mode = Mode (0i64) ; pub const OPEN_FILES : Mode = Mode (1i64) ; pub const OPEN_DIR : Mode = Mode (2i64) ; pub const OPEN_ANY : Mode = Mode (3i64) ; pub const SAVE_FILE : Mode = Mode (4i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } impl FromVariant for Mode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl FileDialog { pub const ACCESS_RESOURCES : i64 = 0i64 ; pub const MODE_OPEN_FILE : i64 = 0i64 ; pub const ACCESS_USERDATA : i64 = 1i64 ; pub const MODE_OPEN_FILES : i64 = 1i64 ; pub const ACCESS_FILESYSTEM : i64 = 2i64 ; pub const MODE_OPEN_DIR : i64 = 2i64 ; pub const MODE_OPEN_ANY : i64 = 3i64 ; pub const MODE_SAVE_FILE : i64 = 4i64 ; } impl FileDialog { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = FileDialogMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds `filter` to the list of filters, which restricts what files can be picked.\nA `filter` should be of the form `\"filename.extension ; Description\"`, where filename and extension can be `*` to match any string. Filters starting with `.` (i.e. empty filenames) are not allowed.\nExample filters: `\"*.png ; PNG Images\"`, `\"project.godot ; Godot Project\"`."] # [doc = ""] # [inline] pub fn add_filter (& self , filter : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . add_filter ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , filter . into ()) ; } } # [doc = "Clear all the added filters in the dialog."] # [doc = ""] # [inline] pub fn clear_filters (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . clear_filters ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Clear currently selected items in the dialog."] # [doc = ""] # [inline] pub fn deselect_items (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . deselect_items ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The file system access scope. See enum `Access` constants.\n**Warning:** Currently, in sandboxed environments such as HTML5 builds or sandboxed macOS apps, FileDialog cannot access the host file system. See [godot-proposals#1123](https://github.com/godotengine/godot-proposals/issues/1123)."] # [doc = ""] # [inline] pub fn access (& self) -> crate :: generated :: file_dialog :: Access { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_access ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: file_dialog :: Access > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The current working directory of the file dialog."] # [doc = ""] # [inline] pub fn current_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_current_dir ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The currently selected file of the file dialog."] # [doc = ""] # [inline] pub fn current_file (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_current_file ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The currently selected file path of the file dialog."] # [doc = ""] # [inline] pub fn current_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_current_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The available file type filters. For example, this shows only `.png` and `.gd` files: `set_filters(PoolStringArray([\"*.png ; PNG Images\",\"*.gd ; GDScript Files\"]))`. Multiple file types can also be specified in a single filter. `\"*.png, *.jpg, *.jpeg ; Supported Images\"` will show both PNG and JPEG files when selected."] # [doc = ""] # [inline] pub fn filters (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_filters ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the LineEdit for the selected file.\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_line_edit (& self) -> Option < Ref < crate :: generated :: LineEdit , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_line_edit ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: LineEdit , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The dialog's open or save mode, which affects the selection behavior. See enum `Mode` constants."] # [doc = ""] # [inline] pub fn mode (& self) -> crate :: generated :: file_dialog :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: file_dialog :: Mode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the vertical box container of the dialog, custom controls can be added to it.\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_vbox (& self) -> Option < Ref < crate :: generated :: VBoxContainer , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . get_vbox ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: VBoxContainer , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Invalidate and update the current dialog content list."] # [doc = ""] # [inline] pub fn invalidate (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . invalidate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, changing the `Mode` property will set the window title accordingly (e.g. setting mode to [`MODE_OPEN_FILE`][Self::MODE_OPEN_FILE] will change the window title to \"Open a File\")."] # [doc = ""] # [inline] pub fn is_mode_overriding_title (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . is_mode_overriding_title ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the dialog will show hidden files."] # [doc = ""] # [inline] pub fn is_showing_hidden_files (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . is_showing_hidden_files ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The file system access scope. See enum `Access` constants.\n**Warning:** Currently, in sandboxed environments such as HTML5 builds or sandboxed macOS apps, FileDialog cannot access the host file system. See [godot-proposals#1123](https://github.com/godotengine/godot-proposals/issues/1123)."] # [doc = ""] # [inline] pub fn set_access (& self , access : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_access ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , access as _) ; } } # [doc = "The current working directory of the file dialog."] # [doc = ""] # [inline] pub fn set_current_dir (& self , dir : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_current_dir ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , dir . into ()) ; } } # [doc = "The currently selected file of the file dialog."] # [doc = ""] # [inline] pub fn set_current_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_current_file ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } # [doc = "The currently selected file path of the file dialog."] # [doc = ""] # [inline] pub fn set_current_path (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_current_path ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "The available file type filters. For example, this shows only `.png` and `.gd` files: `set_filters(PoolStringArray([\"*.png ; PNG Images\",\"*.gd ; GDScript Files\"]))`. Multiple file types can also be specified in a single filter. `\"*.png, *.jpg, *.jpeg ; Supported Images\"` will show both PNG and JPEG files when selected."] # [doc = ""] # [inline] pub fn set_filters (& self , filters : PoolArray < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_filters ; let ret = crate :: icalls :: icallvar__strarr (method_bind , self . this . sys () . as_ptr () , filters) ; } } # [doc = "The dialog's open or save mode, which affects the selection behavior. See enum `Mode` constants."] # [doc = ""] # [inline] pub fn set_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "If `true`, changing the `Mode` property will set the window title accordingly (e.g. setting mode to [`MODE_OPEN_FILE`][Self::MODE_OPEN_FILE] will change the window title to \"Open a File\")."] # [doc = ""] # [inline] pub fn set_mode_overrides_title (& self , override_ : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_mode_overrides_title ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , override_ as _) ; } } # [doc = "If `true`, the dialog will show hidden files."] # [doc = ""] # [inline] pub fn set_show_hidden_files (& self , show : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileDialogMethodTable :: get (get_api ()) . set_show_hidden_files ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , show as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for FileDialog { } unsafe impl GodotObject for FileDialog { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "FileDialog" } } impl QueueFree for FileDialog { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for FileDialog { type Target = crate :: generated :: ConfirmationDialog ; # [inline] fn deref (& self) -> & crate :: generated :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for FileDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: ConfirmationDialog > for FileDialog { } unsafe impl SubClass < crate :: generated :: AcceptDialog > for FileDialog { } unsafe impl SubClass < crate :: generated :: WindowDialog > for FileDialog { } unsafe impl SubClass < crate :: generated :: Popup > for FileDialog { } unsafe impl SubClass < crate :: generated :: Control > for FileDialog { } unsafe impl SubClass < crate :: generated :: CanvasItem > for FileDialog { } unsafe impl SubClass < crate :: generated :: Node > for FileDialog { } unsafe impl SubClass < crate :: generated :: Object > for FileDialog { } impl Instanciable for FileDialog { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { FileDialog :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct FileDialogMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_filter : * mut sys :: godot_method_bind , pub clear_filters : * mut sys :: godot_method_bind , pub deselect_items : * mut sys :: godot_method_bind , pub get_access : * mut sys :: godot_method_bind , pub get_current_dir : * mut sys :: godot_method_bind , pub get_current_file : * mut sys :: godot_method_bind , pub get_current_path : * mut sys :: godot_method_bind , pub get_filters : * mut sys :: godot_method_bind , pub get_line_edit : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub get_vbox : * mut sys :: godot_method_bind , pub invalidate : * mut sys :: godot_method_bind , pub is_mode_overriding_title : * mut sys :: godot_method_bind , pub is_showing_hidden_files : * mut sys :: godot_method_bind , pub set_access : * mut sys :: godot_method_bind , pub set_current_dir : * mut sys :: godot_method_bind , pub set_current_file : * mut sys :: godot_method_bind , pub set_current_path : * mut sys :: godot_method_bind , pub set_filters : * mut sys :: godot_method_bind , pub set_mode : * mut sys :: godot_method_bind , pub set_mode_overrides_title : * mut sys :: godot_method_bind , pub set_show_hidden_files : * mut sys :: godot_method_bind } impl FileDialogMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : FileDialogMethodTable = FileDialogMethodTable { class_constructor : None , add_filter : 0 as * mut sys :: godot_method_bind , clear_filters : 0 as * mut sys :: godot_method_bind , deselect_items : 0 as * mut sys :: godot_method_bind , get_access : 0 as * mut sys :: godot_method_bind , get_current_dir : 0 as * mut sys :: godot_method_bind , get_current_file : 0 as * mut sys :: godot_method_bind , get_current_path : 0 as * mut sys :: godot_method_bind , get_filters : 0 as * mut sys :: godot_method_bind , get_line_edit : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , get_vbox : 0 as * mut sys :: godot_method_bind , invalidate : 0 as * mut sys :: godot_method_bind , is_mode_overriding_title : 0 as * mut sys :: godot_method_bind , is_showing_hidden_files : 0 as * mut sys :: godot_method_bind , set_access : 0 as * mut sys :: godot_method_bind , set_current_dir : 0 as * mut sys :: godot_method_bind , set_current_file : 0 as * mut sys :: godot_method_bind , set_current_path : 0 as * mut sys :: godot_method_bind , set_filters : 0 as * mut sys :: godot_method_bind , set_mode : 0 as * mut sys :: godot_method_bind , set_mode_overrides_title : 0 as * mut sys :: godot_method_bind , set_show_hidden_files : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { FileDialogMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "FileDialog\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_filter = (gd_api . godot_method_bind_get_method) (class_name , "add_filter\0" . as_ptr () as * const c_char) ; table . clear_filters = (gd_api . godot_method_bind_get_method) (class_name , "clear_filters\0" . as_ptr () as * const c_char) ; table . deselect_items = (gd_api . godot_method_bind_get_method) (class_name , "deselect_items\0" . as_ptr () as * const c_char) ; table . get_access = (gd_api . godot_method_bind_get_method) (class_name , "get_access\0" . as_ptr () as * const c_char) ; table . get_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_current_dir\0" . as_ptr () as * const c_char) ; table . get_current_file = (gd_api . godot_method_bind_get_method) (class_name , "get_current_file\0" . as_ptr () as * const c_char) ; table . get_current_path = (gd_api . godot_method_bind_get_method) (class_name , "get_current_path\0" . as_ptr () as * const c_char) ; table . get_filters = (gd_api . godot_method_bind_get_method) (class_name , "get_filters\0" . as_ptr () as * const c_char) ; table . get_line_edit = (gd_api . godot_method_bind_get_method) (class_name , "get_line_edit\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_vbox = (gd_api . godot_method_bind_get_method) (class_name , "get_vbox\0" . as_ptr () as * const c_char) ; table . invalidate = (gd_api . godot_method_bind_get_method) (class_name , "invalidate\0" . as_ptr () as * const c_char) ; table . is_mode_overriding_title = (gd_api . godot_method_bind_get_method) (class_name , "is_mode_overriding_title\0" . as_ptr () as * const c_char) ; table . is_showing_hidden_files = (gd_api . godot_method_bind_get_method) (class_name , "is_showing_hidden_files\0" . as_ptr () as * const c_char) ; table . set_access = (gd_api . godot_method_bind_get_method) (class_name , "set_access\0" . as_ptr () as * const c_char) ; table . set_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "set_current_dir\0" . as_ptr () as * const c_char) ; table . set_current_file = (gd_api . godot_method_bind_get_method) (class_name , "set_current_file\0" . as_ptr () as * const c_char) ; table . set_current_path = (gd_api . godot_method_bind_get_method) (class_name , "set_current_path\0" . as_ptr () as * const c_char) ; table . set_filters = (gd_api . godot_method_bind_get_method) (class_name , "set_filters\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_mode_overrides_title = (gd_api . godot_method_bind_get_method) (class_name , "set_mode_overrides_title\0" . as_ptr () as * const c_char) ; table . set_show_hidden_files = (gd_api . godot_method_bind_get_method) (class_name , "set_show_hidden_files\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::file_dialog::private::FileDialog;
            
            pub(crate) mod file_system_dock {
                # ! [doc = "This module contains types related to the API class [`FileSystemDock`][super::FileSystemDock]."] pub (crate) mod private { # [doc = "`tools class FileSystemDock` inherits `VBoxContainer` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_filesystemdock.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nFileSystemDock inherits methods from:\n - [VBoxContainer](struct.VBoxContainer.html)\n - [BoxContainer](struct.BoxContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct FileSystemDock { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: FileSystemDock ; impl FileSystemDock { # [doc = ""] # [doc = ""] # [inline] pub fn can_drop_data_fw (& self , point : Vector2 , data : impl OwnedToVariant , from : impl AsArg < crate :: generated :: Control >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FileSystemDockMethodTable :: get (get_api ()) . can_drop_data_fw ; let ret = crate :: icalls :: icallvar__vec2_var_obj (method_bind , self . this . sys () . as_ptr () , point , data . owned_to_variant () , from . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn drop_data_fw (& self , point : Vector2 , data : impl OwnedToVariant , from : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileSystemDockMethodTable :: get (get_api ()) . drop_data_fw ; let ret = crate :: icalls :: icallvar__vec2_var_obj (method_bind , self . this . sys () . as_ptr () , point , data . owned_to_variant () , from . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_drag_data_fw (& self , point : Vector2 , from : impl AsArg < crate :: generated :: Control >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = FileSystemDockMethodTable :: get (get_api ()) . get_drag_data_fw ; let ret = crate :: icalls :: icallvar__vec2_obj (method_bind , self . this . sys () . as_ptr () , point , from . as_arg_ptr ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn navigate_to_path (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileSystemDockMethodTable :: get (get_api ()) . navigate_to_path ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for FileSystemDock { } unsafe impl GodotObject for FileSystemDock { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "FileSystemDock" } } impl QueueFree for FileSystemDock { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for FileSystemDock { type Target = crate :: generated :: VBoxContainer ; # [inline] fn deref (& self) -> & crate :: generated :: VBoxContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for FileSystemDock { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VBoxContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VBoxContainer > for FileSystemDock { } unsafe impl SubClass < crate :: generated :: BoxContainer > for FileSystemDock { } unsafe impl SubClass < crate :: generated :: Container > for FileSystemDock { } unsafe impl SubClass < crate :: generated :: Control > for FileSystemDock { } unsafe impl SubClass < crate :: generated :: CanvasItem > for FileSystemDock { } unsafe impl SubClass < crate :: generated :: Node > for FileSystemDock { } unsafe impl SubClass < crate :: generated :: Object > for FileSystemDock { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct FileSystemDockMethodTable { pub class_constructor : sys :: godot_class_constructor , pub can_drop_data_fw : * mut sys :: godot_method_bind , pub drop_data_fw : * mut sys :: godot_method_bind , pub get_drag_data_fw : * mut sys :: godot_method_bind , pub navigate_to_path : * mut sys :: godot_method_bind } impl FileSystemDockMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : FileSystemDockMethodTable = FileSystemDockMethodTable { class_constructor : None , can_drop_data_fw : 0 as * mut sys :: godot_method_bind , drop_data_fw : 0 as * mut sys :: godot_method_bind , get_drag_data_fw : 0 as * mut sys :: godot_method_bind , navigate_to_path : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { FileSystemDockMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "FileSystemDock\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . can_drop_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "can_drop_data_fw\0" . as_ptr () as * const c_char) ; table . drop_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "drop_data_fw\0" . as_ptr () as * const c_char) ; table . get_drag_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "get_drag_data_fw\0" . as_ptr () as * const c_char) ; table . navigate_to_path = (gd_api . godot_method_bind_get_method) (class_name , "navigate_to_path\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::file_system_dock::private::FileSystemDock;
            
            pub(crate) mod flow_container {
                # ! [doc = "This module contains types related to the API class [`FlowContainer`][super::FlowContainer]."] pub (crate) mod private { # [doc = "`core class FlowContainer` inherits `Container` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_flowcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nFlowContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct FlowContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: FlowContainer ; impl FlowContainer { # [doc = "Returns the current line count."] # [doc = ""] # [inline] pub fn get_line_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FlowContainerMethodTable :: get (get_api ()) . get_line_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for FlowContainer { } unsafe impl GodotObject for FlowContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "FlowContainer" } } impl QueueFree for FlowContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for FlowContainer { type Target = crate :: generated :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for FlowContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Container > for FlowContainer { } unsafe impl SubClass < crate :: generated :: Control > for FlowContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for FlowContainer { } unsafe impl SubClass < crate :: generated :: Node > for FlowContainer { } unsafe impl SubClass < crate :: generated :: Object > for FlowContainer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct FlowContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_line_count : * mut sys :: godot_method_bind } impl FlowContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : FlowContainerMethodTable = FlowContainerMethodTable { class_constructor : None , get_line_count : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { FlowContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "FlowContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_line_count = (gd_api . godot_method_bind_get_method) (class_name , "get_line_count\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::flow_container::private::FlowContainer;
            
            pub mod font {
                # ! [doc = "This module contains types related to the API class [`Font`][super::Font]."] pub (crate) mod private { # [doc = "`core class Font` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`font`][super::font] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_font.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nFont inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Font { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Font ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ContourPointTag (pub i64) ; impl ContourPointTag { pub const OFF_CONIC : ContourPointTag = ContourPointTag (0i64) ; pub const ON : ContourPointTag = ContourPointTag (1i64) ; pub const OFF_CUBIC : ContourPointTag = ContourPointTag (2i64) ; } impl From < i64 > for ContourPointTag { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ContourPointTag > for i64 { # [inline] fn from (v : ContourPointTag) -> Self { v . 0 } } impl FromVariant for ContourPointTag { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Font { pub const CONTOUR_CURVE_TAG_OFF_CONIC : i64 = 0i64 ; pub const CONTOUR_CURVE_TAG_ON : i64 = 1i64 ; pub const CONTOUR_CURVE_TAG_OFF_CUBIC : i64 = 2i64 ; } impl Font { # [doc = "Draw `string` into a canvas item using the font at a given position, with `modulate` color, and optionally clipping the width. `position` specifies the baseline, not the top. To draw from the top, _ascent_ must be added to the Y axis.\nSee also [`CanvasItem.draw_string`][CanvasItem::draw_string].\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `clip_w` - `-1`\n* `outline_modulate` - `Color( 1, 1, 1, 1 )`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn draw (& self , canvas_item : Rid , position : Vector2 , string : impl Into < GodotString > , modulate : Color , clip_w : i64 , outline_modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . draw ; let ret = crate :: icalls :: icallvar__rid_vec2_str_color_i64_color (method_bind , self . this . sys () . as_ptr () , canvas_item , position , string . into () , modulate , clip_w as _ , outline_modulate) ; } } # [doc = "Draw character `char` into a canvas item using the font at a given position, with `modulate` color, and optionally kerning if `next` is passed. clipping the width. `position` specifies the baseline, not the top. To draw from the top, _ascent_ must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character.\nIf `outline` is `true`, the outline of the character is drawn instead of the character itself.\n# Default Arguments\n* `next` - `-1`\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `outline` - `false`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn draw_char (& self , canvas_item : Rid , position : Vector2 , char : i64 , next : i64 , modulate : Color , outline : bool) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . draw_char ; let ret = crate :: icalls :: icallvar__rid_vec2_i64_i64_color_bool (method_bind , self . this . sys () . as_ptr () , canvas_item , position , char as _ , next as _ , modulate , outline as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the font ascent (number of pixels above the baseline)."] # [doc = ""] # [inline] pub fn get_ascent (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_ascent ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns outline contours of the glyph as a `Dictionary` with the following contents:\n`points`         - [`PoolVector3Array`][PoolArray<Vector3>], containing outline points. `x` and `y` are point coordinates. `z` is the type of the point, using the [`ContourPointTag`][ContourPointTag] values.\n`contours`       - [`PoolIntArray`][PoolArray<i32>], containing indices the end points of each contour.\n`orientation`    - [`bool`][bool], contour orientation. If `true`, clockwise contours must be filled.\n# Default Arguments\n* `next` - `0`"] # [doc = ""] # [inline] pub fn get_char_contours (& self , char : i64 , next : i64) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_char_contours ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , char as _ , next as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the size of a character, optionally taking kerning into account if the next character is provided. Note that the height returned is the font height (see [`get_height`][Self::get_height]) and has no relation to the glyph height.\n# Default Arguments\n* `next` - `0`"] # [doc = ""] # [inline] pub fn get_char_size (& self , char : i64 , next : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_char_size ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , char as _ , next as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns resource id of the cache texture containing the char.\n# Default Arguments\n* `next` - `0`\n* `outline` - `false`"] # [doc = ""] # [inline] pub fn get_char_texture (& self , char : i64 , next : i64 , outline : bool) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_char_texture ; let ret = crate :: icalls :: icallvar__i64_i64_bool (method_bind , self . this . sys () . as_ptr () , char as _ , next as _ , outline as _) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns size of the cache texture containing the char.\n# Default Arguments\n* `next` - `0`\n* `outline` - `false`"] # [doc = ""] # [inline] pub fn get_char_texture_size (& self , char : i64 , next : i64 , outline : bool) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_char_texture_size ; let ret = crate :: icalls :: icallvar__i64_i64_bool (method_bind , self . this . sys () . as_ptr () , char as _ , next as _ , outline as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns char offset from the baseline.\n# Default Arguments\n* `next` - `0`\n* `outline` - `false`"] # [doc = ""] # [inline] pub fn get_char_tx_offset (& self , char : i64 , next : i64 , outline : bool) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_char_tx_offset ; let ret = crate :: icalls :: icallvar__i64_i64_bool (method_bind , self . this . sys () . as_ptr () , char as _ , next as _ , outline as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns size of the char.\n# Default Arguments\n* `next` - `0`\n* `outline` - `false`"] # [doc = ""] # [inline] pub fn get_char_tx_size (& self , char : i64 , next : i64 , outline : bool) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_char_tx_size ; let ret = crate :: icalls :: icallvar__i64_i64_bool (method_bind , self . this . sys () . as_ptr () , char as _ , next as _ , outline as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns rectangle in the cache texture containing the char.\n# Default Arguments\n* `next` - `0`\n* `outline` - `false`"] # [doc = ""] # [inline] pub fn get_char_tx_uv_rect (& self , char : i64 , next : i64 , outline : bool) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_char_tx_uv_rect ; let ret = crate :: icalls :: icallvar__i64_i64_bool (method_bind , self . this . sys () . as_ptr () , char as _ , next as _ , outline as _) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the font descent (number of pixels below the baseline)."] # [doc = ""] # [inline] pub fn get_descent (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_descent ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the total font height (ascent plus descent) in pixels."] # [doc = ""] # [inline] pub fn get_height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the size of a string, taking kerning and advance into account. Note that the height returned is the font height (see [`get_height`][Self::get_height]) and has no relation to the string."] # [doc = ""] # [inline] pub fn get_string_size (& self , string : impl Into < GodotString >) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_string_size ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , string . into ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the size that the string would have with word wrapping enabled with a fixed `width`."] # [doc = ""] # [inline] pub fn get_wordwrap_string_size (& self , string : impl Into < GodotString > , width : f64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . get_wordwrap_string_size ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , string . into () , width as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the font has an outline."] # [doc = ""] # [inline] pub fn has_outline (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . has_outline ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_distance_field_hint (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . is_distance_field_hint ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "After editing a font (changing size, ascent, char rects, etc.). Call this function to propagate changes to controls that might use it."] # [doc = ""] # [inline] pub fn update_changes (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FontMethodTable :: get (get_api ()) . update_changes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Font { } unsafe impl GodotObject for Font { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Font" } } impl std :: ops :: Deref for Font { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Font { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Font { } unsafe impl SubClass < crate :: generated :: Reference > for Font { } unsafe impl SubClass < crate :: generated :: Object > for Font { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct FontMethodTable { pub class_constructor : sys :: godot_class_constructor , pub draw : * mut sys :: godot_method_bind , pub draw_char : * mut sys :: godot_method_bind , pub get_ascent : * mut sys :: godot_method_bind , pub get_char_contours : * mut sys :: godot_method_bind , pub get_char_size : * mut sys :: godot_method_bind , pub get_char_texture : * mut sys :: godot_method_bind , pub get_char_texture_size : * mut sys :: godot_method_bind , pub get_char_tx_offset : * mut sys :: godot_method_bind , pub get_char_tx_size : * mut sys :: godot_method_bind , pub get_char_tx_uv_rect : * mut sys :: godot_method_bind , pub get_descent : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_string_size : * mut sys :: godot_method_bind , pub get_wordwrap_string_size : * mut sys :: godot_method_bind , pub has_outline : * mut sys :: godot_method_bind , pub is_distance_field_hint : * mut sys :: godot_method_bind , pub update_changes : * mut sys :: godot_method_bind } impl FontMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : FontMethodTable = FontMethodTable { class_constructor : None , draw : 0 as * mut sys :: godot_method_bind , draw_char : 0 as * mut sys :: godot_method_bind , get_ascent : 0 as * mut sys :: godot_method_bind , get_char_contours : 0 as * mut sys :: godot_method_bind , get_char_size : 0 as * mut sys :: godot_method_bind , get_char_texture : 0 as * mut sys :: godot_method_bind , get_char_texture_size : 0 as * mut sys :: godot_method_bind , get_char_tx_offset : 0 as * mut sys :: godot_method_bind , get_char_tx_size : 0 as * mut sys :: godot_method_bind , get_char_tx_uv_rect : 0 as * mut sys :: godot_method_bind , get_descent : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_string_size : 0 as * mut sys :: godot_method_bind , get_wordwrap_string_size : 0 as * mut sys :: godot_method_bind , has_outline : 0 as * mut sys :: godot_method_bind , is_distance_field_hint : 0 as * mut sys :: godot_method_bind , update_changes : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { FontMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Font\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . draw = (gd_api . godot_method_bind_get_method) (class_name , "draw\0" . as_ptr () as * const c_char) ; table . draw_char = (gd_api . godot_method_bind_get_method) (class_name , "draw_char\0" . as_ptr () as * const c_char) ; table . get_ascent = (gd_api . godot_method_bind_get_method) (class_name , "get_ascent\0" . as_ptr () as * const c_char) ; table . get_char_contours = (gd_api . godot_method_bind_get_method) (class_name , "get_char_contours\0" . as_ptr () as * const c_char) ; table . get_char_size = (gd_api . godot_method_bind_get_method) (class_name , "get_char_size\0" . as_ptr () as * const c_char) ; table . get_char_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_char_texture\0" . as_ptr () as * const c_char) ; table . get_char_texture_size = (gd_api . godot_method_bind_get_method) (class_name , "get_char_texture_size\0" . as_ptr () as * const c_char) ; table . get_char_tx_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_char_tx_offset\0" . as_ptr () as * const c_char) ; table . get_char_tx_size = (gd_api . godot_method_bind_get_method) (class_name , "get_char_tx_size\0" . as_ptr () as * const c_char) ; table . get_char_tx_uv_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_char_tx_uv_rect\0" . as_ptr () as * const c_char) ; table . get_descent = (gd_api . godot_method_bind_get_method) (class_name , "get_descent\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_string_size = (gd_api . godot_method_bind_get_method) (class_name , "get_string_size\0" . as_ptr () as * const c_char) ; table . get_wordwrap_string_size = (gd_api . godot_method_bind_get_method) (class_name , "get_wordwrap_string_size\0" . as_ptr () as * const c_char) ; table . has_outline = (gd_api . godot_method_bind_get_method) (class_name , "has_outline\0" . as_ptr () as * const c_char) ; table . is_distance_field_hint = (gd_api . godot_method_bind_get_method) (class_name , "is_distance_field_hint\0" . as_ptr () as * const c_char) ; table . update_changes = (gd_api . godot_method_bind_get_method) (class_name , "update_changes\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::font::private::Font;
            
            pub(crate) mod func_ref {
                # ! [doc = "This module contains types related to the API class [`FuncRef`][super::FuncRef]."] pub (crate) mod private { # [doc = "`core class FuncRef` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_funcref.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nFuncRef inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct FuncRef { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: FuncRef ; impl FuncRef { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = FuncRefMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Calls the referenced function previously set in [`function`][Self::function] or [method @GDScript.funcref]."] # [doc = ""] # [inline] pub fn call_func (& self , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = FuncRefMethodTable :: get (get_api ()) . call_func ; let ret = crate :: icalls :: icallvarargs_ (method_bind , self . this . sys () . as_ptr () , varargs) ; ret } } # [doc = "Calls the referenced function previously set in [`function`][Self::function] or [method @GDScript.funcref]. Contrarily to [`call_func`][Self::call_func], this method does not support a variable number of arguments but expects all parameters to be passed via a single [`Array`][VariantArray]."] # [doc = ""] # [inline] pub fn call_funcv (& self , arg_array : VariantArray) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = FuncRefMethodTable :: get (get_api ()) . call_funcv ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , arg_array) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The name of the referenced function."] # [doc = ""] # [inline] pub fn function (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FuncRefMethodTable :: get (get_api ()) . get_function ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns whether the object still exists and has the function assigned."] # [doc = ""] # [inline] pub fn is_valid (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FuncRefMethodTable :: get (get_api ()) . is_valid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The name of the referenced function."] # [doc = ""] # [inline] pub fn set_function (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FuncRefMethodTable :: get (get_api ()) . set_function ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "The object containing the referenced function. This object must be of a type actually inheriting from [`Object`][Object], not a built-in type such as [`int`][int], [`Vector2`][Vector2] or [`Dictionary`][Dictionary]."] # [doc = ""] # [inline] pub fn set_instance (& self , instance : impl AsArg < crate :: generated :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FuncRefMethodTable :: get (get_api ()) . set_instance ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , instance . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for FuncRef { } unsafe impl GodotObject for FuncRef { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "FuncRef" } } impl std :: ops :: Deref for FuncRef { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for FuncRef { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for FuncRef { } unsafe impl SubClass < crate :: generated :: Object > for FuncRef { } impl Instanciable for FuncRef { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { FuncRef :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct FuncRefMethodTable { pub class_constructor : sys :: godot_class_constructor , pub call_func : * mut sys :: godot_method_bind , pub call_funcv : * mut sys :: godot_method_bind , pub get_function : * mut sys :: godot_method_bind , pub is_valid : * mut sys :: godot_method_bind , pub set_function : * mut sys :: godot_method_bind , pub set_instance : * mut sys :: godot_method_bind } impl FuncRefMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : FuncRefMethodTable = FuncRefMethodTable { class_constructor : None , call_func : 0 as * mut sys :: godot_method_bind , call_funcv : 0 as * mut sys :: godot_method_bind , get_function : 0 as * mut sys :: godot_method_bind , is_valid : 0 as * mut sys :: godot_method_bind , set_function : 0 as * mut sys :: godot_method_bind , set_instance : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { FuncRefMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "FuncRef\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . call_func = (gd_api . godot_method_bind_get_method) (class_name , "call_func\0" . as_ptr () as * const c_char) ; table . call_funcv = (gd_api . godot_method_bind_get_method) (class_name , "call_funcv\0" . as_ptr () as * const c_char) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; table . set_instance = (gd_api . godot_method_bind_get_method) (class_name , "set_instance\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::func_ref::private::FuncRef;
            
            pub(crate) mod gdnative_ {
                # ! [doc = "This module contains types related to the API class [`GDNative`][super::GDNative]."] pub (crate) mod private { # [doc = "`core class GDNative` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGDNative inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GDNative { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GDNative ; impl GDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn call_native (& self , calling_type : impl Into < GodotString > , procedure_name : impl Into < GodotString > , arguments : VariantArray) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeMethodTable :: get (get_api ()) . call_native ; let ret = crate :: icalls :: icallvar__str_str_arr (method_bind , self . this . sys () . as_ptr () , calling_type . into () , procedure_name . into () , arguments) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn library (& self) -> Option < Ref < crate :: generated :: GDNativeLibrary , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeMethodTable :: get (get_api ()) . get_library ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: GDNativeLibrary , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn initialize (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeMethodTable :: get (get_api ()) . initialize ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_library (& self , library : impl AsArg < crate :: generated :: GDNativeLibrary >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeMethodTable :: get (get_api ()) . set_library ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , library . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn terminate (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeMethodTable :: get (get_api ()) . terminate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for GDNative { } unsafe impl GodotObject for GDNative { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GDNative" } } impl std :: ops :: Deref for GDNative { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for GDNative { } unsafe impl SubClass < crate :: generated :: Object > for GDNative { } impl Instanciable for GDNative { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub call_native : * mut sys :: godot_method_bind , pub get_library : * mut sys :: godot_method_bind , pub initialize : * mut sys :: godot_method_bind , pub set_library : * mut sys :: godot_method_bind , pub terminate : * mut sys :: godot_method_bind } impl GDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GDNativeMethodTable = GDNativeMethodTable { class_constructor : None , call_native : 0 as * mut sys :: godot_method_bind , get_library : 0 as * mut sys :: godot_method_bind , initialize : 0 as * mut sys :: godot_method_bind , set_library : 0 as * mut sys :: godot_method_bind , terminate : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GDNative\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . call_native = (gd_api . godot_method_bind_get_method) (class_name , "call_native\0" . as_ptr () as * const c_char) ; table . get_library = (gd_api . godot_method_bind_get_method) (class_name , "get_library\0" . as_ptr () as * const c_char) ; table . initialize = (gd_api . godot_method_bind_get_method) (class_name , "initialize\0" . as_ptr () as * const c_char) ; table . set_library = (gd_api . godot_method_bind_get_method) (class_name , "set_library\0" . as_ptr () as * const c_char) ; table . terminate = (gd_api . godot_method_bind_get_method) (class_name , "terminate\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gdnative_::private::GDNative;
            
            pub(crate) mod gdnative_library {
                # ! [doc = "This module contains types related to the API class [`GDNativeLibrary`][super::GDNativeLibrary]."] pub (crate) mod private { # [doc = "`core class GDNativeLibrary` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gdnativelibrary.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGDNativeLibrary inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GDNativeLibrary { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GDNativeLibrary ; impl GDNativeLibrary { # [doc = r" Returns the GDNativeLibrary object of this library. Can be used to construct NativeScript objects."] # [doc = r""] # [doc = r" See also `Instance::new` for a typed API."] # [inline] pub fn current_library () -> & 'static Self { unsafe { let this = gdnative_core :: private :: get_gdnative_library_sys () ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked (this) ; Self :: cast_ref (this) } } # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GDNativeLibraryMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn config_file (& self) -> Option < Ref < crate :: generated :: ConfigFile , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeLibraryMethodTable :: get (get_api ()) . get_config_file ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: ConfigFile , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_current_dependencies (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeLibraryMethodTable :: get (get_api ()) . get_current_dependencies ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_current_library_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeLibraryMethodTable :: get (get_api ()) . get_current_library_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn symbol_prefix (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeLibraryMethodTable :: get (get_api ()) . get_symbol_prefix ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn is_reloadable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeLibraryMethodTable :: get (get_api ()) . is_reloadable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_singleton (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeLibraryMethodTable :: get (get_api ()) . is_singleton ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_config_file (& self , config_file : impl AsArg < crate :: generated :: ConfigFile >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeLibraryMethodTable :: get (get_api ()) . set_config_file ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , config_file . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_load_once (& self , load_once : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeLibraryMethodTable :: get (get_api ()) . set_load_once ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , load_once as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_reloadable (& self , reloadable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeLibraryMethodTable :: get (get_api ()) . set_reloadable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , reloadable as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_singleton (& self , singleton : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeLibraryMethodTable :: get (get_api ()) . set_singleton ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , singleton as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_symbol_prefix (& self , symbol_prefix : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeLibraryMethodTable :: get (get_api ()) . set_symbol_prefix ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , symbol_prefix . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn should_load_once (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GDNativeLibraryMethodTable :: get (get_api ()) . should_load_once ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for GDNativeLibrary { } unsafe impl GodotObject for GDNativeLibrary { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GDNativeLibrary" } } impl std :: ops :: Deref for GDNativeLibrary { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GDNativeLibrary { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for GDNativeLibrary { } unsafe impl SubClass < crate :: generated :: Reference > for GDNativeLibrary { } unsafe impl SubClass < crate :: generated :: Object > for GDNativeLibrary { } impl Instanciable for GDNativeLibrary { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GDNativeLibrary :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GDNativeLibraryMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_config_file : * mut sys :: godot_method_bind , pub get_current_dependencies : * mut sys :: godot_method_bind , pub get_current_library_path : * mut sys :: godot_method_bind , pub get_symbol_prefix : * mut sys :: godot_method_bind , pub is_reloadable : * mut sys :: godot_method_bind , pub is_singleton : * mut sys :: godot_method_bind , pub set_config_file : * mut sys :: godot_method_bind , pub set_load_once : * mut sys :: godot_method_bind , pub set_reloadable : * mut sys :: godot_method_bind , pub set_singleton : * mut sys :: godot_method_bind , pub set_symbol_prefix : * mut sys :: godot_method_bind , pub should_load_once : * mut sys :: godot_method_bind } impl GDNativeLibraryMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GDNativeLibraryMethodTable = GDNativeLibraryMethodTable { class_constructor : None , get_config_file : 0 as * mut sys :: godot_method_bind , get_current_dependencies : 0 as * mut sys :: godot_method_bind , get_current_library_path : 0 as * mut sys :: godot_method_bind , get_symbol_prefix : 0 as * mut sys :: godot_method_bind , is_reloadable : 0 as * mut sys :: godot_method_bind , is_singleton : 0 as * mut sys :: godot_method_bind , set_config_file : 0 as * mut sys :: godot_method_bind , set_load_once : 0 as * mut sys :: godot_method_bind , set_reloadable : 0 as * mut sys :: godot_method_bind , set_singleton : 0 as * mut sys :: godot_method_bind , set_symbol_prefix : 0 as * mut sys :: godot_method_bind , should_load_once : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GDNativeLibraryMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GDNativeLibrary\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_config_file = (gd_api . godot_method_bind_get_method) (class_name , "get_config_file\0" . as_ptr () as * const c_char) ; table . get_current_dependencies = (gd_api . godot_method_bind_get_method) (class_name , "get_current_dependencies\0" . as_ptr () as * const c_char) ; table . get_current_library_path = (gd_api . godot_method_bind_get_method) (class_name , "get_current_library_path\0" . as_ptr () as * const c_char) ; table . get_symbol_prefix = (gd_api . godot_method_bind_get_method) (class_name , "get_symbol_prefix\0" . as_ptr () as * const c_char) ; table . is_reloadable = (gd_api . godot_method_bind_get_method) (class_name , "is_reloadable\0" . as_ptr () as * const c_char) ; table . is_singleton = (gd_api . godot_method_bind_get_method) (class_name , "is_singleton\0" . as_ptr () as * const c_char) ; table . set_config_file = (gd_api . godot_method_bind_get_method) (class_name , "set_config_file\0" . as_ptr () as * const c_char) ; table . set_load_once = (gd_api . godot_method_bind_get_method) (class_name , "set_load_once\0" . as_ptr () as * const c_char) ; table . set_reloadable = (gd_api . godot_method_bind_get_method) (class_name , "set_reloadable\0" . as_ptr () as * const c_char) ; table . set_singleton = (gd_api . godot_method_bind_get_method) (class_name , "set_singleton\0" . as_ptr () as * const c_char) ; table . set_symbol_prefix = (gd_api . godot_method_bind_get_method) (class_name , "set_symbol_prefix\0" . as_ptr () as * const c_char) ; table . should_load_once = (gd_api . godot_method_bind_get_method) (class_name , "should_load_once\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gdnative_library::private::GDNativeLibrary;
            
            pub(crate) mod gdscript {
                # ! [doc = "This module contains types related to the API class [`GDScript`][super::GDScript]."] pub (crate) mod private { # [doc = "`core class GDScript` inherits `Script` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gdscript.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGDScript inherits methods from:\n - [Script](struct.Script.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GDScript { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GDScript ; impl GDScript { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GDScriptMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_as_byte_code (& self) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GDScriptMethodTable :: get (get_api ()) . get_as_byte_code ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn _new (& self , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = GDScriptMethodTable :: get (get_api ()) . _new ; let ret = crate :: icalls :: icallvarargs_ (method_bind , self . this . sys () . as_ptr () , varargs) ; ret } } } impl gdnative_core :: private :: godot_object :: Sealed for GDScript { } unsafe impl GodotObject for GDScript { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GDScript" } } impl std :: ops :: Deref for GDScript { type Target = crate :: generated :: Script ; # [inline] fn deref (& self) -> & crate :: generated :: Script { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GDScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Script { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Script > for GDScript { } unsafe impl SubClass < crate :: generated :: Resource > for GDScript { } unsafe impl SubClass < crate :: generated :: Reference > for GDScript { } unsafe impl SubClass < crate :: generated :: Object > for GDScript { } impl Instanciable for GDScript { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GDScript :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GDScriptMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_as_byte_code : * mut sys :: godot_method_bind , pub _new : * mut sys :: godot_method_bind } impl GDScriptMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GDScriptMethodTable = GDScriptMethodTable { class_constructor : None , get_as_byte_code : 0 as * mut sys :: godot_method_bind , _new : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GDScriptMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GDScript\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_as_byte_code = (gd_api . godot_method_bind_get_method) (class_name , "get_as_byte_code\0" . as_ptr () as * const c_char) ; table . _new = (gd_api . godot_method_bind_get_method) (class_name , "new\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gdscript::private::GDScript;
            
            pub(crate) mod gdscript_function_state {
                # ! [doc = "This module contains types related to the API class [`GDScriptFunctionState`][super::GDScriptFunctionState]."] pub (crate) mod private { # [doc = "`core class GDScriptFunctionState` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gdscriptfunctionstate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGDScriptFunctionState inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GDScriptFunctionState { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GDScriptFunctionState ; impl GDScriptFunctionState { # [doc = ""] # [doc = ""] # [inline] pub fn is_valid (& self , extended_check : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GDScriptFunctionStateMethodTable :: get (get_api ()) . is_valid ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , extended_check as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn resume (& self , arg : impl OwnedToVariant) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = GDScriptFunctionStateMethodTable :: get (get_api ()) . resume ; let ret = crate :: icalls :: icallvar__var (method_bind , self . this . sys () . as_ptr () , arg . owned_to_variant ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for GDScriptFunctionState { } unsafe impl GodotObject for GDScriptFunctionState { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GDScriptFunctionState" } } impl std :: ops :: Deref for GDScriptFunctionState { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GDScriptFunctionState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for GDScriptFunctionState { } unsafe impl SubClass < crate :: generated :: Object > for GDScriptFunctionState { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GDScriptFunctionStateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_valid : * mut sys :: godot_method_bind , pub resume : * mut sys :: godot_method_bind } impl GDScriptFunctionStateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GDScriptFunctionStateMethodTable = GDScriptFunctionStateMethodTable { class_constructor : None , is_valid : 0 as * mut sys :: godot_method_bind , resume : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GDScriptFunctionStateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GDScriptFunctionState\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\0" . as_ptr () as * const c_char) ; table . resume = (gd_api . godot_method_bind_get_method) (class_name , "resume\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gdscript_function_state::private::GDScriptFunctionState;
            
            pub mod gi_probe {
                # ! [doc = "This module contains types related to the API class [`GIProbe`][super::GIProbe]."] pub (crate) mod private { # [doc = "`core class GIProbe` inherits `VisualInstance` (manually managed).\n\nThis class has related types in the [`gi_probe`][super::gi_probe] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_giprobe.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`GIProbe` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<GIProbe>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nGIProbe inherits methods from:\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GIProbe { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GIProbe ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Subdiv (pub i64) ; impl Subdiv { pub const _64 : Subdiv = Subdiv (0i64) ; pub const _128 : Subdiv = Subdiv (1i64) ; pub const _256 : Subdiv = Subdiv (2i64) ; pub const _512 : Subdiv = Subdiv (3i64) ; pub const MAX : Subdiv = Subdiv (4i64) ; } impl From < i64 > for Subdiv { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Subdiv > for i64 { # [inline] fn from (v : Subdiv) -> Self { v . 0 } } impl FromVariant for Subdiv { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl GIProbe { pub const SUBDIV_64 : i64 = 0i64 ; pub const SUBDIV_128 : i64 = 1i64 ; pub const SUBDIV_256 : i64 = 2i64 ; pub const SUBDIV_512 : i64 = 3i64 ; pub const SUBDIV_MAX : i64 = 4i64 ; } impl GIProbe { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GIProbeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Bakes the effect from all [`GeometryInstance`][GeometryInstance]s marked with [`GeometryInstance.use_in_baked_light`][GeometryInstance::use_in_baked_light] and [`Light`][Light]s marked with either [`Light.BAKE_INDIRECT`][Light::BAKE_INDIRECT] or [`Light.BAKE_ALL`][Light::BAKE_ALL]. If `create_visual_debug` is `true`, after baking the light, this will generate a [`MultiMesh`][MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [`GIProbe`][GIProbe]'s data and debug any issues that may be occurring.\n**Note:** [`bake`][Self::bake] works from the editor and in exported projects. This makes it suitable for procedurally generated or user-built levels. Baking a [`GIProbe`][GIProbe] generally takes from 5 to 20 seconds in most scenes. Reducing [`subdiv`][Self::subdiv] can speed up baking.\n**Note:** [`GeometryInstance`][GeometryInstance]s and [`Light`][Light]s must be fully ready before [`bake`][Self::bake] is called. If you are procedurally creating those and some meshes or lights are missing from your baked [`GIProbe`][GIProbe], use `call_deferred(\"bake\")` instead of calling [`bake`][Self::bake] directly.\n# Default Arguments\n* `from_node` - `null`\n* `create_visual_debug` - `false`"] # [doc = ""] # [inline] pub fn bake (& self , from_node : impl AsArg < crate :: generated :: Node > , create_visual_debug : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . bake ; let ret = crate :: icalls :: icallvar__obj_bool (method_bind , self . this . sys () . as_ptr () , from_node . as_arg_ptr () , create_visual_debug as _) ; } } # [doc = "Calls [`bake`][Self::bake] with `create_visual_debug` enabled."] # [doc = ""] # [inline] pub fn debug_bake (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . debug_bake ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Offsets the lookup of the light contribution from the [`GIProbe`][GIProbe]. This can be used to avoid self-shadowing, but may introduce light leaking at higher values. This and [`normal_bias`][Self::normal_bias] should be played around with to minimize self-shadowing and light leaking.\n**Note:** `bias` should usually be above 1.0 as that is the size of the voxels."] # [doc = ""] # [inline] pub fn bias (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . get_bias ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum brightness that the [`GIProbe`][GIProbe] will recognize. Brightness will be scaled within this range."] # [doc = ""] # [inline] pub fn dynamic_range (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . get_dynamic_range ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Energy multiplier. Makes the lighting contribution from the [`GIProbe`][GIProbe] brighter."] # [doc = ""] # [inline] pub fn energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . get_energy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The size of the area covered by the [`GIProbe`][GIProbe]. If you make the extents larger without increasing the subdivisions with [`subdiv`][Self::subdiv], the size of each cell will increase and result in lower detailed lighting."] # [doc = ""] # [inline] pub fn extents (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . get_extents ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Offsets the lookup into the [`GIProbe`][GIProbe] based on the object's normal direction. Can be used to reduce some self-shadowing artifacts."] # [doc = ""] # [inline] pub fn normal_bias (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . get_normal_bias ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The [`GIProbeData`][GIProbeData] resource that holds the data for this [`GIProbe`][GIProbe]."] # [doc = ""] # [inline] pub fn probe_data (& self) -> Option < Ref < crate :: generated :: GIProbeData , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . get_probe_data ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: GIProbeData , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "How much light propagates through the probe internally. A higher value allows light to spread further."] # [doc = ""] # [inline] pub fn propagation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . get_propagation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Number of times to subdivide the grid that the [`GIProbe`][GIProbe] operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance."] # [doc = ""] # [inline] pub fn subdiv (& self) -> crate :: generated :: gi_probe :: Subdiv { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . get_subdiv ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: gi_probe :: Subdiv > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Deprecated._ This property has been deprecated due to known bugs and no longer has any effect when enabled."] # [doc = ""] # [inline] pub fn is_compressed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . is_compressed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, ignores the sky contribution when calculating lighting."] # [doc = ""] # [inline] pub fn is_interior (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . is_interior ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Offsets the lookup of the light contribution from the [`GIProbe`][GIProbe]. This can be used to avoid self-shadowing, but may introduce light leaking at higher values. This and [`normal_bias`][Self::normal_bias] should be played around with to minimize self-shadowing and light leaking.\n**Note:** `bias` should usually be above 1.0 as that is the size of the voxels."] # [doc = ""] # [inline] pub fn set_bias (& self , max : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . set_bias ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , max as _) ; } } # [doc = "_Deprecated._ This property has been deprecated due to known bugs and no longer has any effect when enabled."] # [doc = ""] # [inline] pub fn set_compress (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . set_compress ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The maximum brightness that the [`GIProbe`][GIProbe] will recognize. Brightness will be scaled within this range."] # [doc = ""] # [inline] pub fn set_dynamic_range (& self , max : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . set_dynamic_range ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , max as _) ; } } # [doc = "Energy multiplier. Makes the lighting contribution from the [`GIProbe`][GIProbe] brighter."] # [doc = ""] # [inline] pub fn set_energy (& self , max : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . set_energy ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , max as _) ; } } # [doc = "The size of the area covered by the [`GIProbe`][GIProbe]. If you make the extents larger without increasing the subdivisions with [`subdiv`][Self::subdiv], the size of each cell will increase and result in lower detailed lighting."] # [doc = ""] # [inline] pub fn set_extents (& self , extents : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . set_extents ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , extents) ; } } # [doc = "If `true`, ignores the sky contribution when calculating lighting."] # [doc = ""] # [inline] pub fn set_interior (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . set_interior ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Offsets the lookup into the [`GIProbe`][GIProbe] based on the object's normal direction. Can be used to reduce some self-shadowing artifacts."] # [doc = ""] # [inline] pub fn set_normal_bias (& self , max : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . set_normal_bias ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , max as _) ; } } # [doc = "The [`GIProbeData`][GIProbeData] resource that holds the data for this [`GIProbe`][GIProbe]."] # [doc = ""] # [inline] pub fn set_probe_data (& self , data : impl AsArg < crate :: generated :: GIProbeData >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . set_probe_data ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , data . as_arg_ptr ()) ; } } # [doc = "How much light propagates through the probe internally. A higher value allows light to spread further."] # [doc = ""] # [inline] pub fn set_propagation (& self , max : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . set_propagation ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , max as _) ; } } # [doc = "Number of times to subdivide the grid that the [`GIProbe`][GIProbe] operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance."] # [doc = ""] # [inline] pub fn set_subdiv (& self , subdiv : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeMethodTable :: get (get_api ()) . set_subdiv ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , subdiv as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GIProbe { } unsafe impl GodotObject for GIProbe { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "GIProbe" } } impl QueueFree for GIProbe { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for GIProbe { type Target = crate :: generated :: VisualInstance ; # [inline] fn deref (& self) -> & crate :: generated :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GIProbe { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualInstance > for GIProbe { } unsafe impl SubClass < crate :: generated :: CullInstance > for GIProbe { } unsafe impl SubClass < crate :: generated :: Spatial > for GIProbe { } unsafe impl SubClass < crate :: generated :: Node > for GIProbe { } unsafe impl SubClass < crate :: generated :: Object > for GIProbe { } impl Instanciable for GIProbe { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GIProbe :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GIProbeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub bake : * mut sys :: godot_method_bind , pub debug_bake : * mut sys :: godot_method_bind , pub get_bias : * mut sys :: godot_method_bind , pub get_dynamic_range : * mut sys :: godot_method_bind , pub get_energy : * mut sys :: godot_method_bind , pub get_extents : * mut sys :: godot_method_bind , pub get_normal_bias : * mut sys :: godot_method_bind , pub get_probe_data : * mut sys :: godot_method_bind , pub get_propagation : * mut sys :: godot_method_bind , pub get_subdiv : * mut sys :: godot_method_bind , pub is_compressed : * mut sys :: godot_method_bind , pub is_interior : * mut sys :: godot_method_bind , pub set_bias : * mut sys :: godot_method_bind , pub set_compress : * mut sys :: godot_method_bind , pub set_dynamic_range : * mut sys :: godot_method_bind , pub set_energy : * mut sys :: godot_method_bind , pub set_extents : * mut sys :: godot_method_bind , pub set_interior : * mut sys :: godot_method_bind , pub set_normal_bias : * mut sys :: godot_method_bind , pub set_probe_data : * mut sys :: godot_method_bind , pub set_propagation : * mut sys :: godot_method_bind , pub set_subdiv : * mut sys :: godot_method_bind } impl GIProbeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GIProbeMethodTable = GIProbeMethodTable { class_constructor : None , bake : 0 as * mut sys :: godot_method_bind , debug_bake : 0 as * mut sys :: godot_method_bind , get_bias : 0 as * mut sys :: godot_method_bind , get_dynamic_range : 0 as * mut sys :: godot_method_bind , get_energy : 0 as * mut sys :: godot_method_bind , get_extents : 0 as * mut sys :: godot_method_bind , get_normal_bias : 0 as * mut sys :: godot_method_bind , get_probe_data : 0 as * mut sys :: godot_method_bind , get_propagation : 0 as * mut sys :: godot_method_bind , get_subdiv : 0 as * mut sys :: godot_method_bind , is_compressed : 0 as * mut sys :: godot_method_bind , is_interior : 0 as * mut sys :: godot_method_bind , set_bias : 0 as * mut sys :: godot_method_bind , set_compress : 0 as * mut sys :: godot_method_bind , set_dynamic_range : 0 as * mut sys :: godot_method_bind , set_energy : 0 as * mut sys :: godot_method_bind , set_extents : 0 as * mut sys :: godot_method_bind , set_interior : 0 as * mut sys :: godot_method_bind , set_normal_bias : 0 as * mut sys :: godot_method_bind , set_probe_data : 0 as * mut sys :: godot_method_bind , set_propagation : 0 as * mut sys :: godot_method_bind , set_subdiv : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GIProbeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GIProbe\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . bake = (gd_api . godot_method_bind_get_method) (class_name , "bake\0" . as_ptr () as * const c_char) ; table . debug_bake = (gd_api . godot_method_bind_get_method) (class_name , "debug_bake\0" . as_ptr () as * const c_char) ; table . get_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_bias\0" . as_ptr () as * const c_char) ; table . get_dynamic_range = (gd_api . godot_method_bind_get_method) (class_name , "get_dynamic_range\0" . as_ptr () as * const c_char) ; table . get_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_energy\0" . as_ptr () as * const c_char) ; table . get_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_extents\0" . as_ptr () as * const c_char) ; table . get_normal_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_bias\0" . as_ptr () as * const c_char) ; table . get_probe_data = (gd_api . godot_method_bind_get_method) (class_name , "get_probe_data\0" . as_ptr () as * const c_char) ; table . get_propagation = (gd_api . godot_method_bind_get_method) (class_name , "get_propagation\0" . as_ptr () as * const c_char) ; table . get_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "get_subdiv\0" . as_ptr () as * const c_char) ; table . is_compressed = (gd_api . godot_method_bind_get_method) (class_name , "is_compressed\0" . as_ptr () as * const c_char) ; table . is_interior = (gd_api . godot_method_bind_get_method) (class_name , "is_interior\0" . as_ptr () as * const c_char) ; table . set_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_bias\0" . as_ptr () as * const c_char) ; table . set_compress = (gd_api . godot_method_bind_get_method) (class_name , "set_compress\0" . as_ptr () as * const c_char) ; table . set_dynamic_range = (gd_api . godot_method_bind_get_method) (class_name , "set_dynamic_range\0" . as_ptr () as * const c_char) ; table . set_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_energy\0" . as_ptr () as * const c_char) ; table . set_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_extents\0" . as_ptr () as * const c_char) ; table . set_interior = (gd_api . godot_method_bind_get_method) (class_name , "set_interior\0" . as_ptr () as * const c_char) ; table . set_normal_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_bias\0" . as_ptr () as * const c_char) ; table . set_probe_data = (gd_api . godot_method_bind_get_method) (class_name , "set_probe_data\0" . as_ptr () as * const c_char) ; table . set_propagation = (gd_api . godot_method_bind_get_method) (class_name , "set_propagation\0" . as_ptr () as * const c_char) ; table . set_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "set_subdiv\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gi_probe::private::GIProbe;
            
            pub(crate) mod gi_probe_data {
                # ! [doc = "This module contains types related to the API class [`GIProbeData`][super::GIProbeData]."] pub (crate) mod private { # [doc = "`core class GIProbeData` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_giprobedata.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGIProbeData inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GIProbeData { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GIProbeData ; impl GIProbeData { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GIProbeDataMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn bias (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . get_bias ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn bounds (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . get_bounds ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn cell_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . get_cell_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn dynamic_data (& self) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . get_dynamic_data ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn dynamic_range (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . get_dynamic_range ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . get_energy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn normal_bias (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . get_normal_bias ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn propagation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . get_propagation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn to_cell_xform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . get_to_cell_xform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn is_compressed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . is_compressed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_interior (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . is_interior ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bias (& self , bias : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . set_bias ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , bias as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bounds (& self , bounds : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . set_bounds ; let ret = crate :: icalls :: icallvar__aabb (method_bind , self . this . sys () . as_ptr () , bounds) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cell_size (& self , cell_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . set_cell_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , cell_size as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_compress (& self , compress : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . set_compress ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , compress as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_dynamic_data (& self , dynamic_data : PoolArray < i32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . set_dynamic_data ; let ret = crate :: icalls :: icallvar__i32arr (method_bind , self . this . sys () . as_ptr () , dynamic_data) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_dynamic_range (& self , dynamic_range : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . set_dynamic_range ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , dynamic_range as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_energy (& self , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . set_energy ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , energy as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_interior (& self , interior : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . set_interior ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , interior as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_normal_bias (& self , bias : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . set_normal_bias ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , bias as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_propagation (& self , propagation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . set_propagation ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , propagation as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_to_cell_xform (& self , to_cell_xform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GIProbeDataMethodTable :: get (get_api ()) . set_to_cell_xform ; let ret = crate :: icalls :: icallvar__trans (method_bind , self . this . sys () . as_ptr () , to_cell_xform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GIProbeData { } unsafe impl GodotObject for GIProbeData { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GIProbeData" } } impl std :: ops :: Deref for GIProbeData { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GIProbeData { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for GIProbeData { } unsafe impl SubClass < crate :: generated :: Reference > for GIProbeData { } unsafe impl SubClass < crate :: generated :: Object > for GIProbeData { } impl Instanciable for GIProbeData { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GIProbeData :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GIProbeDataMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bias : * mut sys :: godot_method_bind , pub get_bounds : * mut sys :: godot_method_bind , pub get_cell_size : * mut sys :: godot_method_bind , pub get_dynamic_data : * mut sys :: godot_method_bind , pub get_dynamic_range : * mut sys :: godot_method_bind , pub get_energy : * mut sys :: godot_method_bind , pub get_normal_bias : * mut sys :: godot_method_bind , pub get_propagation : * mut sys :: godot_method_bind , pub get_to_cell_xform : * mut sys :: godot_method_bind , pub is_compressed : * mut sys :: godot_method_bind , pub is_interior : * mut sys :: godot_method_bind , pub set_bias : * mut sys :: godot_method_bind , pub set_bounds : * mut sys :: godot_method_bind , pub set_cell_size : * mut sys :: godot_method_bind , pub set_compress : * mut sys :: godot_method_bind , pub set_dynamic_data : * mut sys :: godot_method_bind , pub set_dynamic_range : * mut sys :: godot_method_bind , pub set_energy : * mut sys :: godot_method_bind , pub set_interior : * mut sys :: godot_method_bind , pub set_normal_bias : * mut sys :: godot_method_bind , pub set_propagation : * mut sys :: godot_method_bind , pub set_to_cell_xform : * mut sys :: godot_method_bind } impl GIProbeDataMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GIProbeDataMethodTable = GIProbeDataMethodTable { class_constructor : None , get_bias : 0 as * mut sys :: godot_method_bind , get_bounds : 0 as * mut sys :: godot_method_bind , get_cell_size : 0 as * mut sys :: godot_method_bind , get_dynamic_data : 0 as * mut sys :: godot_method_bind , get_dynamic_range : 0 as * mut sys :: godot_method_bind , get_energy : 0 as * mut sys :: godot_method_bind , get_normal_bias : 0 as * mut sys :: godot_method_bind , get_propagation : 0 as * mut sys :: godot_method_bind , get_to_cell_xform : 0 as * mut sys :: godot_method_bind , is_compressed : 0 as * mut sys :: godot_method_bind , is_interior : 0 as * mut sys :: godot_method_bind , set_bias : 0 as * mut sys :: godot_method_bind , set_bounds : 0 as * mut sys :: godot_method_bind , set_cell_size : 0 as * mut sys :: godot_method_bind , set_compress : 0 as * mut sys :: godot_method_bind , set_dynamic_data : 0 as * mut sys :: godot_method_bind , set_dynamic_range : 0 as * mut sys :: godot_method_bind , set_energy : 0 as * mut sys :: godot_method_bind , set_interior : 0 as * mut sys :: godot_method_bind , set_normal_bias : 0 as * mut sys :: godot_method_bind , set_propagation : 0 as * mut sys :: godot_method_bind , set_to_cell_xform : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GIProbeDataMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GIProbeData\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_bias\0" . as_ptr () as * const c_char) ; table . get_bounds = (gd_api . godot_method_bind_get_method) (class_name , "get_bounds\0" . as_ptr () as * const c_char) ; table . get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_size\0" . as_ptr () as * const c_char) ; table . get_dynamic_data = (gd_api . godot_method_bind_get_method) (class_name , "get_dynamic_data\0" . as_ptr () as * const c_char) ; table . get_dynamic_range = (gd_api . godot_method_bind_get_method) (class_name , "get_dynamic_range\0" . as_ptr () as * const c_char) ; table . get_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_energy\0" . as_ptr () as * const c_char) ; table . get_normal_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_bias\0" . as_ptr () as * const c_char) ; table . get_propagation = (gd_api . godot_method_bind_get_method) (class_name , "get_propagation\0" . as_ptr () as * const c_char) ; table . get_to_cell_xform = (gd_api . godot_method_bind_get_method) (class_name , "get_to_cell_xform\0" . as_ptr () as * const c_char) ; table . is_compressed = (gd_api . godot_method_bind_get_method) (class_name , "is_compressed\0" . as_ptr () as * const c_char) ; table . is_interior = (gd_api . godot_method_bind_get_method) (class_name , "is_interior\0" . as_ptr () as * const c_char) ; table . set_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_bias\0" . as_ptr () as * const c_char) ; table . set_bounds = (gd_api . godot_method_bind_get_method) (class_name , "set_bounds\0" . as_ptr () as * const c_char) ; table . set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_size\0" . as_ptr () as * const c_char) ; table . set_compress = (gd_api . godot_method_bind_get_method) (class_name , "set_compress\0" . as_ptr () as * const c_char) ; table . set_dynamic_data = (gd_api . godot_method_bind_get_method) (class_name , "set_dynamic_data\0" . as_ptr () as * const c_char) ; table . set_dynamic_range = (gd_api . godot_method_bind_get_method) (class_name , "set_dynamic_range\0" . as_ptr () as * const c_char) ; table . set_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_energy\0" . as_ptr () as * const c_char) ; table . set_interior = (gd_api . godot_method_bind_get_method) (class_name , "set_interior\0" . as_ptr () as * const c_char) ; table . set_normal_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_bias\0" . as_ptr () as * const c_char) ; table . set_propagation = (gd_api . godot_method_bind_get_method) (class_name , "set_propagation\0" . as_ptr () as * const c_char) ; table . set_to_cell_xform = (gd_api . godot_method_bind_get_method) (class_name , "set_to_cell_xform\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gi_probe_data::private::GIProbeData;
            
            pub(crate) mod gltf_accessor {
                # ! [doc = "This module contains types related to the API class [`GLTFAccessor`][super::GLTFAccessor]."] pub (crate) mod private { # [doc = "`core class GLTFAccessor` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gltfaccessor.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGLTFAccessor inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GLTFAccessor { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GLTFAccessor ; impl GLTFAccessor { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GLTFAccessorMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn buffer_view (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . get_buffer_view ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn byte_offset (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . get_byte_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn component_type (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . get_component_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . get_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn max (& self) -> PoolArray < f32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . get_max ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < f32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn min (& self) -> PoolArray < f32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . get_min ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < f32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn normalized (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . get_normalized ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn sparse_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . get_sparse_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn sparse_indices_buffer_view (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . get_sparse_indices_buffer_view ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn sparse_indices_byte_offset (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . get_sparse_indices_byte_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn sparse_indices_component_type (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . get_sparse_indices_component_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn sparse_values_buffer_view (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . get_sparse_values_buffer_view ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn sparse_values_byte_offset (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . get_sparse_values_byte_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn type_ (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . get_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_buffer_view (& self , buffer_view : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . set_buffer_view ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , buffer_view as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_byte_offset (& self , byte_offset : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . set_byte_offset ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , byte_offset as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_component_type (& self , component_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . set_component_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , component_type as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_count (& self , count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . set_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , count as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_max (& self , max : PoolArray < f32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . set_max ; let ret = crate :: icalls :: icallvar__f32arr (method_bind , self . this . sys () . as_ptr () , max) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_min (& self , min : PoolArray < f32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . set_min ; let ret = crate :: icalls :: icallvar__f32arr (method_bind , self . this . sys () . as_ptr () , min) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_normalized (& self , normalized : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . set_normalized ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , normalized as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_sparse_count (& self , sparse_count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . set_sparse_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , sparse_count as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_sparse_indices_buffer_view (& self , sparse_indices_buffer_view : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . set_sparse_indices_buffer_view ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , sparse_indices_buffer_view as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_sparse_indices_byte_offset (& self , sparse_indices_byte_offset : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . set_sparse_indices_byte_offset ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , sparse_indices_byte_offset as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_sparse_indices_component_type (& self , sparse_indices_component_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . set_sparse_indices_component_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , sparse_indices_component_type as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_sparse_values_buffer_view (& self , sparse_values_buffer_view : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . set_sparse_values_buffer_view ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , sparse_values_buffer_view as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_sparse_values_byte_offset (& self , sparse_values_byte_offset : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . set_sparse_values_byte_offset ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , sparse_values_byte_offset as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_type (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAccessorMethodTable :: get (get_api ()) . set_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GLTFAccessor { } unsafe impl GodotObject for GLTFAccessor { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GLTFAccessor" } } impl std :: ops :: Deref for GLTFAccessor { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GLTFAccessor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for GLTFAccessor { } unsafe impl SubClass < crate :: generated :: Reference > for GLTFAccessor { } unsafe impl SubClass < crate :: generated :: Object > for GLTFAccessor { } impl Instanciable for GLTFAccessor { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GLTFAccessor :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GLTFAccessorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_buffer_view : * mut sys :: godot_method_bind , pub get_byte_offset : * mut sys :: godot_method_bind , pub get_component_type : * mut sys :: godot_method_bind , pub get_count : * mut sys :: godot_method_bind , pub get_max : * mut sys :: godot_method_bind , pub get_min : * mut sys :: godot_method_bind , pub get_normalized : * mut sys :: godot_method_bind , pub get_sparse_count : * mut sys :: godot_method_bind , pub get_sparse_indices_buffer_view : * mut sys :: godot_method_bind , pub get_sparse_indices_byte_offset : * mut sys :: godot_method_bind , pub get_sparse_indices_component_type : * mut sys :: godot_method_bind , pub get_sparse_values_buffer_view : * mut sys :: godot_method_bind , pub get_sparse_values_byte_offset : * mut sys :: godot_method_bind , pub get_type : * mut sys :: godot_method_bind , pub set_buffer_view : * mut sys :: godot_method_bind , pub set_byte_offset : * mut sys :: godot_method_bind , pub set_component_type : * mut sys :: godot_method_bind , pub set_count : * mut sys :: godot_method_bind , pub set_max : * mut sys :: godot_method_bind , pub set_min : * mut sys :: godot_method_bind , pub set_normalized : * mut sys :: godot_method_bind , pub set_sparse_count : * mut sys :: godot_method_bind , pub set_sparse_indices_buffer_view : * mut sys :: godot_method_bind , pub set_sparse_indices_byte_offset : * mut sys :: godot_method_bind , pub set_sparse_indices_component_type : * mut sys :: godot_method_bind , pub set_sparse_values_buffer_view : * mut sys :: godot_method_bind , pub set_sparse_values_byte_offset : * mut sys :: godot_method_bind , pub set_type : * mut sys :: godot_method_bind } impl GLTFAccessorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GLTFAccessorMethodTable = GLTFAccessorMethodTable { class_constructor : None , get_buffer_view : 0 as * mut sys :: godot_method_bind , get_byte_offset : 0 as * mut sys :: godot_method_bind , get_component_type : 0 as * mut sys :: godot_method_bind , get_count : 0 as * mut sys :: godot_method_bind , get_max : 0 as * mut sys :: godot_method_bind , get_min : 0 as * mut sys :: godot_method_bind , get_normalized : 0 as * mut sys :: godot_method_bind , get_sparse_count : 0 as * mut sys :: godot_method_bind , get_sparse_indices_buffer_view : 0 as * mut sys :: godot_method_bind , get_sparse_indices_byte_offset : 0 as * mut sys :: godot_method_bind , get_sparse_indices_component_type : 0 as * mut sys :: godot_method_bind , get_sparse_values_buffer_view : 0 as * mut sys :: godot_method_bind , get_sparse_values_byte_offset : 0 as * mut sys :: godot_method_bind , get_type : 0 as * mut sys :: godot_method_bind , set_buffer_view : 0 as * mut sys :: godot_method_bind , set_byte_offset : 0 as * mut sys :: godot_method_bind , set_component_type : 0 as * mut sys :: godot_method_bind , set_count : 0 as * mut sys :: godot_method_bind , set_max : 0 as * mut sys :: godot_method_bind , set_min : 0 as * mut sys :: godot_method_bind , set_normalized : 0 as * mut sys :: godot_method_bind , set_sparse_count : 0 as * mut sys :: godot_method_bind , set_sparse_indices_buffer_view : 0 as * mut sys :: godot_method_bind , set_sparse_indices_byte_offset : 0 as * mut sys :: godot_method_bind , set_sparse_indices_component_type : 0 as * mut sys :: godot_method_bind , set_sparse_values_buffer_view : 0 as * mut sys :: godot_method_bind , set_sparse_values_byte_offset : 0 as * mut sys :: godot_method_bind , set_type : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GLTFAccessorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GLTFAccessor\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_buffer_view = (gd_api . godot_method_bind_get_method) (class_name , "get_buffer_view\0" . as_ptr () as * const c_char) ; table . get_byte_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_byte_offset\0" . as_ptr () as * const c_char) ; table . get_component_type = (gd_api . godot_method_bind_get_method) (class_name , "get_component_type\0" . as_ptr () as * const c_char) ; table . get_count = (gd_api . godot_method_bind_get_method) (class_name , "get_count\0" . as_ptr () as * const c_char) ; table . get_max = (gd_api . godot_method_bind_get_method) (class_name , "get_max\0" . as_ptr () as * const c_char) ; table . get_min = (gd_api . godot_method_bind_get_method) (class_name , "get_min\0" . as_ptr () as * const c_char) ; table . get_normalized = (gd_api . godot_method_bind_get_method) (class_name , "get_normalized\0" . as_ptr () as * const c_char) ; table . get_sparse_count = (gd_api . godot_method_bind_get_method) (class_name , "get_sparse_count\0" . as_ptr () as * const c_char) ; table . get_sparse_indices_buffer_view = (gd_api . godot_method_bind_get_method) (class_name , "get_sparse_indices_buffer_view\0" . as_ptr () as * const c_char) ; table . get_sparse_indices_byte_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_sparse_indices_byte_offset\0" . as_ptr () as * const c_char) ; table . get_sparse_indices_component_type = (gd_api . godot_method_bind_get_method) (class_name , "get_sparse_indices_component_type\0" . as_ptr () as * const c_char) ; table . get_sparse_values_buffer_view = (gd_api . godot_method_bind_get_method) (class_name , "get_sparse_values_buffer_view\0" . as_ptr () as * const c_char) ; table . get_sparse_values_byte_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_sparse_values_byte_offset\0" . as_ptr () as * const c_char) ; table . get_type = (gd_api . godot_method_bind_get_method) (class_name , "get_type\0" . as_ptr () as * const c_char) ; table . set_buffer_view = (gd_api . godot_method_bind_get_method) (class_name , "set_buffer_view\0" . as_ptr () as * const c_char) ; table . set_byte_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_byte_offset\0" . as_ptr () as * const c_char) ; table . set_component_type = (gd_api . godot_method_bind_get_method) (class_name , "set_component_type\0" . as_ptr () as * const c_char) ; table . set_count = (gd_api . godot_method_bind_get_method) (class_name , "set_count\0" . as_ptr () as * const c_char) ; table . set_max = (gd_api . godot_method_bind_get_method) (class_name , "set_max\0" . as_ptr () as * const c_char) ; table . set_min = (gd_api . godot_method_bind_get_method) (class_name , "set_min\0" . as_ptr () as * const c_char) ; table . set_normalized = (gd_api . godot_method_bind_get_method) (class_name , "set_normalized\0" . as_ptr () as * const c_char) ; table . set_sparse_count = (gd_api . godot_method_bind_get_method) (class_name , "set_sparse_count\0" . as_ptr () as * const c_char) ; table . set_sparse_indices_buffer_view = (gd_api . godot_method_bind_get_method) (class_name , "set_sparse_indices_buffer_view\0" . as_ptr () as * const c_char) ; table . set_sparse_indices_byte_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_sparse_indices_byte_offset\0" . as_ptr () as * const c_char) ; table . set_sparse_indices_component_type = (gd_api . godot_method_bind_get_method) (class_name , "set_sparse_indices_component_type\0" . as_ptr () as * const c_char) ; table . set_sparse_values_buffer_view = (gd_api . godot_method_bind_get_method) (class_name , "set_sparse_values_buffer_view\0" . as_ptr () as * const c_char) ; table . set_sparse_values_byte_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_sparse_values_byte_offset\0" . as_ptr () as * const c_char) ; table . set_type = (gd_api . godot_method_bind_get_method) (class_name , "set_type\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gltf_accessor::private::GLTFAccessor;
            
            pub(crate) mod gltf_animation {
                # ! [doc = "This module contains types related to the API class [`GLTFAnimation`][super::GLTFAnimation]."] pub (crate) mod private { # [doc = "`core class GLTFAnimation` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gltfanimation.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGLTFAnimation inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GLTFAnimation { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GLTFAnimation ; impl GLTFAnimation { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GLTFAnimationMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn loop_ (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAnimationMethodTable :: get (get_api ()) . get_loop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_loop (& self , loop_ : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFAnimationMethodTable :: get (get_api ()) . set_loop ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , loop_ as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GLTFAnimation { } unsafe impl GodotObject for GLTFAnimation { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GLTFAnimation" } } impl std :: ops :: Deref for GLTFAnimation { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GLTFAnimation { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for GLTFAnimation { } unsafe impl SubClass < crate :: generated :: Reference > for GLTFAnimation { } unsafe impl SubClass < crate :: generated :: Object > for GLTFAnimation { } impl Instanciable for GLTFAnimation { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GLTFAnimation :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GLTFAnimationMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_loop : * mut sys :: godot_method_bind , pub set_loop : * mut sys :: godot_method_bind } impl GLTFAnimationMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GLTFAnimationMethodTable = GLTFAnimationMethodTable { class_constructor : None , get_loop : 0 as * mut sys :: godot_method_bind , set_loop : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GLTFAnimationMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GLTFAnimation\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_loop = (gd_api . godot_method_bind_get_method) (class_name , "get_loop\0" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gltf_animation::private::GLTFAnimation;
            
            pub(crate) mod gltf_buffer_view {
                # ! [doc = "This module contains types related to the API class [`GLTFBufferView`][super::GLTFBufferView]."] pub (crate) mod private { # [doc = "`core class GLTFBufferView` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gltfbufferview.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGLTFBufferView inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GLTFBufferView { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GLTFBufferView ; impl GLTFBufferView { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GLTFBufferViewMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn buffer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFBufferViewMethodTable :: get (get_api ()) . get_buffer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn byte_length (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFBufferViewMethodTable :: get (get_api ()) . get_byte_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn byte_offset (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFBufferViewMethodTable :: get (get_api ()) . get_byte_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn byte_stride (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFBufferViewMethodTable :: get (get_api ()) . get_byte_stride ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn indices (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFBufferViewMethodTable :: get (get_api ()) . get_indices ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_buffer (& self , buffer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFBufferViewMethodTable :: get (get_api ()) . set_buffer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , buffer as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_byte_length (& self , byte_length : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFBufferViewMethodTable :: get (get_api ()) . set_byte_length ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , byte_length as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_byte_offset (& self , byte_offset : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFBufferViewMethodTable :: get (get_api ()) . set_byte_offset ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , byte_offset as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_byte_stride (& self , byte_stride : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFBufferViewMethodTable :: get (get_api ()) . set_byte_stride ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , byte_stride as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_indices (& self , indices : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFBufferViewMethodTable :: get (get_api ()) . set_indices ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , indices as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GLTFBufferView { } unsafe impl GodotObject for GLTFBufferView { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GLTFBufferView" } } impl std :: ops :: Deref for GLTFBufferView { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GLTFBufferView { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for GLTFBufferView { } unsafe impl SubClass < crate :: generated :: Reference > for GLTFBufferView { } unsafe impl SubClass < crate :: generated :: Object > for GLTFBufferView { } impl Instanciable for GLTFBufferView { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GLTFBufferView :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GLTFBufferViewMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_buffer : * mut sys :: godot_method_bind , pub get_byte_length : * mut sys :: godot_method_bind , pub get_byte_offset : * mut sys :: godot_method_bind , pub get_byte_stride : * mut sys :: godot_method_bind , pub get_indices : * mut sys :: godot_method_bind , pub set_buffer : * mut sys :: godot_method_bind , pub set_byte_length : * mut sys :: godot_method_bind , pub set_byte_offset : * mut sys :: godot_method_bind , pub set_byte_stride : * mut sys :: godot_method_bind , pub set_indices : * mut sys :: godot_method_bind } impl GLTFBufferViewMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GLTFBufferViewMethodTable = GLTFBufferViewMethodTable { class_constructor : None , get_buffer : 0 as * mut sys :: godot_method_bind , get_byte_length : 0 as * mut sys :: godot_method_bind , get_byte_offset : 0 as * mut sys :: godot_method_bind , get_byte_stride : 0 as * mut sys :: godot_method_bind , get_indices : 0 as * mut sys :: godot_method_bind , set_buffer : 0 as * mut sys :: godot_method_bind , set_byte_length : 0 as * mut sys :: godot_method_bind , set_byte_offset : 0 as * mut sys :: godot_method_bind , set_byte_stride : 0 as * mut sys :: godot_method_bind , set_indices : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GLTFBufferViewMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GLTFBufferView\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_buffer = (gd_api . godot_method_bind_get_method) (class_name , "get_buffer\0" . as_ptr () as * const c_char) ; table . get_byte_length = (gd_api . godot_method_bind_get_method) (class_name , "get_byte_length\0" . as_ptr () as * const c_char) ; table . get_byte_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_byte_offset\0" . as_ptr () as * const c_char) ; table . get_byte_stride = (gd_api . godot_method_bind_get_method) (class_name , "get_byte_stride\0" . as_ptr () as * const c_char) ; table . get_indices = (gd_api . godot_method_bind_get_method) (class_name , "get_indices\0" . as_ptr () as * const c_char) ; table . set_buffer = (gd_api . godot_method_bind_get_method) (class_name , "set_buffer\0" . as_ptr () as * const c_char) ; table . set_byte_length = (gd_api . godot_method_bind_get_method) (class_name , "set_byte_length\0" . as_ptr () as * const c_char) ; table . set_byte_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_byte_offset\0" . as_ptr () as * const c_char) ; table . set_byte_stride = (gd_api . godot_method_bind_get_method) (class_name , "set_byte_stride\0" . as_ptr () as * const c_char) ; table . set_indices = (gd_api . godot_method_bind_get_method) (class_name , "set_indices\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gltf_buffer_view::private::GLTFBufferView;
            
            pub(crate) mod gltf_camera {
                # ! [doc = "This module contains types related to the API class [`GLTFCamera`][super::GLTFCamera]."] pub (crate) mod private { # [doc = "`core class GLTFCamera` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gltfcamera.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGLTFCamera inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GLTFCamera { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GLTFCamera ; impl GLTFCamera { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GLTFCameraMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn fov_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFCameraMethodTable :: get (get_api ()) . get_fov_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn perspective (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFCameraMethodTable :: get (get_api ()) . get_perspective ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn zfar (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFCameraMethodTable :: get (get_api ()) . get_zfar ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn znear (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFCameraMethodTable :: get (get_api ()) . get_znear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_fov_size (& self , fov_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFCameraMethodTable :: get (get_api ()) . set_fov_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , fov_size as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_perspective (& self , perspective : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFCameraMethodTable :: get (get_api ()) . set_perspective ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , perspective as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_zfar (& self , zfar : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFCameraMethodTable :: get (get_api ()) . set_zfar ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , zfar as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_znear (& self , znear : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFCameraMethodTable :: get (get_api ()) . set_znear ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , znear as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GLTFCamera { } unsafe impl GodotObject for GLTFCamera { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GLTFCamera" } } impl std :: ops :: Deref for GLTFCamera { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GLTFCamera { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for GLTFCamera { } unsafe impl SubClass < crate :: generated :: Reference > for GLTFCamera { } unsafe impl SubClass < crate :: generated :: Object > for GLTFCamera { } impl Instanciable for GLTFCamera { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GLTFCamera :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GLTFCameraMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_fov_size : * mut sys :: godot_method_bind , pub get_perspective : * mut sys :: godot_method_bind , pub get_zfar : * mut sys :: godot_method_bind , pub get_znear : * mut sys :: godot_method_bind , pub set_fov_size : * mut sys :: godot_method_bind , pub set_perspective : * mut sys :: godot_method_bind , pub set_zfar : * mut sys :: godot_method_bind , pub set_znear : * mut sys :: godot_method_bind } impl GLTFCameraMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GLTFCameraMethodTable = GLTFCameraMethodTable { class_constructor : None , get_fov_size : 0 as * mut sys :: godot_method_bind , get_perspective : 0 as * mut sys :: godot_method_bind , get_zfar : 0 as * mut sys :: godot_method_bind , get_znear : 0 as * mut sys :: godot_method_bind , set_fov_size : 0 as * mut sys :: godot_method_bind , set_perspective : 0 as * mut sys :: godot_method_bind , set_zfar : 0 as * mut sys :: godot_method_bind , set_znear : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GLTFCameraMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GLTFCamera\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_fov_size = (gd_api . godot_method_bind_get_method) (class_name , "get_fov_size\0" . as_ptr () as * const c_char) ; table . get_perspective = (gd_api . godot_method_bind_get_method) (class_name , "get_perspective\0" . as_ptr () as * const c_char) ; table . get_zfar = (gd_api . godot_method_bind_get_method) (class_name , "get_zfar\0" . as_ptr () as * const c_char) ; table . get_znear = (gd_api . godot_method_bind_get_method) (class_name , "get_znear\0" . as_ptr () as * const c_char) ; table . set_fov_size = (gd_api . godot_method_bind_get_method) (class_name , "set_fov_size\0" . as_ptr () as * const c_char) ; table . set_perspective = (gd_api . godot_method_bind_get_method) (class_name , "set_perspective\0" . as_ptr () as * const c_char) ; table . set_zfar = (gd_api . godot_method_bind_get_method) (class_name , "set_zfar\0" . as_ptr () as * const c_char) ; table . set_znear = (gd_api . godot_method_bind_get_method) (class_name , "set_znear\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gltf_camera::private::GLTFCamera;
            
            pub(crate) mod gltf_document {
                # ! [doc = "This module contains types related to the API class [`GLTFDocument`][super::GLTFDocument]."] pub (crate) mod private { # [doc = "`core class GLTFDocument` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gltfdocument.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGLTFDocument inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GLTFDocument { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GLTFDocument ; impl GLTFDocument { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GLTFDocumentMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for GLTFDocument { } unsafe impl GodotObject for GLTFDocument { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GLTFDocument" } } impl std :: ops :: Deref for GLTFDocument { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GLTFDocument { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for GLTFDocument { } unsafe impl SubClass < crate :: generated :: Reference > for GLTFDocument { } unsafe impl SubClass < crate :: generated :: Object > for GLTFDocument { } impl Instanciable for GLTFDocument { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GLTFDocument :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GLTFDocumentMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl GLTFDocumentMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GLTFDocumentMethodTable = GLTFDocumentMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GLTFDocumentMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GLTFDocument\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::gltf_document::private::GLTFDocument;
            
            pub(crate) mod gltf_light {
                # ! [doc = "This module contains types related to the API class [`GLTFLight`][super::GLTFLight]."] pub (crate) mod private { # [doc = "`core class GLTFLight` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gltflight.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGLTFLight inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GLTFLight { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GLTFLight ; impl GLTFLight { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GLTFLightMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFLightMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn inner_cone_angle (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFLightMethodTable :: get (get_api ()) . get_inner_cone_angle ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn intensity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFLightMethodTable :: get (get_api ()) . get_intensity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn outer_cone_angle (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFLightMethodTable :: get (get_api ()) . get_outer_cone_angle ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn range (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFLightMethodTable :: get (get_api ()) . get_range ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn type_ (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFLightMethodTable :: get (get_api ()) . get_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFLightMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_inner_cone_angle (& self , inner_cone_angle : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFLightMethodTable :: get (get_api ()) . set_inner_cone_angle ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , inner_cone_angle as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_intensity (& self , intensity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFLightMethodTable :: get (get_api ()) . set_intensity ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , intensity as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_outer_cone_angle (& self , outer_cone_angle : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFLightMethodTable :: get (get_api ()) . set_outer_cone_angle ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , outer_cone_angle as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_range (& self , range : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFLightMethodTable :: get (get_api ()) . set_range ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , range as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_type (& self , type_ : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFLightMethodTable :: get (get_api ()) . set_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , type_ . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GLTFLight { } unsafe impl GodotObject for GLTFLight { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GLTFLight" } } impl std :: ops :: Deref for GLTFLight { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GLTFLight { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for GLTFLight { } unsafe impl SubClass < crate :: generated :: Reference > for GLTFLight { } unsafe impl SubClass < crate :: generated :: Object > for GLTFLight { } impl Instanciable for GLTFLight { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GLTFLight :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GLTFLightMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_color : * mut sys :: godot_method_bind , pub get_inner_cone_angle : * mut sys :: godot_method_bind , pub get_intensity : * mut sys :: godot_method_bind , pub get_outer_cone_angle : * mut sys :: godot_method_bind , pub get_range : * mut sys :: godot_method_bind , pub get_type : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_inner_cone_angle : * mut sys :: godot_method_bind , pub set_intensity : * mut sys :: godot_method_bind , pub set_outer_cone_angle : * mut sys :: godot_method_bind , pub set_range : * mut sys :: godot_method_bind , pub set_type : * mut sys :: godot_method_bind } impl GLTFLightMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GLTFLightMethodTable = GLTFLightMethodTable { class_constructor : None , get_color : 0 as * mut sys :: godot_method_bind , get_inner_cone_angle : 0 as * mut sys :: godot_method_bind , get_intensity : 0 as * mut sys :: godot_method_bind , get_outer_cone_angle : 0 as * mut sys :: godot_method_bind , get_range : 0 as * mut sys :: godot_method_bind , get_type : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_inner_cone_angle : 0 as * mut sys :: godot_method_bind , set_intensity : 0 as * mut sys :: godot_method_bind , set_outer_cone_angle : 0 as * mut sys :: godot_method_bind , set_range : 0 as * mut sys :: godot_method_bind , set_type : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GLTFLightMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GLTFLight\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_inner_cone_angle = (gd_api . godot_method_bind_get_method) (class_name , "get_inner_cone_angle\0" . as_ptr () as * const c_char) ; table . get_intensity = (gd_api . godot_method_bind_get_method) (class_name , "get_intensity\0" . as_ptr () as * const c_char) ; table . get_outer_cone_angle = (gd_api . godot_method_bind_get_method) (class_name , "get_outer_cone_angle\0" . as_ptr () as * const c_char) ; table . get_range = (gd_api . godot_method_bind_get_method) (class_name , "get_range\0" . as_ptr () as * const c_char) ; table . get_type = (gd_api . godot_method_bind_get_method) (class_name , "get_type\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_inner_cone_angle = (gd_api . godot_method_bind_get_method) (class_name , "set_inner_cone_angle\0" . as_ptr () as * const c_char) ; table . set_intensity = (gd_api . godot_method_bind_get_method) (class_name , "set_intensity\0" . as_ptr () as * const c_char) ; table . set_outer_cone_angle = (gd_api . godot_method_bind_get_method) (class_name , "set_outer_cone_angle\0" . as_ptr () as * const c_char) ; table . set_range = (gd_api . godot_method_bind_get_method) (class_name , "set_range\0" . as_ptr () as * const c_char) ; table . set_type = (gd_api . godot_method_bind_get_method) (class_name , "set_type\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gltf_light::private::GLTFLight;
            
            pub(crate) mod gltf_mesh {
                # ! [doc = "This module contains types related to the API class [`GLTFMesh`][super::GLTFMesh]."] pub (crate) mod private { # [doc = "`tools class GLTFMesh` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gltfmesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGLTFMesh inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GLTFMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GLTFMesh ; impl GLTFMesh { # [doc = ""] # [doc = ""] # [inline] pub fn blend_weights (& self) -> PoolArray < f32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFMeshMethodTable :: get (get_api ()) . get_blend_weights ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < f32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn instance_materials (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFMeshMethodTable :: get (get_api ()) . get_instance_materials ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: ArrayMesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFMeshMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: ArrayMesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_blend_weights (& self , blend_weights : PoolArray < f32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFMeshMethodTable :: get (get_api ()) . set_blend_weights ; let ret = crate :: icalls :: icallvar__f32arr (method_bind , self . this . sys () . as_ptr () , blend_weights) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_instance_materials (& self , instance_materials : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFMeshMethodTable :: get (get_api ()) . set_instance_materials ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , instance_materials) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : impl AsArg < crate :: generated :: ArrayMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFMeshMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GLTFMesh { } unsafe impl GodotObject for GLTFMesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GLTFMesh" } } impl std :: ops :: Deref for GLTFMesh { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GLTFMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for GLTFMesh { } unsafe impl SubClass < crate :: generated :: Reference > for GLTFMesh { } unsafe impl SubClass < crate :: generated :: Object > for GLTFMesh { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GLTFMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_blend_weights : * mut sys :: godot_method_bind , pub get_instance_materials : * mut sys :: godot_method_bind , pub get_mesh : * mut sys :: godot_method_bind , pub set_blend_weights : * mut sys :: godot_method_bind , pub set_instance_materials : * mut sys :: godot_method_bind , pub set_mesh : * mut sys :: godot_method_bind } impl GLTFMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GLTFMeshMethodTable = GLTFMeshMethodTable { class_constructor : None , get_blend_weights : 0 as * mut sys :: godot_method_bind , get_instance_materials : 0 as * mut sys :: godot_method_bind , get_mesh : 0 as * mut sys :: godot_method_bind , set_blend_weights : 0 as * mut sys :: godot_method_bind , set_instance_materials : 0 as * mut sys :: godot_method_bind , set_mesh : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GLTFMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GLTFMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_blend_weights = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_weights\0" . as_ptr () as * const c_char) ; table . get_instance_materials = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_materials\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . set_blend_weights = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_weights\0" . as_ptr () as * const c_char) ; table . set_instance_materials = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_materials\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gltf_mesh::private::GLTFMesh;
            
            pub(crate) mod gltf_node {
                # ! [doc = "This module contains types related to the API class [`GLTFNode`][super::GLTFNode]."] pub (crate) mod private { # [doc = "`core class GLTFNode` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gltfnode.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGLTFNode inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GLTFNode { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GLTFNode ; impl GLTFNode { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GLTFNodeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn camera (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . get_camera ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn children (& self) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . get_children ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn joint (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . get_joint ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn light (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . get_light ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn mesh (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn parent (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . get_parent ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn rotation (& self) -> Quat { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . get_rotation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Quat > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn scale (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . get_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn skeleton (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . get_skeleton ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn skin (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . get_skin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn translation (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . get_translation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn xform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . get_xform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_camera (& self , camera : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . set_camera ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , camera as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_children (& self , children : PoolArray < i32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . set_children ; let ret = crate :: icalls :: icallvar__i32arr (method_bind , self . this . sys () . as_ptr () , children) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_height (& self , height : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_joint (& self , joint : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . set_joint ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , joint as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_light (& self , light : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . set_light ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , light as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mesh as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_parent (& self , parent : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . set_parent ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , parent as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_rotation (& self , rotation : Quat) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . set_rotation ; let ret = crate :: icalls :: icallvar__quat (method_bind , self . this . sys () . as_ptr () , rotation) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_scale (& self , scale : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . set_scale ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_skeleton (& self , skeleton : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . set_skeleton ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , skeleton as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_skin (& self , skin : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . set_skin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , skin as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_translation (& self , translation : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . set_translation ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , translation) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_xform (& self , xform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFNodeMethodTable :: get (get_api ()) . set_xform ; let ret = crate :: icalls :: icallvar__trans (method_bind , self . this . sys () . as_ptr () , xform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GLTFNode { } unsafe impl GodotObject for GLTFNode { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GLTFNode" } } impl std :: ops :: Deref for GLTFNode { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GLTFNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for GLTFNode { } unsafe impl SubClass < crate :: generated :: Reference > for GLTFNode { } unsafe impl SubClass < crate :: generated :: Object > for GLTFNode { } impl Instanciable for GLTFNode { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GLTFNode :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GLTFNodeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_camera : * mut sys :: godot_method_bind , pub get_children : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_joint : * mut sys :: godot_method_bind , pub get_light : * mut sys :: godot_method_bind , pub get_mesh : * mut sys :: godot_method_bind , pub get_parent : * mut sys :: godot_method_bind , pub get_rotation : * mut sys :: godot_method_bind , pub get_scale : * mut sys :: godot_method_bind , pub get_skeleton : * mut sys :: godot_method_bind , pub get_skin : * mut sys :: godot_method_bind , pub get_translation : * mut sys :: godot_method_bind , pub get_xform : * mut sys :: godot_method_bind , pub set_camera : * mut sys :: godot_method_bind , pub set_children : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_joint : * mut sys :: godot_method_bind , pub set_light : * mut sys :: godot_method_bind , pub set_mesh : * mut sys :: godot_method_bind , pub set_parent : * mut sys :: godot_method_bind , pub set_rotation : * mut sys :: godot_method_bind , pub set_scale : * mut sys :: godot_method_bind , pub set_skeleton : * mut sys :: godot_method_bind , pub set_skin : * mut sys :: godot_method_bind , pub set_translation : * mut sys :: godot_method_bind , pub set_xform : * mut sys :: godot_method_bind } impl GLTFNodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GLTFNodeMethodTable = GLTFNodeMethodTable { class_constructor : None , get_camera : 0 as * mut sys :: godot_method_bind , get_children : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_joint : 0 as * mut sys :: godot_method_bind , get_light : 0 as * mut sys :: godot_method_bind , get_mesh : 0 as * mut sys :: godot_method_bind , get_parent : 0 as * mut sys :: godot_method_bind , get_rotation : 0 as * mut sys :: godot_method_bind , get_scale : 0 as * mut sys :: godot_method_bind , get_skeleton : 0 as * mut sys :: godot_method_bind , get_skin : 0 as * mut sys :: godot_method_bind , get_translation : 0 as * mut sys :: godot_method_bind , get_xform : 0 as * mut sys :: godot_method_bind , set_camera : 0 as * mut sys :: godot_method_bind , set_children : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_joint : 0 as * mut sys :: godot_method_bind , set_light : 0 as * mut sys :: godot_method_bind , set_mesh : 0 as * mut sys :: godot_method_bind , set_parent : 0 as * mut sys :: godot_method_bind , set_rotation : 0 as * mut sys :: godot_method_bind , set_scale : 0 as * mut sys :: godot_method_bind , set_skeleton : 0 as * mut sys :: godot_method_bind , set_skin : 0 as * mut sys :: godot_method_bind , set_translation : 0 as * mut sys :: godot_method_bind , set_xform : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GLTFNodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GLTFNode\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_camera = (gd_api . godot_method_bind_get_method) (class_name , "get_camera\0" . as_ptr () as * const c_char) ; table . get_children = (gd_api . godot_method_bind_get_method) (class_name , "get_children\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_joint = (gd_api . godot_method_bind_get_method) (class_name , "get_joint\0" . as_ptr () as * const c_char) ; table . get_light = (gd_api . godot_method_bind_get_method) (class_name , "get_light\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_parent\0" . as_ptr () as * const c_char) ; table . get_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation\0" . as_ptr () as * const c_char) ; table . get_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_scale\0" . as_ptr () as * const c_char) ; table . get_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton\0" . as_ptr () as * const c_char) ; table . get_skin = (gd_api . godot_method_bind_get_method) (class_name , "get_skin\0" . as_ptr () as * const c_char) ; table . get_translation = (gd_api . godot_method_bind_get_method) (class_name , "get_translation\0" . as_ptr () as * const c_char) ; table . get_xform = (gd_api . godot_method_bind_get_method) (class_name , "get_xform\0" . as_ptr () as * const c_char) ; table . set_camera = (gd_api . godot_method_bind_get_method) (class_name , "set_camera\0" . as_ptr () as * const c_char) ; table . set_children = (gd_api . godot_method_bind_get_method) (class_name , "set_children\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_joint = (gd_api . godot_method_bind_get_method) (class_name , "set_joint\0" . as_ptr () as * const c_char) ; table . set_light = (gd_api . godot_method_bind_get_method) (class_name , "set_light\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; table . set_parent = (gd_api . godot_method_bind_get_method) (class_name , "set_parent\0" . as_ptr () as * const c_char) ; table . set_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation\0" . as_ptr () as * const c_char) ; table . set_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_scale\0" . as_ptr () as * const c_char) ; table . set_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "set_skeleton\0" . as_ptr () as * const c_char) ; table . set_skin = (gd_api . godot_method_bind_get_method) (class_name , "set_skin\0" . as_ptr () as * const c_char) ; table . set_translation = (gd_api . godot_method_bind_get_method) (class_name , "set_translation\0" . as_ptr () as * const c_char) ; table . set_xform = (gd_api . godot_method_bind_get_method) (class_name , "set_xform\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gltf_node::private::GLTFNode;
            
            pub(crate) mod gltf_skeleton {
                # ! [doc = "This module contains types related to the API class [`GLTFSkeleton`][super::GLTFSkeleton]."] pub (crate) mod private { # [doc = "`core class GLTFSkeleton` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gltfskeleton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGLTFSkeleton inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GLTFSkeleton { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GLTFSkeleton ; impl GLTFSkeleton { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GLTFSkeletonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_bone_attachment (& self , idx : i64) -> Option < Ref < crate :: generated :: BoneAttachment , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkeletonMethodTable :: get (get_api ()) . get_bone_attachment ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: BoneAttachment , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_bone_attachment_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkeletonMethodTable :: get (get_api ()) . get_bone_attachment_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn godot_bone_node (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkeletonMethodTable :: get (get_api ()) . get_godot_bone_node ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_godot_skeleton (& self) -> Option < Ref < crate :: generated :: Skeleton , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkeletonMethodTable :: get (get_api ()) . get_godot_skeleton ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Skeleton , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn joints (& self) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkeletonMethodTable :: get (get_api ()) . get_joints ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn roots (& self) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkeletonMethodTable :: get (get_api ()) . get_roots ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn unique_names (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkeletonMethodTable :: get (get_api ()) . get_unique_names ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_godot_bone_node (& self , godot_bone_node : Dictionary) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkeletonMethodTable :: get (get_api ()) . set_godot_bone_node ; let ret = crate :: icalls :: icallvar__dict (method_bind , self . this . sys () . as_ptr () , godot_bone_node) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_joints (& self , joints : PoolArray < i32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkeletonMethodTable :: get (get_api ()) . set_joints ; let ret = crate :: icalls :: icallvar__i32arr (method_bind , self . this . sys () . as_ptr () , joints) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_roots (& self , roots : PoolArray < i32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkeletonMethodTable :: get (get_api ()) . set_roots ; let ret = crate :: icalls :: icallvar__i32arr (method_bind , self . this . sys () . as_ptr () , roots) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_unique_names (& self , unique_names : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkeletonMethodTable :: get (get_api ()) . set_unique_names ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , unique_names) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GLTFSkeleton { } unsafe impl GodotObject for GLTFSkeleton { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GLTFSkeleton" } } impl std :: ops :: Deref for GLTFSkeleton { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GLTFSkeleton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for GLTFSkeleton { } unsafe impl SubClass < crate :: generated :: Reference > for GLTFSkeleton { } unsafe impl SubClass < crate :: generated :: Object > for GLTFSkeleton { } impl Instanciable for GLTFSkeleton { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GLTFSkeleton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GLTFSkeletonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bone_attachment : * mut sys :: godot_method_bind , pub get_bone_attachment_count : * mut sys :: godot_method_bind , pub get_godot_bone_node : * mut sys :: godot_method_bind , pub get_godot_skeleton : * mut sys :: godot_method_bind , pub get_joints : * mut sys :: godot_method_bind , pub get_roots : * mut sys :: godot_method_bind , pub get_unique_names : * mut sys :: godot_method_bind , pub set_godot_bone_node : * mut sys :: godot_method_bind , pub set_joints : * mut sys :: godot_method_bind , pub set_roots : * mut sys :: godot_method_bind , pub set_unique_names : * mut sys :: godot_method_bind } impl GLTFSkeletonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GLTFSkeletonMethodTable = GLTFSkeletonMethodTable { class_constructor : None , get_bone_attachment : 0 as * mut sys :: godot_method_bind , get_bone_attachment_count : 0 as * mut sys :: godot_method_bind , get_godot_bone_node : 0 as * mut sys :: godot_method_bind , get_godot_skeleton : 0 as * mut sys :: godot_method_bind , get_joints : 0 as * mut sys :: godot_method_bind , get_roots : 0 as * mut sys :: godot_method_bind , get_unique_names : 0 as * mut sys :: godot_method_bind , set_godot_bone_node : 0 as * mut sys :: godot_method_bind , set_joints : 0 as * mut sys :: godot_method_bind , set_roots : 0 as * mut sys :: godot_method_bind , set_unique_names : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GLTFSkeletonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GLTFSkeleton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bone_attachment = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_attachment\0" . as_ptr () as * const c_char) ; table . get_bone_attachment_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_attachment_count\0" . as_ptr () as * const c_char) ; table . get_godot_bone_node = (gd_api . godot_method_bind_get_method) (class_name , "get_godot_bone_node\0" . as_ptr () as * const c_char) ; table . get_godot_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_godot_skeleton\0" . as_ptr () as * const c_char) ; table . get_joints = (gd_api . godot_method_bind_get_method) (class_name , "get_joints\0" . as_ptr () as * const c_char) ; table . get_roots = (gd_api . godot_method_bind_get_method) (class_name , "get_roots\0" . as_ptr () as * const c_char) ; table . get_unique_names = (gd_api . godot_method_bind_get_method) (class_name , "get_unique_names\0" . as_ptr () as * const c_char) ; table . set_godot_bone_node = (gd_api . godot_method_bind_get_method) (class_name , "set_godot_bone_node\0" . as_ptr () as * const c_char) ; table . set_joints = (gd_api . godot_method_bind_get_method) (class_name , "set_joints\0" . as_ptr () as * const c_char) ; table . set_roots = (gd_api . godot_method_bind_get_method) (class_name , "set_roots\0" . as_ptr () as * const c_char) ; table . set_unique_names = (gd_api . godot_method_bind_get_method) (class_name , "set_unique_names\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gltf_skeleton::private::GLTFSkeleton;
            
            pub(crate) mod gltf_skin {
                # ! [doc = "This module contains types related to the API class [`GLTFSkin`][super::GLTFSkin]."] pub (crate) mod private { # [doc = "`core class GLTFSkin` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gltfskin.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGLTFSkin inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GLTFSkin { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GLTFSkin ; impl GLTFSkin { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GLTFSkinMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn godot_skin (& self) -> Option < Ref < crate :: generated :: Skin , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . get_godot_skin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Skin , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn inverse_binds (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . get_inverse_binds ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn joint_i_to_bone_i (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . get_joint_i_to_bone_i ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn joint_i_to_name (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . get_joint_i_to_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn joints (& self) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . get_joints ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn joints_original (& self) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . get_joints_original ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn non_joints (& self) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . get_non_joints ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn roots (& self) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . get_roots ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn skeleton (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . get_skeleton ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn skin_root (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . get_skin_root ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_godot_skin (& self , godot_skin : impl AsArg < crate :: generated :: Skin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . set_godot_skin ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , godot_skin . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_inverse_binds (& self , inverse_binds : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . set_inverse_binds ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , inverse_binds) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_joint_i_to_bone_i (& self , joint_i_to_bone_i : Dictionary) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . set_joint_i_to_bone_i ; let ret = crate :: icalls :: icallvar__dict (method_bind , self . this . sys () . as_ptr () , joint_i_to_bone_i) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_joint_i_to_name (& self , joint_i_to_name : Dictionary) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . set_joint_i_to_name ; let ret = crate :: icalls :: icallvar__dict (method_bind , self . this . sys () . as_ptr () , joint_i_to_name) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_joints (& self , joints : PoolArray < i32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . set_joints ; let ret = crate :: icalls :: icallvar__i32arr (method_bind , self . this . sys () . as_ptr () , joints) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_joints_original (& self , joints_original : PoolArray < i32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . set_joints_original ; let ret = crate :: icalls :: icallvar__i32arr (method_bind , self . this . sys () . as_ptr () , joints_original) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_non_joints (& self , non_joints : PoolArray < i32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . set_non_joints ; let ret = crate :: icalls :: icallvar__i32arr (method_bind , self . this . sys () . as_ptr () , non_joints) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_roots (& self , roots : PoolArray < i32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . set_roots ; let ret = crate :: icalls :: icallvar__i32arr (method_bind , self . this . sys () . as_ptr () , roots) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_skeleton (& self , skeleton : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . set_skeleton ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , skeleton as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_skin_root (& self , skin_root : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSkinMethodTable :: get (get_api ()) . set_skin_root ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , skin_root as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GLTFSkin { } unsafe impl GodotObject for GLTFSkin { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GLTFSkin" } } impl std :: ops :: Deref for GLTFSkin { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GLTFSkin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for GLTFSkin { } unsafe impl SubClass < crate :: generated :: Reference > for GLTFSkin { } unsafe impl SubClass < crate :: generated :: Object > for GLTFSkin { } impl Instanciable for GLTFSkin { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GLTFSkin :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GLTFSkinMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_godot_skin : * mut sys :: godot_method_bind , pub get_inverse_binds : * mut sys :: godot_method_bind , pub get_joint_i_to_bone_i : * mut sys :: godot_method_bind , pub get_joint_i_to_name : * mut sys :: godot_method_bind , pub get_joints : * mut sys :: godot_method_bind , pub get_joints_original : * mut sys :: godot_method_bind , pub get_non_joints : * mut sys :: godot_method_bind , pub get_roots : * mut sys :: godot_method_bind , pub get_skeleton : * mut sys :: godot_method_bind , pub get_skin_root : * mut sys :: godot_method_bind , pub set_godot_skin : * mut sys :: godot_method_bind , pub set_inverse_binds : * mut sys :: godot_method_bind , pub set_joint_i_to_bone_i : * mut sys :: godot_method_bind , pub set_joint_i_to_name : * mut sys :: godot_method_bind , pub set_joints : * mut sys :: godot_method_bind , pub set_joints_original : * mut sys :: godot_method_bind , pub set_non_joints : * mut sys :: godot_method_bind , pub set_roots : * mut sys :: godot_method_bind , pub set_skeleton : * mut sys :: godot_method_bind , pub set_skin_root : * mut sys :: godot_method_bind } impl GLTFSkinMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GLTFSkinMethodTable = GLTFSkinMethodTable { class_constructor : None , get_godot_skin : 0 as * mut sys :: godot_method_bind , get_inverse_binds : 0 as * mut sys :: godot_method_bind , get_joint_i_to_bone_i : 0 as * mut sys :: godot_method_bind , get_joint_i_to_name : 0 as * mut sys :: godot_method_bind , get_joints : 0 as * mut sys :: godot_method_bind , get_joints_original : 0 as * mut sys :: godot_method_bind , get_non_joints : 0 as * mut sys :: godot_method_bind , get_roots : 0 as * mut sys :: godot_method_bind , get_skeleton : 0 as * mut sys :: godot_method_bind , get_skin_root : 0 as * mut sys :: godot_method_bind , set_godot_skin : 0 as * mut sys :: godot_method_bind , set_inverse_binds : 0 as * mut sys :: godot_method_bind , set_joint_i_to_bone_i : 0 as * mut sys :: godot_method_bind , set_joint_i_to_name : 0 as * mut sys :: godot_method_bind , set_joints : 0 as * mut sys :: godot_method_bind , set_joints_original : 0 as * mut sys :: godot_method_bind , set_non_joints : 0 as * mut sys :: godot_method_bind , set_roots : 0 as * mut sys :: godot_method_bind , set_skeleton : 0 as * mut sys :: godot_method_bind , set_skin_root : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GLTFSkinMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GLTFSkin\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_godot_skin = (gd_api . godot_method_bind_get_method) (class_name , "get_godot_skin\0" . as_ptr () as * const c_char) ; table . get_inverse_binds = (gd_api . godot_method_bind_get_method) (class_name , "get_inverse_binds\0" . as_ptr () as * const c_char) ; table . get_joint_i_to_bone_i = (gd_api . godot_method_bind_get_method) (class_name , "get_joint_i_to_bone_i\0" . as_ptr () as * const c_char) ; table . get_joint_i_to_name = (gd_api . godot_method_bind_get_method) (class_name , "get_joint_i_to_name\0" . as_ptr () as * const c_char) ; table . get_joints = (gd_api . godot_method_bind_get_method) (class_name , "get_joints\0" . as_ptr () as * const c_char) ; table . get_joints_original = (gd_api . godot_method_bind_get_method) (class_name , "get_joints_original\0" . as_ptr () as * const c_char) ; table . get_non_joints = (gd_api . godot_method_bind_get_method) (class_name , "get_non_joints\0" . as_ptr () as * const c_char) ; table . get_roots = (gd_api . godot_method_bind_get_method) (class_name , "get_roots\0" . as_ptr () as * const c_char) ; table . get_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton\0" . as_ptr () as * const c_char) ; table . get_skin_root = (gd_api . godot_method_bind_get_method) (class_name , "get_skin_root\0" . as_ptr () as * const c_char) ; table . set_godot_skin = (gd_api . godot_method_bind_get_method) (class_name , "set_godot_skin\0" . as_ptr () as * const c_char) ; table . set_inverse_binds = (gd_api . godot_method_bind_get_method) (class_name , "set_inverse_binds\0" . as_ptr () as * const c_char) ; table . set_joint_i_to_bone_i = (gd_api . godot_method_bind_get_method) (class_name , "set_joint_i_to_bone_i\0" . as_ptr () as * const c_char) ; table . set_joint_i_to_name = (gd_api . godot_method_bind_get_method) (class_name , "set_joint_i_to_name\0" . as_ptr () as * const c_char) ; table . set_joints = (gd_api . godot_method_bind_get_method) (class_name , "set_joints\0" . as_ptr () as * const c_char) ; table . set_joints_original = (gd_api . godot_method_bind_get_method) (class_name , "set_joints_original\0" . as_ptr () as * const c_char) ; table . set_non_joints = (gd_api . godot_method_bind_get_method) (class_name , "set_non_joints\0" . as_ptr () as * const c_char) ; table . set_roots = (gd_api . godot_method_bind_get_method) (class_name , "set_roots\0" . as_ptr () as * const c_char) ; table . set_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "set_skeleton\0" . as_ptr () as * const c_char) ; table . set_skin_root = (gd_api . godot_method_bind_get_method) (class_name , "set_skin_root\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gltf_skin::private::GLTFSkin;
            
            pub(crate) mod gltf_spec_gloss {
                # ! [doc = "This module contains types related to the API class [`GLTFSpecGloss`][super::GLTFSpecGloss]."] pub (crate) mod private { # [doc = "`core class GLTFSpecGloss` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gltfspecgloss.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGLTFSpecGloss inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GLTFSpecGloss { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GLTFSpecGloss ; impl GLTFSpecGloss { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GLTFSpecGlossMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn diffuse_factor (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSpecGlossMethodTable :: get (get_api ()) . get_diffuse_factor ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn diffuse_img (& self) -> Option < Ref < crate :: generated :: Image , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSpecGlossMethodTable :: get (get_api ()) . get_diffuse_img ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Image , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn gloss_factor (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSpecGlossMethodTable :: get (get_api ()) . get_gloss_factor ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn spec_gloss_img (& self) -> Option < Ref < crate :: generated :: Image , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSpecGlossMethodTable :: get (get_api ()) . get_spec_gloss_img ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Image , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn specular_factor (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSpecGlossMethodTable :: get (get_api ()) . get_specular_factor ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_diffuse_factor (& self , diffuse_factor : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSpecGlossMethodTable :: get (get_api ()) . set_diffuse_factor ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , diffuse_factor) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_diffuse_img (& self , diffuse_img : impl AsArg < crate :: generated :: Image >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSpecGlossMethodTable :: get (get_api ()) . set_diffuse_img ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , diffuse_img . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_gloss_factor (& self , gloss_factor : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSpecGlossMethodTable :: get (get_api ()) . set_gloss_factor ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , gloss_factor as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_spec_gloss_img (& self , spec_gloss_img : impl AsArg < crate :: generated :: Image >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSpecGlossMethodTable :: get (get_api ()) . set_spec_gloss_img ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , spec_gloss_img . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_specular_factor (& self , specular_factor : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFSpecGlossMethodTable :: get (get_api ()) . set_specular_factor ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , specular_factor) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GLTFSpecGloss { } unsafe impl GodotObject for GLTFSpecGloss { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GLTFSpecGloss" } } impl std :: ops :: Deref for GLTFSpecGloss { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GLTFSpecGloss { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for GLTFSpecGloss { } unsafe impl SubClass < crate :: generated :: Reference > for GLTFSpecGloss { } unsafe impl SubClass < crate :: generated :: Object > for GLTFSpecGloss { } impl Instanciable for GLTFSpecGloss { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GLTFSpecGloss :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GLTFSpecGlossMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_diffuse_factor : * mut sys :: godot_method_bind , pub get_diffuse_img : * mut sys :: godot_method_bind , pub get_gloss_factor : * mut sys :: godot_method_bind , pub get_spec_gloss_img : * mut sys :: godot_method_bind , pub get_specular_factor : * mut sys :: godot_method_bind , pub set_diffuse_factor : * mut sys :: godot_method_bind , pub set_diffuse_img : * mut sys :: godot_method_bind , pub set_gloss_factor : * mut sys :: godot_method_bind , pub set_spec_gloss_img : * mut sys :: godot_method_bind , pub set_specular_factor : * mut sys :: godot_method_bind } impl GLTFSpecGlossMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GLTFSpecGlossMethodTable = GLTFSpecGlossMethodTable { class_constructor : None , get_diffuse_factor : 0 as * mut sys :: godot_method_bind , get_diffuse_img : 0 as * mut sys :: godot_method_bind , get_gloss_factor : 0 as * mut sys :: godot_method_bind , get_spec_gloss_img : 0 as * mut sys :: godot_method_bind , get_specular_factor : 0 as * mut sys :: godot_method_bind , set_diffuse_factor : 0 as * mut sys :: godot_method_bind , set_diffuse_img : 0 as * mut sys :: godot_method_bind , set_gloss_factor : 0 as * mut sys :: godot_method_bind , set_spec_gloss_img : 0 as * mut sys :: godot_method_bind , set_specular_factor : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GLTFSpecGlossMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GLTFSpecGloss\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_diffuse_factor = (gd_api . godot_method_bind_get_method) (class_name , "get_diffuse_factor\0" . as_ptr () as * const c_char) ; table . get_diffuse_img = (gd_api . godot_method_bind_get_method) (class_name , "get_diffuse_img\0" . as_ptr () as * const c_char) ; table . get_gloss_factor = (gd_api . godot_method_bind_get_method) (class_name , "get_gloss_factor\0" . as_ptr () as * const c_char) ; table . get_spec_gloss_img = (gd_api . godot_method_bind_get_method) (class_name , "get_spec_gloss_img\0" . as_ptr () as * const c_char) ; table . get_specular_factor = (gd_api . godot_method_bind_get_method) (class_name , "get_specular_factor\0" . as_ptr () as * const c_char) ; table . set_diffuse_factor = (gd_api . godot_method_bind_get_method) (class_name , "set_diffuse_factor\0" . as_ptr () as * const c_char) ; table . set_diffuse_img = (gd_api . godot_method_bind_get_method) (class_name , "set_diffuse_img\0" . as_ptr () as * const c_char) ; table . set_gloss_factor = (gd_api . godot_method_bind_get_method) (class_name , "set_gloss_factor\0" . as_ptr () as * const c_char) ; table . set_spec_gloss_img = (gd_api . godot_method_bind_get_method) (class_name , "set_spec_gloss_img\0" . as_ptr () as * const c_char) ; table . set_specular_factor = (gd_api . godot_method_bind_get_method) (class_name , "set_specular_factor\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gltf_spec_gloss::private::GLTFSpecGloss;
            
            pub(crate) mod gltf_state {
                # ! [doc = "This module contains types related to the API class [`GLTFState`][super::GLTFState]."] pub (crate) mod private { # [doc = "`core class GLTFState` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gltfstate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGLTFState inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GLTFState { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GLTFState ; impl GLTFState { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GLTFStateMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn accessors (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_accessors ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_animation_player (& self , idx : i64) -> Option < Ref < crate :: generated :: AnimationPlayer , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_animation_player ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: AnimationPlayer , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_animation_players_count (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_animation_players_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn animations (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_animations ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn buffer_views (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_buffer_views ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn buffers (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_buffers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn cameras (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_cameras ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn glb_data (& self) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_glb_data ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn images (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_images ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn json (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_json ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn lights (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_lights ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn major_version (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_major_version ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn materials (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_materials ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn meshes (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_meshes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn minor_version (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_minor_version ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn nodes (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_nodes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn root_nodes (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_root_nodes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn scene_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_scene_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_scene_node (& self , idx : i64) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_scene_node ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn skeleton_to_node (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_skeleton_to_node ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn skeletons (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_skeletons ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn skins (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_skins ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn textures (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_textures ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn unique_animation_names (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_unique_animation_names ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn unique_names (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_unique_names ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn use_named_skin_binds (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . get_use_named_skin_binds ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_accessors (& self , accessors : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_accessors ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , accessors) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_animations (& self , animations : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_animations ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , animations) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_buffer_views (& self , buffer_views : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_buffer_views ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , buffer_views) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_buffers (& self , buffers : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_buffers ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , buffers) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cameras (& self , cameras : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_cameras ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , cameras) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_glb_data (& self , glb_data : PoolArray < u8 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_glb_data ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , glb_data) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_images (& self , images : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_images ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , images) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_json (& self , json : Dictionary) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_json ; let ret = crate :: icalls :: icallvar__dict (method_bind , self . this . sys () . as_ptr () , json) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_lights (& self , lights : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_lights ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , lights) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_major_version (& self , major_version : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_major_version ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , major_version as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_materials (& self , materials : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_materials ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , materials) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_meshes (& self , meshes : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_meshes ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , meshes) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_minor_version (& self , minor_version : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_minor_version ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , minor_version as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_nodes (& self , nodes : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_nodes ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , nodes) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_root_nodes (& self , root_nodes : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_root_nodes ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , root_nodes) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_scene_name (& self , scene_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_scene_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , scene_name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_skeleton_to_node (& self , skeleton_to_node : Dictionary) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_skeleton_to_node ; let ret = crate :: icalls :: icallvar__dict (method_bind , self . this . sys () . as_ptr () , skeleton_to_node) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_skeletons (& self , skeletons : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_skeletons ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , skeletons) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_skins (& self , skins : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_skins ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , skins) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_textures (& self , textures : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_textures ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , textures) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_unique_animation_names (& self , unique_animation_names : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_unique_animation_names ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , unique_animation_names) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_unique_names (& self , unique_names : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_unique_names ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , unique_names) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_use_named_skin_binds (& self , use_named_skin_binds : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFStateMethodTable :: get (get_api ()) . set_use_named_skin_binds ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , use_named_skin_binds as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GLTFState { } unsafe impl GodotObject for GLTFState { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GLTFState" } } impl std :: ops :: Deref for GLTFState { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GLTFState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for GLTFState { } unsafe impl SubClass < crate :: generated :: Reference > for GLTFState { } unsafe impl SubClass < crate :: generated :: Object > for GLTFState { } impl Instanciable for GLTFState { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GLTFState :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GLTFStateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_accessors : * mut sys :: godot_method_bind , pub get_animation_player : * mut sys :: godot_method_bind , pub get_animation_players_count : * mut sys :: godot_method_bind , pub get_animations : * mut sys :: godot_method_bind , pub get_buffer_views : * mut sys :: godot_method_bind , pub get_buffers : * mut sys :: godot_method_bind , pub get_cameras : * mut sys :: godot_method_bind , pub get_glb_data : * mut sys :: godot_method_bind , pub get_images : * mut sys :: godot_method_bind , pub get_json : * mut sys :: godot_method_bind , pub get_lights : * mut sys :: godot_method_bind , pub get_major_version : * mut sys :: godot_method_bind , pub get_materials : * mut sys :: godot_method_bind , pub get_meshes : * mut sys :: godot_method_bind , pub get_minor_version : * mut sys :: godot_method_bind , pub get_nodes : * mut sys :: godot_method_bind , pub get_root_nodes : * mut sys :: godot_method_bind , pub get_scene_name : * mut sys :: godot_method_bind , pub get_scene_node : * mut sys :: godot_method_bind , pub get_skeleton_to_node : * mut sys :: godot_method_bind , pub get_skeletons : * mut sys :: godot_method_bind , pub get_skins : * mut sys :: godot_method_bind , pub get_textures : * mut sys :: godot_method_bind , pub get_unique_animation_names : * mut sys :: godot_method_bind , pub get_unique_names : * mut sys :: godot_method_bind , pub get_use_named_skin_binds : * mut sys :: godot_method_bind , pub set_accessors : * mut sys :: godot_method_bind , pub set_animations : * mut sys :: godot_method_bind , pub set_buffer_views : * mut sys :: godot_method_bind , pub set_buffers : * mut sys :: godot_method_bind , pub set_cameras : * mut sys :: godot_method_bind , pub set_glb_data : * mut sys :: godot_method_bind , pub set_images : * mut sys :: godot_method_bind , pub set_json : * mut sys :: godot_method_bind , pub set_lights : * mut sys :: godot_method_bind , pub set_major_version : * mut sys :: godot_method_bind , pub set_materials : * mut sys :: godot_method_bind , pub set_meshes : * mut sys :: godot_method_bind , pub set_minor_version : * mut sys :: godot_method_bind , pub set_nodes : * mut sys :: godot_method_bind , pub set_root_nodes : * mut sys :: godot_method_bind , pub set_scene_name : * mut sys :: godot_method_bind , pub set_skeleton_to_node : * mut sys :: godot_method_bind , pub set_skeletons : * mut sys :: godot_method_bind , pub set_skins : * mut sys :: godot_method_bind , pub set_textures : * mut sys :: godot_method_bind , pub set_unique_animation_names : * mut sys :: godot_method_bind , pub set_unique_names : * mut sys :: godot_method_bind , pub set_use_named_skin_binds : * mut sys :: godot_method_bind } impl GLTFStateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GLTFStateMethodTable = GLTFStateMethodTable { class_constructor : None , get_accessors : 0 as * mut sys :: godot_method_bind , get_animation_player : 0 as * mut sys :: godot_method_bind , get_animation_players_count : 0 as * mut sys :: godot_method_bind , get_animations : 0 as * mut sys :: godot_method_bind , get_buffer_views : 0 as * mut sys :: godot_method_bind , get_buffers : 0 as * mut sys :: godot_method_bind , get_cameras : 0 as * mut sys :: godot_method_bind , get_glb_data : 0 as * mut sys :: godot_method_bind , get_images : 0 as * mut sys :: godot_method_bind , get_json : 0 as * mut sys :: godot_method_bind , get_lights : 0 as * mut sys :: godot_method_bind , get_major_version : 0 as * mut sys :: godot_method_bind , get_materials : 0 as * mut sys :: godot_method_bind , get_meshes : 0 as * mut sys :: godot_method_bind , get_minor_version : 0 as * mut sys :: godot_method_bind , get_nodes : 0 as * mut sys :: godot_method_bind , get_root_nodes : 0 as * mut sys :: godot_method_bind , get_scene_name : 0 as * mut sys :: godot_method_bind , get_scene_node : 0 as * mut sys :: godot_method_bind , get_skeleton_to_node : 0 as * mut sys :: godot_method_bind , get_skeletons : 0 as * mut sys :: godot_method_bind , get_skins : 0 as * mut sys :: godot_method_bind , get_textures : 0 as * mut sys :: godot_method_bind , get_unique_animation_names : 0 as * mut sys :: godot_method_bind , get_unique_names : 0 as * mut sys :: godot_method_bind , get_use_named_skin_binds : 0 as * mut sys :: godot_method_bind , set_accessors : 0 as * mut sys :: godot_method_bind , set_animations : 0 as * mut sys :: godot_method_bind , set_buffer_views : 0 as * mut sys :: godot_method_bind , set_buffers : 0 as * mut sys :: godot_method_bind , set_cameras : 0 as * mut sys :: godot_method_bind , set_glb_data : 0 as * mut sys :: godot_method_bind , set_images : 0 as * mut sys :: godot_method_bind , set_json : 0 as * mut sys :: godot_method_bind , set_lights : 0 as * mut sys :: godot_method_bind , set_major_version : 0 as * mut sys :: godot_method_bind , set_materials : 0 as * mut sys :: godot_method_bind , set_meshes : 0 as * mut sys :: godot_method_bind , set_minor_version : 0 as * mut sys :: godot_method_bind , set_nodes : 0 as * mut sys :: godot_method_bind , set_root_nodes : 0 as * mut sys :: godot_method_bind , set_scene_name : 0 as * mut sys :: godot_method_bind , set_skeleton_to_node : 0 as * mut sys :: godot_method_bind , set_skeletons : 0 as * mut sys :: godot_method_bind , set_skins : 0 as * mut sys :: godot_method_bind , set_textures : 0 as * mut sys :: godot_method_bind , set_unique_animation_names : 0 as * mut sys :: godot_method_bind , set_unique_names : 0 as * mut sys :: godot_method_bind , set_use_named_skin_binds : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GLTFStateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GLTFState\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_accessors = (gd_api . godot_method_bind_get_method) (class_name , "get_accessors\0" . as_ptr () as * const c_char) ; table . get_animation_player = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_player\0" . as_ptr () as * const c_char) ; table . get_animation_players_count = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_players_count\0" . as_ptr () as * const c_char) ; table . get_animations = (gd_api . godot_method_bind_get_method) (class_name , "get_animations\0" . as_ptr () as * const c_char) ; table . get_buffer_views = (gd_api . godot_method_bind_get_method) (class_name , "get_buffer_views\0" . as_ptr () as * const c_char) ; table . get_buffers = (gd_api . godot_method_bind_get_method) (class_name , "get_buffers\0" . as_ptr () as * const c_char) ; table . get_cameras = (gd_api . godot_method_bind_get_method) (class_name , "get_cameras\0" . as_ptr () as * const c_char) ; table . get_glb_data = (gd_api . godot_method_bind_get_method) (class_name , "get_glb_data\0" . as_ptr () as * const c_char) ; table . get_images = (gd_api . godot_method_bind_get_method) (class_name , "get_images\0" . as_ptr () as * const c_char) ; table . get_json = (gd_api . godot_method_bind_get_method) (class_name , "get_json\0" . as_ptr () as * const c_char) ; table . get_lights = (gd_api . godot_method_bind_get_method) (class_name , "get_lights\0" . as_ptr () as * const c_char) ; table . get_major_version = (gd_api . godot_method_bind_get_method) (class_name , "get_major_version\0" . as_ptr () as * const c_char) ; table . get_materials = (gd_api . godot_method_bind_get_method) (class_name , "get_materials\0" . as_ptr () as * const c_char) ; table . get_meshes = (gd_api . godot_method_bind_get_method) (class_name , "get_meshes\0" . as_ptr () as * const c_char) ; table . get_minor_version = (gd_api . godot_method_bind_get_method) (class_name , "get_minor_version\0" . as_ptr () as * const c_char) ; table . get_nodes = (gd_api . godot_method_bind_get_method) (class_name , "get_nodes\0" . as_ptr () as * const c_char) ; table . get_root_nodes = (gd_api . godot_method_bind_get_method) (class_name , "get_root_nodes\0" . as_ptr () as * const c_char) ; table . get_scene_name = (gd_api . godot_method_bind_get_method) (class_name , "get_scene_name\0" . as_ptr () as * const c_char) ; table . get_scene_node = (gd_api . godot_method_bind_get_method) (class_name , "get_scene_node\0" . as_ptr () as * const c_char) ; table . get_skeleton_to_node = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton_to_node\0" . as_ptr () as * const c_char) ; table . get_skeletons = (gd_api . godot_method_bind_get_method) (class_name , "get_skeletons\0" . as_ptr () as * const c_char) ; table . get_skins = (gd_api . godot_method_bind_get_method) (class_name , "get_skins\0" . as_ptr () as * const c_char) ; table . get_textures = (gd_api . godot_method_bind_get_method) (class_name , "get_textures\0" . as_ptr () as * const c_char) ; table . get_unique_animation_names = (gd_api . godot_method_bind_get_method) (class_name , "get_unique_animation_names\0" . as_ptr () as * const c_char) ; table . get_unique_names = (gd_api . godot_method_bind_get_method) (class_name , "get_unique_names\0" . as_ptr () as * const c_char) ; table . get_use_named_skin_binds = (gd_api . godot_method_bind_get_method) (class_name , "get_use_named_skin_binds\0" . as_ptr () as * const c_char) ; table . set_accessors = (gd_api . godot_method_bind_get_method) (class_name , "set_accessors\0" . as_ptr () as * const c_char) ; table . set_animations = (gd_api . godot_method_bind_get_method) (class_name , "set_animations\0" . as_ptr () as * const c_char) ; table . set_buffer_views = (gd_api . godot_method_bind_get_method) (class_name , "set_buffer_views\0" . as_ptr () as * const c_char) ; table . set_buffers = (gd_api . godot_method_bind_get_method) (class_name , "set_buffers\0" . as_ptr () as * const c_char) ; table . set_cameras = (gd_api . godot_method_bind_get_method) (class_name , "set_cameras\0" . as_ptr () as * const c_char) ; table . set_glb_data = (gd_api . godot_method_bind_get_method) (class_name , "set_glb_data\0" . as_ptr () as * const c_char) ; table . set_images = (gd_api . godot_method_bind_get_method) (class_name , "set_images\0" . as_ptr () as * const c_char) ; table . set_json = (gd_api . godot_method_bind_get_method) (class_name , "set_json\0" . as_ptr () as * const c_char) ; table . set_lights = (gd_api . godot_method_bind_get_method) (class_name , "set_lights\0" . as_ptr () as * const c_char) ; table . set_major_version = (gd_api . godot_method_bind_get_method) (class_name , "set_major_version\0" . as_ptr () as * const c_char) ; table . set_materials = (gd_api . godot_method_bind_get_method) (class_name , "set_materials\0" . as_ptr () as * const c_char) ; table . set_meshes = (gd_api . godot_method_bind_get_method) (class_name , "set_meshes\0" . as_ptr () as * const c_char) ; table . set_minor_version = (gd_api . godot_method_bind_get_method) (class_name , "set_minor_version\0" . as_ptr () as * const c_char) ; table . set_nodes = (gd_api . godot_method_bind_get_method) (class_name , "set_nodes\0" . as_ptr () as * const c_char) ; table . set_root_nodes = (gd_api . godot_method_bind_get_method) (class_name , "set_root_nodes\0" . as_ptr () as * const c_char) ; table . set_scene_name = (gd_api . godot_method_bind_get_method) (class_name , "set_scene_name\0" . as_ptr () as * const c_char) ; table . set_skeleton_to_node = (gd_api . godot_method_bind_get_method) (class_name , "set_skeleton_to_node\0" . as_ptr () as * const c_char) ; table . set_skeletons = (gd_api . godot_method_bind_get_method) (class_name , "set_skeletons\0" . as_ptr () as * const c_char) ; table . set_skins = (gd_api . godot_method_bind_get_method) (class_name , "set_skins\0" . as_ptr () as * const c_char) ; table . set_textures = (gd_api . godot_method_bind_get_method) (class_name , "set_textures\0" . as_ptr () as * const c_char) ; table . set_unique_animation_names = (gd_api . godot_method_bind_get_method) (class_name , "set_unique_animation_names\0" . as_ptr () as * const c_char) ; table . set_unique_names = (gd_api . godot_method_bind_get_method) (class_name , "set_unique_names\0" . as_ptr () as * const c_char) ; table . set_use_named_skin_binds = (gd_api . godot_method_bind_get_method) (class_name , "set_use_named_skin_binds\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gltf_state::private::GLTFState;
            
            pub(crate) mod gltf_texture {
                # ! [doc = "This module contains types related to the API class [`GLTFTexture`][super::GLTFTexture]."] pub (crate) mod private { # [doc = "`core class GLTFTexture` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gltftexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGLTFTexture inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GLTFTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GLTFTexture ; impl GLTFTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GLTFTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn src_image (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFTextureMethodTable :: get (get_api ()) . get_src_image ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_src_image (& self , src_image : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GLTFTextureMethodTable :: get (get_api ()) . set_src_image ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , src_image as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GLTFTexture { } unsafe impl GodotObject for GLTFTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GLTFTexture" } } impl std :: ops :: Deref for GLTFTexture { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GLTFTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for GLTFTexture { } unsafe impl SubClass < crate :: generated :: Reference > for GLTFTexture { } unsafe impl SubClass < crate :: generated :: Object > for GLTFTexture { } impl Instanciable for GLTFTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GLTFTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GLTFTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_src_image : * mut sys :: godot_method_bind , pub set_src_image : * mut sys :: godot_method_bind } impl GLTFTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GLTFTextureMethodTable = GLTFTextureMethodTable { class_constructor : None , get_src_image : 0 as * mut sys :: godot_method_bind , set_src_image : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GLTFTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GLTFTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_src_image = (gd_api . godot_method_bind_get_method) (class_name , "get_src_image\0" . as_ptr () as * const c_char) ; table . set_src_image = (gd_api . godot_method_bind_get_method) (class_name , "set_src_image\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gltf_texture::private::GLTFTexture;
            
            pub mod generic_6dof_joint {
                # ! [doc = "This module contains types related to the API class [`Generic6DOFJoint`][super::Generic6DOFJoint]."] pub (crate) mod private { # [doc = "`core class Generic6DOFJoint` inherits `Joint` (manually managed).\n\nThis class has related types in the [`generic_6dof_joint`][super::generic_6dof_joint] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_generic6dofjoint.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Generic6DOFJoint` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Generic6DOFJoint>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nGeneric6DOFJoint inherits methods from:\n - [Joint](struct.Joint.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Generic6DOFJoint { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Generic6DOFJoint ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flag (pub i64) ; impl Flag { pub const ENABLE_LINEAR_LIMIT : Flag = Flag (0i64) ; pub const ENABLE_ANGULAR_LIMIT : Flag = Flag (1i64) ; pub const ENABLE_ANGULAR_SPRING : Flag = Flag (2i64) ; pub const ENABLE_LINEAR_SPRING : Flag = Flag (3i64) ; pub const ENABLE_MOTOR : Flag = Flag (4i64) ; pub const ENABLE_LINEAR_MOTOR : Flag = Flag (5i64) ; pub const MAX : Flag = Flag (6i64) ; } impl From < i64 > for Flag { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flag > for i64 { # [inline] fn from (v : Flag) -> Self { v . 0 } } impl FromVariant for Flag { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Param (pub i64) ; impl Param { pub const LINEAR_LOWER_LIMIT : Param = Param (0i64) ; pub const LINEAR_UPPER_LIMIT : Param = Param (1i64) ; pub const LINEAR_LIMIT_SOFTNESS : Param = Param (2i64) ; pub const LINEAR_RESTITUTION : Param = Param (3i64) ; pub const LINEAR_DAMPING : Param = Param (4i64) ; pub const LINEAR_MOTOR_TARGET_VELOCITY : Param = Param (5i64) ; pub const LINEAR_MOTOR_FORCE_LIMIT : Param = Param (6i64) ; pub const LINEAR_SPRING_STIFFNESS : Param = Param (7i64) ; pub const LINEAR_SPRING_DAMPING : Param = Param (8i64) ; pub const LINEAR_SPRING_EQUILIBRIUM_POINT : Param = Param (9i64) ; pub const ANGULAR_LOWER_LIMIT : Param = Param (10i64) ; pub const ANGULAR_UPPER_LIMIT : Param = Param (11i64) ; pub const ANGULAR_LIMIT_SOFTNESS : Param = Param (12i64) ; pub const ANGULAR_DAMPING : Param = Param (13i64) ; pub const ANGULAR_RESTITUTION : Param = Param (14i64) ; pub const ANGULAR_FORCE_LIMIT : Param = Param (15i64) ; pub const ANGULAR_ERP : Param = Param (16i64) ; pub const ANGULAR_MOTOR_TARGET_VELOCITY : Param = Param (17i64) ; pub const ANGULAR_MOTOR_FORCE_LIMIT : Param = Param (18i64) ; pub const ANGULAR_SPRING_STIFFNESS : Param = Param (19i64) ; pub const ANGULAR_SPRING_DAMPING : Param = Param (20i64) ; pub const ANGULAR_SPRING_EQUILIBRIUM_POINT : Param = Param (21i64) ; pub const MAX : Param = Param (22i64) ; } impl From < i64 > for Param { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Param > for i64 { # [inline] fn from (v : Param) -> Self { v . 0 } } impl FromVariant for Param { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Generic6DOFJoint { pub const FLAG_ENABLE_LINEAR_LIMIT : i64 = 0i64 ; pub const PARAM_LINEAR_LOWER_LIMIT : i64 = 0i64 ; pub const FLAG_ENABLE_ANGULAR_LIMIT : i64 = 1i64 ; pub const PARAM_LINEAR_UPPER_LIMIT : i64 = 1i64 ; pub const FLAG_ENABLE_ANGULAR_SPRING : i64 = 2i64 ; pub const PARAM_LINEAR_LIMIT_SOFTNESS : i64 = 2i64 ; pub const FLAG_ENABLE_LINEAR_SPRING : i64 = 3i64 ; pub const PARAM_LINEAR_RESTITUTION : i64 = 3i64 ; pub const FLAG_ENABLE_MOTOR : i64 = 4i64 ; pub const PARAM_LINEAR_DAMPING : i64 = 4i64 ; pub const FLAG_ENABLE_LINEAR_MOTOR : i64 = 5i64 ; pub const PARAM_LINEAR_MOTOR_TARGET_VELOCITY : i64 = 5i64 ; pub const FLAG_MAX : i64 = 6i64 ; pub const PARAM_LINEAR_MOTOR_FORCE_LIMIT : i64 = 6i64 ; pub const PARAM_LINEAR_SPRING_STIFFNESS : i64 = 7i64 ; pub const PARAM_LINEAR_SPRING_DAMPING : i64 = 8i64 ; pub const PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT : i64 = 9i64 ; pub const PARAM_ANGULAR_LOWER_LIMIT : i64 = 10i64 ; pub const PARAM_ANGULAR_UPPER_LIMIT : i64 = 11i64 ; pub const PARAM_ANGULAR_LIMIT_SOFTNESS : i64 = 12i64 ; pub const PARAM_ANGULAR_DAMPING : i64 = 13i64 ; pub const PARAM_ANGULAR_RESTITUTION : i64 = 14i64 ; pub const PARAM_ANGULAR_FORCE_LIMIT : i64 = 15i64 ; pub const PARAM_ANGULAR_ERP : i64 = 16i64 ; pub const PARAM_ANGULAR_MOTOR_TARGET_VELOCITY : i64 = 17i64 ; pub const PARAM_ANGULAR_MOTOR_FORCE_LIMIT : i64 = 18i64 ; pub const PARAM_ANGULAR_SPRING_STIFFNESS : i64 = 19i64 ; pub const PARAM_ANGULAR_SPRING_DAMPING : i64 = 20i64 ; pub const PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT : i64 = 21i64 ; pub const PARAM_MAX : i64 = 22i64 ; } impl Generic6DOFJoint { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Generic6DOFJointMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, then there is a linear motor on the X axis. It will attempt to reach the target velocity while staying within the force limits."] # [doc = ""] # [inline] pub fn flag_x (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . get_flag_x ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flag as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, then there is a linear motor on the Y axis. It will attempt to reach the target velocity while staying within the force limits."] # [doc = ""] # [inline] pub fn flag_y (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . get_flag_y ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flag as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, then there is a linear motor on the Z axis. It will attempt to reach the target velocity while staying within the force limits."] # [doc = ""] # [inline] pub fn flag_z (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . get_flag_z ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flag as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The speed that the linear motor will attempt to reach on the X axis."] # [doc = ""] # [inline] pub fn param_x (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . get_param_x ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The speed that the linear motor will attempt to reach on the Y axis."] # [doc = ""] # [inline] pub fn param_y (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . get_param_y ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The speed that the linear motor will attempt to reach on the Z axis."] # [doc = ""] # [inline] pub fn param_z (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . get_param_z ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, then there is a linear motor on the X axis. It will attempt to reach the target velocity while staying within the force limits."] # [doc = ""] # [inline] pub fn set_flag_x (& self , flag : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . set_flag_x ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , flag as _ , value as _) ; } } # [doc = "If `true`, then there is a linear motor on the Y axis. It will attempt to reach the target velocity while staying within the force limits."] # [doc = ""] # [inline] pub fn set_flag_y (& self , flag : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . set_flag_y ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , flag as _ , value as _) ; } } # [doc = "If `true`, then there is a linear motor on the Z axis. It will attempt to reach the target velocity while staying within the force limits."] # [doc = ""] # [inline] pub fn set_flag_z (& self , flag : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . set_flag_z ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , flag as _ , value as _) ; } } # [doc = "The speed that the linear motor will attempt to reach on the X axis."] # [doc = ""] # [inline] pub fn set_param_x (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . set_param_x ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , param as _ , value as _) ; } } # [doc = "The speed that the linear motor will attempt to reach on the Y axis."] # [doc = ""] # [inline] pub fn set_param_y (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . set_param_y ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , param as _ , value as _) ; } } # [doc = "The speed that the linear motor will attempt to reach on the Z axis."] # [doc = ""] # [inline] pub fn set_param_z (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Generic6DOFJointMethodTable :: get (get_api ()) . set_param_z ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , param as _ , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Generic6DOFJoint { } unsafe impl GodotObject for Generic6DOFJoint { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Generic6DOFJoint" } } impl QueueFree for Generic6DOFJoint { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Generic6DOFJoint { type Target = crate :: generated :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Generic6DOFJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Joint > for Generic6DOFJoint { } unsafe impl SubClass < crate :: generated :: Spatial > for Generic6DOFJoint { } unsafe impl SubClass < crate :: generated :: Node > for Generic6DOFJoint { } unsafe impl SubClass < crate :: generated :: Object > for Generic6DOFJoint { } impl Instanciable for Generic6DOFJoint { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Generic6DOFJoint :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Generic6DOFJointMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_flag_x : * mut sys :: godot_method_bind , pub get_flag_y : * mut sys :: godot_method_bind , pub get_flag_z : * mut sys :: godot_method_bind , pub get_param_x : * mut sys :: godot_method_bind , pub get_param_y : * mut sys :: godot_method_bind , pub get_param_z : * mut sys :: godot_method_bind , pub set_flag_x : * mut sys :: godot_method_bind , pub set_flag_y : * mut sys :: godot_method_bind , pub set_flag_z : * mut sys :: godot_method_bind , pub set_param_x : * mut sys :: godot_method_bind , pub set_param_y : * mut sys :: godot_method_bind , pub set_param_z : * mut sys :: godot_method_bind } impl Generic6DOFJointMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Generic6DOFJointMethodTable = Generic6DOFJointMethodTable { class_constructor : None , get_flag_x : 0 as * mut sys :: godot_method_bind , get_flag_y : 0 as * mut sys :: godot_method_bind , get_flag_z : 0 as * mut sys :: godot_method_bind , get_param_x : 0 as * mut sys :: godot_method_bind , get_param_y : 0 as * mut sys :: godot_method_bind , get_param_z : 0 as * mut sys :: godot_method_bind , set_flag_x : 0 as * mut sys :: godot_method_bind , set_flag_y : 0 as * mut sys :: godot_method_bind , set_flag_z : 0 as * mut sys :: godot_method_bind , set_param_x : 0 as * mut sys :: godot_method_bind , set_param_y : 0 as * mut sys :: godot_method_bind , set_param_z : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Generic6DOFJointMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Generic6DOFJoint\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_flag_x = (gd_api . godot_method_bind_get_method) (class_name , "get_flag_x\0" . as_ptr () as * const c_char) ; table . get_flag_y = (gd_api . godot_method_bind_get_method) (class_name , "get_flag_y\0" . as_ptr () as * const c_char) ; table . get_flag_z = (gd_api . godot_method_bind_get_method) (class_name , "get_flag_z\0" . as_ptr () as * const c_char) ; table . get_param_x = (gd_api . godot_method_bind_get_method) (class_name , "get_param_x\0" . as_ptr () as * const c_char) ; table . get_param_y = (gd_api . godot_method_bind_get_method) (class_name , "get_param_y\0" . as_ptr () as * const c_char) ; table . get_param_z = (gd_api . godot_method_bind_get_method) (class_name , "get_param_z\0" . as_ptr () as * const c_char) ; table . set_flag_x = (gd_api . godot_method_bind_get_method) (class_name , "set_flag_x\0" . as_ptr () as * const c_char) ; table . set_flag_y = (gd_api . godot_method_bind_get_method) (class_name , "set_flag_y\0" . as_ptr () as * const c_char) ; table . set_flag_z = (gd_api . godot_method_bind_get_method) (class_name , "set_flag_z\0" . as_ptr () as * const c_char) ; table . set_param_x = (gd_api . godot_method_bind_get_method) (class_name , "set_param_x\0" . as_ptr () as * const c_char) ; table . set_param_y = (gd_api . godot_method_bind_get_method) (class_name , "set_param_y\0" . as_ptr () as * const c_char) ; table . set_param_z = (gd_api . godot_method_bind_get_method) (class_name , "set_param_z\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::generic_6dof_joint::private::Generic6DOFJoint;
            
            pub mod geometry_instance {
                # ! [doc = "This module contains types related to the API class [`GeometryInstance`][super::GeometryInstance]."] pub (crate) mod private { # [doc = "`core class GeometryInstance` inherits `VisualInstance` (manually managed).\n\nThis class has related types in the [`geometry_instance`][super::geometry_instance] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_geometryinstance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nGeometryInstance inherits methods from:\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GeometryInstance { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GeometryInstance ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flags (pub i64) ; impl Flags { pub const USE_BAKED_LIGHT : Flags = Flags (0i64) ; pub const DRAW_NEXT_FRAME_IF_VISIBLE : Flags = Flags (1i64) ; pub const MAX : Flags = Flags (2i64) ; } impl From < i64 > for Flags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flags > for i64 { # [inline] fn from (v : Flags) -> Self { v . 0 } } impl FromVariant for Flags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightmapScale (pub i64) ; impl LightmapScale { pub const _1X : LightmapScale = LightmapScale (0i64) ; pub const _2X : LightmapScale = LightmapScale (1i64) ; pub const _4X : LightmapScale = LightmapScale (2i64) ; pub const _8X : LightmapScale = LightmapScale (3i64) ; pub const MAX : LightmapScale = LightmapScale (4i64) ; } impl From < i64 > for LightmapScale { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightmapScale > for i64 { # [inline] fn from (v : LightmapScale) -> Self { v . 0 } } impl FromVariant for LightmapScale { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShadowCastingSetting (pub i64) ; impl ShadowCastingSetting { pub const OFF : ShadowCastingSetting = ShadowCastingSetting (0i64) ; pub const ON : ShadowCastingSetting = ShadowCastingSetting (1i64) ; pub const DOUBLE_SIDED : ShadowCastingSetting = ShadowCastingSetting (2i64) ; pub const SHADOWS_ONLY : ShadowCastingSetting = ShadowCastingSetting (3i64) ; } impl From < i64 > for ShadowCastingSetting { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShadowCastingSetting > for i64 { # [inline] fn from (v : ShadowCastingSetting) -> Self { v . 0 } } impl FromVariant for ShadowCastingSetting { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl GeometryInstance { pub const FLAG_USE_BAKED_LIGHT : i64 = 0i64 ; pub const LIGHTMAP_SCALE_1X : i64 = 0i64 ; pub const SHADOW_CASTING_SETTING_OFF : i64 = 0i64 ; pub const FLAG_DRAW_NEXT_FRAME_IF_VISIBLE : i64 = 1i64 ; pub const LIGHTMAP_SCALE_2X : i64 = 1i64 ; pub const SHADOW_CASTING_SETTING_ON : i64 = 1i64 ; pub const FLAG_MAX : i64 = 2i64 ; pub const LIGHTMAP_SCALE_4X : i64 = 2i64 ; pub const SHADOW_CASTING_SETTING_DOUBLE_SIDED : i64 = 2i64 ; pub const LIGHTMAP_SCALE_8X : i64 = 3i64 ; pub const SHADOW_CASTING_SETTING_SHADOWS_ONLY : i64 = 3i64 ; pub const LIGHTMAP_SCALE_MAX : i64 = 4i64 ; } impl GeometryInstance { # [doc = "The selected shadow casting flag. See [`ShadowCastingSetting`][ShadowCastingSetting] for possible values."] # [doc = ""] # [inline] pub fn cast_shadows_setting (& self) -> crate :: generated :: geometry_instance :: ShadowCastingSetting { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_cast_shadows_setting ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: geometry_instance :: ShadowCastingSetting > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The extra distance added to the GeometryInstance's bounding box ([`AABB`][Aabb]) to increase its cull box."] # [doc = ""] # [inline] pub fn extra_cull_margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_extra_cull_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [enum GeometryInstance.Flags] that have been set for this object."] # [doc = ""] # [inline] pub fn flag (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flag as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "When disabled, the mesh will be taken into account when computing indirect lighting, but the resulting lightmap will not be saved. Useful for emissive only materials or shadow casters."] # [doc = ""] # [inline] pub fn generate_lightmap (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_generate_lightmap ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Scale factor for the generated baked lightmap. Useful for adding detail to certain mesh instances."] # [doc = ""] # [inline] pub fn lightmap_scale (& self) -> crate :: generated :: geometry_instance :: LightmapScale { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_lightmap_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: geometry_instance :: LightmapScale > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The GeometryInstance's max LOD distance.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn lod_max_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_lod_max_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The GeometryInstance's max LOD margin.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn lod_max_hysteresis (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_lod_max_hysteresis ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The GeometryInstance's min LOD distance.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn lod_min_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_lod_min_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The GeometryInstance's min LOD margin.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn lod_min_hysteresis (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_lod_min_hysteresis ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The material overlay for the whole geometry.\nIf a material is assigned to this property, it will be rendered on top of any other active material for all the surfaces."] # [doc = ""] # [inline] pub fn material_overlay (& self) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_material_overlay ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The material override for the whole geometry.\nIf a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh."] # [doc = ""] # [inline] pub fn material_override (& self) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_material_override ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The selected shadow casting flag. See [`ShadowCastingSetting`][ShadowCastingSetting] for possible values."] # [doc = ""] # [inline] pub fn set_cast_shadows_setting (& self , shadow_casting_setting : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_cast_shadows_setting ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , shadow_casting_setting as _) ; } } # [doc = "Overrides the bounding box of this node with a custom one. To remove it, set an [`AABB`][Aabb] with all fields set to zero."] # [doc = ""] # [inline] pub fn set_custom_aabb (& self , aabb : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_custom_aabb ; let ret = crate :: icalls :: icallvar__aabb (method_bind , self . this . sys () . as_ptr () , aabb) ; } } # [doc = "The extra distance added to the GeometryInstance's bounding box ([`AABB`][Aabb]) to increase its cull box."] # [doc = ""] # [inline] pub fn set_extra_cull_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_extra_cull_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; } } # [doc = "Sets the [enum GeometryInstance.Flags] specified. See [enum GeometryInstance.Flags] for options."] # [doc = ""] # [inline] pub fn set_flag (& self , flag : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , flag as _ , value as _) ; } } # [doc = "When disabled, the mesh will be taken into account when computing indirect lighting, but the resulting lightmap will not be saved. Useful for emissive only materials or shadow casters."] # [doc = ""] # [inline] pub fn set_generate_lightmap (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_generate_lightmap ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Scale factor for the generated baked lightmap. Useful for adding detail to certain mesh instances."] # [doc = ""] # [inline] pub fn set_lightmap_scale (& self , scale : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_lightmap_scale ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , scale as _) ; } } # [doc = "The GeometryInstance's max LOD distance.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn set_lod_max_distance (& self , mode : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_lod_max_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The GeometryInstance's max LOD margin.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn set_lod_max_hysteresis (& self , mode : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_lod_max_hysteresis ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The GeometryInstance's min LOD distance.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn set_lod_min_distance (& self , mode : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_lod_min_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The GeometryInstance's min LOD margin.\n**Note:** This property currently has no effect."] # [doc = ""] # [inline] pub fn set_lod_min_hysteresis (& self , mode : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_lod_min_hysteresis ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The material overlay for the whole geometry.\nIf a material is assigned to this property, it will be rendered on top of any other active material for all the surfaces."] # [doc = ""] # [inline] pub fn set_material_overlay (& self , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_material_overlay ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = "The material override for the whole geometry.\nIf a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh."] # [doc = ""] # [inline] pub fn set_material_override (& self , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_material_override ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = "If `true`, this GeometryInstance will be used when baking lights using a [`GIProbe`][GIProbe] or [`BakedLightmap`][BakedLightmap]."] # [doc = ""] # [inline] pub fn use_in_baked_light (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, this GeometryInstance will be used when baking lights using a [`GIProbe`][GIProbe] or [`BakedLightmap`][BakedLightmap]."] # [doc = ""] # [inline] pub fn set_use_in_baked_light (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryInstanceMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GeometryInstance { } unsafe impl GodotObject for GeometryInstance { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "GeometryInstance" } } impl QueueFree for GeometryInstance { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for GeometryInstance { type Target = crate :: generated :: VisualInstance ; # [inline] fn deref (& self) -> & crate :: generated :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GeometryInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualInstance > for GeometryInstance { } unsafe impl SubClass < crate :: generated :: CullInstance > for GeometryInstance { } unsafe impl SubClass < crate :: generated :: Spatial > for GeometryInstance { } unsafe impl SubClass < crate :: generated :: Node > for GeometryInstance { } unsafe impl SubClass < crate :: generated :: Object > for GeometryInstance { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GeometryInstanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_cast_shadows_setting : * mut sys :: godot_method_bind , pub get_extra_cull_margin : * mut sys :: godot_method_bind , pub get_flag : * mut sys :: godot_method_bind , pub get_generate_lightmap : * mut sys :: godot_method_bind , pub get_lightmap_scale : * mut sys :: godot_method_bind , pub get_lod_max_distance : * mut sys :: godot_method_bind , pub get_lod_max_hysteresis : * mut sys :: godot_method_bind , pub get_lod_min_distance : * mut sys :: godot_method_bind , pub get_lod_min_hysteresis : * mut sys :: godot_method_bind , pub get_material_overlay : * mut sys :: godot_method_bind , pub get_material_override : * mut sys :: godot_method_bind , pub set_cast_shadows_setting : * mut sys :: godot_method_bind , pub set_custom_aabb : * mut sys :: godot_method_bind , pub set_extra_cull_margin : * mut sys :: godot_method_bind , pub set_flag : * mut sys :: godot_method_bind , pub set_generate_lightmap : * mut sys :: godot_method_bind , pub set_lightmap_scale : * mut sys :: godot_method_bind , pub set_lod_max_distance : * mut sys :: godot_method_bind , pub set_lod_max_hysteresis : * mut sys :: godot_method_bind , pub set_lod_min_distance : * mut sys :: godot_method_bind , pub set_lod_min_hysteresis : * mut sys :: godot_method_bind , pub set_material_overlay : * mut sys :: godot_method_bind , pub set_material_override : * mut sys :: godot_method_bind } impl GeometryInstanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GeometryInstanceMethodTable = GeometryInstanceMethodTable { class_constructor : None , get_cast_shadows_setting : 0 as * mut sys :: godot_method_bind , get_extra_cull_margin : 0 as * mut sys :: godot_method_bind , get_flag : 0 as * mut sys :: godot_method_bind , get_generate_lightmap : 0 as * mut sys :: godot_method_bind , get_lightmap_scale : 0 as * mut sys :: godot_method_bind , get_lod_max_distance : 0 as * mut sys :: godot_method_bind , get_lod_max_hysteresis : 0 as * mut sys :: godot_method_bind , get_lod_min_distance : 0 as * mut sys :: godot_method_bind , get_lod_min_hysteresis : 0 as * mut sys :: godot_method_bind , get_material_overlay : 0 as * mut sys :: godot_method_bind , get_material_override : 0 as * mut sys :: godot_method_bind , set_cast_shadows_setting : 0 as * mut sys :: godot_method_bind , set_custom_aabb : 0 as * mut sys :: godot_method_bind , set_extra_cull_margin : 0 as * mut sys :: godot_method_bind , set_flag : 0 as * mut sys :: godot_method_bind , set_generate_lightmap : 0 as * mut sys :: godot_method_bind , set_lightmap_scale : 0 as * mut sys :: godot_method_bind , set_lod_max_distance : 0 as * mut sys :: godot_method_bind , set_lod_max_hysteresis : 0 as * mut sys :: godot_method_bind , set_lod_min_distance : 0 as * mut sys :: godot_method_bind , set_lod_min_hysteresis : 0 as * mut sys :: godot_method_bind , set_material_overlay : 0 as * mut sys :: godot_method_bind , set_material_override : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GeometryInstanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GeometryInstance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cast_shadows_setting = (gd_api . godot_method_bind_get_method) (class_name , "get_cast_shadows_setting\0" . as_ptr () as * const c_char) ; table . get_extra_cull_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_extra_cull_margin\0" . as_ptr () as * const c_char) ; table . get_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_flag\0" . as_ptr () as * const c_char) ; table . get_generate_lightmap = (gd_api . godot_method_bind_get_method) (class_name , "get_generate_lightmap\0" . as_ptr () as * const c_char) ; table . get_lightmap_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_lightmap_scale\0" . as_ptr () as * const c_char) ; table . get_lod_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_lod_max_distance\0" . as_ptr () as * const c_char) ; table . get_lod_max_hysteresis = (gd_api . godot_method_bind_get_method) (class_name , "get_lod_max_hysteresis\0" . as_ptr () as * const c_char) ; table . get_lod_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_lod_min_distance\0" . as_ptr () as * const c_char) ; table . get_lod_min_hysteresis = (gd_api . godot_method_bind_get_method) (class_name , "get_lod_min_hysteresis\0" . as_ptr () as * const c_char) ; table . get_material_overlay = (gd_api . godot_method_bind_get_method) (class_name , "get_material_overlay\0" . as_ptr () as * const c_char) ; table . get_material_override = (gd_api . godot_method_bind_get_method) (class_name , "get_material_override\0" . as_ptr () as * const c_char) ; table . set_cast_shadows_setting = (gd_api . godot_method_bind_get_method) (class_name , "set_cast_shadows_setting\0" . as_ptr () as * const c_char) ; table . set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_aabb\0" . as_ptr () as * const c_char) ; table . set_extra_cull_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_extra_cull_margin\0" . as_ptr () as * const c_char) ; table . set_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_flag\0" . as_ptr () as * const c_char) ; table . set_generate_lightmap = (gd_api . godot_method_bind_get_method) (class_name , "set_generate_lightmap\0" . as_ptr () as * const c_char) ; table . set_lightmap_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_lightmap_scale\0" . as_ptr () as * const c_char) ; table . set_lod_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_lod_max_distance\0" . as_ptr () as * const c_char) ; table . set_lod_max_hysteresis = (gd_api . godot_method_bind_get_method) (class_name , "set_lod_max_hysteresis\0" . as_ptr () as * const c_char) ; table . set_lod_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_lod_min_distance\0" . as_ptr () as * const c_char) ; table . set_lod_min_hysteresis = (gd_api . godot_method_bind_get_method) (class_name , "set_lod_min_hysteresis\0" . as_ptr () as * const c_char) ; table . set_material_overlay = (gd_api . godot_method_bind_get_method) (class_name , "set_material_overlay\0" . as_ptr () as * const c_char) ; table . set_material_override = (gd_api . godot_method_bind_get_method) (class_name , "set_material_override\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::geometry_instance::private::GeometryInstance;
            
            pub mod gradient {
                # ! [doc = "This module contains types related to the API class [`Gradient`][super::Gradient]."] pub (crate) mod private { # [doc = "`core class Gradient` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`gradient`][super::gradient] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gradient.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGradient inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Gradient { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Gradient ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct InterpolationMode (pub i64) ; impl InterpolationMode { pub const LINEAR : InterpolationMode = InterpolationMode (0i64) ; pub const CONSTANT : InterpolationMode = InterpolationMode (1i64) ; pub const CUBIC : InterpolationMode = InterpolationMode (2i64) ; } impl From < i64 > for InterpolationMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < InterpolationMode > for i64 { # [inline] fn from (v : InterpolationMode) -> Self { v . 0 } } impl FromVariant for InterpolationMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Gradient { pub const GRADIENT_INTERPOLATE_LINEAR : i64 = 0i64 ; pub const GRADIENT_INTERPOLATE_CONSTANT : i64 = 1i64 ; pub const GRADIENT_INTERPOLATE_CUBIC : i64 = 2i64 ; } impl Gradient { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GradientMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds the specified color to the end of the ramp, with the specified offset."] # [doc = ""] # [inline] pub fn add_point (& self , offset : f64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . add_point ; let ret = crate :: icalls :: icallvar__f64_color (method_bind , self . this . sys () . as_ptr () , offset as _ , color) ; } } # [doc = "Returns the color of the ramp color at index `point`."] # [doc = ""] # [inline] pub fn get_color (& self , point : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , point as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gradient's colors returned as a [`PoolColorArray`][PoolArray<Color>]."] # [doc = ""] # [inline] pub fn colors (& self) -> PoolArray < Color > { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . get_colors ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Color > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Defines how the colors between points of the gradient are interpolated. See [`InterpolationMode`][InterpolationMode] for available modes."] # [doc = ""] # [inline] pub fn interpolation_mode (& self) -> crate :: generated :: gradient :: InterpolationMode { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . get_interpolation_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: gradient :: InterpolationMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the offset of the ramp color at index `point`."] # [doc = ""] # [inline] pub fn get_offset (& self , point : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , point as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Gradient's offsets returned as a [`PoolRealArray`][PoolArray<f32>]."] # [doc = ""] # [inline] pub fn offsets (& self) -> PoolArray < f32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . get_offsets ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < f32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of colors in the ramp."] # [doc = ""] # [inline] pub fn get_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . get_point_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the interpolated color specified by `offset`."] # [doc = ""] # [inline] pub fn interpolate (& self , offset : f64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . interpolate ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , offset as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Removes the color at the index `point`."] # [doc = ""] # [inline] pub fn remove_point (& self , point : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . remove_point ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , point as _) ; } } # [doc = "Sets the color of the ramp color at index `point`."] # [doc = ""] # [inline] pub fn set_color (& self , point : i64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallvar__i64_color (method_bind , self . this . sys () . as_ptr () , point as _ , color) ; } } # [doc = "Gradient's colors returned as a [`PoolColorArray`][PoolArray<Color>]."] # [doc = ""] # [inline] pub fn set_colors (& self , colors : PoolArray < Color >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . set_colors ; let ret = crate :: icalls :: icallvar__colorarr (method_bind , self . this . sys () . as_ptr () , colors) ; } } # [doc = "Defines how the colors between points of the gradient are interpolated. See [`InterpolationMode`][InterpolationMode] for available modes."] # [doc = ""] # [inline] pub fn set_interpolation_mode (& self , interpolation_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . set_interpolation_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , interpolation_mode as _) ; } } # [doc = "Sets the offset for the ramp color at index `point`."] # [doc = ""] # [inline] pub fn set_offset (& self , point : i64 , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , point as _ , offset as _) ; } } # [doc = "Gradient's offsets returned as a [`PoolRealArray`][PoolArray<f32>]."] # [doc = ""] # [inline] pub fn set_offsets (& self , offsets : PoolArray < f32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientMethodTable :: get (get_api ()) . set_offsets ; let ret = crate :: icalls :: icallvar__f32arr (method_bind , self . this . sys () . as_ptr () , offsets) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Gradient { } unsafe impl GodotObject for Gradient { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Gradient" } } impl std :: ops :: Deref for Gradient { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Gradient { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Gradient { } unsafe impl SubClass < crate :: generated :: Reference > for Gradient { } unsafe impl SubClass < crate :: generated :: Object > for Gradient { } impl Instanciable for Gradient { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Gradient :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GradientMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_point : * mut sys :: godot_method_bind , pub get_color : * mut sys :: godot_method_bind , pub get_colors : * mut sys :: godot_method_bind , pub get_interpolation_mode : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_offsets : * mut sys :: godot_method_bind , pub get_point_count : * mut sys :: godot_method_bind , pub interpolate : * mut sys :: godot_method_bind , pub remove_point : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_colors : * mut sys :: godot_method_bind , pub set_interpolation_mode : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_offsets : * mut sys :: godot_method_bind } impl GradientMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GradientMethodTable = GradientMethodTable { class_constructor : None , add_point : 0 as * mut sys :: godot_method_bind , get_color : 0 as * mut sys :: godot_method_bind , get_colors : 0 as * mut sys :: godot_method_bind , get_interpolation_mode : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_offsets : 0 as * mut sys :: godot_method_bind , get_point_count : 0 as * mut sys :: godot_method_bind , interpolate : 0 as * mut sys :: godot_method_bind , remove_point : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_colors : 0 as * mut sys :: godot_method_bind , set_interpolation_mode : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_offsets : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GradientMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Gradient\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_point = (gd_api . godot_method_bind_get_method) (class_name , "add_point\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_colors = (gd_api . godot_method_bind_get_method) (class_name , "get_colors\0" . as_ptr () as * const c_char) ; table . get_interpolation_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_interpolation_mode\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_offsets = (gd_api . godot_method_bind_get_method) (class_name , "get_offsets\0" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\0" . as_ptr () as * const c_char) ; table . interpolate = (gd_api . godot_method_bind_get_method) (class_name , "interpolate\0" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_colors = (gd_api . godot_method_bind_get_method) (class_name , "set_colors\0" . as_ptr () as * const c_char) ; table . set_interpolation_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_interpolation_mode\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_offsets = (gd_api . godot_method_bind_get_method) (class_name , "set_offsets\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gradient::private::Gradient;
            
            pub(crate) mod gradient_texture {
                # ! [doc = "This module contains types related to the API class [`GradientTexture`][super::GradientTexture]."] pub (crate) mod private { # [doc = "`core class GradientTexture` inherits `Texture` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gradienttexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGradientTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GradientTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GradientTexture ; impl GradientTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GradientTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [`Gradient`][Gradient] that will be used to fill the texture."] # [doc = ""] # [inline] pub fn gradient (& self) -> Option < Ref < crate :: generated :: Gradient , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTextureMethodTable :: get (get_api ()) . get_gradient ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Gradient , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Gradient`][Gradient] that will be used to fill the texture."] # [doc = ""] # [inline] pub fn set_gradient (& self , gradient : impl AsArg < crate :: generated :: Gradient >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTextureMethodTable :: get (get_api ()) . set_gradient ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , gradient . as_arg_ptr ()) ; } } # [doc = "The number of color samples that will be obtained from the [`Gradient`][Gradient]."] # [doc = ""] # [inline] pub fn set_width (& self , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTextureMethodTable :: get (get_api ()) . set_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , width as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GradientTexture { } unsafe impl GodotObject for GradientTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GradientTexture" } } impl std :: ops :: Deref for GradientTexture { type Target = crate :: generated :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GradientTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Texture > for GradientTexture { } unsafe impl SubClass < crate :: generated :: Resource > for GradientTexture { } unsafe impl SubClass < crate :: generated :: Reference > for GradientTexture { } unsafe impl SubClass < crate :: generated :: Object > for GradientTexture { } impl Instanciable for GradientTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GradientTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GradientTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_gradient : * mut sys :: godot_method_bind , pub set_gradient : * mut sys :: godot_method_bind , pub set_width : * mut sys :: godot_method_bind } impl GradientTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GradientTextureMethodTable = GradientTextureMethodTable { class_constructor : None , get_gradient : 0 as * mut sys :: godot_method_bind , set_gradient : 0 as * mut sys :: godot_method_bind , set_width : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GradientTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GradientTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_gradient = (gd_api . godot_method_bind_get_method) (class_name , "get_gradient\0" . as_ptr () as * const c_char) ; table . set_gradient = (gd_api . godot_method_bind_get_method) (class_name , "set_gradient\0" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gradient_texture::private::GradientTexture;
            
            pub mod gradient_texture_2d {
                # ! [doc = "This module contains types related to the API class [`GradientTexture2D`][super::GradientTexture2D]."] pub (crate) mod private { # [doc = "`core class GradientTexture2D` inherits `Texture` (reference-counted).\n\nThis class has related types in the [`gradient_texture_2d`][super::gradient_texture_2d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gradienttexture2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nGradientTexture2D inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GradientTexture2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GradientTexture2D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Fill (pub i64) ; impl Fill { pub const LINEAR : Fill = Fill (0i64) ; pub const RADIAL : Fill = Fill (1i64) ; } impl From < i64 > for Fill { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Fill > for i64 { # [inline] fn from (v : Fill) -> Self { v . 0 } } impl FromVariant for Fill { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Repeat (pub i64) ; impl Repeat { pub const REPEAT_NONE : Repeat = Repeat (0i64) ; pub const REPEAT : Repeat = Repeat (1i64) ; pub const REPEAT_MIRROR : Repeat = Repeat (2i64) ; } impl From < i64 > for Repeat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Repeat > for i64 { # [inline] fn from (v : Repeat) -> Self { v . 0 } } impl FromVariant for Repeat { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl GradientTexture2D { pub const FILL_LINEAR : i64 = 0i64 ; pub const REPEAT_NONE : i64 = 0i64 ; pub const FILL_RADIAL : i64 = 1i64 ; pub const REPEAT : i64 = 1i64 ; pub const REPEAT_MIRROR : i64 = 2i64 ; } impl GradientTexture2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GradientTexture2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The gradient fill type, one of the [`Fill`][Fill] values. The texture is filled by interpolating colors starting from [`fill_from`][Self::fill_from] to [`fill_to`][Self::fill_to] offsets."] # [doc = ""] # [inline] pub fn fill (& self) -> crate :: generated :: gradient_texture_2d :: Fill { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTexture2DMethodTable :: get (get_api ()) . get_fill ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: gradient_texture_2d :: Fill > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The initial offset used to fill the texture specified in UV coordinates."] # [doc = ""] # [inline] pub fn fill_from (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTexture2DMethodTable :: get (get_api ()) . get_fill_from ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The final offset used to fill the texture specified in UV coordinates."] # [doc = ""] # [inline] pub fn fill_to (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTexture2DMethodTable :: get (get_api ()) . get_fill_to ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Gradient`][Gradient] used to fill the texture."] # [doc = ""] # [inline] pub fn gradient (& self) -> Option < Ref < crate :: generated :: Gradient , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTexture2DMethodTable :: get (get_api ()) . get_gradient ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Gradient , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The gradient repeat type, one of the [`Repeat`][Repeat] values. The texture is filled starting from [`fill_from`][Self::fill_from] to [`fill_to`][Self::fill_to] offsets by default, but the gradient fill can be repeated to cover the entire texture."] # [doc = ""] # [inline] pub fn repeat (& self) -> crate :: generated :: gradient_texture_2d :: Repeat { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTexture2DMethodTable :: get (get_api ()) . get_repeat ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: gradient_texture_2d :: Repeat > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the generated texture will support high dynamic range ([`Image.FORMAT_RGBAF`][Image::FORMAT_RGBAF] format). This allows for glow effects to work if [`Environment.glow_enabled`][Environment::glow_enabled] is `true`. If `false`, the generated texture will use low dynamic range; overbright colors will be clamped ([`Image.FORMAT_RGBA8`][Image::FORMAT_RGBA8] format)."] # [doc = ""] # [inline] pub fn is_using_hdr (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTexture2DMethodTable :: get (get_api ()) . is_using_hdr ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The gradient fill type, one of the [`Fill`][Fill] values. The texture is filled by interpolating colors starting from [`fill_from`][Self::fill_from] to [`fill_to`][Self::fill_to] offsets."] # [doc = ""] # [inline] pub fn set_fill (& self , fill : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTexture2DMethodTable :: get (get_api ()) . set_fill ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , fill as _) ; } } # [doc = "The initial offset used to fill the texture specified in UV coordinates."] # [doc = ""] # [inline] pub fn set_fill_from (& self , fill_from : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTexture2DMethodTable :: get (get_api ()) . set_fill_from ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , fill_from) ; } } # [doc = "The final offset used to fill the texture specified in UV coordinates."] # [doc = ""] # [inline] pub fn set_fill_to (& self , fill_to : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTexture2DMethodTable :: get (get_api ()) . set_fill_to ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , fill_to) ; } } # [doc = "The [`Gradient`][Gradient] used to fill the texture."] # [doc = ""] # [inline] pub fn set_gradient (& self , gradient : impl AsArg < crate :: generated :: Gradient >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTexture2DMethodTable :: get (get_api ()) . set_gradient ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , gradient . as_arg_ptr ()) ; } } # [doc = "The number of vertical color samples that will be obtained from the [`Gradient`][Gradient], which also represents the texture's height."] # [doc = ""] # [inline] pub fn set_height (& self , height : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTexture2DMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = "The gradient repeat type, one of the [`Repeat`][Repeat] values. The texture is filled starting from [`fill_from`][Self::fill_from] to [`fill_to`][Self::fill_to] offsets by default, but the gradient fill can be repeated to cover the entire texture."] # [doc = ""] # [inline] pub fn set_repeat (& self , repeat : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTexture2DMethodTable :: get (get_api ()) . set_repeat ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , repeat as _) ; } } # [doc = "If `true`, the generated texture will support high dynamic range ([`Image.FORMAT_RGBAF`][Image::FORMAT_RGBAF] format). This allows for glow effects to work if [`Environment.glow_enabled`][Environment::glow_enabled] is `true`. If `false`, the generated texture will use low dynamic range; overbright colors will be clamped ([`Image.FORMAT_RGBA8`][Image::FORMAT_RGBA8] format)."] # [doc = ""] # [inline] pub fn set_use_hdr (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTexture2DMethodTable :: get (get_api ()) . set_use_hdr ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The number of horizontal color samples that will be obtained from the [`Gradient`][Gradient], which also represents the texture's width."] # [doc = ""] # [inline] pub fn set_width (& self , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GradientTexture2DMethodTable :: get (get_api ()) . set_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , width as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GradientTexture2D { } unsafe impl GodotObject for GradientTexture2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "GradientTexture2D" } } impl std :: ops :: Deref for GradientTexture2D { type Target = crate :: generated :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GradientTexture2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Texture > for GradientTexture2D { } unsafe impl SubClass < crate :: generated :: Resource > for GradientTexture2D { } unsafe impl SubClass < crate :: generated :: Reference > for GradientTexture2D { } unsafe impl SubClass < crate :: generated :: Object > for GradientTexture2D { } impl Instanciable for GradientTexture2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GradientTexture2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GradientTexture2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_fill : * mut sys :: godot_method_bind , pub get_fill_from : * mut sys :: godot_method_bind , pub get_fill_to : * mut sys :: godot_method_bind , pub get_gradient : * mut sys :: godot_method_bind , pub get_repeat : * mut sys :: godot_method_bind , pub is_using_hdr : * mut sys :: godot_method_bind , pub set_fill : * mut sys :: godot_method_bind , pub set_fill_from : * mut sys :: godot_method_bind , pub set_fill_to : * mut sys :: godot_method_bind , pub set_gradient : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_repeat : * mut sys :: godot_method_bind , pub set_use_hdr : * mut sys :: godot_method_bind , pub set_width : * mut sys :: godot_method_bind } impl GradientTexture2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GradientTexture2DMethodTable = GradientTexture2DMethodTable { class_constructor : None , get_fill : 0 as * mut sys :: godot_method_bind , get_fill_from : 0 as * mut sys :: godot_method_bind , get_fill_to : 0 as * mut sys :: godot_method_bind , get_gradient : 0 as * mut sys :: godot_method_bind , get_repeat : 0 as * mut sys :: godot_method_bind , is_using_hdr : 0 as * mut sys :: godot_method_bind , set_fill : 0 as * mut sys :: godot_method_bind , set_fill_from : 0 as * mut sys :: godot_method_bind , set_fill_to : 0 as * mut sys :: godot_method_bind , set_gradient : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_repeat : 0 as * mut sys :: godot_method_bind , set_use_hdr : 0 as * mut sys :: godot_method_bind , set_width : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GradientTexture2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GradientTexture2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_fill = (gd_api . godot_method_bind_get_method) (class_name , "get_fill\0" . as_ptr () as * const c_char) ; table . get_fill_from = (gd_api . godot_method_bind_get_method) (class_name , "get_fill_from\0" . as_ptr () as * const c_char) ; table . get_fill_to = (gd_api . godot_method_bind_get_method) (class_name , "get_fill_to\0" . as_ptr () as * const c_char) ; table . get_gradient = (gd_api . godot_method_bind_get_method) (class_name , "get_gradient\0" . as_ptr () as * const c_char) ; table . get_repeat = (gd_api . godot_method_bind_get_method) (class_name , "get_repeat\0" . as_ptr () as * const c_char) ; table . is_using_hdr = (gd_api . godot_method_bind_get_method) (class_name , "is_using_hdr\0" . as_ptr () as * const c_char) ; table . set_fill = (gd_api . godot_method_bind_get_method) (class_name , "set_fill\0" . as_ptr () as * const c_char) ; table . set_fill_from = (gd_api . godot_method_bind_get_method) (class_name , "set_fill_from\0" . as_ptr () as * const c_char) ; table . set_fill_to = (gd_api . godot_method_bind_get_method) (class_name , "set_fill_to\0" . as_ptr () as * const c_char) ; table . set_gradient = (gd_api . godot_method_bind_get_method) (class_name , "set_gradient\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_repeat = (gd_api . godot_method_bind_get_method) (class_name , "set_repeat\0" . as_ptr () as * const c_char) ; table . set_use_hdr = (gd_api . godot_method_bind_get_method) (class_name , "set_use_hdr\0" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::gradient_texture_2d::private::GradientTexture2D;
            
            pub(crate) mod graph_edit {
                # ! [doc = "This module contains types related to the API class [`GraphEdit`][super::GraphEdit]."] pub (crate) mod private { # [doc = "`core class GraphEdit` inherits `Control` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_graphedit.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`GraphEdit` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<GraphEdit>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nGraphEdit inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GraphEdit { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GraphEdit ; impl GraphEdit { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GraphEditMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Makes possible the connection between two different slot types. The type is defined with the [`GraphNode.set_slot`][GraphNode::set_slot] method."] # [doc = ""] # [inline] pub fn add_valid_connection_type (& self , from_type : i64 , to_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . add_valid_connection_type ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , from_type as _ , to_type as _) ; } } # [doc = "Makes possible to disconnect nodes when dragging from the slot at the left if it has the specified type."] # [doc = ""] # [inline] pub fn add_valid_left_disconnect_type (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . add_valid_left_disconnect_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } # [doc = "Makes possible to disconnect nodes when dragging from the slot at the right if it has the specified type."] # [doc = ""] # [inline] pub fn add_valid_right_disconnect_type (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . add_valid_right_disconnect_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } # [doc = "Removes all connections between nodes."] # [doc = ""] # [inline] pub fn clear_connections (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . clear_connections ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Create a connection between the `from_port` slot of the `from` GraphNode and the `to_port` slot of the `to` GraphNode. If the connection already exists, no connection is created."] # [doc = ""] # [inline] pub fn connect_node (& self , from : impl Into < GodotString > , from_port : i64 , to : impl Into < GodotString > , to_port : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . connect_node ; let ret = crate :: icalls :: icallvar__str_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , from . into () , from_port as _ , to . into () , to_port as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Removes the connection between the `from_port` slot of the `from` GraphNode and the `to_port` slot of the `to` GraphNode. If the connection does not exist, no connection is removed."] # [doc = ""] # [inline] pub fn disconnect_node (& self , from : impl Into < GodotString > , from_port : i64 , to : impl Into < GodotString > , to_port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . disconnect_node ; let ret = crate :: icalls :: icallvar__str_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , from . into () , from_port as _ , to . into () , to_port as _) ; } } # [doc = "Returns an Array containing the list of connections. A connection consists in a structure of the form `{ from_port: 0, from: \"GraphNode name 0\", to_port: 1, to: \"GraphNode name 1\" }`."] # [doc = ""] # [inline] pub fn get_connection_list (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . get_connection_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The opacity of the minimap rectangle."] # [doc = ""] # [inline] pub fn minimap_opacity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . get_minimap_opacity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The size of the minimap rectangle. The map itself is based on the size of the grid area and is scaled to fit this rectangle."] # [doc = ""] # [inline] pub fn minimap_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . get_minimap_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The scroll offset."] # [doc = ""] # [inline] pub fn scroll_ofs (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . get_scroll_ofs ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The snapping distance in pixels."] # [doc = ""] # [inline] pub fn snap (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . get_snap ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The current zoom value."] # [doc = ""] # [inline] pub fn zoom (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . get_zoom ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Gets the [`HBoxContainer`][HBoxContainer] that contains the zooming and grid snap controls in the top left of the graph. You can use this method to reposition the toolbar or to add your own custom controls to it.\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_zoom_hbox (& self) -> Option < Ref < crate :: generated :: HBoxContainer , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . get_zoom_hbox ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: HBoxContainer , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The upper zoom limit."] # [doc = ""] # [inline] pub fn zoom_max (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . get_zoom_max ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The lower zoom limit."] # [doc = ""] # [inline] pub fn zoom_min (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . get_zoom_min ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The step of each zoom level."] # [doc = ""] # [inline] pub fn zoom_step (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . get_zoom_step ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the minimap is visible."] # [doc = ""] # [inline] pub fn is_minimap_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . is_minimap_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the `from_port` slot of the `from` GraphNode is connected to the `to_port` slot of the `to` GraphNode."] # [doc = ""] # [inline] pub fn is_node_connected (& self , from : impl Into < GodotString > , from_port : i64 , to : impl Into < GodotString > , to_port : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . is_node_connected ; let ret = crate :: icalls :: icallvar__str_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , from . into () , from_port as _ , to . into () , to_port as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, enables disconnection of existing connections in the GraphEdit by dragging the right end."] # [doc = ""] # [inline] pub fn is_right_disconnects_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . is_right_disconnects_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, makes a label with the current zoom level visible. The zoom value is displayed in percents."] # [doc = ""] # [inline] pub fn is_showing_zoom_label (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . is_showing_zoom_label ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, enables snapping."] # [doc = ""] # [inline] pub fn is_using_snap (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . is_using_snap ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether it's possible to connect slots of the specified types."] # [doc = ""] # [inline] pub fn is_valid_connection_type (& self , from_type : i64 , to_type : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . is_valid_connection_type ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , from_type as _ , to_type as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Makes it not possible to connect between two different slot types. The type is defined with the [`GraphNode.set_slot`][GraphNode::set_slot] method."] # [doc = ""] # [inline] pub fn remove_valid_connection_type (& self , from_type : i64 , to_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . remove_valid_connection_type ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , from_type as _ , to_type as _) ; } } # [doc = "Removes the possibility to disconnect nodes when dragging from the slot at the left if it has the specified type."] # [doc = ""] # [inline] pub fn remove_valid_left_disconnect_type (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . remove_valid_left_disconnect_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } # [doc = "Removes the possibility to disconnect nodes when dragging from the slot at the right if it has the specified type."] # [doc = ""] # [inline] pub fn remove_valid_right_disconnect_type (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . remove_valid_right_disconnect_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } # [doc = "Sets the coloration of the connection between `from`'s `from_port` and `to`'s `to_port` with the color provided in the `activity` theme property."] # [doc = ""] # [inline] pub fn set_connection_activity (& self , from : impl Into < GodotString > , from_port : i64 , to : impl Into < GodotString > , to_port : i64 , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . set_connection_activity ; let ret = crate :: icalls :: icallvar__str_i64_str_i64_f64 (method_bind , self . this . sys () . as_ptr () , from . into () , from_port as _ , to . into () , to_port as _ , amount as _) ; } } # [doc = "If `true`, the minimap is visible."] # [doc = ""] # [inline] pub fn set_minimap_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . set_minimap_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The opacity of the minimap rectangle."] # [doc = ""] # [inline] pub fn set_minimap_opacity (& self , p_opacity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . set_minimap_opacity ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , p_opacity as _) ; } } # [doc = "The size of the minimap rectangle. The map itself is based on the size of the grid area and is scaled to fit this rectangle."] # [doc = ""] # [inline] pub fn set_minimap_size (& self , p_size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . set_minimap_size ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , p_size) ; } } # [doc = "If `true`, enables disconnection of existing connections in the GraphEdit by dragging the right end."] # [doc = ""] # [inline] pub fn set_right_disconnects (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . set_right_disconnects ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The scroll offset."] # [doc = ""] # [inline] pub fn set_scroll_ofs (& self , ofs : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . set_scroll_ofs ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } # [doc = "Sets the specified `node` as the one selected."] # [doc = ""] # [inline] pub fn set_selected (& self , node : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . set_selected ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "If `true`, makes a label with the current zoom level visible. The zoom value is displayed in percents."] # [doc = ""] # [inline] pub fn set_show_zoom_label (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . set_show_zoom_label ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The snapping distance in pixels."] # [doc = ""] # [inline] pub fn set_snap (& self , pixels : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . set_snap ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , pixels as _) ; } } # [doc = "If `true`, enables snapping."] # [doc = ""] # [inline] pub fn set_use_snap (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . set_use_snap ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The current zoom value."] # [doc = ""] # [inline] pub fn set_zoom (& self , p_zoom : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . set_zoom ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , p_zoom as _) ; } } # [doc = "The upper zoom limit."] # [doc = ""] # [inline] pub fn set_zoom_max (& self , zoom_max : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . set_zoom_max ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , zoom_max as _) ; } } # [doc = "The lower zoom limit."] # [doc = ""] # [inline] pub fn set_zoom_min (& self , zoom_min : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . set_zoom_min ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , zoom_min as _) ; } } # [doc = "The step of each zoom level."] # [doc = ""] # [inline] pub fn set_zoom_step (& self , zoom_step : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphEditMethodTable :: get (get_api ()) . set_zoom_step ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , zoom_step as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GraphEdit { } unsafe impl GodotObject for GraphEdit { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "GraphEdit" } } impl QueueFree for GraphEdit { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for GraphEdit { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GraphEdit { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for GraphEdit { } unsafe impl SubClass < crate :: generated :: CanvasItem > for GraphEdit { } unsafe impl SubClass < crate :: generated :: Node > for GraphEdit { } unsafe impl SubClass < crate :: generated :: Object > for GraphEdit { } impl Instanciable for GraphEdit { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GraphEdit :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GraphEditMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_valid_connection_type : * mut sys :: godot_method_bind , pub add_valid_left_disconnect_type : * mut sys :: godot_method_bind , pub add_valid_right_disconnect_type : * mut sys :: godot_method_bind , pub clear_connections : * mut sys :: godot_method_bind , pub connect_node : * mut sys :: godot_method_bind , pub disconnect_node : * mut sys :: godot_method_bind , pub get_connection_list : * mut sys :: godot_method_bind , pub get_minimap_opacity : * mut sys :: godot_method_bind , pub get_minimap_size : * mut sys :: godot_method_bind , pub get_scroll_ofs : * mut sys :: godot_method_bind , pub get_snap : * mut sys :: godot_method_bind , pub get_zoom : * mut sys :: godot_method_bind , pub get_zoom_hbox : * mut sys :: godot_method_bind , pub get_zoom_max : * mut sys :: godot_method_bind , pub get_zoom_min : * mut sys :: godot_method_bind , pub get_zoom_step : * mut sys :: godot_method_bind , pub is_minimap_enabled : * mut sys :: godot_method_bind , pub is_node_connected : * mut sys :: godot_method_bind , pub is_right_disconnects_enabled : * mut sys :: godot_method_bind , pub is_showing_zoom_label : * mut sys :: godot_method_bind , pub is_using_snap : * mut sys :: godot_method_bind , pub is_valid_connection_type : * mut sys :: godot_method_bind , pub remove_valid_connection_type : * mut sys :: godot_method_bind , pub remove_valid_left_disconnect_type : * mut sys :: godot_method_bind , pub remove_valid_right_disconnect_type : * mut sys :: godot_method_bind , pub set_connection_activity : * mut sys :: godot_method_bind , pub set_minimap_enabled : * mut sys :: godot_method_bind , pub set_minimap_opacity : * mut sys :: godot_method_bind , pub set_minimap_size : * mut sys :: godot_method_bind , pub set_right_disconnects : * mut sys :: godot_method_bind , pub set_scroll_ofs : * mut sys :: godot_method_bind , pub set_selected : * mut sys :: godot_method_bind , pub set_show_zoom_label : * mut sys :: godot_method_bind , pub set_snap : * mut sys :: godot_method_bind , pub set_use_snap : * mut sys :: godot_method_bind , pub set_zoom : * mut sys :: godot_method_bind , pub set_zoom_max : * mut sys :: godot_method_bind , pub set_zoom_min : * mut sys :: godot_method_bind , pub set_zoom_step : * mut sys :: godot_method_bind } impl GraphEditMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GraphEditMethodTable = GraphEditMethodTable { class_constructor : None , add_valid_connection_type : 0 as * mut sys :: godot_method_bind , add_valid_left_disconnect_type : 0 as * mut sys :: godot_method_bind , add_valid_right_disconnect_type : 0 as * mut sys :: godot_method_bind , clear_connections : 0 as * mut sys :: godot_method_bind , connect_node : 0 as * mut sys :: godot_method_bind , disconnect_node : 0 as * mut sys :: godot_method_bind , get_connection_list : 0 as * mut sys :: godot_method_bind , get_minimap_opacity : 0 as * mut sys :: godot_method_bind , get_minimap_size : 0 as * mut sys :: godot_method_bind , get_scroll_ofs : 0 as * mut sys :: godot_method_bind , get_snap : 0 as * mut sys :: godot_method_bind , get_zoom : 0 as * mut sys :: godot_method_bind , get_zoom_hbox : 0 as * mut sys :: godot_method_bind , get_zoom_max : 0 as * mut sys :: godot_method_bind , get_zoom_min : 0 as * mut sys :: godot_method_bind , get_zoom_step : 0 as * mut sys :: godot_method_bind , is_minimap_enabled : 0 as * mut sys :: godot_method_bind , is_node_connected : 0 as * mut sys :: godot_method_bind , is_right_disconnects_enabled : 0 as * mut sys :: godot_method_bind , is_showing_zoom_label : 0 as * mut sys :: godot_method_bind , is_using_snap : 0 as * mut sys :: godot_method_bind , is_valid_connection_type : 0 as * mut sys :: godot_method_bind , remove_valid_connection_type : 0 as * mut sys :: godot_method_bind , remove_valid_left_disconnect_type : 0 as * mut sys :: godot_method_bind , remove_valid_right_disconnect_type : 0 as * mut sys :: godot_method_bind , set_connection_activity : 0 as * mut sys :: godot_method_bind , set_minimap_enabled : 0 as * mut sys :: godot_method_bind , set_minimap_opacity : 0 as * mut sys :: godot_method_bind , set_minimap_size : 0 as * mut sys :: godot_method_bind , set_right_disconnects : 0 as * mut sys :: godot_method_bind , set_scroll_ofs : 0 as * mut sys :: godot_method_bind , set_selected : 0 as * mut sys :: godot_method_bind , set_show_zoom_label : 0 as * mut sys :: godot_method_bind , set_snap : 0 as * mut sys :: godot_method_bind , set_use_snap : 0 as * mut sys :: godot_method_bind , set_zoom : 0 as * mut sys :: godot_method_bind , set_zoom_max : 0 as * mut sys :: godot_method_bind , set_zoom_min : 0 as * mut sys :: godot_method_bind , set_zoom_step : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GraphEditMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GraphEdit\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_valid_connection_type = (gd_api . godot_method_bind_get_method) (class_name , "add_valid_connection_type\0" . as_ptr () as * const c_char) ; table . add_valid_left_disconnect_type = (gd_api . godot_method_bind_get_method) (class_name , "add_valid_left_disconnect_type\0" . as_ptr () as * const c_char) ; table . add_valid_right_disconnect_type = (gd_api . godot_method_bind_get_method) (class_name , "add_valid_right_disconnect_type\0" . as_ptr () as * const c_char) ; table . clear_connections = (gd_api . godot_method_bind_get_method) (class_name , "clear_connections\0" . as_ptr () as * const c_char) ; table . connect_node = (gd_api . godot_method_bind_get_method) (class_name , "connect_node\0" . as_ptr () as * const c_char) ; table . disconnect_node = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_node\0" . as_ptr () as * const c_char) ; table . get_connection_list = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_list\0" . as_ptr () as * const c_char) ; table . get_minimap_opacity = (gd_api . godot_method_bind_get_method) (class_name , "get_minimap_opacity\0" . as_ptr () as * const c_char) ; table . get_minimap_size = (gd_api . godot_method_bind_get_method) (class_name , "get_minimap_size\0" . as_ptr () as * const c_char) ; table . get_scroll_ofs = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll_ofs\0" . as_ptr () as * const c_char) ; table . get_snap = (gd_api . godot_method_bind_get_method) (class_name , "get_snap\0" . as_ptr () as * const c_char) ; table . get_zoom = (gd_api . godot_method_bind_get_method) (class_name , "get_zoom\0" . as_ptr () as * const c_char) ; table . get_zoom_hbox = (gd_api . godot_method_bind_get_method) (class_name , "get_zoom_hbox\0" . as_ptr () as * const c_char) ; table . get_zoom_max = (gd_api . godot_method_bind_get_method) (class_name , "get_zoom_max\0" . as_ptr () as * const c_char) ; table . get_zoom_min = (gd_api . godot_method_bind_get_method) (class_name , "get_zoom_min\0" . as_ptr () as * const c_char) ; table . get_zoom_step = (gd_api . godot_method_bind_get_method) (class_name , "get_zoom_step\0" . as_ptr () as * const c_char) ; table . is_minimap_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_minimap_enabled\0" . as_ptr () as * const c_char) ; table . is_node_connected = (gd_api . godot_method_bind_get_method) (class_name , "is_node_connected\0" . as_ptr () as * const c_char) ; table . is_right_disconnects_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_right_disconnects_enabled\0" . as_ptr () as * const c_char) ; table . is_showing_zoom_label = (gd_api . godot_method_bind_get_method) (class_name , "is_showing_zoom_label\0" . as_ptr () as * const c_char) ; table . is_using_snap = (gd_api . godot_method_bind_get_method) (class_name , "is_using_snap\0" . as_ptr () as * const c_char) ; table . is_valid_connection_type = (gd_api . godot_method_bind_get_method) (class_name , "is_valid_connection_type\0" . as_ptr () as * const c_char) ; table . remove_valid_connection_type = (gd_api . godot_method_bind_get_method) (class_name , "remove_valid_connection_type\0" . as_ptr () as * const c_char) ; table . remove_valid_left_disconnect_type = (gd_api . godot_method_bind_get_method) (class_name , "remove_valid_left_disconnect_type\0" . as_ptr () as * const c_char) ; table . remove_valid_right_disconnect_type = (gd_api . godot_method_bind_get_method) (class_name , "remove_valid_right_disconnect_type\0" . as_ptr () as * const c_char) ; table . set_connection_activity = (gd_api . godot_method_bind_get_method) (class_name , "set_connection_activity\0" . as_ptr () as * const c_char) ; table . set_minimap_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_minimap_enabled\0" . as_ptr () as * const c_char) ; table . set_minimap_opacity = (gd_api . godot_method_bind_get_method) (class_name , "set_minimap_opacity\0" . as_ptr () as * const c_char) ; table . set_minimap_size = (gd_api . godot_method_bind_get_method) (class_name , "set_minimap_size\0" . as_ptr () as * const c_char) ; table . set_right_disconnects = (gd_api . godot_method_bind_get_method) (class_name , "set_right_disconnects\0" . as_ptr () as * const c_char) ; table . set_scroll_ofs = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_ofs\0" . as_ptr () as * const c_char) ; table . set_selected = (gd_api . godot_method_bind_get_method) (class_name , "set_selected\0" . as_ptr () as * const c_char) ; table . set_show_zoom_label = (gd_api . godot_method_bind_get_method) (class_name , "set_show_zoom_label\0" . as_ptr () as * const c_char) ; table . set_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_snap\0" . as_ptr () as * const c_char) ; table . set_use_snap = (gd_api . godot_method_bind_get_method) (class_name , "set_use_snap\0" . as_ptr () as * const c_char) ; table . set_zoom = (gd_api . godot_method_bind_get_method) (class_name , "set_zoom\0" . as_ptr () as * const c_char) ; table . set_zoom_max = (gd_api . godot_method_bind_get_method) (class_name , "set_zoom_max\0" . as_ptr () as * const c_char) ; table . set_zoom_min = (gd_api . godot_method_bind_get_method) (class_name , "set_zoom_min\0" . as_ptr () as * const c_char) ; table . set_zoom_step = (gd_api . godot_method_bind_get_method) (class_name , "set_zoom_step\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::graph_edit::private::GraphEdit;
            
            pub mod graph_node {
                # ! [doc = "This module contains types related to the API class [`GraphNode`][super::GraphNode]."] pub (crate) mod private { # [doc = "`core class GraphNode` inherits `Container` (manually managed).\n\nThis class has related types in the [`graph_node`][super::graph_node] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_graphnode.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`GraphNode` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<GraphNode>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nGraphNode inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GraphNode { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GraphNode ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Overlay (pub i64) ; impl Overlay { pub const DISABLED : Overlay = Overlay (0i64) ; pub const BREAKPOINT : Overlay = Overlay (1i64) ; pub const POSITION : Overlay = Overlay (2i64) ; } impl From < i64 > for Overlay { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Overlay > for i64 { # [inline] fn from (v : Overlay) -> Self { v . 0 } } impl FromVariant for Overlay { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl GraphNode { pub const OVERLAY_DISABLED : i64 = 0i64 ; pub const OVERLAY_BREAKPOINT : i64 = 1i64 ; pub const OVERLAY_POSITION : i64 = 2i64 ; } impl GraphNode { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GraphNodeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Disables all input and output slots of the GraphNode."] # [doc = ""] # [inline] pub fn clear_all_slots (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . clear_all_slots ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Disables input and output slot whose index is `idx`."] # [doc = ""] # [inline] pub fn clear_slot (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . clear_slot ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; } } # [doc = "Returns the [`Color`][Color] of the input connection `idx`."] # [doc = ""] # [inline] pub fn get_connection_input_color (& self , idx : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_input_color ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of enabled input slots (connections) to the GraphNode."] # [doc = ""] # [inline] pub fn get_connection_input_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_input_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the position of the input connection `idx`."] # [doc = ""] # [inline] pub fn get_connection_input_position (& self , idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_input_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the type of the input connection `idx`."] # [doc = ""] # [inline] pub fn get_connection_input_type (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_input_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`Color`][Color] of the output connection `idx`."] # [doc = ""] # [inline] pub fn get_connection_output_color (& self , idx : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_output_color ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of enabled output slots (connections) of the GraphNode."] # [doc = ""] # [inline] pub fn get_connection_output_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_output_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the position of the output connection `idx`."] # [doc = ""] # [inline] pub fn get_connection_output_position (& self , idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_output_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the type of the output connection `idx`."] # [doc = ""] # [inline] pub fn get_connection_output_type (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_connection_output_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The offset of the GraphNode, relative to the scroll offset of the [`GraphEdit`][GraphEdit].\n**Note:** You cannot use position directly, as [`GraphEdit`][GraphEdit] is a [`Container`][Container]."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the overlay shown above the GraphNode. See [`Overlay`][Overlay]."] # [doc = ""] # [inline] pub fn overlay (& self) -> crate :: generated :: graph_node :: Overlay { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_overlay ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: graph_node :: Overlay > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the left (input) [`Color`][Color] of the slot `idx`."] # [doc = ""] # [inline] pub fn get_slot_color_left (& self , idx : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_slot_color_left ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the right (output) [`Color`][Color] of the slot `idx`."] # [doc = ""] # [inline] pub fn get_slot_color_right (& self , idx : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_slot_color_right ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the left (input) type of the slot `idx`."] # [doc = ""] # [inline] pub fn get_slot_type_left (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_slot_type_left ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the right (output) type of the slot `idx`."] # [doc = ""] # [inline] pub fn get_slot_type_right (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_slot_type_right ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The text displayed in the GraphNode's title bar."] # [doc = ""] # [inline] pub fn title (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . get_title ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the close button will be visible.\n**Note:** Pressing it will only emit the `close_request` signal, the GraphNode needs to be removed manually."] # [doc = ""] # [inline] pub fn is_close_button_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . is_close_button_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the GraphNode is a comment node."] # [doc = ""] # [inline] pub fn is_comment (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . is_comment ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the user can resize the GraphNode.\n**Note:** Dragging the handle will only emit the `resize_request` signal, the GraphNode needs to be resized manually."] # [doc = ""] # [inline] pub fn is_resizable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . is_resizable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the GraphNode is selected."] # [doc = ""] # [inline] pub fn is_selected (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . is_selected ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if left (input) side of the slot `idx` is enabled."] # [doc = ""] # [inline] pub fn is_slot_enabled_left (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . is_slot_enabled_left ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if right (output) side of the slot `idx` is enabled."] # [doc = ""] # [inline] pub fn is_slot_enabled_right (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . is_slot_enabled_right ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the GraphNode is a comment node."] # [doc = ""] # [inline] pub fn set_comment (& self , comment : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_comment ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , comment as _) ; } } # [doc = "The offset of the GraphNode, relative to the scroll offset of the [`GraphEdit`][GraphEdit].\n**Note:** You cannot use position directly, as [`GraphEdit`][GraphEdit] is a [`Container`][Container]."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Sets the overlay shown above the GraphNode. See [`Overlay`][Overlay]."] # [doc = ""] # [inline] pub fn set_overlay (& self , overlay : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_overlay ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , overlay as _) ; } } # [doc = "If `true`, the user can resize the GraphNode.\n**Note:** Dragging the handle will only emit the `resize_request` signal, the GraphNode needs to be resized manually."] # [doc = ""] # [inline] pub fn set_resizable (& self , resizable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_resizable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , resizable as _) ; } } # [doc = "If `true`, the GraphNode is selected."] # [doc = ""] # [inline] pub fn set_selected (& self , selected : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_selected ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , selected as _) ; } } # [doc = "If `true`, the close button will be visible.\n**Note:** Pressing it will only emit the `close_request` signal, the GraphNode needs to be removed manually."] # [doc = ""] # [inline] pub fn set_show_close_button (& self , show : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_show_close_button ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , show as _) ; } } # [doc = "Sets properties of the slot with ID `idx`.\nIf `enable_left`/`right`, a port will appear and the slot will be able to be connected from this side.\n`type_left`/`right` is an arbitrary type of the port. Only ports with the same type values can be connected.\n`color_left`/`right` is the tint of the port's icon on this side.\n`custom_left`/`right` is a custom texture for this side's port.\n**Note:** This method only sets properties of the slot. To create the slot, add a [`Control`][Control]-derived child to the GraphNode.\nIndividual properties can be set using one of the `set_slot_*` methods. You must enable at least one side of the slot to do so.\n# Default Arguments\n* `custom_left` - `null`\n* `custom_right` - `null`"] # [doc = ""] # [inline] pub fn set_slot (& self , idx : i64 , enable_left : bool , type_left : i64 , color_left : Color , enable_right : bool , type_right : i64 , color_right : Color , custom_left : impl AsArg < crate :: generated :: Texture > , custom_right : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_slot ; let ret = crate :: icalls :: icallvar__i64_bool_i64_color_bool_i64_color_obj_obj (method_bind , self . this . sys () . as_ptr () , idx as _ , enable_left as _ , type_left as _ , color_left , enable_right as _ , type_right as _ , color_right , custom_left . as_arg_ptr () , custom_right . as_arg_ptr ()) ; } } # [doc = "Sets the [`Color`][Color] of the left (input) side of the slot `idx` to `color_left`."] # [doc = ""] # [inline] pub fn set_slot_color_left (& self , idx : i64 , color_left : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_slot_color_left ; let ret = crate :: icalls :: icallvar__i64_color (method_bind , self . this . sys () . as_ptr () , idx as _ , color_left) ; } } # [doc = "Sets the [`Color`][Color] of the right (output) side of the slot `idx` to `color_right`."] # [doc = ""] # [inline] pub fn set_slot_color_right (& self , idx : i64 , color_right : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_slot_color_right ; let ret = crate :: icalls :: icallvar__i64_color (method_bind , self . this . sys () . as_ptr () , idx as _ , color_right) ; } } # [doc = "Toggles the left (input) side of the slot `idx`. If `enable_left` is `true`, a port will appear on the left side and the slot will be able to be connected from this side."] # [doc = ""] # [inline] pub fn set_slot_enabled_left (& self , idx : i64 , enable_left : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_slot_enabled_left ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , enable_left as _) ; } } # [doc = "Toggles the right (output) side of the slot `idx`. If `enable_right` is `true`, a port will appear on the right side and the slot will be able to be connected from this side."] # [doc = ""] # [inline] pub fn set_slot_enabled_right (& self , idx : i64 , enable_right : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_slot_enabled_right ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , enable_right as _) ; } } # [doc = "Sets the left (input) type of the slot `idx` to `type_left`."] # [doc = ""] # [inline] pub fn set_slot_type_left (& self , idx : i64 , type_left : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_slot_type_left ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , idx as _ , type_left as _) ; } } # [doc = "Sets the right (output) type of the slot `idx` to `type_right`."] # [doc = ""] # [inline] pub fn set_slot_type_right (& self , idx : i64 , type_right : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_slot_type_right ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , idx as _ , type_right as _) ; } } # [doc = "The text displayed in the GraphNode's title bar."] # [doc = ""] # [inline] pub fn set_title (& self , title : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GraphNodeMethodTable :: get (get_api ()) . set_title ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , title . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GraphNode { } unsafe impl GodotObject for GraphNode { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "GraphNode" } } impl QueueFree for GraphNode { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for GraphNode { type Target = crate :: generated :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GraphNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Container > for GraphNode { } unsafe impl SubClass < crate :: generated :: Control > for GraphNode { } unsafe impl SubClass < crate :: generated :: CanvasItem > for GraphNode { } unsafe impl SubClass < crate :: generated :: Node > for GraphNode { } unsafe impl SubClass < crate :: generated :: Object > for GraphNode { } impl Instanciable for GraphNode { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GraphNode :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GraphNodeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear_all_slots : * mut sys :: godot_method_bind , pub clear_slot : * mut sys :: godot_method_bind , pub get_connection_input_color : * mut sys :: godot_method_bind , pub get_connection_input_count : * mut sys :: godot_method_bind , pub get_connection_input_position : * mut sys :: godot_method_bind , pub get_connection_input_type : * mut sys :: godot_method_bind , pub get_connection_output_color : * mut sys :: godot_method_bind , pub get_connection_output_count : * mut sys :: godot_method_bind , pub get_connection_output_position : * mut sys :: godot_method_bind , pub get_connection_output_type : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_overlay : * mut sys :: godot_method_bind , pub get_slot_color_left : * mut sys :: godot_method_bind , pub get_slot_color_right : * mut sys :: godot_method_bind , pub get_slot_type_left : * mut sys :: godot_method_bind , pub get_slot_type_right : * mut sys :: godot_method_bind , pub get_title : * mut sys :: godot_method_bind , pub is_close_button_visible : * mut sys :: godot_method_bind , pub is_comment : * mut sys :: godot_method_bind , pub is_resizable : * mut sys :: godot_method_bind , pub is_selected : * mut sys :: godot_method_bind , pub is_slot_enabled_left : * mut sys :: godot_method_bind , pub is_slot_enabled_right : * mut sys :: godot_method_bind , pub set_comment : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_overlay : * mut sys :: godot_method_bind , pub set_resizable : * mut sys :: godot_method_bind , pub set_selected : * mut sys :: godot_method_bind , pub set_show_close_button : * mut sys :: godot_method_bind , pub set_slot : * mut sys :: godot_method_bind , pub set_slot_color_left : * mut sys :: godot_method_bind , pub set_slot_color_right : * mut sys :: godot_method_bind , pub set_slot_enabled_left : * mut sys :: godot_method_bind , pub set_slot_enabled_right : * mut sys :: godot_method_bind , pub set_slot_type_left : * mut sys :: godot_method_bind , pub set_slot_type_right : * mut sys :: godot_method_bind , pub set_title : * mut sys :: godot_method_bind } impl GraphNodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GraphNodeMethodTable = GraphNodeMethodTable { class_constructor : None , clear_all_slots : 0 as * mut sys :: godot_method_bind , clear_slot : 0 as * mut sys :: godot_method_bind , get_connection_input_color : 0 as * mut sys :: godot_method_bind , get_connection_input_count : 0 as * mut sys :: godot_method_bind , get_connection_input_position : 0 as * mut sys :: godot_method_bind , get_connection_input_type : 0 as * mut sys :: godot_method_bind , get_connection_output_color : 0 as * mut sys :: godot_method_bind , get_connection_output_count : 0 as * mut sys :: godot_method_bind , get_connection_output_position : 0 as * mut sys :: godot_method_bind , get_connection_output_type : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_overlay : 0 as * mut sys :: godot_method_bind , get_slot_color_left : 0 as * mut sys :: godot_method_bind , get_slot_color_right : 0 as * mut sys :: godot_method_bind , get_slot_type_left : 0 as * mut sys :: godot_method_bind , get_slot_type_right : 0 as * mut sys :: godot_method_bind , get_title : 0 as * mut sys :: godot_method_bind , is_close_button_visible : 0 as * mut sys :: godot_method_bind , is_comment : 0 as * mut sys :: godot_method_bind , is_resizable : 0 as * mut sys :: godot_method_bind , is_selected : 0 as * mut sys :: godot_method_bind , is_slot_enabled_left : 0 as * mut sys :: godot_method_bind , is_slot_enabled_right : 0 as * mut sys :: godot_method_bind , set_comment : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_overlay : 0 as * mut sys :: godot_method_bind , set_resizable : 0 as * mut sys :: godot_method_bind , set_selected : 0 as * mut sys :: godot_method_bind , set_show_close_button : 0 as * mut sys :: godot_method_bind , set_slot : 0 as * mut sys :: godot_method_bind , set_slot_color_left : 0 as * mut sys :: godot_method_bind , set_slot_color_right : 0 as * mut sys :: godot_method_bind , set_slot_enabled_left : 0 as * mut sys :: godot_method_bind , set_slot_enabled_right : 0 as * mut sys :: godot_method_bind , set_slot_type_left : 0 as * mut sys :: godot_method_bind , set_slot_type_right : 0 as * mut sys :: godot_method_bind , set_title : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GraphNodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GraphNode\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear_all_slots = (gd_api . godot_method_bind_get_method) (class_name , "clear_all_slots\0" . as_ptr () as * const c_char) ; table . clear_slot = (gd_api . godot_method_bind_get_method) (class_name , "clear_slot\0" . as_ptr () as * const c_char) ; table . get_connection_input_color = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_input_color\0" . as_ptr () as * const c_char) ; table . get_connection_input_count = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_input_count\0" . as_ptr () as * const c_char) ; table . get_connection_input_position = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_input_position\0" . as_ptr () as * const c_char) ; table . get_connection_input_type = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_input_type\0" . as_ptr () as * const c_char) ; table . get_connection_output_color = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_output_color\0" . as_ptr () as * const c_char) ; table . get_connection_output_count = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_output_count\0" . as_ptr () as * const c_char) ; table . get_connection_output_position = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_output_position\0" . as_ptr () as * const c_char) ; table . get_connection_output_type = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_output_type\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_overlay = (gd_api . godot_method_bind_get_method) (class_name , "get_overlay\0" . as_ptr () as * const c_char) ; table . get_slot_color_left = (gd_api . godot_method_bind_get_method) (class_name , "get_slot_color_left\0" . as_ptr () as * const c_char) ; table . get_slot_color_right = (gd_api . godot_method_bind_get_method) (class_name , "get_slot_color_right\0" . as_ptr () as * const c_char) ; table . get_slot_type_left = (gd_api . godot_method_bind_get_method) (class_name , "get_slot_type_left\0" . as_ptr () as * const c_char) ; table . get_slot_type_right = (gd_api . godot_method_bind_get_method) (class_name , "get_slot_type_right\0" . as_ptr () as * const c_char) ; table . get_title = (gd_api . godot_method_bind_get_method) (class_name , "get_title\0" . as_ptr () as * const c_char) ; table . is_close_button_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_close_button_visible\0" . as_ptr () as * const c_char) ; table . is_comment = (gd_api . godot_method_bind_get_method) (class_name , "is_comment\0" . as_ptr () as * const c_char) ; table . is_resizable = (gd_api . godot_method_bind_get_method) (class_name , "is_resizable\0" . as_ptr () as * const c_char) ; table . is_selected = (gd_api . godot_method_bind_get_method) (class_name , "is_selected\0" . as_ptr () as * const c_char) ; table . is_slot_enabled_left = (gd_api . godot_method_bind_get_method) (class_name , "is_slot_enabled_left\0" . as_ptr () as * const c_char) ; table . is_slot_enabled_right = (gd_api . godot_method_bind_get_method) (class_name , "is_slot_enabled_right\0" . as_ptr () as * const c_char) ; table . set_comment = (gd_api . godot_method_bind_get_method) (class_name , "set_comment\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_overlay = (gd_api . godot_method_bind_get_method) (class_name , "set_overlay\0" . as_ptr () as * const c_char) ; table . set_resizable = (gd_api . godot_method_bind_get_method) (class_name , "set_resizable\0" . as_ptr () as * const c_char) ; table . set_selected = (gd_api . godot_method_bind_get_method) (class_name , "set_selected\0" . as_ptr () as * const c_char) ; table . set_show_close_button = (gd_api . godot_method_bind_get_method) (class_name , "set_show_close_button\0" . as_ptr () as * const c_char) ; table . set_slot = (gd_api . godot_method_bind_get_method) (class_name , "set_slot\0" . as_ptr () as * const c_char) ; table . set_slot_color_left = (gd_api . godot_method_bind_get_method) (class_name , "set_slot_color_left\0" . as_ptr () as * const c_char) ; table . set_slot_color_right = (gd_api . godot_method_bind_get_method) (class_name , "set_slot_color_right\0" . as_ptr () as * const c_char) ; table . set_slot_enabled_left = (gd_api . godot_method_bind_get_method) (class_name , "set_slot_enabled_left\0" . as_ptr () as * const c_char) ; table . set_slot_enabled_right = (gd_api . godot_method_bind_get_method) (class_name , "set_slot_enabled_right\0" . as_ptr () as * const c_char) ; table . set_slot_type_left = (gd_api . godot_method_bind_get_method) (class_name , "set_slot_type_left\0" . as_ptr () as * const c_char) ; table . set_slot_type_right = (gd_api . godot_method_bind_get_method) (class_name , "set_slot_type_right\0" . as_ptr () as * const c_char) ; table . set_title = (gd_api . godot_method_bind_get_method) (class_name , "set_title\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::graph_node::private::GraphNode;
            
            pub(crate) mod grid_container {
                # ! [doc = "This module contains types related to the API class [`GridContainer`][super::GridContainer]."] pub (crate) mod private { # [doc = "`core class GridContainer` inherits `Container` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gridcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`GridContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<GridContainer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nGridContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GridContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GridContainer ; impl GridContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GridContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The number of columns in the [`GridContainer`][GridContainer]. If modified, [`GridContainer`][GridContainer] reorders its Control-derived children to accommodate the new layout."] # [doc = ""] # [inline] pub fn columns (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridContainerMethodTable :: get (get_api ()) . get_columns ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The number of columns in the [`GridContainer`][GridContainer]. If modified, [`GridContainer`][GridContainer] reorders its Control-derived children to accommodate the new layout."] # [doc = ""] # [inline] pub fn set_columns (& self , columns : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridContainerMethodTable :: get (get_api ()) . set_columns ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , columns as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GridContainer { } unsafe impl GodotObject for GridContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "GridContainer" } } impl QueueFree for GridContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for GridContainer { type Target = crate :: generated :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GridContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Container > for GridContainer { } unsafe impl SubClass < crate :: generated :: Control > for GridContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for GridContainer { } unsafe impl SubClass < crate :: generated :: Node > for GridContainer { } unsafe impl SubClass < crate :: generated :: Object > for GridContainer { } impl Instanciable for GridContainer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GridContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GridContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_columns : * mut sys :: godot_method_bind , pub set_columns : * mut sys :: godot_method_bind } impl GridContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GridContainerMethodTable = GridContainerMethodTable { class_constructor : None , get_columns : 0 as * mut sys :: godot_method_bind , set_columns : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GridContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GridContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_columns = (gd_api . godot_method_bind_get_method) (class_name , "get_columns\0" . as_ptr () as * const c_char) ; table . set_columns = (gd_api . godot_method_bind_get_method) (class_name , "set_columns\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::grid_container::private::GridContainer;
            
            pub(crate) mod grid_map {
                # ! [doc = "This module contains types related to the API class [`GridMap`][super::GridMap]."] pub (crate) mod private { # [doc = "`core class GridMap` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_gridmap.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`GridMap` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<GridMap>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nGridMap inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GridMap { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GridMap ; # [doc = "Constants"] # [allow (non_upper_case_globals)] impl GridMap { pub const INVALID_CELL_ITEM : i64 = - 1i64 ; } impl GridMap { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GridMapMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn clear_baked_meshes (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . clear_baked_meshes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_bake_mesh_instance (& self , idx : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_bake_mesh_instance ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_bake_meshes (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_bake_meshes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_cell_item (& self , x : i64 , y : i64 , z : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_cell_item ; let ret = crate :: icalls :: icallvar__i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x as _ , y as _ , z as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_cell_item_orientation (& self , x : i64 , y : i64 , z : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_cell_item_orientation ; let ret = crate :: icalls :: icallvar__i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x as _ , y as _ , z as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn cell_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_cell_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn cell_size (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_cell_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn center_x (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_center_x ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn center_y (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_center_y ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn center_z (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_center_z ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_collision_layer_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_collision_layer_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn mesh_library (& self) -> Option < Ref < crate :: generated :: MeshLibrary , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_mesh_library ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: MeshLibrary , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_meshes (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_meshes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn navigation_layers (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_navigation_layers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn octant_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_octant_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn physics_material (& self) -> Option < Ref < crate :: generated :: PhysicsMaterial , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_physics_material ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: PhysicsMaterial , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn use_in_baked_light (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_use_in_baked_light ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_used_cells (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_used_cells ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_used_cells_by_item (& self , item : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . get_used_cells_by_item ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , item as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn is_baking_navigation (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . is_baking_navigation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn make_baked_meshes (& self , gen_lightmap_uv : bool , lightmap_uv_texel_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . make_baked_meshes ; let ret = crate :: icalls :: icallvar__bool_f64 (method_bind , self . this . sys () . as_ptr () , gen_lightmap_uv as _ , lightmap_uv_texel_size as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn map_to_world (& self , x : i64 , y : i64 , z : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . map_to_world ; let ret = crate :: icalls :: icallvar__i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x as _ , y as _ , z as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn resource_changed (& self , resource : impl AsArg < crate :: generated :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . resource_changed ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , resource . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bake_navigation (& self , bake_navigation : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_bake_navigation ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , bake_navigation as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cell_item (& self , x : i64 , y : i64 , z : i64 , item : i64 , orientation : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_cell_item ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , x as _ , y as _ , z as _ , item as _ , orientation as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cell_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_cell_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , scale as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_cell_size (& self , size : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_cell_size ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_center_x (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_center_x ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_center_y (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_center_y ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_center_z (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_center_z ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_clip (& self , enabled : bool , clipabove : bool , floor : i64 , axis : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_clip ; let ret = crate :: icalls :: icallvar__bool_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , enabled as _ , clipabove as _ , floor as _ , axis as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_collision_layer (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , layer as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_collision_layer_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_collision_layer_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_mesh_library (& self , mesh_library : impl AsArg < crate :: generated :: MeshLibrary >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_mesh_library ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , mesh_library . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_navigation_layers (& self , navigation_layers : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_navigation_layers ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , navigation_layers as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_octant_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_octant_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_physics_material (& self , material : impl AsArg < crate :: generated :: PhysicsMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_physics_material ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_use_in_baked_light (& self , use_in_baked_light : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . set_use_in_baked_light ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , use_in_baked_light as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn world_to_map (& self , pos : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = GridMapMethodTable :: get (get_api ()) . world_to_map ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , pos) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for GridMap { } unsafe impl GodotObject for GridMap { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "GridMap" } } impl QueueFree for GridMap { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for GridMap { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GridMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for GridMap { } unsafe impl SubClass < crate :: generated :: Node > for GridMap { } unsafe impl SubClass < crate :: generated :: Object > for GridMap { } impl Instanciable for GridMap { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GridMap :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GridMapMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub clear_baked_meshes : * mut sys :: godot_method_bind , pub get_bake_mesh_instance : * mut sys :: godot_method_bind , pub get_bake_meshes : * mut sys :: godot_method_bind , pub get_cell_item : * mut sys :: godot_method_bind , pub get_cell_item_orientation : * mut sys :: godot_method_bind , pub get_cell_scale : * mut sys :: godot_method_bind , pub get_cell_size : * mut sys :: godot_method_bind , pub get_center_x : * mut sys :: godot_method_bind , pub get_center_y : * mut sys :: godot_method_bind , pub get_center_z : * mut sys :: godot_method_bind , pub get_collision_layer : * mut sys :: godot_method_bind , pub get_collision_layer_bit : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_mesh_library : * mut sys :: godot_method_bind , pub get_meshes : * mut sys :: godot_method_bind , pub get_navigation_layers : * mut sys :: godot_method_bind , pub get_octant_size : * mut sys :: godot_method_bind , pub get_physics_material : * mut sys :: godot_method_bind , pub get_use_in_baked_light : * mut sys :: godot_method_bind , pub get_used_cells : * mut sys :: godot_method_bind , pub get_used_cells_by_item : * mut sys :: godot_method_bind , pub is_baking_navigation : * mut sys :: godot_method_bind , pub make_baked_meshes : * mut sys :: godot_method_bind , pub map_to_world : * mut sys :: godot_method_bind , pub resource_changed : * mut sys :: godot_method_bind , pub set_bake_navigation : * mut sys :: godot_method_bind , pub set_cell_item : * mut sys :: godot_method_bind , pub set_cell_scale : * mut sys :: godot_method_bind , pub set_cell_size : * mut sys :: godot_method_bind , pub set_center_x : * mut sys :: godot_method_bind , pub set_center_y : * mut sys :: godot_method_bind , pub set_center_z : * mut sys :: godot_method_bind , pub set_clip : * mut sys :: godot_method_bind , pub set_collision_layer : * mut sys :: godot_method_bind , pub set_collision_layer_bit : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_mesh_library : * mut sys :: godot_method_bind , pub set_navigation_layers : * mut sys :: godot_method_bind , pub set_octant_size : * mut sys :: godot_method_bind , pub set_physics_material : * mut sys :: godot_method_bind , pub set_use_in_baked_light : * mut sys :: godot_method_bind , pub world_to_map : * mut sys :: godot_method_bind } impl GridMapMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GridMapMethodTable = GridMapMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , clear_baked_meshes : 0 as * mut sys :: godot_method_bind , get_bake_mesh_instance : 0 as * mut sys :: godot_method_bind , get_bake_meshes : 0 as * mut sys :: godot_method_bind , get_cell_item : 0 as * mut sys :: godot_method_bind , get_cell_item_orientation : 0 as * mut sys :: godot_method_bind , get_cell_scale : 0 as * mut sys :: godot_method_bind , get_cell_size : 0 as * mut sys :: godot_method_bind , get_center_x : 0 as * mut sys :: godot_method_bind , get_center_y : 0 as * mut sys :: godot_method_bind , get_center_z : 0 as * mut sys :: godot_method_bind , get_collision_layer : 0 as * mut sys :: godot_method_bind , get_collision_layer_bit : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_mesh_library : 0 as * mut sys :: godot_method_bind , get_meshes : 0 as * mut sys :: godot_method_bind , get_navigation_layers : 0 as * mut sys :: godot_method_bind , get_octant_size : 0 as * mut sys :: godot_method_bind , get_physics_material : 0 as * mut sys :: godot_method_bind , get_use_in_baked_light : 0 as * mut sys :: godot_method_bind , get_used_cells : 0 as * mut sys :: godot_method_bind , get_used_cells_by_item : 0 as * mut sys :: godot_method_bind , is_baking_navigation : 0 as * mut sys :: godot_method_bind , make_baked_meshes : 0 as * mut sys :: godot_method_bind , map_to_world : 0 as * mut sys :: godot_method_bind , resource_changed : 0 as * mut sys :: godot_method_bind , set_bake_navigation : 0 as * mut sys :: godot_method_bind , set_cell_item : 0 as * mut sys :: godot_method_bind , set_cell_scale : 0 as * mut sys :: godot_method_bind , set_cell_size : 0 as * mut sys :: godot_method_bind , set_center_x : 0 as * mut sys :: godot_method_bind , set_center_y : 0 as * mut sys :: godot_method_bind , set_center_z : 0 as * mut sys :: godot_method_bind , set_clip : 0 as * mut sys :: godot_method_bind , set_collision_layer : 0 as * mut sys :: godot_method_bind , set_collision_layer_bit : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_mesh_library : 0 as * mut sys :: godot_method_bind , set_navigation_layers : 0 as * mut sys :: godot_method_bind , set_octant_size : 0 as * mut sys :: godot_method_bind , set_physics_material : 0 as * mut sys :: godot_method_bind , set_use_in_baked_light : 0 as * mut sys :: godot_method_bind , world_to_map : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GridMapMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GridMap\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . clear_baked_meshes = (gd_api . godot_method_bind_get_method) (class_name , "clear_baked_meshes\0" . as_ptr () as * const c_char) ; table . get_bake_mesh_instance = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_mesh_instance\0" . as_ptr () as * const c_char) ; table . get_bake_meshes = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_meshes\0" . as_ptr () as * const c_char) ; table . get_cell_item = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_item\0" . as_ptr () as * const c_char) ; table . get_cell_item_orientation = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_item_orientation\0" . as_ptr () as * const c_char) ; table . get_cell_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_scale\0" . as_ptr () as * const c_char) ; table . get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_size\0" . as_ptr () as * const c_char) ; table . get_center_x = (gd_api . godot_method_bind_get_method) (class_name , "get_center_x\0" . as_ptr () as * const c_char) ; table . get_center_y = (gd_api . godot_method_bind_get_method) (class_name , "get_center_y\0" . as_ptr () as * const c_char) ; table . get_center_z = (gd_api . godot_method_bind_get_method) (class_name , "get_center_z\0" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\0" . as_ptr () as * const c_char) ; table . get_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_mesh_library = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh_library\0" . as_ptr () as * const c_char) ; table . get_meshes = (gd_api . godot_method_bind_get_method) (class_name , "get_meshes\0" . as_ptr () as * const c_char) ; table . get_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_layers\0" . as_ptr () as * const c_char) ; table . get_octant_size = (gd_api . godot_method_bind_get_method) (class_name , "get_octant_size\0" . as_ptr () as * const c_char) ; table . get_physics_material = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_material\0" . as_ptr () as * const c_char) ; table . get_use_in_baked_light = (gd_api . godot_method_bind_get_method) (class_name , "get_use_in_baked_light\0" . as_ptr () as * const c_char) ; table . get_used_cells = (gd_api . godot_method_bind_get_method) (class_name , "get_used_cells\0" . as_ptr () as * const c_char) ; table . get_used_cells_by_item = (gd_api . godot_method_bind_get_method) (class_name , "get_used_cells_by_item\0" . as_ptr () as * const c_char) ; table . is_baking_navigation = (gd_api . godot_method_bind_get_method) (class_name , "is_baking_navigation\0" . as_ptr () as * const c_char) ; table . make_baked_meshes = (gd_api . godot_method_bind_get_method) (class_name , "make_baked_meshes\0" . as_ptr () as * const c_char) ; table . map_to_world = (gd_api . godot_method_bind_get_method) (class_name , "map_to_world\0" . as_ptr () as * const c_char) ; table . resource_changed = (gd_api . godot_method_bind_get_method) (class_name , "resource_changed\0" . as_ptr () as * const c_char) ; table . set_bake_navigation = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_navigation\0" . as_ptr () as * const c_char) ; table . set_cell_item = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_item\0" . as_ptr () as * const c_char) ; table . set_cell_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_scale\0" . as_ptr () as * const c_char) ; table . set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_size\0" . as_ptr () as * const c_char) ; table . set_center_x = (gd_api . godot_method_bind_get_method) (class_name , "set_center_x\0" . as_ptr () as * const c_char) ; table . set_center_y = (gd_api . godot_method_bind_get_method) (class_name , "set_center_y\0" . as_ptr () as * const c_char) ; table . set_center_z = (gd_api . godot_method_bind_get_method) (class_name , "set_center_z\0" . as_ptr () as * const c_char) ; table . set_clip = (gd_api . godot_method_bind_get_method) (class_name , "set_clip\0" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\0" . as_ptr () as * const c_char) ; table . set_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_mesh_library = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh_library\0" . as_ptr () as * const c_char) ; table . set_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_layers\0" . as_ptr () as * const c_char) ; table . set_octant_size = (gd_api . godot_method_bind_get_method) (class_name , "set_octant_size\0" . as_ptr () as * const c_char) ; table . set_physics_material = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_material\0" . as_ptr () as * const c_char) ; table . set_use_in_baked_light = (gd_api . godot_method_bind_get_method) (class_name , "set_use_in_baked_light\0" . as_ptr () as * const c_char) ; table . world_to_map = (gd_api . godot_method_bind_get_method) (class_name , "world_to_map\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::grid_map::private::GridMap;
            
            pub(crate) mod groove_joint_2d {
                # ! [doc = "This module contains types related to the API class [`GrooveJoint2D`][super::GrooveJoint2D]."] pub (crate) mod private { # [doc = "`core class GrooveJoint2D` inherits `Joint2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_groovejoint2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`GrooveJoint2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<GrooveJoint2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nGrooveJoint2D inherits methods from:\n - [Joint2D](struct.Joint2D.html)\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct GrooveJoint2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: GrooveJoint2D ; impl GrooveJoint2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = GrooveJoint2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The body B's initial anchor position defined by the joint's origin and a local offset [`initial_offset`][Self::initial_offset] along the joint's Y axis (along the groove)."] # [doc = ""] # [inline] pub fn initial_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GrooveJoint2DMethodTable :: get (get_api ()) . get_initial_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The groove's length. The groove is from the joint's origin towards [`length`][Self::length] along the joint's local Y axis."] # [doc = ""] # [inline] pub fn length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GrooveJoint2DMethodTable :: get (get_api ()) . get_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body B's initial anchor position defined by the joint's origin and a local offset [`initial_offset`][Self::initial_offset] along the joint's Y axis (along the groove)."] # [doc = ""] # [inline] pub fn set_initial_offset (& self , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GrooveJoint2DMethodTable :: get (get_api ()) . set_initial_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , offset as _) ; } } # [doc = "The groove's length. The groove is from the joint's origin towards [`length`][Self::length] along the joint's local Y axis."] # [doc = ""] # [inline] pub fn set_length (& self , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = GrooveJoint2DMethodTable :: get (get_api ()) . set_length ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , length as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for GrooveJoint2D { } unsafe impl GodotObject for GrooveJoint2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "GrooveJoint2D" } } impl QueueFree for GrooveJoint2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for GrooveJoint2D { type Target = crate :: generated :: Joint2D ; # [inline] fn deref (& self) -> & crate :: generated :: Joint2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for GrooveJoint2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Joint2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Joint2D > for GrooveJoint2D { } unsafe impl SubClass < crate :: generated :: Node2D > for GrooveJoint2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for GrooveJoint2D { } unsafe impl SubClass < crate :: generated :: Node > for GrooveJoint2D { } unsafe impl SubClass < crate :: generated :: Object > for GrooveJoint2D { } impl Instanciable for GrooveJoint2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { GrooveJoint2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GrooveJoint2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_initial_offset : * mut sys :: godot_method_bind , pub get_length : * mut sys :: godot_method_bind , pub set_initial_offset : * mut sys :: godot_method_bind , pub set_length : * mut sys :: godot_method_bind } impl GrooveJoint2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GrooveJoint2DMethodTable = GrooveJoint2DMethodTable { class_constructor : None , get_initial_offset : 0 as * mut sys :: godot_method_bind , get_length : 0 as * mut sys :: godot_method_bind , set_initial_offset : 0 as * mut sys :: godot_method_bind , set_length : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GrooveJoint2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "GrooveJoint2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_initial_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_initial_offset\0" . as_ptr () as * const c_char) ; table . get_length = (gd_api . godot_method_bind_get_method) (class_name , "get_length\0" . as_ptr () as * const c_char) ; table . set_initial_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_initial_offset\0" . as_ptr () as * const c_char) ; table . set_length = (gd_api . godot_method_bind_get_method) (class_name , "set_length\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::groove_joint_2d::private::GrooveJoint2D;
            
            pub(crate) mod hbox_container {
                # ! [doc = "This module contains types related to the API class [`HBoxContainer`][super::HBoxContainer]."] pub (crate) mod private { # [doc = "`core class HBoxContainer` inherits `BoxContainer` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_hboxcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`HBoxContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<HBoxContainer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nHBoxContainer inherits methods from:\n - [BoxContainer](struct.BoxContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct HBoxContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: HBoxContainer ; impl HBoxContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = HBoxContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for HBoxContainer { } unsafe impl GodotObject for HBoxContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "HBoxContainer" } } impl QueueFree for HBoxContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for HBoxContainer { type Target = crate :: generated :: BoxContainer ; # [inline] fn deref (& self) -> & crate :: generated :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HBoxContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: BoxContainer > for HBoxContainer { } unsafe impl SubClass < crate :: generated :: Container > for HBoxContainer { } unsafe impl SubClass < crate :: generated :: Control > for HBoxContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for HBoxContainer { } unsafe impl SubClass < crate :: generated :: Node > for HBoxContainer { } unsafe impl SubClass < crate :: generated :: Object > for HBoxContainer { } impl Instanciable for HBoxContainer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { HBoxContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct HBoxContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl HBoxContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : HBoxContainerMethodTable = HBoxContainerMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { HBoxContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "HBoxContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::hbox_container::private::HBoxContainer;
            
            pub(crate) mod hflow_container {
                # ! [doc = "This module contains types related to the API class [`HFlowContainer`][super::HFlowContainer]."] pub (crate) mod private { # [doc = "`core class HFlowContainer` inherits `FlowContainer` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_hflowcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`HFlowContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<HFlowContainer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nHFlowContainer inherits methods from:\n - [FlowContainer](struct.FlowContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct HFlowContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: HFlowContainer ; impl HFlowContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = HFlowContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for HFlowContainer { } unsafe impl GodotObject for HFlowContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "HFlowContainer" } } impl QueueFree for HFlowContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for HFlowContainer { type Target = crate :: generated :: FlowContainer ; # [inline] fn deref (& self) -> & crate :: generated :: FlowContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HFlowContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: FlowContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: FlowContainer > for HFlowContainer { } unsafe impl SubClass < crate :: generated :: Container > for HFlowContainer { } unsafe impl SubClass < crate :: generated :: Control > for HFlowContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for HFlowContainer { } unsafe impl SubClass < crate :: generated :: Node > for HFlowContainer { } unsafe impl SubClass < crate :: generated :: Object > for HFlowContainer { } impl Instanciable for HFlowContainer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { HFlowContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct HFlowContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl HFlowContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : HFlowContainerMethodTable = HFlowContainerMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { HFlowContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "HFlowContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::hflow_container::private::HFlowContainer;
            
            pub(crate) mod hmac_context {
                # ! [doc = "This module contains types related to the API class [`HMACContext`][super::HMACContext]."] pub (crate) mod private { # [doc = "`core class HMACContext` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_hmaccontext.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nHMACContext inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct HMACContext { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: HMACContext ; impl HMACContext { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = HMACContextMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the resulting HMAC. If the HMAC failed, an empty [`PoolByteArray`][PoolArray<u8>] is returned."] # [doc = ""] # [inline] pub fn finish (& self) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = HMACContextMethodTable :: get (get_api ()) . finish ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Initializes the HMACContext. This method cannot be called again on the same HMACContext until [`finish`][Self::finish] has been called."] # [doc = ""] # [inline] pub fn start (& self , hash_type : i64 , key : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = HMACContextMethodTable :: get (get_api ()) . start ; let ret = crate :: icalls :: icallvar__i64_bytearr (method_bind , self . this . sys () . as_ptr () , hash_type as _ , key) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Updates the message to be HMACed. This can be called multiple times before [`finish`][Self::finish] is called to append `data` to the message, but cannot be called until [`start`][Self::start] has been called."] # [doc = ""] # [inline] pub fn update (& self , data : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = HMACContextMethodTable :: get (get_api ()) . update ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , data) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } } impl gdnative_core :: private :: godot_object :: Sealed for HMACContext { } unsafe impl GodotObject for HMACContext { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "HMACContext" } } impl std :: ops :: Deref for HMACContext { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HMACContext { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for HMACContext { } unsafe impl SubClass < crate :: generated :: Object > for HMACContext { } impl Instanciable for HMACContext { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { HMACContext :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct HMACContextMethodTable { pub class_constructor : sys :: godot_class_constructor , pub finish : * mut sys :: godot_method_bind , pub start : * mut sys :: godot_method_bind , pub update : * mut sys :: godot_method_bind } impl HMACContextMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : HMACContextMethodTable = HMACContextMethodTable { class_constructor : None , finish : 0 as * mut sys :: godot_method_bind , start : 0 as * mut sys :: godot_method_bind , update : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { HMACContextMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "HMACContext\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . finish = (gd_api . godot_method_bind_get_method) (class_name , "finish\0" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\0" . as_ptr () as * const c_char) ; table . update = (gd_api . godot_method_bind_get_method) (class_name , "update\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::hmac_context::private::HMACContext;
            
            pub(crate) mod hscroll_bar {
                # ! [doc = "This module contains types related to the API class [`HScrollBar`][super::HScrollBar]."] pub (crate) mod private { # [doc = "`core class HScrollBar` inherits `ScrollBar` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_hscrollbar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`HScrollBar` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<HScrollBar>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nHScrollBar inherits methods from:\n - [ScrollBar](struct.ScrollBar.html)\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct HScrollBar { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: HScrollBar ; impl HScrollBar { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = HScrollBarMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for HScrollBar { } unsafe impl GodotObject for HScrollBar { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "HScrollBar" } } impl QueueFree for HScrollBar { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for HScrollBar { type Target = crate :: generated :: ScrollBar ; # [inline] fn deref (& self) -> & crate :: generated :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HScrollBar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: ScrollBar > for HScrollBar { } unsafe impl SubClass < crate :: generated :: Range > for HScrollBar { } unsafe impl SubClass < crate :: generated :: Control > for HScrollBar { } unsafe impl SubClass < crate :: generated :: CanvasItem > for HScrollBar { } unsafe impl SubClass < crate :: generated :: Node > for HScrollBar { } unsafe impl SubClass < crate :: generated :: Object > for HScrollBar { } impl Instanciable for HScrollBar { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { HScrollBar :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct HScrollBarMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl HScrollBarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : HScrollBarMethodTable = HScrollBarMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { HScrollBarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "HScrollBar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::hscroll_bar::private::HScrollBar;
            
            pub(crate) mod hseparator {
                # ! [doc = "This module contains types related to the API class [`HSeparator`][super::HSeparator]."] pub (crate) mod private { # [doc = "`core class HSeparator` inherits `Separator` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_hseparator.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`HSeparator` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<HSeparator>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nHSeparator inherits methods from:\n - [Separator](struct.Separator.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct HSeparator { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: HSeparator ; impl HSeparator { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = HSeparatorMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for HSeparator { } unsafe impl GodotObject for HSeparator { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "HSeparator" } } impl QueueFree for HSeparator { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for HSeparator { type Target = crate :: generated :: Separator ; # [inline] fn deref (& self) -> & crate :: generated :: Separator { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HSeparator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Separator { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Separator > for HSeparator { } unsafe impl SubClass < crate :: generated :: Control > for HSeparator { } unsafe impl SubClass < crate :: generated :: CanvasItem > for HSeparator { } unsafe impl SubClass < crate :: generated :: Node > for HSeparator { } unsafe impl SubClass < crate :: generated :: Object > for HSeparator { } impl Instanciable for HSeparator { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { HSeparator :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct HSeparatorMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl HSeparatorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : HSeparatorMethodTable = HSeparatorMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { HSeparatorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "HSeparator\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::hseparator::private::HSeparator;
            
            pub(crate) mod hslider {
                # ! [doc = "This module contains types related to the API class [`HSlider`][super::HSlider]."] pub (crate) mod private { # [doc = "`core class HSlider` inherits `Slider` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_hslider.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`HSlider` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<HSlider>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nHSlider inherits methods from:\n - [Slider](struct.Slider.html)\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct HSlider { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: HSlider ; impl HSlider { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = HSliderMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for HSlider { } unsafe impl GodotObject for HSlider { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "HSlider" } } impl QueueFree for HSlider { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for HSlider { type Target = crate :: generated :: Slider ; # [inline] fn deref (& self) -> & crate :: generated :: Slider { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HSlider { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Slider { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Slider > for HSlider { } unsafe impl SubClass < crate :: generated :: Range > for HSlider { } unsafe impl SubClass < crate :: generated :: Control > for HSlider { } unsafe impl SubClass < crate :: generated :: CanvasItem > for HSlider { } unsafe impl SubClass < crate :: generated :: Node > for HSlider { } unsafe impl SubClass < crate :: generated :: Object > for HSlider { } impl Instanciable for HSlider { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { HSlider :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct HSliderMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl HSliderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : HSliderMethodTable = HSliderMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { HSliderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "HSlider\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::hslider::private::HSlider;
            
            pub(crate) mod hsplit_container {
                # ! [doc = "This module contains types related to the API class [`HSplitContainer`][super::HSplitContainer]."] pub (crate) mod private { # [doc = "`core class HSplitContainer` inherits `SplitContainer` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_hsplitcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`HSplitContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<HSplitContainer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nHSplitContainer inherits methods from:\n - [SplitContainer](struct.SplitContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct HSplitContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: HSplitContainer ; impl HSplitContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = HSplitContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for HSplitContainer { } unsafe impl GodotObject for HSplitContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "HSplitContainer" } } impl QueueFree for HSplitContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for HSplitContainer { type Target = crate :: generated :: SplitContainer ; # [inline] fn deref (& self) -> & crate :: generated :: SplitContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HSplitContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: SplitContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: SplitContainer > for HSplitContainer { } unsafe impl SubClass < crate :: generated :: Container > for HSplitContainer { } unsafe impl SubClass < crate :: generated :: Control > for HSplitContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for HSplitContainer { } unsafe impl SubClass < crate :: generated :: Node > for HSplitContainer { } unsafe impl SubClass < crate :: generated :: Object > for HSplitContainer { } impl Instanciable for HSplitContainer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { HSplitContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct HSplitContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl HSplitContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : HSplitContainerMethodTable = HSplitContainerMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { HSplitContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "HSplitContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::hsplit_container::private::HSplitContainer;
            
            pub mod http_client {
                # ! [doc = "This module contains types related to the API class [`HTTPClient`][super::HTTPClient]."] pub (crate) mod private { # [doc = "`core class HTTPClient` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`http_client`][super::http_client] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_httpclient.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nHTTPClient inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct HTTPClient { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: HTTPClient ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Method (pub i64) ; impl Method { pub const GET : Method = Method (0i64) ; pub const HEAD : Method = Method (1i64) ; pub const POST : Method = Method (2i64) ; pub const PUT : Method = Method (3i64) ; pub const DELETE : Method = Method (4i64) ; pub const OPTIONS : Method = Method (5i64) ; pub const TRACE : Method = Method (6i64) ; pub const CONNECT : Method = Method (7i64) ; pub const PATCH : Method = Method (8i64) ; pub const MAX : Method = Method (9i64) ; } impl From < i64 > for Method { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Method > for i64 { # [inline] fn from (v : Method) -> Self { v . 0 } } impl FromVariant for Method { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ResponseCode (pub i64) ; impl ResponseCode { pub const CONTINUE : ResponseCode = ResponseCode (100i64) ; pub const SWITCHING_PROTOCOLS : ResponseCode = ResponseCode (101i64) ; pub const PROCESSING : ResponseCode = ResponseCode (102i64) ; pub const OK : ResponseCode = ResponseCode (200i64) ; pub const CREATED : ResponseCode = ResponseCode (201i64) ; pub const ACCEPTED : ResponseCode = ResponseCode (202i64) ; pub const NON_AUTHORITATIVE_INFORMATION : ResponseCode = ResponseCode (203i64) ; pub const NO_CONTENT : ResponseCode = ResponseCode (204i64) ; pub const RESET_CONTENT : ResponseCode = ResponseCode (205i64) ; pub const PARTIAL_CONTENT : ResponseCode = ResponseCode (206i64) ; pub const MULTI_STATUS : ResponseCode = ResponseCode (207i64) ; pub const ALREADY_REPORTED : ResponseCode = ResponseCode (208i64) ; pub const IM_USED : ResponseCode = ResponseCode (226i64) ; pub const MULTIPLE_CHOICES : ResponseCode = ResponseCode (300i64) ; pub const MOVED_PERMANENTLY : ResponseCode = ResponseCode (301i64) ; pub const FOUND : ResponseCode = ResponseCode (302i64) ; pub const SEE_OTHER : ResponseCode = ResponseCode (303i64) ; pub const NOT_MODIFIED : ResponseCode = ResponseCode (304i64) ; pub const USE_PROXY : ResponseCode = ResponseCode (305i64) ; pub const SWITCH_PROXY : ResponseCode = ResponseCode (306i64) ; pub const TEMPORARY_REDIRECT : ResponseCode = ResponseCode (307i64) ; pub const PERMANENT_REDIRECT : ResponseCode = ResponseCode (308i64) ; pub const BAD_REQUEST : ResponseCode = ResponseCode (400i64) ; pub const UNAUTHORIZED : ResponseCode = ResponseCode (401i64) ; pub const PAYMENT_REQUIRED : ResponseCode = ResponseCode (402i64) ; pub const FORBIDDEN : ResponseCode = ResponseCode (403i64) ; pub const NOT_FOUND : ResponseCode = ResponseCode (404i64) ; pub const METHOD_NOT_ALLOWED : ResponseCode = ResponseCode (405i64) ; pub const NOT_ACCEPTABLE : ResponseCode = ResponseCode (406i64) ; pub const PROXY_AUTHENTICATION_REQUIRED : ResponseCode = ResponseCode (407i64) ; pub const REQUEST_TIMEOUT : ResponseCode = ResponseCode (408i64) ; pub const CONFLICT : ResponseCode = ResponseCode (409i64) ; pub const GONE : ResponseCode = ResponseCode (410i64) ; pub const LENGTH_REQUIRED : ResponseCode = ResponseCode (411i64) ; pub const PRECONDITION_FAILED : ResponseCode = ResponseCode (412i64) ; pub const REQUEST_ENTITY_TOO_LARGE : ResponseCode = ResponseCode (413i64) ; pub const REQUEST_URI_TOO_LONG : ResponseCode = ResponseCode (414i64) ; pub const UNSUPPORTED_MEDIA_TYPE : ResponseCode = ResponseCode (415i64) ; pub const REQUESTED_RANGE_NOT_SATISFIABLE : ResponseCode = ResponseCode (416i64) ; pub const EXPECTATION_FAILED : ResponseCode = ResponseCode (417i64) ; pub const IM_A_TEAPOT : ResponseCode = ResponseCode (418i64) ; pub const MISDIRECTED_REQUEST : ResponseCode = ResponseCode (421i64) ; pub const UNPROCESSABLE_ENTITY : ResponseCode = ResponseCode (422i64) ; pub const LOCKED : ResponseCode = ResponseCode (423i64) ; pub const FAILED_DEPENDENCY : ResponseCode = ResponseCode (424i64) ; pub const UPGRADE_REQUIRED : ResponseCode = ResponseCode (426i64) ; pub const PRECONDITION_REQUIRED : ResponseCode = ResponseCode (428i64) ; pub const TOO_MANY_REQUESTS : ResponseCode = ResponseCode (429i64) ; pub const REQUEST_HEADER_FIELDS_TOO_LARGE : ResponseCode = ResponseCode (431i64) ; pub const UNAVAILABLE_FOR_LEGAL_REASONS : ResponseCode = ResponseCode (451i64) ; pub const INTERNAL_SERVER_ERROR : ResponseCode = ResponseCode (500i64) ; pub const NOT_IMPLEMENTED : ResponseCode = ResponseCode (501i64) ; pub const BAD_GATEWAY : ResponseCode = ResponseCode (502i64) ; pub const SERVICE_UNAVAILABLE : ResponseCode = ResponseCode (503i64) ; pub const GATEWAY_TIMEOUT : ResponseCode = ResponseCode (504i64) ; pub const HTTP_VERSION_NOT_SUPPORTED : ResponseCode = ResponseCode (505i64) ; pub const VARIANT_ALSO_NEGOTIATES : ResponseCode = ResponseCode (506i64) ; pub const INSUFFICIENT_STORAGE : ResponseCode = ResponseCode (507i64) ; pub const LOOP_DETECTED : ResponseCode = ResponseCode (508i64) ; pub const NOT_EXTENDED : ResponseCode = ResponseCode (510i64) ; pub const NETWORK_AUTH_REQUIRED : ResponseCode = ResponseCode (511i64) ; } impl From < i64 > for ResponseCode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ResponseCode > for i64 { # [inline] fn from (v : ResponseCode) -> Self { v . 0 } } impl FromVariant for ResponseCode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Status (pub i64) ; impl Status { pub const DISCONNECTED : Status = Status (0i64) ; pub const RESOLVING : Status = Status (1i64) ; pub const CANT_RESOLVE : Status = Status (2i64) ; pub const CONNECTING : Status = Status (3i64) ; pub const CANT_CONNECT : Status = Status (4i64) ; pub const CONNECTED : Status = Status (5i64) ; pub const REQUESTING : Status = Status (6i64) ; pub const BODY : Status = Status (7i64) ; pub const CONNECTION_ERROR : Status = Status (8i64) ; pub const SSL_HANDSHAKE_ERROR : Status = Status (9i64) ; } impl From < i64 > for Status { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Status > for i64 { # [inline] fn from (v : Status) -> Self { v . 0 } } impl FromVariant for Status { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl HTTPClient { pub const METHOD_GET : i64 = 0i64 ; pub const STATUS_DISCONNECTED : i64 = 0i64 ; pub const METHOD_HEAD : i64 = 1i64 ; pub const STATUS_RESOLVING : i64 = 1i64 ; pub const METHOD_POST : i64 = 2i64 ; pub const STATUS_CANT_RESOLVE : i64 = 2i64 ; pub const METHOD_PUT : i64 = 3i64 ; pub const STATUS_CONNECTING : i64 = 3i64 ; pub const METHOD_DELETE : i64 = 4i64 ; pub const STATUS_CANT_CONNECT : i64 = 4i64 ; pub const METHOD_OPTIONS : i64 = 5i64 ; pub const STATUS_CONNECTED : i64 = 5i64 ; pub const METHOD_TRACE : i64 = 6i64 ; pub const STATUS_REQUESTING : i64 = 6i64 ; pub const METHOD_CONNECT : i64 = 7i64 ; pub const STATUS_BODY : i64 = 7i64 ; pub const METHOD_PATCH : i64 = 8i64 ; pub const STATUS_CONNECTION_ERROR : i64 = 8i64 ; pub const METHOD_MAX : i64 = 9i64 ; pub const STATUS_SSL_HANDSHAKE_ERROR : i64 = 9i64 ; pub const RESPONSE_CONTINUE : i64 = 100i64 ; pub const RESPONSE_SWITCHING_PROTOCOLS : i64 = 101i64 ; pub const RESPONSE_PROCESSING : i64 = 102i64 ; pub const RESPONSE_OK : i64 = 200i64 ; pub const RESPONSE_CREATED : i64 = 201i64 ; pub const RESPONSE_ACCEPTED : i64 = 202i64 ; pub const RESPONSE_NON_AUTHORITATIVE_INFORMATION : i64 = 203i64 ; pub const RESPONSE_NO_CONTENT : i64 = 204i64 ; pub const RESPONSE_RESET_CONTENT : i64 = 205i64 ; pub const RESPONSE_PARTIAL_CONTENT : i64 = 206i64 ; pub const RESPONSE_MULTI_STATUS : i64 = 207i64 ; pub const RESPONSE_ALREADY_REPORTED : i64 = 208i64 ; pub const RESPONSE_IM_USED : i64 = 226i64 ; pub const RESPONSE_MULTIPLE_CHOICES : i64 = 300i64 ; pub const RESPONSE_MOVED_PERMANENTLY : i64 = 301i64 ; pub const RESPONSE_FOUND : i64 = 302i64 ; pub const RESPONSE_SEE_OTHER : i64 = 303i64 ; pub const RESPONSE_NOT_MODIFIED : i64 = 304i64 ; pub const RESPONSE_USE_PROXY : i64 = 305i64 ; pub const RESPONSE_SWITCH_PROXY : i64 = 306i64 ; pub const RESPONSE_TEMPORARY_REDIRECT : i64 = 307i64 ; pub const RESPONSE_PERMANENT_REDIRECT : i64 = 308i64 ; pub const RESPONSE_BAD_REQUEST : i64 = 400i64 ; pub const RESPONSE_UNAUTHORIZED : i64 = 401i64 ; pub const RESPONSE_PAYMENT_REQUIRED : i64 = 402i64 ; pub const RESPONSE_FORBIDDEN : i64 = 403i64 ; pub const RESPONSE_NOT_FOUND : i64 = 404i64 ; pub const RESPONSE_METHOD_NOT_ALLOWED : i64 = 405i64 ; pub const RESPONSE_NOT_ACCEPTABLE : i64 = 406i64 ; pub const RESPONSE_PROXY_AUTHENTICATION_REQUIRED : i64 = 407i64 ; pub const RESPONSE_REQUEST_TIMEOUT : i64 = 408i64 ; pub const RESPONSE_CONFLICT : i64 = 409i64 ; pub const RESPONSE_GONE : i64 = 410i64 ; pub const RESPONSE_LENGTH_REQUIRED : i64 = 411i64 ; pub const RESPONSE_PRECONDITION_FAILED : i64 = 412i64 ; pub const RESPONSE_REQUEST_ENTITY_TOO_LARGE : i64 = 413i64 ; pub const RESPONSE_REQUEST_URI_TOO_LONG : i64 = 414i64 ; pub const RESPONSE_UNSUPPORTED_MEDIA_TYPE : i64 = 415i64 ; pub const RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE : i64 = 416i64 ; pub const RESPONSE_EXPECTATION_FAILED : i64 = 417i64 ; pub const RESPONSE_IM_A_TEAPOT : i64 = 418i64 ; pub const RESPONSE_MISDIRECTED_REQUEST : i64 = 421i64 ; pub const RESPONSE_UNPROCESSABLE_ENTITY : i64 = 422i64 ; pub const RESPONSE_LOCKED : i64 = 423i64 ; pub const RESPONSE_FAILED_DEPENDENCY : i64 = 424i64 ; pub const RESPONSE_UPGRADE_REQUIRED : i64 = 426i64 ; pub const RESPONSE_PRECONDITION_REQUIRED : i64 = 428i64 ; pub const RESPONSE_TOO_MANY_REQUESTS : i64 = 429i64 ; pub const RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE : i64 = 431i64 ; pub const RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS : i64 = 451i64 ; pub const RESPONSE_INTERNAL_SERVER_ERROR : i64 = 500i64 ; pub const RESPONSE_NOT_IMPLEMENTED : i64 = 501i64 ; pub const RESPONSE_BAD_GATEWAY : i64 = 502i64 ; pub const RESPONSE_SERVICE_UNAVAILABLE : i64 = 503i64 ; pub const RESPONSE_GATEWAY_TIMEOUT : i64 = 504i64 ; pub const RESPONSE_HTTP_VERSION_NOT_SUPPORTED : i64 = 505i64 ; pub const RESPONSE_VARIANT_ALSO_NEGOTIATES : i64 = 506i64 ; pub const RESPONSE_INSUFFICIENT_STORAGE : i64 = 507i64 ; pub const RESPONSE_LOOP_DETECTED : i64 = 508i64 ; pub const RESPONSE_NOT_EXTENDED : i64 = 510i64 ; pub const RESPONSE_NETWORK_AUTH_REQUIRED : i64 = 511i64 ; } impl HTTPClient { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = HTTPClientMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Closes the current connection, allowing reuse of this [`HTTPClient`][HTTPClient]."] # [doc = ""] # [inline] pub fn close (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . close ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Connects to a host. This needs to be done before any requests are sent.\nThe host should not have http:// prepended but will strip the protocol identifier if provided.\nIf no `port` is specified (or `-1` is used), it is automatically set to 80 for HTTP and 443 for HTTPS (if `use_ssl` is enabled).\n`verify_host` will check the SSL identity of the host if set to `true`.\n# Default Arguments\n* `port` - `-1`\n* `use_ssl` - `false`\n* `verify_host` - `true`"] # [doc = ""] # [inline] pub fn connect_to_host (& self , host : impl Into < GodotString > , port : i64 , use_ssl : bool , verify_host : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . connect_to_host ; let ret = crate :: icalls :: icallvar__str_i64_bool_bool (method_bind , self . this . sys () . as_ptr () , host . into () , port as _ , use_ssl as _ , verify_host as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "The connection to use for this client."] # [doc = ""] # [inline] pub fn connection (& self) -> Option < Ref < crate :: generated :: StreamPeer , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . get_connection ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: StreamPeer , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The size of the buffer used and maximum bytes to read per iteration. See [`read_response_body_chunk`][Self::read_response_body_chunk]."] # [doc = ""] # [inline] pub fn read_chunk_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . get_read_chunk_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the response's body length.\n**Note:** Some Web servers may not send a body length. In this case, the value returned will be `-1`. If using chunked transfer encoding, the body length will also be `-1`."] # [doc = ""] # [inline] pub fn get_response_body_length (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . get_response_body_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the response's HTTP status code."] # [doc = ""] # [inline] pub fn get_response_code (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . get_response_code ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the response headers."] # [doc = ""] # [inline] pub fn get_response_headers (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . get_response_headers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns all response headers as a Dictionary of structure `{ \"key\": \"value1; value2\" }` where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where \"; \" is used as separator.\n**Example:**\n```gdscript\n{\n    \"content-length\": 12,\n    \"Content-Type\": \"application/json; charset=UTF-8\",\n}\n```"] # [doc = ""] # [inline] pub fn get_response_headers_as_dictionary (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . get_response_headers_as_dictionary ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [`Status`][Status] constant. Need to call [`poll`][Self::poll] in order to get status updates."] # [doc = ""] # [inline] pub fn get_status (& self) -> crate :: generated :: http_client :: Status { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . get_status ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: http_client :: Status > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, this [`HTTPClient`][HTTPClient] has a response available."] # [doc = ""] # [inline] pub fn has_response (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . has_response ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, execution will block until all data is read from the response."] # [doc = ""] # [inline] pub fn is_blocking_mode_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . is_blocking_mode_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, this [`HTTPClient`][HTTPClient] has a response that is chunked."] # [doc = ""] # [inline] pub fn is_response_chunked (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . is_response_chunked ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "This needs to be called in order to have any request processed. Check results with [`get_status`][Self::get_status]."] # [doc = ""] # [inline] pub fn poll (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nGenerates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.:\n```gdscript\nvar fields = {\"username\": \"user\", \"password\": \"pass\"}\nvar query_string = http_client.query_string_from_dict(fields)\n# Returns \"username=user&password=pass\"\n```\nFurthermore, if a key has a `null` value, only the key itself is added, without equal sign and value. If the value is an array, for each value in it a pair with the same key is added.\n```gdscript\nvar fields = {\"single\": 123, \"not_valued\": null, \"multiple\": [22, 33, 44]}\nvar query_string = http_client.query_string_from_dict(fields)\n# Returns \"single=123&not_valued&multiple=22&multiple=33&multiple=44\"\n```"] # [doc = ""] # [inline] pub fn query_string_from_dict (& self , fields : Dictionary) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . query_string_from_dict ; let ret = crate :: icalls :: icallvar__dict (method_bind , self . this . sys () . as_ptr () , fields) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Reads one chunk from the response."] # [doc = ""] # [inline] pub fn read_response_body_chunk (& self) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . read_response_body_chunk ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSends a request to the connected host.\nThe URL parameter is usually just the part after the host, so for `http://somehost.com/index.php`, it is `/index.php`. When sending requests to an HTTP proxy server, it should be an absolute URL. For [`HTTPClient.METHOD_OPTIONS`][HTTPClient::METHOD_OPTIONS] requests, `*` is also allowed. For [`HTTPClient.METHOD_CONNECT`][HTTPClient::METHOD_CONNECT] requests, it should be the authority component (`host:port`).\nHeaders are HTTP request headers. For available HTTP methods, see [`Method`][Method].\nTo create a POST request with query strings to push to the server, do:\n```gdscript\nvar fields = {\"username\" : \"user\", \"password\" : \"pass\"}\nvar query_string = http_client.query_string_from_dict(fields)\nvar headers = [\"Content-Type: application/x-www-form-urlencoded\", \"Content-Length: \" + str(query_string.length())]\nvar result = http_client.request(http_client.METHOD_POST, \"/index.php\", headers, query_string)\n```\n**Note:** The `request_data` parameter is ignored if `method` is [`HTTPClient.METHOD_GET`][HTTPClient::METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [`String.http_escape`][GodotString::http_escape] for an example.\n# Default Arguments\n* `body` - `\"\"`"] # [doc = ""] # [inline] pub fn request (& self , method : i64 , url : impl Into < GodotString > , headers : PoolArray < GodotString > , body : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . request ; let ret = crate :: icalls :: icallvar__i64_str_strarr_str (method_bind , self . this . sys () . as_ptr () , method as _ , url . into () , headers , body . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Sends a raw request to the connected host.\nThe URL parameter is usually just the part after the host, so for `http://somehost.com/index.php`, it is `/index.php`. When sending requests to an HTTP proxy server, it should be an absolute URL. For [`HTTPClient.METHOD_OPTIONS`][HTTPClient::METHOD_OPTIONS] requests, `*` is also allowed. For [`HTTPClient.METHOD_CONNECT`][HTTPClient::METHOD_CONNECT] requests, it should be the authority component (`host:port`).\nHeaders are HTTP request headers. For available HTTP methods, see [`Method`][Method].\nSends the body data raw, as a byte array and does not encode it in any way."] # [doc = ""] # [inline] pub fn request_raw (& self , method : i64 , url : impl Into < GodotString > , headers : PoolArray < GodotString > , body : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . request_raw ; let ret = crate :: icalls :: icallvar__i64_str_strarr_bytearr (method_bind , self . this . sys () . as_ptr () , method as _ , url . into () , headers , body) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "If `true`, execution will block until all data is read from the response."] # [doc = ""] # [inline] pub fn set_blocking_mode (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . set_blocking_mode ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The connection to use for this client."] # [doc = ""] # [inline] pub fn set_connection (& self , connection : impl AsArg < crate :: generated :: StreamPeer >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . set_connection ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , connection . as_arg_ptr ()) ; } } # [doc = "Sets the proxy server for HTTP requests.\nThe proxy server is unset if `host` is empty or `port` is -1."] # [doc = ""] # [inline] pub fn set_http_proxy (& self , host : impl Into < GodotString > , port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . set_http_proxy ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , port as _) ; } } # [doc = "Sets the proxy server for HTTPS requests.\nThe proxy server is unset if `host` is empty or `port` is -1."] # [doc = ""] # [inline] pub fn set_https_proxy (& self , host : impl Into < GodotString > , port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . set_https_proxy ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , port as _) ; } } # [doc = "The size of the buffer used and maximum bytes to read per iteration. See [`read_response_body_chunk`][Self::read_response_body_chunk]."] # [doc = ""] # [inline] pub fn set_read_chunk_size (& self , bytes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPClientMethodTable :: get (get_api ()) . set_read_chunk_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bytes as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for HTTPClient { } unsafe impl GodotObject for HTTPClient { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "HTTPClient" } } impl std :: ops :: Deref for HTTPClient { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HTTPClient { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for HTTPClient { } unsafe impl SubClass < crate :: generated :: Object > for HTTPClient { } impl Instanciable for HTTPClient { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { HTTPClient :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct HTTPClientMethodTable { pub class_constructor : sys :: godot_class_constructor , pub close : * mut sys :: godot_method_bind , pub connect_to_host : * mut sys :: godot_method_bind , pub get_connection : * mut sys :: godot_method_bind , pub get_read_chunk_size : * mut sys :: godot_method_bind , pub get_response_body_length : * mut sys :: godot_method_bind , pub get_response_code : * mut sys :: godot_method_bind , pub get_response_headers : * mut sys :: godot_method_bind , pub get_response_headers_as_dictionary : * mut sys :: godot_method_bind , pub get_status : * mut sys :: godot_method_bind , pub has_response : * mut sys :: godot_method_bind , pub is_blocking_mode_enabled : * mut sys :: godot_method_bind , pub is_response_chunked : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind , pub query_string_from_dict : * mut sys :: godot_method_bind , pub read_response_body_chunk : * mut sys :: godot_method_bind , pub request : * mut sys :: godot_method_bind , pub request_raw : * mut sys :: godot_method_bind , pub set_blocking_mode : * mut sys :: godot_method_bind , pub set_connection : * mut sys :: godot_method_bind , pub set_http_proxy : * mut sys :: godot_method_bind , pub set_https_proxy : * mut sys :: godot_method_bind , pub set_read_chunk_size : * mut sys :: godot_method_bind } impl HTTPClientMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : HTTPClientMethodTable = HTTPClientMethodTable { class_constructor : None , close : 0 as * mut sys :: godot_method_bind , connect_to_host : 0 as * mut sys :: godot_method_bind , get_connection : 0 as * mut sys :: godot_method_bind , get_read_chunk_size : 0 as * mut sys :: godot_method_bind , get_response_body_length : 0 as * mut sys :: godot_method_bind , get_response_code : 0 as * mut sys :: godot_method_bind , get_response_headers : 0 as * mut sys :: godot_method_bind , get_response_headers_as_dictionary : 0 as * mut sys :: godot_method_bind , get_status : 0 as * mut sys :: godot_method_bind , has_response : 0 as * mut sys :: godot_method_bind , is_blocking_mode_enabled : 0 as * mut sys :: godot_method_bind , is_response_chunked : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind , query_string_from_dict : 0 as * mut sys :: godot_method_bind , read_response_body_chunk : 0 as * mut sys :: godot_method_bind , request : 0 as * mut sys :: godot_method_bind , request_raw : 0 as * mut sys :: godot_method_bind , set_blocking_mode : 0 as * mut sys :: godot_method_bind , set_connection : 0 as * mut sys :: godot_method_bind , set_http_proxy : 0 as * mut sys :: godot_method_bind , set_https_proxy : 0 as * mut sys :: godot_method_bind , set_read_chunk_size : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { HTTPClientMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "HTTPClient\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\0" . as_ptr () as * const c_char) ; table . connect_to_host = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_host\0" . as_ptr () as * const c_char) ; table . get_connection = (gd_api . godot_method_bind_get_method) (class_name , "get_connection\0" . as_ptr () as * const c_char) ; table . get_read_chunk_size = (gd_api . godot_method_bind_get_method) (class_name , "get_read_chunk_size\0" . as_ptr () as * const c_char) ; table . get_response_body_length = (gd_api . godot_method_bind_get_method) (class_name , "get_response_body_length\0" . as_ptr () as * const c_char) ; table . get_response_code = (gd_api . godot_method_bind_get_method) (class_name , "get_response_code\0" . as_ptr () as * const c_char) ; table . get_response_headers = (gd_api . godot_method_bind_get_method) (class_name , "get_response_headers\0" . as_ptr () as * const c_char) ; table . get_response_headers_as_dictionary = (gd_api . godot_method_bind_get_method) (class_name , "get_response_headers_as_dictionary\0" . as_ptr () as * const c_char) ; table . get_status = (gd_api . godot_method_bind_get_method) (class_name , "get_status\0" . as_ptr () as * const c_char) ; table . has_response = (gd_api . godot_method_bind_get_method) (class_name , "has_response\0" . as_ptr () as * const c_char) ; table . is_blocking_mode_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_blocking_mode_enabled\0" . as_ptr () as * const c_char) ; table . is_response_chunked = (gd_api . godot_method_bind_get_method) (class_name , "is_response_chunked\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . query_string_from_dict = (gd_api . godot_method_bind_get_method) (class_name , "query_string_from_dict\0" . as_ptr () as * const c_char) ; table . read_response_body_chunk = (gd_api . godot_method_bind_get_method) (class_name , "read_response_body_chunk\0" . as_ptr () as * const c_char) ; table . request = (gd_api . godot_method_bind_get_method) (class_name , "request\0" . as_ptr () as * const c_char) ; table . request_raw = (gd_api . godot_method_bind_get_method) (class_name , "request_raw\0" . as_ptr () as * const c_char) ; table . set_blocking_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blocking_mode\0" . as_ptr () as * const c_char) ; table . set_connection = (gd_api . godot_method_bind_get_method) (class_name , "set_connection\0" . as_ptr () as * const c_char) ; table . set_http_proxy = (gd_api . godot_method_bind_get_method) (class_name , "set_http_proxy\0" . as_ptr () as * const c_char) ; table . set_https_proxy = (gd_api . godot_method_bind_get_method) (class_name , "set_https_proxy\0" . as_ptr () as * const c_char) ; table . set_read_chunk_size = (gd_api . godot_method_bind_get_method) (class_name , "set_read_chunk_size\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::http_client::private::HTTPClient;
            
            pub mod http_request {
                # ! [doc = "This module contains types related to the API class [`HTTPRequest`][super::HTTPRequest]."] pub (crate) mod private { # [doc = "`core class HTTPRequest` inherits `Node` (manually managed).\n\nThis class has related types in the [`http_request`][super::http_request] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_httprequest.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`HTTPRequest` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<HTTPRequest>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nHTTPRequest inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct HTTPRequest { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: HTTPRequest ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct HttpRequestResult (pub i64) ; impl HttpRequestResult { pub const SUCCESS : HttpRequestResult = HttpRequestResult (0i64) ; pub const CHUNKED_BODY_SIZE_MISMATCH : HttpRequestResult = HttpRequestResult (1i64) ; pub const CANT_CONNECT : HttpRequestResult = HttpRequestResult (2i64) ; pub const CANT_RESOLVE : HttpRequestResult = HttpRequestResult (3i64) ; pub const CONNECTION_ERROR : HttpRequestResult = HttpRequestResult (4i64) ; pub const SSL_HANDSHAKE_ERROR : HttpRequestResult = HttpRequestResult (5i64) ; pub const NO_RESPONSE : HttpRequestResult = HttpRequestResult (6i64) ; pub const BODY_SIZE_LIMIT_EXCEEDED : HttpRequestResult = HttpRequestResult (7i64) ; pub const REQUEST_FAILED : HttpRequestResult = HttpRequestResult (8i64) ; pub const DOWNLOAD_FILE_CANT_OPEN : HttpRequestResult = HttpRequestResult (9i64) ; pub const DOWNLOAD_FILE_WRITE_ERROR : HttpRequestResult = HttpRequestResult (10i64) ; pub const REDIRECT_LIMIT_REACHED : HttpRequestResult = HttpRequestResult (11i64) ; pub const TIMEOUT : HttpRequestResult = HttpRequestResult (12i64) ; } impl From < i64 > for HttpRequestResult { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < HttpRequestResult > for i64 { # [inline] fn from (v : HttpRequestResult) -> Self { v . 0 } } impl FromVariant for HttpRequestResult { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl HTTPRequest { pub const RESULT_SUCCESS : i64 = 0i64 ; pub const RESULT_CHUNKED_BODY_SIZE_MISMATCH : i64 = 1i64 ; pub const RESULT_CANT_CONNECT : i64 = 2i64 ; pub const RESULT_CANT_RESOLVE : i64 = 3i64 ; pub const RESULT_CONNECTION_ERROR : i64 = 4i64 ; pub const RESULT_SSL_HANDSHAKE_ERROR : i64 = 5i64 ; pub const RESULT_NO_RESPONSE : i64 = 6i64 ; pub const RESULT_BODY_SIZE_LIMIT_EXCEEDED : i64 = 7i64 ; pub const RESULT_REQUEST_FAILED : i64 = 8i64 ; pub const RESULT_DOWNLOAD_FILE_CANT_OPEN : i64 = 9i64 ; pub const RESULT_DOWNLOAD_FILE_WRITE_ERROR : i64 = 10i64 ; pub const RESULT_REDIRECT_LIMIT_REACHED : i64 = 11i64 ; pub const RESULT_TIMEOUT : i64 = 12i64 ; } impl HTTPRequest { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = HTTPRequestMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Cancels the current request."] # [doc = ""] # [inline] pub fn cancel_request (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . cancel_request ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the response body length.\n**Note:** Some Web servers may not send a body length. In this case, the value returned will be `-1`. If using chunked transfer encoding, the body length will also be `-1`."] # [doc = ""] # [inline] pub fn get_body_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . get_body_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Maximum allowed size for response bodies (`-1` means no limit). When only small files are expected, this can be used to prevent disallow receiving files that are too large, preventing potential denial of service attacks."] # [doc = ""] # [inline] pub fn body_size_limit (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . get_body_size_limit ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The size of the buffer used and maximum bytes to read per iteration. See [`HTTPClient.read_chunk_size`][HTTPClient::read_chunk_size].\nSet this to a lower value (e.g. 4096 for 4 KiB) when downloading small files to decrease memory usage at the cost of download speeds."] # [doc = ""] # [inline] pub fn download_chunk_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . get_download_chunk_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The file to download into. If set to a non-empty string, the request output will be written to the file located at the path. If a file already exists at the specified location, it will be overwritten as soon as body data begins to be received.\n**Note:** Folders are not automatically created when the file is created. If [`download_file`][Self::download_file] points to a subfolder, it's recommended to create the necessary folders beforehand using [`Directory.make_dir_recursive`][Directory::make_dir_recursive] to ensure the file can be written."] # [doc = ""] # [inline] pub fn download_file (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . get_download_file ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the amount of bytes this HTTPRequest downloaded."] # [doc = ""] # [inline] pub fn get_downloaded_bytes (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . get_downloaded_bytes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the current status of the underlying [`HTTPClient`][HTTPClient]. See [enum HTTPClient.Status]."] # [doc = ""] # [inline] pub fn get_http_client_status (& self) -> crate :: generated :: http_client :: Status { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . get_http_client_status ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: http_client :: Status > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Maximum number of allowed redirects. This is used to prevent endless redirect loops."] # [doc = ""] # [inline] pub fn max_redirects (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . get_max_redirects ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If set to a value greater than `0.0` before the request starts, the HTTP request will time out after `timeout` seconds have passed and the request is not _completed_ yet. For small HTTP requests such as REST API usage, set [`timeout`][Self::timeout] to a value between `10.0` and `30.0` to prevent the application from getting stuck if the request fails to get a response in a timely manner. For file downloads, leave this to `0.0` to prevent the download from failing if it takes too much time."] # [doc = ""] # [inline] pub fn timeout (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . get_timeout ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, multithreading is used to improve performance."] # [doc = ""] # [inline] pub fn is_using_threads (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . is_using_threads ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Creates request on the underlying [`HTTPClient`][HTTPClient]. If there is no configuration errors, it tries to connect using [`HTTPClient.connect_to_host`][HTTPClient::connect_to_host] and passes parameters onto [`HTTPClient.request`][HTTPClient::request].\nReturns [`OK`][Self::OK] if request is successfully created. (Does not imply that the server has responded), [`ERR_UNCONFIGURED`][Self::ERR_UNCONFIGURED] if not in the tree, [`ERR_BUSY`][Self::ERR_BUSY] if still processing previous request, [`ERR_INVALID_PARAMETER`][Self::ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [`ERR_CANT_CONNECT`][Self::ERR_CANT_CONNECT] if not using thread and the [`HTTPClient`][HTTPClient] cannot connect to host.\n**Note:** When `method` is [`HTTPClient.METHOD_GET`][HTTPClient::METHOD_GET], the payload sent via `request_data` might be ignored by the server or even cause the server to reject the request (check [RFC 7231 section 4.3.1](https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1) for more details). As a workaround, you can send data as a query string in the URL. See [`String.http_escape`][GodotString::http_escape] for an example.\n# Default Arguments\n* `custom_headers` - `PoolStringArray(  )`\n* `ssl_validate_domain` - `true`\n* `method` - `0`\n* `request_data` - `\"\"`"] # [doc = ""] # [inline] pub fn request (& self , url : impl Into < GodotString > , custom_headers : PoolArray < GodotString > , ssl_validate_domain : bool , method : i64 , request_data : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . request ; let ret = crate :: icalls :: icallvar__str_strarr_bool_i64_str (method_bind , self . this . sys () . as_ptr () , url . into () , custom_headers , ssl_validate_domain as _ , method as _ , request_data . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Creates request on the underlying [`HTTPClient`][HTTPClient] using a raw array of bytes for the request body. If there is no configuration errors, it tries to connect using [`HTTPClient.connect_to_host`][HTTPClient::connect_to_host] and passes parameters onto [`HTTPClient.request`][HTTPClient::request].\nReturns [`OK`][Self::OK] if request is successfully created. (Does not imply that the server has responded), [`ERR_UNCONFIGURED`][Self::ERR_UNCONFIGURED] if not in the tree, [`ERR_BUSY`][Self::ERR_BUSY] if still processing previous request, [`ERR_INVALID_PARAMETER`][Self::ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [`ERR_CANT_CONNECT`][Self::ERR_CANT_CONNECT] if not using thread and the [`HTTPClient`][HTTPClient] cannot connect to host.\n# Default Arguments\n* `custom_headers` - `PoolStringArray(  )`\n* `ssl_validate_domain` - `true`\n* `method` - `0`\n* `request_data_raw` - `PoolByteArray(  )`"] # [doc = ""] # [inline] pub fn request_raw (& self , url : impl Into < GodotString > , custom_headers : PoolArray < GodotString > , ssl_validate_domain : bool , method : i64 , request_data_raw : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . request_raw ; let ret = crate :: icalls :: icallvar__str_strarr_bool_i64_bytearr (method_bind , self . this . sys () . as_ptr () , url . into () , custom_headers , ssl_validate_domain as _ , method as _ , request_data_raw) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Maximum allowed size for response bodies (`-1` means no limit). When only small files are expected, this can be used to prevent disallow receiving files that are too large, preventing potential denial of service attacks."] # [doc = ""] # [inline] pub fn set_body_size_limit (& self , bytes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . set_body_size_limit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bytes as _) ; } } # [doc = "The size of the buffer used and maximum bytes to read per iteration. See [`HTTPClient.read_chunk_size`][HTTPClient::read_chunk_size].\nSet this to a lower value (e.g. 4096 for 4 KiB) when downloading small files to decrease memory usage at the cost of download speeds."] # [doc = ""] # [inline] pub fn set_download_chunk_size (& self , chunk_size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . set_download_chunk_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , chunk_size as _) ; } } # [doc = "The file to download into. If set to a non-empty string, the request output will be written to the file located at the path. If a file already exists at the specified location, it will be overwritten as soon as body data begins to be received.\n**Note:** Folders are not automatically created when the file is created. If [`download_file`][Self::download_file] points to a subfolder, it's recommended to create the necessary folders beforehand using [`Directory.make_dir_recursive`][Directory::make_dir_recursive] to ensure the file can be written."] # [doc = ""] # [inline] pub fn set_download_file (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . set_download_file ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "Sets the proxy server for HTTP requests.\nThe proxy server is unset if `host` is empty or `port` is -1."] # [doc = ""] # [inline] pub fn set_http_proxy (& self , host : impl Into < GodotString > , port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . set_http_proxy ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , port as _) ; } } # [doc = "Sets the proxy server for HTTPS requests.\nThe proxy server is unset if `host` is empty or `port` is -1."] # [doc = ""] # [inline] pub fn set_https_proxy (& self , host : impl Into < GodotString > , port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . set_https_proxy ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , port as _) ; } } # [doc = "Maximum number of allowed redirects. This is used to prevent endless redirect loops."] # [doc = ""] # [inline] pub fn set_max_redirects (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . set_max_redirects ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "If set to a value greater than `0.0` before the request starts, the HTTP request will time out after `timeout` seconds have passed and the request is not _completed_ yet. For small HTTP requests such as REST API usage, set [`timeout`][Self::timeout] to a value between `10.0` and `30.0` to prevent the application from getting stuck if the request fails to get a response in a timely manner. For file downloads, leave this to `0.0` to prevent the download from failing if it takes too much time."] # [doc = ""] # [inline] pub fn set_timeout (& self , timeout : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . set_timeout ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , timeout as _) ; } } # [doc = "If `true`, multithreading is used to improve performance."] # [doc = ""] # [inline] pub fn set_use_threads (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HTTPRequestMethodTable :: get (get_api ()) . set_use_threads ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for HTTPRequest { } unsafe impl GodotObject for HTTPRequest { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "HTTPRequest" } } impl QueueFree for HTTPRequest { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for HTTPRequest { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HTTPRequest { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for HTTPRequest { } unsafe impl SubClass < crate :: generated :: Object > for HTTPRequest { } impl Instanciable for HTTPRequest { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { HTTPRequest :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct HTTPRequestMethodTable { pub class_constructor : sys :: godot_class_constructor , pub cancel_request : * mut sys :: godot_method_bind , pub get_body_size : * mut sys :: godot_method_bind , pub get_body_size_limit : * mut sys :: godot_method_bind , pub get_download_chunk_size : * mut sys :: godot_method_bind , pub get_download_file : * mut sys :: godot_method_bind , pub get_downloaded_bytes : * mut sys :: godot_method_bind , pub get_http_client_status : * mut sys :: godot_method_bind , pub get_max_redirects : * mut sys :: godot_method_bind , pub get_timeout : * mut sys :: godot_method_bind , pub is_using_threads : * mut sys :: godot_method_bind , pub request : * mut sys :: godot_method_bind , pub request_raw : * mut sys :: godot_method_bind , pub set_body_size_limit : * mut sys :: godot_method_bind , pub set_download_chunk_size : * mut sys :: godot_method_bind , pub set_download_file : * mut sys :: godot_method_bind , pub set_http_proxy : * mut sys :: godot_method_bind , pub set_https_proxy : * mut sys :: godot_method_bind , pub set_max_redirects : * mut sys :: godot_method_bind , pub set_timeout : * mut sys :: godot_method_bind , pub set_use_threads : * mut sys :: godot_method_bind } impl HTTPRequestMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : HTTPRequestMethodTable = HTTPRequestMethodTable { class_constructor : None , cancel_request : 0 as * mut sys :: godot_method_bind , get_body_size : 0 as * mut sys :: godot_method_bind , get_body_size_limit : 0 as * mut sys :: godot_method_bind , get_download_chunk_size : 0 as * mut sys :: godot_method_bind , get_download_file : 0 as * mut sys :: godot_method_bind , get_downloaded_bytes : 0 as * mut sys :: godot_method_bind , get_http_client_status : 0 as * mut sys :: godot_method_bind , get_max_redirects : 0 as * mut sys :: godot_method_bind , get_timeout : 0 as * mut sys :: godot_method_bind , is_using_threads : 0 as * mut sys :: godot_method_bind , request : 0 as * mut sys :: godot_method_bind , request_raw : 0 as * mut sys :: godot_method_bind , set_body_size_limit : 0 as * mut sys :: godot_method_bind , set_download_chunk_size : 0 as * mut sys :: godot_method_bind , set_download_file : 0 as * mut sys :: godot_method_bind , set_http_proxy : 0 as * mut sys :: godot_method_bind , set_https_proxy : 0 as * mut sys :: godot_method_bind , set_max_redirects : 0 as * mut sys :: godot_method_bind , set_timeout : 0 as * mut sys :: godot_method_bind , set_use_threads : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { HTTPRequestMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "HTTPRequest\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . cancel_request = (gd_api . godot_method_bind_get_method) (class_name , "cancel_request\0" . as_ptr () as * const c_char) ; table . get_body_size = (gd_api . godot_method_bind_get_method) (class_name , "get_body_size\0" . as_ptr () as * const c_char) ; table . get_body_size_limit = (gd_api . godot_method_bind_get_method) (class_name , "get_body_size_limit\0" . as_ptr () as * const c_char) ; table . get_download_chunk_size = (gd_api . godot_method_bind_get_method) (class_name , "get_download_chunk_size\0" . as_ptr () as * const c_char) ; table . get_download_file = (gd_api . godot_method_bind_get_method) (class_name , "get_download_file\0" . as_ptr () as * const c_char) ; table . get_downloaded_bytes = (gd_api . godot_method_bind_get_method) (class_name , "get_downloaded_bytes\0" . as_ptr () as * const c_char) ; table . get_http_client_status = (gd_api . godot_method_bind_get_method) (class_name , "get_http_client_status\0" . as_ptr () as * const c_char) ; table . get_max_redirects = (gd_api . godot_method_bind_get_method) (class_name , "get_max_redirects\0" . as_ptr () as * const c_char) ; table . get_timeout = (gd_api . godot_method_bind_get_method) (class_name , "get_timeout\0" . as_ptr () as * const c_char) ; table . is_using_threads = (gd_api . godot_method_bind_get_method) (class_name , "is_using_threads\0" . as_ptr () as * const c_char) ; table . request = (gd_api . godot_method_bind_get_method) (class_name , "request\0" . as_ptr () as * const c_char) ; table . request_raw = (gd_api . godot_method_bind_get_method) (class_name , "request_raw\0" . as_ptr () as * const c_char) ; table . set_body_size_limit = (gd_api . godot_method_bind_get_method) (class_name , "set_body_size_limit\0" . as_ptr () as * const c_char) ; table . set_download_chunk_size = (gd_api . godot_method_bind_get_method) (class_name , "set_download_chunk_size\0" . as_ptr () as * const c_char) ; table . set_download_file = (gd_api . godot_method_bind_get_method) (class_name , "set_download_file\0" . as_ptr () as * const c_char) ; table . set_http_proxy = (gd_api . godot_method_bind_get_method) (class_name , "set_http_proxy\0" . as_ptr () as * const c_char) ; table . set_https_proxy = (gd_api . godot_method_bind_get_method) (class_name , "set_https_proxy\0" . as_ptr () as * const c_char) ; table . set_max_redirects = (gd_api . godot_method_bind_get_method) (class_name , "set_max_redirects\0" . as_ptr () as * const c_char) ; table . set_timeout = (gd_api . godot_method_bind_get_method) (class_name , "set_timeout\0" . as_ptr () as * const c_char) ; table . set_use_threads = (gd_api . godot_method_bind_get_method) (class_name , "set_use_threads\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::http_request::private::HTTPRequest;
            
            pub mod hashing_context {
                # ! [doc = "This module contains types related to the API class [`HashingContext`][super::HashingContext]."] pub (crate) mod private { # [doc = "`core class HashingContext` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`hashing_context`][super::hashing_context] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_hashingcontext.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nHashingContext inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct HashingContext { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: HashingContext ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct HashType (pub i64) ; impl HashType { pub const MD5 : HashType = HashType (0i64) ; pub const SHA1 : HashType = HashType (1i64) ; pub const SHA256 : HashType = HashType (2i64) ; } impl From < i64 > for HashType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < HashType > for i64 { # [inline] fn from (v : HashType) -> Self { v . 0 } } impl FromVariant for HashType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl HashingContext { pub const HASH_MD5 : i64 = 0i64 ; pub const HASH_SHA1 : i64 = 1i64 ; pub const HASH_SHA256 : i64 = 2i64 ; } impl HashingContext { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = HashingContextMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Closes the current context, and return the computed hash."] # [doc = ""] # [inline] pub fn finish (& self) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = HashingContextMethodTable :: get (get_api ()) . finish ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Starts a new hash computation of the given `type` (e.g. [`HASH_SHA256`][Self::HASH_SHA256] to start computation of a SHA-256)."] # [doc = ""] # [inline] pub fn start (& self , type_ : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = HashingContextMethodTable :: get (get_api ()) . start ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Updates the computation with the given `chunk` of data."] # [doc = ""] # [inline] pub fn update (& self , chunk : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = HashingContextMethodTable :: get (get_api ()) . update ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , chunk) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } } impl gdnative_core :: private :: godot_object :: Sealed for HashingContext { } unsafe impl GodotObject for HashingContext { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "HashingContext" } } impl std :: ops :: Deref for HashingContext { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HashingContext { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for HashingContext { } unsafe impl SubClass < crate :: generated :: Object > for HashingContext { } impl Instanciable for HashingContext { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { HashingContext :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct HashingContextMethodTable { pub class_constructor : sys :: godot_class_constructor , pub finish : * mut sys :: godot_method_bind , pub start : * mut sys :: godot_method_bind , pub update : * mut sys :: godot_method_bind } impl HashingContextMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : HashingContextMethodTable = HashingContextMethodTable { class_constructor : None , finish : 0 as * mut sys :: godot_method_bind , start : 0 as * mut sys :: godot_method_bind , update : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { HashingContextMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "HashingContext\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . finish = (gd_api . godot_method_bind_get_method) (class_name , "finish\0" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\0" . as_ptr () as * const c_char) ; table . update = (gd_api . godot_method_bind_get_method) (class_name , "update\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::hashing_context::private::HashingContext;
            
            pub(crate) mod height_map_shape {
                # ! [doc = "This module contains types related to the API class [`HeightMapShape`][super::HeightMapShape]."] pub (crate) mod private { # [doc = "`core class HeightMapShape` inherits `Shape` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_heightmapshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nHeightMapShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct HeightMapShape { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: HeightMapShape ; impl HeightMapShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = HeightMapShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Height map data, pool array must be of [`map_width`][Self::map_width] * [`map_depth`][Self::map_depth] size."] # [doc = ""] # [inline] pub fn map_data (& self) -> PoolArray < f32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = HeightMapShapeMethodTable :: get (get_api ()) . get_map_data ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < f32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Number of vertices in the depth of the height map. Changing this will resize the [`map_data`][Self::map_data]."] # [doc = ""] # [inline] pub fn map_depth (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = HeightMapShapeMethodTable :: get (get_api ()) . get_map_depth ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Number of vertices in the width of the height map. Changing this will resize the [`map_data`][Self::map_data]."] # [doc = ""] # [inline] pub fn map_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = HeightMapShapeMethodTable :: get (get_api ()) . get_map_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Height map data, pool array must be of [`map_width`][Self::map_width] * [`map_depth`][Self::map_depth] size."] # [doc = ""] # [inline] pub fn set_map_data (& self , data : PoolArray < f32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HeightMapShapeMethodTable :: get (get_api ()) . set_map_data ; let ret = crate :: icalls :: icallvar__f32arr (method_bind , self . this . sys () . as_ptr () , data) ; } } # [doc = "Number of vertices in the depth of the height map. Changing this will resize the [`map_data`][Self::map_data]."] # [doc = ""] # [inline] pub fn set_map_depth (& self , height : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HeightMapShapeMethodTable :: get (get_api ()) . set_map_depth ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = "Number of vertices in the width of the height map. Changing this will resize the [`map_data`][Self::map_data]."] # [doc = ""] # [inline] pub fn set_map_width (& self , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HeightMapShapeMethodTable :: get (get_api ()) . set_map_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , width as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for HeightMapShape { } unsafe impl GodotObject for HeightMapShape { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "HeightMapShape" } } impl std :: ops :: Deref for HeightMapShape { type Target = crate :: generated :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HeightMapShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape > for HeightMapShape { } unsafe impl SubClass < crate :: generated :: Resource > for HeightMapShape { } unsafe impl SubClass < crate :: generated :: Reference > for HeightMapShape { } unsafe impl SubClass < crate :: generated :: Object > for HeightMapShape { } impl Instanciable for HeightMapShape { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { HeightMapShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct HeightMapShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_map_data : * mut sys :: godot_method_bind , pub get_map_depth : * mut sys :: godot_method_bind , pub get_map_width : * mut sys :: godot_method_bind , pub set_map_data : * mut sys :: godot_method_bind , pub set_map_depth : * mut sys :: godot_method_bind , pub set_map_width : * mut sys :: godot_method_bind } impl HeightMapShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : HeightMapShapeMethodTable = HeightMapShapeMethodTable { class_constructor : None , get_map_data : 0 as * mut sys :: godot_method_bind , get_map_depth : 0 as * mut sys :: godot_method_bind , get_map_width : 0 as * mut sys :: godot_method_bind , set_map_data : 0 as * mut sys :: godot_method_bind , set_map_depth : 0 as * mut sys :: godot_method_bind , set_map_width : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { HeightMapShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "HeightMapShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_map_data = (gd_api . godot_method_bind_get_method) (class_name , "get_map_data\0" . as_ptr () as * const c_char) ; table . get_map_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_map_depth\0" . as_ptr () as * const c_char) ; table . get_map_width = (gd_api . godot_method_bind_get_method) (class_name , "get_map_width\0" . as_ptr () as * const c_char) ; table . set_map_data = (gd_api . godot_method_bind_get_method) (class_name , "set_map_data\0" . as_ptr () as * const c_char) ; table . set_map_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_map_depth\0" . as_ptr () as * const c_char) ; table . set_map_width = (gd_api . godot_method_bind_get_method) (class_name , "set_map_width\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::height_map_shape::private::HeightMapShape;
            
            pub mod hinge_joint {
                # ! [doc = "This module contains types related to the API class [`HingeJoint`][super::HingeJoint]."] pub (crate) mod private { # [doc = "`core class HingeJoint` inherits `Joint` (manually managed).\n\nThis class has related types in the [`hinge_joint`][super::hinge_joint] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_hingejoint.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`HingeJoint` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<HingeJoint>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nHingeJoint inherits methods from:\n - [Joint](struct.Joint.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct HingeJoint { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: HingeJoint ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flag (pub i64) ; impl Flag { pub const USE_LIMIT : Flag = Flag (0i64) ; pub const ENABLE_MOTOR : Flag = Flag (1i64) ; pub const MAX : Flag = Flag (2i64) ; } impl From < i64 > for Flag { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flag > for i64 { # [inline] fn from (v : Flag) -> Self { v . 0 } } impl FromVariant for Flag { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Param (pub i64) ; impl Param { pub const BIAS : Param = Param (0i64) ; pub const LIMIT_UPPER : Param = Param (1i64) ; pub const LIMIT_LOWER : Param = Param (2i64) ; pub const LIMIT_BIAS : Param = Param (3i64) ; pub const LIMIT_SOFTNESS : Param = Param (4i64) ; pub const LIMIT_RELAXATION : Param = Param (5i64) ; pub const MOTOR_TARGET_VELOCITY : Param = Param (6i64) ; pub const MOTOR_MAX_IMPULSE : Param = Param (7i64) ; pub const MAX : Param = Param (8i64) ; } impl From < i64 > for Param { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Param > for i64 { # [inline] fn from (v : Param) -> Self { v . 0 } } impl FromVariant for Param { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl HingeJoint { pub const FLAG_USE_LIMIT : i64 = 0i64 ; pub const PARAM_BIAS : i64 = 0i64 ; pub const FLAG_ENABLE_MOTOR : i64 = 1i64 ; pub const PARAM_LIMIT_UPPER : i64 = 1i64 ; pub const FLAG_MAX : i64 = 2i64 ; pub const PARAM_LIMIT_LOWER : i64 = 2i64 ; pub const PARAM_LIMIT_BIAS : i64 = 3i64 ; pub const PARAM_LIMIT_SOFTNESS : i64 = 4i64 ; pub const PARAM_LIMIT_RELAXATION : i64 = 5i64 ; pub const PARAM_MOTOR_TARGET_VELOCITY : i64 = 6i64 ; pub const PARAM_MOTOR_MAX_IMPULSE : i64 = 7i64 ; pub const PARAM_MAX : i64 = 8i64 ; } impl HingeJoint { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = HingeJointMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the value of the specified flag."] # [doc = ""] # [inline] pub fn flag (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = HingeJointMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flag as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the value of the specified parameter."] # [doc = ""] # [inline] pub fn param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = HingeJointMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, enables the specified flag."] # [doc = ""] # [inline] pub fn set_flag (& self , flag : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HingeJointMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , flag as _ , enabled as _) ; } } # [doc = "Sets the value of the specified parameter."] # [doc = ""] # [inline] pub fn set_param (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = HingeJointMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , param as _ , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for HingeJoint { } unsafe impl GodotObject for HingeJoint { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "HingeJoint" } } impl QueueFree for HingeJoint { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for HingeJoint { type Target = crate :: generated :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for HingeJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Joint > for HingeJoint { } unsafe impl SubClass < crate :: generated :: Spatial > for HingeJoint { } unsafe impl SubClass < crate :: generated :: Node > for HingeJoint { } unsafe impl SubClass < crate :: generated :: Object > for HingeJoint { } impl Instanciable for HingeJoint { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { HingeJoint :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct HingeJointMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_flag : * mut sys :: godot_method_bind , pub get_param : * mut sys :: godot_method_bind , pub set_flag : * mut sys :: godot_method_bind , pub set_param : * mut sys :: godot_method_bind } impl HingeJointMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : HingeJointMethodTable = HingeJointMethodTable { class_constructor : None , get_flag : 0 as * mut sys :: godot_method_bind , get_param : 0 as * mut sys :: godot_method_bind , set_flag : 0 as * mut sys :: godot_method_bind , set_param : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { HingeJointMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "HingeJoint\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_flag\0" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . set_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_flag\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::hinge_joint::private::HingeJoint;
            
            pub mod ip {
                # ! [doc = "This module contains types related to the API class [`IP`][super::IP]."] pub (crate) mod private { # [doc = "`core singleton class IP` inherits `Object` (manually managed).\n\nThis class has related types in the [`ip`][super::ip] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_ip.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nIP inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct IP { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: IP ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ResolverStatus (pub i64) ; impl ResolverStatus { pub const NONE : ResolverStatus = ResolverStatus (0i64) ; pub const WAITING : ResolverStatus = ResolverStatus (1i64) ; pub const DONE : ResolverStatus = ResolverStatus (2i64) ; pub const ERROR : ResolverStatus = ResolverStatus (3i64) ; } impl From < i64 > for ResolverStatus { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ResolverStatus > for i64 { # [inline] fn from (v : ResolverStatus) -> Self { v . 0 } } impl FromVariant for ResolverStatus { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Type (pub i64) ; impl Type { pub const NONE : Type = Type (0i64) ; pub const IPV4 : Type = Type (1i64) ; pub const IPV6 : Type = Type (2i64) ; pub const ANY : Type = Type (3i64) ; } impl From < i64 > for Type { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Type > for i64 { # [inline] fn from (v : Type) -> Self { v . 0 } } impl FromVariant for Type { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl IP { pub const RESOLVER_INVALID_ID : i64 = - 1i64 ; pub const RESOLVER_STATUS_NONE : i64 = 0i64 ; pub const TYPE_NONE : i64 = 0i64 ; pub const RESOLVER_STATUS_WAITING : i64 = 1i64 ; pub const TYPE_IPV4 : i64 = 1i64 ; pub const RESOLVER_STATUS_DONE : i64 = 2i64 ; pub const TYPE_IPV6 : i64 = 2i64 ; pub const RESOLVER_STATUS_ERROR : i64 = 3i64 ; pub const TYPE_ANY : i64 = 3i64 ; pub const RESOLVER_MAX_QUERIES : i64 = 256i64 ; } impl IP { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("IP\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Removes all of a `hostname`'s cached references. If no `hostname` is given, all cached IP addresses are removed.\n# Default Arguments\n* `hostname` - `\"\"`"] # [doc = ""] # [inline] pub fn clear_cache (& self , hostname : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . clear_cache ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , hostname . into ()) ; } } # [doc = "Removes a given item `id` from the queue. This should be used to free a queue after it has completed to enable more queries to happen."] # [doc = ""] # [inline] pub fn erase_resolve_item (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . erase_resolve_item ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; } } # [doc = "Returns all the user's current IPv4 and IPv6 addresses as an array."] # [doc = ""] # [inline] pub fn get_local_addresses (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . get_local_addresses ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns all network adapters as an array.\nEach adapter is a dictionary of the form:\n```gdscript\n{\n    \"index\": \"1\", # Interface index.\n    \"name\": \"eth0\", # Interface name.\n    \"friendly\": \"Ethernet One\", # A friendly name (might be empty).\n    \"addresses\": [\"192.168.1.101\"], # An array of IP addresses associated to this interface.\n}\n```"] # [doc = ""] # [inline] pub fn get_local_interfaces (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . get_local_interfaces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a queued hostname's IP address, given its queue `id`. Returns an empty string on error or if resolution hasn't happened yet (see [`get_resolve_item_status`][Self::get_resolve_item_status])."] # [doc = ""] # [inline] pub fn get_resolve_item_address (& self , id : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . get_resolve_item_address ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Return resolved addresses, or an empty array if an error happened or resolution didn't happen yet (see [`get_resolve_item_status`][Self::get_resolve_item_status])."] # [doc = ""] # [inline] pub fn get_resolve_item_addresses (& self , id : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . get_resolve_item_addresses ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a queued hostname's status as a [`ResolverStatus`][ResolverStatus] constant, given its queue `id`."] # [doc = ""] # [inline] pub fn get_resolve_item_status (& self , id : i64) -> crate :: generated :: ip :: ResolverStatus { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . get_resolve_item_status ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < crate :: generated :: ip :: ResolverStatus > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [`Type`][Type] constant given as `ip_type`.\n# Default Arguments\n* `ip_type` - `3`"] # [doc = ""] # [inline] pub fn resolve_hostname (& self , host : impl Into < GodotString > , ip_type : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . resolve_hostname ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , ip_type as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Resolves a given hostname in a blocking way. Addresses are returned as an [`Array`][VariantArray] of IPv4 or IPv6 depending on `ip_type`.\n# Default Arguments\n* `ip_type` - `3`"] # [doc = ""] # [inline] pub fn resolve_hostname_addresses (& self , host : impl Into < GodotString > , ip_type : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . resolve_hostname_addresses ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , ip_type as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [`Type`][Type] constant given as `ip_type`. Returns the queue ID if successful, or [`RESOLVER_INVALID_ID`][Self::RESOLVER_INVALID_ID] on error.\n# Default Arguments\n* `ip_type` - `3`"] # [doc = ""] # [inline] pub fn resolve_hostname_queue_item (& self , host : impl Into < GodotString > , ip_type : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = IPMethodTable :: get (get_api ()) . resolve_hostname_queue_item ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , ip_type as _) ; < i64 > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for IP { } unsafe impl GodotObject for IP { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "IP" } } impl std :: ops :: Deref for IP { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for IP { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for IP { } unsafe impl Send for IP { } unsafe impl Sync for IP { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct IPMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear_cache : * mut sys :: godot_method_bind , pub erase_resolve_item : * mut sys :: godot_method_bind , pub get_local_addresses : * mut sys :: godot_method_bind , pub get_local_interfaces : * mut sys :: godot_method_bind , pub get_resolve_item_address : * mut sys :: godot_method_bind , pub get_resolve_item_addresses : * mut sys :: godot_method_bind , pub get_resolve_item_status : * mut sys :: godot_method_bind , pub resolve_hostname : * mut sys :: godot_method_bind , pub resolve_hostname_addresses : * mut sys :: godot_method_bind , pub resolve_hostname_queue_item : * mut sys :: godot_method_bind } impl IPMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : IPMethodTable = IPMethodTable { class_constructor : None , clear_cache : 0 as * mut sys :: godot_method_bind , erase_resolve_item : 0 as * mut sys :: godot_method_bind , get_local_addresses : 0 as * mut sys :: godot_method_bind , get_local_interfaces : 0 as * mut sys :: godot_method_bind , get_resolve_item_address : 0 as * mut sys :: godot_method_bind , get_resolve_item_addresses : 0 as * mut sys :: godot_method_bind , get_resolve_item_status : 0 as * mut sys :: godot_method_bind , resolve_hostname : 0 as * mut sys :: godot_method_bind , resolve_hostname_addresses : 0 as * mut sys :: godot_method_bind , resolve_hostname_queue_item : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { IPMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "IP\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear_cache = (gd_api . godot_method_bind_get_method) (class_name , "clear_cache\0" . as_ptr () as * const c_char) ; table . erase_resolve_item = (gd_api . godot_method_bind_get_method) (class_name , "erase_resolve_item\0" . as_ptr () as * const c_char) ; table . get_local_addresses = (gd_api . godot_method_bind_get_method) (class_name , "get_local_addresses\0" . as_ptr () as * const c_char) ; table . get_local_interfaces = (gd_api . godot_method_bind_get_method) (class_name , "get_local_interfaces\0" . as_ptr () as * const c_char) ; table . get_resolve_item_address = (gd_api . godot_method_bind_get_method) (class_name , "get_resolve_item_address\0" . as_ptr () as * const c_char) ; table . get_resolve_item_addresses = (gd_api . godot_method_bind_get_method) (class_name , "get_resolve_item_addresses\0" . as_ptr () as * const c_char) ; table . get_resolve_item_status = (gd_api . godot_method_bind_get_method) (class_name , "get_resolve_item_status\0" . as_ptr () as * const c_char) ; table . resolve_hostname = (gd_api . godot_method_bind_get_method) (class_name , "resolve_hostname\0" . as_ptr () as * const c_char) ; table . resolve_hostname_addresses = (gd_api . godot_method_bind_get_method) (class_name , "resolve_hostname_addresses\0" . as_ptr () as * const c_char) ; table . resolve_hostname_queue_item = (gd_api . godot_method_bind_get_method) (class_name , "resolve_hostname_queue_item\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::ip::private::IP;
            
            pub(crate) mod ip_unix {
                # ! [doc = "This module contains types related to the API class [`IP_Unix`][super::IP_Unix]."] pub (crate) mod private { # [doc = "`core class IP_Unix` inherits `IP` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_ip_unix.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nIP_Unix inherits methods from:\n - [IP](struct.IP.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct IP_Unix { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: IP_Unix ; impl IP_Unix { } impl gdnative_core :: private :: godot_object :: Sealed for IP_Unix { } unsafe impl GodotObject for IP_Unix { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "IP_Unix" } } impl std :: ops :: Deref for IP_Unix { type Target = crate :: generated :: IP ; # [inline] fn deref (& self) -> & crate :: generated :: IP { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for IP_Unix { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: IP { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: IP > for IP_Unix { } unsafe impl SubClass < crate :: generated :: Object > for IP_Unix { }
                use super::*;
            }
            pub use crate::generated::ip_unix::private::IP_Unix;
            
            pub mod image {
                # ! [doc = "This module contains types related to the API class [`Image`][super::Image]."] pub (crate) mod private { # [doc = "`core class Image` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`image`][super::image] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_image.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nImage inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Image { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Image ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AlphaMode (pub i64) ; impl AlphaMode { pub const NONE : AlphaMode = AlphaMode (0i64) ; pub const BIT : AlphaMode = AlphaMode (1i64) ; pub const BLEND : AlphaMode = AlphaMode (2i64) ; } impl From < i64 > for AlphaMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AlphaMode > for i64 { # [inline] fn from (v : AlphaMode) -> Self { v . 0 } } impl FromVariant for AlphaMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CompressMode (pub i64) ; impl CompressMode { pub const S3TC : CompressMode = CompressMode (0i64) ; pub const PVRTC2 : CompressMode = CompressMode (1i64) ; pub const PVRTC4 : CompressMode = CompressMode (2i64) ; pub const ETC : CompressMode = CompressMode (3i64) ; pub const ETC2 : CompressMode = CompressMode (4i64) ; } impl From < i64 > for CompressMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CompressMode > for i64 { # [inline] fn from (v : CompressMode) -> Self { v . 0 } } impl FromVariant for CompressMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CompressSource (pub i64) ; impl CompressSource { pub const GENERIC : CompressSource = CompressSource (0i64) ; pub const SRGB : CompressSource = CompressSource (1i64) ; pub const NORMAL : CompressSource = CompressSource (2i64) ; pub const LAYERED : CompressSource = CompressSource (3i64) ; } impl From < i64 > for CompressSource { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CompressSource > for i64 { # [inline] fn from (v : CompressSource) -> Self { v . 0 } } impl FromVariant for CompressSource { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Format (pub i64) ; impl Format { pub const L8 : Format = Format (0i64) ; pub const LA8 : Format = Format (1i64) ; pub const R8 : Format = Format (2i64) ; pub const RG8 : Format = Format (3i64) ; pub const RGB8 : Format = Format (4i64) ; pub const RGBA8 : Format = Format (5i64) ; pub const RGBA4444 : Format = Format (6i64) ; pub const RGBA5551 : Format = Format (7i64) ; pub const RF : Format = Format (8i64) ; pub const RGF : Format = Format (9i64) ; pub const RGBF : Format = Format (10i64) ; pub const RGBAF : Format = Format (11i64) ; pub const RH : Format = Format (12i64) ; pub const RGH : Format = Format (13i64) ; pub const RGBH : Format = Format (14i64) ; pub const RGBAH : Format = Format (15i64) ; pub const RGBE9995 : Format = Format (16i64) ; pub const DXT1 : Format = Format (17i64) ; pub const DXT3 : Format = Format (18i64) ; pub const DXT5 : Format = Format (19i64) ; pub const RGTC_R : Format = Format (20i64) ; pub const RGTC_RG : Format = Format (21i64) ; pub const BPTC_RGBA : Format = Format (22i64) ; pub const BPTC_RGBF : Format = Format (23i64) ; pub const BPTC_RGBFU : Format = Format (24i64) ; pub const PVRTC2 : Format = Format (25i64) ; pub const PVRTC2A : Format = Format (26i64) ; pub const PVRTC4 : Format = Format (27i64) ; pub const PVRTC4A : Format = Format (28i64) ; pub const ETC : Format = Format (29i64) ; pub const ETC2_R11 : Format = Format (30i64) ; pub const ETC2_R11S : Format = Format (31i64) ; pub const ETC2_RG11 : Format = Format (32i64) ; pub const ETC2_RG11S : Format = Format (33i64) ; pub const ETC2_RGB8 : Format = Format (34i64) ; pub const ETC2_RGBA8 : Format = Format (35i64) ; pub const ETC2_RGB8A1 : Format = Format (36i64) ; pub const MAX : Format = Format (37i64) ; } impl From < i64 > for Format { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Format > for i64 { # [inline] fn from (v : Format) -> Self { v . 0 } } impl FromVariant for Format { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Interpolation (pub i64) ; impl Interpolation { pub const NEAREST : Interpolation = Interpolation (0i64) ; pub const BILINEAR : Interpolation = Interpolation (1i64) ; pub const CUBIC : Interpolation = Interpolation (2i64) ; pub const TRILINEAR : Interpolation = Interpolation (3i64) ; pub const LANCZOS : Interpolation = Interpolation (4i64) ; } impl From < i64 > for Interpolation { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Interpolation > for i64 { # [inline] fn from (v : Interpolation) -> Self { v . 0 } } impl FromVariant for Interpolation { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Image { pub const ALPHA_NONE : i64 = 0i64 ; pub const COMPRESS_S3TC : i64 = 0i64 ; pub const COMPRESS_SOURCE_GENERIC : i64 = 0i64 ; pub const FORMAT_L8 : i64 = 0i64 ; pub const INTERPOLATE_NEAREST : i64 = 0i64 ; pub const ALPHA_BIT : i64 = 1i64 ; pub const COMPRESS_PVRTC2 : i64 = 1i64 ; pub const COMPRESS_SOURCE_SRGB : i64 = 1i64 ; pub const FORMAT_LA8 : i64 = 1i64 ; pub const INTERPOLATE_BILINEAR : i64 = 1i64 ; pub const ALPHA_BLEND : i64 = 2i64 ; pub const COMPRESS_PVRTC4 : i64 = 2i64 ; pub const COMPRESS_SOURCE_NORMAL : i64 = 2i64 ; pub const FORMAT_R8 : i64 = 2i64 ; pub const INTERPOLATE_CUBIC : i64 = 2i64 ; pub const COMPRESS_ETC : i64 = 3i64 ; pub const COMPRESS_SOURCE_LAYERED : i64 = 3i64 ; pub const FORMAT_RG8 : i64 = 3i64 ; pub const INTERPOLATE_TRILINEAR : i64 = 3i64 ; pub const COMPRESS_ETC2 : i64 = 4i64 ; pub const FORMAT_RGB8 : i64 = 4i64 ; pub const INTERPOLATE_LANCZOS : i64 = 4i64 ; pub const FORMAT_RGBA8 : i64 = 5i64 ; pub const FORMAT_RGBA4444 : i64 = 6i64 ; pub const FORMAT_RGBA5551 : i64 = 7i64 ; pub const FORMAT_RF : i64 = 8i64 ; pub const FORMAT_RGF : i64 = 9i64 ; pub const FORMAT_RGBF : i64 = 10i64 ; pub const FORMAT_RGBAF : i64 = 11i64 ; pub const FORMAT_RH : i64 = 12i64 ; pub const FORMAT_RGH : i64 = 13i64 ; pub const FORMAT_RGBH : i64 = 14i64 ; pub const FORMAT_RGBAH : i64 = 15i64 ; pub const FORMAT_RGBE9995 : i64 = 16i64 ; pub const FORMAT_DXT1 : i64 = 17i64 ; pub const FORMAT_DXT3 : i64 = 18i64 ; pub const FORMAT_DXT5 : i64 = 19i64 ; pub const FORMAT_RGTC_R : i64 = 20i64 ; pub const FORMAT_RGTC_RG : i64 = 21i64 ; pub const FORMAT_BPTC_RGBA : i64 = 22i64 ; pub const FORMAT_BPTC_RGBF : i64 = 23i64 ; pub const FORMAT_BPTC_RGBFU : i64 = 24i64 ; pub const FORMAT_PVRTC2 : i64 = 25i64 ; pub const FORMAT_PVRTC2A : i64 = 26i64 ; pub const FORMAT_PVRTC4 : i64 = 27i64 ; pub const FORMAT_PVRTC4A : i64 = 28i64 ; pub const FORMAT_ETC : i64 = 29i64 ; pub const FORMAT_ETC2_R11 : i64 = 30i64 ; pub const FORMAT_ETC2_R11S : i64 = 31i64 ; pub const FORMAT_ETC2_RG11 : i64 = 32i64 ; pub const FORMAT_ETC2_RG11S : i64 = 33i64 ; pub const FORMAT_ETC2_RGB8 : i64 = 34i64 ; pub const FORMAT_ETC2_RGBA8 : i64 = 35i64 ; pub const FORMAT_ETC2_RGB8A1 : i64 = 36i64 ; pub const FORMAT_MAX : i64 = 37i64 ; pub const MAX_HEIGHT : i64 = 16384i64 ; pub const MAX_WIDTH : i64 = 16384i64 ; } impl Image { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ImageMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Alpha-blends `src_rect` from `src` image to this image at coordinates `dest`, clipped accordingly to both image bounds. This image and `src` image **must** have the same format. `src_rect` with not positive size is treated as empty."] # [doc = ""] # [inline] pub fn blend_rect (& self , src : impl AsArg < crate :: generated :: Image > , src_rect : Rect2 , dst : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . blend_rect ; let ret = crate :: icalls :: icallvar__obj_rect2_vec2 (method_bind , self . this . sys () . as_ptr () , src . as_arg_ptr () , src_rect , dst) ; } } # [doc = "Alpha-blends `src_rect` from `src` image to this image using `mask` image at coordinates `dst`, clipped accordingly to both image bounds. Alpha channels are required for both `src` and `mask`. `dst` pixels and `src` pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and `src` image **must** have the same format. `src` image and `mask` image **must** have the same size (width and height) but they can have different formats. `src_rect` with not positive size is treated as empty."] # [doc = ""] # [inline] pub fn blend_rect_mask (& self , src : impl AsArg < crate :: generated :: Image > , mask : impl AsArg < crate :: generated :: Image > , src_rect : Rect2 , dst : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . blend_rect_mask ; let ret = crate :: icalls :: icallvar__obj_obj_rect2_vec2 (method_bind , self . this . sys () . as_ptr () , src . as_arg_ptr () , mask . as_arg_ptr () , src_rect , dst) ; } } # [doc = "Copies `src_rect` from `src` image to this image at coordinates `dst`, clipped accordingly to both image bounds. This image and `src` image **must** have the same format. `src_rect` with not positive size is treated as empty."] # [doc = ""] # [inline] pub fn blit_rect (& self , src : impl AsArg < crate :: generated :: Image > , src_rect : Rect2 , dst : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . blit_rect ; let ret = crate :: icalls :: icallvar__obj_rect2_vec2 (method_bind , self . this . sys () . as_ptr () , src . as_arg_ptr () , src_rect , dst) ; } } # [doc = "Blits `src_rect` area from `src` image to this image at the coordinates given by `dst`, clipped accordingly to both image bounds. `src` pixel is copied onto `dst` if the corresponding `mask` pixel's alpha value is not 0. This image and `src` image **must** have the same format. `src` image and `mask` image **must** have the same size (width and height) but they can have different formats. `src_rect` with not positive size is treated as empty."] # [doc = ""] # [inline] pub fn blit_rect_mask (& self , src : impl AsArg < crate :: generated :: Image > , mask : impl AsArg < crate :: generated :: Image > , src_rect : Rect2 , dst : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . blit_rect_mask ; let ret = crate :: icalls :: icallvar__obj_obj_rect2_vec2 (method_bind , self . this . sys () . as_ptr () , src . as_arg_ptr () , mask . as_arg_ptr () , src_rect , dst) ; } } # [doc = "Converts a bumpmap to a normalmap. A bumpmap provides a height offset per-pixel, while a normalmap provides a normal direction per pixel.\n# Default Arguments\n* `bump_scale` - `1.0`"] # [doc = ""] # [inline] pub fn bumpmap_to_normalmap (& self , bump_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . bumpmap_to_normalmap ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , bump_scale as _) ; } } # [doc = "Removes the image's mipmaps."] # [doc = ""] # [inline] pub fn clear_mipmaps (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . clear_mipmaps ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [`CompressMode`][CompressMode] and [`CompressSource`][CompressSource] constants."] # [doc = ""] # [inline] pub fn compress (& self , mode : i64 , source : i64 , lossy_quality : f64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . compress ; let ret = crate :: icalls :: icallvar__i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , mode as _ , source as _ , lossy_quality as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Converts the image's format. See [`Format`][Format] constants."] # [doc = ""] # [inline] pub fn convert (& self , format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . convert ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , format as _) ; } } # [doc = "Copies `src` image to this image."] # [doc = ""] # [inline] pub fn copy_from (& self , src : impl AsArg < crate :: generated :: Image >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . copy_from ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , src . as_arg_ptr ()) ; } } # [doc = "Creates an empty image of given size and format. See [`Format`][Format] constants. If `use_mipmaps` is `true` then generate mipmaps for this image. See the [`generate_mipmaps`][Self::generate_mipmaps]."] # [doc = ""] # [inline] pub fn create (& self , width : i64 , height : i64 , use_mipmaps : bool , format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . create ; let ret = crate :: icalls :: icallvar__i64_i64_bool_i64 (method_bind , self . this . sys () . as_ptr () , width as _ , height as _ , use_mipmaps as _ , format as _) ; } } # [doc = "Creates a new image of given size and format. See [`Format`][Format] constants. Fills the image with the given raw data. If `use_mipmaps` is `true` then loads mipmaps for this image from `data`. See [`generate_mipmaps`][Self::generate_mipmaps]."] # [doc = ""] # [inline] pub fn create_from_data (& self , width : i64 , height : i64 , use_mipmaps : bool , format : i64 , data : PoolArray < u8 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . create_from_data ; let ret = crate :: icalls :: icallvar__i64_i64_bool_i64_bytearr (method_bind , self . this . sys () . as_ptr () , width as _ , height as _ , use_mipmaps as _ , format as _ , data) ; } } # [doc = "Crops the image to the given `width` and `height`. If the specified size is larger than the current size, the extra area is filled with black pixels."] # [doc = ""] # [inline] pub fn crop (& self , width : i64 , height : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . crop ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , width as _ , height as _) ; } } # [doc = "Decompresses the image if it is compressed. Returns an error if decompress function is not available."] # [doc = ""] # [inline] pub fn decompress (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . decompress ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Returns [`ALPHA_BLEND`][Self::ALPHA_BLEND] if the image has data for alpha values. Returns [`ALPHA_BIT`][Self::ALPHA_BIT] if all the alpha values are stored in a single bit. Returns [`ALPHA_NONE`][Self::ALPHA_NONE] if no data for alpha values is found."] # [doc = ""] # [inline] pub fn detect_alpha (& self) -> crate :: generated :: image :: AlphaMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . detect_alpha ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: image :: AlphaMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Stretches the image and enlarges it by a factor of 2. No interpolation is done."] # [doc = ""] # [inline] pub fn expand_x2_hq2x (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . expand_x2_hq2x ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Fills the image with `color`."] # [doc = ""] # [inline] pub fn fill (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . fill ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Fills `rect` with `color`."] # [doc = ""] # [inline] pub fn fill_rect (& self , rect : Rect2 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . fill_rect ; let ret = crate :: icalls :: icallvar__rect2_color (method_bind , self . this . sys () . as_ptr () , rect , color) ; } } # [doc = "Blends low-alpha pixels with nearby pixels."] # [doc = ""] # [inline] pub fn fix_alpha_edges (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . fix_alpha_edges ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Flips the image horizontally."] # [doc = ""] # [inline] pub fn flip_x (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . flip_x ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Flips the image vertically."] # [doc = ""] # [inline] pub fn flip_y (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . flip_y ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is `0`.\n**Note:** Mipmap generation is done on the CPU, is single-threaded and is _always_ done on the main thread. This means generating mipmaps will result in noticeable stuttering during gameplay, even if [`generate_mipmaps`][Self::generate_mipmaps] is called from a [`Thread`][Thread].\n# Default Arguments\n* `renormalize` - `false`"] # [doc = ""] # [inline] pub fn generate_mipmaps (& self , renormalize : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . generate_mipmaps ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , renormalize as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Returns a copy of the image's raw data."] # [doc = ""] # [inline] pub fn get_data (& self) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the image's format. See [`Format`][Format] constants."] # [doc = ""] # [inline] pub fn get_format (& self) -> crate :: generated :: image :: Format { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_format ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: image :: Format > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the image's height."] # [doc = ""] # [inline] pub fn get_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the offset where the image's mipmap with index `mipmap` is stored in the `data` dictionary."] # [doc = ""] # [inline] pub fn get_mipmap_offset (& self , mipmap : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_mipmap_offset ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mipmap as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the color of the pixel at `(x, y)` if the image is locked. If the image is unlocked, it always returns a [`Color`][Color] with the value `(0, 0, 0, 1.0)`. This is the same as [`get_pixelv`][Self::get_pixelv], but two integer arguments instead of a Vector2 argument."] # [doc = ""] # [inline] pub fn get_pixel (& self , x : i64 , y : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_pixel ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , x as _ , y as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the color of the pixel at `src` if the image is locked. If the image is unlocked, it always returns a [`Color`][Color] with the value `(0, 0, 0, 1.0)`. This is the same as [`get_pixel`][Self::get_pixel], but with a Vector2 argument instead of two integer arguments."] # [doc = ""] # [inline] pub fn get_pixelv (& self , src : Vector2) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_pixelv ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , src) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a new image that is a copy of the image's area specified with `rect`."] # [doc = ""] # [inline] pub fn get_rect (& self , rect : Rect2) -> Option < Ref < crate :: generated :: Image , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_rect ; let ret = crate :: icalls :: icallvar__rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; < Option < Ref < crate :: generated :: Image , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the image's size (width and height)."] # [doc = ""] # [inline] pub fn get_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [`Rect2`][Rect2] enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible."] # [doc = ""] # [inline] pub fn get_used_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_used_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the image's width."] # [doc = ""] # [inline] pub fn get_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . get_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the image has generated mipmaps."] # [doc = ""] # [inline] pub fn has_mipmaps (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . has_mipmaps ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the image is compressed."] # [doc = ""] # [inline] pub fn is_compressed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . is_compressed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the image has no data."] # [doc = ""] # [inline] pub fn is_empty (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . is_empty ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if all the image's pixels have an alpha value of 0. Returns `false` if any pixel has an alpha value higher than 0."] # [doc = ""] # [inline] pub fn is_invisible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . is_invisible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Loads an image from file `path`. See [Supported image formats](https://docs.godotengine.org/en/3.5.1/tutorials/assets_pipeline/importing_images.html#supported-image-formats) for a list of supported image formats and limitations.\n**Warning:** This method should only be used in the editor or in cases when you need to load external images at run-time, such as images located at the `user://` directory, and may not work in exported projects.\nSee also [`ImageTexture`][ImageTexture] description for usage examples."] # [doc = ""] # [inline] pub fn load (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Loads an image from the binary contents of a BMP file.\n**Note:** Godot's BMP module doesn't support 16-bit per pixel images. Only 1-bit, 4-bit, 8-bit, 24-bit, and 32-bit per pixel images are supported."] # [doc = ""] # [inline] pub fn load_bmp_from_buffer (& self , buffer : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load_bmp_from_buffer ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Loads an image from the binary contents of a JPEG file."] # [doc = ""] # [inline] pub fn load_jpg_from_buffer (& self , buffer : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load_jpg_from_buffer ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Loads an image from the binary contents of a PNG file."] # [doc = ""] # [inline] pub fn load_png_from_buffer (& self , buffer : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load_png_from_buffer ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Loads an image from the binary contents of a TGA file."] # [doc = ""] # [inline] pub fn load_tga_from_buffer (& self , buffer : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load_tga_from_buffer ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Loads an image from the binary contents of a WebP file."] # [doc = ""] # [inline] pub fn load_webp_from_buffer (& self , buffer : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . load_webp_from_buffer ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Locks the data for reading and writing access. Sends an error to the console if the image is not locked when reading or writing a pixel."] # [doc = ""] # [inline] pub fn lock (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . lock ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Converts the image's data to represent coordinates on a 3D plane. This is used when the image represents a normalmap. A normalmap can add lots of detail to a 3D surface without increasing the polygon count."] # [doc = ""] # [inline] pub fn normalmap_to_xy (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . normalmap_to_xy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Multiplies color values with alpha values. Resulting color values for a pixel are `(color * alpha)/256`."] # [doc = ""] # [inline] pub fn premultiply_alpha (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . premultiply_alpha ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Resizes the image to the given `width` and `height`. New pixels are calculated using the `interpolation` mode defined via [`Interpolation`][Interpolation] constants.\n# Default Arguments\n* `interpolation` - `1`"] # [doc = ""] # [inline] pub fn resize (& self , width : i64 , height : i64 , interpolation : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . resize ; let ret = crate :: icalls :: icallvar__i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , width as _ , height as _ , interpolation as _) ; } } # [doc = "Resizes the image to the nearest power of 2 for the width and height. If `square` is `true` then set width and height to be the same. New pixels are calculated using the `interpolation` mode defined via [`Interpolation`][Interpolation] constants.\n# Default Arguments\n* `square` - `false`\n* `interpolation` - `1`"] # [doc = ""] # [inline] pub fn resize_to_po2 (& self , square : bool , interpolation : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . resize_to_po2 ; let ret = crate :: icalls :: icallvar__bool_i64 (method_bind , self . this . sys () . as_ptr () , square as _ , interpolation as _) ; } } # [doc = "Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image."] # [doc = ""] # [inline] pub fn rgbe_to_srgb (& self) -> Option < Ref < crate :: generated :: Image , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . rgbe_to_srgb ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Image , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Saves the image as an EXR file to `path`. If `grayscale` is `true` and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return [`ERR_UNAVAILABLE`][Self::ERR_UNAVAILABLE] if Godot was compiled without the TinyEXR module.\n**Note:** The TinyEXR module is disabled in non-editor builds, which means [`save_exr`][Self::save_exr] will return [`ERR_UNAVAILABLE`][Self::ERR_UNAVAILABLE] when it is called from an exported project.\n# Default Arguments\n* `grayscale` - `false`"] # [doc = ""] # [inline] pub fn save_exr (& self , path : impl Into < GodotString > , grayscale : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . save_exr ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , path . into () , grayscale as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Saves the image as a PNG file to `path`."] # [doc = ""] # [inline] pub fn save_png (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . save_png ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn save_png_to_buffer (& self) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . save_png_to_buffer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets the [`Color`][Color] of the pixel at `(x, y)` if the image is locked. Example:\n```gdscript\nvar img = Image.new()\nimg.create(img_width, img_height, false, Image.FORMAT_RGBA8)\nimg.lock()\nimg.set_pixel(x, y, color) # Works\nimg.unlock()\nimg.set_pixel(x, y, color) # Does not have an effect\n```"] # [doc = ""] # [inline] pub fn set_pixel (& self , x : i64 , y : i64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . set_pixel ; let ret = crate :: icalls :: icallvar__i64_i64_color (method_bind , self . this . sys () . as_ptr () , x as _ , y as _ , color) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets the [`Color`][Color] of the pixel at `(dst.x, dst.y)` if the image is locked. Note that the `dst` values must be integers. Example:\n```gdscript\nvar img = Image.new()\nimg.create(img_width, img_height, false, Image.FORMAT_RGBA8)\nimg.lock()\nimg.set_pixelv(Vector2(x, y), color) # Works\nimg.unlock()\nimg.set_pixelv(Vector2(x, y), color) # Does not have an effect\n```"] # [doc = ""] # [inline] pub fn set_pixelv (& self , dst : Vector2 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . set_pixelv ; let ret = crate :: icalls :: icallvar__vec2_color (method_bind , self . this . sys () . as_ptr () , dst , color) ; } } # [doc = "Shrinks the image by a factor of 2."] # [doc = ""] # [inline] pub fn shrink_x2 (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . shrink_x2 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Converts the raw data from the sRGB colorspace to a linear scale."] # [doc = ""] # [inline] pub fn srgb_to_linear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . srgb_to_linear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Unlocks the data and prevents changes."] # [doc = ""] # [inline] pub fn unlock (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageMethodTable :: get (get_api ()) . unlock ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Image { } unsafe impl GodotObject for Image { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Image" } } impl std :: ops :: Deref for Image { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Image { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Image { } unsafe impl SubClass < crate :: generated :: Reference > for Image { } unsafe impl SubClass < crate :: generated :: Object > for Image { } impl Instanciable for Image { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Image :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ImageMethodTable { pub class_constructor : sys :: godot_class_constructor , pub blend_rect : * mut sys :: godot_method_bind , pub blend_rect_mask : * mut sys :: godot_method_bind , pub blit_rect : * mut sys :: godot_method_bind , pub blit_rect_mask : * mut sys :: godot_method_bind , pub bumpmap_to_normalmap : * mut sys :: godot_method_bind , pub clear_mipmaps : * mut sys :: godot_method_bind , pub compress : * mut sys :: godot_method_bind , pub convert : * mut sys :: godot_method_bind , pub copy_from : * mut sys :: godot_method_bind , pub create : * mut sys :: godot_method_bind , pub create_from_data : * mut sys :: godot_method_bind , pub crop : * mut sys :: godot_method_bind , pub decompress : * mut sys :: godot_method_bind , pub detect_alpha : * mut sys :: godot_method_bind , pub expand_x2_hq2x : * mut sys :: godot_method_bind , pub fill : * mut sys :: godot_method_bind , pub fill_rect : * mut sys :: godot_method_bind , pub fix_alpha_edges : * mut sys :: godot_method_bind , pub flip_x : * mut sys :: godot_method_bind , pub flip_y : * mut sys :: godot_method_bind , pub generate_mipmaps : * mut sys :: godot_method_bind , pub get_data : * mut sys :: godot_method_bind , pub get_format : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_mipmap_offset : * mut sys :: godot_method_bind , pub get_pixel : * mut sys :: godot_method_bind , pub get_pixelv : * mut sys :: godot_method_bind , pub get_rect : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_used_rect : * mut sys :: godot_method_bind , pub get_width : * mut sys :: godot_method_bind , pub has_mipmaps : * mut sys :: godot_method_bind , pub is_compressed : * mut sys :: godot_method_bind , pub is_empty : * mut sys :: godot_method_bind , pub is_invisible : * mut sys :: godot_method_bind , pub load : * mut sys :: godot_method_bind , pub load_bmp_from_buffer : * mut sys :: godot_method_bind , pub load_jpg_from_buffer : * mut sys :: godot_method_bind , pub load_png_from_buffer : * mut sys :: godot_method_bind , pub load_tga_from_buffer : * mut sys :: godot_method_bind , pub load_webp_from_buffer : * mut sys :: godot_method_bind , pub lock : * mut sys :: godot_method_bind , pub normalmap_to_xy : * mut sys :: godot_method_bind , pub premultiply_alpha : * mut sys :: godot_method_bind , pub resize : * mut sys :: godot_method_bind , pub resize_to_po2 : * mut sys :: godot_method_bind , pub rgbe_to_srgb : * mut sys :: godot_method_bind , pub save_exr : * mut sys :: godot_method_bind , pub save_png : * mut sys :: godot_method_bind , pub save_png_to_buffer : * mut sys :: godot_method_bind , pub set_pixel : * mut sys :: godot_method_bind , pub set_pixelv : * mut sys :: godot_method_bind , pub shrink_x2 : * mut sys :: godot_method_bind , pub srgb_to_linear : * mut sys :: godot_method_bind , pub unlock : * mut sys :: godot_method_bind } impl ImageMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ImageMethodTable = ImageMethodTable { class_constructor : None , blend_rect : 0 as * mut sys :: godot_method_bind , blend_rect_mask : 0 as * mut sys :: godot_method_bind , blit_rect : 0 as * mut sys :: godot_method_bind , blit_rect_mask : 0 as * mut sys :: godot_method_bind , bumpmap_to_normalmap : 0 as * mut sys :: godot_method_bind , clear_mipmaps : 0 as * mut sys :: godot_method_bind , compress : 0 as * mut sys :: godot_method_bind , convert : 0 as * mut sys :: godot_method_bind , copy_from : 0 as * mut sys :: godot_method_bind , create : 0 as * mut sys :: godot_method_bind , create_from_data : 0 as * mut sys :: godot_method_bind , crop : 0 as * mut sys :: godot_method_bind , decompress : 0 as * mut sys :: godot_method_bind , detect_alpha : 0 as * mut sys :: godot_method_bind , expand_x2_hq2x : 0 as * mut sys :: godot_method_bind , fill : 0 as * mut sys :: godot_method_bind , fill_rect : 0 as * mut sys :: godot_method_bind , fix_alpha_edges : 0 as * mut sys :: godot_method_bind , flip_x : 0 as * mut sys :: godot_method_bind , flip_y : 0 as * mut sys :: godot_method_bind , generate_mipmaps : 0 as * mut sys :: godot_method_bind , get_data : 0 as * mut sys :: godot_method_bind , get_format : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_mipmap_offset : 0 as * mut sys :: godot_method_bind , get_pixel : 0 as * mut sys :: godot_method_bind , get_pixelv : 0 as * mut sys :: godot_method_bind , get_rect : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_used_rect : 0 as * mut sys :: godot_method_bind , get_width : 0 as * mut sys :: godot_method_bind , has_mipmaps : 0 as * mut sys :: godot_method_bind , is_compressed : 0 as * mut sys :: godot_method_bind , is_empty : 0 as * mut sys :: godot_method_bind , is_invisible : 0 as * mut sys :: godot_method_bind , load : 0 as * mut sys :: godot_method_bind , load_bmp_from_buffer : 0 as * mut sys :: godot_method_bind , load_jpg_from_buffer : 0 as * mut sys :: godot_method_bind , load_png_from_buffer : 0 as * mut sys :: godot_method_bind , load_tga_from_buffer : 0 as * mut sys :: godot_method_bind , load_webp_from_buffer : 0 as * mut sys :: godot_method_bind , lock : 0 as * mut sys :: godot_method_bind , normalmap_to_xy : 0 as * mut sys :: godot_method_bind , premultiply_alpha : 0 as * mut sys :: godot_method_bind , resize : 0 as * mut sys :: godot_method_bind , resize_to_po2 : 0 as * mut sys :: godot_method_bind , rgbe_to_srgb : 0 as * mut sys :: godot_method_bind , save_exr : 0 as * mut sys :: godot_method_bind , save_png : 0 as * mut sys :: godot_method_bind , save_png_to_buffer : 0 as * mut sys :: godot_method_bind , set_pixel : 0 as * mut sys :: godot_method_bind , set_pixelv : 0 as * mut sys :: godot_method_bind , shrink_x2 : 0 as * mut sys :: godot_method_bind , srgb_to_linear : 0 as * mut sys :: godot_method_bind , unlock : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ImageMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Image\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . blend_rect = (gd_api . godot_method_bind_get_method) (class_name , "blend_rect\0" . as_ptr () as * const c_char) ; table . blend_rect_mask = (gd_api . godot_method_bind_get_method) (class_name , "blend_rect_mask\0" . as_ptr () as * const c_char) ; table . blit_rect = (gd_api . godot_method_bind_get_method) (class_name , "blit_rect\0" . as_ptr () as * const c_char) ; table . blit_rect_mask = (gd_api . godot_method_bind_get_method) (class_name , "blit_rect_mask\0" . as_ptr () as * const c_char) ; table . bumpmap_to_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "bumpmap_to_normalmap\0" . as_ptr () as * const c_char) ; table . clear_mipmaps = (gd_api . godot_method_bind_get_method) (class_name , "clear_mipmaps\0" . as_ptr () as * const c_char) ; table . compress = (gd_api . godot_method_bind_get_method) (class_name , "compress\0" . as_ptr () as * const c_char) ; table . convert = (gd_api . godot_method_bind_get_method) (class_name , "convert\0" . as_ptr () as * const c_char) ; table . copy_from = (gd_api . godot_method_bind_get_method) (class_name , "copy_from\0" . as_ptr () as * const c_char) ; table . create = (gd_api . godot_method_bind_get_method) (class_name , "create\0" . as_ptr () as * const c_char) ; table . create_from_data = (gd_api . godot_method_bind_get_method) (class_name , "create_from_data\0" . as_ptr () as * const c_char) ; table . crop = (gd_api . godot_method_bind_get_method) (class_name , "crop\0" . as_ptr () as * const c_char) ; table . decompress = (gd_api . godot_method_bind_get_method) (class_name , "decompress\0" . as_ptr () as * const c_char) ; table . detect_alpha = (gd_api . godot_method_bind_get_method) (class_name , "detect_alpha\0" . as_ptr () as * const c_char) ; table . expand_x2_hq2x = (gd_api . godot_method_bind_get_method) (class_name , "expand_x2_hq2x\0" . as_ptr () as * const c_char) ; table . fill = (gd_api . godot_method_bind_get_method) (class_name , "fill\0" . as_ptr () as * const c_char) ; table . fill_rect = (gd_api . godot_method_bind_get_method) (class_name , "fill_rect\0" . as_ptr () as * const c_char) ; table . fix_alpha_edges = (gd_api . godot_method_bind_get_method) (class_name , "fix_alpha_edges\0" . as_ptr () as * const c_char) ; table . flip_x = (gd_api . godot_method_bind_get_method) (class_name , "flip_x\0" . as_ptr () as * const c_char) ; table . flip_y = (gd_api . godot_method_bind_get_method) (class_name , "flip_y\0" . as_ptr () as * const c_char) ; table . generate_mipmaps = (gd_api . godot_method_bind_get_method) (class_name , "generate_mipmaps\0" . as_ptr () as * const c_char) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_mipmap_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_mipmap_offset\0" . as_ptr () as * const c_char) ; table . get_pixel = (gd_api . godot_method_bind_get_method) (class_name , "get_pixel\0" . as_ptr () as * const c_char) ; table . get_pixelv = (gd_api . godot_method_bind_get_method) (class_name , "get_pixelv\0" . as_ptr () as * const c_char) ; table . get_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_rect\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_used_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_used_rect\0" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\0" . as_ptr () as * const c_char) ; table . has_mipmaps = (gd_api . godot_method_bind_get_method) (class_name , "has_mipmaps\0" . as_ptr () as * const c_char) ; table . is_compressed = (gd_api . godot_method_bind_get_method) (class_name , "is_compressed\0" . as_ptr () as * const c_char) ; table . is_empty = (gd_api . godot_method_bind_get_method) (class_name , "is_empty\0" . as_ptr () as * const c_char) ; table . is_invisible = (gd_api . godot_method_bind_get_method) (class_name , "is_invisible\0" . as_ptr () as * const c_char) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\0" . as_ptr () as * const c_char) ; table . load_bmp_from_buffer = (gd_api . godot_method_bind_get_method) (class_name , "load_bmp_from_buffer\0" . as_ptr () as * const c_char) ; table . load_jpg_from_buffer = (gd_api . godot_method_bind_get_method) (class_name , "load_jpg_from_buffer\0" . as_ptr () as * const c_char) ; table . load_png_from_buffer = (gd_api . godot_method_bind_get_method) (class_name , "load_png_from_buffer\0" . as_ptr () as * const c_char) ; table . load_tga_from_buffer = (gd_api . godot_method_bind_get_method) (class_name , "load_tga_from_buffer\0" . as_ptr () as * const c_char) ; table . load_webp_from_buffer = (gd_api . godot_method_bind_get_method) (class_name , "load_webp_from_buffer\0" . as_ptr () as * const c_char) ; table . lock = (gd_api . godot_method_bind_get_method) (class_name , "lock\0" . as_ptr () as * const c_char) ; table . normalmap_to_xy = (gd_api . godot_method_bind_get_method) (class_name , "normalmap_to_xy\0" . as_ptr () as * const c_char) ; table . premultiply_alpha = (gd_api . godot_method_bind_get_method) (class_name , "premultiply_alpha\0" . as_ptr () as * const c_char) ; table . resize = (gd_api . godot_method_bind_get_method) (class_name , "resize\0" . as_ptr () as * const c_char) ; table . resize_to_po2 = (gd_api . godot_method_bind_get_method) (class_name , "resize_to_po2\0" . as_ptr () as * const c_char) ; table . rgbe_to_srgb = (gd_api . godot_method_bind_get_method) (class_name , "rgbe_to_srgb\0" . as_ptr () as * const c_char) ; table . save_exr = (gd_api . godot_method_bind_get_method) (class_name , "save_exr\0" . as_ptr () as * const c_char) ; table . save_png = (gd_api . godot_method_bind_get_method) (class_name , "save_png\0" . as_ptr () as * const c_char) ; table . save_png_to_buffer = (gd_api . godot_method_bind_get_method) (class_name , "save_png_to_buffer\0" . as_ptr () as * const c_char) ; table . set_pixel = (gd_api . godot_method_bind_get_method) (class_name , "set_pixel\0" . as_ptr () as * const c_char) ; table . set_pixelv = (gd_api . godot_method_bind_get_method) (class_name , "set_pixelv\0" . as_ptr () as * const c_char) ; table . shrink_x2 = (gd_api . godot_method_bind_get_method) (class_name , "shrink_x2\0" . as_ptr () as * const c_char) ; table . srgb_to_linear = (gd_api . godot_method_bind_get_method) (class_name , "srgb_to_linear\0" . as_ptr () as * const c_char) ; table . unlock = (gd_api . godot_method_bind_get_method) (class_name , "unlock\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::image::private::Image;
            
            pub mod image_texture {
                # ! [doc = "This module contains types related to the API class [`ImageTexture`][super::ImageTexture]."] pub (crate) mod private { # [doc = "`core class ImageTexture` inherits `Texture` (reference-counted).\n\nThis class has related types in the [`image_texture`][super::image_texture] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_imagetexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nImageTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ImageTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ImageTexture ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Storage (pub i64) ; impl Storage { pub const RAW : Storage = Storage (0i64) ; pub const COMPRESS_LOSSY : Storage = Storage (1i64) ; pub const COMPRESS_LOSSLESS : Storage = Storage (2i64) ; } impl From < i64 > for Storage { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Storage > for i64 { # [inline] fn from (v : Storage) -> Self { v . 0 } } impl FromVariant for Storage { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ImageTexture { pub const STORAGE_RAW : i64 = 0i64 ; pub const STORAGE_COMPRESS_LOSSY : i64 = 1i64 ; pub const STORAGE_COMPRESS_LOSSLESS : i64 = 2i64 ; } impl ImageTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ImageTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Create a new [`ImageTexture`][ImageTexture] with `width` and `height`.\n`format` is a value from [enum Image.Format], `flags` is any combination of [enum Texture.Flags].\n# Default Arguments\n* `flags` - `7`"] # [doc = ""] # [inline] pub fn create (& self , width : i64 , height : i64 , format : i64 , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . create ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , width as _ , height as _ , format as _ , flags as _) ; } } # [doc = "Initializes the texture by allocating and setting the data from an [`Image`][Image] with `flags` from [enum Texture.Flags]. An sRGB to linear color space conversion can take place, according to [enum Image.Format].\n# Default Arguments\n* `flags` - `7`"] # [doc = ""] # [inline] pub fn create_from_image (& self , image : impl AsArg < crate :: generated :: Image > , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . create_from_image ; let ret = crate :: icalls :: icallvar__obj_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , flags as _) ; } } # [doc = "Returns the format of the texture, one of [enum Image.Format]."] # [doc = ""] # [inline] pub fn get_format (& self) -> crate :: generated :: image :: Format { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . get_format ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: image :: Format > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The storage quality for [`STORAGE_COMPRESS_LOSSY`][Self::STORAGE_COMPRESS_LOSSY]."] # [doc = ""] # [inline] pub fn lossy_storage_quality (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . get_lossy_storage_quality ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The storage type (raw, lossy, or compressed)."] # [doc = ""] # [inline] pub fn storage (& self) -> crate :: generated :: image_texture :: Storage { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . get_storage ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: image_texture :: Storage > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Loads an image from a file path and creates a texture from it.\n**Note:** This method is deprecated and will be removed in Godot 4.0, use [`Image.load`][Image::load] and [`create_from_image`][Self::create_from_image] instead."] # [doc = ""] # [inline] pub fn load (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . load ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Replaces the texture's data with a new [`Image`][Image].\n**Note:** The texture has to be initialized first with the [`create_from_image`][Self::create_from_image] method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration, otherwise it has to be re-created with the [`create_from_image`][Self::create_from_image] method.\nUse this method over [`create_from_image`][Self::create_from_image] if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time."] # [doc = ""] # [inline] pub fn set_data (& self , image : impl AsArg < crate :: generated :: Image >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . set_data ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr ()) ; } } # [doc = "The storage quality for [`STORAGE_COMPRESS_LOSSY`][Self::STORAGE_COMPRESS_LOSSY]."] # [doc = ""] # [inline] pub fn set_lossy_storage_quality (& self , quality : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . set_lossy_storage_quality ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , quality as _) ; } } # [doc = "Resizes the texture to the specified dimensions."] # [doc = ""] # [inline] pub fn set_size_override (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . set_size_override ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "The storage type (raw, lossy, or compressed)."] # [doc = ""] # [inline] pub fn set_storage (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImageTextureMethodTable :: get (get_api ()) . set_storage ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ImageTexture { } unsafe impl GodotObject for ImageTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ImageTexture" } } impl std :: ops :: Deref for ImageTexture { type Target = crate :: generated :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ImageTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Texture > for ImageTexture { } unsafe impl SubClass < crate :: generated :: Resource > for ImageTexture { } unsafe impl SubClass < crate :: generated :: Reference > for ImageTexture { } unsafe impl SubClass < crate :: generated :: Object > for ImageTexture { } impl Instanciable for ImageTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ImageTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ImageTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create : * mut sys :: godot_method_bind , pub create_from_image : * mut sys :: godot_method_bind , pub get_format : * mut sys :: godot_method_bind , pub get_lossy_storage_quality : * mut sys :: godot_method_bind , pub get_storage : * mut sys :: godot_method_bind , pub load : * mut sys :: godot_method_bind , pub set_data : * mut sys :: godot_method_bind , pub set_lossy_storage_quality : * mut sys :: godot_method_bind , pub set_size_override : * mut sys :: godot_method_bind , pub set_storage : * mut sys :: godot_method_bind } impl ImageTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ImageTextureMethodTable = ImageTextureMethodTable { class_constructor : None , create : 0 as * mut sys :: godot_method_bind , create_from_image : 0 as * mut sys :: godot_method_bind , get_format : 0 as * mut sys :: godot_method_bind , get_lossy_storage_quality : 0 as * mut sys :: godot_method_bind , get_storage : 0 as * mut sys :: godot_method_bind , load : 0 as * mut sys :: godot_method_bind , set_data : 0 as * mut sys :: godot_method_bind , set_lossy_storage_quality : 0 as * mut sys :: godot_method_bind , set_size_override : 0 as * mut sys :: godot_method_bind , set_storage : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ImageTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ImageTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create = (gd_api . godot_method_bind_get_method) (class_name , "create\0" . as_ptr () as * const c_char) ; table . create_from_image = (gd_api . godot_method_bind_get_method) (class_name , "create_from_image\0" . as_ptr () as * const c_char) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\0" . as_ptr () as * const c_char) ; table . get_lossy_storage_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_lossy_storage_quality\0" . as_ptr () as * const c_char) ; table . get_storage = (gd_api . godot_method_bind_get_method) (class_name , "get_storage\0" . as_ptr () as * const c_char) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\0" . as_ptr () as * const c_char) ; table . set_data = (gd_api . godot_method_bind_get_method) (class_name , "set_data\0" . as_ptr () as * const c_char) ; table . set_lossy_storage_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_lossy_storage_quality\0" . as_ptr () as * const c_char) ; table . set_size_override = (gd_api . godot_method_bind_get_method) (class_name , "set_size_override\0" . as_ptr () as * const c_char) ; table . set_storage = (gd_api . godot_method_bind_get_method) (class_name , "set_storage\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::image_texture::private::ImageTexture;
            
            pub(crate) mod immediate_geometry {
                # ! [doc = "This module contains types related to the API class [`ImmediateGeometry`][super::ImmediateGeometry]."] pub (crate) mod private { # [doc = "`core class ImmediateGeometry` inherits `GeometryInstance` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_immediategeometry.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ImmediateGeometry` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ImmediateGeometry>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nImmediateGeometry inherits methods from:\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ImmediateGeometry { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ImmediateGeometry ; impl ImmediateGeometry { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ImmediateGeometryMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Simple helper to draw an UV sphere with given latitude, longitude and radius.\n# Default Arguments\n* `add_uv` - `true`"] # [doc = ""] # [inline] pub fn add_sphere (& self , lats : i64 , lons : i64 , radius : f64 , add_uv : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImmediateGeometryMethodTable :: get (get_api ()) . add_sphere ; let ret = crate :: icalls :: icallvar__i64_i64_f64_bool (method_bind , self . this . sys () . as_ptr () , lats as _ , lons as _ , radius as _ , add_uv as _) ; } } # [doc = "Adds a vertex in local coordinate space with the currently set color/uv/etc."] # [doc = ""] # [inline] pub fn add_vertex (& self , position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImmediateGeometryMethodTable :: get (get_api ()) . add_vertex ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "Begin drawing (and optionally pass a texture override). When done call [`end`][Self::end]. For more information on how this works, search for `glBegin()` and `glEnd()` references.\nFor the type of primitive, see the [enum Mesh.PrimitiveType] enum.\n# Default Arguments\n* `texture` - `null`"] # [doc = ""] # [inline] pub fn begin (& self , primitive : i64 , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImmediateGeometryMethodTable :: get (get_api ()) . begin ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , primitive as _ , texture . as_arg_ptr ()) ; } } # [doc = "Clears everything that was drawn using begin/end."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImmediateGeometryMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Ends a drawing context and displays the results."] # [doc = ""] # [inline] pub fn end (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImmediateGeometryMethodTable :: get (get_api ()) . end ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The current drawing color."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImmediateGeometryMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The next vertex's normal."] # [doc = ""] # [inline] pub fn set_normal (& self , normal : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImmediateGeometryMethodTable :: get (get_api ()) . set_normal ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , normal) ; } } # [doc = "The next vertex's tangent (and binormal facing)."] # [doc = ""] # [inline] pub fn set_tangent (& self , tangent : Plane) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImmediateGeometryMethodTable :: get (get_api ()) . set_tangent ; let ret = crate :: icalls :: icallvar__plane (method_bind , self . this . sys () . as_ptr () , tangent) ; } } # [doc = "The next vertex's UV."] # [doc = ""] # [inline] pub fn set_uv (& self , uv : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImmediateGeometryMethodTable :: get (get_api ()) . set_uv ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , uv) ; } } # [doc = "The next vertex's second layer UV."] # [doc = ""] # [inline] pub fn set_uv2 (& self , uv : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ImmediateGeometryMethodTable :: get (get_api ()) . set_uv2 ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , uv) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ImmediateGeometry { } unsafe impl GodotObject for ImmediateGeometry { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ImmediateGeometry" } } impl QueueFree for ImmediateGeometry { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ImmediateGeometry { type Target = crate :: generated :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ImmediateGeometry { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: GeometryInstance > for ImmediateGeometry { } unsafe impl SubClass < crate :: generated :: VisualInstance > for ImmediateGeometry { } unsafe impl SubClass < crate :: generated :: CullInstance > for ImmediateGeometry { } unsafe impl SubClass < crate :: generated :: Spatial > for ImmediateGeometry { } unsafe impl SubClass < crate :: generated :: Node > for ImmediateGeometry { } unsafe impl SubClass < crate :: generated :: Object > for ImmediateGeometry { } impl Instanciable for ImmediateGeometry { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ImmediateGeometry :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ImmediateGeometryMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_sphere : * mut sys :: godot_method_bind , pub add_vertex : * mut sys :: godot_method_bind , pub begin : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub end : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_normal : * mut sys :: godot_method_bind , pub set_tangent : * mut sys :: godot_method_bind , pub set_uv : * mut sys :: godot_method_bind , pub set_uv2 : * mut sys :: godot_method_bind } impl ImmediateGeometryMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ImmediateGeometryMethodTable = ImmediateGeometryMethodTable { class_constructor : None , add_sphere : 0 as * mut sys :: godot_method_bind , add_vertex : 0 as * mut sys :: godot_method_bind , begin : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , end : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_normal : 0 as * mut sys :: godot_method_bind , set_tangent : 0 as * mut sys :: godot_method_bind , set_uv : 0 as * mut sys :: godot_method_bind , set_uv2 : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ImmediateGeometryMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ImmediateGeometry\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_sphere = (gd_api . godot_method_bind_get_method) (class_name , "add_sphere\0" . as_ptr () as * const c_char) ; table . add_vertex = (gd_api . godot_method_bind_get_method) (class_name , "add_vertex\0" . as_ptr () as * const c_char) ; table . begin = (gd_api . godot_method_bind_get_method) (class_name , "begin\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . end = (gd_api . godot_method_bind_get_method) (class_name , "end\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_normal = (gd_api . godot_method_bind_get_method) (class_name , "set_normal\0" . as_ptr () as * const c_char) ; table . set_tangent = (gd_api . godot_method_bind_get_method) (class_name , "set_tangent\0" . as_ptr () as * const c_char) ; table . set_uv = (gd_api . godot_method_bind_get_method) (class_name , "set_uv\0" . as_ptr () as * const c_char) ; table . set_uv2 = (gd_api . godot_method_bind_get_method) (class_name , "set_uv2\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::immediate_geometry::private::ImmediateGeometry;
            
            pub mod input {
                # ! [doc = "This module contains types related to the API class [`Input`][super::Input]."] pub (crate) mod private { # [doc = "`core singleton class Input` inherits `Object` (manually managed).\n\nThis class has related types in the [`input`][super::input] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_input.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nInput inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Input { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Input ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CursorShape (pub i64) ; impl CursorShape { pub const ARROW : CursorShape = CursorShape (0i64) ; pub const IBEAM : CursorShape = CursorShape (1i64) ; pub const POINTING_HAND : CursorShape = CursorShape (2i64) ; pub const CROSS : CursorShape = CursorShape (3i64) ; pub const WAIT : CursorShape = CursorShape (4i64) ; pub const BUSY : CursorShape = CursorShape (5i64) ; pub const DRAG : CursorShape = CursorShape (6i64) ; pub const CAN_DROP : CursorShape = CursorShape (7i64) ; pub const FORBIDDEN : CursorShape = CursorShape (8i64) ; pub const VSIZE : CursorShape = CursorShape (9i64) ; pub const HSIZE : CursorShape = CursorShape (10i64) ; pub const BDIAGSIZE : CursorShape = CursorShape (11i64) ; pub const FDIAGSIZE : CursorShape = CursorShape (12i64) ; pub const MOVE : CursorShape = CursorShape (13i64) ; pub const VSPLIT : CursorShape = CursorShape (14i64) ; pub const HSPLIT : CursorShape = CursorShape (15i64) ; pub const HELP : CursorShape = CursorShape (16i64) ; } impl From < i64 > for CursorShape { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CursorShape > for i64 { # [inline] fn from (v : CursorShape) -> Self { v . 0 } } impl FromVariant for CursorShape { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MouseMode (pub i64) ; impl MouseMode { pub const VISIBLE : MouseMode = MouseMode (0i64) ; pub const HIDDEN : MouseMode = MouseMode (1i64) ; pub const CAPTURED : MouseMode = MouseMode (2i64) ; pub const CONFINED : MouseMode = MouseMode (3i64) ; } impl From < i64 > for MouseMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MouseMode > for i64 { # [inline] fn from (v : MouseMode) -> Self { v . 0 } } impl FromVariant for MouseMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Input { pub const CURSOR_ARROW : i64 = 0i64 ; pub const MOUSE_MODE_VISIBLE : i64 = 0i64 ; pub const CURSOR_IBEAM : i64 = 1i64 ; pub const MOUSE_MODE_HIDDEN : i64 = 1i64 ; pub const CURSOR_POINTING_HAND : i64 = 2i64 ; pub const MOUSE_MODE_CAPTURED : i64 = 2i64 ; pub const CURSOR_CROSS : i64 = 3i64 ; pub const MOUSE_MODE_CONFINED : i64 = 3i64 ; pub const CURSOR_WAIT : i64 = 4i64 ; pub const CURSOR_BUSY : i64 = 5i64 ; pub const CURSOR_DRAG : i64 = 6i64 ; pub const CURSOR_CAN_DROP : i64 = 7i64 ; pub const CURSOR_FORBIDDEN : i64 = 8i64 ; pub const CURSOR_VSIZE : i64 = 9i64 ; pub const CURSOR_HSIZE : i64 = 10i64 ; pub const CURSOR_BDIAGSIZE : i64 = 11i64 ; pub const CURSOR_FDIAGSIZE : i64 = 12i64 ; pub const CURSOR_MOVE : i64 = 13i64 ; pub const CURSOR_VSPLIT : i64 = 14i64 ; pub const CURSOR_HSPLIT : i64 = 15i64 ; pub const CURSOR_HELP : i64 = 16i64 ; } impl Input { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("Input\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "This will simulate pressing the specified action.\nThe strength can be used for non-boolean actions, it's ranged between 0 and 1 representing the intensity of the given action.\n**Note:** This method will not cause any [`Node._input`][Node::_input] calls. It is intended to be used with [`is_action_pressed`][Self::is_action_pressed] and [`is_action_just_pressed`][Self::is_action_just_pressed]. If you want to simulate `_input`, use [`parse_input_event`][Self::parse_input_event] instead.\n# Default Arguments\n* `strength` - `1.0`"] # [doc = ""] # [inline] pub fn action_press (& self , action : impl Into < GodotString > , strength : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . action_press ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , action . into () , strength as _) ; } } # [doc = "If the specified action is already pressed, this will release it."] # [doc = ""] # [inline] pub fn action_release (& self , action : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . action_release ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; } } # [doc = "Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices.\n# Default Arguments\n* `update_existing` - `false`"] # [doc = ""] # [inline] pub fn add_joy_mapping (& self , mapping : impl Into < GodotString > , update_existing : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . add_joy_mapping ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , mapping . into () , update_existing as _) ; } } # [doc = "Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input ([`use_accumulated_input`][Self::use_accumulated_input]) or agile input flushing ([member ProjectSettings.input_devices/buffering/agile_event_flushing]).\nThe engine will already do this itself at key execution points (at least once per frame). However, this can be useful in advanced cases where you want precise control over the timing of event handling."] # [doc = ""] # [inline] pub fn flush_buffered_events (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . flush_buffered_events ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the acceleration of the device's accelerometer sensor, if the device has one. Otherwise, the method returns [`Vector3.ZERO`][Vector3::ZERO].\nNote this method returns an empty [`Vector3`][Vector3] when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer.\n**Note:** This method only works on iOS, Android, and UWP. On other platforms, it always returns [`Vector3.ZERO`][Vector3::ZERO]. On Android the unit of measurement for each axis is m/s² while on iOS and UWP it's a multiple of the Earth's gravitational acceleration `g` (~9.81 m/s²)."] # [doc = ""] # [inline] pub fn get_accelerometer (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_accelerometer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a value between 0 and 1 representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use [`get_action_strength`][Self::get_action_strength] instead.\nIf `exact` is `false`, it ignores additional input modifiers for [`InputEventKey`][InputEventKey] and [`InputEventMouseButton`][InputEventMouseButton] events, and the direction for [`InputEventJoypadMotion`][InputEventJoypadMotion] events.\n# Default Arguments\n* `exact` - `false`"] # [doc = ""] # [inline] pub fn get_action_raw_strength (& self , action : impl Into < GodotString > , exact : bool) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_action_raw_strength ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , action . into () , exact as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1.\nIf `exact` is `false`, it ignores additional input modifiers for [`InputEventKey`][InputEventKey] and [`InputEventMouseButton`][InputEventMouseButton] events, and the direction for [`InputEventJoypadMotion`][InputEventJoypadMotion] events.\n# Default Arguments\n* `exact` - `false`"] # [doc = ""] # [inline] pub fn get_action_strength (& self , action : impl Into < GodotString > , exact : bool) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_action_strength ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , action . into () , exact as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Get axis input by specifying two actions, one negative and one positive.\nThis is a shorthand for writing `Input.get_action_strength(\"positive_action\") - Input.get_action_strength(\"negative_action\")`."] # [doc = ""] # [inline] pub fn get_axis (& self , negative_action : impl Into < GodotString > , positive_action : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_axis ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , negative_action . into () , positive_action . into ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an [`Array`][VariantArray] containing the device IDs of all currently connected joypads."] # [doc = ""] # [inline] pub fn get_connected_joypads (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_connected_joypads ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the currently assigned cursor shape (see [`CursorShape`][CursorShape])."] # [doc = ""] # [inline] pub fn get_current_cursor_shape (& self) -> crate :: generated :: input :: CursorShape { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_current_cursor_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: input :: CursorShape > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the gravity of the device's accelerometer sensor, if the device has one. Otherwise, the method returns [`Vector3.ZERO`][Vector3::ZERO].\n**Note:** This method only works on Android and iOS. On other platforms, it always returns [`Vector3.ZERO`][Vector3::ZERO]. On Android the unit of measurement for each axis is m/s² while on iOS it's a multiple of the Earth's gravitational acceleration `g` (~9.81 m/s²)."] # [doc = ""] # [inline] pub fn get_gravity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_gravity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyroscope sensor, if the device has one. Otherwise, the method returns [`Vector3.ZERO`][Vector3::ZERO].\n**Note:** This method only works on Android and iOS. On other platforms, it always returns [`Vector3.ZERO`][Vector3::ZERO]."] # [doc = ""] # [inline] pub fn get_gyroscope (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_gyroscope ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current value of the joypad axis at given index (see [`JoystickList`][JoystickList])."] # [doc = ""] # [inline] pub fn get_joy_axis (& self , device : i64 , axis : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_axis ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , device as _ , axis as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the index of the provided axis name."] # [doc = ""] # [inline] pub fn get_joy_axis_index_from_string (& self , axis : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_axis_index_from_string ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , axis . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Receives a [`JoystickList`][JoystickList] axis and returns its equivalent name as a string."] # [doc = ""] # [inline] pub fn get_joy_axis_string (& self , axis_index : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_axis_string ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , axis_index as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the index of the provided button name."] # [doc = ""] # [inline] pub fn get_joy_button_index_from_string (& self , button : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_button_index_from_string ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , button . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Receives a gamepad button from [`JoystickList`][JoystickList] and returns its equivalent name as a string."] # [doc = ""] # [inline] pub fn get_joy_button_string (& self , button_index : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_button_string ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , button_index as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a SDL2-compatible device GUID on platforms that use gamepad remapping. Returns `\"Default Gamepad\"` otherwise."] # [doc = ""] # [inline] pub fn get_joy_guid (& self , device : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_guid ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , device as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the name of the joypad at the specified device index."] # [doc = ""] # [inline] pub fn get_joy_name (& self , device : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , device as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the duration of the current vibration effect in seconds."] # [doc = ""] # [inline] pub fn get_joy_vibration_duration (& self , device : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_vibration_duration ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , device as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor."] # [doc = ""] # [inline] pub fn get_joy_vibration_strength (& self , device : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_joy_vibration_strength ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , device as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the mouse speed for the last time the cursor was moved, and this until the next frame where the mouse moves. This means that even if the mouse is not moving, this function will still return the value of the last motion."] # [doc = ""] # [inline] pub fn get_last_mouse_speed (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_last_mouse_speed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the magnetic field strength in micro-Tesla for all axes of the device's magnetometer sensor, if the device has one. Otherwise, the method returns [`Vector3.ZERO`][Vector3::ZERO].\n**Note:** This method only works on Android, iOS and UWP. On other platforms, it always returns [`Vector3.ZERO`][Vector3::ZERO]."] # [doc = ""] # [inline] pub fn get_magnetometer (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_magnetometer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together."] # [doc = ""] # [inline] pub fn get_mouse_button_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_mouse_button_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Controls the mouse mode. See [`MouseMode`][MouseMode] for more information."] # [doc = ""] # [inline] pub fn mouse_mode (& self) -> crate :: generated :: input :: MouseMode { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_mouse_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: input :: MouseMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets an input vector by specifying four actions for the positive and negative X and Y axes.\nThis method is useful when getting vector input, such as from a joystick, directional pad, arrows, or WASD. The vector has its length limited to 1 and has a circular deadzone, which is useful for using vector input as movement.\nBy default, the deadzone is automatically calculated from the average of the action deadzones. However, you can override the deadzone to be whatever you want (on the range of 0 to 1).\n# Default Arguments\n* `deadzone` - `-1.0`"] # [doc = ""] # [inline] pub fn get_vector (& self , negative_x : impl Into < GodotString > , positive_x : impl Into < GodotString > , negative_y : impl Into < GodotString > , positive_y : impl Into < GodotString > , deadzone : f64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . get_vector ; let ret = crate :: icalls :: icallvar__str_str_str_str_f64 (method_bind , self . this . sys () . as_ptr () , negative_x . into () , positive_x . into () , negative_y . into () , positive_y . into () , deadzone as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` when the user starts pressing the action event, meaning it's `true` only on the frame that the user pressed down the button.\nThis is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed.\nIf `exact` is `false`, it ignores additional input modifiers for [`InputEventKey`][InputEventKey] and [`InputEventMouseButton`][InputEventMouseButton] events, and the direction for [`InputEventJoypadMotion`][InputEventJoypadMotion] events.\n**Note:** Due to keyboard ghosting, [`is_action_just_pressed`][Self::is_action_just_pressed] may return `false` even if one of the action's keys is pressed. See [Input examples](https://docs.godotengine.org/en/3.5.1/tutorials/inputs/input_examples.html#keyboard-events) in the documentation for more information.\n# Default Arguments\n* `exact` - `false`"] # [doc = ""] # [inline] pub fn is_action_just_pressed (& self , action : impl Into < GodotString > , exact : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_action_just_pressed ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , action . into () , exact as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` when the user stops pressing the action event, meaning it's `true` only on the frame that the user released the button.\nIf `exact` is `false`, it ignores additional input modifiers for [`InputEventKey`][InputEventKey] and [`InputEventMouseButton`][InputEventMouseButton] events, and the direction for [`InputEventJoypadMotion`][InputEventJoypadMotion] events.\n# Default Arguments\n* `exact` - `false`"] # [doc = ""] # [inline] pub fn is_action_just_released (& self , action : impl Into < GodotString > , exact : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_action_just_released ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , action . into () , exact as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed.\nIf `exact` is `false`, it ignores additional input modifiers for [`InputEventKey`][InputEventKey] and [`InputEventMouseButton`][InputEventMouseButton] events, and the direction for [`InputEventJoypadMotion`][InputEventJoypadMotion] events.\n**Note:** Due to keyboard ghosting, [`is_action_pressed`][Self::is_action_pressed] may return `false` even if one of the action's keys is pressed. See [Input examples](https://docs.godotengine.org/en/3.5.1/tutorials/inputs/input_examples.html#keyboard-events) in the documentation for more information.\n# Default Arguments\n* `exact` - `false`"] # [doc = ""] # [inline] pub fn is_action_pressed (& self , action : impl Into < GodotString > , exact : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_action_pressed ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , action . into () , exact as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if you are pressing the joypad button (see [`JoystickList`][JoystickList])."] # [doc = ""] # [inline] pub fn is_joy_button_pressed (& self , device : i64 , button : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_joy_button_pressed ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , device as _ , button as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the system knows the specified device. This means that it sets all button and axis indices exactly as defined in [`JoystickList`][JoystickList]. Unknown joypads are not expected to match these constants, but you can still retrieve events from them."] # [doc = ""] # [inline] pub fn is_joy_known (& self , device : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_joy_known ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , device as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if you are pressing the key in the current keyboard layout. You can pass a [`KeyList`][KeyList] constant.\n[`is_key_pressed`][Self::is_key_pressed] is only recommended over [`is_physical_key_pressed`][Self::is_physical_key_pressed] in non-game applications. This ensures that shortcut keys behave as expected depending on the user's keyboard layout, as keyboard shortcuts are generally dependent on the keyboard layout in non-game applications. If in doubt, use [`is_physical_key_pressed`][Self::is_physical_key_pressed].\n**Note:** Due to keyboard ghosting, [`is_key_pressed`][Self::is_key_pressed] may return `false` even if one of the action's keys is pressed. See [Input examples](https://docs.godotengine.org/en/3.5.1/tutorials/inputs/input_examples.html#keyboard-events) in the documentation for more information."] # [doc = ""] # [inline] pub fn is_key_pressed (& self , scancode : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_key_pressed ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , scancode as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if you are pressing the mouse button specified with [`ButtonList`][ButtonList]."] # [doc = ""] # [inline] pub fn is_mouse_button_pressed (& self , button : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_mouse_button_pressed ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , button as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if you are pressing the key in the physical location on the 101/102-key US QWERTY keyboard. You can pass a [`KeyList`][KeyList] constant.\n[`is_physical_key_pressed`][Self::is_physical_key_pressed] is recommended over [`is_key_pressed`][Self::is_key_pressed] for in-game actions, as it will make W/A/S/D layouts work regardless of the user's keyboard layout. [`is_physical_key_pressed`][Self::is_physical_key_pressed] will also ensure that the top row number keys work on any keyboard layout. If in doubt, use [`is_physical_key_pressed`][Self::is_physical_key_pressed].\n**Note:** Due to keyboard ghosting, [`is_physical_key_pressed`][Self::is_physical_key_pressed] may return `false` even if one of the action's keys is pressed. See [Input examples](https://docs.godotengine.org/en/3.5.1/tutorials/inputs/input_examples.html#keyboard-events) in the documentation for more information."] # [doc = ""] # [inline] pub fn is_physical_key_pressed (& self , scancode : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_physical_key_pressed ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , scancode as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, similar input events sent by the operating system are accumulated. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS.\nInput accumulation can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input.\n**Note:** Input accumulation is _enabled_ by default. It is recommended to keep it enabled for games which don't require very reactive input, as this will decrease CPU usage."] # [doc = ""] # [inline] pub fn is_using_accumulated_input (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . is_using_accumulated_input ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Notifies the [`Input`][Input] singleton that a connection has changed, to update the state for the `device` index.\nThis is used internally and should not have to be called from user scripts. See `joy_connection_changed` for the signal emitted when this is triggered internally."] # [doc = ""] # [inline] pub fn joy_connection_changed (& self , device : i64 , connected : bool , name : impl Into < GodotString > , guid : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . joy_connection_changed ; let ret = crate :: icalls :: icallvar__i64_bool_str_str (method_bind , self . this . sys () . as_ptr () , device as _ , connected as _ , name . into () , guid . into ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nFeeds an [`InputEvent`][InputEvent] to the game. Can be used to artificially trigger input events from code. Also generates [`Node._input`][Node::_input] calls.\nExample:\n```gdscript\nvar a = InputEventAction.new()\na.action = \"ui_cancel\"\na.pressed = true\nInput.parse_input_event(a)\n```"] # [doc = ""] # [inline] pub fn parse_input_event (& self , event : impl AsArg < crate :: generated :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . parse_input_event ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr ()) ; } } # [doc = "Removes all mappings from the internal database that match the given GUID."] # [doc = ""] # [inline] pub fn remove_joy_mapping (& self , guid : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . remove_joy_mapping ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , guid . into ()) ; } } # [doc = "Sets the acceleration value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.\n**Note:** This value can be immediately overwritten by the hardware sensor value on Android and iOS."] # [doc = ""] # [inline] pub fn set_accelerometer (& self , value : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_accelerometer ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing `null` to the image parameter resets to the system cursor. See [`CursorShape`][CursorShape] for the list of shapes.\n`image`'s size must be lower than 256×256.\n`hotspot` must be within `image`'s size.\n**Note:** [`AnimatedTexture`][AnimatedTexture]s aren't supported as custom mouse cursors. If using an [`AnimatedTexture`][AnimatedTexture], only the first frame will be displayed.\n**Note:** Only images imported with the **Lossless**, **Lossy** or **Uncompressed** compression modes are supported. The **Video RAM** compression mode can't be used for custom cursors.\n# Default Arguments\n* `shape` - `0`\n* `hotspot` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn set_custom_mouse_cursor (& self , image : impl AsArg < crate :: generated :: Resource > , shape : i64 , hotspot : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_custom_mouse_cursor ; let ret = crate :: icalls :: icallvar__obj_i64_vec2 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , shape as _ , hotspot) ; } } # [doc = "Sets the default cursor shape to be used in the viewport instead of [`CURSOR_ARROW`][Self::CURSOR_ARROW].\n**Note:** If you want to change the default cursor shape for [`Control`][Control]'s nodes, use [`Control.mouse_default_cursor_shape`][Control::mouse_default_cursor_shape] instead.\n**Note:** This method generates an [`InputEventMouseMotion`][InputEventMouseMotion] to update cursor immediately.\n# Default Arguments\n* `shape` - `0`"] # [doc = ""] # [inline] pub fn set_default_cursor_shape (& self , shape : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_default_cursor_shape ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , shape as _) ; } } # [doc = "Sets the gravity value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.\n**Note:** This value can be immediately overwritten by the hardware sensor value on Android and iOS."] # [doc = ""] # [inline] pub fn set_gravity (& self , value : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_gravity ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Sets the value of the rotation rate of the gyroscope sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.\n**Note:** This value can be immediately overwritten by the hardware sensor value on Android and iOS."] # [doc = ""] # [inline] pub fn set_gyroscope (& self , value : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_gyroscope ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Sets the value of the magnetic field of the magnetometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.\n**Note:** This value can be immediately overwritten by the hardware sensor value on Android and iOS."] # [doc = ""] # [inline] pub fn set_magnetometer (& self , value : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_magnetometer ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Controls the mouse mode. See [`MouseMode`][MouseMode] for more information."] # [doc = ""] # [inline] pub fn set_mouse_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_mouse_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "If `true`, similar input events sent by the operating system are accumulated. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS.\nInput accumulation can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input.\n**Note:** Input accumulation is _enabled_ by default. It is recommended to keep it enabled for games which don't require very reactive input, as this will decrease CPU usage."] # [doc = ""] # [inline] pub fn set_use_accumulated_input (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . set_use_accumulated_input ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. `weak_magnitude` is the strength of the weak motor (between 0 and 1) and `strong_magnitude` is the strength of the strong motor (between 0 and 1). `duration` is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely).\n**Note:** Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds.\n# Default Arguments\n* `duration` - `0`"] # [doc = ""] # [inline] pub fn start_joy_vibration (& self , device : i64 , weak_magnitude : f64 , strong_magnitude : f64 , duration : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . start_joy_vibration ; let ret = crate :: icalls :: icallvar__i64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , device as _ , weak_magnitude as _ , strong_magnitude as _ , duration as _) ; } } # [doc = "Stops the vibration of the joypad."] # [doc = ""] # [inline] pub fn stop_joy_vibration (& self , device : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . stop_joy_vibration ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , device as _) ; } } # [doc = "Vibrate handheld devices.\n**Note:** This method is implemented on Android, iOS, and HTML5.\n**Note:** For Android, it requires enabling the `VIBRATE` permission in the export preset.\n**Note:** For iOS, specifying the duration is supported in iOS 13 and later.\n**Note:** Some web browsers such as Safari and Firefox for Android do not support this method.\n# Default Arguments\n* `duration_ms` - `500`"] # [doc = ""] # [inline] pub fn vibrate_handheld (& self , duration_ms : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . vibrate_handheld ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , duration_ms as _) ; } } # [doc = "Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the game window.\nMouse position is clipped to the limits of the screen resolution, or to the limits of the game window if [`MouseMode`][MouseMode] is set to [`MOUSE_MODE_CONFINED`][Self::MOUSE_MODE_CONFINED]."] # [doc = ""] # [inline] pub fn warp_mouse_position (& self , to : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMethodTable :: get (get_api ()) . warp_mouse_position ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , to) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Input { } unsafe impl GodotObject for Input { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Input" } } impl std :: ops :: Deref for Input { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Input { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for Input { } unsafe impl Send for Input { } unsafe impl Sync for Input { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputMethodTable { pub class_constructor : sys :: godot_class_constructor , pub action_press : * mut sys :: godot_method_bind , pub action_release : * mut sys :: godot_method_bind , pub add_joy_mapping : * mut sys :: godot_method_bind , pub flush_buffered_events : * mut sys :: godot_method_bind , pub get_accelerometer : * mut sys :: godot_method_bind , pub get_action_raw_strength : * mut sys :: godot_method_bind , pub get_action_strength : * mut sys :: godot_method_bind , pub get_axis : * mut sys :: godot_method_bind , pub get_connected_joypads : * mut sys :: godot_method_bind , pub get_current_cursor_shape : * mut sys :: godot_method_bind , pub get_gravity : * mut sys :: godot_method_bind , pub get_gyroscope : * mut sys :: godot_method_bind , pub get_joy_axis : * mut sys :: godot_method_bind , pub get_joy_axis_index_from_string : * mut sys :: godot_method_bind , pub get_joy_axis_string : * mut sys :: godot_method_bind , pub get_joy_button_index_from_string : * mut sys :: godot_method_bind , pub get_joy_button_string : * mut sys :: godot_method_bind , pub get_joy_guid : * mut sys :: godot_method_bind , pub get_joy_name : * mut sys :: godot_method_bind , pub get_joy_vibration_duration : * mut sys :: godot_method_bind , pub get_joy_vibration_strength : * mut sys :: godot_method_bind , pub get_last_mouse_speed : * mut sys :: godot_method_bind , pub get_magnetometer : * mut sys :: godot_method_bind , pub get_mouse_button_mask : * mut sys :: godot_method_bind , pub get_mouse_mode : * mut sys :: godot_method_bind , pub get_vector : * mut sys :: godot_method_bind , pub is_action_just_pressed : * mut sys :: godot_method_bind , pub is_action_just_released : * mut sys :: godot_method_bind , pub is_action_pressed : * mut sys :: godot_method_bind , pub is_joy_button_pressed : * mut sys :: godot_method_bind , pub is_joy_known : * mut sys :: godot_method_bind , pub is_key_pressed : * mut sys :: godot_method_bind , pub is_mouse_button_pressed : * mut sys :: godot_method_bind , pub is_physical_key_pressed : * mut sys :: godot_method_bind , pub is_using_accumulated_input : * mut sys :: godot_method_bind , pub joy_connection_changed : * mut sys :: godot_method_bind , pub parse_input_event : * mut sys :: godot_method_bind , pub remove_joy_mapping : * mut sys :: godot_method_bind , pub set_accelerometer : * mut sys :: godot_method_bind , pub set_custom_mouse_cursor : * mut sys :: godot_method_bind , pub set_default_cursor_shape : * mut sys :: godot_method_bind , pub set_gravity : * mut sys :: godot_method_bind , pub set_gyroscope : * mut sys :: godot_method_bind , pub set_magnetometer : * mut sys :: godot_method_bind , pub set_mouse_mode : * mut sys :: godot_method_bind , pub set_use_accumulated_input : * mut sys :: godot_method_bind , pub start_joy_vibration : * mut sys :: godot_method_bind , pub stop_joy_vibration : * mut sys :: godot_method_bind , pub vibrate_handheld : * mut sys :: godot_method_bind , pub warp_mouse_position : * mut sys :: godot_method_bind } impl InputMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputMethodTable = InputMethodTable { class_constructor : None , action_press : 0 as * mut sys :: godot_method_bind , action_release : 0 as * mut sys :: godot_method_bind , add_joy_mapping : 0 as * mut sys :: godot_method_bind , flush_buffered_events : 0 as * mut sys :: godot_method_bind , get_accelerometer : 0 as * mut sys :: godot_method_bind , get_action_raw_strength : 0 as * mut sys :: godot_method_bind , get_action_strength : 0 as * mut sys :: godot_method_bind , get_axis : 0 as * mut sys :: godot_method_bind , get_connected_joypads : 0 as * mut sys :: godot_method_bind , get_current_cursor_shape : 0 as * mut sys :: godot_method_bind , get_gravity : 0 as * mut sys :: godot_method_bind , get_gyroscope : 0 as * mut sys :: godot_method_bind , get_joy_axis : 0 as * mut sys :: godot_method_bind , get_joy_axis_index_from_string : 0 as * mut sys :: godot_method_bind , get_joy_axis_string : 0 as * mut sys :: godot_method_bind , get_joy_button_index_from_string : 0 as * mut sys :: godot_method_bind , get_joy_button_string : 0 as * mut sys :: godot_method_bind , get_joy_guid : 0 as * mut sys :: godot_method_bind , get_joy_name : 0 as * mut sys :: godot_method_bind , get_joy_vibration_duration : 0 as * mut sys :: godot_method_bind , get_joy_vibration_strength : 0 as * mut sys :: godot_method_bind , get_last_mouse_speed : 0 as * mut sys :: godot_method_bind , get_magnetometer : 0 as * mut sys :: godot_method_bind , get_mouse_button_mask : 0 as * mut sys :: godot_method_bind , get_mouse_mode : 0 as * mut sys :: godot_method_bind , get_vector : 0 as * mut sys :: godot_method_bind , is_action_just_pressed : 0 as * mut sys :: godot_method_bind , is_action_just_released : 0 as * mut sys :: godot_method_bind , is_action_pressed : 0 as * mut sys :: godot_method_bind , is_joy_button_pressed : 0 as * mut sys :: godot_method_bind , is_joy_known : 0 as * mut sys :: godot_method_bind , is_key_pressed : 0 as * mut sys :: godot_method_bind , is_mouse_button_pressed : 0 as * mut sys :: godot_method_bind , is_physical_key_pressed : 0 as * mut sys :: godot_method_bind , is_using_accumulated_input : 0 as * mut sys :: godot_method_bind , joy_connection_changed : 0 as * mut sys :: godot_method_bind , parse_input_event : 0 as * mut sys :: godot_method_bind , remove_joy_mapping : 0 as * mut sys :: godot_method_bind , set_accelerometer : 0 as * mut sys :: godot_method_bind , set_custom_mouse_cursor : 0 as * mut sys :: godot_method_bind , set_default_cursor_shape : 0 as * mut sys :: godot_method_bind , set_gravity : 0 as * mut sys :: godot_method_bind , set_gyroscope : 0 as * mut sys :: godot_method_bind , set_magnetometer : 0 as * mut sys :: godot_method_bind , set_mouse_mode : 0 as * mut sys :: godot_method_bind , set_use_accumulated_input : 0 as * mut sys :: godot_method_bind , start_joy_vibration : 0 as * mut sys :: godot_method_bind , stop_joy_vibration : 0 as * mut sys :: godot_method_bind , vibrate_handheld : 0 as * mut sys :: godot_method_bind , warp_mouse_position : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Input\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . action_press = (gd_api . godot_method_bind_get_method) (class_name , "action_press\0" . as_ptr () as * const c_char) ; table . action_release = (gd_api . godot_method_bind_get_method) (class_name , "action_release\0" . as_ptr () as * const c_char) ; table . add_joy_mapping = (gd_api . godot_method_bind_get_method) (class_name , "add_joy_mapping\0" . as_ptr () as * const c_char) ; table . flush_buffered_events = (gd_api . godot_method_bind_get_method) (class_name , "flush_buffered_events\0" . as_ptr () as * const c_char) ; table . get_accelerometer = (gd_api . godot_method_bind_get_method) (class_name , "get_accelerometer\0" . as_ptr () as * const c_char) ; table . get_action_raw_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_action_raw_strength\0" . as_ptr () as * const c_char) ; table . get_action_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_action_strength\0" . as_ptr () as * const c_char) ; table . get_axis = (gd_api . godot_method_bind_get_method) (class_name , "get_axis\0" . as_ptr () as * const c_char) ; table . get_connected_joypads = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_joypads\0" . as_ptr () as * const c_char) ; table . get_current_cursor_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_current_cursor_shape\0" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\0" . as_ptr () as * const c_char) ; table . get_gyroscope = (gd_api . godot_method_bind_get_method) (class_name , "get_gyroscope\0" . as_ptr () as * const c_char) ; table . get_joy_axis = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_axis\0" . as_ptr () as * const c_char) ; table . get_joy_axis_index_from_string = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_axis_index_from_string\0" . as_ptr () as * const c_char) ; table . get_joy_axis_string = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_axis_string\0" . as_ptr () as * const c_char) ; table . get_joy_button_index_from_string = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_button_index_from_string\0" . as_ptr () as * const c_char) ; table . get_joy_button_string = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_button_string\0" . as_ptr () as * const c_char) ; table . get_joy_guid = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_guid\0" . as_ptr () as * const c_char) ; table . get_joy_name = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_name\0" . as_ptr () as * const c_char) ; table . get_joy_vibration_duration = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_vibration_duration\0" . as_ptr () as * const c_char) ; table . get_joy_vibration_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_joy_vibration_strength\0" . as_ptr () as * const c_char) ; table . get_last_mouse_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_last_mouse_speed\0" . as_ptr () as * const c_char) ; table . get_magnetometer = (gd_api . godot_method_bind_get_method) (class_name , "get_magnetometer\0" . as_ptr () as * const c_char) ; table . get_mouse_button_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_mouse_button_mask\0" . as_ptr () as * const c_char) ; table . get_mouse_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mouse_mode\0" . as_ptr () as * const c_char) ; table . get_vector = (gd_api . godot_method_bind_get_method) (class_name , "get_vector\0" . as_ptr () as * const c_char) ; table . is_action_just_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_action_just_pressed\0" . as_ptr () as * const c_char) ; table . is_action_just_released = (gd_api . godot_method_bind_get_method) (class_name , "is_action_just_released\0" . as_ptr () as * const c_char) ; table . is_action_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_action_pressed\0" . as_ptr () as * const c_char) ; table . is_joy_button_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_joy_button_pressed\0" . as_ptr () as * const c_char) ; table . is_joy_known = (gd_api . godot_method_bind_get_method) (class_name , "is_joy_known\0" . as_ptr () as * const c_char) ; table . is_key_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_key_pressed\0" . as_ptr () as * const c_char) ; table . is_mouse_button_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_mouse_button_pressed\0" . as_ptr () as * const c_char) ; table . is_physical_key_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_physical_key_pressed\0" . as_ptr () as * const c_char) ; table . is_using_accumulated_input = (gd_api . godot_method_bind_get_method) (class_name , "is_using_accumulated_input\0" . as_ptr () as * const c_char) ; table . joy_connection_changed = (gd_api . godot_method_bind_get_method) (class_name , "joy_connection_changed\0" . as_ptr () as * const c_char) ; table . parse_input_event = (gd_api . godot_method_bind_get_method) (class_name , "parse_input_event\0" . as_ptr () as * const c_char) ; table . remove_joy_mapping = (gd_api . godot_method_bind_get_method) (class_name , "remove_joy_mapping\0" . as_ptr () as * const c_char) ; table . set_accelerometer = (gd_api . godot_method_bind_get_method) (class_name , "set_accelerometer\0" . as_ptr () as * const c_char) ; table . set_custom_mouse_cursor = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_mouse_cursor\0" . as_ptr () as * const c_char) ; table . set_default_cursor_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_default_cursor_shape\0" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\0" . as_ptr () as * const c_char) ; table . set_gyroscope = (gd_api . godot_method_bind_get_method) (class_name , "set_gyroscope\0" . as_ptr () as * const c_char) ; table . set_magnetometer = (gd_api . godot_method_bind_get_method) (class_name , "set_magnetometer\0" . as_ptr () as * const c_char) ; table . set_mouse_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mouse_mode\0" . as_ptr () as * const c_char) ; table . set_use_accumulated_input = (gd_api . godot_method_bind_get_method) (class_name , "set_use_accumulated_input\0" . as_ptr () as * const c_char) ; table . start_joy_vibration = (gd_api . godot_method_bind_get_method) (class_name , "start_joy_vibration\0" . as_ptr () as * const c_char) ; table . stop_joy_vibration = (gd_api . godot_method_bind_get_method) (class_name , "stop_joy_vibration\0" . as_ptr () as * const c_char) ; table . vibrate_handheld = (gd_api . godot_method_bind_get_method) (class_name , "vibrate_handheld\0" . as_ptr () as * const c_char) ; table . warp_mouse_position = (gd_api . godot_method_bind_get_method) (class_name , "warp_mouse_position\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input::private::Input;
            
            pub(crate) mod input_default {
                # ! [doc = "This module contains types related to the API class [`InputDefault`][super::InputDefault]."] pub (crate) mod private { # [doc = "`core class InputDefault` inherits `Input` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputdefault.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nInputDefault inherits methods from:\n - [Input](struct.Input.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputDefault { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputDefault ; impl InputDefault { } impl gdnative_core :: private :: godot_object :: Sealed for InputDefault { } unsafe impl GodotObject for InputDefault { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "InputDefault" } } impl std :: ops :: Deref for InputDefault { type Target = crate :: generated :: Input ; # [inline] fn deref (& self) -> & crate :: generated :: Input { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputDefault { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Input { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Input > for InputDefault { } unsafe impl SubClass < crate :: generated :: Object > for InputDefault { }
                use super::*;
            }
            pub use crate::generated::input_default::private::InputDefault;
            
            pub(crate) mod input_event {
                # ! [doc = "This module contains types related to the API class [`InputEvent`][super::InputEvent]."] pub (crate) mod private { # [doc = "`core class InputEvent` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputevent.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEvent inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEvent { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputEvent ; impl InputEvent { # [doc = "Returns `true` if the given input event and this input event can be added together (only for events of type [`InputEventMouseMotion`][InputEventMouseMotion]).\nThe given input event's position, global position and speed will be copied. The resulting `relative` is a sum of both events. Both events' modifiers have to be identical."] # [doc = ""] # [inline] pub fn accumulate (& self , with_event : impl AsArg < crate :: generated :: InputEvent >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . accumulate ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , with_event . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns a [`String`][GodotString] representation of the event."] # [doc = ""] # [inline] pub fn as_text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . as_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type [`InputEventJoypadMotion`][InputEventJoypadMotion].\nIf `exact_match` is `false`, it ignores additional input modifiers for [`InputEventKey`][InputEventKey] and [`InputEventMouseButton`][InputEventMouseButton] events, and the direction for [`InputEventJoypadMotion`][InputEventJoypadMotion] events.\n# Default Arguments\n* `exact_match` - `false`"] # [doc = ""] # [inline] pub fn get_action_strength (& self , action : impl Into < GodotString > , exact_match : bool) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . get_action_strength ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , action . into () , exact_match as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The event's device ID.\n**Note:** This device ID will always be `-1` for emulated mouse input from a touchscreen. This can be used to distinguish emulated mouse input from physical mouse input."] # [doc = ""] # [inline] pub fn device (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . get_device ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this input event matches a pre-defined action of any type.\nIf `exact_match` is `false`, it ignores additional input modifiers for [`InputEventKey`][InputEventKey] and [`InputEventMouseButton`][InputEventMouseButton] events, and the direction for [`InputEventJoypadMotion`][InputEventJoypadMotion] events.\n# Default Arguments\n* `exact_match` - `false`"] # [doc = ""] # [inline] pub fn is_action (& self , action : impl Into < GodotString > , exact_match : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . is_action ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , action . into () , exact_match as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given action is being pressed (and is not an echo event for [`InputEventKey`][InputEventKey] events, unless `allow_echo` is `true`). Not relevant for events of type [`InputEventMouseMotion`][InputEventMouseMotion] or [`InputEventScreenDrag`][InputEventScreenDrag].\nIf `exact_match` is `false`, it ignores additional input modifiers for [`InputEventKey`][InputEventKey] and [`InputEventMouseButton`][InputEventMouseButton] events, and the direction for [`InputEventJoypadMotion`][InputEventJoypadMotion] events.\n**Note:** Due to keyboard ghosting, [`is_action_pressed`][Self::is_action_pressed] may return `false` even if one of the action's keys is pressed. See [Input examples](https://docs.godotengine.org/en/3.5.1/tutorials/inputs/input_examples.html#keyboard-events) in the documentation for more information.\n# Default Arguments\n* `allow_echo` - `false`\n* `exact_match` - `false`"] # [doc = ""] # [inline] pub fn is_action_pressed (& self , action : impl Into < GodotString > , allow_echo : bool , exact_match : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . is_action_pressed ; let ret = crate :: icalls :: icallvar__str_bool_bool (method_bind , self . this . sys () . as_ptr () , action . into () , allow_echo as _ , exact_match as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given action is released (i.e. not pressed). Not relevant for events of type [`InputEventMouseMotion`][InputEventMouseMotion] or [`InputEventScreenDrag`][InputEventScreenDrag].\nIf `exact_match` is `false`, it ignores additional input modifiers for [`InputEventKey`][InputEventKey] and [`InputEventMouseButton`][InputEventMouseButton] events, and the direction for [`InputEventJoypadMotion`][InputEventJoypadMotion] events.\n# Default Arguments\n* `exact_match` - `false`"] # [doc = ""] # [inline] pub fn is_action_released (& self , action : impl Into < GodotString > , exact_match : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . is_action_released ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , action . into () , exact_match as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this input event's type is one that can be assigned to an input action."] # [doc = ""] # [inline] pub fn is_action_type (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . is_action_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this input event is an echo event (only for events of type [`InputEventKey`][InputEventKey])."] # [doc = ""] # [inline] pub fn is_echo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . is_echo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this input event is pressed. Not relevant for events of type [`InputEventMouseMotion`][InputEventMouseMotion] or [`InputEventScreenDrag`][InputEventScreenDrag].\n**Note:** Due to keyboard ghosting, [`is_action_pressed`][Self::is_action_pressed] may return `false` even if one of the action's keys is pressed. See [Input examples](https://docs.godotengine.org/en/3.5.1/tutorials/inputs/input_examples.html#keyboard-events) in the documentation for more information."] # [doc = ""] # [inline] pub fn is_pressed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . is_pressed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The event's device ID.\n**Note:** This device ID will always be `-1` for emulated mouse input from a touchscreen. This can be used to distinguish emulated mouse input from physical mouse input."] # [doc = ""] # [inline] pub fn set_device (& self , device : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . set_device ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , device as _) ; } } # [doc = "Returns `true` if the specified `event` matches this event. Only valid for action events i.e key ([`InputEventKey`][InputEventKey]), button ([`InputEventMouseButton`][InputEventMouseButton] or [`InputEventJoypadButton`][InputEventJoypadButton]), axis [`InputEventJoypadMotion`][InputEventJoypadMotion] or action ([`InputEventAction`][InputEventAction]) events.\nIf `exact_match` is `false`, it ignores additional input modifiers for [`InputEventKey`][InputEventKey] and [`InputEventMouseButton`][InputEventMouseButton] events, and the direction for [`InputEventJoypadMotion`][InputEventJoypadMotion] events.\n# Default Arguments\n* `exact_match` - `true`"] # [doc = ""] # [inline] pub fn shortcut_match (& self , event : impl AsArg < crate :: generated :: InputEvent > , exact_match : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . shortcut_match ; let ret = crate :: icalls :: icallvar__obj_bool (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr () , exact_match as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns a copy of the given input event which has been offset by `local_ofs` and transformed by `xform`. Relevant for events of type [`InputEventMouseButton`][InputEventMouseButton], [`InputEventMouseMotion`][InputEventMouseMotion], [`InputEventScreenTouch`][InputEventScreenTouch], [`InputEventScreenDrag`][InputEventScreenDrag], [`InputEventMagnifyGesture`][InputEventMagnifyGesture] and [`InputEventPanGesture`][InputEventPanGesture].\n# Default Arguments\n* `local_ofs` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn xformed_by (& self , xform : Transform2D , local_ofs : Vector2) -> Option < Ref < crate :: generated :: InputEvent , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMethodTable :: get (get_api ()) . xformed_by ; let ret = crate :: icalls :: icallvar__trans2D_vec2 (method_bind , self . this . sys () . as_ptr () , xform , local_ofs) ; < Option < Ref < crate :: generated :: InputEvent , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEvent { } unsafe impl GodotObject for InputEvent { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEvent" } } impl std :: ops :: Deref for InputEvent { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEvent { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for InputEvent { } unsafe impl SubClass < crate :: generated :: Reference > for InputEvent { } unsafe impl SubClass < crate :: generated :: Object > for InputEvent { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventMethodTable { pub class_constructor : sys :: godot_class_constructor , pub accumulate : * mut sys :: godot_method_bind , pub as_text : * mut sys :: godot_method_bind , pub get_action_strength : * mut sys :: godot_method_bind , pub get_device : * mut sys :: godot_method_bind , pub is_action : * mut sys :: godot_method_bind , pub is_action_pressed : * mut sys :: godot_method_bind , pub is_action_released : * mut sys :: godot_method_bind , pub is_action_type : * mut sys :: godot_method_bind , pub is_echo : * mut sys :: godot_method_bind , pub is_pressed : * mut sys :: godot_method_bind , pub set_device : * mut sys :: godot_method_bind , pub shortcut_match : * mut sys :: godot_method_bind , pub xformed_by : * mut sys :: godot_method_bind } impl InputEventMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventMethodTable = InputEventMethodTable { class_constructor : None , accumulate : 0 as * mut sys :: godot_method_bind , as_text : 0 as * mut sys :: godot_method_bind , get_action_strength : 0 as * mut sys :: godot_method_bind , get_device : 0 as * mut sys :: godot_method_bind , is_action : 0 as * mut sys :: godot_method_bind , is_action_pressed : 0 as * mut sys :: godot_method_bind , is_action_released : 0 as * mut sys :: godot_method_bind , is_action_type : 0 as * mut sys :: godot_method_bind , is_echo : 0 as * mut sys :: godot_method_bind , is_pressed : 0 as * mut sys :: godot_method_bind , set_device : 0 as * mut sys :: godot_method_bind , shortcut_match : 0 as * mut sys :: godot_method_bind , xformed_by : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputEventMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEvent\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . accumulate = (gd_api . godot_method_bind_get_method) (class_name , "accumulate\0" . as_ptr () as * const c_char) ; table . as_text = (gd_api . godot_method_bind_get_method) (class_name , "as_text\0" . as_ptr () as * const c_char) ; table . get_action_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_action_strength\0" . as_ptr () as * const c_char) ; table . get_device = (gd_api . godot_method_bind_get_method) (class_name , "get_device\0" . as_ptr () as * const c_char) ; table . is_action = (gd_api . godot_method_bind_get_method) (class_name , "is_action\0" . as_ptr () as * const c_char) ; table . is_action_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_action_pressed\0" . as_ptr () as * const c_char) ; table . is_action_released = (gd_api . godot_method_bind_get_method) (class_name , "is_action_released\0" . as_ptr () as * const c_char) ; table . is_action_type = (gd_api . godot_method_bind_get_method) (class_name , "is_action_type\0" . as_ptr () as * const c_char) ; table . is_echo = (gd_api . godot_method_bind_get_method) (class_name , "is_echo\0" . as_ptr () as * const c_char) ; table . is_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_pressed\0" . as_ptr () as * const c_char) ; table . set_device = (gd_api . godot_method_bind_get_method) (class_name , "set_device\0" . as_ptr () as * const c_char) ; table . shortcut_match = (gd_api . godot_method_bind_get_method) (class_name , "shortcut_match\0" . as_ptr () as * const c_char) ; table . xformed_by = (gd_api . godot_method_bind_get_method) (class_name , "xformed_by\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_event::private::InputEvent;
            
            pub(crate) mod input_event_action {
                # ! [doc = "This module contains types related to the API class [`InputEventAction`][super::InputEventAction]."] pub (crate) mod private { # [doc = "`core class InputEventAction` inherits `InputEvent` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputeventaction.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventAction inherits methods from:\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventAction { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputEventAction ; impl InputEventAction { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventActionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The action's name. Actions are accessed via this [`String`][GodotString]."] # [doc = ""] # [inline] pub fn action (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventActionMethodTable :: get (get_api ()) . get_action ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The action's strength between 0 and 1. This value is considered as equal to 0 if pressed is `false`. The event strength allows faking analog joypad motion events, by specifying how strongly the joypad axis is bent or pressed."] # [doc = ""] # [inline] pub fn strength (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventActionMethodTable :: get (get_api ()) . get_strength ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The action's name. Actions are accessed via this [`String`][GodotString]."] # [doc = ""] # [inline] pub fn set_action (& self , action : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventActionMethodTable :: get (get_api ()) . set_action ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; } } # [doc = "If `true`, the action's state is pressed. If `false`, the action's state is released."] # [doc = ""] # [inline] pub fn set_pressed (& self , pressed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventActionMethodTable :: get (get_api ()) . set_pressed ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , pressed as _) ; } } # [doc = "The action's strength between 0 and 1. This value is considered as equal to 0 if pressed is `false`. The event strength allows faking analog joypad motion events, by specifying how strongly the joypad axis is bent or pressed."] # [doc = ""] # [inline] pub fn set_strength (& self , strength : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventActionMethodTable :: get (get_api ()) . set_strength ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , strength as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventAction { } unsafe impl GodotObject for InputEventAction { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventAction" } } impl std :: ops :: Deref for InputEventAction { type Target = crate :: generated :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventAction { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: InputEvent > for InputEventAction { } unsafe impl SubClass < crate :: generated :: Resource > for InputEventAction { } unsafe impl SubClass < crate :: generated :: Reference > for InputEventAction { } unsafe impl SubClass < crate :: generated :: Object > for InputEventAction { } impl Instanciable for InputEventAction { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { InputEventAction :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventActionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_action : * mut sys :: godot_method_bind , pub get_strength : * mut sys :: godot_method_bind , pub set_action : * mut sys :: godot_method_bind , pub set_pressed : * mut sys :: godot_method_bind , pub set_strength : * mut sys :: godot_method_bind } impl InputEventActionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventActionMethodTable = InputEventActionMethodTable { class_constructor : None , get_action : 0 as * mut sys :: godot_method_bind , get_strength : 0 as * mut sys :: godot_method_bind , set_action : 0 as * mut sys :: godot_method_bind , set_pressed : 0 as * mut sys :: godot_method_bind , set_strength : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputEventActionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventAction\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_action = (gd_api . godot_method_bind_get_method) (class_name , "get_action\0" . as_ptr () as * const c_char) ; table . get_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_strength\0" . as_ptr () as * const c_char) ; table . set_action = (gd_api . godot_method_bind_get_method) (class_name , "set_action\0" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\0" . as_ptr () as * const c_char) ; table . set_strength = (gd_api . godot_method_bind_get_method) (class_name , "set_strength\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_event_action::private::InputEventAction;
            
            pub(crate) mod input_event_gesture {
                # ! [doc = "This module contains types related to the API class [`InputEventGesture`][super::InputEventGesture]."] pub (crate) mod private { # [doc = "`core class InputEventGesture` inherits `InputEventWithModifiers` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputeventgesture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventGesture inherits methods from:\n - [InputEventWithModifiers](struct.InputEventWithModifiers.html)\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventGesture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputEventGesture ; impl InputEventGesture { # [doc = "The local gesture position relative to the [`Viewport`][Viewport]. If used in [`Control._gui_input`][Control::_gui_input], the position is relative to the current [`Control`][Control] that received this gesture."] # [doc = ""] # [inline] pub fn position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventGestureMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The local gesture position relative to the [`Viewport`][Viewport]. If used in [`Control._gui_input`][Control::_gui_input], the position is relative to the current [`Control`][Control] that received this gesture."] # [doc = ""] # [inline] pub fn set_position (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventGestureMethodTable :: get (get_api ()) . set_position ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventGesture { } unsafe impl GodotObject for InputEventGesture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventGesture" } } impl std :: ops :: Deref for InputEventGesture { type Target = crate :: generated :: InputEventWithModifiers ; # [inline] fn deref (& self) -> & crate :: generated :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventGesture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: InputEventWithModifiers > for InputEventGesture { } unsafe impl SubClass < crate :: generated :: InputEvent > for InputEventGesture { } unsafe impl SubClass < crate :: generated :: Resource > for InputEventGesture { } unsafe impl SubClass < crate :: generated :: Reference > for InputEventGesture { } unsafe impl SubClass < crate :: generated :: Object > for InputEventGesture { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventGestureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_position : * mut sys :: godot_method_bind , pub set_position : * mut sys :: godot_method_bind } impl InputEventGestureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventGestureMethodTable = InputEventGestureMethodTable { class_constructor : None , get_position : 0 as * mut sys :: godot_method_bind , set_position : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputEventGestureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventGesture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_event_gesture::private::InputEventGesture;
            
            pub(crate) mod input_event_joypad_button {
                # ! [doc = "This module contains types related to the API class [`InputEventJoypadButton`][super::InputEventJoypadButton]."] pub (crate) mod private { # [doc = "`core class InputEventJoypadButton` inherits `InputEvent` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputeventjoypadbutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventJoypadButton inherits methods from:\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventJoypadButton { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputEventJoypadButton ; impl InputEventJoypadButton { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventJoypadButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Button identifier. One of the [`JoystickList`][JoystickList] button constants."] # [doc = ""] # [inline] pub fn button_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventJoypadButtonMethodTable :: get (get_api ()) . get_button_index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Represents the pressure the user puts on the button with their finger, if the controller supports it. Ranges from `0` to `1`."] # [doc = ""] # [inline] pub fn pressure (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventJoypadButtonMethodTable :: get (get_api ()) . get_pressure ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Button identifier. One of the [`JoystickList`][JoystickList] button constants."] # [doc = ""] # [inline] pub fn set_button_index (& self , button_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventJoypadButtonMethodTable :: get (get_api ()) . set_button_index ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , button_index as _) ; } } # [doc = "If `true`, the button's state is pressed. If `false`, the button's state is released."] # [doc = ""] # [inline] pub fn set_pressed (& self , pressed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventJoypadButtonMethodTable :: get (get_api ()) . set_pressed ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , pressed as _) ; } } # [doc = "Represents the pressure the user puts on the button with their finger, if the controller supports it. Ranges from `0` to `1`."] # [doc = ""] # [inline] pub fn set_pressure (& self , pressure : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventJoypadButtonMethodTable :: get (get_api ()) . set_pressure ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , pressure as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventJoypadButton { } unsafe impl GodotObject for InputEventJoypadButton { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventJoypadButton" } } impl std :: ops :: Deref for InputEventJoypadButton { type Target = crate :: generated :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventJoypadButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: InputEvent > for InputEventJoypadButton { } unsafe impl SubClass < crate :: generated :: Resource > for InputEventJoypadButton { } unsafe impl SubClass < crate :: generated :: Reference > for InputEventJoypadButton { } unsafe impl SubClass < crate :: generated :: Object > for InputEventJoypadButton { } impl Instanciable for InputEventJoypadButton { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { InputEventJoypadButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventJoypadButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_button_index : * mut sys :: godot_method_bind , pub get_pressure : * mut sys :: godot_method_bind , pub set_button_index : * mut sys :: godot_method_bind , pub set_pressed : * mut sys :: godot_method_bind , pub set_pressure : * mut sys :: godot_method_bind } impl InputEventJoypadButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventJoypadButtonMethodTable = InputEventJoypadButtonMethodTable { class_constructor : None , get_button_index : 0 as * mut sys :: godot_method_bind , get_pressure : 0 as * mut sys :: godot_method_bind , set_button_index : 0 as * mut sys :: godot_method_bind , set_pressed : 0 as * mut sys :: godot_method_bind , set_pressure : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputEventJoypadButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventJoypadButton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_button_index = (gd_api . godot_method_bind_get_method) (class_name , "get_button_index\0" . as_ptr () as * const c_char) ; table . get_pressure = (gd_api . godot_method_bind_get_method) (class_name , "get_pressure\0" . as_ptr () as * const c_char) ; table . set_button_index = (gd_api . godot_method_bind_get_method) (class_name , "set_button_index\0" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\0" . as_ptr () as * const c_char) ; table . set_pressure = (gd_api . godot_method_bind_get_method) (class_name , "set_pressure\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_event_joypad_button::private::InputEventJoypadButton;
            
            pub(crate) mod input_event_joypad_motion {
                # ! [doc = "This module contains types related to the API class [`InputEventJoypadMotion`][super::InputEventJoypadMotion]."] pub (crate) mod private { # [doc = "`core class InputEventJoypadMotion` inherits `InputEvent` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputeventjoypadmotion.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventJoypadMotion inherits methods from:\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventJoypadMotion { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputEventJoypadMotion ; impl InputEventJoypadMotion { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventJoypadMotionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Axis identifier. Use one of the [`JoystickList`][JoystickList] axis constants."] # [doc = ""] # [inline] pub fn axis (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventJoypadMotionMethodTable :: get (get_api ()) . get_axis ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Current position of the joystick on the given axis. The value ranges from `-1.0` to `1.0`. A value of `0` means the axis is in its resting position."] # [doc = ""] # [inline] pub fn axis_value (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventJoypadMotionMethodTable :: get (get_api ()) . get_axis_value ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Axis identifier. Use one of the [`JoystickList`][JoystickList] axis constants."] # [doc = ""] # [inline] pub fn set_axis (& self , axis : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventJoypadMotionMethodTable :: get (get_api ()) . set_axis ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , axis as _) ; } } # [doc = "Current position of the joystick on the given axis. The value ranges from `-1.0` to `1.0`. A value of `0` means the axis is in its resting position."] # [doc = ""] # [inline] pub fn set_axis_value (& self , axis_value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventJoypadMotionMethodTable :: get (get_api ()) . set_axis_value ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , axis_value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventJoypadMotion { } unsafe impl GodotObject for InputEventJoypadMotion { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventJoypadMotion" } } impl std :: ops :: Deref for InputEventJoypadMotion { type Target = crate :: generated :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventJoypadMotion { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: InputEvent > for InputEventJoypadMotion { } unsafe impl SubClass < crate :: generated :: Resource > for InputEventJoypadMotion { } unsafe impl SubClass < crate :: generated :: Reference > for InputEventJoypadMotion { } unsafe impl SubClass < crate :: generated :: Object > for InputEventJoypadMotion { } impl Instanciable for InputEventJoypadMotion { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { InputEventJoypadMotion :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventJoypadMotionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_axis : * mut sys :: godot_method_bind , pub get_axis_value : * mut sys :: godot_method_bind , pub set_axis : * mut sys :: godot_method_bind , pub set_axis_value : * mut sys :: godot_method_bind } impl InputEventJoypadMotionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventJoypadMotionMethodTable = InputEventJoypadMotionMethodTable { class_constructor : None , get_axis : 0 as * mut sys :: godot_method_bind , get_axis_value : 0 as * mut sys :: godot_method_bind , set_axis : 0 as * mut sys :: godot_method_bind , set_axis_value : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputEventJoypadMotionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventJoypadMotion\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_axis = (gd_api . godot_method_bind_get_method) (class_name , "get_axis\0" . as_ptr () as * const c_char) ; table . get_axis_value = (gd_api . godot_method_bind_get_method) (class_name , "get_axis_value\0" . as_ptr () as * const c_char) ; table . set_axis = (gd_api . godot_method_bind_get_method) (class_name , "set_axis\0" . as_ptr () as * const c_char) ; table . set_axis_value = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_value\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_event_joypad_motion::private::InputEventJoypadMotion;
            
            pub(crate) mod input_event_key {
                # ! [doc = "This module contains types related to the API class [`InputEventKey`][super::InputEventKey]."] pub (crate) mod private { # [doc = "`core class InputEventKey` inherits `InputEventWithModifiers` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputeventkey.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventKey inherits methods from:\n - [InputEventWithModifiers](struct.InputEventWithModifiers.html)\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventKey { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputEventKey ; impl InputEventKey { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventKeyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Key physical scancode, which corresponds to one of the [`KeyList`][KeyList] constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard.\nTo get a human-readable representation of the [`InputEventKey`][InputEventKey], use `OS.get_scancode_string(event.physical_scancode)` where `event` is the [`InputEventKey`][InputEventKey]."] # [doc = ""] # [inline] pub fn physical_scancode (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . get_physical_scancode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the physical scancode combined with modifier keys such as `Shift` or `Alt`. See also [`InputEventWithModifiers`][InputEventWithModifiers].\nTo get a human-readable representation of the [`InputEventKey`][InputEventKey] with modifiers, use `OS.get_scancode_string(event.get_physical_scancode_with_modifiers())` where `event` is the [`InputEventKey`][InputEventKey]."] # [doc = ""] # [inline] pub fn get_physical_scancode_with_modifiers (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . get_physical_scancode_with_modifiers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The key scancode, which corresponds to one of the [`KeyList`][KeyList] constants. Represent key in the current keyboard layout.\nTo get a human-readable representation of the [`InputEventKey`][InputEventKey], use `OS.get_scancode_string(event.scancode)` where `event` is the [`InputEventKey`][InputEventKey]."] # [doc = ""] # [inline] pub fn scancode (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . get_scancode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the scancode combined with modifier keys such as `Shift` or `Alt`. See also [`InputEventWithModifiers`][InputEventWithModifiers].\nTo get a human-readable representation of the [`InputEventKey`][InputEventKey] with modifiers, use `OS.get_scancode_string(event.get_scancode_with_modifiers())` where `event` is the [`InputEventKey`][InputEventKey]."] # [doc = ""] # [inline] pub fn get_scancode_with_modifiers (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . get_scancode_with_modifiers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [`OS.set_ime_active`][OS::set_ime_active] for more information."] # [doc = ""] # [inline] pub fn unicode (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . get_unicode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the key was already pressed before this event. It means the user is holding the key down."] # [doc = ""] # [inline] pub fn set_echo (& self , echo : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_echo ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , echo as _) ; } } # [doc = "Key physical scancode, which corresponds to one of the [`KeyList`][KeyList] constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard.\nTo get a human-readable representation of the [`InputEventKey`][InputEventKey], use `OS.get_scancode_string(event.physical_scancode)` where `event` is the [`InputEventKey`][InputEventKey]."] # [doc = ""] # [inline] pub fn set_physical_scancode (& self , scancode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_physical_scancode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , scancode as _) ; } } # [doc = "If `true`, the key's state is pressed. If `false`, the key's state is released."] # [doc = ""] # [inline] pub fn set_pressed (& self , pressed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_pressed ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , pressed as _) ; } } # [doc = "The key scancode, which corresponds to one of the [`KeyList`][KeyList] constants. Represent key in the current keyboard layout.\nTo get a human-readable representation of the [`InputEventKey`][InputEventKey], use `OS.get_scancode_string(event.scancode)` where `event` is the [`InputEventKey`][InputEventKey]."] # [doc = ""] # [inline] pub fn set_scancode (& self , scancode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_scancode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , scancode as _) ; } } # [doc = "The key Unicode identifier (when relevant). Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [`OS.set_ime_active`][OS::set_ime_active] for more information."] # [doc = ""] # [inline] pub fn set_unicode (& self , unicode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventKeyMethodTable :: get (get_api ()) . set_unicode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , unicode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventKey { } unsafe impl GodotObject for InputEventKey { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventKey" } } impl std :: ops :: Deref for InputEventKey { type Target = crate :: generated :: InputEventWithModifiers ; # [inline] fn deref (& self) -> & crate :: generated :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventKey { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: InputEventWithModifiers > for InputEventKey { } unsafe impl SubClass < crate :: generated :: InputEvent > for InputEventKey { } unsafe impl SubClass < crate :: generated :: Resource > for InputEventKey { } unsafe impl SubClass < crate :: generated :: Reference > for InputEventKey { } unsafe impl SubClass < crate :: generated :: Object > for InputEventKey { } impl Instanciable for InputEventKey { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { InputEventKey :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventKeyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_physical_scancode : * mut sys :: godot_method_bind , pub get_physical_scancode_with_modifiers : * mut sys :: godot_method_bind , pub get_scancode : * mut sys :: godot_method_bind , pub get_scancode_with_modifiers : * mut sys :: godot_method_bind , pub get_unicode : * mut sys :: godot_method_bind , pub set_echo : * mut sys :: godot_method_bind , pub set_physical_scancode : * mut sys :: godot_method_bind , pub set_pressed : * mut sys :: godot_method_bind , pub set_scancode : * mut sys :: godot_method_bind , pub set_unicode : * mut sys :: godot_method_bind } impl InputEventKeyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventKeyMethodTable = InputEventKeyMethodTable { class_constructor : None , get_physical_scancode : 0 as * mut sys :: godot_method_bind , get_physical_scancode_with_modifiers : 0 as * mut sys :: godot_method_bind , get_scancode : 0 as * mut sys :: godot_method_bind , get_scancode_with_modifiers : 0 as * mut sys :: godot_method_bind , get_unicode : 0 as * mut sys :: godot_method_bind , set_echo : 0 as * mut sys :: godot_method_bind , set_physical_scancode : 0 as * mut sys :: godot_method_bind , set_pressed : 0 as * mut sys :: godot_method_bind , set_scancode : 0 as * mut sys :: godot_method_bind , set_unicode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputEventKeyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventKey\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_physical_scancode = (gd_api . godot_method_bind_get_method) (class_name , "get_physical_scancode\0" . as_ptr () as * const c_char) ; table . get_physical_scancode_with_modifiers = (gd_api . godot_method_bind_get_method) (class_name , "get_physical_scancode_with_modifiers\0" . as_ptr () as * const c_char) ; table . get_scancode = (gd_api . godot_method_bind_get_method) (class_name , "get_scancode\0" . as_ptr () as * const c_char) ; table . get_scancode_with_modifiers = (gd_api . godot_method_bind_get_method) (class_name , "get_scancode_with_modifiers\0" . as_ptr () as * const c_char) ; table . get_unicode = (gd_api . godot_method_bind_get_method) (class_name , "get_unicode\0" . as_ptr () as * const c_char) ; table . set_echo = (gd_api . godot_method_bind_get_method) (class_name , "set_echo\0" . as_ptr () as * const c_char) ; table . set_physical_scancode = (gd_api . godot_method_bind_get_method) (class_name , "set_physical_scancode\0" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\0" . as_ptr () as * const c_char) ; table . set_scancode = (gd_api . godot_method_bind_get_method) (class_name , "set_scancode\0" . as_ptr () as * const c_char) ; table . set_unicode = (gd_api . godot_method_bind_get_method) (class_name , "set_unicode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_event_key::private::InputEventKey;
            
            pub(crate) mod input_event_midi {
                # ! [doc = "This module contains types related to the API class [`InputEventMIDI`][super::InputEventMIDI]."] pub (crate) mod private { # [doc = "`core class InputEventMIDI` inherits `InputEvent` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputeventmidi.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventMIDI inherits methods from:\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventMIDI { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputEventMIDI ; impl InputEventMIDI { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventMIDIMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The MIDI channel of this input event. There are 16 channels, so this value ranges from 0 to 15. MIDI channel 9 is reserved for the use with percussion instruments, the rest of the channels are for non-percussion instruments."] # [doc = ""] # [inline] pub fn channel (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . get_channel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If the message is `MIDI_MESSAGE_CONTROL_CHANGE`, this indicates the controller number, otherwise this is zero. Controllers include devices such as pedals and levers."] # [doc = ""] # [inline] pub fn controller_number (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . get_controller_number ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If the message is `MIDI_MESSAGE_CONTROL_CHANGE`, this indicates the controller value, otherwise this is zero. Controllers include devices such as pedals and levers."] # [doc = ""] # [inline] pub fn controller_value (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . get_controller_value ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The instrument of this input event. This value ranges from 0 to 127. Refer to the instrument list on the General MIDI wikipedia article to see a list of instruments, except that this value is 0-index, so subtract one from every number on that chart. A standard piano will have an instrument number of 0."] # [doc = ""] # [inline] pub fn instrument (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . get_instrument ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a value indicating the type of message for this MIDI signal. This is a member of the [enum @GlobalScope.MidiMessageList] enum.\nFor MIDI messages between 0x80 and 0xEF, only the left half of the bits are returned as this value, as the other part is the channel (ex: 0x94 becomes 0x9). For MIDI messages from 0xF0 to 0xFF, the value is returned as-is.\nNotes will return `MIDI_MESSAGE_NOTE_ON` when activated, but they might not always return `MIDI_MESSAGE_NOTE_OFF` when deactivated, therefore your code should treat the input as stopped if some period of time has passed.\nFor more information, see the MIDI message status byte list chart linked above."] # [doc = ""] # [inline] pub fn message (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . get_message ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The pitch index number of this MIDI signal. This value ranges from 0 to 127. On a piano, middle C is 60, and A440 is 69, see the \"MIDI note\" column of the piano key frequency chart on Wikipedia for more information."] # [doc = ""] # [inline] pub fn pitch (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . get_pitch ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The pressure of the MIDI signal. This value ranges from 0 to 127. For many devices, this value is always zero."] # [doc = ""] # [inline] pub fn pressure (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . get_pressure ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice."] # [doc = ""] # [inline] pub fn velocity (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . get_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The MIDI channel of this input event. There are 16 channels, so this value ranges from 0 to 15. MIDI channel 9 is reserved for the use with percussion instruments, the rest of the channels are for non-percussion instruments."] # [doc = ""] # [inline] pub fn set_channel (& self , channel : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . set_channel ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , channel as _) ; } } # [doc = "If the message is `MIDI_MESSAGE_CONTROL_CHANGE`, this indicates the controller number, otherwise this is zero. Controllers include devices such as pedals and levers."] # [doc = ""] # [inline] pub fn set_controller_number (& self , controller_number : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . set_controller_number ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , controller_number as _) ; } } # [doc = "If the message is `MIDI_MESSAGE_CONTROL_CHANGE`, this indicates the controller value, otherwise this is zero. Controllers include devices such as pedals and levers."] # [doc = ""] # [inline] pub fn set_controller_value (& self , controller_value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . set_controller_value ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , controller_value as _) ; } } # [doc = "The instrument of this input event. This value ranges from 0 to 127. Refer to the instrument list on the General MIDI wikipedia article to see a list of instruments, except that this value is 0-index, so subtract one from every number on that chart. A standard piano will have an instrument number of 0."] # [doc = ""] # [inline] pub fn set_instrument (& self , instrument : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . set_instrument ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , instrument as _) ; } } # [doc = "Returns a value indicating the type of message for this MIDI signal. This is a member of the [enum @GlobalScope.MidiMessageList] enum.\nFor MIDI messages between 0x80 and 0xEF, only the left half of the bits are returned as this value, as the other part is the channel (ex: 0x94 becomes 0x9). For MIDI messages from 0xF0 to 0xFF, the value is returned as-is.\nNotes will return `MIDI_MESSAGE_NOTE_ON` when activated, but they might not always return `MIDI_MESSAGE_NOTE_OFF` when deactivated, therefore your code should treat the input as stopped if some period of time has passed.\nFor more information, see the MIDI message status byte list chart linked above."] # [doc = ""] # [inline] pub fn set_message (& self , message : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . set_message ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , message as _) ; } } # [doc = "The pitch index number of this MIDI signal. This value ranges from 0 to 127. On a piano, middle C is 60, and A440 is 69, see the \"MIDI note\" column of the piano key frequency chart on Wikipedia for more information."] # [doc = ""] # [inline] pub fn set_pitch (& self , pitch : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . set_pitch ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , pitch as _) ; } } # [doc = "The pressure of the MIDI signal. This value ranges from 0 to 127. For many devices, this value is always zero."] # [doc = ""] # [inline] pub fn set_pressure (& self , pressure : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . set_pressure ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , pressure as _) ; } } # [doc = "The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice."] # [doc = ""] # [inline] pub fn set_velocity (& self , velocity : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMIDIMethodTable :: get (get_api ()) . set_velocity ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , velocity as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventMIDI { } unsafe impl GodotObject for InputEventMIDI { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventMIDI" } } impl std :: ops :: Deref for InputEventMIDI { type Target = crate :: generated :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventMIDI { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: InputEvent > for InputEventMIDI { } unsafe impl SubClass < crate :: generated :: Resource > for InputEventMIDI { } unsafe impl SubClass < crate :: generated :: Reference > for InputEventMIDI { } unsafe impl SubClass < crate :: generated :: Object > for InputEventMIDI { } impl Instanciable for InputEventMIDI { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { InputEventMIDI :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventMIDIMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_channel : * mut sys :: godot_method_bind , pub get_controller_number : * mut sys :: godot_method_bind , pub get_controller_value : * mut sys :: godot_method_bind , pub get_instrument : * mut sys :: godot_method_bind , pub get_message : * mut sys :: godot_method_bind , pub get_pitch : * mut sys :: godot_method_bind , pub get_pressure : * mut sys :: godot_method_bind , pub get_velocity : * mut sys :: godot_method_bind , pub set_channel : * mut sys :: godot_method_bind , pub set_controller_number : * mut sys :: godot_method_bind , pub set_controller_value : * mut sys :: godot_method_bind , pub set_instrument : * mut sys :: godot_method_bind , pub set_message : * mut sys :: godot_method_bind , pub set_pitch : * mut sys :: godot_method_bind , pub set_pressure : * mut sys :: godot_method_bind , pub set_velocity : * mut sys :: godot_method_bind } impl InputEventMIDIMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventMIDIMethodTable = InputEventMIDIMethodTable { class_constructor : None , get_channel : 0 as * mut sys :: godot_method_bind , get_controller_number : 0 as * mut sys :: godot_method_bind , get_controller_value : 0 as * mut sys :: godot_method_bind , get_instrument : 0 as * mut sys :: godot_method_bind , get_message : 0 as * mut sys :: godot_method_bind , get_pitch : 0 as * mut sys :: godot_method_bind , get_pressure : 0 as * mut sys :: godot_method_bind , get_velocity : 0 as * mut sys :: godot_method_bind , set_channel : 0 as * mut sys :: godot_method_bind , set_controller_number : 0 as * mut sys :: godot_method_bind , set_controller_value : 0 as * mut sys :: godot_method_bind , set_instrument : 0 as * mut sys :: godot_method_bind , set_message : 0 as * mut sys :: godot_method_bind , set_pitch : 0 as * mut sys :: godot_method_bind , set_pressure : 0 as * mut sys :: godot_method_bind , set_velocity : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputEventMIDIMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventMIDI\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_channel\0" . as_ptr () as * const c_char) ; table . get_controller_number = (gd_api . godot_method_bind_get_method) (class_name , "get_controller_number\0" . as_ptr () as * const c_char) ; table . get_controller_value = (gd_api . godot_method_bind_get_method) (class_name , "get_controller_value\0" . as_ptr () as * const c_char) ; table . get_instrument = (gd_api . godot_method_bind_get_method) (class_name , "get_instrument\0" . as_ptr () as * const c_char) ; table . get_message = (gd_api . godot_method_bind_get_method) (class_name , "get_message\0" . as_ptr () as * const c_char) ; table . get_pitch = (gd_api . godot_method_bind_get_method) (class_name , "get_pitch\0" . as_ptr () as * const c_char) ; table . get_pressure = (gd_api . godot_method_bind_get_method) (class_name , "get_pressure\0" . as_ptr () as * const c_char) ; table . get_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_velocity\0" . as_ptr () as * const c_char) ; table . set_channel = (gd_api . godot_method_bind_get_method) (class_name , "set_channel\0" . as_ptr () as * const c_char) ; table . set_controller_number = (gd_api . godot_method_bind_get_method) (class_name , "set_controller_number\0" . as_ptr () as * const c_char) ; table . set_controller_value = (gd_api . godot_method_bind_get_method) (class_name , "set_controller_value\0" . as_ptr () as * const c_char) ; table . set_instrument = (gd_api . godot_method_bind_get_method) (class_name , "set_instrument\0" . as_ptr () as * const c_char) ; table . set_message = (gd_api . godot_method_bind_get_method) (class_name , "set_message\0" . as_ptr () as * const c_char) ; table . set_pitch = (gd_api . godot_method_bind_get_method) (class_name , "set_pitch\0" . as_ptr () as * const c_char) ; table . set_pressure = (gd_api . godot_method_bind_get_method) (class_name , "set_pressure\0" . as_ptr () as * const c_char) ; table . set_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_velocity\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_event_midi::private::InputEventMIDI;
            
            pub(crate) mod input_event_magnify_gesture {
                # ! [doc = "This module contains types related to the API class [`InputEventMagnifyGesture`][super::InputEventMagnifyGesture]."] pub (crate) mod private { # [doc = "`core class InputEventMagnifyGesture` inherits `InputEventGesture` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputeventmagnifygesture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventMagnifyGesture inherits methods from:\n - [InputEventGesture](struct.InputEventGesture.html)\n - [InputEventWithModifiers](struct.InputEventWithModifiers.html)\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventMagnifyGesture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputEventMagnifyGesture ; impl InputEventMagnifyGesture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventMagnifyGestureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn factor (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMagnifyGestureMethodTable :: get (get_api ()) . get_factor ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_factor (& self , factor : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMagnifyGestureMethodTable :: get (get_api ()) . set_factor ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , factor as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventMagnifyGesture { } unsafe impl GodotObject for InputEventMagnifyGesture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventMagnifyGesture" } } impl std :: ops :: Deref for InputEventMagnifyGesture { type Target = crate :: generated :: InputEventGesture ; # [inline] fn deref (& self) -> & crate :: generated :: InputEventGesture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventMagnifyGesture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: InputEventGesture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: InputEventGesture > for InputEventMagnifyGesture { } unsafe impl SubClass < crate :: generated :: InputEventWithModifiers > for InputEventMagnifyGesture { } unsafe impl SubClass < crate :: generated :: InputEvent > for InputEventMagnifyGesture { } unsafe impl SubClass < crate :: generated :: Resource > for InputEventMagnifyGesture { } unsafe impl SubClass < crate :: generated :: Reference > for InputEventMagnifyGesture { } unsafe impl SubClass < crate :: generated :: Object > for InputEventMagnifyGesture { } impl Instanciable for InputEventMagnifyGesture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { InputEventMagnifyGesture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventMagnifyGestureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_factor : * mut sys :: godot_method_bind , pub set_factor : * mut sys :: godot_method_bind } impl InputEventMagnifyGestureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventMagnifyGestureMethodTable = InputEventMagnifyGestureMethodTable { class_constructor : None , get_factor : 0 as * mut sys :: godot_method_bind , set_factor : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputEventMagnifyGestureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventMagnifyGesture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_factor = (gd_api . godot_method_bind_get_method) (class_name , "get_factor\0" . as_ptr () as * const c_char) ; table . set_factor = (gd_api . godot_method_bind_get_method) (class_name , "set_factor\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_event_magnify_gesture::private::InputEventMagnifyGesture;
            
            pub(crate) mod input_event_mouse {
                # ! [doc = "This module contains types related to the API class [`InputEventMouse`][super::InputEventMouse]."] pub (crate) mod private { # [doc = "`core class InputEventMouse` inherits `InputEventWithModifiers` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputeventmouse.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventMouse inherits methods from:\n - [InputEventWithModifiers](struct.InputEventWithModifiers.html)\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventMouse { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputEventMouse ; impl InputEventMouse { # [doc = "The mouse button mask identifier, one of or a bitwise combination of the [`ButtonList`][ButtonList] button masks."] # [doc = ""] # [inline] pub fn button_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMethodTable :: get (get_api ()) . get_button_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "When received in [`Node._input`][Node::_input] or [`Node._unhandled_input`][Node::_unhandled_input], returns the mouse's position in the root [`Viewport`][Viewport] using the coordinate system of the root [`Viewport`][Viewport].\nWhen received in [`Control._gui_input`][Control::_gui_input], returns the mouse's position in the [`CanvasLayer`][CanvasLayer] that the [`Control`][Control] is in using the coordinate system of the [`CanvasLayer`][CanvasLayer]."] # [doc = ""] # [inline] pub fn global_position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMethodTable :: get (get_api ()) . get_global_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "When received in [`Node._input`][Node::_input] or [`Node._unhandled_input`][Node::_unhandled_input], returns the mouse's position in the [`Viewport`][Viewport] this [`Node`][Node] is in using the coordinate system of this [`Viewport`][Viewport].\nWhen received in [`Control._gui_input`][Control::_gui_input], returns the mouse's position in the [`Control`][Control] using the local coordinate system of the [`Control`][Control]."] # [doc = ""] # [inline] pub fn position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The mouse button mask identifier, one of or a bitwise combination of the [`ButtonList`][ButtonList] button masks."] # [doc = ""] # [inline] pub fn set_button_mask (& self , button_mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMethodTable :: get (get_api ()) . set_button_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , button_mask as _) ; } } # [doc = "When received in [`Node._input`][Node::_input] or [`Node._unhandled_input`][Node::_unhandled_input], returns the mouse's position in the root [`Viewport`][Viewport] using the coordinate system of the root [`Viewport`][Viewport].\nWhen received in [`Control._gui_input`][Control::_gui_input], returns the mouse's position in the [`CanvasLayer`][CanvasLayer] that the [`Control`][Control] is in using the coordinate system of the [`CanvasLayer`][CanvasLayer]."] # [doc = ""] # [inline] pub fn set_global_position (& self , global_position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMethodTable :: get (get_api ()) . set_global_position ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , global_position) ; } } # [doc = "When received in [`Node._input`][Node::_input] or [`Node._unhandled_input`][Node::_unhandled_input], returns the mouse's position in the [`Viewport`][Viewport] this [`Node`][Node] is in using the coordinate system of this [`Viewport`][Viewport].\nWhen received in [`Control._gui_input`][Control::_gui_input], returns the mouse's position in the [`Control`][Control] using the local coordinate system of the [`Control`][Control]."] # [doc = ""] # [inline] pub fn set_position (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMethodTable :: get (get_api ()) . set_position ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventMouse { } unsafe impl GodotObject for InputEventMouse { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventMouse" } } impl std :: ops :: Deref for InputEventMouse { type Target = crate :: generated :: InputEventWithModifiers ; # [inline] fn deref (& self) -> & crate :: generated :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventMouse { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: InputEventWithModifiers { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: InputEventWithModifiers > for InputEventMouse { } unsafe impl SubClass < crate :: generated :: InputEvent > for InputEventMouse { } unsafe impl SubClass < crate :: generated :: Resource > for InputEventMouse { } unsafe impl SubClass < crate :: generated :: Reference > for InputEventMouse { } unsafe impl SubClass < crate :: generated :: Object > for InputEventMouse { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventMouseMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_button_mask : * mut sys :: godot_method_bind , pub get_global_position : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub set_button_mask : * mut sys :: godot_method_bind , pub set_global_position : * mut sys :: godot_method_bind , pub set_position : * mut sys :: godot_method_bind } impl InputEventMouseMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventMouseMethodTable = InputEventMouseMethodTable { class_constructor : None , get_button_mask : 0 as * mut sys :: godot_method_bind , get_global_position : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , set_button_mask : 0 as * mut sys :: godot_method_bind , set_global_position : 0 as * mut sys :: godot_method_bind , set_position : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputEventMouseMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventMouse\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_button_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_button_mask\0" . as_ptr () as * const c_char) ; table . get_global_position = (gd_api . godot_method_bind_get_method) (class_name , "get_global_position\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . set_button_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_button_mask\0" . as_ptr () as * const c_char) ; table . set_global_position = (gd_api . godot_method_bind_get_method) (class_name , "set_global_position\0" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_event_mouse::private::InputEventMouse;
            
            pub(crate) mod input_event_mouse_button {
                # ! [doc = "This module contains types related to the API class [`InputEventMouseButton`][super::InputEventMouseButton]."] pub (crate) mod private { # [doc = "`core class InputEventMouseButton` inherits `InputEventMouse` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputeventmousebutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventMouseButton inherits methods from:\n - [InputEventMouse](struct.InputEventMouse.html)\n - [InputEventWithModifiers](struct.InputEventWithModifiers.html)\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventMouseButton { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputEventMouseButton ; impl InputEventMouseButton { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventMouseButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The mouse button identifier, one of the [`ButtonList`][ButtonList] button or button wheel constants."] # [doc = ""] # [inline] pub fn button_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . get_button_index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be `0` if not supported."] # [doc = ""] # [inline] pub fn factor (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . get_factor ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the mouse button's state is a double-click."] # [doc = ""] # [inline] pub fn is_doubleclick (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . is_doubleclick ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The mouse button identifier, one of the [`ButtonList`][ButtonList] button or button wheel constants."] # [doc = ""] # [inline] pub fn set_button_index (& self , button_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_button_index ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , button_index as _) ; } } # [doc = "If `true`, the mouse button's state is a double-click."] # [doc = ""] # [inline] pub fn set_doubleclick (& self , doubleclick : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_doubleclick ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , doubleclick as _) ; } } # [doc = "The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be `0` if not supported."] # [doc = ""] # [inline] pub fn set_factor (& self , factor : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_factor ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , factor as _) ; } } # [doc = "If `true`, the mouse button's state is pressed. If `false`, the mouse button's state is released."] # [doc = ""] # [inline] pub fn set_pressed (& self , pressed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseButtonMethodTable :: get (get_api ()) . set_pressed ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , pressed as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventMouseButton { } unsafe impl GodotObject for InputEventMouseButton { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventMouseButton" } } impl std :: ops :: Deref for InputEventMouseButton { type Target = crate :: generated :: InputEventMouse ; # [inline] fn deref (& self) -> & crate :: generated :: InputEventMouse { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventMouseButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: InputEventMouse { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: InputEventMouse > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: InputEventWithModifiers > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: InputEvent > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: Resource > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: Reference > for InputEventMouseButton { } unsafe impl SubClass < crate :: generated :: Object > for InputEventMouseButton { } impl Instanciable for InputEventMouseButton { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { InputEventMouseButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventMouseButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_button_index : * mut sys :: godot_method_bind , pub get_factor : * mut sys :: godot_method_bind , pub is_doubleclick : * mut sys :: godot_method_bind , pub set_button_index : * mut sys :: godot_method_bind , pub set_doubleclick : * mut sys :: godot_method_bind , pub set_factor : * mut sys :: godot_method_bind , pub set_pressed : * mut sys :: godot_method_bind } impl InputEventMouseButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventMouseButtonMethodTable = InputEventMouseButtonMethodTable { class_constructor : None , get_button_index : 0 as * mut sys :: godot_method_bind , get_factor : 0 as * mut sys :: godot_method_bind , is_doubleclick : 0 as * mut sys :: godot_method_bind , set_button_index : 0 as * mut sys :: godot_method_bind , set_doubleclick : 0 as * mut sys :: godot_method_bind , set_factor : 0 as * mut sys :: godot_method_bind , set_pressed : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputEventMouseButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventMouseButton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_button_index = (gd_api . godot_method_bind_get_method) (class_name , "get_button_index\0" . as_ptr () as * const c_char) ; table . get_factor = (gd_api . godot_method_bind_get_method) (class_name , "get_factor\0" . as_ptr () as * const c_char) ; table . is_doubleclick = (gd_api . godot_method_bind_get_method) (class_name , "is_doubleclick\0" . as_ptr () as * const c_char) ; table . set_button_index = (gd_api . godot_method_bind_get_method) (class_name , "set_button_index\0" . as_ptr () as * const c_char) ; table . set_doubleclick = (gd_api . godot_method_bind_get_method) (class_name , "set_doubleclick\0" . as_ptr () as * const c_char) ; table . set_factor = (gd_api . godot_method_bind_get_method) (class_name , "set_factor\0" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_event_mouse_button::private::InputEventMouseButton;
            
            pub(crate) mod input_event_mouse_motion {
                # ! [doc = "This module contains types related to the API class [`InputEventMouseMotion`][super::InputEventMouseMotion]."] pub (crate) mod private { # [doc = "`core class InputEventMouseMotion` inherits `InputEventMouse` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputeventmousemotion.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventMouseMotion inherits methods from:\n - [InputEventMouse](struct.InputEventMouse.html)\n - [InputEventWithModifiers](struct.InputEventWithModifiers.html)\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventMouseMotion { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputEventMouseMotion ; impl InputEventMouseMotion { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventMouseMotionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns `true` when using the eraser end of a stylus pen.\n**Note:** This property is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn pen_inverted (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMotionMethodTable :: get (get_api ()) . get_pen_inverted ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Represents the pressure the user puts on the pen. Ranges from `0.0` to `1.0`."] # [doc = ""] # [inline] pub fn pressure (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMotionMethodTable :: get (get_api ()) . get_pressure ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The mouse position relative to the previous position (position at the last frame).\n**Note:** Since [`InputEventMouseMotion`][InputEventMouseMotion] is only emitted when the mouse moves, the last event won't have a relative position of `Vector2(0, 0)` when the user stops moving the mouse."] # [doc = ""] # [inline] pub fn relative (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMotionMethodTable :: get (get_api ()) . get_relative ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The mouse speed in pixels per second."] # [doc = ""] # [inline] pub fn speed (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMotionMethodTable :: get (get_api ()) . get_speed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from `-1.0` to `1.0` for both axes."] # [doc = ""] # [inline] pub fn tilt (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMotionMethodTable :: get (get_api ()) . get_tilt ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` when using the eraser end of a stylus pen.\n**Note:** This property is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn set_pen_inverted (& self , pen_inverted : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMotionMethodTable :: get (get_api ()) . set_pen_inverted ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , pen_inverted as _) ; } } # [doc = "Represents the pressure the user puts on the pen. Ranges from `0.0` to `1.0`."] # [doc = ""] # [inline] pub fn set_pressure (& self , pressure : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMotionMethodTable :: get (get_api ()) . set_pressure ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , pressure as _) ; } } # [doc = "The mouse position relative to the previous position (position at the last frame).\n**Note:** Since [`InputEventMouseMotion`][InputEventMouseMotion] is only emitted when the mouse moves, the last event won't have a relative position of `Vector2(0, 0)` when the user stops moving the mouse."] # [doc = ""] # [inline] pub fn set_relative (& self , relative : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMotionMethodTable :: get (get_api ()) . set_relative ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , relative) ; } } # [doc = "The mouse speed in pixels per second."] # [doc = ""] # [inline] pub fn set_speed (& self , speed : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMotionMethodTable :: get (get_api ()) . set_speed ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , speed) ; } } # [doc = "Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from `-1.0` to `1.0` for both axes."] # [doc = ""] # [inline] pub fn set_tilt (& self , tilt : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventMouseMotionMethodTable :: get (get_api ()) . set_tilt ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , tilt) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventMouseMotion { } unsafe impl GodotObject for InputEventMouseMotion { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventMouseMotion" } } impl std :: ops :: Deref for InputEventMouseMotion { type Target = crate :: generated :: InputEventMouse ; # [inline] fn deref (& self) -> & crate :: generated :: InputEventMouse { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventMouseMotion { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: InputEventMouse { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: InputEventMouse > for InputEventMouseMotion { } unsafe impl SubClass < crate :: generated :: InputEventWithModifiers > for InputEventMouseMotion { } unsafe impl SubClass < crate :: generated :: InputEvent > for InputEventMouseMotion { } unsafe impl SubClass < crate :: generated :: Resource > for InputEventMouseMotion { } unsafe impl SubClass < crate :: generated :: Reference > for InputEventMouseMotion { } unsafe impl SubClass < crate :: generated :: Object > for InputEventMouseMotion { } impl Instanciable for InputEventMouseMotion { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { InputEventMouseMotion :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventMouseMotionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_pen_inverted : * mut sys :: godot_method_bind , pub get_pressure : * mut sys :: godot_method_bind , pub get_relative : * mut sys :: godot_method_bind , pub get_speed : * mut sys :: godot_method_bind , pub get_tilt : * mut sys :: godot_method_bind , pub set_pen_inverted : * mut sys :: godot_method_bind , pub set_pressure : * mut sys :: godot_method_bind , pub set_relative : * mut sys :: godot_method_bind , pub set_speed : * mut sys :: godot_method_bind , pub set_tilt : * mut sys :: godot_method_bind } impl InputEventMouseMotionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventMouseMotionMethodTable = InputEventMouseMotionMethodTable { class_constructor : None , get_pen_inverted : 0 as * mut sys :: godot_method_bind , get_pressure : 0 as * mut sys :: godot_method_bind , get_relative : 0 as * mut sys :: godot_method_bind , get_speed : 0 as * mut sys :: godot_method_bind , get_tilt : 0 as * mut sys :: godot_method_bind , set_pen_inverted : 0 as * mut sys :: godot_method_bind , set_pressure : 0 as * mut sys :: godot_method_bind , set_relative : 0 as * mut sys :: godot_method_bind , set_speed : 0 as * mut sys :: godot_method_bind , set_tilt : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputEventMouseMotionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventMouseMotion\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_pen_inverted = (gd_api . godot_method_bind_get_method) (class_name , "get_pen_inverted\0" . as_ptr () as * const c_char) ; table . get_pressure = (gd_api . godot_method_bind_get_method) (class_name , "get_pressure\0" . as_ptr () as * const c_char) ; table . get_relative = (gd_api . godot_method_bind_get_method) (class_name , "get_relative\0" . as_ptr () as * const c_char) ; table . get_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_speed\0" . as_ptr () as * const c_char) ; table . get_tilt = (gd_api . godot_method_bind_get_method) (class_name , "get_tilt\0" . as_ptr () as * const c_char) ; table . set_pen_inverted = (gd_api . godot_method_bind_get_method) (class_name , "set_pen_inverted\0" . as_ptr () as * const c_char) ; table . set_pressure = (gd_api . godot_method_bind_get_method) (class_name , "set_pressure\0" . as_ptr () as * const c_char) ; table . set_relative = (gd_api . godot_method_bind_get_method) (class_name , "set_relative\0" . as_ptr () as * const c_char) ; table . set_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_speed\0" . as_ptr () as * const c_char) ; table . set_tilt = (gd_api . godot_method_bind_get_method) (class_name , "set_tilt\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_event_mouse_motion::private::InputEventMouseMotion;
            
            pub(crate) mod input_event_pan_gesture {
                # ! [doc = "This module contains types related to the API class [`InputEventPanGesture`][super::InputEventPanGesture]."] pub (crate) mod private { # [doc = "`core class InputEventPanGesture` inherits `InputEventGesture` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputeventpangesture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventPanGesture inherits methods from:\n - [InputEventGesture](struct.InputEventGesture.html)\n - [InputEventWithModifiers](struct.InputEventWithModifiers.html)\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventPanGesture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputEventPanGesture ; impl InputEventPanGesture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventPanGestureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn delta (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventPanGestureMethodTable :: get (get_api ()) . get_delta ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_delta (& self , delta : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventPanGestureMethodTable :: get (get_api ()) . set_delta ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , delta) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventPanGesture { } unsafe impl GodotObject for InputEventPanGesture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventPanGesture" } } impl std :: ops :: Deref for InputEventPanGesture { type Target = crate :: generated :: InputEventGesture ; # [inline] fn deref (& self) -> & crate :: generated :: InputEventGesture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventPanGesture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: InputEventGesture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: InputEventGesture > for InputEventPanGesture { } unsafe impl SubClass < crate :: generated :: InputEventWithModifiers > for InputEventPanGesture { } unsafe impl SubClass < crate :: generated :: InputEvent > for InputEventPanGesture { } unsafe impl SubClass < crate :: generated :: Resource > for InputEventPanGesture { } unsafe impl SubClass < crate :: generated :: Reference > for InputEventPanGesture { } unsafe impl SubClass < crate :: generated :: Object > for InputEventPanGesture { } impl Instanciable for InputEventPanGesture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { InputEventPanGesture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventPanGestureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_delta : * mut sys :: godot_method_bind , pub set_delta : * mut sys :: godot_method_bind } impl InputEventPanGestureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventPanGestureMethodTable = InputEventPanGestureMethodTable { class_constructor : None , get_delta : 0 as * mut sys :: godot_method_bind , set_delta : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputEventPanGestureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventPanGesture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_delta = (gd_api . godot_method_bind_get_method) (class_name , "get_delta\0" . as_ptr () as * const c_char) ; table . set_delta = (gd_api . godot_method_bind_get_method) (class_name , "set_delta\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_event_pan_gesture::private::InputEventPanGesture;
            
            pub(crate) mod input_event_screen_drag {
                # ! [doc = "This module contains types related to the API class [`InputEventScreenDrag`][super::InputEventScreenDrag]."] pub (crate) mod private { # [doc = "`core class InputEventScreenDrag` inherits `InputEvent` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputeventscreendrag.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventScreenDrag inherits methods from:\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventScreenDrag { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputEventScreenDrag ; impl InputEventScreenDrag { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventScreenDragMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The drag event index in the case of a multi-drag event."] # [doc = ""] # [inline] pub fn index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . get_index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The drag position."] # [doc = ""] # [inline] pub fn position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The drag position relative to the previous position (position at the last frame)."] # [doc = ""] # [inline] pub fn relative (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . get_relative ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The drag speed."] # [doc = ""] # [inline] pub fn speed (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . get_speed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The drag event index in the case of a multi-drag event."] # [doc = ""] # [inline] pub fn set_index (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . set_index ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } # [doc = "The drag position."] # [doc = ""] # [inline] pub fn set_position (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . set_position ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "The drag position relative to the previous position (position at the last frame)."] # [doc = ""] # [inline] pub fn set_relative (& self , relative : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . set_relative ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , relative) ; } } # [doc = "The drag speed."] # [doc = ""] # [inline] pub fn set_speed (& self , speed : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenDragMethodTable :: get (get_api ()) . set_speed ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , speed) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventScreenDrag { } unsafe impl GodotObject for InputEventScreenDrag { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventScreenDrag" } } impl std :: ops :: Deref for InputEventScreenDrag { type Target = crate :: generated :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventScreenDrag { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: InputEvent > for InputEventScreenDrag { } unsafe impl SubClass < crate :: generated :: Resource > for InputEventScreenDrag { } unsafe impl SubClass < crate :: generated :: Reference > for InputEventScreenDrag { } unsafe impl SubClass < crate :: generated :: Object > for InputEventScreenDrag { } impl Instanciable for InputEventScreenDrag { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { InputEventScreenDrag :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventScreenDragMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_index : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub get_relative : * mut sys :: godot_method_bind , pub get_speed : * mut sys :: godot_method_bind , pub set_index : * mut sys :: godot_method_bind , pub set_position : * mut sys :: godot_method_bind , pub set_relative : * mut sys :: godot_method_bind , pub set_speed : * mut sys :: godot_method_bind } impl InputEventScreenDragMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventScreenDragMethodTable = InputEventScreenDragMethodTable { class_constructor : None , get_index : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , get_relative : 0 as * mut sys :: godot_method_bind , get_speed : 0 as * mut sys :: godot_method_bind , set_index : 0 as * mut sys :: godot_method_bind , set_position : 0 as * mut sys :: godot_method_bind , set_relative : 0 as * mut sys :: godot_method_bind , set_speed : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputEventScreenDragMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventScreenDrag\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_index = (gd_api . godot_method_bind_get_method) (class_name , "get_index\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_relative = (gd_api . godot_method_bind_get_method) (class_name , "get_relative\0" . as_ptr () as * const c_char) ; table . get_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_speed\0" . as_ptr () as * const c_char) ; table . set_index = (gd_api . godot_method_bind_get_method) (class_name , "set_index\0" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\0" . as_ptr () as * const c_char) ; table . set_relative = (gd_api . godot_method_bind_get_method) (class_name , "set_relative\0" . as_ptr () as * const c_char) ; table . set_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_speed\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_event_screen_drag::private::InputEventScreenDrag;
            
            pub(crate) mod input_event_screen_touch {
                # ! [doc = "This module contains types related to the API class [`InputEventScreenTouch`][super::InputEventScreenTouch]."] pub (crate) mod private { # [doc = "`core class InputEventScreenTouch` inherits `InputEvent` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputeventscreentouch.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventScreenTouch inherits methods from:\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventScreenTouch { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputEventScreenTouch ; impl InputEventScreenTouch { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InputEventScreenTouchMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The touch index in the case of a multi-touch event. One index = one finger."] # [doc = ""] # [inline] pub fn index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenTouchMethodTable :: get (get_api ()) . get_index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The touch position."] # [doc = ""] # [inline] pub fn position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenTouchMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The touch index in the case of a multi-touch event. One index = one finger."] # [doc = ""] # [inline] pub fn set_index (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenTouchMethodTable :: get (get_api ()) . set_index ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } # [doc = "The touch position."] # [doc = ""] # [inline] pub fn set_position (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenTouchMethodTable :: get (get_api ()) . set_position ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "If `true`, the touch's state is pressed. If `false`, the touch's state is released."] # [doc = ""] # [inline] pub fn set_pressed (& self , pressed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventScreenTouchMethodTable :: get (get_api ()) . set_pressed ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , pressed as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventScreenTouch { } unsafe impl GodotObject for InputEventScreenTouch { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventScreenTouch" } } impl std :: ops :: Deref for InputEventScreenTouch { type Target = crate :: generated :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventScreenTouch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: InputEvent > for InputEventScreenTouch { } unsafe impl SubClass < crate :: generated :: Resource > for InputEventScreenTouch { } unsafe impl SubClass < crate :: generated :: Reference > for InputEventScreenTouch { } unsafe impl SubClass < crate :: generated :: Object > for InputEventScreenTouch { } impl Instanciable for InputEventScreenTouch { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { InputEventScreenTouch :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventScreenTouchMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_index : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub set_index : * mut sys :: godot_method_bind , pub set_position : * mut sys :: godot_method_bind , pub set_pressed : * mut sys :: godot_method_bind } impl InputEventScreenTouchMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventScreenTouchMethodTable = InputEventScreenTouchMethodTable { class_constructor : None , get_index : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , set_index : 0 as * mut sys :: godot_method_bind , set_position : 0 as * mut sys :: godot_method_bind , set_pressed : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputEventScreenTouchMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventScreenTouch\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_index = (gd_api . godot_method_bind_get_method) (class_name , "get_index\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . set_index = (gd_api . godot_method_bind_get_method) (class_name , "set_index\0" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\0" . as_ptr () as * const c_char) ; table . set_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_event_screen_touch::private::InputEventScreenTouch;
            
            pub(crate) mod input_event_with_modifiers {
                # ! [doc = "This module contains types related to the API class [`InputEventWithModifiers`][super::InputEventWithModifiers]."] pub (crate) mod private { # [doc = "`core class InputEventWithModifiers` inherits `InputEvent` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputeventwithmodifiers.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nInputEventWithModifiers inherits methods from:\n - [InputEvent](struct.InputEvent.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputEventWithModifiers { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputEventWithModifiers ; impl InputEventWithModifiers { # [doc = "State of the `Alt` modifier."] # [doc = ""] # [inline] pub fn alt (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventWithModifiersMethodTable :: get (get_api ()) . get_alt ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "State of the `Command` modifier."] # [doc = ""] # [inline] pub fn command (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventWithModifiersMethodTable :: get (get_api ()) . get_command ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "State of the `Ctrl` modifier."] # [doc = ""] # [inline] pub fn control (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventWithModifiersMethodTable :: get (get_api ()) . get_control ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "State of the `Meta` modifier."] # [doc = ""] # [inline] pub fn metakey (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventWithModifiersMethodTable :: get (get_api ()) . get_metakey ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "State of the `Shift` modifier."] # [doc = ""] # [inline] pub fn shift (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventWithModifiersMethodTable :: get (get_api ()) . get_shift ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "State of the `Alt` modifier."] # [doc = ""] # [inline] pub fn set_alt (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventWithModifiersMethodTable :: get (get_api ()) . set_alt ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "State of the `Command` modifier."] # [doc = ""] # [inline] pub fn set_command (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventWithModifiersMethodTable :: get (get_api ()) . set_command ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "State of the `Ctrl` modifier."] # [doc = ""] # [inline] pub fn set_control (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventWithModifiersMethodTable :: get (get_api ()) . set_control ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "State of the `Meta` modifier."] # [doc = ""] # [inline] pub fn set_metakey (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventWithModifiersMethodTable :: get (get_api ()) . set_metakey ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "State of the `Shift` modifier."] # [doc = ""] # [inline] pub fn set_shift (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputEventWithModifiersMethodTable :: get (get_api ()) . set_shift ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputEventWithModifiers { } unsafe impl GodotObject for InputEventWithModifiers { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "InputEventWithModifiers" } } impl std :: ops :: Deref for InputEventWithModifiers { type Target = crate :: generated :: InputEvent ; # [inline] fn deref (& self) -> & crate :: generated :: InputEvent { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputEventWithModifiers { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: InputEvent { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: InputEvent > for InputEventWithModifiers { } unsafe impl SubClass < crate :: generated :: Resource > for InputEventWithModifiers { } unsafe impl SubClass < crate :: generated :: Reference > for InputEventWithModifiers { } unsafe impl SubClass < crate :: generated :: Object > for InputEventWithModifiers { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputEventWithModifiersMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_alt : * mut sys :: godot_method_bind , pub get_command : * mut sys :: godot_method_bind , pub get_control : * mut sys :: godot_method_bind , pub get_metakey : * mut sys :: godot_method_bind , pub get_shift : * mut sys :: godot_method_bind , pub set_alt : * mut sys :: godot_method_bind , pub set_command : * mut sys :: godot_method_bind , pub set_control : * mut sys :: godot_method_bind , pub set_metakey : * mut sys :: godot_method_bind , pub set_shift : * mut sys :: godot_method_bind } impl InputEventWithModifiersMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputEventWithModifiersMethodTable = InputEventWithModifiersMethodTable { class_constructor : None , get_alt : 0 as * mut sys :: godot_method_bind , get_command : 0 as * mut sys :: godot_method_bind , get_control : 0 as * mut sys :: godot_method_bind , get_metakey : 0 as * mut sys :: godot_method_bind , get_shift : 0 as * mut sys :: godot_method_bind , set_alt : 0 as * mut sys :: godot_method_bind , set_command : 0 as * mut sys :: godot_method_bind , set_control : 0 as * mut sys :: godot_method_bind , set_metakey : 0 as * mut sys :: godot_method_bind , set_shift : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputEventWithModifiersMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputEventWithModifiers\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_alt = (gd_api . godot_method_bind_get_method) (class_name , "get_alt\0" . as_ptr () as * const c_char) ; table . get_command = (gd_api . godot_method_bind_get_method) (class_name , "get_command\0" . as_ptr () as * const c_char) ; table . get_control = (gd_api . godot_method_bind_get_method) (class_name , "get_control\0" . as_ptr () as * const c_char) ; table . get_metakey = (gd_api . godot_method_bind_get_method) (class_name , "get_metakey\0" . as_ptr () as * const c_char) ; table . get_shift = (gd_api . godot_method_bind_get_method) (class_name , "get_shift\0" . as_ptr () as * const c_char) ; table . set_alt = (gd_api . godot_method_bind_get_method) (class_name , "set_alt\0" . as_ptr () as * const c_char) ; table . set_command = (gd_api . godot_method_bind_get_method) (class_name , "set_command\0" . as_ptr () as * const c_char) ; table . set_control = (gd_api . godot_method_bind_get_method) (class_name , "set_control\0" . as_ptr () as * const c_char) ; table . set_metakey = (gd_api . godot_method_bind_get_method) (class_name , "set_metakey\0" . as_ptr () as * const c_char) ; table . set_shift = (gd_api . godot_method_bind_get_method) (class_name , "set_shift\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_event_with_modifiers::private::InputEventWithModifiers;
            
            pub(crate) mod input_map {
                # ! [doc = "This module contains types related to the API class [`InputMap`][super::InputMap]."] pub (crate) mod private { # [doc = "`core singleton class InputMap` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_inputmap.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nInputMap inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InputMap { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InputMap ; impl InputMap { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("InputMap\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Adds an [`InputEvent`][InputEvent] to an action. This [`InputEvent`][InputEvent] will trigger the action."] # [doc = ""] # [inline] pub fn action_add_event (& self , action : impl Into < GodotString > , event : impl AsArg < crate :: generated :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . action_add_event ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , action . into () , event . as_arg_ptr ()) ; } } # [doc = "Removes an [`InputEvent`][InputEvent] from an action."] # [doc = ""] # [inline] pub fn action_erase_event (& self , action : impl Into < GodotString > , event : impl AsArg < crate :: generated :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . action_erase_event ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , action . into () , event . as_arg_ptr ()) ; } } # [doc = "Removes all events from an action."] # [doc = ""] # [inline] pub fn action_erase_events (& self , action : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . action_erase_events ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; } } # [doc = "Returns a deadzone value for the action."] # [doc = ""] # [inline] pub fn action_get_deadzone (& self , action : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . action_get_deadzone ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the action has the given [`InputEvent`][InputEvent] associated with it."] # [doc = ""] # [inline] pub fn action_has_event (& self , action : impl Into < GodotString > , event : impl AsArg < crate :: generated :: InputEvent >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . action_has_event ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , action . into () , event . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets a deadzone value for the action."] # [doc = ""] # [inline] pub fn action_set_deadzone (& self , action : impl Into < GodotString > , deadzone : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . action_set_deadzone ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , action . into () , deadzone as _) ; } } # [doc = "Adds an empty action to the [`InputMap`][InputMap] with a configurable `deadzone`.\nAn [`InputEvent`][InputEvent] can then be added to this action with [`action_add_event`][Self::action_add_event].\n# Default Arguments\n* `deadzone` - `0.5`"] # [doc = ""] # [inline] pub fn add_action (& self , action : impl Into < GodotString > , deadzone : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . add_action ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , action . into () , deadzone as _) ; } } # [doc = "Removes an action from the [`InputMap`][InputMap]."] # [doc = ""] # [inline] pub fn erase_action (& self , action : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . erase_action ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; } } # [doc = "Returns `true` if the given event is part of an existing action. This method ignores keyboard modifiers if the given [`InputEvent`][InputEvent] is not pressed (for proper release detection). See [`action_has_event`][Self::action_has_event] if you don't want this behavior.\nIf `exact_match` is `false`, it ignores additional input modifiers for [`InputEventKey`][InputEventKey] and [`InputEventMouseButton`][InputEventMouseButton] events, and the direction for [`InputEventJoypadMotion`][InputEventJoypadMotion] events.\n# Default Arguments\n* `exact_match` - `false`"] # [doc = ""] # [inline] pub fn event_is_action (& self , event : impl AsArg < crate :: generated :: InputEvent > , action : impl Into < GodotString > , exact_match : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . event_is_action ; let ret = crate :: icalls :: icallvar__obj_str_bool (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr () , action . into () , exact_match as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns an array of [`InputEvent`][InputEvent]s associated with a given action.\n**Note:** When used in the editor (e.g. a tool script or [`EditorPlugin`][EditorPlugin]), this method will return events for the editor action. If you want to access your project's input binds from the editor, read the `input/*` settings from [`ProjectSettings`][ProjectSettings]."] # [doc = ""] # [inline] pub fn get_action_list (& self , action : impl Into < GodotString >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . get_action_list ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array of all actions in the [`InputMap`][InputMap]."] # [doc = ""] # [inline] pub fn get_actions (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . get_actions ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the [`InputMap`][InputMap] has a registered action with the given name."] # [doc = ""] # [inline] pub fn has_action (& self , action : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . has_action ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Clears all [`InputEventAction`][InputEventAction] in the [`InputMap`][InputMap] and load it anew from [`ProjectSettings`][ProjectSettings]."] # [doc = ""] # [inline] pub fn load_from_globals (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InputMapMethodTable :: get (get_api ()) . load_from_globals ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InputMap { } unsafe impl GodotObject for InputMap { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "InputMap" } } impl std :: ops :: Deref for InputMap { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InputMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for InputMap { } unsafe impl Send for InputMap { } unsafe impl Sync for InputMap { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InputMapMethodTable { pub class_constructor : sys :: godot_class_constructor , pub action_add_event : * mut sys :: godot_method_bind , pub action_erase_event : * mut sys :: godot_method_bind , pub action_erase_events : * mut sys :: godot_method_bind , pub action_get_deadzone : * mut sys :: godot_method_bind , pub action_has_event : * mut sys :: godot_method_bind , pub action_set_deadzone : * mut sys :: godot_method_bind , pub add_action : * mut sys :: godot_method_bind , pub erase_action : * mut sys :: godot_method_bind , pub event_is_action : * mut sys :: godot_method_bind , pub get_action_list : * mut sys :: godot_method_bind , pub get_actions : * mut sys :: godot_method_bind , pub has_action : * mut sys :: godot_method_bind , pub load_from_globals : * mut sys :: godot_method_bind } impl InputMapMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InputMapMethodTable = InputMapMethodTable { class_constructor : None , action_add_event : 0 as * mut sys :: godot_method_bind , action_erase_event : 0 as * mut sys :: godot_method_bind , action_erase_events : 0 as * mut sys :: godot_method_bind , action_get_deadzone : 0 as * mut sys :: godot_method_bind , action_has_event : 0 as * mut sys :: godot_method_bind , action_set_deadzone : 0 as * mut sys :: godot_method_bind , add_action : 0 as * mut sys :: godot_method_bind , erase_action : 0 as * mut sys :: godot_method_bind , event_is_action : 0 as * mut sys :: godot_method_bind , get_action_list : 0 as * mut sys :: godot_method_bind , get_actions : 0 as * mut sys :: godot_method_bind , has_action : 0 as * mut sys :: godot_method_bind , load_from_globals : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InputMapMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InputMap\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . action_add_event = (gd_api . godot_method_bind_get_method) (class_name , "action_add_event\0" . as_ptr () as * const c_char) ; table . action_erase_event = (gd_api . godot_method_bind_get_method) (class_name , "action_erase_event\0" . as_ptr () as * const c_char) ; table . action_erase_events = (gd_api . godot_method_bind_get_method) (class_name , "action_erase_events\0" . as_ptr () as * const c_char) ; table . action_get_deadzone = (gd_api . godot_method_bind_get_method) (class_name , "action_get_deadzone\0" . as_ptr () as * const c_char) ; table . action_has_event = (gd_api . godot_method_bind_get_method) (class_name , "action_has_event\0" . as_ptr () as * const c_char) ; table . action_set_deadzone = (gd_api . godot_method_bind_get_method) (class_name , "action_set_deadzone\0" . as_ptr () as * const c_char) ; table . add_action = (gd_api . godot_method_bind_get_method) (class_name , "add_action\0" . as_ptr () as * const c_char) ; table . erase_action = (gd_api . godot_method_bind_get_method) (class_name , "erase_action\0" . as_ptr () as * const c_char) ; table . event_is_action = (gd_api . godot_method_bind_get_method) (class_name , "event_is_action\0" . as_ptr () as * const c_char) ; table . get_action_list = (gd_api . godot_method_bind_get_method) (class_name , "get_action_list\0" . as_ptr () as * const c_char) ; table . get_actions = (gd_api . godot_method_bind_get_method) (class_name , "get_actions\0" . as_ptr () as * const c_char) ; table . has_action = (gd_api . godot_method_bind_get_method) (class_name , "has_action\0" . as_ptr () as * const c_char) ; table . load_from_globals = (gd_api . godot_method_bind_get_method) (class_name , "load_from_globals\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::input_map::private::InputMap;
            
            pub(crate) mod instance_placeholder {
                # ! [doc = "This module contains types related to the API class [`InstancePlaceholder`][super::InstancePlaceholder]."] pub (crate) mod private { # [doc = "`core class InstancePlaceholder` inherits `Node` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_instanceplaceholder.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nInstancePlaceholder inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InstancePlaceholder { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InstancePlaceholder ; impl InstancePlaceholder { # [doc = "Call this method to actually load in the node. The created node will be placed as a sibling _above_ the [`InstancePlaceholder`][InstancePlaceholder] in the scene tree. The [`Node`][Node]'s reference is also returned for convenience.\n**Note:** [`create_instance`][Self::create_instance] is not thread-safe. Use [`Object.call_deferred`][Object::call_deferred] if calling from a thread.\n# Default Arguments\n* `replace` - `false`\n* `custom_scene` - `null`"] # [doc = ""] # [inline] pub fn create_instance (& self , replace : bool , custom_scene : impl AsArg < crate :: generated :: PackedScene >) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = InstancePlaceholderMethodTable :: get (get_api ()) . create_instance ; let ret = crate :: icalls :: icallvar__bool_obj (method_bind , self . this . sys () . as_ptr () , replace as _ , custom_scene . as_arg_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the path to the [`PackedScene`][PackedScene] resource file that is loaded by default when calling [`replace_by_instance`][Self::replace_by_instance]. Not thread-safe. Use [`Object.call_deferred`][Object::call_deferred] if calling from a thread."] # [doc = ""] # [inline] pub fn get_instance_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = InstancePlaceholderMethodTable :: get (get_api ()) . get_instance_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the list of properties that will be applied to the node when [`create_instance`][Self::create_instance] is called.\nIf `with_order` is `true`, a key named `.order` (note the leading period) is added to the dictionary. This `.order` key is an [`Array`][VariantArray] of [`String`][GodotString] property names specifying the order in which properties will be applied (with index 0 being the first).\n# Default Arguments\n* `with_order` - `false`"] # [doc = ""] # [inline] pub fn get_stored_values (& self , with_order : bool) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = InstancePlaceholderMethodTable :: get (get_api ()) . get_stored_values ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , with_order as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Replaces this placeholder by the scene handed as an argument, or the original scene if no argument is given. As for all resources, the scene is loaded only if it's not loaded already. By manually loading the scene beforehand, delays caused by this function can be avoided.\n# Default Arguments\n* `custom_scene` - `null`"] # [doc = ""] # [inline] pub fn replace_by_instance (& self , custom_scene : impl AsArg < crate :: generated :: PackedScene >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InstancePlaceholderMethodTable :: get (get_api ()) . replace_by_instance ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , custom_scene . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InstancePlaceholder { } unsafe impl GodotObject for InstancePlaceholder { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "InstancePlaceholder" } } impl QueueFree for InstancePlaceholder { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for InstancePlaceholder { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InstancePlaceholder { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for InstancePlaceholder { } unsafe impl SubClass < crate :: generated :: Object > for InstancePlaceholder { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InstancePlaceholderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create_instance : * mut sys :: godot_method_bind , pub get_instance_path : * mut sys :: godot_method_bind , pub get_stored_values : * mut sys :: godot_method_bind , pub replace_by_instance : * mut sys :: godot_method_bind } impl InstancePlaceholderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InstancePlaceholderMethodTable = InstancePlaceholderMethodTable { class_constructor : None , create_instance : 0 as * mut sys :: godot_method_bind , get_instance_path : 0 as * mut sys :: godot_method_bind , get_stored_values : 0 as * mut sys :: godot_method_bind , replace_by_instance : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InstancePlaceholderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InstancePlaceholder\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create_instance = (gd_api . godot_method_bind_get_method) (class_name , "create_instance\0" . as_ptr () as * const c_char) ; table . get_instance_path = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_path\0" . as_ptr () as * const c_char) ; table . get_stored_values = (gd_api . godot_method_bind_get_method) (class_name , "get_stored_values\0" . as_ptr () as * const c_char) ; table . replace_by_instance = (gd_api . godot_method_bind_get_method) (class_name , "replace_by_instance\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::instance_placeholder::private::InstancePlaceholder;
            
            pub mod interpolated_camera {
                # ! [doc = "This module contains types related to the API class [`InterpolatedCamera`][super::InterpolatedCamera]."] pub (crate) mod private { # [doc = "`core class InterpolatedCamera` inherits `Camera` (manually managed).\n\nThis class has related types in the [`interpolated_camera`][super::interpolated_camera] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_interpolatedcamera.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`InterpolatedCamera` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<InterpolatedCamera>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nInterpolatedCamera inherits methods from:\n - [Camera](struct.Camera.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct InterpolatedCamera { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: InterpolatedCamera ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct InterpolatedCameraProcessMode (pub i64) ; impl InterpolatedCameraProcessMode { pub const PHYSICS : InterpolatedCameraProcessMode = InterpolatedCameraProcessMode (0i64) ; pub const IDLE : InterpolatedCameraProcessMode = InterpolatedCameraProcessMode (1i64) ; } impl From < i64 > for InterpolatedCameraProcessMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < InterpolatedCameraProcessMode > for i64 { # [inline] fn from (v : InterpolatedCameraProcessMode) -> Self { v . 0 } } impl FromVariant for InterpolatedCameraProcessMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl InterpolatedCamera { pub const INTERPOLATED_CAMERA_PROCESS_PHYSICS : i64 = 0i64 ; pub const INTERPOLATED_CAMERA_PROCESS_IDLE : i64 = 1i64 ; } impl InterpolatedCamera { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = InterpolatedCameraMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The camera's process callback. See [`InterpolatedCameraProcessMode`][InterpolatedCameraProcessMode]."] # [doc = ""] # [inline] pub fn process_mode (& self) -> crate :: generated :: interpolated_camera :: InterpolatedCameraProcessMode { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . get_process_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: interpolated_camera :: InterpolatedCameraProcessMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "How quickly the camera moves toward its target. Higher values will result in tighter camera motion."] # [doc = ""] # [inline] pub fn speed (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . get_speed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The target's [`NodePath`][NodePath]."] # [doc = ""] # [inline] pub fn target_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . get_target_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, and a target is set, the camera will move automatically."] # [doc = ""] # [inline] pub fn is_interpolation_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . is_interpolation_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, and a target is set, the camera will move automatically."] # [doc = ""] # [inline] pub fn set_interpolation_enabled (& self , target_path : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . set_interpolation_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , target_path as _) ; } } # [doc = "The camera's process callback. See [`InterpolatedCameraProcessMode`][InterpolatedCameraProcessMode]."] # [doc = ""] # [inline] pub fn set_process_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . set_process_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "How quickly the camera moves toward its target. Higher values will result in tighter camera motion."] # [doc = ""] # [inline] pub fn set_speed (& self , speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . set_speed ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , speed as _) ; } } # [doc = "Sets the node to move toward and orient with."] # [doc = ""] # [inline] pub fn set_target (& self , target : impl AsArg < crate :: generated :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . set_target ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , target . as_arg_ptr ()) ; } } # [doc = "The target's [`NodePath`][NodePath]."] # [doc = ""] # [inline] pub fn set_target_path (& self , target_path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = InterpolatedCameraMethodTable :: get (get_api ()) . set_target_path ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , target_path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for InterpolatedCamera { } unsafe impl GodotObject for InterpolatedCamera { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "InterpolatedCamera" } } impl QueueFree for InterpolatedCamera { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for InterpolatedCamera { type Target = crate :: generated :: Camera ; # [inline] fn deref (& self) -> & crate :: generated :: Camera { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for InterpolatedCamera { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Camera { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Camera > for InterpolatedCamera { } unsafe impl SubClass < crate :: generated :: Spatial > for InterpolatedCamera { } unsafe impl SubClass < crate :: generated :: Node > for InterpolatedCamera { } unsafe impl SubClass < crate :: generated :: Object > for InterpolatedCamera { } impl Instanciable for InterpolatedCamera { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { InterpolatedCamera :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct InterpolatedCameraMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_process_mode : * mut sys :: godot_method_bind , pub get_speed : * mut sys :: godot_method_bind , pub get_target_path : * mut sys :: godot_method_bind , pub is_interpolation_enabled : * mut sys :: godot_method_bind , pub set_interpolation_enabled : * mut sys :: godot_method_bind , pub set_process_mode : * mut sys :: godot_method_bind , pub set_speed : * mut sys :: godot_method_bind , pub set_target : * mut sys :: godot_method_bind , pub set_target_path : * mut sys :: godot_method_bind } impl InterpolatedCameraMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : InterpolatedCameraMethodTable = InterpolatedCameraMethodTable { class_constructor : None , get_process_mode : 0 as * mut sys :: godot_method_bind , get_speed : 0 as * mut sys :: godot_method_bind , get_target_path : 0 as * mut sys :: godot_method_bind , is_interpolation_enabled : 0 as * mut sys :: godot_method_bind , set_interpolation_enabled : 0 as * mut sys :: godot_method_bind , set_process_mode : 0 as * mut sys :: godot_method_bind , set_speed : 0 as * mut sys :: godot_method_bind , set_target : 0 as * mut sys :: godot_method_bind , set_target_path : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { InterpolatedCameraMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "InterpolatedCamera\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_process_mode\0" . as_ptr () as * const c_char) ; table . get_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_speed\0" . as_ptr () as * const c_char) ; table . get_target_path = (gd_api . godot_method_bind_get_method) (class_name , "get_target_path\0" . as_ptr () as * const c_char) ; table . is_interpolation_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_interpolation_enabled\0" . as_ptr () as * const c_char) ; table . set_interpolation_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_interpolation_enabled\0" . as_ptr () as * const c_char) ; table . set_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_process_mode\0" . as_ptr () as * const c_char) ; table . set_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_speed\0" . as_ptr () as * const c_char) ; table . set_target = (gd_api . godot_method_bind_get_method) (class_name , "set_target\0" . as_ptr () as * const c_char) ; table . set_target_path = (gd_api . godot_method_bind_get_method) (class_name , "set_target_path\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::interpolated_camera::private::InterpolatedCamera;
            
            pub(crate) mod interval_tweener {
                # ! [doc = "This module contains types related to the API class [`IntervalTweener`][super::IntervalTweener]."] pub (crate) mod private { # [doc = "`core class IntervalTweener` inherits `Tweener` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_intervaltweener.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nIntervalTweener inherits methods from:\n - [Tweener](struct.Tweener.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct IntervalTweener { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: IntervalTweener ; impl IntervalTweener { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = IntervalTweenerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for IntervalTweener { } unsafe impl GodotObject for IntervalTweener { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "IntervalTweener" } } impl std :: ops :: Deref for IntervalTweener { type Target = crate :: generated :: Tweener ; # [inline] fn deref (& self) -> & crate :: generated :: Tweener { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for IntervalTweener { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Tweener { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Tweener > for IntervalTweener { } unsafe impl SubClass < crate :: generated :: Reference > for IntervalTweener { } unsafe impl SubClass < crate :: generated :: Object > for IntervalTweener { } impl Instanciable for IntervalTweener { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { IntervalTweener :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct IntervalTweenerMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl IntervalTweenerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : IntervalTweenerMethodTable = IntervalTweenerMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { IntervalTweenerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "IntervalTweener\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::interval_tweener::private::IntervalTweener;
            
            pub mod item_list {
                # ! [doc = "This module contains types related to the API class [`ItemList`][super::ItemList]."] pub (crate) mod private { # [doc = "`core class ItemList` inherits `Control` (manually managed).\n\nThis class has related types in the [`item_list`][super::item_list] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_itemlist.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ItemList` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ItemList>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nItemList inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ItemList { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ItemList ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct IconMode (pub i64) ; impl IconMode { pub const TOP : IconMode = IconMode (0i64) ; pub const LEFT : IconMode = IconMode (1i64) ; } impl From < i64 > for IconMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < IconMode > for i64 { # [inline] fn from (v : IconMode) -> Self { v . 0 } } impl FromVariant for IconMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SelectMode (pub i64) ; impl SelectMode { pub const SINGLE : SelectMode = SelectMode (0i64) ; pub const MULTI : SelectMode = SelectMode (1i64) ; } impl From < i64 > for SelectMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SelectMode > for i64 { # [inline] fn from (v : SelectMode) -> Self { v . 0 } } impl FromVariant for SelectMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ItemList { pub const ICON_MODE_TOP : i64 = 0i64 ; pub const SELECT_SINGLE : i64 = 0i64 ; pub const ICON_MODE_LEFT : i64 = 1i64 ; pub const SELECT_MULTI : i64 = 1i64 ; } impl ItemList { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ItemListMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds an item to the item list with no text, only an icon.\n# Default Arguments\n* `selectable` - `true`"] # [doc = ""] # [inline] pub fn add_icon_item (& self , icon : impl AsArg < crate :: generated :: Texture > , selectable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . add_icon_item ; let ret = crate :: icalls :: icallvar__obj_bool (method_bind , self . this . sys () . as_ptr () , icon . as_arg_ptr () , selectable as _) ; } } # [doc = "Adds an item to the item list with specified text. Specify an `icon`, or use `null` as the `icon` for a list item with no icon.\nIf selectable is `true`, the list item will be selectable.\n# Default Arguments\n* `icon` - `null`\n* `selectable` - `true`"] # [doc = ""] # [inline] pub fn add_item (& self , text : impl Into < GodotString > , icon : impl AsArg < crate :: generated :: Texture > , selectable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . add_item ; let ret = crate :: icalls :: icallvar__str_obj_bool (method_bind , self . this . sys () . as_ptr () , text . into () , icon . as_arg_ptr () , selectable as _) ; } } # [doc = "Removes all items from the list."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Ensure current selection is visible, adjusting the scroll position as necessary."] # [doc = ""] # [inline] pub fn ensure_current_is_visible (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . ensure_current_is_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the currently selected item can be selected again."] # [doc = ""] # [inline] pub fn allow_reselect (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_allow_reselect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, right mouse button click can select items."] # [doc = ""] # [inline] pub fn allow_rmb_select (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_allow_rmb_select ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The width all columns will be adjusted to.\nA value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width."] # [doc = ""] # [inline] pub fn fixed_column_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_fixed_column_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The size all icons will be adjusted to.\nIf either X or Y component is not greater than zero, icon size won't be affected."] # [doc = ""] # [inline] pub fn fixed_icon_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_fixed_icon_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The icon position, whether above or to the left of the text. See the [`IconMode`][IconMode] constants."] # [doc = ""] # [inline] pub fn icon_mode (& self) -> crate :: generated :: item_list :: IconMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_icon_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: item_list :: IconMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The scale of icon applied after [`fixed_icon_size`][Self::fixed_icon_size] and transposing takes effect."] # [doc = ""] # [inline] pub fn icon_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_icon_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the item index at the given `position`.\nWhen there is no item at that point, -1 will be returned if `exact` is `true`, and the closest item index will be returned otherwise.\n# Default Arguments\n* `exact` - `false`"] # [doc = ""] # [inline] pub fn get_item_at_position (& self , position : Vector2 , exact : bool) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_at_position ; let ret = crate :: icalls :: icallvar__vec2_bool (method_bind , self . this . sys () . as_ptr () , position , exact as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of items currently in the list."] # [doc = ""] # [inline] pub fn get_item_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the custom background color of the item specified by `idx` index."] # [doc = ""] # [inline] pub fn get_item_custom_bg_color (& self , idx : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_custom_bg_color ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the custom foreground color of the item specified by `idx` index."] # [doc = ""] # [inline] pub fn get_item_custom_fg_color (& self , idx : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_custom_fg_color ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the icon associated with the specified index."] # [doc = ""] # [inline] pub fn get_item_icon (& self , idx : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_icon ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [`Color`][Color] modulating item's icon at the specified index."] # [doc = ""] # [inline] pub fn get_item_icon_modulate (& self , idx : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_icon_modulate ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the region of item's icon used. The whole icon will be used if the region has no area."] # [doc = ""] # [inline] pub fn get_item_icon_region (& self , idx : i64) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_icon_region ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the metadata value of the specified index."] # [doc = ""] # [inline] pub fn get_item_metadata (& self , idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_metadata ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the text associated with the specified index."] # [doc = ""] # [inline] pub fn get_item_text (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_text ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tooltip hint associated with the specified index."] # [doc = ""] # [inline] pub fn get_item_tooltip (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_item_tooltip ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Maximum columns the list will have.\nIf greater than zero, the content will be split among the specified columns.\nA value of zero means unlimited columns, i.e. all items will be put in the same row."] # [doc = ""] # [inline] pub fn max_columns (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_max_columns ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display.\n**Note:** This property takes effect only when [`icon_mode`][Self::icon_mode] is [`ICON_MODE_TOP`][Self::ICON_MODE_TOP]. To make the text wrap, [`fixed_column_width`][Self::fixed_column_width] should be greater than zero."] # [doc = ""] # [inline] pub fn max_text_lines (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_max_text_lines ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Allows single or multiple item selection. See the [`SelectMode`][SelectMode] constants."] # [doc = ""] # [inline] pub fn select_mode (& self) -> crate :: generated :: item_list :: SelectMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_select_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: item_list :: SelectMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array with the indexes of the selected items."] # [doc = ""] # [inline] pub fn get_selected_items (& self) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_selected_items ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the vertical scrollbar.\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_v_scroll (& self) -> Option < Ref < crate :: generated :: VScrollBar , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . get_v_scroll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: VScrollBar , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the control will automatically resize the height to fit its content."] # [doc = ""] # [inline] pub fn has_auto_height (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . has_auto_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if one or more items are selected."] # [doc = ""] # [inline] pub fn is_anything_selected (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . is_anything_selected ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the item at the specified index is disabled."] # [doc = ""] # [inline] pub fn is_item_disabled (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . is_item_disabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the item icon will be drawn transposed, i.e. the X and Y axes are swapped."] # [doc = ""] # [inline] pub fn is_item_icon_transposed (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . is_item_icon_transposed ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the item at the specified index is selectable."] # [doc = ""] # [inline] pub fn is_item_selectable (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . is_item_selectable ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the tooltip is enabled for specified item index."] # [doc = ""] # [inline] pub fn is_item_tooltip_enabled (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . is_item_tooltip_enabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Whether all columns will have the same width.\nIf `true`, the width is equal to the largest column width of all columns."] # [doc = ""] # [inline] pub fn is_same_column_width (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . is_same_column_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the item at the specified index is currently selected."] # [doc = ""] # [inline] pub fn is_selected (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . is_selected ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Moves item from index `from_idx` to `to_idx`."] # [doc = ""] # [inline] pub fn move_item (& self , from_idx : i64 , to_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . move_item ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , from_idx as _ , to_idx as _) ; } } # [doc = "Removes the item specified by `idx` index from the list."] # [doc = ""] # [inline] pub fn remove_item (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . remove_item ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; } } # [doc = "Select the item at the specified index.\n**Note:** This method does not trigger the item selection signal.\n# Default Arguments\n* `single` - `true`"] # [doc = ""] # [inline] pub fn select (& self , idx : i64 , single : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . select ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , single as _) ; } } # [doc = "If `true`, the currently selected item can be selected again."] # [doc = ""] # [inline] pub fn set_allow_reselect (& self , allow : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_allow_reselect ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , allow as _) ; } } # [doc = "If `true`, right mouse button click can select items."] # [doc = ""] # [inline] pub fn set_allow_rmb_select (& self , allow : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_allow_rmb_select ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , allow as _) ; } } # [doc = "If `true`, the control will automatically resize the height to fit its content."] # [doc = ""] # [inline] pub fn set_auto_height (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_auto_height ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The width all columns will be adjusted to.\nA value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width."] # [doc = ""] # [inline] pub fn set_fixed_column_width (& self , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_fixed_column_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , width as _) ; } } # [doc = "The size all icons will be adjusted to.\nIf either X or Y component is not greater than zero, icon size won't be affected."] # [doc = ""] # [inline] pub fn set_fixed_icon_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_fixed_icon_size ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "The icon position, whether above or to the left of the text. See the [`IconMode`][IconMode] constants."] # [doc = ""] # [inline] pub fn set_icon_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_icon_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The scale of icon applied after [`fixed_icon_size`][Self::fixed_icon_size] and transposing takes effect."] # [doc = ""] # [inline] pub fn set_icon_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_icon_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , scale as _) ; } } # [doc = "Sets the background color of the item specified by `idx` index to the specified [`Color`][Color]."] # [doc = ""] # [inline] pub fn set_item_custom_bg_color (& self , idx : i64 , custom_bg_color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_custom_bg_color ; let ret = crate :: icalls :: icallvar__i64_color (method_bind , self . this . sys () . as_ptr () , idx as _ , custom_bg_color) ; } } # [doc = "Sets the foreground color of the item specified by `idx` index to the specified [`Color`][Color]."] # [doc = ""] # [inline] pub fn set_item_custom_fg_color (& self , idx : i64 , custom_fg_color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_custom_fg_color ; let ret = crate :: icalls :: icallvar__i64_color (method_bind , self . this . sys () . as_ptr () , idx as _ , custom_fg_color) ; } } # [doc = "Disables (or enables) the item at the specified index.\nDisabled items cannot be selected and do not trigger activation signals (when double-clicking or pressing Enter)."] # [doc = ""] # [inline] pub fn set_item_disabled (& self , idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_disabled ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , disabled as _) ; } } # [doc = "Sets (or replaces) the icon's [`Texture`][Texture] associated with the specified index."] # [doc = ""] # [inline] pub fn set_item_icon (& self , idx : i64 , icon : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_icon ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , idx as _ , icon . as_arg_ptr ()) ; } } # [doc = "Sets a modulating [`Color`][Color] of the item associated with the specified index."] # [doc = ""] # [inline] pub fn set_item_icon_modulate (& self , idx : i64 , modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_icon_modulate ; let ret = crate :: icalls :: icallvar__i64_color (method_bind , self . this . sys () . as_ptr () , idx as _ , modulate) ; } } # [doc = "Sets the region of item's icon used. The whole icon will be used if the region has no area."] # [doc = ""] # [inline] pub fn set_item_icon_region (& self , idx : i64 , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_icon_region ; let ret = crate :: icalls :: icallvar__i64_rect2 (method_bind , self . this . sys () . as_ptr () , idx as _ , rect) ; } } # [doc = "Sets whether the item icon will be drawn transposed."] # [doc = ""] # [inline] pub fn set_item_icon_transposed (& self , idx : i64 , transposed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_icon_transposed ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , transposed as _) ; } } # [doc = "Sets a value (of any type) to be stored with the item associated with the specified index."] # [doc = ""] # [inline] pub fn set_item_metadata (& self , idx : i64 , metadata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_metadata ; let ret = crate :: icalls :: icallvar__i64_var (method_bind , self . this . sys () . as_ptr () , idx as _ , metadata . owned_to_variant ()) ; } } # [doc = "Allows or disallows selection of the item associated with the specified index."] # [doc = ""] # [inline] pub fn set_item_selectable (& self , idx : i64 , selectable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_selectable ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , selectable as _) ; } } # [doc = "Sets text of the item associated with the specified index."] # [doc = ""] # [inline] pub fn set_item_text (& self , idx : i64 , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_text ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , idx as _ , text . into ()) ; } } # [doc = "Sets the tooltip hint for the item associated with the specified index."] # [doc = ""] # [inline] pub fn set_item_tooltip (& self , idx : i64 , tooltip : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_tooltip ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , idx as _ , tooltip . into ()) ; } } # [doc = "Sets whether the tooltip hint is enabled for specified item index."] # [doc = ""] # [inline] pub fn set_item_tooltip_enabled (& self , idx : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_item_tooltip_enabled ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , enable as _) ; } } # [doc = "Maximum columns the list will have.\nIf greater than zero, the content will be split among the specified columns.\nA value of zero means unlimited columns, i.e. all items will be put in the same row."] # [doc = ""] # [inline] pub fn set_max_columns (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_max_columns ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display.\n**Note:** This property takes effect only when [`icon_mode`][Self::icon_mode] is [`ICON_MODE_TOP`][Self::ICON_MODE_TOP]. To make the text wrap, [`fixed_column_width`][Self::fixed_column_width] should be greater than zero."] # [doc = ""] # [inline] pub fn set_max_text_lines (& self , lines : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_max_text_lines ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , lines as _) ; } } # [doc = "Whether all columns will have the same width.\nIf `true`, the width is equal to the largest column width of all columns."] # [doc = ""] # [inline] pub fn set_same_column_width (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_same_column_width ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Allows single or multiple item selection. See the [`SelectMode`][SelectMode] constants."] # [doc = ""] # [inline] pub fn set_select_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . set_select_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Sorts items in the list by their text."] # [doc = ""] # [inline] pub fn sort_items_by_text (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . sort_items_by_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Ensures the item associated with the specified index is not selected."] # [doc = ""] # [inline] pub fn unselect (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . unselect ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; } } # [doc = "Ensures there are no items selected."] # [doc = ""] # [inline] pub fn unselect_all (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ItemListMethodTable :: get (get_api ()) . unselect_all ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ItemList { } unsafe impl GodotObject for ItemList { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ItemList" } } impl QueueFree for ItemList { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ItemList { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ItemList { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for ItemList { } unsafe impl SubClass < crate :: generated :: CanvasItem > for ItemList { } unsafe impl SubClass < crate :: generated :: Node > for ItemList { } unsafe impl SubClass < crate :: generated :: Object > for ItemList { } impl Instanciable for ItemList { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ItemList :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ItemListMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_icon_item : * mut sys :: godot_method_bind , pub add_item : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub ensure_current_is_visible : * mut sys :: godot_method_bind , pub get_allow_reselect : * mut sys :: godot_method_bind , pub get_allow_rmb_select : * mut sys :: godot_method_bind , pub get_fixed_column_width : * mut sys :: godot_method_bind , pub get_fixed_icon_size : * mut sys :: godot_method_bind , pub get_icon_mode : * mut sys :: godot_method_bind , pub get_icon_scale : * mut sys :: godot_method_bind , pub get_item_at_position : * mut sys :: godot_method_bind , pub get_item_count : * mut sys :: godot_method_bind , pub get_item_custom_bg_color : * mut sys :: godot_method_bind , pub get_item_custom_fg_color : * mut sys :: godot_method_bind , pub get_item_icon : * mut sys :: godot_method_bind , pub get_item_icon_modulate : * mut sys :: godot_method_bind , pub get_item_icon_region : * mut sys :: godot_method_bind , pub get_item_metadata : * mut sys :: godot_method_bind , pub get_item_text : * mut sys :: godot_method_bind , pub get_item_tooltip : * mut sys :: godot_method_bind , pub get_max_columns : * mut sys :: godot_method_bind , pub get_max_text_lines : * mut sys :: godot_method_bind , pub get_select_mode : * mut sys :: godot_method_bind , pub get_selected_items : * mut sys :: godot_method_bind , pub get_v_scroll : * mut sys :: godot_method_bind , pub has_auto_height : * mut sys :: godot_method_bind , pub is_anything_selected : * mut sys :: godot_method_bind , pub is_item_disabled : * mut sys :: godot_method_bind , pub is_item_icon_transposed : * mut sys :: godot_method_bind , pub is_item_selectable : * mut sys :: godot_method_bind , pub is_item_tooltip_enabled : * mut sys :: godot_method_bind , pub is_same_column_width : * mut sys :: godot_method_bind , pub is_selected : * mut sys :: godot_method_bind , pub move_item : * mut sys :: godot_method_bind , pub remove_item : * mut sys :: godot_method_bind , pub select : * mut sys :: godot_method_bind , pub set_allow_reselect : * mut sys :: godot_method_bind , pub set_allow_rmb_select : * mut sys :: godot_method_bind , pub set_auto_height : * mut sys :: godot_method_bind , pub set_fixed_column_width : * mut sys :: godot_method_bind , pub set_fixed_icon_size : * mut sys :: godot_method_bind , pub set_icon_mode : * mut sys :: godot_method_bind , pub set_icon_scale : * mut sys :: godot_method_bind , pub set_item_custom_bg_color : * mut sys :: godot_method_bind , pub set_item_custom_fg_color : * mut sys :: godot_method_bind , pub set_item_disabled : * mut sys :: godot_method_bind , pub set_item_icon : * mut sys :: godot_method_bind , pub set_item_icon_modulate : * mut sys :: godot_method_bind , pub set_item_icon_region : * mut sys :: godot_method_bind , pub set_item_icon_transposed : * mut sys :: godot_method_bind , pub set_item_metadata : * mut sys :: godot_method_bind , pub set_item_selectable : * mut sys :: godot_method_bind , pub set_item_text : * mut sys :: godot_method_bind , pub set_item_tooltip : * mut sys :: godot_method_bind , pub set_item_tooltip_enabled : * mut sys :: godot_method_bind , pub set_max_columns : * mut sys :: godot_method_bind , pub set_max_text_lines : * mut sys :: godot_method_bind , pub set_same_column_width : * mut sys :: godot_method_bind , pub set_select_mode : * mut sys :: godot_method_bind , pub sort_items_by_text : * mut sys :: godot_method_bind , pub unselect : * mut sys :: godot_method_bind , pub unselect_all : * mut sys :: godot_method_bind } impl ItemListMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ItemListMethodTable = ItemListMethodTable { class_constructor : None , add_icon_item : 0 as * mut sys :: godot_method_bind , add_item : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , ensure_current_is_visible : 0 as * mut sys :: godot_method_bind , get_allow_reselect : 0 as * mut sys :: godot_method_bind , get_allow_rmb_select : 0 as * mut sys :: godot_method_bind , get_fixed_column_width : 0 as * mut sys :: godot_method_bind , get_fixed_icon_size : 0 as * mut sys :: godot_method_bind , get_icon_mode : 0 as * mut sys :: godot_method_bind , get_icon_scale : 0 as * mut sys :: godot_method_bind , get_item_at_position : 0 as * mut sys :: godot_method_bind , get_item_count : 0 as * mut sys :: godot_method_bind , get_item_custom_bg_color : 0 as * mut sys :: godot_method_bind , get_item_custom_fg_color : 0 as * mut sys :: godot_method_bind , get_item_icon : 0 as * mut sys :: godot_method_bind , get_item_icon_modulate : 0 as * mut sys :: godot_method_bind , get_item_icon_region : 0 as * mut sys :: godot_method_bind , get_item_metadata : 0 as * mut sys :: godot_method_bind , get_item_text : 0 as * mut sys :: godot_method_bind , get_item_tooltip : 0 as * mut sys :: godot_method_bind , get_max_columns : 0 as * mut sys :: godot_method_bind , get_max_text_lines : 0 as * mut sys :: godot_method_bind , get_select_mode : 0 as * mut sys :: godot_method_bind , get_selected_items : 0 as * mut sys :: godot_method_bind , get_v_scroll : 0 as * mut sys :: godot_method_bind , has_auto_height : 0 as * mut sys :: godot_method_bind , is_anything_selected : 0 as * mut sys :: godot_method_bind , is_item_disabled : 0 as * mut sys :: godot_method_bind , is_item_icon_transposed : 0 as * mut sys :: godot_method_bind , is_item_selectable : 0 as * mut sys :: godot_method_bind , is_item_tooltip_enabled : 0 as * mut sys :: godot_method_bind , is_same_column_width : 0 as * mut sys :: godot_method_bind , is_selected : 0 as * mut sys :: godot_method_bind , move_item : 0 as * mut sys :: godot_method_bind , remove_item : 0 as * mut sys :: godot_method_bind , select : 0 as * mut sys :: godot_method_bind , set_allow_reselect : 0 as * mut sys :: godot_method_bind , set_allow_rmb_select : 0 as * mut sys :: godot_method_bind , set_auto_height : 0 as * mut sys :: godot_method_bind , set_fixed_column_width : 0 as * mut sys :: godot_method_bind , set_fixed_icon_size : 0 as * mut sys :: godot_method_bind , set_icon_mode : 0 as * mut sys :: godot_method_bind , set_icon_scale : 0 as * mut sys :: godot_method_bind , set_item_custom_bg_color : 0 as * mut sys :: godot_method_bind , set_item_custom_fg_color : 0 as * mut sys :: godot_method_bind , set_item_disabled : 0 as * mut sys :: godot_method_bind , set_item_icon : 0 as * mut sys :: godot_method_bind , set_item_icon_modulate : 0 as * mut sys :: godot_method_bind , set_item_icon_region : 0 as * mut sys :: godot_method_bind , set_item_icon_transposed : 0 as * mut sys :: godot_method_bind , set_item_metadata : 0 as * mut sys :: godot_method_bind , set_item_selectable : 0 as * mut sys :: godot_method_bind , set_item_text : 0 as * mut sys :: godot_method_bind , set_item_tooltip : 0 as * mut sys :: godot_method_bind , set_item_tooltip_enabled : 0 as * mut sys :: godot_method_bind , set_max_columns : 0 as * mut sys :: godot_method_bind , set_max_text_lines : 0 as * mut sys :: godot_method_bind , set_same_column_width : 0 as * mut sys :: godot_method_bind , set_select_mode : 0 as * mut sys :: godot_method_bind , sort_items_by_text : 0 as * mut sys :: godot_method_bind , unselect : 0 as * mut sys :: godot_method_bind , unselect_all : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ItemListMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ItemList\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_icon_item = (gd_api . godot_method_bind_get_method) (class_name , "add_icon_item\0" . as_ptr () as * const c_char) ; table . add_item = (gd_api . godot_method_bind_get_method) (class_name , "add_item\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . ensure_current_is_visible = (gd_api . godot_method_bind_get_method) (class_name , "ensure_current_is_visible\0" . as_ptr () as * const c_char) ; table . get_allow_reselect = (gd_api . godot_method_bind_get_method) (class_name , "get_allow_reselect\0" . as_ptr () as * const c_char) ; table . get_allow_rmb_select = (gd_api . godot_method_bind_get_method) (class_name , "get_allow_rmb_select\0" . as_ptr () as * const c_char) ; table . get_fixed_column_width = (gd_api . godot_method_bind_get_method) (class_name , "get_fixed_column_width\0" . as_ptr () as * const c_char) ; table . get_fixed_icon_size = (gd_api . godot_method_bind_get_method) (class_name , "get_fixed_icon_size\0" . as_ptr () as * const c_char) ; table . get_icon_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_icon_mode\0" . as_ptr () as * const c_char) ; table . get_icon_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_icon_scale\0" . as_ptr () as * const c_char) ; table . get_item_at_position = (gd_api . godot_method_bind_get_method) (class_name , "get_item_at_position\0" . as_ptr () as * const c_char) ; table . get_item_count = (gd_api . godot_method_bind_get_method) (class_name , "get_item_count\0" . as_ptr () as * const c_char) ; table . get_item_custom_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "get_item_custom_bg_color\0" . as_ptr () as * const c_char) ; table . get_item_custom_fg_color = (gd_api . godot_method_bind_get_method) (class_name , "get_item_custom_fg_color\0" . as_ptr () as * const c_char) ; table . get_item_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_item_icon\0" . as_ptr () as * const c_char) ; table . get_item_icon_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_item_icon_modulate\0" . as_ptr () as * const c_char) ; table . get_item_icon_region = (gd_api . godot_method_bind_get_method) (class_name , "get_item_icon_region\0" . as_ptr () as * const c_char) ; table . get_item_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_item_metadata\0" . as_ptr () as * const c_char) ; table . get_item_text = (gd_api . godot_method_bind_get_method) (class_name , "get_item_text\0" . as_ptr () as * const c_char) ; table . get_item_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "get_item_tooltip\0" . as_ptr () as * const c_char) ; table . get_max_columns = (gd_api . godot_method_bind_get_method) (class_name , "get_max_columns\0" . as_ptr () as * const c_char) ; table . get_max_text_lines = (gd_api . godot_method_bind_get_method) (class_name , "get_max_text_lines\0" . as_ptr () as * const c_char) ; table . get_select_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_select_mode\0" . as_ptr () as * const c_char) ; table . get_selected_items = (gd_api . godot_method_bind_get_method) (class_name , "get_selected_items\0" . as_ptr () as * const c_char) ; table . get_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scroll\0" . as_ptr () as * const c_char) ; table . has_auto_height = (gd_api . godot_method_bind_get_method) (class_name , "has_auto_height\0" . as_ptr () as * const c_char) ; table . is_anything_selected = (gd_api . godot_method_bind_get_method) (class_name , "is_anything_selected\0" . as_ptr () as * const c_char) ; table . is_item_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_item_disabled\0" . as_ptr () as * const c_char) ; table . is_item_icon_transposed = (gd_api . godot_method_bind_get_method) (class_name , "is_item_icon_transposed\0" . as_ptr () as * const c_char) ; table . is_item_selectable = (gd_api . godot_method_bind_get_method) (class_name , "is_item_selectable\0" . as_ptr () as * const c_char) ; table . is_item_tooltip_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_item_tooltip_enabled\0" . as_ptr () as * const c_char) ; table . is_same_column_width = (gd_api . godot_method_bind_get_method) (class_name , "is_same_column_width\0" . as_ptr () as * const c_char) ; table . is_selected = (gd_api . godot_method_bind_get_method) (class_name , "is_selected\0" . as_ptr () as * const c_char) ; table . move_item = (gd_api . godot_method_bind_get_method) (class_name , "move_item\0" . as_ptr () as * const c_char) ; table . remove_item = (gd_api . godot_method_bind_get_method) (class_name , "remove_item\0" . as_ptr () as * const c_char) ; table . select = (gd_api . godot_method_bind_get_method) (class_name , "select\0" . as_ptr () as * const c_char) ; table . set_allow_reselect = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_reselect\0" . as_ptr () as * const c_char) ; table . set_allow_rmb_select = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_rmb_select\0" . as_ptr () as * const c_char) ; table . set_auto_height = (gd_api . godot_method_bind_get_method) (class_name , "set_auto_height\0" . as_ptr () as * const c_char) ; table . set_fixed_column_width = (gd_api . godot_method_bind_get_method) (class_name , "set_fixed_column_width\0" . as_ptr () as * const c_char) ; table . set_fixed_icon_size = (gd_api . godot_method_bind_get_method) (class_name , "set_fixed_icon_size\0" . as_ptr () as * const c_char) ; table . set_icon_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_icon_mode\0" . as_ptr () as * const c_char) ; table . set_icon_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_icon_scale\0" . as_ptr () as * const c_char) ; table . set_item_custom_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "set_item_custom_bg_color\0" . as_ptr () as * const c_char) ; table . set_item_custom_fg_color = (gd_api . godot_method_bind_get_method) (class_name , "set_item_custom_fg_color\0" . as_ptr () as * const c_char) ; table . set_item_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_item_disabled\0" . as_ptr () as * const c_char) ; table . set_item_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_item_icon\0" . as_ptr () as * const c_char) ; table . set_item_icon_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_item_icon_modulate\0" . as_ptr () as * const c_char) ; table . set_item_icon_region = (gd_api . godot_method_bind_get_method) (class_name , "set_item_icon_region\0" . as_ptr () as * const c_char) ; table . set_item_icon_transposed = (gd_api . godot_method_bind_get_method) (class_name , "set_item_icon_transposed\0" . as_ptr () as * const c_char) ; table . set_item_metadata = (gd_api . godot_method_bind_get_method) (class_name , "set_item_metadata\0" . as_ptr () as * const c_char) ; table . set_item_selectable = (gd_api . godot_method_bind_get_method) (class_name , "set_item_selectable\0" . as_ptr () as * const c_char) ; table . set_item_text = (gd_api . godot_method_bind_get_method) (class_name , "set_item_text\0" . as_ptr () as * const c_char) ; table . set_item_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "set_item_tooltip\0" . as_ptr () as * const c_char) ; table . set_item_tooltip_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_item_tooltip_enabled\0" . as_ptr () as * const c_char) ; table . set_max_columns = (gd_api . godot_method_bind_get_method) (class_name , "set_max_columns\0" . as_ptr () as * const c_char) ; table . set_max_text_lines = (gd_api . godot_method_bind_get_method) (class_name , "set_max_text_lines\0" . as_ptr () as * const c_char) ; table . set_same_column_width = (gd_api . godot_method_bind_get_method) (class_name , "set_same_column_width\0" . as_ptr () as * const c_char) ; table . set_select_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_select_mode\0" . as_ptr () as * const c_char) ; table . sort_items_by_text = (gd_api . godot_method_bind_get_method) (class_name , "sort_items_by_text\0" . as_ptr () as * const c_char) ; table . unselect = (gd_api . godot_method_bind_get_method) (class_name , "unselect\0" . as_ptr () as * const c_char) ; table . unselect_all = (gd_api . godot_method_bind_get_method) (class_name , "unselect_all\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::item_list::private::ItemList;
            
            pub(crate) mod jni_singleton {
                # ! [doc = "This module contains types related to the API class [`JNISingleton`][super::JNISingleton]."] pub (crate) mod private { # [doc = "`core class JNISingleton` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_jnisingleton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`JNISingleton` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<JNISingleton>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nJNISingleton inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct JNISingleton { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: JNISingleton ; impl JNISingleton { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = JNISingletonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for JNISingleton { } unsafe impl GodotObject for JNISingleton { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "JNISingleton" } } impl std :: ops :: Deref for JNISingleton { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JNISingleton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for JNISingleton { } impl Instanciable for JNISingleton { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { JNISingleton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct JNISingletonMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl JNISingletonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : JNISingletonMethodTable = JNISingletonMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { JNISingletonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "JNISingleton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::jni_singleton::private::JNISingleton;
            
            pub(crate) mod json_parse_result {
                # ! [doc = "This module contains types related to the API class [`JSONParseResult`][super::JSONParseResult]."] pub (crate) mod private { # [doc = "`core class JSONParseResult` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_jsonparseresult.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nJSONParseResult inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct JSONParseResult { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: JSONParseResult ; impl JSONParseResult { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = JSONParseResultMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The error type if the JSON source was not successfully parsed. See the [`Error`][GodotError] constants."] # [doc = ""] # [inline] pub fn error (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONParseResultMethodTable :: get (get_api ()) . get_error ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "The line number where the error occurred if the JSON source was not successfully parsed."] # [doc = ""] # [inline] pub fn error_line (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONParseResultMethodTable :: get (get_api ()) . get_error_line ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The error message if the JSON source was not successfully parsed. See the [`Error`][GodotError] constants."] # [doc = ""] # [inline] pub fn error_string (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONParseResultMethodTable :: get (get_api ()) . get_error_string ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nA [`Variant`][Variant] containing the parsed JSON. Use [method @GDScript.typeof] or the `is` keyword to check if it is what you expect. For example, if the JSON source starts with curly braces (`{}`), a [`Dictionary`][Dictionary] will be returned. If the JSON source starts with brackets (`[]`), an [`Array`][VariantArray] will be returned.\n**Note:** The JSON specification does not define integer or float types, but only a _number_ type. Therefore, parsing a JSON text will convert all numerical values to [`float`][float] types.\n**Note:** JSON objects do not preserve key order like Godot dictionaries, thus, you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements:\n```gdscript\nvar p = JSON.parse('[\"hello\", \"world\", \"!\"]')\nif typeof(p.result) == TYPE_ARRAY:\n    print(p.result[`0`][0]) # Prints \"hello\"\nelse:\n    push_error(\"Unexpected results.\")\n```"] # [doc = ""] # [inline] pub fn result (& self) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONParseResultMethodTable :: get (get_api ()) . get_result ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The error type if the JSON source was not successfully parsed. See the [`Error`][GodotError] constants."] # [doc = ""] # [inline] pub fn set_error (& self , error : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONParseResultMethodTable :: get (get_api ()) . set_error ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , error as _) ; } } # [doc = "The line number where the error occurred if the JSON source was not successfully parsed."] # [doc = ""] # [inline] pub fn set_error_line (& self , error_line : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONParseResultMethodTable :: get (get_api ()) . set_error_line ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , error_line as _) ; } } # [doc = "The error message if the JSON source was not successfully parsed. See the [`Error`][GodotError] constants."] # [doc = ""] # [inline] pub fn set_error_string (& self , error_string : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONParseResultMethodTable :: get (get_api ()) . set_error_string ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , error_string . into ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nA [`Variant`][Variant] containing the parsed JSON. Use [method @GDScript.typeof] or the `is` keyword to check if it is what you expect. For example, if the JSON source starts with curly braces (`{}`), a [`Dictionary`][Dictionary] will be returned. If the JSON source starts with brackets (`[]`), an [`Array`][VariantArray] will be returned.\n**Note:** The JSON specification does not define integer or float types, but only a _number_ type. Therefore, parsing a JSON text will convert all numerical values to [`float`][float] types.\n**Note:** JSON objects do not preserve key order like Godot dictionaries, thus, you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements:\n```gdscript\nvar p = JSON.parse('[\"hello\", \"world\", \"!\"]')\nif typeof(p.result) == TYPE_ARRAY:\n    print(p.result[`0`][0]) # Prints \"hello\"\nelse:\n    push_error(\"Unexpected results.\")\n```"] # [doc = ""] # [inline] pub fn set_result (& self , result : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONParseResultMethodTable :: get (get_api ()) . set_result ; let ret = crate :: icalls :: icallvar__var (method_bind , self . this . sys () . as_ptr () , result . owned_to_variant ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for JSONParseResult { } unsafe impl GodotObject for JSONParseResult { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "JSONParseResult" } } impl std :: ops :: Deref for JSONParseResult { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JSONParseResult { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for JSONParseResult { } unsafe impl SubClass < crate :: generated :: Object > for JSONParseResult { } impl Instanciable for JSONParseResult { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { JSONParseResult :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct JSONParseResultMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_error : * mut sys :: godot_method_bind , pub get_error_line : * mut sys :: godot_method_bind , pub get_error_string : * mut sys :: godot_method_bind , pub get_result : * mut sys :: godot_method_bind , pub set_error : * mut sys :: godot_method_bind , pub set_error_line : * mut sys :: godot_method_bind , pub set_error_string : * mut sys :: godot_method_bind , pub set_result : * mut sys :: godot_method_bind } impl JSONParseResultMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : JSONParseResultMethodTable = JSONParseResultMethodTable { class_constructor : None , get_error : 0 as * mut sys :: godot_method_bind , get_error_line : 0 as * mut sys :: godot_method_bind , get_error_string : 0 as * mut sys :: godot_method_bind , get_result : 0 as * mut sys :: godot_method_bind , set_error : 0 as * mut sys :: godot_method_bind , set_error_line : 0 as * mut sys :: godot_method_bind , set_error_string : 0 as * mut sys :: godot_method_bind , set_result : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { JSONParseResultMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "JSONParseResult\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_error = (gd_api . godot_method_bind_get_method) (class_name , "get_error\0" . as_ptr () as * const c_char) ; table . get_error_line = (gd_api . godot_method_bind_get_method) (class_name , "get_error_line\0" . as_ptr () as * const c_char) ; table . get_error_string = (gd_api . godot_method_bind_get_method) (class_name , "get_error_string\0" . as_ptr () as * const c_char) ; table . get_result = (gd_api . godot_method_bind_get_method) (class_name , "get_result\0" . as_ptr () as * const c_char) ; table . set_error = (gd_api . godot_method_bind_get_method) (class_name , "set_error\0" . as_ptr () as * const c_char) ; table . set_error_line = (gd_api . godot_method_bind_get_method) (class_name , "set_error_line\0" . as_ptr () as * const c_char) ; table . set_error_string = (gd_api . godot_method_bind_get_method) (class_name , "set_error_string\0" . as_ptr () as * const c_char) ; table . set_result = (gd_api . godot_method_bind_get_method) (class_name , "set_result\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::json_parse_result::private::JSONParseResult;
            
            pub mod jsonrpc {
                # ! [doc = "This module contains types related to the API class [`JSONRPC`][super::JSONRPC]."] pub (crate) mod private { # [doc = "`core class JSONRPC` inherits `Object` (manually managed).\n\nThis class has related types in the [`jsonrpc`][super::jsonrpc] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_jsonrpc.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`JSONRPC` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<JSONRPC>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nJSONRPC inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct JSONRPC { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: JSONRPC ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ErrorCode (pub i64) ; impl ErrorCode { pub const PARSE_ERROR : ErrorCode = ErrorCode (- 32700i64) ; pub const INTERNAL_ERROR : ErrorCode = ErrorCode (- 32603i64) ; pub const INVALID_PARAMS : ErrorCode = ErrorCode (- 32602i64) ; pub const METHOD_NOT_FOUND : ErrorCode = ErrorCode (- 32601i64) ; pub const INVALID_REQUEST : ErrorCode = ErrorCode (- 32600i64) ; } impl From < i64 > for ErrorCode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ErrorCode > for i64 { # [inline] fn from (v : ErrorCode) -> Self { v . 0 } } impl FromVariant for ErrorCode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl JSONRPC { pub const PARSE_ERROR : i64 = - 32700i64 ; pub const INTERNAL_ERROR : i64 = - 32603i64 ; pub const INVALID_PARAMS : i64 = - 32602i64 ; pub const METHOD_NOT_FOUND : i64 = - 32601i64 ; pub const INVALID_REQUEST : i64 = - 32600i64 ; } impl JSONRPC { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = JSONRPCMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns a dictionary in the form of a JSON-RPC notification. Notifications are one-shot messages which do not expect a response.\n- `method`: Name of the method being called.\n- `params`: An array or dictionary of parameters being passed to the method."] # [doc = ""] # [inline] pub fn make_notification (& self , method : impl Into < GodotString > , params : impl OwnedToVariant) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONRPCMethodTable :: get (get_api ()) . make_notification ; let ret = crate :: icalls :: icallvar__str_var (method_bind , self . this . sys () . as_ptr () , method . into () , params . owned_to_variant ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a dictionary in the form of a JSON-RPC request. Requests are sent to a server with the expectation of a response. The ID field is used for the server to specify which exact request it is responding to.\n- `method`: Name of the method being called.\n- `params`: An array or dictionary of parameters being passed to the method.\n- `id`: Uniquely identifies this request. The server is expected to send a response with the same ID."] # [doc = ""] # [inline] pub fn make_request (& self , method : impl Into < GodotString > , params : impl OwnedToVariant , id : impl OwnedToVariant) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONRPCMethodTable :: get (get_api ()) . make_request ; let ret = crate :: icalls :: icallvar__str_var_var (method_bind , self . this . sys () . as_ptr () , method . into () , params . owned_to_variant () , id . owned_to_variant ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "When a server has received and processed a request, it is expected to send a response. If you did not want a response then you need to have sent a Notification instead.\n- `result`: The return value of the function which was called.\n- `id`: The ID of the request this response is targeted to."] # [doc = ""] # [inline] pub fn make_response (& self , result : impl OwnedToVariant , id : impl OwnedToVariant) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONRPCMethodTable :: get (get_api ()) . make_response ; let ret = crate :: icalls :: icallvar__var_var (method_bind , self . this . sys () . as_ptr () , result . owned_to_variant () , id . owned_to_variant ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a response which indicates a previous reply has failed in some way.\n- `code`: The error code corresponding to what kind of error this is. See the [`ErrorCode`][ErrorCode] constants.\n- `message`: A custom message about this error.\n- `id`: The request this error is a response to.\n# Default Arguments\n* `id` - `null`"] # [doc = ""] # [inline] pub fn make_response_error (& self , code : i64 , message : impl Into < GodotString > , id : impl OwnedToVariant) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONRPCMethodTable :: get (get_api ()) . make_response_error ; let ret = crate :: icalls :: icallvar__i64_str_var (method_bind , self . this . sys () . as_ptr () , code as _ , message . into () , id . owned_to_variant ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Given a Dictionary which takes the form of a JSON-RPC request: unpack the request and run it. Methods are resolved by looking at the field called \"method\" and looking for an equivalently named function in the JSONRPC object. If one is found that method is called.\nTo add new supported methods extend the JSONRPC class and call [`process_action`][Self::process_action] on your subclass.\n`action`: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification.\n# Default Arguments\n* `recurse` - `false`"] # [doc = ""] # [inline] pub fn process_action (& self , action : impl OwnedToVariant , recurse : bool) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONRPCMethodTable :: get (get_api ()) . process_action ; let ret = crate :: icalls :: icallvar__var_bool (method_bind , self . this . sys () . as_ptr () , action . owned_to_variant () , recurse as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn process_string (& self , action : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONRPCMethodTable :: get (get_api ()) . process_string ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_scope (& self , scope : impl Into < GodotString > , target : impl AsArg < crate :: generated :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONRPCMethodTable :: get (get_api ()) . set_scope ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , scope . into () , target . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for JSONRPC { } unsafe impl GodotObject for JSONRPC { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "JSONRPC" } } impl std :: ops :: Deref for JSONRPC { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JSONRPC { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for JSONRPC { } impl Instanciable for JSONRPC { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { JSONRPC :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct JSONRPCMethodTable { pub class_constructor : sys :: godot_class_constructor , pub make_notification : * mut sys :: godot_method_bind , pub make_request : * mut sys :: godot_method_bind , pub make_response : * mut sys :: godot_method_bind , pub make_response_error : * mut sys :: godot_method_bind , pub process_action : * mut sys :: godot_method_bind , pub process_string : * mut sys :: godot_method_bind , pub set_scope : * mut sys :: godot_method_bind } impl JSONRPCMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : JSONRPCMethodTable = JSONRPCMethodTable { class_constructor : None , make_notification : 0 as * mut sys :: godot_method_bind , make_request : 0 as * mut sys :: godot_method_bind , make_response : 0 as * mut sys :: godot_method_bind , make_response_error : 0 as * mut sys :: godot_method_bind , process_action : 0 as * mut sys :: godot_method_bind , process_string : 0 as * mut sys :: godot_method_bind , set_scope : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { JSONRPCMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "JSONRPC\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . make_notification = (gd_api . godot_method_bind_get_method) (class_name , "make_notification\0" . as_ptr () as * const c_char) ; table . make_request = (gd_api . godot_method_bind_get_method) (class_name , "make_request\0" . as_ptr () as * const c_char) ; table . make_response = (gd_api . godot_method_bind_get_method) (class_name , "make_response\0" . as_ptr () as * const c_char) ; table . make_response_error = (gd_api . godot_method_bind_get_method) (class_name , "make_response_error\0" . as_ptr () as * const c_char) ; table . process_action = (gd_api . godot_method_bind_get_method) (class_name , "process_action\0" . as_ptr () as * const c_char) ; table . process_string = (gd_api . godot_method_bind_get_method) (class_name , "process_string\0" . as_ptr () as * const c_char) ; table . set_scope = (gd_api . godot_method_bind_get_method) (class_name , "set_scope\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::jsonrpc::private::JSONRPC;
            
            pub(crate) mod java_class {
                # ! [doc = "This module contains types related to the API class [`JavaClass`][super::JavaClass]."] pub (crate) mod private { # [doc = "`core class JavaClass` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_javaclass.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nJavaClass inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct JavaClass { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: JavaClass ; impl JavaClass { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = JavaClassMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for JavaClass { } unsafe impl GodotObject for JavaClass { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "JavaClass" } } impl std :: ops :: Deref for JavaClass { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JavaClass { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for JavaClass { } unsafe impl SubClass < crate :: generated :: Object > for JavaClass { } impl Instanciable for JavaClass { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { JavaClass :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct JavaClassMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl JavaClassMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : JavaClassMethodTable = JavaClassMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { JavaClassMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "JavaClass\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::java_class::private::JavaClass;
            
            pub(crate) mod java_class_wrapper {
                # ! [doc = "This module contains types related to the API class [`JavaClassWrapper`][super::JavaClassWrapper]."] pub (crate) mod private { # [doc = "`core singleton class JavaClassWrapper` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_javaclasswrapper.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nJavaClassWrapper inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct JavaClassWrapper { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: JavaClassWrapper ; impl JavaClassWrapper { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("JavaClassWrapper\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = ""] # [doc = ""] # [inline] pub fn wrap (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: JavaClass , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = JavaClassWrapperMethodTable :: get (get_api ()) . wrap ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Option < Ref < crate :: generated :: JavaClass , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for JavaClassWrapper { } unsafe impl GodotObject for JavaClassWrapper { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "JavaClassWrapper" } } impl std :: ops :: Deref for JavaClassWrapper { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JavaClassWrapper { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for JavaClassWrapper { } unsafe impl Send for JavaClassWrapper { } unsafe impl Sync for JavaClassWrapper { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct JavaClassWrapperMethodTable { pub class_constructor : sys :: godot_class_constructor , pub wrap : * mut sys :: godot_method_bind } impl JavaClassWrapperMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : JavaClassWrapperMethodTable = JavaClassWrapperMethodTable { class_constructor : None , wrap : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { JavaClassWrapperMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "JavaClassWrapper\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . wrap = (gd_api . godot_method_bind_get_method) (class_name , "wrap\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::java_class_wrapper::private::JavaClassWrapper;
            
            pub(crate) mod java_script {
                # ! [doc = "This module contains types related to the API class [`JavaScript`][super::JavaScript]."] pub (crate) mod private { # [doc = "`core singleton class JavaScript` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_javascript.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nJavaScript inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct JavaScript { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: JavaScript ; impl JavaScript { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("JavaScript\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Creates a reference to a script function that can be used as a callback by JavaScript. The reference must be kept until the callback happens, or it won't be called at all. See [`JavaScriptObject`][JavaScriptObject] for usage."] # [doc = ""] # [inline] pub fn create_callback (& self , object : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString >) -> Option < Ref < crate :: generated :: JavaScriptObject , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = JavaScriptMethodTable :: get (get_api ()) . create_callback ; let ret = crate :: icalls :: icallvar__obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , method . into ()) ; < Option < Ref < crate :: generated :: JavaScriptObject , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a new JavaScript object using the `new` constructor. The `object` must a valid property of the JavaScript `window`. See [`JavaScriptObject`][JavaScriptObject] for usage."] # [doc = ""] # [inline] pub fn create_object (& self , object : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = JavaScriptMethodTable :: get (get_api ()) . create_object ; let ret = crate :: icalls :: icallvarargs__str (method_bind , self . this . sys () . as_ptr () , object . into () , varargs) ; ret } } # [doc = "Prompts the user to download a file containing the specified `buffer`. The file will have the given `name` and `mime` type.\n**Note:** The browser may override the [MIME type](https://en.wikipedia.org/wiki/Media_type) provided based on the file `name`'s extension.\n**Note:** Browsers might block the download if [`download_buffer`][Self::download_buffer] is not being called from a user interaction (e.g. button click).\n**Note:** Browsers might ask the user for permission or block the download if multiple download requests are made in a quick succession.\n# Default Arguments\n* `mime` - `\"application/octet-stream\"`"] # [doc = ""] # [inline] pub fn download_buffer (& self , buffer : PoolArray < u8 > , name : impl Into < GodotString > , mime : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JavaScriptMethodTable :: get (get_api ()) . download_buffer ; let ret = crate :: icalls :: icallvar__bytearr_str_str (method_bind , self . this . sys () . as_ptr () , buffer , name . into () , mime . into ()) ; } } # [doc = "Execute the string `code` as JavaScript code within the browser window. This is a call to the actual global JavaScript function `eval()`.\nIf `use_global_execution_context` is `true`, the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment.\n# Default Arguments\n* `use_global_execution_context` - `false`"] # [doc = ""] # [inline] pub fn eval (& self , code : impl Into < GodotString > , use_global_execution_context : bool) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = JavaScriptMethodTable :: get (get_api ()) . eval ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , code . into () , use_global_execution_context as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an interface to a JavaScript object that can be used by scripts. The `interface` must be a valid property of the JavaScript `window`. The callback must accept a single [`Array`][VariantArray] argument, which will contain the JavaScript `arguments`. See [`JavaScriptObject`][JavaScriptObject] for usage."] # [doc = ""] # [inline] pub fn get_interface (& self , interface : impl Into < GodotString >) -> Option < Ref < crate :: generated :: JavaScriptObject , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = JavaScriptMethodTable :: get (get_api ()) . get_interface ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , interface . into ()) ; < Option < Ref < crate :: generated :: JavaScriptObject , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if a new version of the progressive web app is waiting to be activated.\n**Note:** Only relevant when exported as a Progressive Web App."] # [doc = ""] # [inline] pub fn pwa_needs_update (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = JavaScriptMethodTable :: get (get_api ()) . pwa_needs_update ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Performs the live update of the progressive web app. Forcing the new version to be installed and the page to be reloaded.\n**Note:** Your application will be **reloaded in all browser tabs**.\n**Note:** Only relevant when exported as a Progressive Web App and [`pwa_needs_update`][Self::pwa_needs_update] returns `true`."] # [doc = ""] # [inline] pub fn pwa_update (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = JavaScriptMethodTable :: get (get_api ()) . pwa_update ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } } impl gdnative_core :: private :: godot_object :: Sealed for JavaScript { } unsafe impl GodotObject for JavaScript { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "JavaScript" } } impl std :: ops :: Deref for JavaScript { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JavaScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for JavaScript { } unsafe impl Send for JavaScript { } unsafe impl Sync for JavaScript { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct JavaScriptMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create_callback : * mut sys :: godot_method_bind , pub create_object : * mut sys :: godot_method_bind , pub download_buffer : * mut sys :: godot_method_bind , pub eval : * mut sys :: godot_method_bind , pub get_interface : * mut sys :: godot_method_bind , pub pwa_needs_update : * mut sys :: godot_method_bind , pub pwa_update : * mut sys :: godot_method_bind } impl JavaScriptMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : JavaScriptMethodTable = JavaScriptMethodTable { class_constructor : None , create_callback : 0 as * mut sys :: godot_method_bind , create_object : 0 as * mut sys :: godot_method_bind , download_buffer : 0 as * mut sys :: godot_method_bind , eval : 0 as * mut sys :: godot_method_bind , get_interface : 0 as * mut sys :: godot_method_bind , pwa_needs_update : 0 as * mut sys :: godot_method_bind , pwa_update : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { JavaScriptMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "JavaScript\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create_callback = (gd_api . godot_method_bind_get_method) (class_name , "create_callback\0" . as_ptr () as * const c_char) ; table . create_object = (gd_api . godot_method_bind_get_method) (class_name , "create_object\0" . as_ptr () as * const c_char) ; table . download_buffer = (gd_api . godot_method_bind_get_method) (class_name , "download_buffer\0" . as_ptr () as * const c_char) ; table . eval = (gd_api . godot_method_bind_get_method) (class_name , "eval\0" . as_ptr () as * const c_char) ; table . get_interface = (gd_api . godot_method_bind_get_method) (class_name , "get_interface\0" . as_ptr () as * const c_char) ; table . pwa_needs_update = (gd_api . godot_method_bind_get_method) (class_name , "pwa_needs_update\0" . as_ptr () as * const c_char) ; table . pwa_update = (gd_api . godot_method_bind_get_method) (class_name , "pwa_update\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::java_script::private::JavaScript;
            
            pub(crate) mod java_script_object {
                # ! [doc = "This module contains types related to the API class [`JavaScriptObject`][super::JavaScriptObject]."] pub (crate) mod private { # [doc = "`core class JavaScriptObject` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_javascriptobject.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nJavaScriptObject inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct JavaScriptObject { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: JavaScriptObject ; impl JavaScriptObject { } impl gdnative_core :: private :: godot_object :: Sealed for JavaScriptObject { } unsafe impl GodotObject for JavaScriptObject { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "JavaScriptObject" } } impl std :: ops :: Deref for JavaScriptObject { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JavaScriptObject { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for JavaScriptObject { } unsafe impl SubClass < crate :: generated :: Object > for JavaScriptObject { }
                use super::*;
            }
            pub use crate::generated::java_script_object::private::JavaScriptObject;
            
            pub(crate) mod joint {
                # ! [doc = "This module contains types related to the API class [`Joint`][super::Joint]."] pub (crate) mod private { # [doc = "`core class Joint` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_joint.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nJoint inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Joint { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Joint ; impl Joint { # [doc = "If `true`, the two bodies of the nodes are not able to collide with each other."] # [doc = ""] # [inline] pub fn exclude_nodes_from_collision (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . get_exclude_nodes_from_collision ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The node attached to the first side (A) of the joint."] # [doc = ""] # [inline] pub fn node_a (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . get_node_a ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The node attached to the second side (B) of the joint."] # [doc = ""] # [inline] pub fn node_b (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . get_node_b ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority."] # [doc = ""] # [inline] pub fn solver_priority (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . get_solver_priority ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the two bodies of the nodes are not able to collide with each other."] # [doc = ""] # [inline] pub fn set_exclude_nodes_from_collision (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . set_exclude_nodes_from_collision ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The node attached to the first side (A) of the joint."] # [doc = ""] # [inline] pub fn set_node_a (& self , node : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . set_node_a ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , node . into ()) ; } } # [doc = "The node attached to the second side (B) of the joint."] # [doc = ""] # [inline] pub fn set_node_b (& self , node : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . set_node_b ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , node . into ()) ; } } # [doc = "The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority."] # [doc = ""] # [inline] pub fn set_solver_priority (& self , priority : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = JointMethodTable :: get (get_api ()) . set_solver_priority ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , priority as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Joint { } unsafe impl GodotObject for Joint { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Joint" } } impl QueueFree for Joint { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Joint { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Joint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for Joint { } unsafe impl SubClass < crate :: generated :: Node > for Joint { } unsafe impl SubClass < crate :: generated :: Object > for Joint { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct JointMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_exclude_nodes_from_collision : * mut sys :: godot_method_bind , pub get_node_a : * mut sys :: godot_method_bind , pub get_node_b : * mut sys :: godot_method_bind , pub get_solver_priority : * mut sys :: godot_method_bind , pub set_exclude_nodes_from_collision : * mut sys :: godot_method_bind , pub set_node_a : * mut sys :: godot_method_bind , pub set_node_b : * mut sys :: godot_method_bind , pub set_solver_priority : * mut sys :: godot_method_bind } impl JointMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : JointMethodTable = JointMethodTable { class_constructor : None , get_exclude_nodes_from_collision : 0 as * mut sys :: godot_method_bind , get_node_a : 0 as * mut sys :: godot_method_bind , get_node_b : 0 as * mut sys :: godot_method_bind , get_solver_priority : 0 as * mut sys :: godot_method_bind , set_exclude_nodes_from_collision : 0 as * mut sys :: godot_method_bind , set_node_a : 0 as * mut sys :: godot_method_bind , set_node_b : 0 as * mut sys :: godot_method_bind , set_solver_priority : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { JointMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Joint\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_exclude_nodes_from_collision = (gd_api . godot_method_bind_get_method) (class_name , "get_exclude_nodes_from_collision\0" . as_ptr () as * const c_char) ; table . get_node_a = (gd_api . godot_method_bind_get_method) (class_name , "get_node_a\0" . as_ptr () as * const c_char) ; table . get_node_b = (gd_api . godot_method_bind_get_method) (class_name , "get_node_b\0" . as_ptr () as * const c_char) ; table . get_solver_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_solver_priority\0" . as_ptr () as * const c_char) ; table . set_exclude_nodes_from_collision = (gd_api . godot_method_bind_get_method) (class_name , "set_exclude_nodes_from_collision\0" . as_ptr () as * const c_char) ; table . set_node_a = (gd_api . godot_method_bind_get_method) (class_name , "set_node_a\0" . as_ptr () as * const c_char) ; table . set_node_b = (gd_api . godot_method_bind_get_method) (class_name , "set_node_b\0" . as_ptr () as * const c_char) ; table . set_solver_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_solver_priority\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::joint::private::Joint;
            
            pub(crate) mod joint_2d {
                # ! [doc = "This module contains types related to the API class [`Joint2D`][super::Joint2D]."] pub (crate) mod private { # [doc = "`core class Joint2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_joint2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nJoint2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Joint2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Joint2D ; impl Joint2D { # [doc = "When [`node_a`][Self::node_a] and [`node_b`][Self::node_b] move in different directions the `bias` controls how fast the joint pulls them back to their original position. The lower the `bias` the more the two bodies can pull on the joint."] # [doc = ""] # [inline] pub fn bias (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . get_bias ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, [`node_a`][Self::node_a] and [`node_b`][Self::node_b] can not collide."] # [doc = ""] # [inline] pub fn exclude_nodes_from_collision (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . get_exclude_nodes_from_collision ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The first body attached to the joint. Must derive from [`PhysicsBody2D`][PhysicsBody2D]."] # [doc = ""] # [inline] pub fn node_a (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . get_node_a ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The second body attached to the joint. Must derive from [`PhysicsBody2D`][PhysicsBody2D]."] # [doc = ""] # [inline] pub fn node_b (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . get_node_b ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "When [`node_a`][Self::node_a] and [`node_b`][Self::node_b] move in different directions the `bias` controls how fast the joint pulls them back to their original position. The lower the `bias` the more the two bodies can pull on the joint."] # [doc = ""] # [inline] pub fn set_bias (& self , bias : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . set_bias ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , bias as _) ; } } # [doc = "If `true`, [`node_a`][Self::node_a] and [`node_b`][Self::node_b] can not collide."] # [doc = ""] # [inline] pub fn set_exclude_nodes_from_collision (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . set_exclude_nodes_from_collision ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The first body attached to the joint. Must derive from [`PhysicsBody2D`][PhysicsBody2D]."] # [doc = ""] # [inline] pub fn set_node_a (& self , node : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . set_node_a ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , node . into ()) ; } } # [doc = "The second body attached to the joint. Must derive from [`PhysicsBody2D`][PhysicsBody2D]."] # [doc = ""] # [inline] pub fn set_node_b (& self , node : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Joint2DMethodTable :: get (get_api ()) . set_node_b ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , node . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Joint2D { } unsafe impl GodotObject for Joint2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Joint2D" } } impl QueueFree for Joint2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Joint2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Joint2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for Joint2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Joint2D { } unsafe impl SubClass < crate :: generated :: Node > for Joint2D { } unsafe impl SubClass < crate :: generated :: Object > for Joint2D { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Joint2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bias : * mut sys :: godot_method_bind , pub get_exclude_nodes_from_collision : * mut sys :: godot_method_bind , pub get_node_a : * mut sys :: godot_method_bind , pub get_node_b : * mut sys :: godot_method_bind , pub set_bias : * mut sys :: godot_method_bind , pub set_exclude_nodes_from_collision : * mut sys :: godot_method_bind , pub set_node_a : * mut sys :: godot_method_bind , pub set_node_b : * mut sys :: godot_method_bind } impl Joint2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Joint2DMethodTable = Joint2DMethodTable { class_constructor : None , get_bias : 0 as * mut sys :: godot_method_bind , get_exclude_nodes_from_collision : 0 as * mut sys :: godot_method_bind , get_node_a : 0 as * mut sys :: godot_method_bind , get_node_b : 0 as * mut sys :: godot_method_bind , set_bias : 0 as * mut sys :: godot_method_bind , set_exclude_nodes_from_collision : 0 as * mut sys :: godot_method_bind , set_node_a : 0 as * mut sys :: godot_method_bind , set_node_b : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Joint2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Joint2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_bias\0" . as_ptr () as * const c_char) ; table . get_exclude_nodes_from_collision = (gd_api . godot_method_bind_get_method) (class_name , "get_exclude_nodes_from_collision\0" . as_ptr () as * const c_char) ; table . get_node_a = (gd_api . godot_method_bind_get_method) (class_name , "get_node_a\0" . as_ptr () as * const c_char) ; table . get_node_b = (gd_api . godot_method_bind_get_method) (class_name , "get_node_b\0" . as_ptr () as * const c_char) ; table . set_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_bias\0" . as_ptr () as * const c_char) ; table . set_exclude_nodes_from_collision = (gd_api . godot_method_bind_get_method) (class_name , "set_exclude_nodes_from_collision\0" . as_ptr () as * const c_char) ; table . set_node_a = (gd_api . godot_method_bind_get_method) (class_name , "set_node_a\0" . as_ptr () as * const c_char) ; table . set_node_b = (gd_api . godot_method_bind_get_method) (class_name , "set_node_b\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::joint_2d::private::Joint2D;
            
            pub mod kinematic_body {
                # ! [doc = "This module contains types related to the API class [`KinematicBody`][super::KinematicBody]."] pub (crate) mod private { # [doc = "`core class KinematicBody` inherits `PhysicsBody` (manually managed).\n\nThis class has related types in the [`kinematic_body`][super::kinematic_body] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_kinematicbody.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`KinematicBody` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<KinematicBody>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nKinematicBody inherits methods from:\n - [PhysicsBody](struct.PhysicsBody.html)\n - [CollisionObject](struct.CollisionObject.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct KinematicBody { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: KinematicBody ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MovingPlatformApplyVelocityOnLeave (pub i64) ; impl MovingPlatformApplyVelocityOnLeave { pub const ALWAYS : MovingPlatformApplyVelocityOnLeave = MovingPlatformApplyVelocityOnLeave (0i64) ; pub const UPWARD_ONLY : MovingPlatformApplyVelocityOnLeave = MovingPlatformApplyVelocityOnLeave (1i64) ; pub const NEVER : MovingPlatformApplyVelocityOnLeave = MovingPlatformApplyVelocityOnLeave (2i64) ; } impl From < i64 > for MovingPlatformApplyVelocityOnLeave { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MovingPlatformApplyVelocityOnLeave > for i64 { # [inline] fn from (v : MovingPlatformApplyVelocityOnLeave) -> Self { v . 0 } } impl FromVariant for MovingPlatformApplyVelocityOnLeave { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl KinematicBody { pub const PLATFORM_VEL_ON_LEAVE_ALWAYS : i64 = 0i64 ; pub const PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY : i64 = 1i64 ; pub const PLATFORM_VEL_ON_LEAVE_NEVER : i64 = 2i64 ; } impl KinematicBody { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = KinematicBodyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns `true` if the specified `axis` is locked. See also [`move_lock_x`][Self::move_lock_x], [`move_lock_y`][Self::move_lock_y] and [`move_lock_z`][Self::move_lock_z]."] # [doc = ""] # [inline] pub fn axis_lock (& self , axis : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_axis_lock ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , axis as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the floor's collision angle at the last collision point according to `up_direction`, which is `Vector3.UP` by default. This value is always positive and only valid after calling [`move_and_slide`][Self::move_and_slide] and when [`is_on_floor`][Self::is_on_floor] returns `true`.\n# Default Arguments\n* `up_direction` - `Vector3( 0, 1, 0 )`"] # [doc = ""] # [inline] pub fn get_floor_angle (& self , up_direction : Vector3) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_floor_angle ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , up_direction) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the surface normal of the floor at the last collision point. Only valid after calling [`move_and_slide`][Self::move_and_slide] or [`move_and_slide_with_snap`][Self::move_and_slide_with_snap] and when [`is_on_floor`][Self::is_on_floor] returns `true`."] # [doc = ""] # [inline] pub fn get_floor_normal (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_floor_normal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the linear velocity of the floor at the last collision point. Only valid after calling [`move_and_slide`][Self::move_and_slide] or [`move_and_slide_with_snap`][Self::move_and_slide_with_snap] and when [`is_on_floor`][Self::is_on_floor] returns `true`."] # [doc = ""] # [inline] pub fn get_floor_velocity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_floor_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [`KinematicCollision`][KinematicCollision], which contains information about the latest collision that occurred during the last call to [`move_and_slide`][Self::move_and_slide]."] # [doc = ""] # [inline] pub fn get_last_slide_collision (& self) -> Option < Ref < crate :: generated :: KinematicCollision , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_last_slide_collision ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: KinematicCollision , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [`MovingPlatformApplyVelocityOnLeave`][MovingPlatformApplyVelocityOnLeave] constants for available behavior."] # [doc = ""] # [inline] pub fn moving_platform_apply_velocity_on_leave (& self) -> crate :: generated :: kinematic_body :: MovingPlatformApplyVelocityOnLeave { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_moving_platform_apply_velocity_on_leave ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: kinematic_body :: MovingPlatformApplyVelocityOnLeave > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Extra margin used for collision recovery in motion functions (see [`move_and_collide`][Self::move_and_collide], [`move_and_slide`][Self::move_and_slide], [`move_and_slide_with_snap`][Self::move_and_slide_with_snap]).\nIf the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.\nA higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.\nA lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of kinematic bodies."] # [doc = ""] # [inline] pub fn safe_margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_safe_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a [`KinematicCollision`][KinematicCollision], which contains information about a collision that occurred during the last call to [`move_and_slide`][Self::move_and_slide] or [`move_and_slide_with_snap`][Self::move_and_slide_with_snap]. Since the body can collide several times in a single call to [`move_and_slide`][Self::move_and_slide], you must specify the index of the collision in the range 0 to ([`get_slide_count`][Self::get_slide_count] - 1)."] # [doc = ""] # [inline] pub fn get_slide_collision (& self , slide_idx : i64) -> Option < Ref < crate :: generated :: KinematicCollision , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_slide_collision ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , slide_idx as _) ; < Option < Ref < crate :: generated :: KinematicCollision , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of times the body collided and changed direction during the last call to [`move_and_slide`][Self::move_and_slide] or [`move_and_slide_with_snap`][Self::move_and_slide_with_snap]."] # [doc = ""] # [inline] pub fn get_slide_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_slide_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the body collided with the ceiling on the last call of [`move_and_slide`][Self::move_and_slide] or [`move_and_slide_with_snap`][Self::move_and_slide_with_snap]. Otherwise, returns `false`."] # [doc = ""] # [inline] pub fn is_on_ceiling (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . is_on_ceiling ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the body collided with the floor on the last call of [`move_and_slide`][Self::move_and_slide] or [`move_and_slide_with_snap`][Self::move_and_slide_with_snap]. Otherwise, returns `false`."] # [doc = ""] # [inline] pub fn is_on_floor (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . is_on_floor ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the body collided with a wall on the last call of [`move_and_slide`][Self::move_and_slide] or [`move_and_slide_with_snap`][Self::move_and_slide_with_snap]. Otherwise, returns `false`."] # [doc = ""] # [inline] pub fn is_on_wall (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . is_on_wall ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [`AnimationPlayer`][AnimationPlayer], for example on moving platforms. Do **not** use together with [`move_and_slide`][Self::move_and_slide] or [`move_and_collide`][Self::move_and_collide] functions."] # [doc = ""] # [inline] pub fn is_sync_to_physics_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . is_sync_to_physics_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Moves the body along the vector `rel_vec`. The body will stop if it collides. Returns a [`KinematicCollision`][KinematicCollision], which contains information about the collision when stopped, or when touching another body along the motion.\nIf `test_only` is `true`, the body does not move but the would-be collision information is given.\n# Default Arguments\n* `infinite_inertia` - `true`\n* `exclude_raycast_shapes` - `true`\n* `test_only` - `false`"] # [doc = ""] # [inline] pub fn move_and_collide (& self , rel_vec : Vector3 , infinite_inertia : bool , exclude_raycast_shapes : bool , test_only : bool) -> Option < Ref < crate :: generated :: KinematicCollision , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . move_and_collide ; let ret = crate :: icalls :: icallvar__vec3_bool_bool_bool (method_bind , self . this . sys () . as_ptr () , rel_vec , infinite_inertia as _ , exclude_raycast_shapes as _ , test_only as _) ; < Option < Ref < crate :: generated :: KinematicCollision , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [`KinematicBody`][KinematicBody] or [`RigidBody`][RigidBody], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.\nThis method should be used in [`Node._physics_process`][Node::_physics_process] (or in a method called by [`Node._physics_process`][Node::_physics_process]), as it uses the physics step's `delta` value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.\n`linear_velocity` is the velocity vector (typically meters per second). Unlike in [`move_and_collide`][Self::move_and_collide], you should _not_ multiply it by `delta` — the physics engine handles applying the velocity.\n`up_direction` is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of `Vector3(0, 0, 0)`, everything is considered a wall.\nIf `stop_on_slope` is `true`, body will not slide on slopes when you include gravity in `linear_velocity` and the body is standing still.\nIf the body collides, it will change direction a maximum of `max_slides` times before it stops.\n`floor_max_angle` is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.\nIf `infinite_inertia` is `true`, body will be able to push [`RigidBody`][RigidBody] nodes, but it won't also detect any collisions with them. If `false`, it will interact with [`RigidBody`][RigidBody] nodes like with [`StaticBody`][StaticBody].\nReturns the `linear_velocity` vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [`get_slide_collision`][Self::get_slide_collision].\nWhen the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions.\n# Default Arguments\n* `up_direction` - `Vector3( 0, 0, 0 )`\n* `stop_on_slope` - `false`\n* `max_slides` - `4`\n* `floor_max_angle` - `0.785398`\n* `infinite_inertia` - `true`"] # [doc = ""] # [inline] pub fn move_and_slide (& self , linear_velocity : Vector3 , up_direction : Vector3 , stop_on_slope : bool , max_slides : i64 , floor_max_angle : f64 , infinite_inertia : bool) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . move_and_slide ; let ret = crate :: icalls :: icallvar__vec3_vec3_bool_i64_f64_bool (method_bind , self . this . sys () . as_ptr () , linear_velocity , up_direction , stop_on_slope as _ , max_slides as _ , floor_max_angle as _ , infinite_inertia as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Moves the body while keeping it attached to slopes. Similar to [`move_and_slide`][Self::move_and_slide].\nAs long as the `snap` vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting `snap` to `(0, 0, 0)` or by using [`move_and_slide`][Self::move_and_slide] instead.\n# Default Arguments\n* `up_direction` - `Vector3( 0, 0, 0 )`\n* `stop_on_slope` - `false`\n* `max_slides` - `4`\n* `floor_max_angle` - `0.785398`\n* `infinite_inertia` - `true`"] # [doc = ""] # [inline] pub fn move_and_slide_with_snap (& self , linear_velocity : Vector3 , snap : Vector3 , up_direction : Vector3 , stop_on_slope : bool , max_slides : i64 , floor_max_angle : f64 , infinite_inertia : bool) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . move_and_slide_with_snap ; let ret = crate :: icalls :: icallvar__vec3_vec3_vec3_bool_i64_f64_bool (method_bind , self . this . sys () . as_ptr () , linear_velocity , snap , up_direction , stop_on_slope as _ , max_slides as _ , floor_max_angle as _ , infinite_inertia as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Locks or unlocks the specified `axis` depending on the value of `lock`. See also [`move_lock_x`][Self::move_lock_x], [`move_lock_y`][Self::move_lock_y] and [`move_lock_z`][Self::move_lock_z]."] # [doc = ""] # [inline] pub fn set_axis_lock (& self , axis : i64 , lock : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . set_axis_lock ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , axis as _ , lock as _) ; } } # [doc = "Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [`MovingPlatformApplyVelocityOnLeave`][MovingPlatformApplyVelocityOnLeave] constants for available behavior."] # [doc = ""] # [inline] pub fn set_moving_platform_apply_velocity_on_leave (& self , on_leave_apply_velocity : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . set_moving_platform_apply_velocity_on_leave ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , on_leave_apply_velocity as _) ; } } # [doc = "Extra margin used for collision recovery in motion functions (see [`move_and_collide`][Self::move_and_collide], [`move_and_slide`][Self::move_and_slide], [`move_and_slide_with_snap`][Self::move_and_slide_with_snap]).\nIf the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.\nA higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.\nA lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of kinematic bodies."] # [doc = ""] # [inline] pub fn set_safe_margin (& self , pixels : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . set_safe_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , pixels as _) ; } } # [doc = "If `true`, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [`AnimationPlayer`][AnimationPlayer], for example on moving platforms. Do **not** use together with [`move_and_slide`][Self::move_and_slide] or [`move_and_collide`][Self::move_and_collide] functions."] # [doc = ""] # [inline] pub fn set_sync_to_physics (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . set_sync_to_physics ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [`Transform`][Transform], then tries to move the body along the vector `rel_vec`. Returns `true` if a collision would stop the body from moving along the whole path.\nUse [`move_and_collide`][Self::move_and_collide] instead for detecting collision with touching bodies.\n# Default Arguments\n* `infinite_inertia` - `true`"] # [doc = ""] # [inline] pub fn test_move (& self , from : Transform , rel_vec : Vector3 , infinite_inertia : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . test_move ; let ret = crate :: icalls :: icallvar__trans_vec3_bool (method_bind , self . this . sys () . as_ptr () , from , rel_vec , infinite_inertia as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Lock the body's X axis movement."] # [doc = ""] # [inline] pub fn axis_lock_motion_x (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_axis_lock ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Lock the body's X axis movement."] # [doc = ""] # [inline] pub fn set_axis_lock_motion_x (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . set_axis_lock ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Lock the body's Y axis movement."] # [doc = ""] # [inline] pub fn axis_lock_motion_y (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_axis_lock ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Lock the body's Y axis movement."] # [doc = ""] # [inline] pub fn set_axis_lock_motion_y (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . set_axis_lock ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Lock the body's Z axis movement."] # [doc = ""] # [inline] pub fn axis_lock_motion_z (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_axis_lock ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Lock the body's Z axis movement."] # [doc = ""] # [inline] pub fn set_axis_lock_motion_z (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . set_axis_lock ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 4i64 , value as _) ; } } # [doc = "Lock the body's X axis movement. Deprecated alias for [`axis_lock_motion_x`][Self::axis_lock_motion_x]."] # [doc = ""] # [inline] pub fn move_lock_x (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_axis_lock ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Lock the body's X axis movement. Deprecated alias for [`axis_lock_motion_x`][Self::axis_lock_motion_x]."] # [doc = ""] # [inline] pub fn set_move_lock_x (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . set_axis_lock ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Lock the body's Y axis movement. Deprecated alias for [`axis_lock_motion_y`][Self::axis_lock_motion_y]."] # [doc = ""] # [inline] pub fn move_lock_y (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_axis_lock ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Lock the body's Y axis movement. Deprecated alias for [`axis_lock_motion_y`][Self::axis_lock_motion_y]."] # [doc = ""] # [inline] pub fn set_move_lock_y (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . set_axis_lock ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Lock the body's Z axis movement. Deprecated alias for [`axis_lock_motion_z`][Self::axis_lock_motion_z]."] # [doc = ""] # [inline] pub fn move_lock_z (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . get_axis_lock ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Lock the body's Z axis movement. Deprecated alias for [`axis_lock_motion_z`][Self::axis_lock_motion_z]."] # [doc = ""] # [inline] pub fn set_move_lock_z (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBodyMethodTable :: get (get_api ()) . set_axis_lock ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 4i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for KinematicBody { } unsafe impl GodotObject for KinematicBody { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "KinematicBody" } } impl QueueFree for KinematicBody { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for KinematicBody { type Target = crate :: generated :: PhysicsBody ; # [inline] fn deref (& self) -> & crate :: generated :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for KinematicBody { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PhysicsBody > for KinematicBody { } unsafe impl SubClass < crate :: generated :: CollisionObject > for KinematicBody { } unsafe impl SubClass < crate :: generated :: Spatial > for KinematicBody { } unsafe impl SubClass < crate :: generated :: Node > for KinematicBody { } unsafe impl SubClass < crate :: generated :: Object > for KinematicBody { } impl Instanciable for KinematicBody { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { KinematicBody :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct KinematicBodyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_axis_lock : * mut sys :: godot_method_bind , pub get_floor_angle : * mut sys :: godot_method_bind , pub get_floor_normal : * mut sys :: godot_method_bind , pub get_floor_velocity : * mut sys :: godot_method_bind , pub get_last_slide_collision : * mut sys :: godot_method_bind , pub get_moving_platform_apply_velocity_on_leave : * mut sys :: godot_method_bind , pub get_safe_margin : * mut sys :: godot_method_bind , pub get_slide_collision : * mut sys :: godot_method_bind , pub get_slide_count : * mut sys :: godot_method_bind , pub is_on_ceiling : * mut sys :: godot_method_bind , pub is_on_floor : * mut sys :: godot_method_bind , pub is_on_wall : * mut sys :: godot_method_bind , pub is_sync_to_physics_enabled : * mut sys :: godot_method_bind , pub move_and_collide : * mut sys :: godot_method_bind , pub move_and_slide : * mut sys :: godot_method_bind , pub move_and_slide_with_snap : * mut sys :: godot_method_bind , pub set_axis_lock : * mut sys :: godot_method_bind , pub set_moving_platform_apply_velocity_on_leave : * mut sys :: godot_method_bind , pub set_safe_margin : * mut sys :: godot_method_bind , pub set_sync_to_physics : * mut sys :: godot_method_bind , pub test_move : * mut sys :: godot_method_bind } impl KinematicBodyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : KinematicBodyMethodTable = KinematicBodyMethodTable { class_constructor : None , get_axis_lock : 0 as * mut sys :: godot_method_bind , get_floor_angle : 0 as * mut sys :: godot_method_bind , get_floor_normal : 0 as * mut sys :: godot_method_bind , get_floor_velocity : 0 as * mut sys :: godot_method_bind , get_last_slide_collision : 0 as * mut sys :: godot_method_bind , get_moving_platform_apply_velocity_on_leave : 0 as * mut sys :: godot_method_bind , get_safe_margin : 0 as * mut sys :: godot_method_bind , get_slide_collision : 0 as * mut sys :: godot_method_bind , get_slide_count : 0 as * mut sys :: godot_method_bind , is_on_ceiling : 0 as * mut sys :: godot_method_bind , is_on_floor : 0 as * mut sys :: godot_method_bind , is_on_wall : 0 as * mut sys :: godot_method_bind , is_sync_to_physics_enabled : 0 as * mut sys :: godot_method_bind , move_and_collide : 0 as * mut sys :: godot_method_bind , move_and_slide : 0 as * mut sys :: godot_method_bind , move_and_slide_with_snap : 0 as * mut sys :: godot_method_bind , set_axis_lock : 0 as * mut sys :: godot_method_bind , set_moving_platform_apply_velocity_on_leave : 0 as * mut sys :: godot_method_bind , set_safe_margin : 0 as * mut sys :: godot_method_bind , set_sync_to_physics : 0 as * mut sys :: godot_method_bind , test_move : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { KinematicBodyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "KinematicBody\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_axis_lock = (gd_api . godot_method_bind_get_method) (class_name , "get_axis_lock\0" . as_ptr () as * const c_char) ; table . get_floor_angle = (gd_api . godot_method_bind_get_method) (class_name , "get_floor_angle\0" . as_ptr () as * const c_char) ; table . get_floor_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_floor_normal\0" . as_ptr () as * const c_char) ; table . get_floor_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_floor_velocity\0" . as_ptr () as * const c_char) ; table . get_last_slide_collision = (gd_api . godot_method_bind_get_method) (class_name , "get_last_slide_collision\0" . as_ptr () as * const c_char) ; table . get_moving_platform_apply_velocity_on_leave = (gd_api . godot_method_bind_get_method) (class_name , "get_moving_platform_apply_velocity_on_leave\0" . as_ptr () as * const c_char) ; table . get_safe_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_safe_margin\0" . as_ptr () as * const c_char) ; table . get_slide_collision = (gd_api . godot_method_bind_get_method) (class_name , "get_slide_collision\0" . as_ptr () as * const c_char) ; table . get_slide_count = (gd_api . godot_method_bind_get_method) (class_name , "get_slide_count\0" . as_ptr () as * const c_char) ; table . is_on_ceiling = (gd_api . godot_method_bind_get_method) (class_name , "is_on_ceiling\0" . as_ptr () as * const c_char) ; table . is_on_floor = (gd_api . godot_method_bind_get_method) (class_name , "is_on_floor\0" . as_ptr () as * const c_char) ; table . is_on_wall = (gd_api . godot_method_bind_get_method) (class_name , "is_on_wall\0" . as_ptr () as * const c_char) ; table . is_sync_to_physics_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_sync_to_physics_enabled\0" . as_ptr () as * const c_char) ; table . move_and_collide = (gd_api . godot_method_bind_get_method) (class_name , "move_and_collide\0" . as_ptr () as * const c_char) ; table . move_and_slide = (gd_api . godot_method_bind_get_method) (class_name , "move_and_slide\0" . as_ptr () as * const c_char) ; table . move_and_slide_with_snap = (gd_api . godot_method_bind_get_method) (class_name , "move_and_slide_with_snap\0" . as_ptr () as * const c_char) ; table . set_axis_lock = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_lock\0" . as_ptr () as * const c_char) ; table . set_moving_platform_apply_velocity_on_leave = (gd_api . godot_method_bind_get_method) (class_name , "set_moving_platform_apply_velocity_on_leave\0" . as_ptr () as * const c_char) ; table . set_safe_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_safe_margin\0" . as_ptr () as * const c_char) ; table . set_sync_to_physics = (gd_api . godot_method_bind_get_method) (class_name , "set_sync_to_physics\0" . as_ptr () as * const c_char) ; table . test_move = (gd_api . godot_method_bind_get_method) (class_name , "test_move\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::kinematic_body::private::KinematicBody;
            
            pub mod kinematic_body_2d {
                # ! [doc = "This module contains types related to the API class [`KinematicBody2D`][super::KinematicBody2D]."] pub (crate) mod private { # [doc = "`core class KinematicBody2D` inherits `PhysicsBody2D` (manually managed).\n\nThis class has related types in the [`kinematic_body_2d`][super::kinematic_body_2d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_kinematicbody2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`KinematicBody2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<KinematicBody2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nKinematicBody2D inherits methods from:\n - [PhysicsBody2D](struct.PhysicsBody2D.html)\n - [CollisionObject2D](struct.CollisionObject2D.html)\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct KinematicBody2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: KinematicBody2D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MovingPlatformApplyVelocityOnLeave (pub i64) ; impl MovingPlatformApplyVelocityOnLeave { pub const ALWAYS : MovingPlatformApplyVelocityOnLeave = MovingPlatformApplyVelocityOnLeave (0i64) ; pub const UPWARD_ONLY : MovingPlatformApplyVelocityOnLeave = MovingPlatformApplyVelocityOnLeave (1i64) ; pub const NEVER : MovingPlatformApplyVelocityOnLeave = MovingPlatformApplyVelocityOnLeave (2i64) ; } impl From < i64 > for MovingPlatformApplyVelocityOnLeave { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MovingPlatformApplyVelocityOnLeave > for i64 { # [inline] fn from (v : MovingPlatformApplyVelocityOnLeave) -> Self { v . 0 } } impl FromVariant for MovingPlatformApplyVelocityOnLeave { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl KinematicBody2D { pub const PLATFORM_VEL_ON_LEAVE_ALWAYS : i64 = 0i64 ; pub const PLATFORM_VEL_ON_LEAVE_UPWARD_ONLY : i64 = 1i64 ; pub const PLATFORM_VEL_ON_LEAVE_NEVER : i64 = 2i64 ; } impl KinematicBody2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = KinematicBody2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the floor's collision angle at the last collision point according to `up_direction`, which is `Vector2.UP` by default. This value is always positive and only valid after calling [`move_and_slide`][Self::move_and_slide] and when [`is_on_floor`][Self::is_on_floor] returns `true`.\n# Default Arguments\n* `up_direction` - `Vector2( 0, -1 )`"] # [doc = ""] # [inline] pub fn get_floor_angle (& self , up_direction : Vector2) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . get_floor_angle ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , up_direction) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the surface normal of the floor at the last collision point. Only valid after calling [`move_and_slide`][Self::move_and_slide] or [`move_and_slide_with_snap`][Self::move_and_slide_with_snap] and when [`is_on_floor`][Self::is_on_floor] returns `true`."] # [doc = ""] # [inline] pub fn get_floor_normal (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . get_floor_normal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the linear velocity of the floor at the last collision point. Only valid after calling [`move_and_slide`][Self::move_and_slide] or [`move_and_slide_with_snap`][Self::move_and_slide_with_snap] and when [`is_on_floor`][Self::is_on_floor] returns `true`."] # [doc = ""] # [inline] pub fn get_floor_velocity (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . get_floor_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [`KinematicCollision2D`][KinematicCollision2D], which contains information about the latest collision that occurred during the last call to [`move_and_slide`][Self::move_and_slide]."] # [doc = ""] # [inline] pub fn get_last_slide_collision (& self) -> Option < Ref < crate :: generated :: KinematicCollision2D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . get_last_slide_collision ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: KinematicCollision2D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [`MovingPlatformApplyVelocityOnLeave`][MovingPlatformApplyVelocityOnLeave] constants for available behavior."] # [doc = ""] # [inline] pub fn moving_platform_apply_velocity_on_leave (& self) -> crate :: generated :: kinematic_body_2d :: MovingPlatformApplyVelocityOnLeave { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . get_moving_platform_apply_velocity_on_leave ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: kinematic_body_2d :: MovingPlatformApplyVelocityOnLeave > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Extra margin used for collision recovery in motion functions (see [`move_and_collide`][Self::move_and_collide], [`move_and_slide`][Self::move_and_slide], [`move_and_slide_with_snap`][Self::move_and_slide_with_snap]).\nIf the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.\nA higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.\nA lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of kinematic bodies."] # [doc = ""] # [inline] pub fn safe_margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . get_safe_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns a [`KinematicCollision2D`][KinematicCollision2D], which contains information about a collision that occurred during the last call to [`move_and_slide`][Self::move_and_slide] or [`move_and_slide_with_snap`][Self::move_and_slide_with_snap]. Since the body can collide several times in a single call to [`move_and_slide`][Self::move_and_slide], you must specify the index of the collision in the range 0 to ([`get_slide_count`][Self::get_slide_count] - 1).\n**Example usage:**\n```gdscript\nfor i in get_slide_count():\n    var collision = get_slide_collision(i)\n    print(\"Collided with: \", collision.collider.name)\n```"] # [doc = ""] # [inline] pub fn get_slide_collision (& self , slide_idx : i64) -> Option < Ref < crate :: generated :: KinematicCollision2D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . get_slide_collision ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , slide_idx as _) ; < Option < Ref < crate :: generated :: KinematicCollision2D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of times the body collided and changed direction during the last call to [`move_and_slide`][Self::move_and_slide] or [`move_and_slide_with_snap`][Self::move_and_slide_with_snap]."] # [doc = ""] # [inline] pub fn get_slide_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . get_slide_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the body collided with the ceiling on the last call of [`move_and_slide`][Self::move_and_slide] or [`move_and_slide_with_snap`][Self::move_and_slide_with_snap]. Otherwise, returns `false`."] # [doc = ""] # [inline] pub fn is_on_ceiling (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . is_on_ceiling ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the body collided with the floor on the last call of [`move_and_slide`][Self::move_and_slide] or [`move_and_slide_with_snap`][Self::move_and_slide_with_snap]. Otherwise, returns `false`."] # [doc = ""] # [inline] pub fn is_on_floor (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . is_on_floor ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the body collided with a wall on the last call of [`move_and_slide`][Self::move_and_slide] or [`move_and_slide_with_snap`][Self::move_and_slide_with_snap]. Otherwise, returns `false`."] # [doc = ""] # [inline] pub fn is_on_wall (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . is_on_wall ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [`AnimationPlayer`][AnimationPlayer], for example on moving platforms. Do **not** use together with [`move_and_slide`][Self::move_and_slide] or [`move_and_collide`][Self::move_and_collide] functions."] # [doc = ""] # [inline] pub fn is_sync_to_physics_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . is_sync_to_physics_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Moves the body along the vector `rel_vec`. The body will stop if it collides. Returns a [`KinematicCollision2D`][KinematicCollision2D], which contains information about the collision when stopped, or when touching another body along the motion.\nIf `test_only` is `true`, the body does not move but the would-be collision information is given.\n# Default Arguments\n* `infinite_inertia` - `true`\n* `exclude_raycast_shapes` - `true`\n* `test_only` - `false`"] # [doc = ""] # [inline] pub fn move_and_collide (& self , rel_vec : Vector2 , infinite_inertia : bool , exclude_raycast_shapes : bool , test_only : bool) -> Option < Ref < crate :: generated :: KinematicCollision2D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . move_and_collide ; let ret = crate :: icalls :: icallvar__vec2_bool_bool_bool (method_bind , self . this . sys () . as_ptr () , rel_vec , infinite_inertia as _ , exclude_raycast_shapes as _ , test_only as _) ; < Option < Ref < crate :: generated :: KinematicCollision2D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [`KinematicBody2D`][KinematicBody2D] or [`RigidBody2D`][RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes.\nThis method should be used in [`Node._physics_process`][Node::_physics_process] (or in a method called by [`Node._physics_process`][Node::_physics_process]), as it uses the physics step's `delta` value automatically in calculations. Otherwise, the simulation will run at an incorrect speed.\n`linear_velocity` is the velocity vector in pixels per second. Unlike in [`move_and_collide`][Self::move_and_collide], you should _not_ multiply it by `delta` — the physics engine handles applying the velocity.\n`up_direction` is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of `Vector2(0, 0)`, everything is considered a wall. This is useful for topdown games.\nIf `stop_on_slope` is `true`, body will not slide on slopes when you include gravity in `linear_velocity` and the body is standing still.\nIf the body collides, it will change direction a maximum of `max_slides` times before it stops.\n`floor_max_angle` is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.\nIf `infinite_inertia` is `true`, body will be able to push [`RigidBody2D`][RigidBody2D] nodes, but it won't also detect any collisions with them. If `false`, it will interact with [`RigidBody2D`][RigidBody2D] nodes like with [`StaticBody2D`][StaticBody2D].\nReturns the `linear_velocity` vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [`get_slide_collision`][Self::get_slide_collision].\nWhen the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions.\n# Default Arguments\n* `up_direction` - `Vector2( 0, 0 )`\n* `stop_on_slope` - `false`\n* `max_slides` - `4`\n* `floor_max_angle` - `0.785398`\n* `infinite_inertia` - `true`"] # [doc = ""] # [inline] pub fn move_and_slide (& self , linear_velocity : Vector2 , up_direction : Vector2 , stop_on_slope : bool , max_slides : i64 , floor_max_angle : f64 , infinite_inertia : bool) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . move_and_slide ; let ret = crate :: icalls :: icallvar__vec2_vec2_bool_i64_f64_bool (method_bind , self . this . sys () . as_ptr () , linear_velocity , up_direction , stop_on_slope as _ , max_slides as _ , floor_max_angle as _ , infinite_inertia as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Moves the body while keeping it attached to slopes. Similar to [`move_and_slide`][Self::move_and_slide].\nAs long as the `snap` vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting `snap` to `(0, 0)` or by using [`move_and_slide`][Self::move_and_slide] instead.\n# Default Arguments\n* `up_direction` - `Vector2( 0, 0 )`\n* `stop_on_slope` - `false`\n* `max_slides` - `4`\n* `floor_max_angle` - `0.785398`\n* `infinite_inertia` - `true`"] # [doc = ""] # [inline] pub fn move_and_slide_with_snap (& self , linear_velocity : Vector2 , snap : Vector2 , up_direction : Vector2 , stop_on_slope : bool , max_slides : i64 , floor_max_angle : f64 , infinite_inertia : bool) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . move_and_slide_with_snap ; let ret = crate :: icalls :: icallvar__vec2_vec2_vec2_bool_i64_f64_bool (method_bind , self . this . sys () . as_ptr () , linear_velocity , snap , up_direction , stop_on_slope as _ , max_slides as _ , floor_max_angle as _ , infinite_inertia as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [`MovingPlatformApplyVelocityOnLeave`][MovingPlatformApplyVelocityOnLeave] constants for available behavior."] # [doc = ""] # [inline] pub fn set_moving_platform_apply_velocity_on_leave (& self , on_leave_apply_velocity : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . set_moving_platform_apply_velocity_on_leave ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , on_leave_apply_velocity as _) ; } } # [doc = "Extra margin used for collision recovery in motion functions (see [`move_and_collide`][Self::move_and_collide], [`move_and_slide`][Self::move_and_slide], [`move_and_slide_with_snap`][Self::move_and_slide_with_snap]).\nIf the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion.\nA higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.\nA lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of kinematic bodies."] # [doc = ""] # [inline] pub fn set_safe_margin (& self , pixels : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . set_safe_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , pixels as _) ; } } # [doc = "If `true`, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [`AnimationPlayer`][AnimationPlayer], for example on moving platforms. Do **not** use together with [`move_and_slide`][Self::move_and_slide] or [`move_and_collide`][Self::move_and_collide] functions."] # [doc = ""] # [inline] pub fn set_sync_to_physics (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . set_sync_to_physics ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [`Transform2D`][Transform2D], then tries to move the body along the vector `rel_vec`. Returns `true` if a collision would stop the body from moving along the whole path.\nUse [`move_and_collide`][Self::move_and_collide] instead for detecting collision with touching bodies.\n# Default Arguments\n* `infinite_inertia` - `true`"] # [doc = ""] # [inline] pub fn test_move (& self , from : Transform2D , rel_vec : Vector2 , infinite_inertia : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicBody2DMethodTable :: get (get_api ()) . test_move ; let ret = crate :: icalls :: icallvar__trans2D_vec2_bool (method_bind , self . this . sys () . as_ptr () , from , rel_vec , infinite_inertia as _) ; < bool > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for KinematicBody2D { } unsafe impl GodotObject for KinematicBody2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "KinematicBody2D" } } impl QueueFree for KinematicBody2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for KinematicBody2D { type Target = crate :: generated :: PhysicsBody2D ; # [inline] fn deref (& self) -> & crate :: generated :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for KinematicBody2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PhysicsBody2D > for KinematicBody2D { } unsafe impl SubClass < crate :: generated :: CollisionObject2D > for KinematicBody2D { } unsafe impl SubClass < crate :: generated :: Node2D > for KinematicBody2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for KinematicBody2D { } unsafe impl SubClass < crate :: generated :: Node > for KinematicBody2D { } unsafe impl SubClass < crate :: generated :: Object > for KinematicBody2D { } impl Instanciable for KinematicBody2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { KinematicBody2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct KinematicBody2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_floor_angle : * mut sys :: godot_method_bind , pub get_floor_normal : * mut sys :: godot_method_bind , pub get_floor_velocity : * mut sys :: godot_method_bind , pub get_last_slide_collision : * mut sys :: godot_method_bind , pub get_moving_platform_apply_velocity_on_leave : * mut sys :: godot_method_bind , pub get_safe_margin : * mut sys :: godot_method_bind , pub get_slide_collision : * mut sys :: godot_method_bind , pub get_slide_count : * mut sys :: godot_method_bind , pub is_on_ceiling : * mut sys :: godot_method_bind , pub is_on_floor : * mut sys :: godot_method_bind , pub is_on_wall : * mut sys :: godot_method_bind , pub is_sync_to_physics_enabled : * mut sys :: godot_method_bind , pub move_and_collide : * mut sys :: godot_method_bind , pub move_and_slide : * mut sys :: godot_method_bind , pub move_and_slide_with_snap : * mut sys :: godot_method_bind , pub set_moving_platform_apply_velocity_on_leave : * mut sys :: godot_method_bind , pub set_safe_margin : * mut sys :: godot_method_bind , pub set_sync_to_physics : * mut sys :: godot_method_bind , pub test_move : * mut sys :: godot_method_bind } impl KinematicBody2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : KinematicBody2DMethodTable = KinematicBody2DMethodTable { class_constructor : None , get_floor_angle : 0 as * mut sys :: godot_method_bind , get_floor_normal : 0 as * mut sys :: godot_method_bind , get_floor_velocity : 0 as * mut sys :: godot_method_bind , get_last_slide_collision : 0 as * mut sys :: godot_method_bind , get_moving_platform_apply_velocity_on_leave : 0 as * mut sys :: godot_method_bind , get_safe_margin : 0 as * mut sys :: godot_method_bind , get_slide_collision : 0 as * mut sys :: godot_method_bind , get_slide_count : 0 as * mut sys :: godot_method_bind , is_on_ceiling : 0 as * mut sys :: godot_method_bind , is_on_floor : 0 as * mut sys :: godot_method_bind , is_on_wall : 0 as * mut sys :: godot_method_bind , is_sync_to_physics_enabled : 0 as * mut sys :: godot_method_bind , move_and_collide : 0 as * mut sys :: godot_method_bind , move_and_slide : 0 as * mut sys :: godot_method_bind , move_and_slide_with_snap : 0 as * mut sys :: godot_method_bind , set_moving_platform_apply_velocity_on_leave : 0 as * mut sys :: godot_method_bind , set_safe_margin : 0 as * mut sys :: godot_method_bind , set_sync_to_physics : 0 as * mut sys :: godot_method_bind , test_move : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { KinematicBody2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "KinematicBody2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_floor_angle = (gd_api . godot_method_bind_get_method) (class_name , "get_floor_angle\0" . as_ptr () as * const c_char) ; table . get_floor_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_floor_normal\0" . as_ptr () as * const c_char) ; table . get_floor_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_floor_velocity\0" . as_ptr () as * const c_char) ; table . get_last_slide_collision = (gd_api . godot_method_bind_get_method) (class_name , "get_last_slide_collision\0" . as_ptr () as * const c_char) ; table . get_moving_platform_apply_velocity_on_leave = (gd_api . godot_method_bind_get_method) (class_name , "get_moving_platform_apply_velocity_on_leave\0" . as_ptr () as * const c_char) ; table . get_safe_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_safe_margin\0" . as_ptr () as * const c_char) ; table . get_slide_collision = (gd_api . godot_method_bind_get_method) (class_name , "get_slide_collision\0" . as_ptr () as * const c_char) ; table . get_slide_count = (gd_api . godot_method_bind_get_method) (class_name , "get_slide_count\0" . as_ptr () as * const c_char) ; table . is_on_ceiling = (gd_api . godot_method_bind_get_method) (class_name , "is_on_ceiling\0" . as_ptr () as * const c_char) ; table . is_on_floor = (gd_api . godot_method_bind_get_method) (class_name , "is_on_floor\0" . as_ptr () as * const c_char) ; table . is_on_wall = (gd_api . godot_method_bind_get_method) (class_name , "is_on_wall\0" . as_ptr () as * const c_char) ; table . is_sync_to_physics_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_sync_to_physics_enabled\0" . as_ptr () as * const c_char) ; table . move_and_collide = (gd_api . godot_method_bind_get_method) (class_name , "move_and_collide\0" . as_ptr () as * const c_char) ; table . move_and_slide = (gd_api . godot_method_bind_get_method) (class_name , "move_and_slide\0" . as_ptr () as * const c_char) ; table . move_and_slide_with_snap = (gd_api . godot_method_bind_get_method) (class_name , "move_and_slide_with_snap\0" . as_ptr () as * const c_char) ; table . set_moving_platform_apply_velocity_on_leave = (gd_api . godot_method_bind_get_method) (class_name , "set_moving_platform_apply_velocity_on_leave\0" . as_ptr () as * const c_char) ; table . set_safe_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_safe_margin\0" . as_ptr () as * const c_char) ; table . set_sync_to_physics = (gd_api . godot_method_bind_get_method) (class_name , "set_sync_to_physics\0" . as_ptr () as * const c_char) ; table . test_move = (gd_api . godot_method_bind_get_method) (class_name , "test_move\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::kinematic_body_2d::private::KinematicBody2D;
            
            pub(crate) mod kinematic_collision {
                # ! [doc = "This module contains types related to the API class [`KinematicCollision`][super::KinematicCollision]."] pub (crate) mod private { # [doc = "`core class KinematicCollision` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_kinematiccollision.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nKinematicCollision inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct KinematicCollision { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: KinematicCollision ; impl KinematicCollision { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = KinematicCollisionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The collision angle according to `up_direction`, which is `Vector3.UP` by default. This value is always positive.\n# Default Arguments\n* `up_direction` - `Vector3( 0, 1, 0 )`"] # [doc = ""] # [inline] pub fn get_angle (& self , up_direction : Vector3) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_angle ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , up_direction) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The colliding body."] # [doc = ""] # [inline] pub fn collider (& self) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_collider ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The colliding body's unique instance ID. See [`Object.get_instance_id`][Object::get_instance_id]."] # [doc = ""] # [inline] pub fn collider_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_collider_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The colliding body's metadata. See [`Object`][Object]."] # [doc = ""] # [inline] pub fn collider_metadata (& self) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_collider_metadata ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The colliding body's [`RID`][Rid] used by the [`PhysicsServer`][PhysicsServer]."] # [doc = ""] # [inline] pub fn collider_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_collider_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The colliding body's shape."] # [doc = ""] # [inline] pub fn collider_shape (& self) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_collider_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The colliding shape's index. See [`CollisionObject`][CollisionObject]."] # [doc = ""] # [inline] pub fn collider_shape_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_collider_shape_index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The colliding object's velocity."] # [doc = ""] # [inline] pub fn collider_velocity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_collider_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The moving object's colliding shape."] # [doc = ""] # [inline] pub fn local_shape (& self) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_local_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The colliding body's shape's normal at the point of collision."] # [doc = ""] # [inline] pub fn normal (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_normal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The point of collision, in global coordinates."] # [doc = ""] # [inline] pub fn position (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The moving object's remaining movement vector."] # [doc = ""] # [inline] pub fn remainder (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_remainder ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The distance the moving object traveled before collision."] # [doc = ""] # [inline] pub fn travel (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollisionMethodTable :: get (get_api ()) . get_travel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for KinematicCollision { } unsafe impl GodotObject for KinematicCollision { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "KinematicCollision" } } impl std :: ops :: Deref for KinematicCollision { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for KinematicCollision { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for KinematicCollision { } unsafe impl SubClass < crate :: generated :: Object > for KinematicCollision { } impl Instanciable for KinematicCollision { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { KinematicCollision :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct KinematicCollisionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_angle : * mut sys :: godot_method_bind , pub get_collider : * mut sys :: godot_method_bind , pub get_collider_id : * mut sys :: godot_method_bind , pub get_collider_metadata : * mut sys :: godot_method_bind , pub get_collider_rid : * mut sys :: godot_method_bind , pub get_collider_shape : * mut sys :: godot_method_bind , pub get_collider_shape_index : * mut sys :: godot_method_bind , pub get_collider_velocity : * mut sys :: godot_method_bind , pub get_local_shape : * mut sys :: godot_method_bind , pub get_normal : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub get_remainder : * mut sys :: godot_method_bind , pub get_travel : * mut sys :: godot_method_bind } impl KinematicCollisionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : KinematicCollisionMethodTable = KinematicCollisionMethodTable { class_constructor : None , get_angle : 0 as * mut sys :: godot_method_bind , get_collider : 0 as * mut sys :: godot_method_bind , get_collider_id : 0 as * mut sys :: godot_method_bind , get_collider_metadata : 0 as * mut sys :: godot_method_bind , get_collider_rid : 0 as * mut sys :: godot_method_bind , get_collider_shape : 0 as * mut sys :: godot_method_bind , get_collider_shape_index : 0 as * mut sys :: godot_method_bind , get_collider_velocity : 0 as * mut sys :: godot_method_bind , get_local_shape : 0 as * mut sys :: godot_method_bind , get_normal : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , get_remainder : 0 as * mut sys :: godot_method_bind , get_travel : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { KinematicCollisionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "KinematicCollision\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_angle = (gd_api . godot_method_bind_get_method) (class_name , "get_angle\0" . as_ptr () as * const c_char) ; table . get_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_collider\0" . as_ptr () as * const c_char) ; table . get_collider_id = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_id\0" . as_ptr () as * const c_char) ; table . get_collider_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_metadata\0" . as_ptr () as * const c_char) ; table . get_collider_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_rid\0" . as_ptr () as * const c_char) ; table . get_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape\0" . as_ptr () as * const c_char) ; table . get_collider_shape_index = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape_index\0" . as_ptr () as * const c_char) ; table . get_collider_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_velocity\0" . as_ptr () as * const c_char) ; table . get_local_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_local_shape\0" . as_ptr () as * const c_char) ; table . get_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_normal\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_remainder = (gd_api . godot_method_bind_get_method) (class_name , "get_remainder\0" . as_ptr () as * const c_char) ; table . get_travel = (gd_api . godot_method_bind_get_method) (class_name , "get_travel\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::kinematic_collision::private::KinematicCollision;
            
            pub(crate) mod kinematic_collision_2d {
                # ! [doc = "This module contains types related to the API class [`KinematicCollision2D`][super::KinematicCollision2D]."] pub (crate) mod private { # [doc = "`core class KinematicCollision2D` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_kinematiccollision2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nKinematicCollision2D inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct KinematicCollision2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: KinematicCollision2D ; impl KinematicCollision2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = KinematicCollision2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The collision angle according to `up_direction`, which is `Vector2.UP` by default. This value is always positive.\n# Default Arguments\n* `up_direction` - `Vector2( 0, -1 )`"] # [doc = ""] # [inline] pub fn get_angle (& self , up_direction : Vector2) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_angle ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , up_direction) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The colliding body."] # [doc = ""] # [inline] pub fn collider (& self) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_collider ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The colliding body's unique instance ID. See [`Object.get_instance_id`][Object::get_instance_id]."] # [doc = ""] # [inline] pub fn collider_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_collider_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The colliding body's metadata. See [`Object`][Object]."] # [doc = ""] # [inline] pub fn collider_metadata (& self) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_collider_metadata ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The colliding body's [`RID`][Rid] used by the [`Physics2DServer`][Physics2DServer]."] # [doc = ""] # [inline] pub fn collider_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_collider_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The colliding body's shape."] # [doc = ""] # [inline] pub fn collider_shape (& self) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_collider_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The colliding shape's index. See [`CollisionObject2D`][CollisionObject2D]."] # [doc = ""] # [inline] pub fn collider_shape_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_collider_shape_index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The colliding object's velocity."] # [doc = ""] # [inline] pub fn collider_velocity (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_collider_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The moving object's colliding shape."] # [doc = ""] # [inline] pub fn local_shape (& self) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_local_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The colliding body's shape's normal at the point of collision."] # [doc = ""] # [inline] pub fn normal (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_normal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The point of collision, in global coordinates."] # [doc = ""] # [inline] pub fn position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The moving object's remaining movement vector."] # [doc = ""] # [inline] pub fn remainder (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_remainder ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The distance the moving object traveled before collision."] # [doc = ""] # [inline] pub fn travel (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = KinematicCollision2DMethodTable :: get (get_api ()) . get_travel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for KinematicCollision2D { } unsafe impl GodotObject for KinematicCollision2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "KinematicCollision2D" } } impl std :: ops :: Deref for KinematicCollision2D { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for KinematicCollision2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for KinematicCollision2D { } unsafe impl SubClass < crate :: generated :: Object > for KinematicCollision2D { } impl Instanciable for KinematicCollision2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { KinematicCollision2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct KinematicCollision2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_angle : * mut sys :: godot_method_bind , pub get_collider : * mut sys :: godot_method_bind , pub get_collider_id : * mut sys :: godot_method_bind , pub get_collider_metadata : * mut sys :: godot_method_bind , pub get_collider_rid : * mut sys :: godot_method_bind , pub get_collider_shape : * mut sys :: godot_method_bind , pub get_collider_shape_index : * mut sys :: godot_method_bind , pub get_collider_velocity : * mut sys :: godot_method_bind , pub get_local_shape : * mut sys :: godot_method_bind , pub get_normal : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub get_remainder : * mut sys :: godot_method_bind , pub get_travel : * mut sys :: godot_method_bind } impl KinematicCollision2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : KinematicCollision2DMethodTable = KinematicCollision2DMethodTable { class_constructor : None , get_angle : 0 as * mut sys :: godot_method_bind , get_collider : 0 as * mut sys :: godot_method_bind , get_collider_id : 0 as * mut sys :: godot_method_bind , get_collider_metadata : 0 as * mut sys :: godot_method_bind , get_collider_rid : 0 as * mut sys :: godot_method_bind , get_collider_shape : 0 as * mut sys :: godot_method_bind , get_collider_shape_index : 0 as * mut sys :: godot_method_bind , get_collider_velocity : 0 as * mut sys :: godot_method_bind , get_local_shape : 0 as * mut sys :: godot_method_bind , get_normal : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , get_remainder : 0 as * mut sys :: godot_method_bind , get_travel : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { KinematicCollision2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "KinematicCollision2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_angle = (gd_api . godot_method_bind_get_method) (class_name , "get_angle\0" . as_ptr () as * const c_char) ; table . get_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_collider\0" . as_ptr () as * const c_char) ; table . get_collider_id = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_id\0" . as_ptr () as * const c_char) ; table . get_collider_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_metadata\0" . as_ptr () as * const c_char) ; table . get_collider_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_rid\0" . as_ptr () as * const c_char) ; table . get_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape\0" . as_ptr () as * const c_char) ; table . get_collider_shape_index = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape_index\0" . as_ptr () as * const c_char) ; table . get_collider_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_velocity\0" . as_ptr () as * const c_char) ; table . get_local_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_local_shape\0" . as_ptr () as * const c_char) ; table . get_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_normal\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_remainder = (gd_api . godot_method_bind_get_method) (class_name , "get_remainder\0" . as_ptr () as * const c_char) ; table . get_travel = (gd_api . godot_method_bind_get_method) (class_name , "get_travel\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::kinematic_collision_2d::private::KinematicCollision2D;
            
            pub mod label {
                # ! [doc = "This module contains types related to the API class [`Label`][super::Label]."] pub (crate) mod private { # [doc = "`core class Label` inherits `Control` (manually managed).\n\nThis class has related types in the [`label`][super::label] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_label.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Label` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Label>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nLabel inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Label { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Label ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Align (pub i64) ; impl Align { pub const LEFT : Align = Align (0i64) ; pub const CENTER : Align = Align (1i64) ; pub const RIGHT : Align = Align (2i64) ; pub const FILL : Align = Align (3i64) ; } impl From < i64 > for Align { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Align > for i64 { # [inline] fn from (v : Align) -> Self { v . 0 } } impl FromVariant for Align { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct VAlign (pub i64) ; impl VAlign { pub const TOP : VAlign = VAlign (0i64) ; pub const CENTER : VAlign = VAlign (1i64) ; pub const BOTTOM : VAlign = VAlign (2i64) ; pub const FILL : VAlign = VAlign (3i64) ; } impl From < i64 > for VAlign { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < VAlign > for i64 { # [inline] fn from (v : VAlign) -> Self { v . 0 } } impl FromVariant for VAlign { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Label { pub const ALIGN_LEFT : i64 = 0i64 ; pub const VALIGN_TOP : i64 = 0i64 ; pub const ALIGN_CENTER : i64 = 1i64 ; pub const VALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const VALIGN_BOTTOM : i64 = 2i64 ; pub const ALIGN_FILL : i64 = 3i64 ; pub const VALIGN_FILL : i64 = 3i64 ; } impl Label { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = LabelMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [`Align`][Align] constants."] # [doc = ""] # [inline] pub fn align (& self) -> crate :: generated :: label :: Align { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . get_align ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: label :: Align > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the amount of lines of text the Label has."] # [doc = ""] # [inline] pub fn get_line_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . get_line_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the font size in pixels."] # [doc = ""] # [inline] pub fn get_line_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . get_line_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The node ignores the first `lines_skipped` lines before it starts to display text."] # [doc = ""] # [inline] pub fn lines_skipped (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . get_lines_skipped ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Limits the lines of text the node shows on screen."] # [doc = ""] # [inline] pub fn max_lines_visible (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . get_max_lines_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Limits the amount of visible characters. If you set `percent_visible` to 0.5, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box."] # [doc = ""] # [inline] pub fn percent_visible (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . get_percent_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The text to display on screen."] # [doc = ""] # [inline] pub fn text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . get_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the total number of printable characters in the text (excluding spaces and newlines)."] # [doc = ""] # [inline] pub fn get_total_character_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . get_total_character_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [`VAlign`][VAlign] constants."] # [doc = ""] # [inline] pub fn valign (& self) -> crate :: generated :: label :: VAlign { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . get_valign ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: label :: VAlign > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Restricts the number of characters to display. Set to -1 to disable."] # [doc = ""] # [inline] pub fn visible_characters (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . get_visible_characters ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of lines shown. Useful if the [`Label`][Label]'s height cannot currently display all lines."] # [doc = ""] # [inline] pub fn get_visible_line_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . get_visible_line_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text."] # [doc = ""] # [inline] pub fn has_autowrap (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . has_autowrap ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the Label only shows the text that fits inside its bounding rectangle and will clip text horizontally."] # [doc = ""] # [inline] pub fn is_clipping_text (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . is_clipping_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, all the text displays as UPPERCASE."] # [doc = ""] # [inline] pub fn is_uppercase (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . is_uppercase ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [`Align`][Align] constants."] # [doc = ""] # [inline] pub fn set_align (& self , align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . set_align ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , align as _) ; } } # [doc = "If `true`, wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text."] # [doc = ""] # [inline] pub fn set_autowrap (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . set_autowrap ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the Label only shows the text that fits inside its bounding rectangle and will clip text horizontally."] # [doc = ""] # [inline] pub fn set_clip_text (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . set_clip_text ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The node ignores the first `lines_skipped` lines before it starts to display text."] # [doc = ""] # [inline] pub fn set_lines_skipped (& self , lines_skipped : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . set_lines_skipped ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , lines_skipped as _) ; } } # [doc = "Limits the lines of text the node shows on screen."] # [doc = ""] # [inline] pub fn set_max_lines_visible (& self , lines_visible : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . set_max_lines_visible ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , lines_visible as _) ; } } # [doc = "Limits the amount of visible characters. If you set `percent_visible` to 0.5, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box."] # [doc = ""] # [inline] pub fn set_percent_visible (& self , percent_visible : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . set_percent_visible ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , percent_visible as _) ; } } # [doc = "The text to display on screen."] # [doc = ""] # [inline] pub fn set_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . set_text ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "If `true`, all the text displays as UPPERCASE."] # [doc = ""] # [inline] pub fn set_uppercase (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . set_uppercase ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [`VAlign`][VAlign] constants."] # [doc = ""] # [inline] pub fn set_valign (& self , valign : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . set_valign ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , valign as _) ; } } # [doc = "Restricts the number of characters to display. Set to -1 to disable."] # [doc = ""] # [inline] pub fn set_visible_characters (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LabelMethodTable :: get (get_api ()) . set_visible_characters ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Label { } unsafe impl GodotObject for Label { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Label" } } impl QueueFree for Label { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Label { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Label { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for Label { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Label { } unsafe impl SubClass < crate :: generated :: Node > for Label { } unsafe impl SubClass < crate :: generated :: Object > for Label { } impl Instanciable for Label { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Label :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct LabelMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_align : * mut sys :: godot_method_bind , pub get_line_count : * mut sys :: godot_method_bind , pub get_line_height : * mut sys :: godot_method_bind , pub get_lines_skipped : * mut sys :: godot_method_bind , pub get_max_lines_visible : * mut sys :: godot_method_bind , pub get_percent_visible : * mut sys :: godot_method_bind , pub get_text : * mut sys :: godot_method_bind , pub get_total_character_count : * mut sys :: godot_method_bind , pub get_valign : * mut sys :: godot_method_bind , pub get_visible_characters : * mut sys :: godot_method_bind , pub get_visible_line_count : * mut sys :: godot_method_bind , pub has_autowrap : * mut sys :: godot_method_bind , pub is_clipping_text : * mut sys :: godot_method_bind , pub is_uppercase : * mut sys :: godot_method_bind , pub set_align : * mut sys :: godot_method_bind , pub set_autowrap : * mut sys :: godot_method_bind , pub set_clip_text : * mut sys :: godot_method_bind , pub set_lines_skipped : * mut sys :: godot_method_bind , pub set_max_lines_visible : * mut sys :: godot_method_bind , pub set_percent_visible : * mut sys :: godot_method_bind , pub set_text : * mut sys :: godot_method_bind , pub set_uppercase : * mut sys :: godot_method_bind , pub set_valign : * mut sys :: godot_method_bind , pub set_visible_characters : * mut sys :: godot_method_bind } impl LabelMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : LabelMethodTable = LabelMethodTable { class_constructor : None , get_align : 0 as * mut sys :: godot_method_bind , get_line_count : 0 as * mut sys :: godot_method_bind , get_line_height : 0 as * mut sys :: godot_method_bind , get_lines_skipped : 0 as * mut sys :: godot_method_bind , get_max_lines_visible : 0 as * mut sys :: godot_method_bind , get_percent_visible : 0 as * mut sys :: godot_method_bind , get_text : 0 as * mut sys :: godot_method_bind , get_total_character_count : 0 as * mut sys :: godot_method_bind , get_valign : 0 as * mut sys :: godot_method_bind , get_visible_characters : 0 as * mut sys :: godot_method_bind , get_visible_line_count : 0 as * mut sys :: godot_method_bind , has_autowrap : 0 as * mut sys :: godot_method_bind , is_clipping_text : 0 as * mut sys :: godot_method_bind , is_uppercase : 0 as * mut sys :: godot_method_bind , set_align : 0 as * mut sys :: godot_method_bind , set_autowrap : 0 as * mut sys :: godot_method_bind , set_clip_text : 0 as * mut sys :: godot_method_bind , set_lines_skipped : 0 as * mut sys :: godot_method_bind , set_max_lines_visible : 0 as * mut sys :: godot_method_bind , set_percent_visible : 0 as * mut sys :: godot_method_bind , set_text : 0 as * mut sys :: godot_method_bind , set_uppercase : 0 as * mut sys :: godot_method_bind , set_valign : 0 as * mut sys :: godot_method_bind , set_visible_characters : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { LabelMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Label\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_align = (gd_api . godot_method_bind_get_method) (class_name , "get_align\0" . as_ptr () as * const c_char) ; table . get_line_count = (gd_api . godot_method_bind_get_method) (class_name , "get_line_count\0" . as_ptr () as * const c_char) ; table . get_line_height = (gd_api . godot_method_bind_get_method) (class_name , "get_line_height\0" . as_ptr () as * const c_char) ; table . get_lines_skipped = (gd_api . godot_method_bind_get_method) (class_name , "get_lines_skipped\0" . as_ptr () as * const c_char) ; table . get_max_lines_visible = (gd_api . godot_method_bind_get_method) (class_name , "get_max_lines_visible\0" . as_ptr () as * const c_char) ; table . get_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "get_percent_visible\0" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . get_total_character_count = (gd_api . godot_method_bind_get_method) (class_name , "get_total_character_count\0" . as_ptr () as * const c_char) ; table . get_valign = (gd_api . godot_method_bind_get_method) (class_name , "get_valign\0" . as_ptr () as * const c_char) ; table . get_visible_characters = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_characters\0" . as_ptr () as * const c_char) ; table . get_visible_line_count = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_line_count\0" . as_ptr () as * const c_char) ; table . has_autowrap = (gd_api . godot_method_bind_get_method) (class_name , "has_autowrap\0" . as_ptr () as * const c_char) ; table . is_clipping_text = (gd_api . godot_method_bind_get_method) (class_name , "is_clipping_text\0" . as_ptr () as * const c_char) ; table . is_uppercase = (gd_api . godot_method_bind_get_method) (class_name , "is_uppercase\0" . as_ptr () as * const c_char) ; table . set_align = (gd_api . godot_method_bind_get_method) (class_name , "set_align\0" . as_ptr () as * const c_char) ; table . set_autowrap = (gd_api . godot_method_bind_get_method) (class_name , "set_autowrap\0" . as_ptr () as * const c_char) ; table . set_clip_text = (gd_api . godot_method_bind_get_method) (class_name , "set_clip_text\0" . as_ptr () as * const c_char) ; table . set_lines_skipped = (gd_api . godot_method_bind_get_method) (class_name , "set_lines_skipped\0" . as_ptr () as * const c_char) ; table . set_max_lines_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_max_lines_visible\0" . as_ptr () as * const c_char) ; table . set_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_percent_visible\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; table . set_uppercase = (gd_api . godot_method_bind_get_method) (class_name , "set_uppercase\0" . as_ptr () as * const c_char) ; table . set_valign = (gd_api . godot_method_bind_get_method) (class_name , "set_valign\0" . as_ptr () as * const c_char) ; table . set_visible_characters = (gd_api . godot_method_bind_get_method) (class_name , "set_visible_characters\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::label::private::Label;
            
            pub mod label_3d {
                # ! [doc = "This module contains types related to the API class [`Label3D`][super::Label3D]."] pub (crate) mod private { # [doc = "`core class Label3D` inherits `GeometryInstance` (manually managed).\n\nThis class has related types in the [`label_3d`][super::label_3d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_label3d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Label3D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Label3D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nLabel3D inherits methods from:\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Label3D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Label3D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Align (pub i64) ; impl Align { pub const LEFT : Align = Align (0i64) ; pub const CENTER : Align = Align (1i64) ; pub const RIGHT : Align = Align (2i64) ; pub const FILL : Align = Align (3i64) ; } impl From < i64 > for Align { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Align > for i64 { # [inline] fn from (v : Align) -> Self { v . 0 } } impl FromVariant for Align { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AlphaCutMode (pub i64) ; impl AlphaCutMode { pub const DISABLED : AlphaCutMode = AlphaCutMode (0i64) ; pub const DISCARD : AlphaCutMode = AlphaCutMode (1i64) ; pub const OPAQUE_PREPASS : AlphaCutMode = AlphaCutMode (2i64) ; } impl From < i64 > for AlphaCutMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AlphaCutMode > for i64 { # [inline] fn from (v : AlphaCutMode) -> Self { v . 0 } } impl FromVariant for AlphaCutMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DrawFlags (pub i64) ; impl DrawFlags { pub const SHADED : DrawFlags = DrawFlags (0i64) ; pub const DOUBLE_SIDED : DrawFlags = DrawFlags (1i64) ; pub const DISABLE_DEPTH_TEST : DrawFlags = DrawFlags (2i64) ; pub const FIXED_SIZE : DrawFlags = DrawFlags (3i64) ; pub const MAX : DrawFlags = DrawFlags (4i64) ; } impl From < i64 > for DrawFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DrawFlags > for i64 { # [inline] fn from (v : DrawFlags) -> Self { v . 0 } } impl FromVariant for DrawFlags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct VAlign (pub i64) ; impl VAlign { pub const TOP : VAlign = VAlign (0i64) ; pub const CENTER : VAlign = VAlign (1i64) ; pub const BOTTOM : VAlign = VAlign (2i64) ; pub const FILL : VAlign = VAlign (3i64) ; } impl From < i64 > for VAlign { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < VAlign > for i64 { # [inline] fn from (v : VAlign) -> Self { v . 0 } } impl FromVariant for VAlign { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Label3D { pub const ALIGN_LEFT : i64 = 0i64 ; pub const ALPHA_CUT_DISABLED : i64 = 0i64 ; pub const FLAG_SHADED : i64 = 0i64 ; pub const VALIGN_TOP : i64 = 0i64 ; pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALPHA_CUT_DISCARD : i64 = 1i64 ; pub const FLAG_DOUBLE_SIDED : i64 = 1i64 ; pub const VALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const ALPHA_CUT_OPAQUE_PREPASS : i64 = 2i64 ; pub const FLAG_DISABLE_DEPTH_TEST : i64 = 2i64 ; pub const VALIGN_BOTTOM : i64 = 2i64 ; pub const ALIGN_FILL : i64 = 3i64 ; pub const FLAG_FIXED_SIZE : i64 = 3i64 ; pub const VALIGN_FILL : i64 = 3i64 ; pub const FLAG_MAX : i64 = 4i64 ; } impl Label3D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Label3DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns a [`TriangleMesh`][TriangleMesh] with the label's vertices following its current configuration (such as its [`pixel_size`][Self::pixel_size])."] # [doc = ""] # [inline] pub fn generate_triangle_mesh (& self) -> Option < Ref < crate :: generated :: TriangleMesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . generate_triangle_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: TriangleMesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The alpha cutting mode to use for the sprite. See [`AlphaCutMode`][AlphaCutMode] for possible values."] # [doc = ""] # [inline] pub fn alpha_cut_mode (& self) -> crate :: generated :: label_3d :: AlphaCutMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_alpha_cut_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: label_3d :: AlphaCutMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Threshold at which the alpha scissor will discard values."] # [doc = ""] # [inline] pub fn alpha_scissor_threshold (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_alpha_scissor_threshold ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, wraps the text to the [`width`][Self::width]."] # [doc = ""] # [inline] pub fn autowrap (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_autowrap ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The billboard mode to use for the label. See [enum SpatialMaterial.BillboardMode] for possible values."] # [doc = ""] # [inline] pub fn billboard_mode (& self) -> crate :: generated :: spatial_material :: BillboardMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_billboard_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: BillboardMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the value of the specified flag."] # [doc = ""] # [inline] pub fn draw_flag (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_draw_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flag as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "[`Font`][Font] used for the [`Label3D`][Label3D]'s text."] # [doc = ""] # [inline] pub fn font (& self) -> Option < Ref < crate :: generated :: Font , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_font ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Font , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Controls the text's horizontal alignment. Supports left, center, right. Set it to one of the [`Align`][Align] constants."] # [doc = ""] # [inline] pub fn horizontal_alignment (& self) -> crate :: generated :: label_3d :: Align { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_horizontal_alignment ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: label_3d :: Align > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Vertical space between lines in multiline [`Label3D`][Label3D]."] # [doc = ""] # [inline] pub fn line_spacing (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_line_spacing ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Text [`Color`][Color] of the [`Label3D`][Label3D]."] # [doc = ""] # [inline] pub fn modulate (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_modulate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The text drawing offset (in pixels)."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The tint of [`Font`][Font]'s outline."] # [doc = ""] # [inline] pub fn outline_modulate (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_outline_modulate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects.\n**Note:** This only applies if [`alpha_cut`][Self::alpha_cut] is set to [`ALPHA_CUT_DISABLED`][Self::ALPHA_CUT_DISABLED] (default value).\n**Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority)."] # [doc = ""] # [inline] pub fn outline_render_priority (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_outline_render_priority ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The size of one pixel's width on the label to scale it in 3D."] # [doc = ""] # [inline] pub fn pixel_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_pixel_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects.\n**Note:** This only applies if [`alpha_cut`][Self::alpha_cut] is set to [`ALPHA_CUT_DISABLED`][Self::ALPHA_CUT_DISABLED] (default value).\n**Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority)."] # [doc = ""] # [inline] pub fn render_priority (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_render_priority ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The text to display on screen."] # [doc = ""] # [inline] pub fn text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the [`VAlign`][VAlign] constants."] # [doc = ""] # [inline] pub fn vertical_alignment (& self) -> crate :: generated :: label_3d :: VAlign { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_vertical_alignment ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: label_3d :: VAlign > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Text width (in pixels), used for autowrap and fill alignment."] # [doc = ""] # [inline] pub fn width (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, all the text displays as UPPERCASE."] # [doc = ""] # [inline] pub fn is_uppercase (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . is_uppercase ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The alpha cutting mode to use for the sprite. See [`AlphaCutMode`][AlphaCutMode] for possible values."] # [doc = ""] # [inline] pub fn set_alpha_cut_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_alpha_cut_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Threshold at which the alpha scissor will discard values."] # [doc = ""] # [inline] pub fn set_alpha_scissor_threshold (& self , threshold : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_alpha_scissor_threshold ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , threshold as _) ; } } # [doc = "If `true`, wraps the text to the [`width`][Self::width]."] # [doc = ""] # [inline] pub fn set_autowrap (& self , autowrap_mode : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_autowrap ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , autowrap_mode as _) ; } } # [doc = "The billboard mode to use for the label. See [enum SpatialMaterial.BillboardMode] for possible values."] # [doc = ""] # [inline] pub fn set_billboard_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_billboard_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "If `true`, the specified flag will be enabled. See [enum Label3D.DrawFlags] for a list of flags."] # [doc = ""] # [inline] pub fn set_draw_flag (& self , flag : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_draw_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , flag as _ , enabled as _) ; } } # [doc = "[`Font`][Font] used for the [`Label3D`][Label3D]'s text."] # [doc = ""] # [inline] pub fn set_font (& self , font : impl AsArg < crate :: generated :: Font >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_font ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , font . as_arg_ptr ()) ; } } # [doc = "Controls the text's horizontal alignment. Supports left, center, right. Set it to one of the [`Align`][Align] constants."] # [doc = ""] # [inline] pub fn set_horizontal_alignment (& self , alignment : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_horizontal_alignment ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , alignment as _) ; } } # [doc = "Vertical space between lines in multiline [`Label3D`][Label3D]."] # [doc = ""] # [inline] pub fn set_line_spacing (& self , line_spacing : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_line_spacing ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , line_spacing as _) ; } } # [doc = "Text [`Color`][Color] of the [`Label3D`][Label3D]."] # [doc = ""] # [inline] pub fn set_modulate (& self , modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_modulate ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , modulate) ; } } # [doc = "The text drawing offset (in pixels)."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The tint of [`Font`][Font]'s outline."] # [doc = ""] # [inline] pub fn set_outline_modulate (& self , modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_outline_modulate ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , modulate) ; } } # [doc = "Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects.\n**Note:** This only applies if [`alpha_cut`][Self::alpha_cut] is set to [`ALPHA_CUT_DISABLED`][Self::ALPHA_CUT_DISABLED] (default value).\n**Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority)."] # [doc = ""] # [inline] pub fn set_outline_render_priority (& self , priority : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_outline_render_priority ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , priority as _) ; } } # [doc = "The size of one pixel's width on the label to scale it in 3D."] # [doc = ""] # [inline] pub fn set_pixel_size (& self , pixel_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_pixel_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , pixel_size as _) ; } } # [doc = "Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects.\n**Note:** This only applies if [`alpha_cut`][Self::alpha_cut] is set to [`ALPHA_CUT_DISABLED`][Self::ALPHA_CUT_DISABLED] (default value).\n**Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority)."] # [doc = ""] # [inline] pub fn set_render_priority (& self , priority : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_render_priority ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , priority as _) ; } } # [doc = "The text to display on screen."] # [doc = ""] # [inline] pub fn set_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_text ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "If `true`, all the text displays as UPPERCASE."] # [doc = ""] # [inline] pub fn set_uppercase (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_uppercase ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the [`VAlign`][VAlign] constants."] # [doc = ""] # [inline] pub fn set_vertical_alignment (& self , alignment : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_vertical_alignment ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , alignment as _) ; } } # [doc = "Text width (in pixels), used for autowrap and fill alignment."] # [doc = ""] # [inline] pub fn set_width (& self , width : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_width ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , width as _) ; } } # [doc = "If `true`, text can be seen from the back as well, if `false`, it is invisible when looking at it from behind."] # [doc = ""] # [inline] pub fn double_sided (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_draw_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, text can be seen from the back as well, if `false`, it is invisible when looking at it from behind."] # [doc = ""] # [inline] pub fn set_double_sided (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_draw_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "If `true`, the label is rendered at the same size regardless of distance."] # [doc = ""] # [inline] pub fn fixed_size (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_draw_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the label is rendered at the same size regardless of distance."] # [doc = ""] # [inline] pub fn set_fixed_size (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_draw_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "If `true`, depth testing is disabled and the object will be drawn in render order."] # [doc = ""] # [inline] pub fn no_depth_test (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_draw_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, depth testing is disabled and the object will be drawn in render order."] # [doc = ""] # [inline] pub fn set_no_depth_test (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_draw_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "If `true`, the [`Light`][Light] in the [`Environment`][Environment] has effects on the label."] # [doc = ""] # [inline] pub fn shaded (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . get_draw_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the [`Light`][Light] in the [`Environment`][Environment] has effects on the label."] # [doc = ""] # [inline] pub fn set_shaded (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = Label3DMethodTable :: get (get_api ()) . set_draw_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Label3D { } unsafe impl GodotObject for Label3D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Label3D" } } impl QueueFree for Label3D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Label3D { type Target = crate :: generated :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Label3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: GeometryInstance > for Label3D { } unsafe impl SubClass < crate :: generated :: VisualInstance > for Label3D { } unsafe impl SubClass < crate :: generated :: CullInstance > for Label3D { } unsafe impl SubClass < crate :: generated :: Spatial > for Label3D { } unsafe impl SubClass < crate :: generated :: Node > for Label3D { } unsafe impl SubClass < crate :: generated :: Object > for Label3D { } impl Instanciable for Label3D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Label3D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Label3DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub generate_triangle_mesh : * mut sys :: godot_method_bind , pub get_alpha_cut_mode : * mut sys :: godot_method_bind , pub get_alpha_scissor_threshold : * mut sys :: godot_method_bind , pub get_autowrap : * mut sys :: godot_method_bind , pub get_billboard_mode : * mut sys :: godot_method_bind , pub get_draw_flag : * mut sys :: godot_method_bind , pub get_font : * mut sys :: godot_method_bind , pub get_horizontal_alignment : * mut sys :: godot_method_bind , pub get_line_spacing : * mut sys :: godot_method_bind , pub get_modulate : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_outline_modulate : * mut sys :: godot_method_bind , pub get_outline_render_priority : * mut sys :: godot_method_bind , pub get_pixel_size : * mut sys :: godot_method_bind , pub get_render_priority : * mut sys :: godot_method_bind , pub get_text : * mut sys :: godot_method_bind , pub get_vertical_alignment : * mut sys :: godot_method_bind , pub get_width : * mut sys :: godot_method_bind , pub is_uppercase : * mut sys :: godot_method_bind , pub set_alpha_cut_mode : * mut sys :: godot_method_bind , pub set_alpha_scissor_threshold : * mut sys :: godot_method_bind , pub set_autowrap : * mut sys :: godot_method_bind , pub set_billboard_mode : * mut sys :: godot_method_bind , pub set_draw_flag : * mut sys :: godot_method_bind , pub set_font : * mut sys :: godot_method_bind , pub set_horizontal_alignment : * mut sys :: godot_method_bind , pub set_line_spacing : * mut sys :: godot_method_bind , pub set_modulate : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_outline_modulate : * mut sys :: godot_method_bind , pub set_outline_render_priority : * mut sys :: godot_method_bind , pub set_pixel_size : * mut sys :: godot_method_bind , pub set_render_priority : * mut sys :: godot_method_bind , pub set_text : * mut sys :: godot_method_bind , pub set_uppercase : * mut sys :: godot_method_bind , pub set_vertical_alignment : * mut sys :: godot_method_bind , pub set_width : * mut sys :: godot_method_bind } impl Label3DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Label3DMethodTable = Label3DMethodTable { class_constructor : None , generate_triangle_mesh : 0 as * mut sys :: godot_method_bind , get_alpha_cut_mode : 0 as * mut sys :: godot_method_bind , get_alpha_scissor_threshold : 0 as * mut sys :: godot_method_bind , get_autowrap : 0 as * mut sys :: godot_method_bind , get_billboard_mode : 0 as * mut sys :: godot_method_bind , get_draw_flag : 0 as * mut sys :: godot_method_bind , get_font : 0 as * mut sys :: godot_method_bind , get_horizontal_alignment : 0 as * mut sys :: godot_method_bind , get_line_spacing : 0 as * mut sys :: godot_method_bind , get_modulate : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_outline_modulate : 0 as * mut sys :: godot_method_bind , get_outline_render_priority : 0 as * mut sys :: godot_method_bind , get_pixel_size : 0 as * mut sys :: godot_method_bind , get_render_priority : 0 as * mut sys :: godot_method_bind , get_text : 0 as * mut sys :: godot_method_bind , get_vertical_alignment : 0 as * mut sys :: godot_method_bind , get_width : 0 as * mut sys :: godot_method_bind , is_uppercase : 0 as * mut sys :: godot_method_bind , set_alpha_cut_mode : 0 as * mut sys :: godot_method_bind , set_alpha_scissor_threshold : 0 as * mut sys :: godot_method_bind , set_autowrap : 0 as * mut sys :: godot_method_bind , set_billboard_mode : 0 as * mut sys :: godot_method_bind , set_draw_flag : 0 as * mut sys :: godot_method_bind , set_font : 0 as * mut sys :: godot_method_bind , set_horizontal_alignment : 0 as * mut sys :: godot_method_bind , set_line_spacing : 0 as * mut sys :: godot_method_bind , set_modulate : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_outline_modulate : 0 as * mut sys :: godot_method_bind , set_outline_render_priority : 0 as * mut sys :: godot_method_bind , set_pixel_size : 0 as * mut sys :: godot_method_bind , set_render_priority : 0 as * mut sys :: godot_method_bind , set_text : 0 as * mut sys :: godot_method_bind , set_uppercase : 0 as * mut sys :: godot_method_bind , set_vertical_alignment : 0 as * mut sys :: godot_method_bind , set_width : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Label3DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Label3D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . generate_triangle_mesh = (gd_api . godot_method_bind_get_method) (class_name , "generate_triangle_mesh\0" . as_ptr () as * const c_char) ; table . get_alpha_cut_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_alpha_cut_mode\0" . as_ptr () as * const c_char) ; table . get_alpha_scissor_threshold = (gd_api . godot_method_bind_get_method) (class_name , "get_alpha_scissor_threshold\0" . as_ptr () as * const c_char) ; table . get_autowrap = (gd_api . godot_method_bind_get_method) (class_name , "get_autowrap\0" . as_ptr () as * const c_char) ; table . get_billboard_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_billboard_mode\0" . as_ptr () as * const c_char) ; table . get_draw_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_flag\0" . as_ptr () as * const c_char) ; table . get_font = (gd_api . godot_method_bind_get_method) (class_name , "get_font\0" . as_ptr () as * const c_char) ; table . get_horizontal_alignment = (gd_api . godot_method_bind_get_method) (class_name , "get_horizontal_alignment\0" . as_ptr () as * const c_char) ; table . get_line_spacing = (gd_api . godot_method_bind_get_method) (class_name , "get_line_spacing\0" . as_ptr () as * const c_char) ; table . get_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_modulate\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_outline_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_outline_modulate\0" . as_ptr () as * const c_char) ; table . get_outline_render_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_outline_render_priority\0" . as_ptr () as * const c_char) ; table . get_pixel_size = (gd_api . godot_method_bind_get_method) (class_name , "get_pixel_size\0" . as_ptr () as * const c_char) ; table . get_render_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_render_priority\0" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . get_vertical_alignment = (gd_api . godot_method_bind_get_method) (class_name , "get_vertical_alignment\0" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\0" . as_ptr () as * const c_char) ; table . is_uppercase = (gd_api . godot_method_bind_get_method) (class_name , "is_uppercase\0" . as_ptr () as * const c_char) ; table . set_alpha_cut_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_alpha_cut_mode\0" . as_ptr () as * const c_char) ; table . set_alpha_scissor_threshold = (gd_api . godot_method_bind_get_method) (class_name , "set_alpha_scissor_threshold\0" . as_ptr () as * const c_char) ; table . set_autowrap = (gd_api . godot_method_bind_get_method) (class_name , "set_autowrap\0" . as_ptr () as * const c_char) ; table . set_billboard_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_billboard_mode\0" . as_ptr () as * const c_char) ; table . set_draw_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_flag\0" . as_ptr () as * const c_char) ; table . set_font = (gd_api . godot_method_bind_get_method) (class_name , "set_font\0" . as_ptr () as * const c_char) ; table . set_horizontal_alignment = (gd_api . godot_method_bind_get_method) (class_name , "set_horizontal_alignment\0" . as_ptr () as * const c_char) ; table . set_line_spacing = (gd_api . godot_method_bind_get_method) (class_name , "set_line_spacing\0" . as_ptr () as * const c_char) ; table . set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_modulate\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_outline_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_outline_modulate\0" . as_ptr () as * const c_char) ; table . set_outline_render_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_outline_render_priority\0" . as_ptr () as * const c_char) ; table . set_pixel_size = (gd_api . godot_method_bind_get_method) (class_name , "set_pixel_size\0" . as_ptr () as * const c_char) ; table . set_render_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_render_priority\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; table . set_uppercase = (gd_api . godot_method_bind_get_method) (class_name , "set_uppercase\0" . as_ptr () as * const c_char) ; table . set_vertical_alignment = (gd_api . godot_method_bind_get_method) (class_name , "set_vertical_alignment\0" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::label_3d::private::Label3D;
            
            pub(crate) mod large_texture {
                # ! [doc = "This module contains types related to the API class [`LargeTexture`][super::LargeTexture]."] pub (crate) mod private { # [doc = "`core class LargeTexture` inherits `Texture` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_largetexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nLargeTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct LargeTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: LargeTexture ; impl LargeTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = LargeTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds `texture` to this [`LargeTexture`][LargeTexture], starting on offset `ofs`."] # [doc = ""] # [inline] pub fn add_piece (& self , ofs : Vector2 , texture : impl AsArg < crate :: generated :: Texture >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . add_piece ; let ret = crate :: icalls :: icallvar__vec2_obj (method_bind , self . this . sys () . as_ptr () , ofs , texture . as_arg_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Clears the [`LargeTexture`][LargeTexture]."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the number of pieces currently in this [`LargeTexture`][LargeTexture]."] # [doc = ""] # [inline] pub fn get_piece_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . get_piece_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the offset of the piece with the index `idx`."] # [doc = ""] # [inline] pub fn get_piece_offset (& self , idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . get_piece_offset ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`Texture`][Texture] of the piece with the index `idx`."] # [doc = ""] # [inline] pub fn get_piece_texture (& self , idx : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . get_piece_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the offset of the piece with the index `idx` to `ofs`."] # [doc = ""] # [inline] pub fn set_piece_offset (& self , idx : i64 , ofs : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . set_piece_offset ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , idx as _ , ofs) ; } } # [doc = "Sets the [`Texture`][Texture] of the piece with index `idx` to `texture`."] # [doc = ""] # [inline] pub fn set_piece_texture (& self , idx : i64 , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . set_piece_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , idx as _ , texture . as_arg_ptr ()) ; } } # [doc = "Sets the size of this [`LargeTexture`][LargeTexture]."] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LargeTextureMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for LargeTexture { } unsafe impl GodotObject for LargeTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "LargeTexture" } } impl std :: ops :: Deref for LargeTexture { type Target = crate :: generated :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for LargeTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Texture > for LargeTexture { } unsafe impl SubClass < crate :: generated :: Resource > for LargeTexture { } unsafe impl SubClass < crate :: generated :: Reference > for LargeTexture { } unsafe impl SubClass < crate :: generated :: Object > for LargeTexture { } impl Instanciable for LargeTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { LargeTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct LargeTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_piece : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub get_piece_count : * mut sys :: godot_method_bind , pub get_piece_offset : * mut sys :: godot_method_bind , pub get_piece_texture : * mut sys :: godot_method_bind , pub set_piece_offset : * mut sys :: godot_method_bind , pub set_piece_texture : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind } impl LargeTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : LargeTextureMethodTable = LargeTextureMethodTable { class_constructor : None , add_piece : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , get_piece_count : 0 as * mut sys :: godot_method_bind , get_piece_offset : 0 as * mut sys :: godot_method_bind , get_piece_texture : 0 as * mut sys :: godot_method_bind , set_piece_offset : 0 as * mut sys :: godot_method_bind , set_piece_texture : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { LargeTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "LargeTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_piece = (gd_api . godot_method_bind_get_method) (class_name , "add_piece\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_piece_count = (gd_api . godot_method_bind_get_method) (class_name , "get_piece_count\0" . as_ptr () as * const c_char) ; table . get_piece_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_piece_offset\0" . as_ptr () as * const c_char) ; table . get_piece_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_piece_texture\0" . as_ptr () as * const c_char) ; table . set_piece_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_piece_offset\0" . as_ptr () as * const c_char) ; table . set_piece_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_piece_texture\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::large_texture::private::LargeTexture;
            
            pub mod light {
                # ! [doc = "This module contains types related to the API class [`Light`][super::Light]."] pub (crate) mod private { # [doc = "`core class Light` inherits `VisualInstance` (manually managed).\n\nThis class has related types in the [`light`][super::light] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_light.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nLight inherits methods from:\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Light { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Light ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BakeMode (pub i64) ; impl BakeMode { pub const DISABLED : BakeMode = BakeMode (0i64) ; pub const INDIRECT : BakeMode = BakeMode (1i64) ; pub const ALL : BakeMode = BakeMode (2i64) ; } impl From < i64 > for BakeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BakeMode > for i64 { # [inline] fn from (v : BakeMode) -> Self { v . 0 } } impl FromVariant for BakeMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Param (pub i64) ; impl Param { pub const ENERGY : Param = Param (0i64) ; pub const INDIRECT_ENERGY : Param = Param (1i64) ; pub const SIZE : Param = Param (2i64) ; pub const SPECULAR : Param = Param (3i64) ; pub const RANGE : Param = Param (4i64) ; pub const ATTENUATION : Param = Param (5i64) ; pub const SPOT_ANGLE : Param = Param (6i64) ; pub const SPOT_ATTENUATION : Param = Param (7i64) ; pub const CONTACT_SHADOW_SIZE : Param = Param (8i64) ; pub const SHADOW_MAX_DISTANCE : Param = Param (9i64) ; pub const SHADOW_SPLIT_1_OFFSET : Param = Param (10i64) ; pub const SHADOW_SPLIT_2_OFFSET : Param = Param (11i64) ; pub const SHADOW_SPLIT_3_OFFSET : Param = Param (12i64) ; pub const SHADOW_NORMAL_BIAS : Param = Param (13i64) ; pub const SHADOW_BIAS : Param = Param (14i64) ; pub const SHADOW_BIAS_SPLIT_SCALE : Param = Param (15i64) ; pub const MAX : Param = Param (16i64) ; } impl From < i64 > for Param { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Param > for i64 { # [inline] fn from (v : Param) -> Self { v . 0 } } impl FromVariant for Param { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Light { pub const BAKE_DISABLED : i64 = 0i64 ; pub const PARAM_ENERGY : i64 = 0i64 ; pub const BAKE_INDIRECT : i64 = 1i64 ; pub const PARAM_INDIRECT_ENERGY : i64 = 1i64 ; pub const BAKE_ALL : i64 = 2i64 ; pub const PARAM_SIZE : i64 = 2i64 ; pub const PARAM_SPECULAR : i64 = 3i64 ; pub const PARAM_RANGE : i64 = 4i64 ; pub const PARAM_ATTENUATION : i64 = 5i64 ; pub const PARAM_SPOT_ANGLE : i64 = 6i64 ; pub const PARAM_SPOT_ATTENUATION : i64 = 7i64 ; pub const PARAM_CONTACT_SHADOW_SIZE : i64 = 8i64 ; pub const PARAM_SHADOW_MAX_DISTANCE : i64 = 9i64 ; pub const PARAM_SHADOW_SPLIT_1_OFFSET : i64 = 10i64 ; pub const PARAM_SHADOW_SPLIT_2_OFFSET : i64 = 11i64 ; pub const PARAM_SHADOW_SPLIT_3_OFFSET : i64 = 12i64 ; pub const PARAM_SHADOW_NORMAL_BIAS : i64 = 13i64 ; pub const PARAM_SHADOW_BIAS : i64 = 14i64 ; pub const PARAM_SHADOW_BIAS_SPLIT_SCALE : i64 = 15i64 ; pub const PARAM_MAX : i64 = 16i64 ; } impl Light { # [doc = "The light's bake mode. See [`BakeMode`][BakeMode]."] # [doc = ""] # [inline] pub fn bake_mode (& self) -> crate :: generated :: light :: BakeMode { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_bake_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: light :: BakeMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The light's color. An _overbright_ color can be used to achieve a result equivalent to increasing the light's [`light_energy`][Self::light_energy]."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The light will affect objects in the selected layers."] # [doc = ""] # [inline] pub fn cull_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_cull_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the value of the specified [enum Light.Param] parameter."] # [doc = ""] # [inline] pub fn param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The color of shadows cast by this light."] # [doc = ""] # [inline] pub fn shadow_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_shadow_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [`GeometryInstance.SHADOW_CASTING_SETTING_DOUBLE_SIDED`][GeometryInstance::SHADOW_CASTING_SETTING_DOUBLE_SIDED]."] # [doc = ""] # [inline] pub fn shadow_reverse_cull_face (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_shadow_reverse_cull_face ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the light will cast shadows."] # [doc = ""] # [inline] pub fn has_shadow (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . has_shadow ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the light only appears in the editor and will not be visible at runtime."] # [doc = ""] # [inline] pub fn is_editor_only (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . is_editor_only ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the light's effect is reversed, darkening areas and casting bright shadows."] # [doc = ""] # [inline] pub fn is_negative (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . is_negative ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The light's bake mode. See [`BakeMode`][BakeMode]."] # [doc = ""] # [inline] pub fn set_bake_mode (& self , bake_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_bake_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bake_mode as _) ; } } # [doc = "The light's color. An _overbright_ color can be used to achieve a result equivalent to increasing the light's [`light_energy`][Self::light_energy]."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The light will affect objects in the selected layers."] # [doc = ""] # [inline] pub fn set_cull_mask (& self , cull_mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_cull_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , cull_mask as _) ; } } # [doc = "If `true`, the light only appears in the editor and will not be visible at runtime."] # [doc = ""] # [inline] pub fn set_editor_only (& self , editor_only : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_editor_only ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , editor_only as _) ; } } # [doc = "If `true`, the light's effect is reversed, darkening areas and casting bright shadows."] # [doc = ""] # [inline] pub fn set_negative (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_negative ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Sets the value of the specified [enum Light.Param] parameter."] # [doc = ""] # [inline] pub fn set_param (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , param as _ , value as _) ; } } # [doc = "If `true`, the light will cast shadows."] # [doc = ""] # [inline] pub fn set_shadow (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_shadow ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The color of shadows cast by this light."] # [doc = ""] # [inline] pub fn set_shadow_color (& self , shadow_color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_shadow_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , shadow_color) ; } } # [doc = "If `true`, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [`GeometryInstance.SHADOW_CASTING_SETTING_DOUBLE_SIDED`][GeometryInstance::SHADOW_CASTING_SETTING_DOUBLE_SIDED]."] # [doc = ""] # [inline] pub fn set_shadow_reverse_cull_face (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_shadow_reverse_cull_face ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The light's strength multiplier (this is not a physical unit). For [`OmniLight`][OmniLight] and [`SpotLight`][SpotLight], changing this value will only change the light color's intensity, not the light's radius."] # [doc = ""] # [inline] pub fn light_energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The light's strength multiplier (this is not a physical unit). For [`OmniLight`][OmniLight] and [`SpotLight`][SpotLight], changing this value will only change the light color's intensity, not the light's radius."] # [doc = ""] # [inline] pub fn set_light_energy (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "Secondary multiplier used with indirect light (light bounces). This works on both [`BakedLightmap`][BakedLightmap] and [`GIProbe`][GIProbe]."] # [doc = ""] # [inline] pub fn light_indirect_energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Secondary multiplier used with indirect light (light bounces). This works on both [`BakedLightmap`][BakedLightmap] and [`GIProbe`][GIProbe]."] # [doc = ""] # [inline] pub fn set_light_indirect_energy (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "The size of the light in Godot units. Only considered in baked lightmaps and only if [`light_bake_mode`][Self::light_bake_mode] is set to [`BAKE_ALL`][Self::BAKE_ALL]. Increasing this value will make the shadows appear blurrier. This can be used to simulate area lights to an extent."] # [doc = ""] # [inline] pub fn light_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The size of the light in Godot units. Only considered in baked lightmaps and only if [`light_bake_mode`][Self::light_bake_mode] is set to [`BAKE_ALL`][Self::BAKE_ALL]. Increasing this value will make the shadows appear blurrier. This can be used to simulate area lights to an extent."] # [doc = ""] # [inline] pub fn set_light_size (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "The intensity of the specular blob in objects affected by the light. At `0`, the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface."] # [doc = ""] # [inline] pub fn light_specular (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The intensity of the specular blob in objects affected by the light. At `0`, the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface."] # [doc = ""] # [inline] pub fn set_light_specular (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Used to adjust shadow appearance. Too small a value results in self-shadowing (\"shadow acne\"), while too large a value causes shadows to separate from casters (\"peter-panning\"). Adjust as needed."] # [doc = ""] # [inline] pub fn shadow_bias (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 14i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Used to adjust shadow appearance. Too small a value results in self-shadowing (\"shadow acne\"), while too large a value causes shadows to separate from casters (\"peter-panning\"). Adjust as needed."] # [doc = ""] # [inline] pub fn set_shadow_bias (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 14i64 , value as _) ; } } # [doc = "Attempts to reduce [`shadow_bias`][Self::shadow_bias] gap by rendering screen-space contact shadows. This has a performance impact, especially at higher values.\n**Note:** Contact shadows can look broken, so leaving this property to `0.0` is recommended."] # [doc = ""] # [inline] pub fn shadow_contact (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 8i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Attempts to reduce [`shadow_bias`][Self::shadow_bias] gap by rendering screen-space contact shadows. This has a performance impact, especially at higher values.\n**Note:** Contact shadows can look broken, so leaving this property to `0.0` is recommended."] # [doc = ""] # [inline] pub fn set_shadow_contact (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = LightMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 8i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Light { } unsafe impl GodotObject for Light { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Light" } } impl QueueFree for Light { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Light { type Target = crate :: generated :: VisualInstance ; # [inline] fn deref (& self) -> & crate :: generated :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Light { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualInstance > for Light { } unsafe impl SubClass < crate :: generated :: CullInstance > for Light { } unsafe impl SubClass < crate :: generated :: Spatial > for Light { } unsafe impl SubClass < crate :: generated :: Node > for Light { } unsafe impl SubClass < crate :: generated :: Object > for Light { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct LightMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bake_mode : * mut sys :: godot_method_bind , pub get_color : * mut sys :: godot_method_bind , pub get_cull_mask : * mut sys :: godot_method_bind , pub get_param : * mut sys :: godot_method_bind , pub get_shadow_color : * mut sys :: godot_method_bind , pub get_shadow_reverse_cull_face : * mut sys :: godot_method_bind , pub has_shadow : * mut sys :: godot_method_bind , pub is_editor_only : * mut sys :: godot_method_bind , pub is_negative : * mut sys :: godot_method_bind , pub set_bake_mode : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_cull_mask : * mut sys :: godot_method_bind , pub set_editor_only : * mut sys :: godot_method_bind , pub set_negative : * mut sys :: godot_method_bind , pub set_param : * mut sys :: godot_method_bind , pub set_shadow : * mut sys :: godot_method_bind , pub set_shadow_color : * mut sys :: godot_method_bind , pub set_shadow_reverse_cull_face : * mut sys :: godot_method_bind } impl LightMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : LightMethodTable = LightMethodTable { class_constructor : None , get_bake_mode : 0 as * mut sys :: godot_method_bind , get_color : 0 as * mut sys :: godot_method_bind , get_cull_mask : 0 as * mut sys :: godot_method_bind , get_param : 0 as * mut sys :: godot_method_bind , get_shadow_color : 0 as * mut sys :: godot_method_bind , get_shadow_reverse_cull_face : 0 as * mut sys :: godot_method_bind , has_shadow : 0 as * mut sys :: godot_method_bind , is_editor_only : 0 as * mut sys :: godot_method_bind , is_negative : 0 as * mut sys :: godot_method_bind , set_bake_mode : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_cull_mask : 0 as * mut sys :: godot_method_bind , set_editor_only : 0 as * mut sys :: godot_method_bind , set_negative : 0 as * mut sys :: godot_method_bind , set_param : 0 as * mut sys :: godot_method_bind , set_shadow : 0 as * mut sys :: godot_method_bind , set_shadow_color : 0 as * mut sys :: godot_method_bind , set_shadow_reverse_cull_face : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { LightMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Light\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bake_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_bake_mode\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_cull_mask\0" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . get_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_color\0" . as_ptr () as * const c_char) ; table . get_shadow_reverse_cull_face = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_reverse_cull_face\0" . as_ptr () as * const c_char) ; table . has_shadow = (gd_api . godot_method_bind_get_method) (class_name , "has_shadow\0" . as_ptr () as * const c_char) ; table . is_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "is_editor_only\0" . as_ptr () as * const c_char) ; table . is_negative = (gd_api . godot_method_bind_get_method) (class_name , "is_negative\0" . as_ptr () as * const c_char) ; table . set_bake_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_mode\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mask\0" . as_ptr () as * const c_char) ; table . set_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "set_editor_only\0" . as_ptr () as * const c_char) ; table . set_negative = (gd_api . godot_method_bind_get_method) (class_name , "set_negative\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; table . set_shadow = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow\0" . as_ptr () as * const c_char) ; table . set_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_color\0" . as_ptr () as * const c_char) ; table . set_shadow_reverse_cull_face = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_reverse_cull_face\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::light::private::Light;
            
            pub mod light_2d {
                # ! [doc = "This module contains types related to the API class [`Light2D`][super::Light2D]."] pub (crate) mod private { # [doc = "`core class Light2D` inherits `Node2D` (manually managed).\n\nThis class has related types in the [`light_2d`][super::light_2d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_light2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Light2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Light2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nLight2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Light2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Light2D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const ADD : Mode = Mode (0i64) ; pub const SUB : Mode = Mode (1i64) ; pub const MIX : Mode = Mode (2i64) ; pub const MASK : Mode = Mode (3i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } impl FromVariant for Mode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShadowFilter (pub i64) ; impl ShadowFilter { pub const NONE : ShadowFilter = ShadowFilter (0i64) ; pub const PCF3 : ShadowFilter = ShadowFilter (1i64) ; pub const PCF5 : ShadowFilter = ShadowFilter (2i64) ; pub const PCF7 : ShadowFilter = ShadowFilter (3i64) ; pub const PCF9 : ShadowFilter = ShadowFilter (4i64) ; pub const PCF13 : ShadowFilter = ShadowFilter (5i64) ; } impl From < i64 > for ShadowFilter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShadowFilter > for i64 { # [inline] fn from (v : ShadowFilter) -> Self { v . 0 } } impl FromVariant for ShadowFilter { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Light2D { pub const MODE_ADD : i64 = 0i64 ; pub const SHADOW_FILTER_NONE : i64 = 0i64 ; pub const MODE_SUB : i64 = 1i64 ; pub const SHADOW_FILTER_PCF3 : i64 = 1i64 ; pub const MODE_MIX : i64 = 2i64 ; pub const SHADOW_FILTER_PCF5 : i64 = 2i64 ; pub const MODE_MASK : i64 = 3i64 ; pub const SHADOW_FILTER_PCF7 : i64 = 3i64 ; pub const SHADOW_FILTER_PCF9 : i64 = 4i64 ; pub const SHADOW_FILTER_PCF13 : i64 = 5i64 ; } impl Light2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Light2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The Light2D's [`Color`][Color]."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The Light2D's energy value. The larger the value, the stronger the light."] # [doc = ""] # [inline] pub fn energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_energy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The height of the Light2D. Used with 2D normal mapping."] # [doc = ""] # [inline] pub fn height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The layer mask. Only objects with a matching mask will be affected by the Light2D."] # [doc = ""] # [inline] pub fn item_cull_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_item_cull_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The shadow mask. Used with [`LightOccluder2D`][LightOccluder2D] to cast shadows. Only occluders with a matching light mask will cast shadows."] # [doc = ""] # [inline] pub fn item_shadow_cull_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_item_shadow_cull_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Maximum layer value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn layer_range_max (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_layer_range_max ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Minimum layer value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn layer_range_min (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_layer_range_min ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The Light2D's mode. See [`Mode`][Mode] constants for values."] # [doc = ""] # [inline] pub fn mode (& self) -> crate :: generated :: light_2d :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: light_2d :: Mode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Shadow buffer size."] # [doc = ""] # [inline] pub fn shadow_buffer_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_shadow_buffer_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "[`Color`][Color] of shadows cast by the Light2D."] # [doc = ""] # [inline] pub fn shadow_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_shadow_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Shadow filter type. See [`ShadowFilter`][ShadowFilter] for possible values."] # [doc = ""] # [inline] pub fn shadow_filter (& self) -> crate :: generated :: light_2d :: ShadowFilter { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_shadow_filter ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: light_2d :: ShadowFilter > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Smooth shadow gradient length."] # [doc = ""] # [inline] pub fn shadow_gradient_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_shadow_gradient_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Smoothing value for shadows."] # [doc = ""] # [inline] pub fn shadow_smooth (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_shadow_smooth ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "[`Texture`][Texture] used for the Light2D's appearance."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The offset of the Light2D's `texture`."] # [doc = ""] # [inline] pub fn texture_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_texture_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The `texture`'s scale factor."] # [doc = ""] # [inline] pub fn texture_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_texture_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Maximum `z` value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn z_range_max (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_z_range_max ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Minimum `z` value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn z_range_min (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . get_z_range_min ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, Light2D will only appear when editing the scene."] # [doc = ""] # [inline] pub fn is_editor_only (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . is_editor_only ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, Light2D will emit light."] # [doc = ""] # [inline] pub fn is_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . is_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the Light2D will cast shadows."] # [doc = ""] # [inline] pub fn is_shadow_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . is_shadow_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The Light2D's [`Color`][Color]."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "If `true`, Light2D will only appear when editing the scene."] # [doc = ""] # [inline] pub fn set_editor_only (& self , editor_only : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_editor_only ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , editor_only as _) ; } } # [doc = "If `true`, Light2D will emit light."] # [doc = ""] # [inline] pub fn set_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The Light2D's energy value. The larger the value, the stronger the light."] # [doc = ""] # [inline] pub fn set_energy (& self , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_energy ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , energy as _) ; } } # [doc = "The height of the Light2D. Used with 2D normal mapping."] # [doc = ""] # [inline] pub fn set_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = "The layer mask. Only objects with a matching mask will be affected by the Light2D."] # [doc = ""] # [inline] pub fn set_item_cull_mask (& self , item_cull_mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_item_cull_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , item_cull_mask as _) ; } } # [doc = "The shadow mask. Used with [`LightOccluder2D`][LightOccluder2D] to cast shadows. Only occluders with a matching light mask will cast shadows."] # [doc = ""] # [inline] pub fn set_item_shadow_cull_mask (& self , item_shadow_cull_mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_item_shadow_cull_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , item_shadow_cull_mask as _) ; } } # [doc = "Maximum layer value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn set_layer_range_max (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_layer_range_max ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , layer as _) ; } } # [doc = "Minimum layer value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn set_layer_range_min (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_layer_range_min ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , layer as _) ; } } # [doc = "The Light2D's mode. See [`Mode`][Mode] constants for values."] # [doc = ""] # [inline] pub fn set_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Shadow buffer size."] # [doc = ""] # [inline] pub fn set_shadow_buffer_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_shadow_buffer_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } # [doc = "[`Color`][Color] of shadows cast by the Light2D."] # [doc = ""] # [inline] pub fn set_shadow_color (& self , shadow_color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_shadow_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , shadow_color) ; } } # [doc = "If `true`, the Light2D will cast shadows."] # [doc = ""] # [inline] pub fn set_shadow_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_shadow_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Shadow filter type. See [`ShadowFilter`][ShadowFilter] for possible values."] # [doc = ""] # [inline] pub fn set_shadow_filter (& self , filter : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_shadow_filter ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , filter as _) ; } } # [doc = "Smooth shadow gradient length."] # [doc = ""] # [inline] pub fn set_shadow_gradient_length (& self , multiplier : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_shadow_gradient_length ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , multiplier as _) ; } } # [doc = "Smoothing value for shadows."] # [doc = ""] # [inline] pub fn set_shadow_smooth (& self , smooth : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_shadow_smooth ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , smooth as _) ; } } # [doc = "[`Texture`][Texture] used for the Light2D's appearance."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "The offset of the Light2D's `texture`."] # [doc = ""] # [inline] pub fn set_texture_offset (& self , texture_offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_texture_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , texture_offset) ; } } # [doc = "The `texture`'s scale factor."] # [doc = ""] # [inline] pub fn set_texture_scale (& self , texture_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_texture_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , texture_scale as _) ; } } # [doc = "Maximum `z` value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn set_z_range_max (& self , z : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_z_range_max ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , z as _) ; } } # [doc = "Minimum `z` value of objects that are affected by the Light2D."] # [doc = ""] # [inline] pub fn set_z_range_min (& self , z : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Light2DMethodTable :: get (get_api ()) . set_z_range_min ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , z as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Light2D { } unsafe impl GodotObject for Light2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Light2D" } } impl QueueFree for Light2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Light2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Light2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for Light2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Light2D { } unsafe impl SubClass < crate :: generated :: Node > for Light2D { } unsafe impl SubClass < crate :: generated :: Object > for Light2D { } impl Instanciable for Light2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Light2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Light2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_color : * mut sys :: godot_method_bind , pub get_energy : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_item_cull_mask : * mut sys :: godot_method_bind , pub get_item_shadow_cull_mask : * mut sys :: godot_method_bind , pub get_layer_range_max : * mut sys :: godot_method_bind , pub get_layer_range_min : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub get_shadow_buffer_size : * mut sys :: godot_method_bind , pub get_shadow_color : * mut sys :: godot_method_bind , pub get_shadow_filter : * mut sys :: godot_method_bind , pub get_shadow_gradient_length : * mut sys :: godot_method_bind , pub get_shadow_smooth : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_texture_offset : * mut sys :: godot_method_bind , pub get_texture_scale : * mut sys :: godot_method_bind , pub get_z_range_max : * mut sys :: godot_method_bind , pub get_z_range_min : * mut sys :: godot_method_bind , pub is_editor_only : * mut sys :: godot_method_bind , pub is_enabled : * mut sys :: godot_method_bind , pub is_shadow_enabled : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_editor_only : * mut sys :: godot_method_bind , pub set_enabled : * mut sys :: godot_method_bind , pub set_energy : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_item_cull_mask : * mut sys :: godot_method_bind , pub set_item_shadow_cull_mask : * mut sys :: godot_method_bind , pub set_layer_range_max : * mut sys :: godot_method_bind , pub set_layer_range_min : * mut sys :: godot_method_bind , pub set_mode : * mut sys :: godot_method_bind , pub set_shadow_buffer_size : * mut sys :: godot_method_bind , pub set_shadow_color : * mut sys :: godot_method_bind , pub set_shadow_enabled : * mut sys :: godot_method_bind , pub set_shadow_filter : * mut sys :: godot_method_bind , pub set_shadow_gradient_length : * mut sys :: godot_method_bind , pub set_shadow_smooth : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_texture_offset : * mut sys :: godot_method_bind , pub set_texture_scale : * mut sys :: godot_method_bind , pub set_z_range_max : * mut sys :: godot_method_bind , pub set_z_range_min : * mut sys :: godot_method_bind } impl Light2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Light2DMethodTable = Light2DMethodTable { class_constructor : None , get_color : 0 as * mut sys :: godot_method_bind , get_energy : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_item_cull_mask : 0 as * mut sys :: godot_method_bind , get_item_shadow_cull_mask : 0 as * mut sys :: godot_method_bind , get_layer_range_max : 0 as * mut sys :: godot_method_bind , get_layer_range_min : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , get_shadow_buffer_size : 0 as * mut sys :: godot_method_bind , get_shadow_color : 0 as * mut sys :: godot_method_bind , get_shadow_filter : 0 as * mut sys :: godot_method_bind , get_shadow_gradient_length : 0 as * mut sys :: godot_method_bind , get_shadow_smooth : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_texture_offset : 0 as * mut sys :: godot_method_bind , get_texture_scale : 0 as * mut sys :: godot_method_bind , get_z_range_max : 0 as * mut sys :: godot_method_bind , get_z_range_min : 0 as * mut sys :: godot_method_bind , is_editor_only : 0 as * mut sys :: godot_method_bind , is_enabled : 0 as * mut sys :: godot_method_bind , is_shadow_enabled : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_editor_only : 0 as * mut sys :: godot_method_bind , set_enabled : 0 as * mut sys :: godot_method_bind , set_energy : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_item_cull_mask : 0 as * mut sys :: godot_method_bind , set_item_shadow_cull_mask : 0 as * mut sys :: godot_method_bind , set_layer_range_max : 0 as * mut sys :: godot_method_bind , set_layer_range_min : 0 as * mut sys :: godot_method_bind , set_mode : 0 as * mut sys :: godot_method_bind , set_shadow_buffer_size : 0 as * mut sys :: godot_method_bind , set_shadow_color : 0 as * mut sys :: godot_method_bind , set_shadow_enabled : 0 as * mut sys :: godot_method_bind , set_shadow_filter : 0 as * mut sys :: godot_method_bind , set_shadow_gradient_length : 0 as * mut sys :: godot_method_bind , set_shadow_smooth : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_texture_offset : 0 as * mut sys :: godot_method_bind , set_texture_scale : 0 as * mut sys :: godot_method_bind , set_z_range_max : 0 as * mut sys :: godot_method_bind , set_z_range_min : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Light2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Light2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_energy\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_item_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_item_cull_mask\0" . as_ptr () as * const c_char) ; table . get_item_shadow_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_item_shadow_cull_mask\0" . as_ptr () as * const c_char) ; table . get_layer_range_max = (gd_api . godot_method_bind_get_method) (class_name , "get_layer_range_max\0" . as_ptr () as * const c_char) ; table . get_layer_range_min = (gd_api . godot_method_bind_get_method) (class_name , "get_layer_range_min\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_shadow_buffer_size = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_buffer_size\0" . as_ptr () as * const c_char) ; table . get_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_color\0" . as_ptr () as * const c_char) ; table . get_shadow_filter = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_filter\0" . as_ptr () as * const c_char) ; table . get_shadow_gradient_length = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_gradient_length\0" . as_ptr () as * const c_char) ; table . get_shadow_smooth = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_smooth\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_offset\0" . as_ptr () as * const c_char) ; table . get_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_scale\0" . as_ptr () as * const c_char) ; table . get_z_range_max = (gd_api . godot_method_bind_get_method) (class_name , "get_z_range_max\0" . as_ptr () as * const c_char) ; table . get_z_range_min = (gd_api . godot_method_bind_get_method) (class_name , "get_z_range_min\0" . as_ptr () as * const c_char) ; table . is_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "is_editor_only\0" . as_ptr () as * const c_char) ; table . is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabled\0" . as_ptr () as * const c_char) ; table . is_shadow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_shadow_enabled\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "set_editor_only\0" . as_ptr () as * const c_char) ; table . set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled\0" . as_ptr () as * const c_char) ; table . set_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_energy\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_item_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_item_cull_mask\0" . as_ptr () as * const c_char) ; table . set_item_shadow_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_item_shadow_cull_mask\0" . as_ptr () as * const c_char) ; table . set_layer_range_max = (gd_api . godot_method_bind_get_method) (class_name , "set_layer_range_max\0" . as_ptr () as * const c_char) ; table . set_layer_range_min = (gd_api . godot_method_bind_get_method) (class_name , "set_layer_range_min\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_shadow_buffer_size = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_buffer_size\0" . as_ptr () as * const c_char) ; table . set_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_color\0" . as_ptr () as * const c_char) ; table . set_shadow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_enabled\0" . as_ptr () as * const c_char) ; table . set_shadow_filter = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_filter\0" . as_ptr () as * const c_char) ; table . set_shadow_gradient_length = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_gradient_length\0" . as_ptr () as * const c_char) ; table . set_shadow_smooth = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_smooth\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_offset\0" . as_ptr () as * const c_char) ; table . set_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_scale\0" . as_ptr () as * const c_char) ; table . set_z_range_max = (gd_api . godot_method_bind_get_method) (class_name , "set_z_range_max\0" . as_ptr () as * const c_char) ; table . set_z_range_min = (gd_api . godot_method_bind_get_method) (class_name , "set_z_range_min\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::light_2d::private::Light2D;
            
            pub(crate) mod light_occluder_2d {
                # ! [doc = "This module contains types related to the API class [`LightOccluder2D`][super::LightOccluder2D]."] pub (crate) mod private { # [doc = "`core class LightOccluder2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_lightoccluder2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`LightOccluder2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<LightOccluder2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nLightOccluder2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct LightOccluder2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: LightOccluder2D ; impl LightOccluder2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = LightOccluder2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s)."] # [doc = ""] # [inline] pub fn occluder_light_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LightOccluder2DMethodTable :: get (get_api ()) . get_occluder_light_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The [`OccluderPolygon2D`][OccluderPolygon2D] used to compute the shadow."] # [doc = ""] # [inline] pub fn occluder_polygon (& self) -> Option < Ref < crate :: generated :: OccluderPolygon2D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = LightOccluder2DMethodTable :: get (get_api ()) . get_occluder_polygon ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: OccluderPolygon2D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s)."] # [doc = ""] # [inline] pub fn set_occluder_light_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightOccluder2DMethodTable :: get (get_api ()) . set_occluder_light_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "The [`OccluderPolygon2D`][OccluderPolygon2D] used to compute the shadow."] # [doc = ""] # [inline] pub fn set_occluder_polygon (& self , polygon : impl AsArg < crate :: generated :: OccluderPolygon2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LightOccluder2DMethodTable :: get (get_api ()) . set_occluder_polygon ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , polygon . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for LightOccluder2D { } unsafe impl GodotObject for LightOccluder2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "LightOccluder2D" } } impl QueueFree for LightOccluder2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for LightOccluder2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for LightOccluder2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for LightOccluder2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for LightOccluder2D { } unsafe impl SubClass < crate :: generated :: Node > for LightOccluder2D { } unsafe impl SubClass < crate :: generated :: Object > for LightOccluder2D { } impl Instanciable for LightOccluder2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { LightOccluder2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct LightOccluder2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_occluder_light_mask : * mut sys :: godot_method_bind , pub get_occluder_polygon : * mut sys :: godot_method_bind , pub set_occluder_light_mask : * mut sys :: godot_method_bind , pub set_occluder_polygon : * mut sys :: godot_method_bind } impl LightOccluder2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : LightOccluder2DMethodTable = LightOccluder2DMethodTable { class_constructor : None , get_occluder_light_mask : 0 as * mut sys :: godot_method_bind , get_occluder_polygon : 0 as * mut sys :: godot_method_bind , set_occluder_light_mask : 0 as * mut sys :: godot_method_bind , set_occluder_polygon : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { LightOccluder2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "LightOccluder2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_occluder_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_occluder_light_mask\0" . as_ptr () as * const c_char) ; table . get_occluder_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_occluder_polygon\0" . as_ptr () as * const c_char) ; table . set_occluder_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_occluder_light_mask\0" . as_ptr () as * const c_char) ; table . set_occluder_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_occluder_polygon\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::light_occluder_2d::private::LightOccluder2D;
            
            pub mod line_2d {
                # ! [doc = "This module contains types related to the API class [`Line2D`][super::Line2D]."] pub (crate) mod private { # [doc = "`core class Line2D` inherits `Node2D` (manually managed).\n\nThis class has related types in the [`line_2d`][super::line_2d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_line2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Line2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Line2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nLine2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Line2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Line2D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LineCapMode (pub i64) ; impl LineCapMode { pub const NONE : LineCapMode = LineCapMode (0i64) ; pub const BOX : LineCapMode = LineCapMode (1i64) ; pub const ROUND : LineCapMode = LineCapMode (2i64) ; } impl From < i64 > for LineCapMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LineCapMode > for i64 { # [inline] fn from (v : LineCapMode) -> Self { v . 0 } } impl FromVariant for LineCapMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LineJointMode (pub i64) ; impl LineJointMode { pub const SHARP : LineJointMode = LineJointMode (0i64) ; pub const BEVEL : LineJointMode = LineJointMode (1i64) ; pub const ROUND : LineJointMode = LineJointMode (2i64) ; } impl From < i64 > for LineJointMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LineJointMode > for i64 { # [inline] fn from (v : LineJointMode) -> Self { v . 0 } } impl FromVariant for LineJointMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LineTextureMode (pub i64) ; impl LineTextureMode { pub const NONE : LineTextureMode = LineTextureMode (0i64) ; pub const TILE : LineTextureMode = LineTextureMode (1i64) ; pub const STRETCH : LineTextureMode = LineTextureMode (2i64) ; } impl From < i64 > for LineTextureMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LineTextureMode > for i64 { # [inline] fn from (v : LineTextureMode) -> Self { v . 0 } } impl FromVariant for LineTextureMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Line2D { pub const LINE_CAP_NONE : i64 = 0i64 ; pub const LINE_JOINT_SHARP : i64 = 0i64 ; pub const LINE_TEXTURE_NONE : i64 = 0i64 ; pub const LINE_CAP_BOX : i64 = 1i64 ; pub const LINE_JOINT_BEVEL : i64 = 1i64 ; pub const LINE_TEXTURE_TILE : i64 = 1i64 ; pub const LINE_CAP_ROUND : i64 = 2i64 ; pub const LINE_JOINT_ROUND : i64 = 2i64 ; pub const LINE_TEXTURE_STRETCH : i64 = 2i64 ; } impl Line2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Line2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a point with the specified `position` relative to the line's own position. Appends the new point at the end of the point list.\nIf `index` is given, the new point is inserted before the existing point identified by index `index`. Every existing point starting from `index` is shifted further down the list of points. The index must be greater than or equal to `0` and must not exceed the number of existing points in the line. See [`get_point_count`][Self::get_point_count].\n# Default Arguments\n* `index` - `-1`"] # [doc = ""] # [inline] pub fn add_point (& self , position : Vector2 , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . add_point ; let ret = crate :: icalls :: icallvar__vec2_i64 (method_bind , self . this . sys () . as_ptr () , position , index as _) ; } } # [doc = "Removes all points from the line."] # [doc = ""] # [inline] pub fn clear_points (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . clear_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the line's border will attempt to perform antialiasing by drawing thin OpenGL smooth lines on the line's edges.\n**Note:** Line2D is not accelerated by batching if [`antialiased`][Self::antialiased] is `true`.\n**Note:** Due to how it works, built-in antialiasing will not look correct for translucent lines and may not work on certain platforms. As a workaround, install the [Antialiased Line2D](https://github.com/godot-extended-libraries/godot-antialiased-line2d) add-on then create an AntialiasedLine2D node. That node relies on a texture with custom mipmaps to perform antialiasing. 2D batching is also still supported with those antialiased lines."] # [doc = ""] # [inline] pub fn antialiased (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_antialiased ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Controls the style of the line's first point. Use [`LineCapMode`][LineCapMode] constants."] # [doc = ""] # [inline] pub fn begin_cap_mode (& self) -> crate :: generated :: line_2d :: LineCapMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_begin_cap_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: line_2d :: LineCapMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The line's width varies with the curve. The original width is simply multiply by the value of the Curve."] # [doc = ""] # [inline] pub fn curve (& self) -> Option < Ref < crate :: generated :: Curve , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_curve ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Curve , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The line's color. Will not be used if a gradient is set."] # [doc = ""] # [inline] pub fn default_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_default_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Controls the style of the line's last point. Use [`LineCapMode`][LineCapMode] constants."] # [doc = ""] # [inline] pub fn end_cap_mode (& self) -> crate :: generated :: line_2d :: LineCapMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_end_cap_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: line_2d :: LineCapMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set."] # [doc = ""] # [inline] pub fn gradient (& self) -> Option < Ref < crate :: generated :: Gradient , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_gradient ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Gradient , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The style for the points between the start and the end."] # [doc = ""] # [inline] pub fn joint_mode (& self) -> crate :: generated :: line_2d :: LineJointMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_joint_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: line_2d :: LineJointMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the amount of points in the line."] # [doc = ""] # [inline] pub fn get_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_point_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the position of the point at index `index`."] # [doc = ""] # [inline] pub fn get_point_position (& self , index : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_point_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The points that form the lines. The line is drawn between every point set in this array. Points are interpreted as local vectors."] # [doc = ""] # [inline] pub fn points (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The smoothness of the rounded joints and caps. Higher values result in smoother corners, but are more demanding to render and update. This is only used if a cap or joint is set as round.\n**Note:** The default value is tuned for lines with the default [`width`][Self::width]. For thin lines, this value should be reduced to a number between `2` and `4` to improve performance."] # [doc = ""] # [inline] pub fn round_precision (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_round_precision ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The direction difference in radians between vector points. This value is only used if [`joint_mode`][Self::joint_mode] is set to [`LINE_JOINT_SHARP`][Self::LINE_JOINT_SHARP]."] # [doc = ""] # [inline] pub fn sharp_limit (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_sharp_limit ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The texture used for the line's texture. Uses `texture_mode` for drawing style."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The style to render the `texture` on the line. Use [`LineTextureMode`][LineTextureMode] constants."] # [doc = ""] # [inline] pub fn texture_mode (& self) -> crate :: generated :: line_2d :: LineTextureMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_texture_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: line_2d :: LineTextureMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The line's width."] # [doc = ""] # [inline] pub fn width (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . get_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Removes the point at index `index` from the line."] # [doc = ""] # [inline] pub fn remove_point (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . remove_point ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } # [doc = "If `true`, the line's border will attempt to perform antialiasing by drawing thin OpenGL smooth lines on the line's edges.\n**Note:** Line2D is not accelerated by batching if [`antialiased`][Self::antialiased] is `true`.\n**Note:** Due to how it works, built-in antialiasing will not look correct for translucent lines and may not work on certain platforms. As a workaround, install the [Antialiased Line2D](https://github.com/godot-extended-libraries/godot-antialiased-line2d) add-on then create an AntialiasedLine2D node. That node relies on a texture with custom mipmaps to perform antialiasing. 2D batching is also still supported with those antialiased lines."] # [doc = ""] # [inline] pub fn set_antialiased (& self , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_antialiased ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , antialiased as _) ; } } # [doc = "Controls the style of the line's first point. Use [`LineCapMode`][LineCapMode] constants."] # [doc = ""] # [inline] pub fn set_begin_cap_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_begin_cap_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The line's width varies with the curve. The original width is simply multiply by the value of the Curve."] # [doc = ""] # [inline] pub fn set_curve (& self , curve : impl AsArg < crate :: generated :: Curve >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_curve ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , curve . as_arg_ptr ()) ; } } # [doc = "The line's color. Will not be used if a gradient is set."] # [doc = ""] # [inline] pub fn set_default_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_default_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Controls the style of the line's last point. Use [`LineCapMode`][LineCapMode] constants."] # [doc = ""] # [inline] pub fn set_end_cap_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_end_cap_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set."] # [doc = ""] # [inline] pub fn set_gradient (& self , color : impl AsArg < crate :: generated :: Gradient >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_gradient ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , color . as_arg_ptr ()) ; } } # [doc = "The style for the points between the start and the end."] # [doc = ""] # [inline] pub fn set_joint_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_joint_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Overwrites the position of the point at index `index` with the supplied `position`."] # [doc = ""] # [inline] pub fn set_point_position (& self , index : i64 , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_point_position ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , index as _ , position) ; } } # [doc = "The points that form the lines. The line is drawn between every point set in this array. Points are interpreted as local vectors."] # [doc = ""] # [inline] pub fn set_points (& self , points : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_points ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , points) ; } } # [doc = "The smoothness of the rounded joints and caps. Higher values result in smoother corners, but are more demanding to render and update. This is only used if a cap or joint is set as round.\n**Note:** The default value is tuned for lines with the default [`width`][Self::width]. For thin lines, this value should be reduced to a number between `2` and `4` to improve performance."] # [doc = ""] # [inline] pub fn set_round_precision (& self , precision : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_round_precision ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , precision as _) ; } } # [doc = "The direction difference in radians between vector points. This value is only used if [`joint_mode`][Self::joint_mode] is set to [`LINE_JOINT_SHARP`][Self::LINE_JOINT_SHARP]."] # [doc = ""] # [inline] pub fn set_sharp_limit (& self , limit : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_sharp_limit ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , limit as _) ; } } # [doc = "The texture used for the line's texture. Uses `texture_mode` for drawing style."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "The style to render the `texture` on the line. Use [`LineTextureMode`][LineTextureMode] constants."] # [doc = ""] # [inline] pub fn set_texture_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_texture_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The line's width."] # [doc = ""] # [inline] pub fn set_width (& self , width : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Line2DMethodTable :: get (get_api ()) . set_width ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , width as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Line2D { } unsafe impl GodotObject for Line2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Line2D" } } impl QueueFree for Line2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Line2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Line2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for Line2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Line2D { } unsafe impl SubClass < crate :: generated :: Node > for Line2D { } unsafe impl SubClass < crate :: generated :: Object > for Line2D { } impl Instanciable for Line2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Line2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Line2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_point : * mut sys :: godot_method_bind , pub clear_points : * mut sys :: godot_method_bind , pub get_antialiased : * mut sys :: godot_method_bind , pub get_begin_cap_mode : * mut sys :: godot_method_bind , pub get_curve : * mut sys :: godot_method_bind , pub get_default_color : * mut sys :: godot_method_bind , pub get_end_cap_mode : * mut sys :: godot_method_bind , pub get_gradient : * mut sys :: godot_method_bind , pub get_joint_mode : * mut sys :: godot_method_bind , pub get_point_count : * mut sys :: godot_method_bind , pub get_point_position : * mut sys :: godot_method_bind , pub get_points : * mut sys :: godot_method_bind , pub get_round_precision : * mut sys :: godot_method_bind , pub get_sharp_limit : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_texture_mode : * mut sys :: godot_method_bind , pub get_width : * mut sys :: godot_method_bind , pub remove_point : * mut sys :: godot_method_bind , pub set_antialiased : * mut sys :: godot_method_bind , pub set_begin_cap_mode : * mut sys :: godot_method_bind , pub set_curve : * mut sys :: godot_method_bind , pub set_default_color : * mut sys :: godot_method_bind , pub set_end_cap_mode : * mut sys :: godot_method_bind , pub set_gradient : * mut sys :: godot_method_bind , pub set_joint_mode : * mut sys :: godot_method_bind , pub set_point_position : * mut sys :: godot_method_bind , pub set_points : * mut sys :: godot_method_bind , pub set_round_precision : * mut sys :: godot_method_bind , pub set_sharp_limit : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_texture_mode : * mut sys :: godot_method_bind , pub set_width : * mut sys :: godot_method_bind } impl Line2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Line2DMethodTable = Line2DMethodTable { class_constructor : None , add_point : 0 as * mut sys :: godot_method_bind , clear_points : 0 as * mut sys :: godot_method_bind , get_antialiased : 0 as * mut sys :: godot_method_bind , get_begin_cap_mode : 0 as * mut sys :: godot_method_bind , get_curve : 0 as * mut sys :: godot_method_bind , get_default_color : 0 as * mut sys :: godot_method_bind , get_end_cap_mode : 0 as * mut sys :: godot_method_bind , get_gradient : 0 as * mut sys :: godot_method_bind , get_joint_mode : 0 as * mut sys :: godot_method_bind , get_point_count : 0 as * mut sys :: godot_method_bind , get_point_position : 0 as * mut sys :: godot_method_bind , get_points : 0 as * mut sys :: godot_method_bind , get_round_precision : 0 as * mut sys :: godot_method_bind , get_sharp_limit : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_texture_mode : 0 as * mut sys :: godot_method_bind , get_width : 0 as * mut sys :: godot_method_bind , remove_point : 0 as * mut sys :: godot_method_bind , set_antialiased : 0 as * mut sys :: godot_method_bind , set_begin_cap_mode : 0 as * mut sys :: godot_method_bind , set_curve : 0 as * mut sys :: godot_method_bind , set_default_color : 0 as * mut sys :: godot_method_bind , set_end_cap_mode : 0 as * mut sys :: godot_method_bind , set_gradient : 0 as * mut sys :: godot_method_bind , set_joint_mode : 0 as * mut sys :: godot_method_bind , set_point_position : 0 as * mut sys :: godot_method_bind , set_points : 0 as * mut sys :: godot_method_bind , set_round_precision : 0 as * mut sys :: godot_method_bind , set_sharp_limit : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_texture_mode : 0 as * mut sys :: godot_method_bind , set_width : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Line2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Line2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_point = (gd_api . godot_method_bind_get_method) (class_name , "add_point\0" . as_ptr () as * const c_char) ; table . clear_points = (gd_api . godot_method_bind_get_method) (class_name , "clear_points\0" . as_ptr () as * const c_char) ; table . get_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "get_antialiased\0" . as_ptr () as * const c_char) ; table . get_begin_cap_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_begin_cap_mode\0" . as_ptr () as * const c_char) ; table . get_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_curve\0" . as_ptr () as * const c_char) ; table . get_default_color = (gd_api . godot_method_bind_get_method) (class_name , "get_default_color\0" . as_ptr () as * const c_char) ; table . get_end_cap_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_end_cap_mode\0" . as_ptr () as * const c_char) ; table . get_gradient = (gd_api . godot_method_bind_get_method) (class_name , "get_gradient\0" . as_ptr () as * const c_char) ; table . get_joint_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_joint_mode\0" . as_ptr () as * const c_char) ; table . get_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_point_count\0" . as_ptr () as * const c_char) ; table . get_point_position = (gd_api . godot_method_bind_get_method) (class_name , "get_point_position\0" . as_ptr () as * const c_char) ; table . get_points = (gd_api . godot_method_bind_get_method) (class_name , "get_points\0" . as_ptr () as * const c_char) ; table . get_round_precision = (gd_api . godot_method_bind_get_method) (class_name , "get_round_precision\0" . as_ptr () as * const c_char) ; table . get_sharp_limit = (gd_api . godot_method_bind_get_method) (class_name , "get_sharp_limit\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_texture_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_mode\0" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\0" . as_ptr () as * const c_char) ; table . remove_point = (gd_api . godot_method_bind_get_method) (class_name , "remove_point\0" . as_ptr () as * const c_char) ; table . set_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "set_antialiased\0" . as_ptr () as * const c_char) ; table . set_begin_cap_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_begin_cap_mode\0" . as_ptr () as * const c_char) ; table . set_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_curve\0" . as_ptr () as * const c_char) ; table . set_default_color = (gd_api . godot_method_bind_get_method) (class_name , "set_default_color\0" . as_ptr () as * const c_char) ; table . set_end_cap_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_end_cap_mode\0" . as_ptr () as * const c_char) ; table . set_gradient = (gd_api . godot_method_bind_get_method) (class_name , "set_gradient\0" . as_ptr () as * const c_char) ; table . set_joint_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_joint_mode\0" . as_ptr () as * const c_char) ; table . set_point_position = (gd_api . godot_method_bind_get_method) (class_name , "set_point_position\0" . as_ptr () as * const c_char) ; table . set_points = (gd_api . godot_method_bind_get_method) (class_name , "set_points\0" . as_ptr () as * const c_char) ; table . set_round_precision = (gd_api . godot_method_bind_get_method) (class_name , "set_round_precision\0" . as_ptr () as * const c_char) ; table . set_sharp_limit = (gd_api . godot_method_bind_get_method) (class_name , "set_sharp_limit\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_texture_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_mode\0" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::line_2d::private::Line2D;
            
            pub mod line_edit {
                # ! [doc = "This module contains types related to the API class [`LineEdit`][super::LineEdit]."] pub (crate) mod private { # [doc = "`core class LineEdit` inherits `Control` (manually managed).\n\nThis class has related types in the [`line_edit`][super::line_edit] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_lineedit.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`LineEdit` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<LineEdit>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nLineEdit inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct LineEdit { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: LineEdit ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Align (pub i64) ; impl Align { pub const LEFT : Align = Align (0i64) ; pub const CENTER : Align = Align (1i64) ; pub const RIGHT : Align = Align (2i64) ; pub const FILL : Align = Align (3i64) ; } impl From < i64 > for Align { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Align > for i64 { # [inline] fn from (v : Align) -> Self { v . 0 } } impl FromVariant for Align { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MenuItems (pub i64) ; impl MenuItems { pub const CUT : MenuItems = MenuItems (0i64) ; pub const COPY : MenuItems = MenuItems (1i64) ; pub const PASTE : MenuItems = MenuItems (2i64) ; pub const CLEAR : MenuItems = MenuItems (3i64) ; pub const SELECT_ALL : MenuItems = MenuItems (4i64) ; pub const UNDO : MenuItems = MenuItems (5i64) ; pub const REDO : MenuItems = MenuItems (6i64) ; pub const MAX : MenuItems = MenuItems (7i64) ; } impl From < i64 > for MenuItems { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MenuItems > for i64 { # [inline] fn from (v : MenuItems) -> Self { v . 0 } } impl FromVariant for MenuItems { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl LineEdit { pub const ALIGN_LEFT : i64 = 0i64 ; pub const MENU_CUT : i64 = 0i64 ; pub const ALIGN_CENTER : i64 = 1i64 ; pub const MENU_COPY : i64 = 1i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const MENU_PASTE : i64 = 2i64 ; pub const ALIGN_FILL : i64 = 3i64 ; pub const MENU_CLEAR : i64 = 3i64 ; pub const MENU_SELECT_ALL : i64 = 4i64 ; pub const MENU_UNDO : i64 = 5i64 ; pub const MENU_REDO : i64 = 6i64 ; pub const MENU_MAX : i64 = 7i64 ; } impl LineEdit { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = LineEditMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds `text` after the cursor. If the resulting value is longer than [`max_length`][Self::max_length], nothing happens."] # [doc = ""] # [inline] pub fn append_at_cursor (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . append_at_cursor ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Erases the [`LineEdit`][LineEdit]'s [`text`][Self::text]."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the caret (visual cursor) blinks."] # [doc = ""] # [inline] pub fn cursor_get_blink_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . cursor_get_blink_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Duration (in seconds) of a caret's blinking cycle."] # [doc = ""] # [inline] pub fn cursor_get_blink_speed (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . cursor_get_blink_speed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the caret (visual cursor) blinks."] # [doc = ""] # [inline] pub fn cursor_set_blink_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . cursor_set_blink_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Duration (in seconds) of a caret's blinking cycle."] # [doc = ""] # [inline] pub fn cursor_set_blink_speed (& self , blink_speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . cursor_set_blink_speed ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , blink_speed as _) ; } } # [doc = "Deletes one character at the cursor's current position (equivalent to pressing the `Delete` key)."] # [doc = ""] # [inline] pub fn delete_char_at_cursor (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . delete_char_at_cursor ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Deletes a section of the [`text`][Self::text] going from position `from_column` to `to_column`. Both parameters should be within the text's length."] # [doc = ""] # [inline] pub fn delete_text (& self , from_column : i64 , to_column : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . delete_text ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , from_column as _ , to_column as _) ; } } # [doc = "Clears the current selection."] # [doc = ""] # [inline] pub fn deselect (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . deselect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Text alignment as defined in the [`Align`][Align] enum."] # [doc = ""] # [inline] pub fn align (& self) -> crate :: generated :: line_edit :: Align { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_align ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: line_edit :: Align > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The cursor's position inside the [`LineEdit`][LineEdit]. When set, the text may scroll to accommodate it."] # [doc = ""] # [inline] pub fn cursor_position (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_cursor_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the [`LineEdit`][LineEdit] width will increase to stay longer than the [`text`][Self::text]. It will **not** compress if the [`text`][Self::text] is shortened."] # [doc = ""] # [inline] pub fn expand_to_text_length (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_expand_to_text_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nMaximum amount of characters that can be entered inside the [`LineEdit`][LineEdit]. If `0`, there is no limit.\nWhen a limit is defined, characters that would exceed [`max_length`][Self::max_length] are truncated. This happens both for existing [`text`][Self::text] contents when setting the max length, or for new text inserted in the [`LineEdit`][LineEdit], including pasting. If any input text is truncated, the `text_change_rejected` signal is emitted with the truncated substring as parameter.\n**Example:**\n```gdscript\ntext = \"Hello world\"\nmax_length = 5\n# `text` becomes \"Hello\".\nmax_length = 10\ntext += \" goodbye\"\n# `text` becomes \"Hello good\".\n# `text_change_rejected` is emitted with \"bye\" as parameter.\n```"] # [doc = ""] # [inline] pub fn max_length (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_max_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`PopupMenu`][PopupMenu] of this [`LineEdit`][LineEdit]. By default, this menu is displayed when right-clicking on the [`LineEdit`][LineEdit].\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_menu (& self) -> Option < Ref < crate :: generated :: PopupMenu , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_menu ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: PopupMenu , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Text shown when the [`LineEdit`][LineEdit] is empty. It is **not** the [`LineEdit`][LineEdit]'s default value (see [`text`][Self::text])."] # [doc = ""] # [inline] pub fn placeholder (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_placeholder ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Opacity of the [`placeholder_text`][Self::placeholder_text]. From `0` to `1`."] # [doc = ""] # [inline] pub fn placeholder_alpha (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_placeholder_alpha ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the icon that will appear in the right end of the [`LineEdit`][LineEdit] if there's no [`text`][Self::text], or always, if [`clear_button_enabled`][Self::clear_button_enabled] is set to `false`."] # [doc = ""] # [inline] pub fn right_icon (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_right_icon ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the scroll offset due to [`caret_position`][Self::caret_position], as a number of characters."] # [doc = ""] # [inline] pub fn get_scroll_offset (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_scroll_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The character to use to mask secret input (defaults to \"*\"). Only a single character can be used as the secret character."] # [doc = ""] # [inline] pub fn secret_character (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_secret_character ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the selection begin column."] # [doc = ""] # [inline] pub fn get_selection_from_column (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_selection_from_column ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the selection end column."] # [doc = ""] # [inline] pub fn get_selection_to_column (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_selection_to_column ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "String value of the [`LineEdit`][LineEdit].\n**Note:** Changing text using this property won't emit the `text_changed` signal."] # [doc = ""] # [inline] pub fn text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . get_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the user has selected text."] # [doc = ""] # [inline] pub fn has_selection (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . has_selection ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the [`LineEdit`][LineEdit] will show a clear button if `text` is not empty, which can be used to clear the text quickly."] # [doc = ""] # [inline] pub fn is_clear_button_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_clear_button_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the context menu will appear when right-clicked."] # [doc = ""] # [inline] pub fn is_context_menu_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_context_menu_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the selected text will be deselected when focus is lost."] # [doc = ""] # [inline] pub fn is_deselect_on_focus_loss_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_deselect_on_focus_loss_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `false`, existing text cannot be modified and new text cannot be added."] # [doc = ""] # [inline] pub fn is_editable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_editable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `false`, using middle mouse button to paste clipboard will be disabled.\n**Note:** This method is only implemented on Linux."] # [doc = ""] # [inline] pub fn is_middle_mouse_paste_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_middle_mouse_paste_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, every character is replaced with the secret character (see [`secret_character`][Self::secret_character])."] # [doc = ""] # [inline] pub fn is_secret (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_secret ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `false`, it's impossible to select the text using mouse nor keyboard."] # [doc = ""] # [inline] pub fn is_selecting_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_selecting_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `false`, using shortcuts will be disabled."] # [doc = ""] # [inline] pub fn is_shortcut_keys_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_shortcut_keys_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the native virtual keyboard is shown when focused on platforms that support it."] # [doc = ""] # [inline] pub fn is_virtual_keyboard_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . is_virtual_keyboard_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Executes a given action as defined in the [`MenuItems`][MenuItems] enum."] # [doc = ""] # [inline] pub fn menu_option (& self , option : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . menu_option ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , option as _) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSelects characters inside [`LineEdit`][LineEdit] between `from` and `to`. By default, `from` is at the beginning and `to` at the end.\n```gdscript\ntext = \"Welcome\"\nselect() # Will select \"Welcome\".\nselect(4) # Will select \"ome\".\nselect(2, 5) # Will select \"lco\".\n```\n# Default Arguments\n* `from` - `0`\n* `to` - `-1`"] # [doc = ""] # [inline] pub fn select (& self , from : i64 , to : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . select ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , from as _ , to as _) ; } } # [doc = "Selects the whole [`String`][GodotString]."] # [doc = ""] # [inline] pub fn select_all (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . select_all ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Text alignment as defined in the [`Align`][Align] enum."] # [doc = ""] # [inline] pub fn set_align (& self , align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_align ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , align as _) ; } } # [doc = "If `true`, the [`LineEdit`][LineEdit] will show a clear button if `text` is not empty, which can be used to clear the text quickly."] # [doc = ""] # [inline] pub fn set_clear_button_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_clear_button_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the context menu will appear when right-clicked."] # [doc = ""] # [inline] pub fn set_context_menu_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_context_menu_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The cursor's position inside the [`LineEdit`][LineEdit]. When set, the text may scroll to accommodate it."] # [doc = ""] # [inline] pub fn set_cursor_position (& self , position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_cursor_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , position as _) ; } } # [doc = "If `true`, the selected text will be deselected when focus is lost."] # [doc = ""] # [inline] pub fn set_deselect_on_focus_loss_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_deselect_on_focus_loss_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `false`, existing text cannot be modified and new text cannot be added."] # [doc = ""] # [inline] pub fn set_editable (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_editable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, the [`LineEdit`][LineEdit] width will increase to stay longer than the [`text`][Self::text]. It will **not** compress if the [`text`][Self::text] is shortened."] # [doc = ""] # [inline] pub fn set_expand_to_text_length (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_expand_to_text_length ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nMaximum amount of characters that can be entered inside the [`LineEdit`][LineEdit]. If `0`, there is no limit.\nWhen a limit is defined, characters that would exceed [`max_length`][Self::max_length] are truncated. This happens both for existing [`text`][Self::text] contents when setting the max length, or for new text inserted in the [`LineEdit`][LineEdit], including pasting. If any input text is truncated, the `text_change_rejected` signal is emitted with the truncated substring as parameter.\n**Example:**\n```gdscript\ntext = \"Hello world\"\nmax_length = 5\n# `text` becomes \"Hello\".\nmax_length = 10\ntext += \" goodbye\"\n# `text` becomes \"Hello good\".\n# `text_change_rejected` is emitted with \"bye\" as parameter.\n```"] # [doc = ""] # [inline] pub fn set_max_length (& self , chars : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_max_length ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , chars as _) ; } } # [doc = "If `false`, using middle mouse button to paste clipboard will be disabled.\n**Note:** This method is only implemented on Linux."] # [doc = ""] # [inline] pub fn set_middle_mouse_paste_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_middle_mouse_paste_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Text shown when the [`LineEdit`][LineEdit] is empty. It is **not** the [`LineEdit`][LineEdit]'s default value (see [`text`][Self::text])."] # [doc = ""] # [inline] pub fn set_placeholder (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_placeholder ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Opacity of the [`placeholder_text`][Self::placeholder_text]. From `0` to `1`."] # [doc = ""] # [inline] pub fn set_placeholder_alpha (& self , alpha : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_placeholder_alpha ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , alpha as _) ; } } # [doc = "Sets the icon that will appear in the right end of the [`LineEdit`][LineEdit] if there's no [`text`][Self::text], or always, if [`clear_button_enabled`][Self::clear_button_enabled] is set to `false`."] # [doc = ""] # [inline] pub fn set_right_icon (& self , icon : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_right_icon ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , icon . as_arg_ptr ()) ; } } # [doc = "If `true`, every character is replaced with the secret character (see [`secret_character`][Self::secret_character])."] # [doc = ""] # [inline] pub fn set_secret (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_secret ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The character to use to mask secret input (defaults to \"*\"). Only a single character can be used as the secret character."] # [doc = ""] # [inline] pub fn set_secret_character (& self , character : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_secret_character ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , character . into ()) ; } } # [doc = "If `false`, it's impossible to select the text using mouse nor keyboard."] # [doc = ""] # [inline] pub fn set_selecting_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_selecting_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `false`, using shortcuts will be disabled."] # [doc = ""] # [inline] pub fn set_shortcut_keys_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_shortcut_keys_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "String value of the [`LineEdit`][LineEdit].\n**Note:** Changing text using this property won't emit the `text_changed` signal."] # [doc = ""] # [inline] pub fn set_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_text ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "If `true`, the native virtual keyboard is shown when focused on platforms that support it."] # [doc = ""] # [inline] pub fn set_virtual_keyboard_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineEditMethodTable :: get (get_api ()) . set_virtual_keyboard_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for LineEdit { } unsafe impl GodotObject for LineEdit { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "LineEdit" } } impl QueueFree for LineEdit { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for LineEdit { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for LineEdit { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for LineEdit { } unsafe impl SubClass < crate :: generated :: CanvasItem > for LineEdit { } unsafe impl SubClass < crate :: generated :: Node > for LineEdit { } unsafe impl SubClass < crate :: generated :: Object > for LineEdit { } impl Instanciable for LineEdit { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { LineEdit :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct LineEditMethodTable { pub class_constructor : sys :: godot_class_constructor , pub append_at_cursor : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub cursor_get_blink_enabled : * mut sys :: godot_method_bind , pub cursor_get_blink_speed : * mut sys :: godot_method_bind , pub cursor_set_blink_enabled : * mut sys :: godot_method_bind , pub cursor_set_blink_speed : * mut sys :: godot_method_bind , pub delete_char_at_cursor : * mut sys :: godot_method_bind , pub delete_text : * mut sys :: godot_method_bind , pub deselect : * mut sys :: godot_method_bind , pub get_align : * mut sys :: godot_method_bind , pub get_cursor_position : * mut sys :: godot_method_bind , pub get_expand_to_text_length : * mut sys :: godot_method_bind , pub get_max_length : * mut sys :: godot_method_bind , pub get_menu : * mut sys :: godot_method_bind , pub get_placeholder : * mut sys :: godot_method_bind , pub get_placeholder_alpha : * mut sys :: godot_method_bind , pub get_right_icon : * mut sys :: godot_method_bind , pub get_scroll_offset : * mut sys :: godot_method_bind , pub get_secret_character : * mut sys :: godot_method_bind , pub get_selection_from_column : * mut sys :: godot_method_bind , pub get_selection_to_column : * mut sys :: godot_method_bind , pub get_text : * mut sys :: godot_method_bind , pub has_selection : * mut sys :: godot_method_bind , pub is_clear_button_enabled : * mut sys :: godot_method_bind , pub is_context_menu_enabled : * mut sys :: godot_method_bind , pub is_deselect_on_focus_loss_enabled : * mut sys :: godot_method_bind , pub is_editable : * mut sys :: godot_method_bind , pub is_middle_mouse_paste_enabled : * mut sys :: godot_method_bind , pub is_secret : * mut sys :: godot_method_bind , pub is_selecting_enabled : * mut sys :: godot_method_bind , pub is_shortcut_keys_enabled : * mut sys :: godot_method_bind , pub is_virtual_keyboard_enabled : * mut sys :: godot_method_bind , pub menu_option : * mut sys :: godot_method_bind , pub select : * mut sys :: godot_method_bind , pub select_all : * mut sys :: godot_method_bind , pub set_align : * mut sys :: godot_method_bind , pub set_clear_button_enabled : * mut sys :: godot_method_bind , pub set_context_menu_enabled : * mut sys :: godot_method_bind , pub set_cursor_position : * mut sys :: godot_method_bind , pub set_deselect_on_focus_loss_enabled : * mut sys :: godot_method_bind , pub set_editable : * mut sys :: godot_method_bind , pub set_expand_to_text_length : * mut sys :: godot_method_bind , pub set_max_length : * mut sys :: godot_method_bind , pub set_middle_mouse_paste_enabled : * mut sys :: godot_method_bind , pub set_placeholder : * mut sys :: godot_method_bind , pub set_placeholder_alpha : * mut sys :: godot_method_bind , pub set_right_icon : * mut sys :: godot_method_bind , pub set_secret : * mut sys :: godot_method_bind , pub set_secret_character : * mut sys :: godot_method_bind , pub set_selecting_enabled : * mut sys :: godot_method_bind , pub set_shortcut_keys_enabled : * mut sys :: godot_method_bind , pub set_text : * mut sys :: godot_method_bind , pub set_virtual_keyboard_enabled : * mut sys :: godot_method_bind } impl LineEditMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : LineEditMethodTable = LineEditMethodTable { class_constructor : None , append_at_cursor : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , cursor_get_blink_enabled : 0 as * mut sys :: godot_method_bind , cursor_get_blink_speed : 0 as * mut sys :: godot_method_bind , cursor_set_blink_enabled : 0 as * mut sys :: godot_method_bind , cursor_set_blink_speed : 0 as * mut sys :: godot_method_bind , delete_char_at_cursor : 0 as * mut sys :: godot_method_bind , delete_text : 0 as * mut sys :: godot_method_bind , deselect : 0 as * mut sys :: godot_method_bind , get_align : 0 as * mut sys :: godot_method_bind , get_cursor_position : 0 as * mut sys :: godot_method_bind , get_expand_to_text_length : 0 as * mut sys :: godot_method_bind , get_max_length : 0 as * mut sys :: godot_method_bind , get_menu : 0 as * mut sys :: godot_method_bind , get_placeholder : 0 as * mut sys :: godot_method_bind , get_placeholder_alpha : 0 as * mut sys :: godot_method_bind , get_right_icon : 0 as * mut sys :: godot_method_bind , get_scroll_offset : 0 as * mut sys :: godot_method_bind , get_secret_character : 0 as * mut sys :: godot_method_bind , get_selection_from_column : 0 as * mut sys :: godot_method_bind , get_selection_to_column : 0 as * mut sys :: godot_method_bind , get_text : 0 as * mut sys :: godot_method_bind , has_selection : 0 as * mut sys :: godot_method_bind , is_clear_button_enabled : 0 as * mut sys :: godot_method_bind , is_context_menu_enabled : 0 as * mut sys :: godot_method_bind , is_deselect_on_focus_loss_enabled : 0 as * mut sys :: godot_method_bind , is_editable : 0 as * mut sys :: godot_method_bind , is_middle_mouse_paste_enabled : 0 as * mut sys :: godot_method_bind , is_secret : 0 as * mut sys :: godot_method_bind , is_selecting_enabled : 0 as * mut sys :: godot_method_bind , is_shortcut_keys_enabled : 0 as * mut sys :: godot_method_bind , is_virtual_keyboard_enabled : 0 as * mut sys :: godot_method_bind , menu_option : 0 as * mut sys :: godot_method_bind , select : 0 as * mut sys :: godot_method_bind , select_all : 0 as * mut sys :: godot_method_bind , set_align : 0 as * mut sys :: godot_method_bind , set_clear_button_enabled : 0 as * mut sys :: godot_method_bind , set_context_menu_enabled : 0 as * mut sys :: godot_method_bind , set_cursor_position : 0 as * mut sys :: godot_method_bind , set_deselect_on_focus_loss_enabled : 0 as * mut sys :: godot_method_bind , set_editable : 0 as * mut sys :: godot_method_bind , set_expand_to_text_length : 0 as * mut sys :: godot_method_bind , set_max_length : 0 as * mut sys :: godot_method_bind , set_middle_mouse_paste_enabled : 0 as * mut sys :: godot_method_bind , set_placeholder : 0 as * mut sys :: godot_method_bind , set_placeholder_alpha : 0 as * mut sys :: godot_method_bind , set_right_icon : 0 as * mut sys :: godot_method_bind , set_secret : 0 as * mut sys :: godot_method_bind , set_secret_character : 0 as * mut sys :: godot_method_bind , set_selecting_enabled : 0 as * mut sys :: godot_method_bind , set_shortcut_keys_enabled : 0 as * mut sys :: godot_method_bind , set_text : 0 as * mut sys :: godot_method_bind , set_virtual_keyboard_enabled : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { LineEditMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "LineEdit\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . append_at_cursor = (gd_api . godot_method_bind_get_method) (class_name , "append_at_cursor\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . cursor_get_blink_enabled = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_blink_enabled\0" . as_ptr () as * const c_char) ; table . cursor_get_blink_speed = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_blink_speed\0" . as_ptr () as * const c_char) ; table . cursor_set_blink_enabled = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_blink_enabled\0" . as_ptr () as * const c_char) ; table . cursor_set_blink_speed = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_blink_speed\0" . as_ptr () as * const c_char) ; table . delete_char_at_cursor = (gd_api . godot_method_bind_get_method) (class_name , "delete_char_at_cursor\0" . as_ptr () as * const c_char) ; table . delete_text = (gd_api . godot_method_bind_get_method) (class_name , "delete_text\0" . as_ptr () as * const c_char) ; table . deselect = (gd_api . godot_method_bind_get_method) (class_name , "deselect\0" . as_ptr () as * const c_char) ; table . get_align = (gd_api . godot_method_bind_get_method) (class_name , "get_align\0" . as_ptr () as * const c_char) ; table . get_cursor_position = (gd_api . godot_method_bind_get_method) (class_name , "get_cursor_position\0" . as_ptr () as * const c_char) ; table . get_expand_to_text_length = (gd_api . godot_method_bind_get_method) (class_name , "get_expand_to_text_length\0" . as_ptr () as * const c_char) ; table . get_max_length = (gd_api . godot_method_bind_get_method) (class_name , "get_max_length\0" . as_ptr () as * const c_char) ; table . get_menu = (gd_api . godot_method_bind_get_method) (class_name , "get_menu\0" . as_ptr () as * const c_char) ; table . get_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "get_placeholder\0" . as_ptr () as * const c_char) ; table . get_placeholder_alpha = (gd_api . godot_method_bind_get_method) (class_name , "get_placeholder_alpha\0" . as_ptr () as * const c_char) ; table . get_right_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_right_icon\0" . as_ptr () as * const c_char) ; table . get_scroll_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll_offset\0" . as_ptr () as * const c_char) ; table . get_secret_character = (gd_api . godot_method_bind_get_method) (class_name , "get_secret_character\0" . as_ptr () as * const c_char) ; table . get_selection_from_column = (gd_api . godot_method_bind_get_method) (class_name , "get_selection_from_column\0" . as_ptr () as * const c_char) ; table . get_selection_to_column = (gd_api . godot_method_bind_get_method) (class_name , "get_selection_to_column\0" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . has_selection = (gd_api . godot_method_bind_get_method) (class_name , "has_selection\0" . as_ptr () as * const c_char) ; table . is_clear_button_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_clear_button_enabled\0" . as_ptr () as * const c_char) ; table . is_context_menu_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_context_menu_enabled\0" . as_ptr () as * const c_char) ; table . is_deselect_on_focus_loss_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_deselect_on_focus_loss_enabled\0" . as_ptr () as * const c_char) ; table . is_editable = (gd_api . godot_method_bind_get_method) (class_name , "is_editable\0" . as_ptr () as * const c_char) ; table . is_middle_mouse_paste_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_middle_mouse_paste_enabled\0" . as_ptr () as * const c_char) ; table . is_secret = (gd_api . godot_method_bind_get_method) (class_name , "is_secret\0" . as_ptr () as * const c_char) ; table . is_selecting_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_selecting_enabled\0" . as_ptr () as * const c_char) ; table . is_shortcut_keys_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_shortcut_keys_enabled\0" . as_ptr () as * const c_char) ; table . is_virtual_keyboard_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_virtual_keyboard_enabled\0" . as_ptr () as * const c_char) ; table . menu_option = (gd_api . godot_method_bind_get_method) (class_name , "menu_option\0" . as_ptr () as * const c_char) ; table . select = (gd_api . godot_method_bind_get_method) (class_name , "select\0" . as_ptr () as * const c_char) ; table . select_all = (gd_api . godot_method_bind_get_method) (class_name , "select_all\0" . as_ptr () as * const c_char) ; table . set_align = (gd_api . godot_method_bind_get_method) (class_name , "set_align\0" . as_ptr () as * const c_char) ; table . set_clear_button_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_clear_button_enabled\0" . as_ptr () as * const c_char) ; table . set_context_menu_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_context_menu_enabled\0" . as_ptr () as * const c_char) ; table . set_cursor_position = (gd_api . godot_method_bind_get_method) (class_name , "set_cursor_position\0" . as_ptr () as * const c_char) ; table . set_deselect_on_focus_loss_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_deselect_on_focus_loss_enabled\0" . as_ptr () as * const c_char) ; table . set_editable = (gd_api . godot_method_bind_get_method) (class_name , "set_editable\0" . as_ptr () as * const c_char) ; table . set_expand_to_text_length = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_to_text_length\0" . as_ptr () as * const c_char) ; table . set_max_length = (gd_api . godot_method_bind_get_method) (class_name , "set_max_length\0" . as_ptr () as * const c_char) ; table . set_middle_mouse_paste_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_middle_mouse_paste_enabled\0" . as_ptr () as * const c_char) ; table . set_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "set_placeholder\0" . as_ptr () as * const c_char) ; table . set_placeholder_alpha = (gd_api . godot_method_bind_get_method) (class_name , "set_placeholder_alpha\0" . as_ptr () as * const c_char) ; table . set_right_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_right_icon\0" . as_ptr () as * const c_char) ; table . set_secret = (gd_api . godot_method_bind_get_method) (class_name , "set_secret\0" . as_ptr () as * const c_char) ; table . set_secret_character = (gd_api . godot_method_bind_get_method) (class_name , "set_secret_character\0" . as_ptr () as * const c_char) ; table . set_selecting_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_selecting_enabled\0" . as_ptr () as * const c_char) ; table . set_shortcut_keys_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_shortcut_keys_enabled\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; table . set_virtual_keyboard_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_virtual_keyboard_enabled\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::line_edit::private::LineEdit;
            
            pub(crate) mod line_shape_2d {
                # ! [doc = "This module contains types related to the API class [`LineShape2D`][super::LineShape2D]."] pub (crate) mod private { # [doc = "`core class LineShape2D` inherits `Shape2D` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_lineshape2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nLineShape2D inherits methods from:\n - [Shape2D](struct.Shape2D.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct LineShape2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: LineShape2D ; impl LineShape2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = LineShape2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The line's distance from the origin."] # [doc = ""] # [inline] pub fn d (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineShape2DMethodTable :: get (get_api ()) . get_d ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The line's normal."] # [doc = ""] # [inline] pub fn normal (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = LineShape2DMethodTable :: get (get_api ()) . get_normal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The line's distance from the origin."] # [doc = ""] # [inline] pub fn set_d (& self , d : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineShape2DMethodTable :: get (get_api ()) . set_d ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , d as _) ; } } # [doc = "The line's normal."] # [doc = ""] # [inline] pub fn set_normal (& self , normal : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LineShape2DMethodTable :: get (get_api ()) . set_normal ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , normal) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for LineShape2D { } unsafe impl GodotObject for LineShape2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "LineShape2D" } } impl std :: ops :: Deref for LineShape2D { type Target = crate :: generated :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for LineShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape2D > for LineShape2D { } unsafe impl SubClass < crate :: generated :: Resource > for LineShape2D { } unsafe impl SubClass < crate :: generated :: Reference > for LineShape2D { } unsafe impl SubClass < crate :: generated :: Object > for LineShape2D { } impl Instanciable for LineShape2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { LineShape2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct LineShape2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_d : * mut sys :: godot_method_bind , pub get_normal : * mut sys :: godot_method_bind , pub set_d : * mut sys :: godot_method_bind , pub set_normal : * mut sys :: godot_method_bind } impl LineShape2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : LineShape2DMethodTable = LineShape2DMethodTable { class_constructor : None , get_d : 0 as * mut sys :: godot_method_bind , get_normal : 0 as * mut sys :: godot_method_bind , set_d : 0 as * mut sys :: godot_method_bind , set_normal : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { LineShape2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "LineShape2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_d = (gd_api . godot_method_bind_get_method) (class_name , "get_d\0" . as_ptr () as * const c_char) ; table . get_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_normal\0" . as_ptr () as * const c_char) ; table . set_d = (gd_api . godot_method_bind_get_method) (class_name , "set_d\0" . as_ptr () as * const c_char) ; table . set_normal = (gd_api . godot_method_bind_get_method) (class_name , "set_normal\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::line_shape_2d::private::LineShape2D;
            
            pub mod link_button {
                # ! [doc = "This module contains types related to the API class [`LinkButton`][super::LinkButton]."] pub (crate) mod private { # [doc = "`core class LinkButton` inherits `BaseButton` (manually managed).\n\nThis class has related types in the [`link_button`][super::link_button] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_linkbutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`LinkButton` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<LinkButton>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nLinkButton inherits methods from:\n - [BaseButton](struct.BaseButton.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct LinkButton { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: LinkButton ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct UnderlineMode (pub i64) ; impl UnderlineMode { pub const ALWAYS : UnderlineMode = UnderlineMode (0i64) ; pub const ON_HOVER : UnderlineMode = UnderlineMode (1i64) ; pub const NEVER : UnderlineMode = UnderlineMode (2i64) ; } impl From < i64 > for UnderlineMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < UnderlineMode > for i64 { # [inline] fn from (v : UnderlineMode) -> Self { v . 0 } } impl FromVariant for UnderlineMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl LinkButton { pub const UNDERLINE_MODE_ALWAYS : i64 = 0i64 ; pub const UNDERLINE_MODE_ON_HOVER : i64 = 1i64 ; pub const UNDERLINE_MODE_NEVER : i64 = 2i64 ; } impl LinkButton { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = LinkButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The button's text that will be displayed inside the button's area."] # [doc = ""] # [inline] pub fn text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = LinkButtonMethodTable :: get (get_api ()) . get_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Determines when to show the underline. See [`UnderlineMode`][UnderlineMode] for options."] # [doc = ""] # [inline] pub fn underline_mode (& self) -> crate :: generated :: link_button :: UnderlineMode { unsafe { let method_bind : * mut sys :: godot_method_bind = LinkButtonMethodTable :: get (get_api ()) . get_underline_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: link_button :: UnderlineMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The button's text that will be displayed inside the button's area."] # [doc = ""] # [inline] pub fn set_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LinkButtonMethodTable :: get (get_api ()) . set_text ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Determines when to show the underline. See [`UnderlineMode`][UnderlineMode] for options."] # [doc = ""] # [inline] pub fn set_underline_mode (& self , underline_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = LinkButtonMethodTable :: get (get_api ()) . set_underline_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , underline_mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for LinkButton { } unsafe impl GodotObject for LinkButton { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "LinkButton" } } impl QueueFree for LinkButton { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for LinkButton { type Target = crate :: generated :: BaseButton ; # [inline] fn deref (& self) -> & crate :: generated :: BaseButton { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for LinkButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: BaseButton { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: BaseButton > for LinkButton { } unsafe impl SubClass < crate :: generated :: Control > for LinkButton { } unsafe impl SubClass < crate :: generated :: CanvasItem > for LinkButton { } unsafe impl SubClass < crate :: generated :: Node > for LinkButton { } unsafe impl SubClass < crate :: generated :: Object > for LinkButton { } impl Instanciable for LinkButton { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { LinkButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct LinkButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_text : * mut sys :: godot_method_bind , pub get_underline_mode : * mut sys :: godot_method_bind , pub set_text : * mut sys :: godot_method_bind , pub set_underline_mode : * mut sys :: godot_method_bind } impl LinkButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : LinkButtonMethodTable = LinkButtonMethodTable { class_constructor : None , get_text : 0 as * mut sys :: godot_method_bind , get_underline_mode : 0 as * mut sys :: godot_method_bind , set_text : 0 as * mut sys :: godot_method_bind , set_underline_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { LinkButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "LinkButton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . get_underline_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_underline_mode\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; table . set_underline_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_underline_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::link_button::private::LinkButton;
            
            pub(crate) mod listener {
                # ! [doc = "This module contains types related to the API class [`Listener`][super::Listener]."] pub (crate) mod private { # [doc = "`core class Listener` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_listener.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Listener` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Listener>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nListener inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Listener { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Listener ; impl Listener { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ListenerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Disables the listener to use the current camera's listener instead."] # [doc = ""] # [inline] pub fn clear_current (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ListenerMethodTable :: get (get_api ()) . clear_current ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the listener's global orthonormalized [`Transform`][Transform]."] # [doc = ""] # [inline] pub fn get_listener_transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = ListenerMethodTable :: get (get_api ()) . get_listener_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the listener was made current using [`make_current`][Self::make_current], `false` otherwise.\n**Note:** There may be more than one Listener marked as \"current\" in the scene tree, but only the one that was made current last will be used."] # [doc = ""] # [inline] pub fn is_current (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ListenerMethodTable :: get (get_api ()) . is_current ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Enables the listener. This will override the current camera's listener."] # [doc = ""] # [inline] pub fn make_current (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ListenerMethodTable :: get (get_api ()) . make_current ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Listener { } unsafe impl GodotObject for Listener { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Listener" } } impl QueueFree for Listener { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Listener { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Listener { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for Listener { } unsafe impl SubClass < crate :: generated :: Node > for Listener { } unsafe impl SubClass < crate :: generated :: Object > for Listener { } impl Instanciable for Listener { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Listener :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ListenerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear_current : * mut sys :: godot_method_bind , pub get_listener_transform : * mut sys :: godot_method_bind , pub is_current : * mut sys :: godot_method_bind , pub make_current : * mut sys :: godot_method_bind } impl ListenerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ListenerMethodTable = ListenerMethodTable { class_constructor : None , clear_current : 0 as * mut sys :: godot_method_bind , get_listener_transform : 0 as * mut sys :: godot_method_bind , is_current : 0 as * mut sys :: godot_method_bind , make_current : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ListenerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Listener\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear_current = (gd_api . godot_method_bind_get_method) (class_name , "clear_current\0" . as_ptr () as * const c_char) ; table . get_listener_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_listener_transform\0" . as_ptr () as * const c_char) ; table . is_current = (gd_api . godot_method_bind_get_method) (class_name , "is_current\0" . as_ptr () as * const c_char) ; table . make_current = (gd_api . godot_method_bind_get_method) (class_name , "make_current\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::listener::private::Listener;
            
            pub(crate) mod listener_2d {
                # ! [doc = "This module contains types related to the API class [`Listener2D`][super::Listener2D]."] pub (crate) mod private { # [doc = "`core class Listener2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_listener2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Listener2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Listener2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nListener2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Listener2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Listener2D ; impl Listener2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Listener2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Disables the [`Listener2D`][Listener2D]. If it's not set as current, this method will have no effect."] # [doc = ""] # [inline] pub fn clear_current (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Listener2DMethodTable :: get (get_api ()) . clear_current ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns `true` if this [`Listener2D`][Listener2D] is currently active."] # [doc = ""] # [inline] pub fn is_current (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Listener2DMethodTable :: get (get_api ()) . is_current ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Makes the [`Listener2D`][Listener2D] active, setting it as the hearing point for the sounds. If there is already another active [`Listener2D`][Listener2D], it will be disabled.\nThis method will have no effect if the [`Listener2D`][Listener2D] is not added to [`SceneTree`][SceneTree]."] # [doc = ""] # [inline] pub fn make_current (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Listener2DMethodTable :: get (get_api ()) . make_current ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Listener2D { } unsafe impl GodotObject for Listener2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Listener2D" } } impl QueueFree for Listener2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Listener2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Listener2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for Listener2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Listener2D { } unsafe impl SubClass < crate :: generated :: Node > for Listener2D { } unsafe impl SubClass < crate :: generated :: Object > for Listener2D { } impl Instanciable for Listener2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Listener2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Listener2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear_current : * mut sys :: godot_method_bind , pub is_current : * mut sys :: godot_method_bind , pub make_current : * mut sys :: godot_method_bind } impl Listener2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Listener2DMethodTable = Listener2DMethodTable { class_constructor : None , clear_current : 0 as * mut sys :: godot_method_bind , is_current : 0 as * mut sys :: godot_method_bind , make_current : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Listener2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Listener2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear_current = (gd_api . godot_method_bind_get_method) (class_name , "clear_current\0" . as_ptr () as * const c_char) ; table . is_current = (gd_api . godot_method_bind_get_method) (class_name , "is_current\0" . as_ptr () as * const c_char) ; table . make_current = (gd_api . godot_method_bind_get_method) (class_name , "make_current\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::listener_2d::private::Listener2D;
            
            pub(crate) mod main_loop {
                # ! [doc = "This module contains types related to the API class [`MainLoop`][super::MainLoop]."] pub (crate) mod private { # [doc = "`core class MainLoop` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_mainloop.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`MainLoop` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<MainLoop>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nMainLoop inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MainLoop { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: MainLoop ; # [doc = "Constants"] # [allow (non_upper_case_globals)] impl MainLoop { pub const NOTIFICATION_WM_MOUSE_ENTER : i64 = 1002i64 ; pub const NOTIFICATION_WM_MOUSE_EXIT : i64 = 1003i64 ; pub const NOTIFICATION_WM_FOCUS_IN : i64 = 1004i64 ; pub const NOTIFICATION_WM_FOCUS_OUT : i64 = 1005i64 ; pub const NOTIFICATION_WM_QUIT_REQUEST : i64 = 1006i64 ; pub const NOTIFICATION_WM_GO_BACK_REQUEST : i64 = 1007i64 ; pub const NOTIFICATION_WM_UNFOCUS_REQUEST : i64 = 1008i64 ; pub const NOTIFICATION_OS_MEMORY_WARNING : i64 = 1009i64 ; pub const NOTIFICATION_TRANSLATION_CHANGED : i64 = 1010i64 ; pub const NOTIFICATION_WM_ABOUT : i64 = 1011i64 ; pub const NOTIFICATION_CRASH : i64 = 1012i64 ; pub const NOTIFICATION_OS_IME_UPDATE : i64 = 1013i64 ; pub const NOTIFICATION_APP_RESUMED : i64 = 1014i64 ; pub const NOTIFICATION_APP_PAUSED : i64 = 1015i64 ; } impl MainLoop { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MainLoopMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Should not be called manually, override [`_finalize`][Self::_finalize] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn finish (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . finish ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Should not be called manually, override [`_idle`][Self::_idle] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn idle (& self , delta : f64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . idle ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , delta as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Should not be called manually, override [`_initialize`][Self::_initialize] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn init (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . init ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Should not be called manually, override [`_input_event`][Self::_input_event] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn input_event (& self , event : impl AsArg < crate :: generated :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . input_event ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr ()) ; } } # [doc = "Should not be called manually, override [`_input_text`][Self::_input_text] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn input_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . input_text ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Should not be called manually, override [`_iteration`][Self::_iteration] instead. Will be removed in Godot 4.0."] # [doc = ""] # [inline] pub fn iteration (& self , delta : f64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MainLoopMethodTable :: get (get_api ()) . iteration ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , delta as _) ; < bool > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for MainLoop { } unsafe impl GodotObject for MainLoop { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "MainLoop" } } impl std :: ops :: Deref for MainLoop { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MainLoop { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for MainLoop { } impl Instanciable for MainLoop { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { MainLoop :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MainLoopMethodTable { pub class_constructor : sys :: godot_class_constructor , pub finish : * mut sys :: godot_method_bind , pub idle : * mut sys :: godot_method_bind , pub init : * mut sys :: godot_method_bind , pub input_event : * mut sys :: godot_method_bind , pub input_text : * mut sys :: godot_method_bind , pub iteration : * mut sys :: godot_method_bind } impl MainLoopMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MainLoopMethodTable = MainLoopMethodTable { class_constructor : None , finish : 0 as * mut sys :: godot_method_bind , idle : 0 as * mut sys :: godot_method_bind , init : 0 as * mut sys :: godot_method_bind , input_event : 0 as * mut sys :: godot_method_bind , input_text : 0 as * mut sys :: godot_method_bind , iteration : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MainLoopMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MainLoop\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . finish = (gd_api . godot_method_bind_get_method) (class_name , "finish\0" . as_ptr () as * const c_char) ; table . idle = (gd_api . godot_method_bind_get_method) (class_name , "idle\0" . as_ptr () as * const c_char) ; table . init = (gd_api . godot_method_bind_get_method) (class_name , "init\0" . as_ptr () as * const c_char) ; table . input_event = (gd_api . godot_method_bind_get_method) (class_name , "input_event\0" . as_ptr () as * const c_char) ; table . input_text = (gd_api . godot_method_bind_get_method) (class_name , "input_text\0" . as_ptr () as * const c_char) ; table . iteration = (gd_api . godot_method_bind_get_method) (class_name , "iteration\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::main_loop::private::MainLoop;
            
            pub(crate) mod margin_container {
                # ! [doc = "This module contains types related to the API class [`MarginContainer`][super::MarginContainer]."] pub (crate) mod private { # [doc = "`core class MarginContainer` inherits `Container` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_margincontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`MarginContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<MarginContainer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nMarginContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MarginContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: MarginContainer ; impl MarginContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MarginContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for MarginContainer { } unsafe impl GodotObject for MarginContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "MarginContainer" } } impl QueueFree for MarginContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for MarginContainer { type Target = crate :: generated :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MarginContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Container > for MarginContainer { } unsafe impl SubClass < crate :: generated :: Control > for MarginContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for MarginContainer { } unsafe impl SubClass < crate :: generated :: Node > for MarginContainer { } unsafe impl SubClass < crate :: generated :: Object > for MarginContainer { } impl Instanciable for MarginContainer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { MarginContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MarginContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl MarginContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MarginContainerMethodTable = MarginContainerMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MarginContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MarginContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::margin_container::private::MarginContainer;
            
            pub(crate) mod material {
                # ! [doc = "This module contains types related to the API class [`Material`][super::Material]."] pub (crate) mod private { # [doc = "`core class Material` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_material.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMaterial inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Material { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Material ; # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Material { pub const RENDER_PRIORITY_MIN : i64 = - 128i64 ; pub const RENDER_PRIORITY_MAX : i64 = 127i64 ; } impl Material { # [doc = "Sets the [`Material`][Material] to be used for the next pass. This renders the object again using a different material.\n**Note:** This only applies to [`SpatialMaterial`][SpatialMaterial]s and [`ShaderMaterial`][ShaderMaterial]s with type \"Spatial\"."] # [doc = ""] # [inline] pub fn next_pass (& self) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MaterialMethodTable :: get (get_api ()) . get_next_pass ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects.\n**Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority)."] # [doc = ""] # [inline] pub fn render_priority (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MaterialMethodTable :: get (get_api ()) . get_render_priority ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the [`Material`][Material] to be used for the next pass. This renders the object again using a different material.\n**Note:** This only applies to [`SpatialMaterial`][SpatialMaterial]s and [`ShaderMaterial`][ShaderMaterial]s with type \"Spatial\"."] # [doc = ""] # [inline] pub fn set_next_pass (& self , next_pass : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MaterialMethodTable :: get (get_api ()) . set_next_pass ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , next_pass . as_arg_ptr ()) ; } } # [doc = "Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects.\n**Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority)."] # [doc = ""] # [inline] pub fn set_render_priority (& self , priority : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MaterialMethodTable :: get (get_api ()) . set_render_priority ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , priority as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Material { } unsafe impl GodotObject for Material { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Material" } } impl std :: ops :: Deref for Material { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Material { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Material { } unsafe impl SubClass < crate :: generated :: Reference > for Material { } unsafe impl SubClass < crate :: generated :: Object > for Material { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MaterialMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_next_pass : * mut sys :: godot_method_bind , pub get_render_priority : * mut sys :: godot_method_bind , pub set_next_pass : * mut sys :: godot_method_bind , pub set_render_priority : * mut sys :: godot_method_bind } impl MaterialMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MaterialMethodTable = MaterialMethodTable { class_constructor : None , get_next_pass : 0 as * mut sys :: godot_method_bind , get_render_priority : 0 as * mut sys :: godot_method_bind , set_next_pass : 0 as * mut sys :: godot_method_bind , set_render_priority : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MaterialMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Material\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_next_pass = (gd_api . godot_method_bind_get_method) (class_name , "get_next_pass\0" . as_ptr () as * const c_char) ; table . get_render_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_render_priority\0" . as_ptr () as * const c_char) ; table . set_next_pass = (gd_api . godot_method_bind_get_method) (class_name , "set_next_pass\0" . as_ptr () as * const c_char) ; table . set_render_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_render_priority\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::material::private::Material;
            
            pub(crate) mod menu_button {
                # ! [doc = "This module contains types related to the API class [`MenuButton`][super::MenuButton]."] pub (crate) mod private { # [doc = "`core class MenuButton` inherits `Button` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_menubutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`MenuButton` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<MenuButton>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nMenuButton inherits methods from:\n - [Button](struct.Button.html)\n - [BaseButton](struct.BaseButton.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MenuButton { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: MenuButton ; impl MenuButton { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MenuButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the [`PopupMenu`][PopupMenu] contained in this button.\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_popup (& self) -> Option < Ref < crate :: generated :: PopupMenu , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MenuButtonMethodTable :: get (get_api ()) . get_popup ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: PopupMenu , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, when the cursor hovers above another [`MenuButton`][MenuButton] within the same parent which also has `switch_on_hover` enabled, it will close the current [`MenuButton`][MenuButton] and open the other one."] # [doc = ""] # [inline] pub fn is_switch_on_hover (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MenuButtonMethodTable :: get (get_api ()) . is_switch_on_hover ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, shortcuts are disabled and cannot be used to trigger the button."] # [doc = ""] # [inline] pub fn set_disable_shortcuts (& self , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MenuButtonMethodTable :: get (get_api ()) . set_disable_shortcuts ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , disabled as _) ; } } # [doc = "If `true`, when the cursor hovers above another [`MenuButton`][MenuButton] within the same parent which also has `switch_on_hover` enabled, it will close the current [`MenuButton`][MenuButton] and open the other one."] # [doc = ""] # [inline] pub fn set_switch_on_hover (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MenuButtonMethodTable :: get (get_api ()) . set_switch_on_hover ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MenuButton { } unsafe impl GodotObject for MenuButton { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "MenuButton" } } impl QueueFree for MenuButton { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for MenuButton { type Target = crate :: generated :: Button ; # [inline] fn deref (& self) -> & crate :: generated :: Button { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MenuButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Button { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Button > for MenuButton { } unsafe impl SubClass < crate :: generated :: BaseButton > for MenuButton { } unsafe impl SubClass < crate :: generated :: Control > for MenuButton { } unsafe impl SubClass < crate :: generated :: CanvasItem > for MenuButton { } unsafe impl SubClass < crate :: generated :: Node > for MenuButton { } unsafe impl SubClass < crate :: generated :: Object > for MenuButton { } impl Instanciable for MenuButton { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { MenuButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MenuButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_popup : * mut sys :: godot_method_bind , pub is_switch_on_hover : * mut sys :: godot_method_bind , pub set_disable_shortcuts : * mut sys :: godot_method_bind , pub set_switch_on_hover : * mut sys :: godot_method_bind } impl MenuButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MenuButtonMethodTable = MenuButtonMethodTable { class_constructor : None , get_popup : 0 as * mut sys :: godot_method_bind , is_switch_on_hover : 0 as * mut sys :: godot_method_bind , set_disable_shortcuts : 0 as * mut sys :: godot_method_bind , set_switch_on_hover : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MenuButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MenuButton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_popup = (gd_api . godot_method_bind_get_method) (class_name , "get_popup\0" . as_ptr () as * const c_char) ; table . is_switch_on_hover = (gd_api . godot_method_bind_get_method) (class_name , "is_switch_on_hover\0" . as_ptr () as * const c_char) ; table . set_disable_shortcuts = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_shortcuts\0" . as_ptr () as * const c_char) ; table . set_switch_on_hover = (gd_api . godot_method_bind_get_method) (class_name , "set_switch_on_hover\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::menu_button::private::MenuButton;
            
            pub mod mesh {
                # ! [doc = "This module contains types related to the API class [`Mesh`][super::Mesh]."] pub (crate) mod private { # [doc = "`core class Mesh` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`mesh`][super::mesh] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_mesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMesh inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Mesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Mesh ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ArrayFormat (pub i64) ; impl ArrayFormat { pub const FORMAT_VERTEX : ArrayFormat = ArrayFormat (1i64) ; pub const FORMAT_NORMAL : ArrayFormat = ArrayFormat (2i64) ; pub const FORMAT_TANGENT : ArrayFormat = ArrayFormat (4i64) ; pub const FORMAT_COLOR : ArrayFormat = ArrayFormat (8i64) ; pub const COMPRESS_BASE : ArrayFormat = ArrayFormat (9i64) ; pub const FORMAT_TEX_UV : ArrayFormat = ArrayFormat (16i64) ; pub const FORMAT_TEX_UV2 : ArrayFormat = ArrayFormat (32i64) ; pub const FORMAT_BONES : ArrayFormat = ArrayFormat (64i64) ; pub const FORMAT_WEIGHTS : ArrayFormat = ArrayFormat (128i64) ; pub const FORMAT_INDEX : ArrayFormat = ArrayFormat (256i64) ; pub const COMPRESS_VERTEX : ArrayFormat = ArrayFormat (512i64) ; pub const COMPRESS_NORMAL : ArrayFormat = ArrayFormat (1024i64) ; pub const COMPRESS_TANGENT : ArrayFormat = ArrayFormat (2048i64) ; pub const COMPRESS_COLOR : ArrayFormat = ArrayFormat (4096i64) ; pub const COMPRESS_TEX_UV : ArrayFormat = ArrayFormat (8192i64) ; pub const COMPRESS_TEX_UV2 : ArrayFormat = ArrayFormat (16384i64) ; pub const COMPRESS_BONES : ArrayFormat = ArrayFormat (32768i64) ; pub const COMPRESS_WEIGHTS : ArrayFormat = ArrayFormat (65536i64) ; pub const COMPRESS_INDEX : ArrayFormat = ArrayFormat (131072i64) ; pub const FLAG_USE_2D_VERTICES : ArrayFormat = ArrayFormat (262144i64) ; pub const FLAG_USE_16_BIT_BONES : ArrayFormat = ArrayFormat (524288i64) ; pub const FLAG_USE_OCTAHEDRAL_COMPRESSION : ArrayFormat = ArrayFormat (2097152i64) ; pub const COMPRESS_DEFAULT : ArrayFormat = ArrayFormat (2194432i64) ; } impl From < i64 > for ArrayFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ArrayFormat > for i64 { # [inline] fn from (v : ArrayFormat) -> Self { v . 0 } } impl FromVariant for ArrayFormat { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ArrayType (pub i64) ; impl ArrayType { pub const VERTEX : ArrayType = ArrayType (0i64) ; pub const NORMAL : ArrayType = ArrayType (1i64) ; pub const TANGENT : ArrayType = ArrayType (2i64) ; pub const COLOR : ArrayType = ArrayType (3i64) ; pub const TEX_UV : ArrayType = ArrayType (4i64) ; pub const TEX_UV2 : ArrayType = ArrayType (5i64) ; pub const BONES : ArrayType = ArrayType (6i64) ; pub const WEIGHTS : ArrayType = ArrayType (7i64) ; pub const INDEX : ArrayType = ArrayType (8i64) ; pub const MAX : ArrayType = ArrayType (9i64) ; } impl From < i64 > for ArrayType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ArrayType > for i64 { # [inline] fn from (v : ArrayType) -> Self { v . 0 } } impl FromVariant for ArrayType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BlendShapeMode (pub i64) ; impl BlendShapeMode { pub const NORMALIZED : BlendShapeMode = BlendShapeMode (0i64) ; pub const RELATIVE : BlendShapeMode = BlendShapeMode (1i64) ; } impl From < i64 > for BlendShapeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BlendShapeMode > for i64 { # [inline] fn from (v : BlendShapeMode) -> Self { v . 0 } } impl FromVariant for BlendShapeMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PrimitiveType (pub i64) ; impl PrimitiveType { pub const POINTS : PrimitiveType = PrimitiveType (0i64) ; pub const LINES : PrimitiveType = PrimitiveType (1i64) ; pub const LINE_STRIP : PrimitiveType = PrimitiveType (2i64) ; pub const LINE_LOOP : PrimitiveType = PrimitiveType (3i64) ; pub const TRIANGLES : PrimitiveType = PrimitiveType (4i64) ; pub const TRIANGLE_STRIP : PrimitiveType = PrimitiveType (5i64) ; pub const TRIANGLE_FAN : PrimitiveType = PrimitiveType (6i64) ; } impl From < i64 > for PrimitiveType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PrimitiveType > for i64 { # [inline] fn from (v : PrimitiveType) -> Self { v . 0 } } impl FromVariant for PrimitiveType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Mesh { pub const ARRAY_VERTEX : i64 = 0i64 ; pub const BLEND_SHAPE_MODE_NORMALIZED : i64 = 0i64 ; pub const PRIMITIVE_POINTS : i64 = 0i64 ; pub const ARRAY_FORMAT_VERTEX : i64 = 1i64 ; pub const ARRAY_NORMAL : i64 = 1i64 ; pub const BLEND_SHAPE_MODE_RELATIVE : i64 = 1i64 ; pub const PRIMITIVE_LINES : i64 = 1i64 ; pub const ARRAY_FORMAT_NORMAL : i64 = 2i64 ; pub const ARRAY_TANGENT : i64 = 2i64 ; pub const PRIMITIVE_LINE_STRIP : i64 = 2i64 ; pub const ARRAY_COLOR : i64 = 3i64 ; pub const PRIMITIVE_LINE_LOOP : i64 = 3i64 ; pub const ARRAY_FORMAT_TANGENT : i64 = 4i64 ; pub const ARRAY_TEX_UV : i64 = 4i64 ; pub const PRIMITIVE_TRIANGLES : i64 = 4i64 ; pub const ARRAY_TEX_UV2 : i64 = 5i64 ; pub const PRIMITIVE_TRIANGLE_STRIP : i64 = 5i64 ; pub const ARRAY_BONES : i64 = 6i64 ; pub const PRIMITIVE_TRIANGLE_FAN : i64 = 6i64 ; pub const ARRAY_WEIGHTS : i64 = 7i64 ; pub const ARRAY_FORMAT_COLOR : i64 = 8i64 ; pub const ARRAY_INDEX : i64 = 8i64 ; pub const ARRAY_COMPRESS_BASE : i64 = 9i64 ; pub const ARRAY_MAX : i64 = 9i64 ; pub const ARRAY_FORMAT_TEX_UV : i64 = 16i64 ; pub const ARRAY_FORMAT_TEX_UV2 : i64 = 32i64 ; pub const ARRAY_FORMAT_BONES : i64 = 64i64 ; pub const ARRAY_FORMAT_WEIGHTS : i64 = 128i64 ; pub const ARRAY_FORMAT_INDEX : i64 = 256i64 ; pub const ARRAY_COMPRESS_VERTEX : i64 = 512i64 ; pub const ARRAY_COMPRESS_NORMAL : i64 = 1024i64 ; pub const ARRAY_COMPRESS_TANGENT : i64 = 2048i64 ; pub const ARRAY_COMPRESS_COLOR : i64 = 4096i64 ; pub const ARRAY_COMPRESS_TEX_UV : i64 = 8192i64 ; pub const ARRAY_COMPRESS_TEX_UV2 : i64 = 16384i64 ; pub const ARRAY_COMPRESS_BONES : i64 = 32768i64 ; pub const ARRAY_COMPRESS_WEIGHTS : i64 = 65536i64 ; pub const ARRAY_COMPRESS_INDEX : i64 = 131072i64 ; pub const ARRAY_FLAG_USE_2D_VERTICES : i64 = 262144i64 ; pub const ARRAY_FLAG_USE_16_BIT_BONES : i64 = 524288i64 ; pub const ARRAY_FLAG_USE_OCTAHEDRAL_COMPRESSION : i64 = 2097152i64 ; pub const ARRAY_COMPRESS_DEFAULT : i64 = 2194432i64 ; } impl Mesh { # [doc = "Calculate a [`ConvexPolygonShape`][ConvexPolygonShape] from the mesh.\nIf `clean` is `true` (default), duplicate and interior vertices are removed automatically. You can set it to `false` to make the process faster if not needed.\nIf `simplify` is `true`, the geometry can be further simplified to reduce the amount of vertices. Disabled by default.\n# Default Arguments\n* `clean` - `true`\n* `simplify` - `false`"] # [doc = ""] # [inline] pub fn create_convex_shape (& self , clean : bool , simplify : bool) -> Option < Ref < crate :: generated :: Shape , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . create_convex_shape ; let ret = crate :: icalls :: icallvar__bool_bool (method_bind , self . this . sys () . as_ptr () , clean as _ , simplify as _) ; < Option < Ref < crate :: generated :: Shape , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Calculate an outline mesh at a defined offset (margin) from the original mesh.\n**Note:** This method typically returns the vertices in reverse order (e.g. clockwise to counterclockwise)."] # [doc = ""] # [inline] pub fn create_outline (& self , margin : f64) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . create_outline ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Calculate a [`ConcavePolygonShape`][ConcavePolygonShape] from the mesh."] # [doc = ""] # [inline] pub fn create_trimesh_shape (& self) -> Option < Ref < crate :: generated :: Shape , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . create_trimesh_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Shape , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Generate a [`TriangleMesh`][TriangleMesh] from the mesh."] # [doc = ""] # [inline] pub fn generate_triangle_mesh (& self) -> Option < Ref < crate :: generated :: TriangleMesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . generate_triangle_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: TriangleMesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the smallest [`AABB`][Aabb] enclosing this mesh in local space. Not affected by `custom_aabb`. See also [`VisualInstance.get_transformed_aabb`][VisualInstance::get_transformed_aabb].\n**Note:** This is only implemented for [`ArrayMesh`][ArrayMesh] and [`PrimitiveMesh`][PrimitiveMesh]."] # [doc = ""] # [inline] pub fn get_aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . get_aabb ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle."] # [doc = ""] # [inline] pub fn get_faces (& self) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . get_faces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets a hint to be used for lightmap resolution in [`BakedLightmap`][BakedLightmap]. Overrides [`BakedLightmap.default_texels_per_unit`][BakedLightmap::default_texels_per_unit]."] # [doc = ""] # [inline] pub fn lightmap_size_hint (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . get_lightmap_size_hint ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the amount of surfaces that the [`Mesh`][Mesh] holds."] # [doc = ""] # [inline] pub fn get_surface_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . get_surface_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Sets a hint to be used for lightmap resolution in [`BakedLightmap`][BakedLightmap]. Overrides [`BakedLightmap.default_texels_per_unit`][BakedLightmap::default_texels_per_unit]."] # [doc = ""] # [inline] pub fn set_lightmap_size_hint (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . set_lightmap_size_hint ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface (see [`ArrayMesh.add_surface_from_arrays`][ArrayMesh::add_surface_from_arrays])."] # [doc = ""] # [inline] pub fn surface_get_arrays (& self , surf_idx : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . surface_get_arrays ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , surf_idx as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the blend shape arrays for the requested surface."] # [doc = ""] # [inline] pub fn surface_get_blend_shape_arrays (& self , surf_idx : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . surface_get_blend_shape_arrays ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , surf_idx as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [`Material`][Material] in a given surface. Surface is rendered using this material."] # [doc = ""] # [inline] pub fn surface_get_material (& self , surf_idx : i64) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . surface_get_material ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , surf_idx as _) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets a [`Material`][Material] for a given surface. Surface will be rendered using this material."] # [doc = ""] # [inline] pub fn surface_set_material (& self , surf_idx : i64 , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshMethodTable :: get (get_api ()) . surface_set_material ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , surf_idx as _ , material . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Mesh { } unsafe impl GodotObject for Mesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Mesh" } } impl std :: ops :: Deref for Mesh { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Mesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Mesh { } unsafe impl SubClass < crate :: generated :: Reference > for Mesh { } unsafe impl SubClass < crate :: generated :: Object > for Mesh { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create_convex_shape : * mut sys :: godot_method_bind , pub create_outline : * mut sys :: godot_method_bind , pub create_trimesh_shape : * mut sys :: godot_method_bind , pub generate_triangle_mesh : * mut sys :: godot_method_bind , pub get_aabb : * mut sys :: godot_method_bind , pub get_faces : * mut sys :: godot_method_bind , pub get_lightmap_size_hint : * mut sys :: godot_method_bind , pub get_surface_count : * mut sys :: godot_method_bind , pub set_lightmap_size_hint : * mut sys :: godot_method_bind , pub surface_get_arrays : * mut sys :: godot_method_bind , pub surface_get_blend_shape_arrays : * mut sys :: godot_method_bind , pub surface_get_material : * mut sys :: godot_method_bind , pub surface_set_material : * mut sys :: godot_method_bind } impl MeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MeshMethodTable = MeshMethodTable { class_constructor : None , create_convex_shape : 0 as * mut sys :: godot_method_bind , create_outline : 0 as * mut sys :: godot_method_bind , create_trimesh_shape : 0 as * mut sys :: godot_method_bind , generate_triangle_mesh : 0 as * mut sys :: godot_method_bind , get_aabb : 0 as * mut sys :: godot_method_bind , get_faces : 0 as * mut sys :: godot_method_bind , get_lightmap_size_hint : 0 as * mut sys :: godot_method_bind , get_surface_count : 0 as * mut sys :: godot_method_bind , set_lightmap_size_hint : 0 as * mut sys :: godot_method_bind , surface_get_arrays : 0 as * mut sys :: godot_method_bind , surface_get_blend_shape_arrays : 0 as * mut sys :: godot_method_bind , surface_get_material : 0 as * mut sys :: godot_method_bind , surface_set_material : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Mesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create_convex_shape = (gd_api . godot_method_bind_get_method) (class_name , "create_convex_shape\0" . as_ptr () as * const c_char) ; table . create_outline = (gd_api . godot_method_bind_get_method) (class_name , "create_outline\0" . as_ptr () as * const c_char) ; table . create_trimesh_shape = (gd_api . godot_method_bind_get_method) (class_name , "create_trimesh_shape\0" . as_ptr () as * const c_char) ; table . generate_triangle_mesh = (gd_api . godot_method_bind_get_method) (class_name , "generate_triangle_mesh\0" . as_ptr () as * const c_char) ; table . get_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_aabb\0" . as_ptr () as * const c_char) ; table . get_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_faces\0" . as_ptr () as * const c_char) ; table . get_lightmap_size_hint = (gd_api . godot_method_bind_get_method) (class_name , "get_lightmap_size_hint\0" . as_ptr () as * const c_char) ; table . get_surface_count = (gd_api . godot_method_bind_get_method) (class_name , "get_surface_count\0" . as_ptr () as * const c_char) ; table . set_lightmap_size_hint = (gd_api . godot_method_bind_get_method) (class_name , "set_lightmap_size_hint\0" . as_ptr () as * const c_char) ; table . surface_get_arrays = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_arrays\0" . as_ptr () as * const c_char) ; table . surface_get_blend_shape_arrays = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_blend_shape_arrays\0" . as_ptr () as * const c_char) ; table . surface_get_material = (gd_api . godot_method_bind_get_method) (class_name , "surface_get_material\0" . as_ptr () as * const c_char) ; table . surface_set_material = (gd_api . godot_method_bind_get_method) (class_name , "surface_set_material\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::mesh::private::Mesh;
            
            pub(crate) mod mesh_data_tool {
                # ! [doc = "This module contains types related to the API class [`MeshDataTool`][super::MeshDataTool]."] pub (crate) mod private { # [doc = "`core class MeshDataTool` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_meshdatatool.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMeshDataTool inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MeshDataTool { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: MeshDataTool ; impl MeshDataTool { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MeshDataToolMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Clears all data currently in MeshDataTool."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a new surface to specified [`Mesh`][Mesh] with edited data."] # [doc = ""] # [inline] pub fn commit_to_surface (& self , mesh : impl AsArg < crate :: generated :: ArrayMesh >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . commit_to_surface ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Uses specified surface of given [`Mesh`][Mesh] to populate data for MeshDataTool.\nRequires [`Mesh`][Mesh] with primitive type [`Mesh.PRIMITIVE_TRIANGLES`][Mesh::PRIMITIVE_TRIANGLES]."] # [doc = ""] # [inline] pub fn create_from_surface (& self , mesh : impl AsArg < crate :: generated :: ArrayMesh > , surface : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . create_from_surface ; let ret = crate :: icalls :: icallvar__obj_i64 (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr () , surface as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Returns the number of edges in this [`Mesh`][Mesh]."] # [doc = ""] # [inline] pub fn get_edge_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_edge_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns array of faces that touch given edge."] # [doc = ""] # [inline] pub fn get_edge_faces (& self , idx : i64) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_edge_faces ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns meta information assigned to given edge."] # [doc = ""] # [inline] pub fn get_edge_meta (& self , idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_edge_meta ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns index of specified vertex connected to given edge.\nVertex argument can only be 0 or 1 because edges are comprised of two vertices."] # [doc = ""] # [inline] pub fn get_edge_vertex (& self , idx : i64 , vertex : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_edge_vertex ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , idx as _ , vertex as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of faces in this [`Mesh`][Mesh]."] # [doc = ""] # [inline] pub fn get_face_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_face_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns specified edge associated with given face.\nEdge argument must be either 0, 1, or 2 because a face only has three edges."] # [doc = ""] # [inline] pub fn get_face_edge (& self , idx : i64 , edge : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_face_edge ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , idx as _ , edge as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the metadata associated with the given face."] # [doc = ""] # [inline] pub fn get_face_meta (& self , idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_face_meta ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Calculates and returns the face normal of the given face."] # [doc = ""] # [inline] pub fn get_face_normal (& self , idx : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_face_normal ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the specified vertex of the given face.\nVertex argument must be either 0, 1, or 2 because faces contain three vertices."] # [doc = ""] # [inline] pub fn get_face_vertex (& self , idx : i64 , vertex : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_face_vertex ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , idx as _ , vertex as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`Mesh`][Mesh]'s format. Format is an integer made up of [`Mesh`][Mesh] format flags combined together. For example, a mesh containing both vertices and normals would return a format of `3` because [`ArrayMesh.ARRAY_FORMAT_VERTEX`][ArrayMesh::ARRAY_FORMAT_VERTEX] is `1` and [`ArrayMesh.ARRAY_FORMAT_NORMAL`][ArrayMesh::ARRAY_FORMAT_NORMAL] is `2`.\nSee [enum ArrayMesh.ArrayFormat] for a list of format flags."] # [doc = ""] # [inline] pub fn get_format (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_format ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the material assigned to the [`Mesh`][Mesh]."] # [doc = ""] # [inline] pub fn get_material (& self) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the vertex at given index."] # [doc = ""] # [inline] pub fn get_vertex (& self , idx : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the bones of the given vertex."] # [doc = ""] # [inline] pub fn get_vertex_bones (& self , idx : i64) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex_bones ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the color of the given vertex."] # [doc = ""] # [inline] pub fn get_vertex_color (& self , idx : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex_color ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the total number of vertices in [`Mesh`][Mesh]."] # [doc = ""] # [inline] pub fn get_vertex_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an array of edges that share the given vertex."] # [doc = ""] # [inline] pub fn get_vertex_edges (& self , idx : i64) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex_edges ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array of faces that share the given vertex."] # [doc = ""] # [inline] pub fn get_vertex_faces (& self , idx : i64) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex_faces ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the metadata associated with the given vertex."] # [doc = ""] # [inline] pub fn get_vertex_meta (& self , idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex_meta ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the normal of the given vertex."] # [doc = ""] # [inline] pub fn get_vertex_normal (& self , idx : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex_normal ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tangent of the given vertex."] # [doc = ""] # [inline] pub fn get_vertex_tangent (& self , idx : i64) -> Plane { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex_tangent ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Plane > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the UV of the given vertex."] # [doc = ""] # [inline] pub fn get_vertex_uv (& self , idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex_uv ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the UV2 of the given vertex."] # [doc = ""] # [inline] pub fn get_vertex_uv2 (& self , idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex_uv2 ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns bone weights of the given vertex."] # [doc = ""] # [inline] pub fn get_vertex_weights (& self , idx : i64) -> PoolArray < f32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . get_vertex_weights ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < PoolArray < f32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the metadata of the given edge."] # [doc = ""] # [inline] pub fn set_edge_meta (& self , idx : i64 , meta : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . set_edge_meta ; let ret = crate :: icalls :: icallvar__i64_var (method_bind , self . this . sys () . as_ptr () , idx as _ , meta . owned_to_variant ()) ; } } # [doc = "Sets the metadata of the given face."] # [doc = ""] # [inline] pub fn set_face_meta (& self , idx : i64 , meta : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . set_face_meta ; let ret = crate :: icalls :: icallvar__i64_var (method_bind , self . this . sys () . as_ptr () , idx as _ , meta . owned_to_variant ()) ; } } # [doc = "Sets the material to be used by newly-constructed [`Mesh`][Mesh]."] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = "Sets the position of the given vertex."] # [doc = ""] # [inline] pub fn set_vertex (& self , idx : i64 , vertex : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . set_vertex ; let ret = crate :: icalls :: icallvar__i64_vec3 (method_bind , self . this . sys () . as_ptr () , idx as _ , vertex) ; } } # [doc = "Sets the bones of the given vertex."] # [doc = ""] # [inline] pub fn set_vertex_bones (& self , idx : i64 , bones : PoolArray < i32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . set_vertex_bones ; let ret = crate :: icalls :: icallvar__i64_i32arr (method_bind , self . this . sys () . as_ptr () , idx as _ , bones) ; } } # [doc = "Sets the color of the given vertex."] # [doc = ""] # [inline] pub fn set_vertex_color (& self , idx : i64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . set_vertex_color ; let ret = crate :: icalls :: icallvar__i64_color (method_bind , self . this . sys () . as_ptr () , idx as _ , color) ; } } # [doc = "Sets the metadata associated with the given vertex."] # [doc = ""] # [inline] pub fn set_vertex_meta (& self , idx : i64 , meta : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . set_vertex_meta ; let ret = crate :: icalls :: icallvar__i64_var (method_bind , self . this . sys () . as_ptr () , idx as _ , meta . owned_to_variant ()) ; } } # [doc = "Sets the normal of the given vertex."] # [doc = ""] # [inline] pub fn set_vertex_normal (& self , idx : i64 , normal : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . set_vertex_normal ; let ret = crate :: icalls :: icallvar__i64_vec3 (method_bind , self . this . sys () . as_ptr () , idx as _ , normal) ; } } # [doc = "Sets the tangent of the given vertex."] # [doc = ""] # [inline] pub fn set_vertex_tangent (& self , idx : i64 , tangent : Plane) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . set_vertex_tangent ; let ret = crate :: icalls :: icallvar__i64_plane (method_bind , self . this . sys () . as_ptr () , idx as _ , tangent) ; } } # [doc = "Sets the UV of the given vertex."] # [doc = ""] # [inline] pub fn set_vertex_uv (& self , idx : i64 , uv : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . set_vertex_uv ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , idx as _ , uv) ; } } # [doc = "Sets the UV2 of the given vertex."] # [doc = ""] # [inline] pub fn set_vertex_uv2 (& self , idx : i64 , uv2 : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . set_vertex_uv2 ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , idx as _ , uv2) ; } } # [doc = "Sets the bone weights of the given vertex."] # [doc = ""] # [inline] pub fn set_vertex_weights (& self , idx : i64 , weights : PoolArray < f32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshDataToolMethodTable :: get (get_api ()) . set_vertex_weights ; let ret = crate :: icalls :: icallvar__i64_f32arr (method_bind , self . this . sys () . as_ptr () , idx as _ , weights) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MeshDataTool { } unsafe impl GodotObject for MeshDataTool { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MeshDataTool" } } impl std :: ops :: Deref for MeshDataTool { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MeshDataTool { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for MeshDataTool { } unsafe impl SubClass < crate :: generated :: Object > for MeshDataTool { } impl Instanciable for MeshDataTool { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { MeshDataTool :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MeshDataToolMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub commit_to_surface : * mut sys :: godot_method_bind , pub create_from_surface : * mut sys :: godot_method_bind , pub get_edge_count : * mut sys :: godot_method_bind , pub get_edge_faces : * mut sys :: godot_method_bind , pub get_edge_meta : * mut sys :: godot_method_bind , pub get_edge_vertex : * mut sys :: godot_method_bind , pub get_face_count : * mut sys :: godot_method_bind , pub get_face_edge : * mut sys :: godot_method_bind , pub get_face_meta : * mut sys :: godot_method_bind , pub get_face_normal : * mut sys :: godot_method_bind , pub get_face_vertex : * mut sys :: godot_method_bind , pub get_format : * mut sys :: godot_method_bind , pub get_material : * mut sys :: godot_method_bind , pub get_vertex : * mut sys :: godot_method_bind , pub get_vertex_bones : * mut sys :: godot_method_bind , pub get_vertex_color : * mut sys :: godot_method_bind , pub get_vertex_count : * mut sys :: godot_method_bind , pub get_vertex_edges : * mut sys :: godot_method_bind , pub get_vertex_faces : * mut sys :: godot_method_bind , pub get_vertex_meta : * mut sys :: godot_method_bind , pub get_vertex_normal : * mut sys :: godot_method_bind , pub get_vertex_tangent : * mut sys :: godot_method_bind , pub get_vertex_uv : * mut sys :: godot_method_bind , pub get_vertex_uv2 : * mut sys :: godot_method_bind , pub get_vertex_weights : * mut sys :: godot_method_bind , pub set_edge_meta : * mut sys :: godot_method_bind , pub set_face_meta : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind , pub set_vertex : * mut sys :: godot_method_bind , pub set_vertex_bones : * mut sys :: godot_method_bind , pub set_vertex_color : * mut sys :: godot_method_bind , pub set_vertex_meta : * mut sys :: godot_method_bind , pub set_vertex_normal : * mut sys :: godot_method_bind , pub set_vertex_tangent : * mut sys :: godot_method_bind , pub set_vertex_uv : * mut sys :: godot_method_bind , pub set_vertex_uv2 : * mut sys :: godot_method_bind , pub set_vertex_weights : * mut sys :: godot_method_bind } impl MeshDataToolMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MeshDataToolMethodTable = MeshDataToolMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , commit_to_surface : 0 as * mut sys :: godot_method_bind , create_from_surface : 0 as * mut sys :: godot_method_bind , get_edge_count : 0 as * mut sys :: godot_method_bind , get_edge_faces : 0 as * mut sys :: godot_method_bind , get_edge_meta : 0 as * mut sys :: godot_method_bind , get_edge_vertex : 0 as * mut sys :: godot_method_bind , get_face_count : 0 as * mut sys :: godot_method_bind , get_face_edge : 0 as * mut sys :: godot_method_bind , get_face_meta : 0 as * mut sys :: godot_method_bind , get_face_normal : 0 as * mut sys :: godot_method_bind , get_face_vertex : 0 as * mut sys :: godot_method_bind , get_format : 0 as * mut sys :: godot_method_bind , get_material : 0 as * mut sys :: godot_method_bind , get_vertex : 0 as * mut sys :: godot_method_bind , get_vertex_bones : 0 as * mut sys :: godot_method_bind , get_vertex_color : 0 as * mut sys :: godot_method_bind , get_vertex_count : 0 as * mut sys :: godot_method_bind , get_vertex_edges : 0 as * mut sys :: godot_method_bind , get_vertex_faces : 0 as * mut sys :: godot_method_bind , get_vertex_meta : 0 as * mut sys :: godot_method_bind , get_vertex_normal : 0 as * mut sys :: godot_method_bind , get_vertex_tangent : 0 as * mut sys :: godot_method_bind , get_vertex_uv : 0 as * mut sys :: godot_method_bind , get_vertex_uv2 : 0 as * mut sys :: godot_method_bind , get_vertex_weights : 0 as * mut sys :: godot_method_bind , set_edge_meta : 0 as * mut sys :: godot_method_bind , set_face_meta : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind , set_vertex : 0 as * mut sys :: godot_method_bind , set_vertex_bones : 0 as * mut sys :: godot_method_bind , set_vertex_color : 0 as * mut sys :: godot_method_bind , set_vertex_meta : 0 as * mut sys :: godot_method_bind , set_vertex_normal : 0 as * mut sys :: godot_method_bind , set_vertex_tangent : 0 as * mut sys :: godot_method_bind , set_vertex_uv : 0 as * mut sys :: godot_method_bind , set_vertex_uv2 : 0 as * mut sys :: godot_method_bind , set_vertex_weights : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MeshDataToolMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MeshDataTool\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . commit_to_surface = (gd_api . godot_method_bind_get_method) (class_name , "commit_to_surface\0" . as_ptr () as * const c_char) ; table . create_from_surface = (gd_api . godot_method_bind_get_method) (class_name , "create_from_surface\0" . as_ptr () as * const c_char) ; table . get_edge_count = (gd_api . godot_method_bind_get_method) (class_name , "get_edge_count\0" . as_ptr () as * const c_char) ; table . get_edge_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_edge_faces\0" . as_ptr () as * const c_char) ; table . get_edge_meta = (gd_api . godot_method_bind_get_method) (class_name , "get_edge_meta\0" . as_ptr () as * const c_char) ; table . get_edge_vertex = (gd_api . godot_method_bind_get_method) (class_name , "get_edge_vertex\0" . as_ptr () as * const c_char) ; table . get_face_count = (gd_api . godot_method_bind_get_method) (class_name , "get_face_count\0" . as_ptr () as * const c_char) ; table . get_face_edge = (gd_api . godot_method_bind_get_method) (class_name , "get_face_edge\0" . as_ptr () as * const c_char) ; table . get_face_meta = (gd_api . godot_method_bind_get_method) (class_name , "get_face_meta\0" . as_ptr () as * const c_char) ; table . get_face_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_face_normal\0" . as_ptr () as * const c_char) ; table . get_face_vertex = (gd_api . godot_method_bind_get_method) (class_name , "get_face_vertex\0" . as_ptr () as * const c_char) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\0" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_vertex = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex\0" . as_ptr () as * const c_char) ; table . get_vertex_bones = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_bones\0" . as_ptr () as * const c_char) ; table . get_vertex_color = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_color\0" . as_ptr () as * const c_char) ; table . get_vertex_count = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_count\0" . as_ptr () as * const c_char) ; table . get_vertex_edges = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_edges\0" . as_ptr () as * const c_char) ; table . get_vertex_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_faces\0" . as_ptr () as * const c_char) ; table . get_vertex_meta = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_meta\0" . as_ptr () as * const c_char) ; table . get_vertex_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_normal\0" . as_ptr () as * const c_char) ; table . get_vertex_tangent = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_tangent\0" . as_ptr () as * const c_char) ; table . get_vertex_uv = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_uv\0" . as_ptr () as * const c_char) ; table . get_vertex_uv2 = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_uv2\0" . as_ptr () as * const c_char) ; table . get_vertex_weights = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_weights\0" . as_ptr () as * const c_char) ; table . set_edge_meta = (gd_api . godot_method_bind_get_method) (class_name , "set_edge_meta\0" . as_ptr () as * const c_char) ; table . set_face_meta = (gd_api . godot_method_bind_get_method) (class_name , "set_face_meta\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; table . set_vertex = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex\0" . as_ptr () as * const c_char) ; table . set_vertex_bones = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_bones\0" . as_ptr () as * const c_char) ; table . set_vertex_color = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_color\0" . as_ptr () as * const c_char) ; table . set_vertex_meta = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_meta\0" . as_ptr () as * const c_char) ; table . set_vertex_normal = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_normal\0" . as_ptr () as * const c_char) ; table . set_vertex_tangent = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_tangent\0" . as_ptr () as * const c_char) ; table . set_vertex_uv = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_uv\0" . as_ptr () as * const c_char) ; table . set_vertex_uv2 = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_uv2\0" . as_ptr () as * const c_char) ; table . set_vertex_weights = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_weights\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::mesh_data_tool::private::MeshDataTool;
            
            pub(crate) mod mesh_instance {
                # ! [doc = "This module contains types related to the API class [`MeshInstance`][super::MeshInstance]."] pub (crate) mod private { # [doc = "`core class MeshInstance` inherits `GeometryInstance` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_meshinstance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`MeshInstance` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<MeshInstance>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nMeshInstance inherits methods from:\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MeshInstance { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: MeshInstance ; impl MeshInstance { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MeshInstanceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "This helper creates a [`StaticBody`][StaticBody] child node with a [`ConvexPolygonShape`][ConvexPolygonShape] collision shape calculated from the mesh geometry. It's mainly used for testing.\nIf `clean` is `true` (default), duplicate and interior vertices are removed automatically. You can set it to `false` to make the process faster if not needed.\nIf `simplify` is `true`, the geometry can be further simplified to reduce the amount of vertices. Disabled by default.\n# Default Arguments\n* `clean` - `true`\n* `simplify` - `false`"] # [doc = ""] # [inline] pub fn create_convex_collision (& self , clean : bool , simplify : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . create_convex_collision ; let ret = crate :: icalls :: icallvar__bool_bool (method_bind , self . this . sys () . as_ptr () , clean as _ , simplify as _) ; } } # [doc = "This helper creates a [`MeshInstance`][MeshInstance] child node with gizmos at every vertex calculated from the mesh geometry. It's mainly used for testing."] # [doc = ""] # [inline] pub fn create_debug_tangents (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . create_debug_tangents ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "This helper creates a [`StaticBody`][StaticBody] child node with multiple [`ConvexPolygonShape`][ConvexPolygonShape] collision shapes calculated from the mesh geometry via convex decomposition. It's mainly used for testing."] # [doc = ""] # [inline] pub fn create_multiple_convex_collisions (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . create_multiple_convex_collisions ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "This helper creates a [`StaticBody`][StaticBody] child node with a [`ConcavePolygonShape`][ConcavePolygonShape] collision shape calculated from the mesh geometry. It's mainly used for testing."] # [doc = ""] # [inline] pub fn create_trimesh_collision (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . create_trimesh_collision ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the [`Material`][Material] that will be used by the [`Mesh`][Mesh] when drawing. This can return the [`GeometryInstance.material_override`][GeometryInstance::material_override], the surface override [`Material`][Material] defined in this [`MeshInstance`][MeshInstance], or the surface [`Material`][Material] defined in the [`Mesh`][Mesh]. For example, if [`GeometryInstance.material_override`][GeometryInstance::material_override] is used, all surfaces will return the override material."] # [doc = ""] # [inline] pub fn get_active_material (& self , surface : i64) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . get_active_material ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , surface as _) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Mesh`][Mesh] resource for the instance."] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "[`NodePath`][NodePath] to the [`Skeleton`][Skeleton] associated with the instance."] # [doc = ""] # [inline] pub fn skeleton_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . get_skeleton_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the skin to be used by this instance."] # [doc = ""] # [inline] pub fn skin (& self) -> Option < Ref < crate :: generated :: Skin , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . get_skin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Skin , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the override [`Material`][Material] for a surface of the [`Mesh`][Mesh] resource.\n**Note:** This function only returns _override_ materials associated with this [`MeshInstance`][MeshInstance]. Consider using [`get_active_material`][Self::get_active_material] or [`Mesh.surface_get_material`][Mesh::surface_get_material] to get materials associated with the [`Mesh`][Mesh] resource."] # [doc = ""] # [inline] pub fn get_surface_material (& self , surface : i64) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . get_surface_material ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , surface as _) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of surface override materials."] # [doc = ""] # [inline] pub fn get_surface_material_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . get_surface_material_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this [`MeshInstance`][MeshInstance] can be merged with the specified `other_mesh_instance`, using the [`MeshInstance.merge_meshes`][MeshInstance::merge_meshes] function.\nIn order to be mergeable, properties of the [`MeshInstance`][MeshInstance] must match, and each surface must match, in terms of material, attributes and vertex format."] # [doc = ""] # [inline] pub fn is_mergeable_with (& self , other_mesh_instance : impl AsArg < crate :: generated :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . is_mergeable_with ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , other_mesh_instance . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, normals are transformed when software skinning is used. Set to `false` when normals are not needed for better performance.\nSee [member ProjectSettings.rendering/quality/skinning/software_skinning_fallback] for details about how software skinning is enabled."] # [doc = ""] # [inline] pub fn is_software_skinning_transform_normals_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . is_software_skinning_transform_normals_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "This function can merge together the data from several source [`MeshInstance`][MeshInstance]s into a single destination [`MeshInstance`][MeshInstance] (the MeshInstance the function is called from). This is primarily useful for improving performance by reducing the number of drawcalls and [`Node`][Node]s.\nMerging should only be attempted for simple meshes that do not contain animation.\nThe final vertices can either be returned in global space, or in local space relative to the destination [`MeshInstance`][MeshInstance] global transform (the destination Node must be inside the [`SceneTree`][SceneTree] for local space to work).\nThe function will make a final check for compatibility between the [`MeshInstance`][MeshInstance]s by default, this should always be used unless you have previously checked for compatibility using [`MeshInstance.is_mergeable_with`][MeshInstance::is_mergeable_with]. If the compatibility check is omitted and the meshes are merged, you may see rendering errors.\n**Note:** The requirements for similarity between meshes are quite stringent. They can be checked using the [`MeshInstance.is_mergeable_with`][MeshInstance::is_mergeable_with] function prior to calling [`MeshInstance.merge_meshes`][MeshInstance::merge_meshes].\nAlso note that any initial data in the destination [`MeshInstance`][MeshInstance] data will be discarded.\n# Default Arguments\n* `mesh_instances` - `[  ]`\n* `use_global_space` - `false`\n* `check_compatibility` - `true`"] # [doc = ""] # [inline] pub fn merge_meshes (& self , mesh_instances : VariantArray , use_global_space : bool , check_compatibility : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . merge_meshes ; let ret = crate :: icalls :: icallvar__arr_bool_bool (method_bind , self . this . sys () . as_ptr () , mesh_instances , use_global_space as _ , check_compatibility as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The [`Mesh`][Mesh] resource for the instance."] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : impl AsArg < crate :: generated :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } # [doc = "[`NodePath`][NodePath] to the [`Skeleton`][Skeleton] associated with the instance."] # [doc = ""] # [inline] pub fn set_skeleton_path (& self , skeleton_path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . set_skeleton_path ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , skeleton_path . into ()) ; } } # [doc = "Sets the skin to be used by this instance."] # [doc = ""] # [inline] pub fn set_skin (& self , skin : impl AsArg < crate :: generated :: Skin >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . set_skin ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , skin . as_arg_ptr ()) ; } } # [doc = "If `true`, normals are transformed when software skinning is used. Set to `false` when normals are not needed for better performance.\nSee [member ProjectSettings.rendering/quality/skinning/software_skinning_fallback] for details about how software skinning is enabled."] # [doc = ""] # [inline] pub fn set_software_skinning_transform_normals (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . set_software_skinning_transform_normals ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Sets the override [`Material`][Material] for the specified surface of the [`Mesh`][Mesh] resource. This material is associated with this [`MeshInstance`][MeshInstance] rather than with the [`Mesh`][Mesh] resource."] # [doc = ""] # [inline] pub fn set_surface_material (& self , surface : i64 , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstanceMethodTable :: get (get_api ()) . set_surface_material ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , surface as _ , material . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MeshInstance { } unsafe impl GodotObject for MeshInstance { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "MeshInstance" } } impl QueueFree for MeshInstance { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for MeshInstance { type Target = crate :: generated :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MeshInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: GeometryInstance > for MeshInstance { } unsafe impl SubClass < crate :: generated :: VisualInstance > for MeshInstance { } unsafe impl SubClass < crate :: generated :: CullInstance > for MeshInstance { } unsafe impl SubClass < crate :: generated :: Spatial > for MeshInstance { } unsafe impl SubClass < crate :: generated :: Node > for MeshInstance { } unsafe impl SubClass < crate :: generated :: Object > for MeshInstance { } impl Instanciable for MeshInstance { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { MeshInstance :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MeshInstanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create_convex_collision : * mut sys :: godot_method_bind , pub create_debug_tangents : * mut sys :: godot_method_bind , pub create_multiple_convex_collisions : * mut sys :: godot_method_bind , pub create_trimesh_collision : * mut sys :: godot_method_bind , pub get_active_material : * mut sys :: godot_method_bind , pub get_mesh : * mut sys :: godot_method_bind , pub get_skeleton_path : * mut sys :: godot_method_bind , pub get_skin : * mut sys :: godot_method_bind , pub get_surface_material : * mut sys :: godot_method_bind , pub get_surface_material_count : * mut sys :: godot_method_bind , pub is_mergeable_with : * mut sys :: godot_method_bind , pub is_software_skinning_transform_normals_enabled : * mut sys :: godot_method_bind , pub merge_meshes : * mut sys :: godot_method_bind , pub set_mesh : * mut sys :: godot_method_bind , pub set_skeleton_path : * mut sys :: godot_method_bind , pub set_skin : * mut sys :: godot_method_bind , pub set_software_skinning_transform_normals : * mut sys :: godot_method_bind , pub set_surface_material : * mut sys :: godot_method_bind } impl MeshInstanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MeshInstanceMethodTable = MeshInstanceMethodTable { class_constructor : None , create_convex_collision : 0 as * mut sys :: godot_method_bind , create_debug_tangents : 0 as * mut sys :: godot_method_bind , create_multiple_convex_collisions : 0 as * mut sys :: godot_method_bind , create_trimesh_collision : 0 as * mut sys :: godot_method_bind , get_active_material : 0 as * mut sys :: godot_method_bind , get_mesh : 0 as * mut sys :: godot_method_bind , get_skeleton_path : 0 as * mut sys :: godot_method_bind , get_skin : 0 as * mut sys :: godot_method_bind , get_surface_material : 0 as * mut sys :: godot_method_bind , get_surface_material_count : 0 as * mut sys :: godot_method_bind , is_mergeable_with : 0 as * mut sys :: godot_method_bind , is_software_skinning_transform_normals_enabled : 0 as * mut sys :: godot_method_bind , merge_meshes : 0 as * mut sys :: godot_method_bind , set_mesh : 0 as * mut sys :: godot_method_bind , set_skeleton_path : 0 as * mut sys :: godot_method_bind , set_skin : 0 as * mut sys :: godot_method_bind , set_software_skinning_transform_normals : 0 as * mut sys :: godot_method_bind , set_surface_material : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MeshInstanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MeshInstance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create_convex_collision = (gd_api . godot_method_bind_get_method) (class_name , "create_convex_collision\0" . as_ptr () as * const c_char) ; table . create_debug_tangents = (gd_api . godot_method_bind_get_method) (class_name , "create_debug_tangents\0" . as_ptr () as * const c_char) ; table . create_multiple_convex_collisions = (gd_api . godot_method_bind_get_method) (class_name , "create_multiple_convex_collisions\0" . as_ptr () as * const c_char) ; table . create_trimesh_collision = (gd_api . godot_method_bind_get_method) (class_name , "create_trimesh_collision\0" . as_ptr () as * const c_char) ; table . get_active_material = (gd_api . godot_method_bind_get_method) (class_name , "get_active_material\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_skeleton_path = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton_path\0" . as_ptr () as * const c_char) ; table . get_skin = (gd_api . godot_method_bind_get_method) (class_name , "get_skin\0" . as_ptr () as * const c_char) ; table . get_surface_material = (gd_api . godot_method_bind_get_method) (class_name , "get_surface_material\0" . as_ptr () as * const c_char) ; table . get_surface_material_count = (gd_api . godot_method_bind_get_method) (class_name , "get_surface_material_count\0" . as_ptr () as * const c_char) ; table . is_mergeable_with = (gd_api . godot_method_bind_get_method) (class_name , "is_mergeable_with\0" . as_ptr () as * const c_char) ; table . is_software_skinning_transform_normals_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_software_skinning_transform_normals_enabled\0" . as_ptr () as * const c_char) ; table . merge_meshes = (gd_api . godot_method_bind_get_method) (class_name , "merge_meshes\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; table . set_skeleton_path = (gd_api . godot_method_bind_get_method) (class_name , "set_skeleton_path\0" . as_ptr () as * const c_char) ; table . set_skin = (gd_api . godot_method_bind_get_method) (class_name , "set_skin\0" . as_ptr () as * const c_char) ; table . set_software_skinning_transform_normals = (gd_api . godot_method_bind_get_method) (class_name , "set_software_skinning_transform_normals\0" . as_ptr () as * const c_char) ; table . set_surface_material = (gd_api . godot_method_bind_get_method) (class_name , "set_surface_material\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::mesh_instance::private::MeshInstance;
            
            pub(crate) mod mesh_instance_2d {
                # ! [doc = "This module contains types related to the API class [`MeshInstance2D`][super::MeshInstance2D]."] pub (crate) mod private { # [doc = "`core class MeshInstance2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_meshinstance2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`MeshInstance2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<MeshInstance2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nMeshInstance2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MeshInstance2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: MeshInstance2D ; impl MeshInstance2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MeshInstance2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [`Mesh`][Mesh] that will be drawn by the [`MeshInstance2D`][MeshInstance2D]."] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The normal map that will be used if using the default [`CanvasItemMaterial`][CanvasItemMaterial].\n**Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normal_map (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . get_normal_map ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Texture`][Texture] that will be used if using the default [`CanvasItemMaterial`][CanvasItemMaterial]. Can be accessed as `TEXTURE` in CanvasItem shader."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Mesh`][Mesh] that will be drawn by the [`MeshInstance2D`][MeshInstance2D]."] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : impl AsArg < crate :: generated :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } # [doc = "The normal map that will be used if using the default [`CanvasItemMaterial`][CanvasItemMaterial].\n**Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn set_normal_map (& self , normal_map : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . set_normal_map ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , normal_map . as_arg_ptr ()) ; } } # [doc = "The [`Texture`][Texture] that will be used if using the default [`CanvasItemMaterial`][CanvasItemMaterial]. Can be accessed as `TEXTURE` in CanvasItem shader."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshInstance2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MeshInstance2D { } unsafe impl GodotObject for MeshInstance2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "MeshInstance2D" } } impl QueueFree for MeshInstance2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for MeshInstance2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MeshInstance2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for MeshInstance2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for MeshInstance2D { } unsafe impl SubClass < crate :: generated :: Node > for MeshInstance2D { } unsafe impl SubClass < crate :: generated :: Object > for MeshInstance2D { } impl Instanciable for MeshInstance2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { MeshInstance2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MeshInstance2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_mesh : * mut sys :: godot_method_bind , pub get_normal_map : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub set_mesh : * mut sys :: godot_method_bind , pub set_normal_map : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind } impl MeshInstance2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MeshInstance2DMethodTable = MeshInstance2DMethodTable { class_constructor : None , get_mesh : 0 as * mut sys :: godot_method_bind , get_normal_map : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , set_mesh : 0 as * mut sys :: godot_method_bind , set_normal_map : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MeshInstance2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MeshInstance2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_map\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; table . set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_map\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::mesh_instance_2d::private::MeshInstance2D;
            
            pub(crate) mod mesh_library {
                # ! [doc = "This module contains types related to the API class [`MeshLibrary`][super::MeshLibrary]."] pub (crate) mod private { # [doc = "`core class MeshLibrary` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_meshlibrary.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMeshLibrary inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MeshLibrary { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: MeshLibrary ; impl MeshLibrary { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MeshLibraryMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Clears the library."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Creates a new item in the library with the given ID.\nYou can get an unused ID from [`get_last_unused_item_id`][Self::get_last_unused_item_id]."] # [doc = ""] # [inline] pub fn create_item (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . create_item ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; } } # [doc = "Returns the first item with the given name."] # [doc = ""] # [inline] pub fn find_item_by_name (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . find_item_by_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the list of item IDs in use."] # [doc = ""] # [inline] pub fn get_item_list (& self) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the item's mesh."] # [doc = ""] # [inline] pub fn get_item_mesh (& self , id : i64) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_mesh ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the transform applied to the item's mesh."] # [doc = ""] # [inline] pub fn get_item_mesh_transform (& self , id : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_mesh_transform ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the item's name."] # [doc = ""] # [inline] pub fn get_item_name (& self , id : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the item's navigation mesh."] # [doc = ""] # [inline] pub fn get_item_navmesh (& self , id : i64) -> Option < Ref < crate :: generated :: NavigationMesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_navmesh ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Option < Ref < crate :: generated :: NavigationMesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the transform applied to the item's navigation mesh."] # [doc = ""] # [inline] pub fn get_item_navmesh_transform (& self , id : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_navmesh_transform ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using [`set_item_preview`][Self::set_item_preview]. Returns an empty [`Texture`][Texture] if no preview was manually set in a running project."] # [doc = ""] # [inline] pub fn get_item_preview (& self , id : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_preview ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an item's collision shapes.\nThe array consists of each [`Shape`][Shape] followed by its [`Transform`][Transform]."] # [doc = ""] # [inline] pub fn get_item_shapes (& self , id : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_item_shapes ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets an unused ID for a new item."] # [doc = ""] # [inline] pub fn get_last_unused_item_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . get_last_unused_item_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Removes the item."] # [doc = ""] # [inline] pub fn remove_item (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . remove_item ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; } } # [doc = "Sets the item's mesh."] # [doc = ""] # [inline] pub fn set_item_mesh (& self , id : i64 , mesh : impl AsArg < crate :: generated :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_mesh ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , id as _ , mesh . as_arg_ptr ()) ; } } # [doc = "Sets the transform to apply to the item's mesh."] # [doc = ""] # [inline] pub fn set_item_mesh_transform (& self , id : i64 , mesh_transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_mesh_transform ; let ret = crate :: icalls :: icallvar__i64_trans (method_bind , self . this . sys () . as_ptr () , id as _ , mesh_transform) ; } } # [doc = "Sets the item's name.\nThis name is shown in the editor. It can also be used to look up the item later using [`find_item_by_name`][Self::find_item_by_name]."] # [doc = ""] # [inline] pub fn set_item_name (& self , id : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_name ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , id as _ , name . into ()) ; } } # [doc = "Sets the item's navigation mesh."] # [doc = ""] # [inline] pub fn set_item_navmesh (& self , id : i64 , navmesh : impl AsArg < crate :: generated :: NavigationMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_navmesh ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , id as _ , navmesh . as_arg_ptr ()) ; } } # [doc = "Sets the transform to apply to the item's navigation mesh."] # [doc = ""] # [inline] pub fn set_item_navmesh_transform (& self , id : i64 , navmesh : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_navmesh_transform ; let ret = crate :: icalls :: icallvar__i64_trans (method_bind , self . this . sys () . as_ptr () , id as _ , navmesh) ; } } # [doc = "Sets a texture to use as the item's preview icon in the editor."] # [doc = ""] # [inline] pub fn set_item_preview (& self , id : i64 , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_preview ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , id as _ , texture . as_arg_ptr ()) ; } } # [doc = "Sets an item's collision shapes.\nThe array should consist of [`Shape`][Shape] objects, each followed by a [`Transform`][Transform] that will be applied to it. For shapes that should not have a transform, use [`Transform.IDENTITY`][Transform::IDENTITY]."] # [doc = ""] # [inline] pub fn set_item_shapes (& self , id : i64 , shapes : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshLibraryMethodTable :: get (get_api ()) . set_item_shapes ; let ret = crate :: icalls :: icallvar__i64_arr (method_bind , self . this . sys () . as_ptr () , id as _ , shapes) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MeshLibrary { } unsafe impl GodotObject for MeshLibrary { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MeshLibrary" } } impl std :: ops :: Deref for MeshLibrary { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MeshLibrary { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for MeshLibrary { } unsafe impl SubClass < crate :: generated :: Reference > for MeshLibrary { } unsafe impl SubClass < crate :: generated :: Object > for MeshLibrary { } impl Instanciable for MeshLibrary { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { MeshLibrary :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MeshLibraryMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub create_item : * mut sys :: godot_method_bind , pub find_item_by_name : * mut sys :: godot_method_bind , pub get_item_list : * mut sys :: godot_method_bind , pub get_item_mesh : * mut sys :: godot_method_bind , pub get_item_mesh_transform : * mut sys :: godot_method_bind , pub get_item_name : * mut sys :: godot_method_bind , pub get_item_navmesh : * mut sys :: godot_method_bind , pub get_item_navmesh_transform : * mut sys :: godot_method_bind , pub get_item_preview : * mut sys :: godot_method_bind , pub get_item_shapes : * mut sys :: godot_method_bind , pub get_last_unused_item_id : * mut sys :: godot_method_bind , pub remove_item : * mut sys :: godot_method_bind , pub set_item_mesh : * mut sys :: godot_method_bind , pub set_item_mesh_transform : * mut sys :: godot_method_bind , pub set_item_name : * mut sys :: godot_method_bind , pub set_item_navmesh : * mut sys :: godot_method_bind , pub set_item_navmesh_transform : * mut sys :: godot_method_bind , pub set_item_preview : * mut sys :: godot_method_bind , pub set_item_shapes : * mut sys :: godot_method_bind } impl MeshLibraryMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MeshLibraryMethodTable = MeshLibraryMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , create_item : 0 as * mut sys :: godot_method_bind , find_item_by_name : 0 as * mut sys :: godot_method_bind , get_item_list : 0 as * mut sys :: godot_method_bind , get_item_mesh : 0 as * mut sys :: godot_method_bind , get_item_mesh_transform : 0 as * mut sys :: godot_method_bind , get_item_name : 0 as * mut sys :: godot_method_bind , get_item_navmesh : 0 as * mut sys :: godot_method_bind , get_item_navmesh_transform : 0 as * mut sys :: godot_method_bind , get_item_preview : 0 as * mut sys :: godot_method_bind , get_item_shapes : 0 as * mut sys :: godot_method_bind , get_last_unused_item_id : 0 as * mut sys :: godot_method_bind , remove_item : 0 as * mut sys :: godot_method_bind , set_item_mesh : 0 as * mut sys :: godot_method_bind , set_item_mesh_transform : 0 as * mut sys :: godot_method_bind , set_item_name : 0 as * mut sys :: godot_method_bind , set_item_navmesh : 0 as * mut sys :: godot_method_bind , set_item_navmesh_transform : 0 as * mut sys :: godot_method_bind , set_item_preview : 0 as * mut sys :: godot_method_bind , set_item_shapes : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MeshLibraryMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MeshLibrary\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . create_item = (gd_api . godot_method_bind_get_method) (class_name , "create_item\0" . as_ptr () as * const c_char) ; table . find_item_by_name = (gd_api . godot_method_bind_get_method) (class_name , "find_item_by_name\0" . as_ptr () as * const c_char) ; table . get_item_list = (gd_api . godot_method_bind_get_method) (class_name , "get_item_list\0" . as_ptr () as * const c_char) ; table . get_item_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_item_mesh\0" . as_ptr () as * const c_char) ; table . get_item_mesh_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_item_mesh_transform\0" . as_ptr () as * const c_char) ; table . get_item_name = (gd_api . godot_method_bind_get_method) (class_name , "get_item_name\0" . as_ptr () as * const c_char) ; table . get_item_navmesh = (gd_api . godot_method_bind_get_method) (class_name , "get_item_navmesh\0" . as_ptr () as * const c_char) ; table . get_item_navmesh_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_item_navmesh_transform\0" . as_ptr () as * const c_char) ; table . get_item_preview = (gd_api . godot_method_bind_get_method) (class_name , "get_item_preview\0" . as_ptr () as * const c_char) ; table . get_item_shapes = (gd_api . godot_method_bind_get_method) (class_name , "get_item_shapes\0" . as_ptr () as * const c_char) ; table . get_last_unused_item_id = (gd_api . godot_method_bind_get_method) (class_name , "get_last_unused_item_id\0" . as_ptr () as * const c_char) ; table . remove_item = (gd_api . godot_method_bind_get_method) (class_name , "remove_item\0" . as_ptr () as * const c_char) ; table . set_item_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_item_mesh\0" . as_ptr () as * const c_char) ; table . set_item_mesh_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_item_mesh_transform\0" . as_ptr () as * const c_char) ; table . set_item_name = (gd_api . godot_method_bind_get_method) (class_name , "set_item_name\0" . as_ptr () as * const c_char) ; table . set_item_navmesh = (gd_api . godot_method_bind_get_method) (class_name , "set_item_navmesh\0" . as_ptr () as * const c_char) ; table . set_item_navmesh_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_item_navmesh_transform\0" . as_ptr () as * const c_char) ; table . set_item_preview = (gd_api . godot_method_bind_get_method) (class_name , "set_item_preview\0" . as_ptr () as * const c_char) ; table . set_item_shapes = (gd_api . godot_method_bind_get_method) (class_name , "set_item_shapes\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::mesh_library::private::MeshLibrary;
            
            pub(crate) mod mesh_texture {
                # ! [doc = "This module contains types related to the API class [`MeshTexture`][super::MeshTexture]."] pub (crate) mod private { # [doc = "`core class MeshTexture` inherits `Texture` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_meshtexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMeshTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MeshTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: MeshTexture ; impl MeshTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MeshTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Sets the base texture that the Mesh will use to draw."] # [doc = ""] # [inline] pub fn base_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . get_base_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the size of the image, needed for reference."] # [doc = ""] # [inline] pub fn image_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . get_image_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the mesh used to draw. It must be a mesh using 2D vertices."] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the base texture that the Mesh will use to draw."] # [doc = ""] # [inline] pub fn set_base_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . set_base_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Sets the size of the image, needed for reference."] # [doc = ""] # [inline] pub fn set_image_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . set_image_size ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Sets the mesh used to draw. It must be a mesh using 2D vertices."] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : impl AsArg < crate :: generated :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MeshTextureMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MeshTexture { } unsafe impl GodotObject for MeshTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MeshTexture" } } impl std :: ops :: Deref for MeshTexture { type Target = crate :: generated :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MeshTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Texture > for MeshTexture { } unsafe impl SubClass < crate :: generated :: Resource > for MeshTexture { } unsafe impl SubClass < crate :: generated :: Reference > for MeshTexture { } unsafe impl SubClass < crate :: generated :: Object > for MeshTexture { } impl Instanciable for MeshTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { MeshTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MeshTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_base_texture : * mut sys :: godot_method_bind , pub get_image_size : * mut sys :: godot_method_bind , pub get_mesh : * mut sys :: godot_method_bind , pub set_base_texture : * mut sys :: godot_method_bind , pub set_image_size : * mut sys :: godot_method_bind , pub set_mesh : * mut sys :: godot_method_bind } impl MeshTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MeshTextureMethodTable = MeshTextureMethodTable { class_constructor : None , get_base_texture : 0 as * mut sys :: godot_method_bind , get_image_size : 0 as * mut sys :: godot_method_bind , get_mesh : 0 as * mut sys :: godot_method_bind , set_base_texture : 0 as * mut sys :: godot_method_bind , set_image_size : 0 as * mut sys :: godot_method_bind , set_mesh : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MeshTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MeshTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_base_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_base_texture\0" . as_ptr () as * const c_char) ; table . get_image_size = (gd_api . godot_method_bind_get_method) (class_name , "get_image_size\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . set_base_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_base_texture\0" . as_ptr () as * const c_char) ; table . set_image_size = (gd_api . godot_method_bind_get_method) (class_name , "set_image_size\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::mesh_texture::private::MeshTexture;
            
            pub(crate) mod method_tweener {
                # ! [doc = "This module contains types related to the API class [`MethodTweener`][super::MethodTweener]."] pub (crate) mod private { # [doc = "`core class MethodTweener` inherits `Tweener` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_methodtweener.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMethodTweener inherits methods from:\n - [Tweener](struct.Tweener.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MethodTweener { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: MethodTweener ; impl MethodTweener { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MethodTweenerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Sets the time in seconds after which the [`MethodTweener`][MethodTweener] will start interpolating. By default there's no delay."] # [doc = ""] # [inline] pub fn set_delay (& self , delay : f64) -> Option < Ref < crate :: generated :: MethodTweener , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MethodTweenerMethodTable :: get (get_api ()) . set_delay ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , delay as _) ; < Option < Ref < crate :: generated :: MethodTweener , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [`SceneTreeTween`][SceneTreeTween] that contains this Tweener."] # [doc = ""] # [inline] pub fn set_ease (& self , ease : i64) -> Option < Ref < crate :: generated :: MethodTweener , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MethodTweenerMethodTable :: get (get_api ()) . set_ease ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , ease as _) ; < Option < Ref < crate :: generated :: MethodTweener , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [`SceneTreeTween`][SceneTreeTween] that contains this Tweener."] # [doc = ""] # [inline] pub fn set_trans (& self , trans : i64) -> Option < Ref < crate :: generated :: MethodTweener , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MethodTweenerMethodTable :: get (get_api ()) . set_trans ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , trans as _) ; < Option < Ref < crate :: generated :: MethodTweener , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for MethodTweener { } unsafe impl GodotObject for MethodTweener { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MethodTweener" } } impl std :: ops :: Deref for MethodTweener { type Target = crate :: generated :: Tweener ; # [inline] fn deref (& self) -> & crate :: generated :: Tweener { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MethodTweener { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Tweener { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Tweener > for MethodTweener { } unsafe impl SubClass < crate :: generated :: Reference > for MethodTweener { } unsafe impl SubClass < crate :: generated :: Object > for MethodTweener { } impl Instanciable for MethodTweener { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { MethodTweener :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MethodTweenerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub set_delay : * mut sys :: godot_method_bind , pub set_ease : * mut sys :: godot_method_bind , pub set_trans : * mut sys :: godot_method_bind } impl MethodTweenerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MethodTweenerMethodTable = MethodTweenerMethodTable { class_constructor : None , set_delay : 0 as * mut sys :: godot_method_bind , set_ease : 0 as * mut sys :: godot_method_bind , set_trans : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MethodTweenerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MethodTweener\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . set_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_delay\0" . as_ptr () as * const c_char) ; table . set_ease = (gd_api . godot_method_bind_get_method) (class_name , "set_ease\0" . as_ptr () as * const c_char) ; table . set_trans = (gd_api . godot_method_bind_get_method) (class_name , "set_trans\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::method_tweener::private::MethodTweener;
            
            pub(crate) mod mobile_vr_interface {
                # ! [doc = "This module contains types related to the API class [`MobileVRInterface`][super::MobileVRInterface]."] pub (crate) mod private { # [doc = "`core class MobileVRInterface` inherits `ARVRInterface` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_mobilevrinterface.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMobileVRInterface inherits methods from:\n - [ARVRInterface](struct.ARVRInterface.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MobileVRInterface { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: MobileVRInterface ; impl MobileVRInterface { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MobileVRInterfaceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn display_to_lens (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MobileVRInterfaceMethodTable :: get (get_api ()) . get_display_to_lens ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn display_width (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MobileVRInterfaceMethodTable :: get (get_api ()) . get_display_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn eye_height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MobileVRInterfaceMethodTable :: get (get_api ()) . get_eye_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn iod (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MobileVRInterfaceMethodTable :: get (get_api ()) . get_iod ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn k1 (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MobileVRInterfaceMethodTable :: get (get_api ()) . get_k1 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn k2 (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MobileVRInterfaceMethodTable :: get (get_api ()) . get_k2 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn oversample (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MobileVRInterfaceMethodTable :: get (get_api ()) . get_oversample ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_display_to_lens (& self , display_to_lens : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MobileVRInterfaceMethodTable :: get (get_api ()) . set_display_to_lens ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , display_to_lens as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_display_width (& self , display_width : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MobileVRInterfaceMethodTable :: get (get_api ()) . set_display_width ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , display_width as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_eye_height (& self , eye_height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MobileVRInterfaceMethodTable :: get (get_api ()) . set_eye_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , eye_height as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_iod (& self , iod : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MobileVRInterfaceMethodTable :: get (get_api ()) . set_iod ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , iod as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_k1 (& self , k : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MobileVRInterfaceMethodTable :: get (get_api ()) . set_k1 ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , k as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_k2 (& self , k : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MobileVRInterfaceMethodTable :: get (get_api ()) . set_k2 ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , k as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_oversample (& self , oversample : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MobileVRInterfaceMethodTable :: get (get_api ()) . set_oversample ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , oversample as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MobileVRInterface { } unsafe impl GodotObject for MobileVRInterface { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MobileVRInterface" } } impl std :: ops :: Deref for MobileVRInterface { type Target = crate :: generated :: ARVRInterface ; # [inline] fn deref (& self) -> & crate :: generated :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MobileVRInterface { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: ARVRInterface > for MobileVRInterface { } unsafe impl SubClass < crate :: generated :: Reference > for MobileVRInterface { } unsafe impl SubClass < crate :: generated :: Object > for MobileVRInterface { } impl Instanciable for MobileVRInterface { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { MobileVRInterface :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MobileVRInterfaceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_display_to_lens : * mut sys :: godot_method_bind , pub get_display_width : * mut sys :: godot_method_bind , pub get_eye_height : * mut sys :: godot_method_bind , pub get_iod : * mut sys :: godot_method_bind , pub get_k1 : * mut sys :: godot_method_bind , pub get_k2 : * mut sys :: godot_method_bind , pub get_oversample : * mut sys :: godot_method_bind , pub set_display_to_lens : * mut sys :: godot_method_bind , pub set_display_width : * mut sys :: godot_method_bind , pub set_eye_height : * mut sys :: godot_method_bind , pub set_iod : * mut sys :: godot_method_bind , pub set_k1 : * mut sys :: godot_method_bind , pub set_k2 : * mut sys :: godot_method_bind , pub set_oversample : * mut sys :: godot_method_bind } impl MobileVRInterfaceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MobileVRInterfaceMethodTable = MobileVRInterfaceMethodTable { class_constructor : None , get_display_to_lens : 0 as * mut sys :: godot_method_bind , get_display_width : 0 as * mut sys :: godot_method_bind , get_eye_height : 0 as * mut sys :: godot_method_bind , get_iod : 0 as * mut sys :: godot_method_bind , get_k1 : 0 as * mut sys :: godot_method_bind , get_k2 : 0 as * mut sys :: godot_method_bind , get_oversample : 0 as * mut sys :: godot_method_bind , set_display_to_lens : 0 as * mut sys :: godot_method_bind , set_display_width : 0 as * mut sys :: godot_method_bind , set_eye_height : 0 as * mut sys :: godot_method_bind , set_iod : 0 as * mut sys :: godot_method_bind , set_k1 : 0 as * mut sys :: godot_method_bind , set_k2 : 0 as * mut sys :: godot_method_bind , set_oversample : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MobileVRInterfaceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MobileVRInterface\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_display_to_lens = (gd_api . godot_method_bind_get_method) (class_name , "get_display_to_lens\0" . as_ptr () as * const c_char) ; table . get_display_width = (gd_api . godot_method_bind_get_method) (class_name , "get_display_width\0" . as_ptr () as * const c_char) ; table . get_eye_height = (gd_api . godot_method_bind_get_method) (class_name , "get_eye_height\0" . as_ptr () as * const c_char) ; table . get_iod = (gd_api . godot_method_bind_get_method) (class_name , "get_iod\0" . as_ptr () as * const c_char) ; table . get_k1 = (gd_api . godot_method_bind_get_method) (class_name , "get_k1\0" . as_ptr () as * const c_char) ; table . get_k2 = (gd_api . godot_method_bind_get_method) (class_name , "get_k2\0" . as_ptr () as * const c_char) ; table . get_oversample = (gd_api . godot_method_bind_get_method) (class_name , "get_oversample\0" . as_ptr () as * const c_char) ; table . set_display_to_lens = (gd_api . godot_method_bind_get_method) (class_name , "set_display_to_lens\0" . as_ptr () as * const c_char) ; table . set_display_width = (gd_api . godot_method_bind_get_method) (class_name , "set_display_width\0" . as_ptr () as * const c_char) ; table . set_eye_height = (gd_api . godot_method_bind_get_method) (class_name , "set_eye_height\0" . as_ptr () as * const c_char) ; table . set_iod = (gd_api . godot_method_bind_get_method) (class_name , "set_iod\0" . as_ptr () as * const c_char) ; table . set_k1 = (gd_api . godot_method_bind_get_method) (class_name , "set_k1\0" . as_ptr () as * const c_char) ; table . set_k2 = (gd_api . godot_method_bind_get_method) (class_name , "set_k2\0" . as_ptr () as * const c_char) ; table . set_oversample = (gd_api . godot_method_bind_get_method) (class_name , "set_oversample\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::mobile_vr_interface::private::MobileVRInterface;
            
            pub mod multi_mesh {
                # ! [doc = "This module contains types related to the API class [`MultiMesh`][super::MultiMesh]."] pub (crate) mod private { # [doc = "`core class MultiMesh` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`multi_mesh`][super::multi_mesh] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_multimesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMultiMesh inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MultiMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: MultiMesh ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ColorFormat (pub i64) ; impl ColorFormat { pub const NONE : ColorFormat = ColorFormat (0i64) ; pub const _8BIT : ColorFormat = ColorFormat (1i64) ; pub const FLOAT : ColorFormat = ColorFormat (2i64) ; } impl From < i64 > for ColorFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ColorFormat > for i64 { # [inline] fn from (v : ColorFormat) -> Self { v . 0 } } impl FromVariant for ColorFormat { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CustomDataFormat (pub i64) ; impl CustomDataFormat { pub const NONE : CustomDataFormat = CustomDataFormat (0i64) ; pub const _8BIT : CustomDataFormat = CustomDataFormat (1i64) ; pub const FLOAT : CustomDataFormat = CustomDataFormat (2i64) ; } impl From < i64 > for CustomDataFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CustomDataFormat > for i64 { # [inline] fn from (v : CustomDataFormat) -> Self { v . 0 } } impl FromVariant for CustomDataFormat { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PhysicsInterpolationQuality (pub i64) ; impl PhysicsInterpolationQuality { pub const FAST : PhysicsInterpolationQuality = PhysicsInterpolationQuality (0i64) ; pub const HIGH : PhysicsInterpolationQuality = PhysicsInterpolationQuality (1i64) ; } impl From < i64 > for PhysicsInterpolationQuality { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PhysicsInterpolationQuality > for i64 { # [inline] fn from (v : PhysicsInterpolationQuality) -> Self { v . 0 } } impl FromVariant for PhysicsInterpolationQuality { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TransformFormat (pub i64) ; impl TransformFormat { pub const _2D : TransformFormat = TransformFormat (0i64) ; pub const _3D : TransformFormat = TransformFormat (1i64) ; } impl From < i64 > for TransformFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TransformFormat > for i64 { # [inline] fn from (v : TransformFormat) -> Self { v . 0 } } impl FromVariant for TransformFormat { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl MultiMesh { pub const COLOR_NONE : i64 = 0i64 ; pub const CUSTOM_DATA_NONE : i64 = 0i64 ; pub const INTERP_QUALITY_FAST : i64 = 0i64 ; pub const TRANSFORM_2D : i64 = 0i64 ; pub const COLOR_8BIT : i64 = 1i64 ; pub const CUSTOM_DATA_8BIT : i64 = 1i64 ; pub const INTERP_QUALITY_HIGH : i64 = 1i64 ; pub const TRANSFORM_3D : i64 = 1i64 ; pub const COLOR_FLOAT : i64 = 2i64 ; pub const CUSTOM_DATA_FLOAT : i64 = 2i64 ; } impl MultiMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MultiMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the visibility axis-aligned bounding box in local space. See also [`VisualInstance.get_transformed_aabb`][VisualInstance::get_transformed_aabb]."] # [doc = ""] # [inline] pub fn get_aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_aabb ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Format of colors in color array that gets passed to shader."] # [doc = ""] # [inline] pub fn color_format (& self) -> crate :: generated :: multi_mesh :: ColorFormat { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_color_format ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: multi_mesh :: ColorFormat > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Format of custom data in custom data array that gets passed to shader."] # [doc = ""] # [inline] pub fn custom_data_format (& self) -> crate :: generated :: multi_mesh :: CustomDataFormat { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_custom_data_format ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: multi_mesh :: CustomDataFormat > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets a specific instance's color."] # [doc = ""] # [inline] pub fn get_instance_color (& self , instance : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_instance_color ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , instance as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Number of instances that will get drawn. This clears and (re)sizes the buffers. By default, all instances are drawn but you can limit this with [`visible_instance_count`][Self::visible_instance_count]."] # [doc = ""] # [inline] pub fn instance_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_instance_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the custom data that has been set for a specific instance."] # [doc = ""] # [inline] pub fn get_instance_custom_data (& self , instance : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_instance_custom_data ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , instance as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`Transform`][Transform] of a specific instance."] # [doc = ""] # [inline] pub fn get_instance_transform (& self , instance : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_instance_transform ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , instance as _) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`Transform2D`][Transform2D] of a specific instance."] # [doc = ""] # [inline] pub fn get_instance_transform_2d (& self , instance : i64) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_instance_transform_2d ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , instance as _) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Mesh to be drawn."] # [doc = ""] # [inline] pub fn mesh (& self) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Choose whether to use an interpolation method that favors speed or quality.\nWhen using low physics tick rates (typically below 20) or high rates of object rotation, you may get better results from the high quality setting.\n**Note:** Fast quality does not equate to low quality. Except in the special cases mentioned above, the quality should be comparable to high quality."] # [doc = ""] # [inline] pub fn physics_interpolation_quality (& self) -> crate :: generated :: multi_mesh :: PhysicsInterpolationQuality { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_physics_interpolation_quality ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: multi_mesh :: PhysicsInterpolationQuality > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Format of transform used to transform mesh, either 2D or 3D."] # [doc = ""] # [inline] pub fn transform_format (& self) -> crate :: generated :: multi_mesh :: TransformFormat { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_transform_format ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: multi_mesh :: TransformFormat > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Limits the number of instances drawn, -1 draws all instances. Changing this does not change the sizes of the buffers."] # [doc = ""] # [inline] pub fn visible_instance_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . get_visible_instance_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "When using _physics interpolation_, this function allows you to prevent interpolation on an instance in the current physics tick.\nThis allows you to move instances instantaneously, and should usually be used when initially placing an instance such as a bullet to prevent graphical glitches."] # [doc = ""] # [inline] pub fn reset_instance_physics_interpolation (& self , instance : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . reset_instance_physics_interpolation ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , instance as _) ; } } # [doc = "Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative.\nAll data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc...\n[`Transform`][Transform] is stored as 12 floats, [`Transform2D`][Transform2D] is stored as 8 floats, `COLOR_8BIT` / `CUSTOM_DATA_8BIT` is stored as 1 float (4 bytes as is) and `COLOR_FLOAT` / `CUSTOM_DATA_FLOAT` is stored as 4 floats."] # [doc = ""] # [inline] pub fn set_as_bulk_array (& self , array : PoolArray < f32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_as_bulk_array ; let ret = crate :: icalls :: icallvar__f32arr (method_bind , self . this . sys () . as_ptr () , array) ; } } # [doc = "An alternative version of [`MultiMesh.set_as_bulk_array`][MultiMesh::set_as_bulk_array] which can be used with _physics interpolation_. This method takes two arrays, and can set the data for the current and previous tick in one go. The renderer will automatically interpolate the data at each frame.\nThis is useful for situations where the order of instances may change from physics tick to tick, such as particle systems.\nWhen the order of instances is coherent, the simpler [`MultiMesh.set_as_bulk_array`][MultiMesh::set_as_bulk_array] can still be used with interpolation."] # [doc = ""] # [inline] pub fn set_as_bulk_array_interpolated (& self , array_current : PoolArray < f32 > , array_previous : PoolArray < f32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_as_bulk_array_interpolated ; let ret = crate :: icalls :: icallvar__f32arr_f32arr (method_bind , self . this . sys () . as_ptr () , array_current , array_previous) ; } } # [doc = "Format of colors in color array that gets passed to shader."] # [doc = ""] # [inline] pub fn set_color_format (& self , format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_color_format ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , format as _) ; } } # [doc = "Format of custom data in custom data array that gets passed to shader."] # [doc = ""] # [inline] pub fn set_custom_data_format (& self , format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_custom_data_format ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , format as _) ; } } # [doc = "Sets the color of a specific instance by _multiplying_ the mesh's existing vertex colors.\nFor the color to take effect, ensure that [`color_format`][Self::color_format] is non-`null` on the [`MultiMesh`][MultiMesh] and [`SpatialMaterial.vertex_color_use_as_albedo`][SpatialMaterial::vertex_color_use_as_albedo] is `true` on the material. If the color doesn't look as expected, make sure the material's albedo color is set to pure white (`Color(1, 1, 1)`)."] # [doc = ""] # [inline] pub fn set_instance_color (& self , instance : i64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_instance_color ; let ret = crate :: icalls :: icallvar__i64_color (method_bind , self . this . sys () . as_ptr () , instance as _ , color) ; } } # [doc = "Number of instances that will get drawn. This clears and (re)sizes the buffers. By default, all instances are drawn but you can limit this with [`visible_instance_count`][Self::visible_instance_count]."] # [doc = ""] # [inline] pub fn set_instance_count (& self , count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_instance_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , count as _) ; } } # [doc = "Sets custom data for a specific instance. Although [`Color`][Color] is used, it is just a container for 4 floating point numbers. The format of the number can change depending on the [`CustomDataFormat`][CustomDataFormat] used."] # [doc = ""] # [inline] pub fn set_instance_custom_data (& self , instance : i64 , custom_data : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_instance_custom_data ; let ret = crate :: icalls :: icallvar__i64_color (method_bind , self . this . sys () . as_ptr () , instance as _ , custom_data) ; } } # [doc = "Sets the [`Transform`][Transform] for a specific instance."] # [doc = ""] # [inline] pub fn set_instance_transform (& self , instance : i64 , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_instance_transform ; let ret = crate :: icalls :: icallvar__i64_trans (method_bind , self . this . sys () . as_ptr () , instance as _ , transform) ; } } # [doc = "Sets the [`Transform2D`][Transform2D] for a specific instance."] # [doc = ""] # [inline] pub fn set_instance_transform_2d (& self , instance : i64 , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_instance_transform_2d ; let ret = crate :: icalls :: icallvar__i64_trans2D (method_bind , self . this . sys () . as_ptr () , instance as _ , transform) ; } } # [doc = "Mesh to be drawn."] # [doc = ""] # [inline] pub fn set_mesh (& self , mesh : impl AsArg < crate :: generated :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_mesh ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } # [doc = "Choose whether to use an interpolation method that favors speed or quality.\nWhen using low physics tick rates (typically below 20) or high rates of object rotation, you may get better results from the high quality setting.\n**Note:** Fast quality does not equate to low quality. Except in the special cases mentioned above, the quality should be comparable to high quality."] # [doc = ""] # [inline] pub fn set_physics_interpolation_quality (& self , quality : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_physics_interpolation_quality ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , quality as _) ; } } # [doc = "Format of transform used to transform mesh, either 2D or 3D."] # [doc = ""] # [inline] pub fn set_transform_format (& self , format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_transform_format ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , format as _) ; } } # [doc = "Limits the number of instances drawn, -1 draws all instances. Changing this does not change the sizes of the buffers."] # [doc = ""] # [inline] pub fn set_visible_instance_count (& self , count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshMethodTable :: get (get_api ()) . set_visible_instance_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , count as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MultiMesh { } unsafe impl GodotObject for MultiMesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MultiMesh" } } impl std :: ops :: Deref for MultiMesh { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MultiMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for MultiMesh { } unsafe impl SubClass < crate :: generated :: Reference > for MultiMesh { } unsafe impl SubClass < crate :: generated :: Object > for MultiMesh { } impl Instanciable for MultiMesh { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { MultiMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MultiMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_aabb : * mut sys :: godot_method_bind , pub get_color_format : * mut sys :: godot_method_bind , pub get_custom_data_format : * mut sys :: godot_method_bind , pub get_instance_color : * mut sys :: godot_method_bind , pub get_instance_count : * mut sys :: godot_method_bind , pub get_instance_custom_data : * mut sys :: godot_method_bind , pub get_instance_transform : * mut sys :: godot_method_bind , pub get_instance_transform_2d : * mut sys :: godot_method_bind , pub get_mesh : * mut sys :: godot_method_bind , pub get_physics_interpolation_quality : * mut sys :: godot_method_bind , pub get_transform_format : * mut sys :: godot_method_bind , pub get_visible_instance_count : * mut sys :: godot_method_bind , pub reset_instance_physics_interpolation : * mut sys :: godot_method_bind , pub set_as_bulk_array : * mut sys :: godot_method_bind , pub set_as_bulk_array_interpolated : * mut sys :: godot_method_bind , pub set_color_format : * mut sys :: godot_method_bind , pub set_custom_data_format : * mut sys :: godot_method_bind , pub set_instance_color : * mut sys :: godot_method_bind , pub set_instance_count : * mut sys :: godot_method_bind , pub set_instance_custom_data : * mut sys :: godot_method_bind , pub set_instance_transform : * mut sys :: godot_method_bind , pub set_instance_transform_2d : * mut sys :: godot_method_bind , pub set_mesh : * mut sys :: godot_method_bind , pub set_physics_interpolation_quality : * mut sys :: godot_method_bind , pub set_transform_format : * mut sys :: godot_method_bind , pub set_visible_instance_count : * mut sys :: godot_method_bind } impl MultiMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MultiMeshMethodTable = MultiMeshMethodTable { class_constructor : None , get_aabb : 0 as * mut sys :: godot_method_bind , get_color_format : 0 as * mut sys :: godot_method_bind , get_custom_data_format : 0 as * mut sys :: godot_method_bind , get_instance_color : 0 as * mut sys :: godot_method_bind , get_instance_count : 0 as * mut sys :: godot_method_bind , get_instance_custom_data : 0 as * mut sys :: godot_method_bind , get_instance_transform : 0 as * mut sys :: godot_method_bind , get_instance_transform_2d : 0 as * mut sys :: godot_method_bind , get_mesh : 0 as * mut sys :: godot_method_bind , get_physics_interpolation_quality : 0 as * mut sys :: godot_method_bind , get_transform_format : 0 as * mut sys :: godot_method_bind , get_visible_instance_count : 0 as * mut sys :: godot_method_bind , reset_instance_physics_interpolation : 0 as * mut sys :: godot_method_bind , set_as_bulk_array : 0 as * mut sys :: godot_method_bind , set_as_bulk_array_interpolated : 0 as * mut sys :: godot_method_bind , set_color_format : 0 as * mut sys :: godot_method_bind , set_custom_data_format : 0 as * mut sys :: godot_method_bind , set_instance_color : 0 as * mut sys :: godot_method_bind , set_instance_count : 0 as * mut sys :: godot_method_bind , set_instance_custom_data : 0 as * mut sys :: godot_method_bind , set_instance_transform : 0 as * mut sys :: godot_method_bind , set_instance_transform_2d : 0 as * mut sys :: godot_method_bind , set_mesh : 0 as * mut sys :: godot_method_bind , set_physics_interpolation_quality : 0 as * mut sys :: godot_method_bind , set_transform_format : 0 as * mut sys :: godot_method_bind , set_visible_instance_count : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MultiMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MultiMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_aabb\0" . as_ptr () as * const c_char) ; table . get_color_format = (gd_api . godot_method_bind_get_method) (class_name , "get_color_format\0" . as_ptr () as * const c_char) ; table . get_custom_data_format = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_data_format\0" . as_ptr () as * const c_char) ; table . get_instance_color = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_color\0" . as_ptr () as * const c_char) ; table . get_instance_count = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_count\0" . as_ptr () as * const c_char) ; table . get_instance_custom_data = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_custom_data\0" . as_ptr () as * const c_char) ; table . get_instance_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_transform\0" . as_ptr () as * const c_char) ; table . get_instance_transform_2d = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_transform_2d\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_physics_interpolation_quality = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_interpolation_quality\0" . as_ptr () as * const c_char) ; table . get_transform_format = (gd_api . godot_method_bind_get_method) (class_name , "get_transform_format\0" . as_ptr () as * const c_char) ; table . get_visible_instance_count = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_instance_count\0" . as_ptr () as * const c_char) ; table . reset_instance_physics_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "reset_instance_physics_interpolation\0" . as_ptr () as * const c_char) ; table . set_as_bulk_array = (gd_api . godot_method_bind_get_method) (class_name , "set_as_bulk_array\0" . as_ptr () as * const c_char) ; table . set_as_bulk_array_interpolated = (gd_api . godot_method_bind_get_method) (class_name , "set_as_bulk_array_interpolated\0" . as_ptr () as * const c_char) ; table . set_color_format = (gd_api . godot_method_bind_get_method) (class_name , "set_color_format\0" . as_ptr () as * const c_char) ; table . set_custom_data_format = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_data_format\0" . as_ptr () as * const c_char) ; table . set_instance_color = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_color\0" . as_ptr () as * const c_char) ; table . set_instance_count = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_count\0" . as_ptr () as * const c_char) ; table . set_instance_custom_data = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_custom_data\0" . as_ptr () as * const c_char) ; table . set_instance_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_transform\0" . as_ptr () as * const c_char) ; table . set_instance_transform_2d = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_transform_2d\0" . as_ptr () as * const c_char) ; table . set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_mesh\0" . as_ptr () as * const c_char) ; table . set_physics_interpolation_quality = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_interpolation_quality\0" . as_ptr () as * const c_char) ; table . set_transform_format = (gd_api . godot_method_bind_get_method) (class_name , "set_transform_format\0" . as_ptr () as * const c_char) ; table . set_visible_instance_count = (gd_api . godot_method_bind_get_method) (class_name , "set_visible_instance_count\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::multi_mesh::private::MultiMesh;
            
            pub(crate) mod multi_mesh_instance {
                # ! [doc = "This module contains types related to the API class [`MultiMeshInstance`][super::MultiMeshInstance]."] pub (crate) mod private { # [doc = "`core class MultiMeshInstance` inherits `GeometryInstance` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_multimeshinstance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`MultiMeshInstance` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<MultiMeshInstance>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nMultiMeshInstance inherits methods from:\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MultiMeshInstance { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: MultiMeshInstance ; impl MultiMeshInstance { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MultiMeshInstanceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [`MultiMesh`][MultiMesh] resource that will be used and shared among all instances of the [`MultiMeshInstance`][MultiMeshInstance]."] # [doc = ""] # [inline] pub fn multimesh (& self) -> Option < Ref < crate :: generated :: MultiMesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstanceMethodTable :: get (get_api ()) . get_multimesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: MultiMesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`MultiMesh`][MultiMesh] resource that will be used and shared among all instances of the [`MultiMeshInstance`][MultiMeshInstance]."] # [doc = ""] # [inline] pub fn set_multimesh (& self , multimesh : impl AsArg < crate :: generated :: MultiMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstanceMethodTable :: get (get_api ()) . set_multimesh ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , multimesh . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MultiMeshInstance { } unsafe impl GodotObject for MultiMeshInstance { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "MultiMeshInstance" } } impl QueueFree for MultiMeshInstance { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for MultiMeshInstance { type Target = crate :: generated :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MultiMeshInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: GeometryInstance > for MultiMeshInstance { } unsafe impl SubClass < crate :: generated :: VisualInstance > for MultiMeshInstance { } unsafe impl SubClass < crate :: generated :: CullInstance > for MultiMeshInstance { } unsafe impl SubClass < crate :: generated :: Spatial > for MultiMeshInstance { } unsafe impl SubClass < crate :: generated :: Node > for MultiMeshInstance { } unsafe impl SubClass < crate :: generated :: Object > for MultiMeshInstance { } impl Instanciable for MultiMeshInstance { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { MultiMeshInstance :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MultiMeshInstanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_multimesh : * mut sys :: godot_method_bind , pub set_multimesh : * mut sys :: godot_method_bind } impl MultiMeshInstanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MultiMeshInstanceMethodTable = MultiMeshInstanceMethodTable { class_constructor : None , get_multimesh : 0 as * mut sys :: godot_method_bind , set_multimesh : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MultiMeshInstanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MultiMeshInstance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_multimesh = (gd_api . godot_method_bind_get_method) (class_name , "get_multimesh\0" . as_ptr () as * const c_char) ; table . set_multimesh = (gd_api . godot_method_bind_get_method) (class_name , "set_multimesh\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::multi_mesh_instance::private::MultiMeshInstance;
            
            pub(crate) mod multi_mesh_instance_2d {
                # ! [doc = "This module contains types related to the API class [`MultiMeshInstance2D`][super::MultiMeshInstance2D]."] pub (crate) mod private { # [doc = "`core class MultiMeshInstance2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_multimeshinstance2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`MultiMeshInstance2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<MultiMeshInstance2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nMultiMeshInstance2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MultiMeshInstance2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: MultiMeshInstance2D ; impl MultiMeshInstance2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MultiMeshInstance2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [`MultiMesh`][MultiMesh] that will be drawn by the [`MultiMeshInstance2D`][MultiMeshInstance2D]."] # [doc = ""] # [inline] pub fn multimesh (& self) -> Option < Ref < crate :: generated :: MultiMesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . get_multimesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: MultiMesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The normal map that will be used if using the default [`CanvasItemMaterial`][CanvasItemMaterial].\n**Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normal_map (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . get_normal_map ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Texture`][Texture] that will be used if using the default [`CanvasItemMaterial`][CanvasItemMaterial]. Can be accessed as `TEXTURE` in CanvasItem shader."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`MultiMesh`][MultiMesh] that will be drawn by the [`MultiMeshInstance2D`][MultiMeshInstance2D]."] # [doc = ""] # [inline] pub fn set_multimesh (& self , multimesh : impl AsArg < crate :: generated :: MultiMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . set_multimesh ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , multimesh . as_arg_ptr ()) ; } } # [doc = "The normal map that will be used if using the default [`CanvasItemMaterial`][CanvasItemMaterial].\n**Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn set_normal_map (& self , normal_map : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . set_normal_map ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , normal_map . as_arg_ptr ()) ; } } # [doc = "The [`Texture`][Texture] that will be used if using the default [`CanvasItemMaterial`][CanvasItemMaterial]. Can be accessed as `TEXTURE` in CanvasItem shader."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiMeshInstance2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MultiMeshInstance2D { } unsafe impl GodotObject for MultiMeshInstance2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "MultiMeshInstance2D" } } impl QueueFree for MultiMeshInstance2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for MultiMeshInstance2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MultiMeshInstance2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for MultiMeshInstance2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for MultiMeshInstance2D { } unsafe impl SubClass < crate :: generated :: Node > for MultiMeshInstance2D { } unsafe impl SubClass < crate :: generated :: Object > for MultiMeshInstance2D { } impl Instanciable for MultiMeshInstance2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { MultiMeshInstance2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MultiMeshInstance2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_multimesh : * mut sys :: godot_method_bind , pub get_normal_map : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub set_multimesh : * mut sys :: godot_method_bind , pub set_normal_map : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind } impl MultiMeshInstance2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MultiMeshInstance2DMethodTable = MultiMeshInstance2DMethodTable { class_constructor : None , get_multimesh : 0 as * mut sys :: godot_method_bind , get_normal_map : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , set_multimesh : 0 as * mut sys :: godot_method_bind , set_normal_map : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MultiMeshInstance2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MultiMeshInstance2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_multimesh = (gd_api . godot_method_bind_get_method) (class_name , "get_multimesh\0" . as_ptr () as * const c_char) ; table . get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_map\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . set_multimesh = (gd_api . godot_method_bind_get_method) (class_name , "set_multimesh\0" . as_ptr () as * const c_char) ; table . set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_map\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::multi_mesh_instance_2d::private::MultiMeshInstance2D;
            
            pub mod multiplayer_api {
                # ! [doc = "This module contains types related to the API class [`MultiplayerAPI`][super::MultiplayerAPI]."] pub (crate) mod private { # [doc = "`core class MultiplayerAPI` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`multiplayer_api`][super::multiplayer_api] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_multiplayerapi.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMultiplayerAPI inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MultiplayerAPI { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: MultiplayerAPI ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct RpcMode (pub i64) ; impl RpcMode { pub const DISABLED : RpcMode = RpcMode (0i64) ; pub const REMOTE : RpcMode = RpcMode (1i64) ; pub const MASTER : RpcMode = RpcMode (2i64) ; pub const PUPPET : RpcMode = RpcMode (3i64) ; pub const SLAVE : RpcMode = RpcMode (3i64) ; pub const REMOTESYNC : RpcMode = RpcMode (4i64) ; pub const SYNC : RpcMode = RpcMode (4i64) ; pub const MASTERSYNC : RpcMode = RpcMode (5i64) ; pub const PUPPETSYNC : RpcMode = RpcMode (6i64) ; } impl From < i64 > for RpcMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < RpcMode > for i64 { # [inline] fn from (v : RpcMode) -> Self { v . 0 } } impl FromVariant for RpcMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl MultiplayerAPI { pub const RPC_MODE_DISABLED : i64 = 0i64 ; pub const RPC_MODE_REMOTE : i64 = 1i64 ; pub const RPC_MODE_MASTER : i64 = 2i64 ; pub const RPC_MODE_PUPPET : i64 = 3i64 ; pub const RPC_MODE_SLAVE : i64 = 3i64 ; pub const RPC_MODE_REMOTESYNC : i64 = 4i64 ; pub const RPC_MODE_SYNC : i64 = 4i64 ; pub const RPC_MODE_MASTERSYNC : i64 = 5i64 ; pub const RPC_MODE_PUPPETSYNC : i64 = 6i64 ; } impl MultiplayerAPI { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MultiplayerAPIMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Clears the current MultiplayerAPI network state (you shouldn't call this unless you know what you are doing)."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the peer IDs of all connected peers of this MultiplayerAPI's [`network_peer`][Self::network_peer]."] # [doc = ""] # [inline] pub fn get_network_connected_peers (& self) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_network_connected_peers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [`is_network_server`][Self::is_network_server]) and will set root node's network mode to master, or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals."] # [doc = ""] # [inline] pub fn network_peer (& self) -> Option < Ref < crate :: generated :: NetworkedMultiplayerPeer , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_network_peer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: NetworkedMultiplayerPeer , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the unique peer ID of this MultiplayerAPI's [`network_peer`][Self::network_peer]."] # [doc = ""] # [inline] pub fn get_network_unique_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_network_unique_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The root node to use for RPCs. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed.\nThis effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene."] # [doc = ""] # [inline] pub fn root_node (& self) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_root_node ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the sender's peer ID for the RPC currently being executed.\n**Note:** If not inside an RPC this method will return 0."] # [doc = ""] # [inline] pub fn get_rpc_sender_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . get_rpc_sender_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if there is a [`network_peer`][Self::network_peer] set."] # [doc = ""] # [inline] pub fn has_network_peer (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . has_network_peer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this MultiplayerAPI's [`network_peer`][Self::network_peer] is in server mode (listening for connections)."] # [doc = ""] # [inline] pub fn is_network_server (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . is_network_server ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true` (or if the [`network_peer`][Self::network_peer] has [`PacketPeer.allow_object_decoding`][PacketPeer::allow_object_decoding] set to `true`), the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs.\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution."] # [doc = ""] # [inline] pub fn is_object_decoding_allowed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . is_object_decoding_allowed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the MultiplayerAPI's [`network_peer`][Self::network_peer] refuses new incoming connections."] # [doc = ""] # [inline] pub fn is_refusing_new_network_connections (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . is_refusing_new_network_connections ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Method used for polling the MultiplayerAPI. You only need to worry about this if you are using [`Node.custom_multiplayer`][Node::custom_multiplayer] override or you set [`SceneTree.multiplayer_poll`][SceneTree::multiplayer_poll] to `false`. By default, [`SceneTree`][SceneTree] will poll its MultiplayerAPI for you.\n**Note:** This method results in RPCs and RSETs being called, so they will be executed in the same context of this function (e.g. `_process`, `physics`, [`Thread`][Thread])."] # [doc = ""] # [inline] pub fn poll (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sends the given raw `bytes` to a specific peer identified by `id` (see [`NetworkedMultiplayerPeer.set_target_peer`][NetworkedMultiplayerPeer::set_target_peer]). Default ID is `0`, i.e. broadcast to all peers.\n# Default Arguments\n* `id` - `0`\n* `mode` - `2`"] # [doc = ""] # [inline] pub fn send_bytes (& self , bytes : PoolArray < u8 > , id : i64 , mode : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . send_bytes ; let ret = crate :: icalls :: icallvar__bytearr_i64_i64 (method_bind , self . this . sys () . as_ptr () , bytes , id as _ , mode as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "If `true` (or if the [`network_peer`][Self::network_peer] has [`PacketPeer.allow_object_decoding`][PacketPeer::allow_object_decoding] set to `true`), the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs.\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution."] # [doc = ""] # [inline] pub fn set_allow_object_decoding (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . set_allow_object_decoding ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [`is_network_server`][Self::is_network_server]) and will set root node's network mode to master, or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals."] # [doc = ""] # [inline] pub fn set_network_peer (& self , peer : impl AsArg < crate :: generated :: NetworkedMultiplayerPeer >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . set_network_peer ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , peer . as_arg_ptr ()) ; } } # [doc = "If `true`, the MultiplayerAPI's [`network_peer`][Self::network_peer] refuses new incoming connections."] # [doc = ""] # [inline] pub fn set_refuse_new_network_connections (& self , refuse : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . set_refuse_new_network_connections ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , refuse as _) ; } } # [doc = "The root node to use for RPCs. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed.\nThis effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene."] # [doc = ""] # [inline] pub fn set_root_node (& self , node : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MultiplayerAPIMethodTable :: get (get_api ()) . set_root_node ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for MultiplayerAPI { } unsafe impl GodotObject for MultiplayerAPI { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MultiplayerAPI" } } impl std :: ops :: Deref for MultiplayerAPI { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MultiplayerAPI { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for MultiplayerAPI { } unsafe impl SubClass < crate :: generated :: Object > for MultiplayerAPI { } impl Instanciable for MultiplayerAPI { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { MultiplayerAPI :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MultiplayerAPIMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub get_network_connected_peers : * mut sys :: godot_method_bind , pub get_network_peer : * mut sys :: godot_method_bind , pub get_network_unique_id : * mut sys :: godot_method_bind , pub get_root_node : * mut sys :: godot_method_bind , pub get_rpc_sender_id : * mut sys :: godot_method_bind , pub has_network_peer : * mut sys :: godot_method_bind , pub is_network_server : * mut sys :: godot_method_bind , pub is_object_decoding_allowed : * mut sys :: godot_method_bind , pub is_refusing_new_network_connections : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind , pub send_bytes : * mut sys :: godot_method_bind , pub set_allow_object_decoding : * mut sys :: godot_method_bind , pub set_network_peer : * mut sys :: godot_method_bind , pub set_refuse_new_network_connections : * mut sys :: godot_method_bind , pub set_root_node : * mut sys :: godot_method_bind } impl MultiplayerAPIMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MultiplayerAPIMethodTable = MultiplayerAPIMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , get_network_connected_peers : 0 as * mut sys :: godot_method_bind , get_network_peer : 0 as * mut sys :: godot_method_bind , get_network_unique_id : 0 as * mut sys :: godot_method_bind , get_root_node : 0 as * mut sys :: godot_method_bind , get_rpc_sender_id : 0 as * mut sys :: godot_method_bind , has_network_peer : 0 as * mut sys :: godot_method_bind , is_network_server : 0 as * mut sys :: godot_method_bind , is_object_decoding_allowed : 0 as * mut sys :: godot_method_bind , is_refusing_new_network_connections : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind , send_bytes : 0 as * mut sys :: godot_method_bind , set_allow_object_decoding : 0 as * mut sys :: godot_method_bind , set_network_peer : 0 as * mut sys :: godot_method_bind , set_refuse_new_network_connections : 0 as * mut sys :: godot_method_bind , set_root_node : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MultiplayerAPIMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MultiplayerAPI\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_network_connected_peers = (gd_api . godot_method_bind_get_method) (class_name , "get_network_connected_peers\0" . as_ptr () as * const c_char) ; table . get_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_network_peer\0" . as_ptr () as * const c_char) ; table . get_network_unique_id = (gd_api . godot_method_bind_get_method) (class_name , "get_network_unique_id\0" . as_ptr () as * const c_char) ; table . get_root_node = (gd_api . godot_method_bind_get_method) (class_name , "get_root_node\0" . as_ptr () as * const c_char) ; table . get_rpc_sender_id = (gd_api . godot_method_bind_get_method) (class_name , "get_rpc_sender_id\0" . as_ptr () as * const c_char) ; table . has_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "has_network_peer\0" . as_ptr () as * const c_char) ; table . is_network_server = (gd_api . godot_method_bind_get_method) (class_name , "is_network_server\0" . as_ptr () as * const c_char) ; table . is_object_decoding_allowed = (gd_api . godot_method_bind_get_method) (class_name , "is_object_decoding_allowed\0" . as_ptr () as * const c_char) ; table . is_refusing_new_network_connections = (gd_api . godot_method_bind_get_method) (class_name , "is_refusing_new_network_connections\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . send_bytes = (gd_api . godot_method_bind_get_method) (class_name , "send_bytes\0" . as_ptr () as * const c_char) ; table . set_allow_object_decoding = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_object_decoding\0" . as_ptr () as * const c_char) ; table . set_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "set_network_peer\0" . as_ptr () as * const c_char) ; table . set_refuse_new_network_connections = (gd_api . godot_method_bind_get_method) (class_name , "set_refuse_new_network_connections\0" . as_ptr () as * const c_char) ; table . set_root_node = (gd_api . godot_method_bind_get_method) (class_name , "set_root_node\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::multiplayer_api::private::MultiplayerAPI;
            
            pub(crate) mod multiplayer_peer_gdnative {
                # ! [doc = "This module contains types related to the API class [`MultiplayerPeerGDNative`][super::MultiplayerPeerGDNative]."] pub (crate) mod private { # [doc = "`core class MultiplayerPeerGDNative` inherits `NetworkedMultiplayerPeer` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_multiplayerpeergdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMultiplayerPeerGDNative inherits methods from:\n - [NetworkedMultiplayerPeer](struct.NetworkedMultiplayerPeer.html)\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct MultiplayerPeerGDNative { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: MultiplayerPeerGDNative ; impl MultiplayerPeerGDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MultiplayerPeerGDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for MultiplayerPeerGDNative { } unsafe impl GodotObject for MultiplayerPeerGDNative { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "MultiplayerPeerGDNative" } } impl std :: ops :: Deref for MultiplayerPeerGDNative { type Target = crate :: generated :: NetworkedMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for MultiplayerPeerGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: NetworkedMultiplayerPeer > for MultiplayerPeerGDNative { } unsafe impl SubClass < crate :: generated :: PacketPeer > for MultiplayerPeerGDNative { } unsafe impl SubClass < crate :: generated :: Reference > for MultiplayerPeerGDNative { } unsafe impl SubClass < crate :: generated :: Object > for MultiplayerPeerGDNative { } impl Instanciable for MultiplayerPeerGDNative { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { MultiplayerPeerGDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MultiplayerPeerGDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl MultiplayerPeerGDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MultiplayerPeerGDNativeMethodTable = MultiplayerPeerGDNativeMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MultiplayerPeerGDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "MultiplayerPeerGDNative\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::multiplayer_peer_gdnative::private::MultiplayerPeerGDNative;
            
            pub(crate) mod native_script {
                # ! [doc = "This module contains types related to the API class [`NativeScript`][super::NativeScript]."] pub (crate) mod private { # [doc = "`core class NativeScript` inherits `Script` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_nativescript.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nNativeScript inherits methods from:\n - [Script](struct.Script.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NativeScript { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NativeScript ; impl NativeScript { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NativeScriptMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_class_documentation (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_class_documentation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn class_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_class_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn library (& self) -> Option < Ref < crate :: generated :: GDNativeLibrary , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_library ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: GDNativeLibrary , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_method_documentation (& self , method : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_method_documentation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , method . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_property_documentation (& self , path : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_property_documentation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn script_class_icon_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_script_class_icon_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn script_class_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_script_class_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_signal_documentation (& self , signal_name : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . get_signal_documentation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , signal_name . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn _new (& self , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . _new ; let ret = crate :: icalls :: icallvarargs_ (method_bind , self . this . sys () . as_ptr () , varargs) ; ret } } # [doc = ""] # [doc = ""] # [inline] pub fn set_class_name (& self , class_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . set_class_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , class_name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_library (& self , library : impl AsArg < crate :: generated :: GDNativeLibrary >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . set_library ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , library . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_script_class_icon_path (& self , icon_path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . set_script_class_icon_path ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , icon_path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_script_class_name (& self , class_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NativeScriptMethodTable :: get (get_api ()) . set_script_class_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , class_name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NativeScript { } unsafe impl GodotObject for NativeScript { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NativeScript" } } impl std :: ops :: Deref for NativeScript { type Target = crate :: generated :: Script ; # [inline] fn deref (& self) -> & crate :: generated :: Script { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NativeScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Script { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Script > for NativeScript { } unsafe impl SubClass < crate :: generated :: Resource > for NativeScript { } unsafe impl SubClass < crate :: generated :: Reference > for NativeScript { } unsafe impl SubClass < crate :: generated :: Object > for NativeScript { } impl Instanciable for NativeScript { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { NativeScript :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NativeScriptMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_class_documentation : * mut sys :: godot_method_bind , pub get_class_name : * mut sys :: godot_method_bind , pub get_library : * mut sys :: godot_method_bind , pub get_method_documentation : * mut sys :: godot_method_bind , pub get_property_documentation : * mut sys :: godot_method_bind , pub get_script_class_icon_path : * mut sys :: godot_method_bind , pub get_script_class_name : * mut sys :: godot_method_bind , pub get_signal_documentation : * mut sys :: godot_method_bind , pub _new : * mut sys :: godot_method_bind , pub set_class_name : * mut sys :: godot_method_bind , pub set_library : * mut sys :: godot_method_bind , pub set_script_class_icon_path : * mut sys :: godot_method_bind , pub set_script_class_name : * mut sys :: godot_method_bind } impl NativeScriptMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NativeScriptMethodTable = NativeScriptMethodTable { class_constructor : None , get_class_documentation : 0 as * mut sys :: godot_method_bind , get_class_name : 0 as * mut sys :: godot_method_bind , get_library : 0 as * mut sys :: godot_method_bind , get_method_documentation : 0 as * mut sys :: godot_method_bind , get_property_documentation : 0 as * mut sys :: godot_method_bind , get_script_class_icon_path : 0 as * mut sys :: godot_method_bind , get_script_class_name : 0 as * mut sys :: godot_method_bind , get_signal_documentation : 0 as * mut sys :: godot_method_bind , _new : 0 as * mut sys :: godot_method_bind , set_class_name : 0 as * mut sys :: godot_method_bind , set_library : 0 as * mut sys :: godot_method_bind , set_script_class_icon_path : 0 as * mut sys :: godot_method_bind , set_script_class_name : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NativeScriptMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NativeScript\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_class_documentation = (gd_api . godot_method_bind_get_method) (class_name , "get_class_documentation\0" . as_ptr () as * const c_char) ; table . get_class_name = (gd_api . godot_method_bind_get_method) (class_name , "get_class_name\0" . as_ptr () as * const c_char) ; table . get_library = (gd_api . godot_method_bind_get_method) (class_name , "get_library\0" . as_ptr () as * const c_char) ; table . get_method_documentation = (gd_api . godot_method_bind_get_method) (class_name , "get_method_documentation\0" . as_ptr () as * const c_char) ; table . get_property_documentation = (gd_api . godot_method_bind_get_method) (class_name , "get_property_documentation\0" . as_ptr () as * const c_char) ; table . get_script_class_icon_path = (gd_api . godot_method_bind_get_method) (class_name , "get_script_class_icon_path\0" . as_ptr () as * const c_char) ; table . get_script_class_name = (gd_api . godot_method_bind_get_method) (class_name , "get_script_class_name\0" . as_ptr () as * const c_char) ; table . get_signal_documentation = (gd_api . godot_method_bind_get_method) (class_name , "get_signal_documentation\0" . as_ptr () as * const c_char) ; table . _new = (gd_api . godot_method_bind_get_method) (class_name , "new\0" . as_ptr () as * const c_char) ; table . set_class_name = (gd_api . godot_method_bind_get_method) (class_name , "set_class_name\0" . as_ptr () as * const c_char) ; table . set_library = (gd_api . godot_method_bind_get_method) (class_name , "set_library\0" . as_ptr () as * const c_char) ; table . set_script_class_icon_path = (gd_api . godot_method_bind_get_method) (class_name , "set_script_class_icon_path\0" . as_ptr () as * const c_char) ; table . set_script_class_name = (gd_api . godot_method_bind_get_method) (class_name , "set_script_class_name\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::native_script::private::NativeScript;
            
            pub(crate) mod navigation {
                # ! [doc = "This module contains types related to the API class [`Navigation`][super::Navigation]."] pub (crate) mod private { # [doc = "`core class Navigation` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_navigation.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Navigation` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Navigation>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNavigation inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Navigation { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Navigation ; impl Navigation { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NavigationMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The cell height to use for fields."] # [doc = ""] # [inline] pub fn cell_height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_cell_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The XZ plane cell size to use for fields."] # [doc = ""] # [inline] pub fn cell_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_cell_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the navigation point closest to the point given. Points are in local coordinate space."] # [doc = ""] # [inline] pub fn get_closest_point (& self , to_point : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_closest_point ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , to_point) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the surface normal at the navigation point closest to the point given. Useful for rotating a navigation agent according to the navigation mesh it moves on."] # [doc = ""] # [inline] pub fn get_closest_point_normal (& self , to_point : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_closest_point_normal ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , to_point) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the owner of the [`NavigationMesh`][NavigationMesh] which contains the navigation point closest to the point given. This is usually a [`NavigationMeshInstance`][NavigationMeshInstance]."] # [doc = ""] # [inline] pub fn get_closest_point_owner (& self , to_point : Vector3) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_closest_point_owner ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , to_point) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the navigation point closest to the given line segment. When enabling `use_collision`, only considers intersection points between segment and navigation meshes. If multiple intersection points are found, the one closest to the segment start point is returned.\n# Default Arguments\n* `use_collision` - `false`"] # [doc = ""] # [inline] pub fn get_closest_point_to_segment (& self , start : Vector3 , end : Vector3 , use_collision : bool) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_closest_point_to_segment ; let ret = crate :: icalls :: icallvar__vec3_vec3_bool (method_bind , self . this . sys () . as_ptr () , start , end , use_collision as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "This value is used to detect the near edges to connect compatible regions."] # [doc = ""] # [inline] pub fn edge_connection_margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_edge_connection_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "A bitfield determining all navigation map layers the navigation can use on a [`Navigation.get_simple_path`][Navigation::get_simple_path] path query."] # [doc = ""] # [inline] pub fn navigation_layers (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_navigation_layers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`RID`][Rid] of the navigation map on the [`NavigationServer`][NavigationServer]."] # [doc = ""] # [inline] pub fn get_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Deprecated._ [`Navigation`][Navigation] node and [`get_simple_path`][Self::get_simple_path] are deprecated and will be removed in a future version. Use [`NavigationServer.map_get_path`][NavigationServer::map_get_path] instead.\nReturns the path between two given points. Points are in local coordinate space. If `optimize` is `true` (the default), the agent properties associated with each [`NavigationMesh`][NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored.\n# Default Arguments\n* `optimize` - `true`"] # [doc = ""] # [inline] pub fn get_simple_path (& self , start : Vector3 , end : Vector3 , optimize : bool) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_simple_path ; let ret = crate :: icalls :: icallvar__vec3_vec3_bool (method_bind , self . this . sys () . as_ptr () , start , end , optimize as _) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Defines which direction is up. By default, this is `(0, 1, 0)`, which is the world's \"up\" direction."] # [doc = ""] # [inline] pub fn up_vector (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . get_up_vector ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The cell height to use for fields."] # [doc = ""] # [inline] pub fn set_cell_height (& self , cell_height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . set_cell_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , cell_height as _) ; } } # [doc = "The XZ plane cell size to use for fields."] # [doc = ""] # [inline] pub fn set_cell_size (& self , cell_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . set_cell_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , cell_size as _) ; } } # [doc = "This value is used to detect the near edges to connect compatible regions."] # [doc = ""] # [inline] pub fn set_edge_connection_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . set_edge_connection_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; } } # [doc = "A bitfield determining all navigation map layers the navigation can use on a [`Navigation.get_simple_path`][Navigation::get_simple_path] path query."] # [doc = ""] # [inline] pub fn set_navigation_layers (& self , navigation_layers : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . set_navigation_layers ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , navigation_layers as _) ; } } # [doc = "Defines which direction is up. By default, this is `(0, 1, 0)`, which is the world's \"up\" direction."] # [doc = ""] # [inline] pub fn set_up_vector (& self , up : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMethodTable :: get (get_api ()) . set_up_vector ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , up) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Navigation { } unsafe impl GodotObject for Navigation { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Navigation" } } impl QueueFree for Navigation { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Navigation { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Navigation { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for Navigation { } unsafe impl SubClass < crate :: generated :: Node > for Navigation { } unsafe impl SubClass < crate :: generated :: Object > for Navigation { } impl Instanciable for Navigation { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Navigation :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_cell_height : * mut sys :: godot_method_bind , pub get_cell_size : * mut sys :: godot_method_bind , pub get_closest_point : * mut sys :: godot_method_bind , pub get_closest_point_normal : * mut sys :: godot_method_bind , pub get_closest_point_owner : * mut sys :: godot_method_bind , pub get_closest_point_to_segment : * mut sys :: godot_method_bind , pub get_edge_connection_margin : * mut sys :: godot_method_bind , pub get_navigation_layers : * mut sys :: godot_method_bind , pub get_rid : * mut sys :: godot_method_bind , pub get_simple_path : * mut sys :: godot_method_bind , pub get_up_vector : * mut sys :: godot_method_bind , pub set_cell_height : * mut sys :: godot_method_bind , pub set_cell_size : * mut sys :: godot_method_bind , pub set_edge_connection_margin : * mut sys :: godot_method_bind , pub set_navigation_layers : * mut sys :: godot_method_bind , pub set_up_vector : * mut sys :: godot_method_bind } impl NavigationMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationMethodTable = NavigationMethodTable { class_constructor : None , get_cell_height : 0 as * mut sys :: godot_method_bind , get_cell_size : 0 as * mut sys :: godot_method_bind , get_closest_point : 0 as * mut sys :: godot_method_bind , get_closest_point_normal : 0 as * mut sys :: godot_method_bind , get_closest_point_owner : 0 as * mut sys :: godot_method_bind , get_closest_point_to_segment : 0 as * mut sys :: godot_method_bind , get_edge_connection_margin : 0 as * mut sys :: godot_method_bind , get_navigation_layers : 0 as * mut sys :: godot_method_bind , get_rid : 0 as * mut sys :: godot_method_bind , get_simple_path : 0 as * mut sys :: godot_method_bind , get_up_vector : 0 as * mut sys :: godot_method_bind , set_cell_height : 0 as * mut sys :: godot_method_bind , set_cell_size : 0 as * mut sys :: godot_method_bind , set_edge_connection_margin : 0 as * mut sys :: godot_method_bind , set_navigation_layers : 0 as * mut sys :: godot_method_bind , set_up_vector : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NavigationMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Navigation\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cell_height = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_height\0" . as_ptr () as * const c_char) ; table . get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_size\0" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\0" . as_ptr () as * const c_char) ; table . get_closest_point_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_normal\0" . as_ptr () as * const c_char) ; table . get_closest_point_owner = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_owner\0" . as_ptr () as * const c_char) ; table . get_closest_point_to_segment = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_to_segment\0" . as_ptr () as * const c_char) ; table . get_edge_connection_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_edge_connection_margin\0" . as_ptr () as * const c_char) ; table . get_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_layers\0" . as_ptr () as * const c_char) ; table . get_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_rid\0" . as_ptr () as * const c_char) ; table . get_simple_path = (gd_api . godot_method_bind_get_method) (class_name , "get_simple_path\0" . as_ptr () as * const c_char) ; table . get_up_vector = (gd_api . godot_method_bind_get_method) (class_name , "get_up_vector\0" . as_ptr () as * const c_char) ; table . set_cell_height = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_height\0" . as_ptr () as * const c_char) ; table . set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_size\0" . as_ptr () as * const c_char) ; table . set_edge_connection_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_edge_connection_margin\0" . as_ptr () as * const c_char) ; table . set_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_layers\0" . as_ptr () as * const c_char) ; table . set_up_vector = (gd_api . godot_method_bind_get_method) (class_name , "set_up_vector\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::navigation::private::Navigation;
            
            pub(crate) mod navigation_2d {
                # ! [doc = "This module contains types related to the API class [`Navigation2D`][super::Navigation2D]."] pub (crate) mod private { # [doc = "`core class Navigation2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_navigation2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Navigation2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Navigation2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNavigation2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Navigation2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Navigation2D ; impl Navigation2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Navigation2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The XY plane cell size to use for fields."] # [doc = ""] # [inline] pub fn cell_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . get_cell_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the navigation point closest to the point given. Points are in local coordinate space."] # [doc = ""] # [inline] pub fn get_closest_point (& self , to_point : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . get_closest_point ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , to_point) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the owner of the [`NavigationPolygon`][NavigationPolygon] which contains the navigation point closest to the point given. This is usually a [`NavigationPolygonInstance`][NavigationPolygonInstance]."] # [doc = ""] # [inline] pub fn get_closest_point_owner (& self , to_point : Vector2) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . get_closest_point_owner ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , to_point) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "This value is used to detect the near edges to connect compatible regions."] # [doc = ""] # [inline] pub fn edge_connection_margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . get_edge_connection_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "A bitfield determining all navigation map layers the navigation can use on a [`Navigation2D.get_simple_path`][Navigation2D::get_simple_path] path query."] # [doc = ""] # [inline] pub fn navigation_layers (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . get_navigation_layers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the object's [`RID`][Rid]."] # [doc = ""] # [inline] pub fn get_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . get_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Deprecated._ [`Navigation2D`][Navigation2D] node and [`get_simple_path`][Self::get_simple_path] are deprecated and will be removed in a future version. Use [`Navigation2DServer.map_get_path`][Navigation2DServer::map_get_path] instead.\nReturns the path between two given points. Points are in local coordinate space. If `optimize` is `true` (the default), the path is smoothed by merging path segments where possible.\n# Default Arguments\n* `optimize` - `true`"] # [doc = ""] # [inline] pub fn get_simple_path (& self , start : Vector2 , end : Vector2 , optimize : bool) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . get_simple_path ; let ret = crate :: icalls :: icallvar__vec2_vec2_bool (method_bind , self . this . sys () . as_ptr () , start , end , optimize as _) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The XY plane cell size to use for fields."] # [doc = ""] # [inline] pub fn set_cell_size (& self , cell_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . set_cell_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , cell_size as _) ; } } # [doc = "This value is used to detect the near edges to connect compatible regions."] # [doc = ""] # [inline] pub fn set_edge_connection_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . set_edge_connection_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; } } # [doc = "A bitfield determining all navigation map layers the navigation can use on a [`Navigation2D.get_simple_path`][Navigation2D::get_simple_path] path query."] # [doc = ""] # [inline] pub fn set_navigation_layers (& self , navigation_layers : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DMethodTable :: get (get_api ()) . set_navigation_layers ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , navigation_layers as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Navigation2D { } unsafe impl GodotObject for Navigation2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Navigation2D" } } impl QueueFree for Navigation2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Navigation2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Navigation2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for Navigation2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Navigation2D { } unsafe impl SubClass < crate :: generated :: Node > for Navigation2D { } unsafe impl SubClass < crate :: generated :: Object > for Navigation2D { } impl Instanciable for Navigation2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Navigation2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Navigation2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_cell_size : * mut sys :: godot_method_bind , pub get_closest_point : * mut sys :: godot_method_bind , pub get_closest_point_owner : * mut sys :: godot_method_bind , pub get_edge_connection_margin : * mut sys :: godot_method_bind , pub get_navigation_layers : * mut sys :: godot_method_bind , pub get_rid : * mut sys :: godot_method_bind , pub get_simple_path : * mut sys :: godot_method_bind , pub set_cell_size : * mut sys :: godot_method_bind , pub set_edge_connection_margin : * mut sys :: godot_method_bind , pub set_navigation_layers : * mut sys :: godot_method_bind } impl Navigation2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Navigation2DMethodTable = Navigation2DMethodTable { class_constructor : None , get_cell_size : 0 as * mut sys :: godot_method_bind , get_closest_point : 0 as * mut sys :: godot_method_bind , get_closest_point_owner : 0 as * mut sys :: godot_method_bind , get_edge_connection_margin : 0 as * mut sys :: godot_method_bind , get_navigation_layers : 0 as * mut sys :: godot_method_bind , get_rid : 0 as * mut sys :: godot_method_bind , get_simple_path : 0 as * mut sys :: godot_method_bind , set_cell_size : 0 as * mut sys :: godot_method_bind , set_edge_connection_margin : 0 as * mut sys :: godot_method_bind , set_navigation_layers : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Navigation2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Navigation2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_size\0" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\0" . as_ptr () as * const c_char) ; table . get_closest_point_owner = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_owner\0" . as_ptr () as * const c_char) ; table . get_edge_connection_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_edge_connection_margin\0" . as_ptr () as * const c_char) ; table . get_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_layers\0" . as_ptr () as * const c_char) ; table . get_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_rid\0" . as_ptr () as * const c_char) ; table . get_simple_path = (gd_api . godot_method_bind_get_method) (class_name , "get_simple_path\0" . as_ptr () as * const c_char) ; table . set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_size\0" . as_ptr () as * const c_char) ; table . set_edge_connection_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_edge_connection_margin\0" . as_ptr () as * const c_char) ; table . set_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_layers\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::navigation_2d::private::Navigation2D;
            
            pub(crate) mod navigation_2d_server {
                # ! [doc = "This module contains types related to the API class [`Navigation2DServer`][super::Navigation2DServer]."] pub (crate) mod private { # [doc = "`core singleton class Navigation2DServer` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_navigation2dserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nNavigation2DServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Navigation2DServer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Navigation2DServer ; impl Navigation2DServer { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("Navigation2DServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Creates the agent."] # [doc = ""] # [inline] pub fn agent_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . agent_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the navigation map [`RID`][Rid] the requested `agent` is currently assigned to."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_get_map (& self , agent : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . agent_get_map ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , agent) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the map got changed the previous frame."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_is_map_changed (& self , agent : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . agent_is_map_changed ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , agent) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated `safe_velocity` to the `receiver` object with a signal to the chosen `method` name.\n**Note:** Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [`agent_set_callback`][Self::agent_set_callback] again with a `null` object as the `receiver`.\n# Default Arguments\n* `userdata` - `null`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_callback (& self , agent : Rid , receiver : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString > , userdata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . agent_set_callback ; let ret = crate :: icalls :: icallvar__rid_obj_str_var (method_bind , self . this . sys () . as_ptr () , agent , receiver . as_arg_ptr () , method . into () , userdata . owned_to_variant ()) ; } } # [doc = "Puts the agent in the map."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_map (& self , agent : Rid , map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . agent_set_map ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , agent , map) ; } } # [doc = "Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_max_neighbors (& self , agent : Rid , count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . agent_set_max_neighbors ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , agent , count as _) ; } } # [doc = "Sets the maximum speed of the agent. Must be positive."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_max_speed (& self , agent : Rid , max_speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . agent_set_max_speed ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , agent , max_speed as _) ; } } # [doc = "Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_neighbor_dist (& self , agent : Rid , dist : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . agent_set_neighbor_dist ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , agent , dist as _) ; } } # [doc = "Sets the position of the agent in world space."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_position (& self , agent : Rid , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . agent_set_position ; let ret = crate :: icalls :: icallvar__rid_vec2 (method_bind , self . this . sys () . as_ptr () , agent , position) ; } } # [doc = "Sets the radius of the agent."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_radius (& self , agent : Rid , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . agent_set_radius ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , agent , radius as _) ; } } # [doc = "Sets the new target velocity."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_target_velocity (& self , agent : Rid , target_velocity : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . agent_set_target_velocity ; let ret = crate :: icalls :: icallvar__rid_vec2 (method_bind , self . this . sys () . as_ptr () , agent , target_velocity) ; } } # [doc = "The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_time_horizon (& self , agent : Rid , time : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . agent_set_time_horizon ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , agent , time as _) ; } } # [doc = "Sets the current velocity of the agent."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_velocity (& self , agent : Rid , velocity : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . agent_set_velocity ; let ret = crate :: icalls :: icallvar__rid_vec2 (method_bind , self . this . sys () . as_ptr () , agent , velocity) ; } } # [doc = "Destroys the given RID."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn free_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . free_rid ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Returns all created navigation map [`RID`][Rid]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them."] # [doc = ""] # [inline] pub fn get_maps (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . get_maps ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Create a new map."] # [doc = ""] # [inline] pub fn map_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . map_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "This function immediately forces synchronization of the specified navigation `map` [`RID`][Rid]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed).\nDue to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update.\nAvoidance processing and dispatch of the `safe_velocity` signals is untouched by this function and continues to happen for all maps and agents at the end of the physics frame.\n**Note:** With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_force_update (& self , map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . map_force_update ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , map) ; } } # [doc = "Returns all navigation agents [`RID`][Rid]s that are currently assigned to the requested navigation `map`."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_agents (& self , map : Rid) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . map_get_agents ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , map) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the map cell height. **Note:** Currently not implemented."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_cell_height (& self , map : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . map_get_cell_height ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , map) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the map cell size."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_cell_size (& self , map : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . map_get_cell_size ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , map) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the point closest to the provided `to_point` on the navigation mesh surface."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_closest_point (& self , map : Rid , to_point : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . map_get_closest_point ; let ret = crate :: icalls :: icallvar__rid_vec2 (method_bind , self . this . sys () . as_ptr () , map , to_point) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the owner region RID for the point returned by [`map_get_closest_point`][Self::map_get_closest_point]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_closest_point_owner (& self , map : Rid , to_point : Vector2) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . map_get_closest_point_owner ; let ret = crate :: icalls :: icallvar__rid_vec2 (method_bind , self . this . sys () . as_ptr () , map , to_point) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the edge connection margin of the map. The edge connection margin is a distance used to connect two regions."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_edge_connection_margin (& self , map : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . map_get_edge_connection_margin ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , map) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the navigation path to reach the destination from the origin. `navigation_layers` is a bitmask of all region layers that are allowed to be in the path.\n# Default Arguments\n* `navigation_layers` - `1`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_path (& self , map : Rid , origin : Vector2 , destination : Vector2 , optimize : bool , navigation_layers : i64) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . map_get_path ; let ret = crate :: icalls :: icallvar__rid_vec2_vec2_bool_i64 (method_bind , self . this . sys () . as_ptr () , map , origin , destination , optimize as _ , navigation_layers as _) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all navigation regions [`RID`][Rid]s that are currently assigned to the requested navigation `map`."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_regions (& self , map : Rid) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . map_get_regions ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , map) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the map is active."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_is_active (& self , map : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . map_is_active ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , map) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets the map active."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_set_active (& self , map : Rid , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . map_set_active ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , map , active as _) ; } } # [doc = "Set the map cell height used to weld the navigation mesh polygons. **Note:** Currently not implemented."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_set_cell_height (& self , map : Rid , cell_height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . map_set_cell_height ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , map , cell_height as _) ; } } # [doc = "Set the map cell size used to weld the navigation mesh polygons."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_set_cell_size (& self , map : Rid , cell_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . map_set_cell_size ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , map , cell_size as _) ; } } # [doc = "Set the map edge connection margin used to weld the compatible region edges."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_set_edge_connection_margin (& self , map : Rid , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . map_set_edge_connection_margin ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , map , margin as _) ; } } # [doc = "Creates a new region."] # [doc = ""] # [inline] pub fn region_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . region_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the ending point of a connection door. `connection` is an index between 0 and the return value of [`region_get_connections_count`][Self::region_get_connections_count]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_get_connection_pathway_end (& self , region : Rid , connection : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . region_get_connection_pathway_end ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , region , connection as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the starting point of a connection door. `connection` is an index between 0 and the return value of [`region_get_connections_count`][Self::region_get_connections_count]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_get_connection_pathway_start (& self , region : Rid , connection : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . region_get_connection_pathway_start ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , region , connection as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns how many connections this `region` has with other regions in the map."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_get_connections_count (& self , region : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . region_get_connections_count ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , region) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the `enter_cost` of this `region`."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_get_enter_cost (& self , region : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . region_get_enter_cost ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , region) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the navigation map [`RID`][Rid] the requested `region` is currently assigned to."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_get_map (& self , region : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . region_get_map ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , region) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the region's navigation layers."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_get_navigation_layers (& self , region : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . region_get_navigation_layers ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , region) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the `travel_cost` of this `region`."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_get_travel_cost (& self , region : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . region_get_travel_cost ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , region) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the provided `point` in world space is currently owned by the provided navigation `region`. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region.\nIf multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer.\n**Note:** If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_owns_point (& self , region : Rid , point : Vector2) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . region_owns_point ; let ret = crate :: icalls :: icallvar__rid_vec2 (method_bind , self . this . sys () . as_ptr () , region , point) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets the `enter_cost` for this `region`."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_set_enter_cost (& self , region : Rid , enter_cost : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . region_set_enter_cost ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , region , enter_cost as _) ; } } # [doc = "Sets the map for the region."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_set_map (& self , region : Rid , map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . region_set_map ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , region , map) ; } } # [doc = "Set the region's navigation layers. This allows selecting regions from a path request (when using [`Navigation2DServer.map_get_path`][Navigation2DServer::map_get_path])."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_set_navigation_layers (& self , region : Rid , navigation_layers : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . region_set_navigation_layers ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , region , navigation_layers as _) ; } } # [doc = "Sets the navigation mesh for the region."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_set_navpoly (& self , region : Rid , nav_poly : impl AsArg < crate :: generated :: NavigationPolygon >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . region_set_navpoly ; let ret = crate :: icalls :: icallvar__rid_obj (method_bind , self . this . sys () . as_ptr () , region , nav_poly . as_arg_ptr ()) ; } } # [doc = "Sets the global transformation for the region."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_set_transform (& self , region : Rid , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . region_set_transform ; let ret = crate :: icalls :: icallvar__rid_trans2D (method_bind , self . this . sys () . as_ptr () , region , transform) ; } } # [doc = "Sets the `travel_cost` for this `region`."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_set_travel_cost (& self , region : Rid , travel_cost : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Navigation2DServerMethodTable :: get (get_api ()) . region_set_travel_cost ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , region , travel_cost as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Navigation2DServer { } unsafe impl GodotObject for Navigation2DServer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Navigation2DServer" } } impl std :: ops :: Deref for Navigation2DServer { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Navigation2DServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for Navigation2DServer { } unsafe impl Send for Navigation2DServer { } unsafe impl Sync for Navigation2DServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Navigation2DServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub agent_create : * mut sys :: godot_method_bind , pub agent_get_map : * mut sys :: godot_method_bind , pub agent_is_map_changed : * mut sys :: godot_method_bind , pub agent_set_callback : * mut sys :: godot_method_bind , pub agent_set_map : * mut sys :: godot_method_bind , pub agent_set_max_neighbors : * mut sys :: godot_method_bind , pub agent_set_max_speed : * mut sys :: godot_method_bind , pub agent_set_neighbor_dist : * mut sys :: godot_method_bind , pub agent_set_position : * mut sys :: godot_method_bind , pub agent_set_radius : * mut sys :: godot_method_bind , pub agent_set_target_velocity : * mut sys :: godot_method_bind , pub agent_set_time_horizon : * mut sys :: godot_method_bind , pub agent_set_velocity : * mut sys :: godot_method_bind , pub free_rid : * mut sys :: godot_method_bind , pub get_maps : * mut sys :: godot_method_bind , pub map_create : * mut sys :: godot_method_bind , pub map_force_update : * mut sys :: godot_method_bind , pub map_get_agents : * mut sys :: godot_method_bind , pub map_get_cell_height : * mut sys :: godot_method_bind , pub map_get_cell_size : * mut sys :: godot_method_bind , pub map_get_closest_point : * mut sys :: godot_method_bind , pub map_get_closest_point_owner : * mut sys :: godot_method_bind , pub map_get_edge_connection_margin : * mut sys :: godot_method_bind , pub map_get_path : * mut sys :: godot_method_bind , pub map_get_regions : * mut sys :: godot_method_bind , pub map_is_active : * mut sys :: godot_method_bind , pub map_set_active : * mut sys :: godot_method_bind , pub map_set_cell_height : * mut sys :: godot_method_bind , pub map_set_cell_size : * mut sys :: godot_method_bind , pub map_set_edge_connection_margin : * mut sys :: godot_method_bind , pub region_create : * mut sys :: godot_method_bind , pub region_get_connection_pathway_end : * mut sys :: godot_method_bind , pub region_get_connection_pathway_start : * mut sys :: godot_method_bind , pub region_get_connections_count : * mut sys :: godot_method_bind , pub region_get_enter_cost : * mut sys :: godot_method_bind , pub region_get_map : * mut sys :: godot_method_bind , pub region_get_navigation_layers : * mut sys :: godot_method_bind , pub region_get_travel_cost : * mut sys :: godot_method_bind , pub region_owns_point : * mut sys :: godot_method_bind , pub region_set_enter_cost : * mut sys :: godot_method_bind , pub region_set_map : * mut sys :: godot_method_bind , pub region_set_navigation_layers : * mut sys :: godot_method_bind , pub region_set_navpoly : * mut sys :: godot_method_bind , pub region_set_transform : * mut sys :: godot_method_bind , pub region_set_travel_cost : * mut sys :: godot_method_bind } impl Navigation2DServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Navigation2DServerMethodTable = Navigation2DServerMethodTable { class_constructor : None , agent_create : 0 as * mut sys :: godot_method_bind , agent_get_map : 0 as * mut sys :: godot_method_bind , agent_is_map_changed : 0 as * mut sys :: godot_method_bind , agent_set_callback : 0 as * mut sys :: godot_method_bind , agent_set_map : 0 as * mut sys :: godot_method_bind , agent_set_max_neighbors : 0 as * mut sys :: godot_method_bind , agent_set_max_speed : 0 as * mut sys :: godot_method_bind , agent_set_neighbor_dist : 0 as * mut sys :: godot_method_bind , agent_set_position : 0 as * mut sys :: godot_method_bind , agent_set_radius : 0 as * mut sys :: godot_method_bind , agent_set_target_velocity : 0 as * mut sys :: godot_method_bind , agent_set_time_horizon : 0 as * mut sys :: godot_method_bind , agent_set_velocity : 0 as * mut sys :: godot_method_bind , free_rid : 0 as * mut sys :: godot_method_bind , get_maps : 0 as * mut sys :: godot_method_bind , map_create : 0 as * mut sys :: godot_method_bind , map_force_update : 0 as * mut sys :: godot_method_bind , map_get_agents : 0 as * mut sys :: godot_method_bind , map_get_cell_height : 0 as * mut sys :: godot_method_bind , map_get_cell_size : 0 as * mut sys :: godot_method_bind , map_get_closest_point : 0 as * mut sys :: godot_method_bind , map_get_closest_point_owner : 0 as * mut sys :: godot_method_bind , map_get_edge_connection_margin : 0 as * mut sys :: godot_method_bind , map_get_path : 0 as * mut sys :: godot_method_bind , map_get_regions : 0 as * mut sys :: godot_method_bind , map_is_active : 0 as * mut sys :: godot_method_bind , map_set_active : 0 as * mut sys :: godot_method_bind , map_set_cell_height : 0 as * mut sys :: godot_method_bind , map_set_cell_size : 0 as * mut sys :: godot_method_bind , map_set_edge_connection_margin : 0 as * mut sys :: godot_method_bind , region_create : 0 as * mut sys :: godot_method_bind , region_get_connection_pathway_end : 0 as * mut sys :: godot_method_bind , region_get_connection_pathway_start : 0 as * mut sys :: godot_method_bind , region_get_connections_count : 0 as * mut sys :: godot_method_bind , region_get_enter_cost : 0 as * mut sys :: godot_method_bind , region_get_map : 0 as * mut sys :: godot_method_bind , region_get_navigation_layers : 0 as * mut sys :: godot_method_bind , region_get_travel_cost : 0 as * mut sys :: godot_method_bind , region_owns_point : 0 as * mut sys :: godot_method_bind , region_set_enter_cost : 0 as * mut sys :: godot_method_bind , region_set_map : 0 as * mut sys :: godot_method_bind , region_set_navigation_layers : 0 as * mut sys :: godot_method_bind , region_set_navpoly : 0 as * mut sys :: godot_method_bind , region_set_transform : 0 as * mut sys :: godot_method_bind , region_set_travel_cost : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Navigation2DServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Navigation2DServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . agent_create = (gd_api . godot_method_bind_get_method) (class_name , "agent_create\0" . as_ptr () as * const c_char) ; table . agent_get_map = (gd_api . godot_method_bind_get_method) (class_name , "agent_get_map\0" . as_ptr () as * const c_char) ; table . agent_is_map_changed = (gd_api . godot_method_bind_get_method) (class_name , "agent_is_map_changed\0" . as_ptr () as * const c_char) ; table . agent_set_callback = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_callback\0" . as_ptr () as * const c_char) ; table . agent_set_map = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_map\0" . as_ptr () as * const c_char) ; table . agent_set_max_neighbors = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_max_neighbors\0" . as_ptr () as * const c_char) ; table . agent_set_max_speed = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_max_speed\0" . as_ptr () as * const c_char) ; table . agent_set_neighbor_dist = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_neighbor_dist\0" . as_ptr () as * const c_char) ; table . agent_set_position = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_position\0" . as_ptr () as * const c_char) ; table . agent_set_radius = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_radius\0" . as_ptr () as * const c_char) ; table . agent_set_target_velocity = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_target_velocity\0" . as_ptr () as * const c_char) ; table . agent_set_time_horizon = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_time_horizon\0" . as_ptr () as * const c_char) ; table . agent_set_velocity = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_velocity\0" . as_ptr () as * const c_char) ; table . free_rid = (gd_api . godot_method_bind_get_method) (class_name , "free_rid\0" . as_ptr () as * const c_char) ; table . get_maps = (gd_api . godot_method_bind_get_method) (class_name , "get_maps\0" . as_ptr () as * const c_char) ; table . map_create = (gd_api . godot_method_bind_get_method) (class_name , "map_create\0" . as_ptr () as * const c_char) ; table . map_force_update = (gd_api . godot_method_bind_get_method) (class_name , "map_force_update\0" . as_ptr () as * const c_char) ; table . map_get_agents = (gd_api . godot_method_bind_get_method) (class_name , "map_get_agents\0" . as_ptr () as * const c_char) ; table . map_get_cell_height = (gd_api . godot_method_bind_get_method) (class_name , "map_get_cell_height\0" . as_ptr () as * const c_char) ; table . map_get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "map_get_cell_size\0" . as_ptr () as * const c_char) ; table . map_get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "map_get_closest_point\0" . as_ptr () as * const c_char) ; table . map_get_closest_point_owner = (gd_api . godot_method_bind_get_method) (class_name , "map_get_closest_point_owner\0" . as_ptr () as * const c_char) ; table . map_get_edge_connection_margin = (gd_api . godot_method_bind_get_method) (class_name , "map_get_edge_connection_margin\0" . as_ptr () as * const c_char) ; table . map_get_path = (gd_api . godot_method_bind_get_method) (class_name , "map_get_path\0" . as_ptr () as * const c_char) ; table . map_get_regions = (gd_api . godot_method_bind_get_method) (class_name , "map_get_regions\0" . as_ptr () as * const c_char) ; table . map_is_active = (gd_api . godot_method_bind_get_method) (class_name , "map_is_active\0" . as_ptr () as * const c_char) ; table . map_set_active = (gd_api . godot_method_bind_get_method) (class_name , "map_set_active\0" . as_ptr () as * const c_char) ; table . map_set_cell_height = (gd_api . godot_method_bind_get_method) (class_name , "map_set_cell_height\0" . as_ptr () as * const c_char) ; table . map_set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "map_set_cell_size\0" . as_ptr () as * const c_char) ; table . map_set_edge_connection_margin = (gd_api . godot_method_bind_get_method) (class_name , "map_set_edge_connection_margin\0" . as_ptr () as * const c_char) ; table . region_create = (gd_api . godot_method_bind_get_method) (class_name , "region_create\0" . as_ptr () as * const c_char) ; table . region_get_connection_pathway_end = (gd_api . godot_method_bind_get_method) (class_name , "region_get_connection_pathway_end\0" . as_ptr () as * const c_char) ; table . region_get_connection_pathway_start = (gd_api . godot_method_bind_get_method) (class_name , "region_get_connection_pathway_start\0" . as_ptr () as * const c_char) ; table . region_get_connections_count = (gd_api . godot_method_bind_get_method) (class_name , "region_get_connections_count\0" . as_ptr () as * const c_char) ; table . region_get_enter_cost = (gd_api . godot_method_bind_get_method) (class_name , "region_get_enter_cost\0" . as_ptr () as * const c_char) ; table . region_get_map = (gd_api . godot_method_bind_get_method) (class_name , "region_get_map\0" . as_ptr () as * const c_char) ; table . region_get_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "region_get_navigation_layers\0" . as_ptr () as * const c_char) ; table . region_get_travel_cost = (gd_api . godot_method_bind_get_method) (class_name , "region_get_travel_cost\0" . as_ptr () as * const c_char) ; table . region_owns_point = (gd_api . godot_method_bind_get_method) (class_name , "region_owns_point\0" . as_ptr () as * const c_char) ; table . region_set_enter_cost = (gd_api . godot_method_bind_get_method) (class_name , "region_set_enter_cost\0" . as_ptr () as * const c_char) ; table . region_set_map = (gd_api . godot_method_bind_get_method) (class_name , "region_set_map\0" . as_ptr () as * const c_char) ; table . region_set_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "region_set_navigation_layers\0" . as_ptr () as * const c_char) ; table . region_set_navpoly = (gd_api . godot_method_bind_get_method) (class_name , "region_set_navpoly\0" . as_ptr () as * const c_char) ; table . region_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "region_set_transform\0" . as_ptr () as * const c_char) ; table . region_set_travel_cost = (gd_api . godot_method_bind_get_method) (class_name , "region_set_travel_cost\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::navigation_2d_server::private::Navigation2DServer;
            
            pub(crate) mod navigation_agent {
                # ! [doc = "This module contains types related to the API class [`NavigationAgent`][super::NavigationAgent]."] pub (crate) mod private { # [doc = "`core class NavigationAgent` inherits `Node` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_navigationagent.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`NavigationAgent` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<NavigationAgent>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNavigationAgent inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NavigationAgent { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NavigationAgent ; impl NavigationAgent { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NavigationAgentMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the distance to the target location, using the agent's global position. The user must set the target location with [`set_target_location`][Self::set_target_location] in order for this to be accurate."] # [doc = ""] # [inline] pub fn distance_to_target (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . distance_to_target ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The NavigationAgent height offset is subtracted from the y-axis value of any vector path position for this NavigationAgent. The NavigationAgent height offset does not change or influence the navigation mesh or pathfinding query result. Additional navigation maps that use regions with navigation meshes that the developer baked with appropriate agent radius or height values are required to support different-sized agents."] # [doc = ""] # [inline] pub fn agent_height_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_agent_height_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true` the agent is registered for an RVO avoidance callback on the [`NavigationServer`][NavigationServer]. When [`set_velocity`][Self::set_velocity] is used and the processing is completed a `safe_velocity` Vector3 is received with a signal connection to `velocity_computed`. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it."] # [doc = ""] # [inline] pub fn avoidance_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_avoidance_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame."] # [doc = ""] # [inline] pub fn get_final_location (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_final_location ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Ignores collisions on the Y axis. Must be `true` to move on a horizontal plane."] # [doc = ""] # [inline] pub fn ignore_y (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_ignore_y ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The maximum number of neighbors for the agent to consider."] # [doc = ""] # [inline] pub fn max_neighbors (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_max_neighbors ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum speed that an agent can move."] # [doc = ""] # [inline] pub fn max_speed (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_max_speed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns this agent's current path from start to finish in global coordinates. The path only updates when the target location is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended [`get_next_location`][Self::get_next_location] once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic."] # [doc = ""] # [inline] pub fn get_nav_path (& self) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_nav_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns which index the agent is currently on in the navigation path's [`PoolVector3Array`][PoolArray<Vector3>]."] # [doc = ""] # [inline] pub fn get_nav_path_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_nav_path_index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`Navigation`][Navigation] node that the agent is using for its navigation system."] # [doc = ""] # [inline] pub fn get_navigation (& self) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_navigation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A bitfield determining all navigation map layers the [`NavigationAgent`][NavigationAgent] belongs to. On path requests the agent will ignore navmeshes without at least one matching layer."] # [doc = ""] # [inline] pub fn navigation_layers (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_navigation_layers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`RID`][Rid] of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use [`set_navigation_map`][Self::set_navigation_map] to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer."] # [doc = ""] # [inline] pub fn get_navigation_map (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_navigation_map ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The distance to search for other agents."] # [doc = ""] # [inline] pub fn neighbor_dist (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_neighbor_dist ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the next location in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent."] # [doc = ""] # [inline] pub fn get_next_location (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_next_location ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The distance threshold before a path point is considered to be reached. This will allow an agent to not have to hit a path point on the path exactly, but in the area. If this value is set to high the NavigationAgent will skip points on the path which can lead to leaving the navigation mesh. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the next point on each physics frame update."] # [doc = ""] # [inline] pub fn path_desired_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_path_desired_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path."] # [doc = ""] # [inline] pub fn path_max_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_path_max_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The radius of the avoidance agent. This is the \"body\" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [`neighbor_dist`][Self::neighbor_dist]).\nDoes not affect normal pathfinding. To change an actor's pathfinding radius bake [`NavigationMesh`][NavigationMesh] resources with a different [`NavigationMesh.agent_radius`][NavigationMesh::agent_radius] property and use different navigation maps for each actor size."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`RID`][Rid] of this agent on the [`NavigationServer`][NavigationServer]."] # [doc = ""] # [inline] pub fn get_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update."] # [doc = ""] # [inline] pub fn target_desired_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_target_desired_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the user-defined target location (set with [`set_target_location`][Self::set_target_location])."] # [doc = ""] # [inline] pub fn get_target_location (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_target_location ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but the less freedom in choosing its velocities. Must be positive."] # [doc = ""] # [inline] pub fn time_horizon (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . get_time_horizon ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the navigation path's final location has been reached."] # [doc = ""] # [inline] pub fn is_navigation_finished (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . is_navigation_finished ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the target location is reachable. The target location is set using [`set_target_location`][Self::set_target_location]."] # [doc = ""] # [inline] pub fn is_target_reachable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . is_target_reachable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the target location is reached. The target location is set using [`set_target_location`][Self::set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [`get_final_location`][Self::get_final_location]."] # [doc = ""] # [inline] pub fn is_target_reached (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . is_target_reached ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The NavigationAgent height offset is subtracted from the y-axis value of any vector path position for this NavigationAgent. The NavigationAgent height offset does not change or influence the navigation mesh or pathfinding query result. Additional navigation maps that use regions with navigation meshes that the developer baked with appropriate agent radius or height values are required to support different-sized agents."] # [doc = ""] # [inline] pub fn set_agent_height_offset (& self , agent_height_offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_agent_height_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , agent_height_offset as _) ; } } # [doc = "If `true` the agent is registered for an RVO avoidance callback on the [`NavigationServer`][NavigationServer]. When [`set_velocity`][Self::set_velocity] is used and the processing is completed a `safe_velocity` Vector3 is received with a signal connection to `velocity_computed`. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it."] # [doc = ""] # [inline] pub fn set_avoidance_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_avoidance_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Ignores collisions on the Y axis. Must be `true` to move on a horizontal plane."] # [doc = ""] # [inline] pub fn set_ignore_y (& self , ignore : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_ignore_y ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , ignore as _) ; } } # [doc = "The maximum number of neighbors for the agent to consider."] # [doc = ""] # [inline] pub fn set_max_neighbors (& self , max_neighbors : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_max_neighbors ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , max_neighbors as _) ; } } # [doc = "The maximum speed that an agent can move."] # [doc = ""] # [inline] pub fn set_max_speed (& self , max_speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_max_speed ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , max_speed as _) ; } } # [doc = "Sets the [`Navigation`][Navigation] node used by the agent. Useful when you don't want to make the agent a child of a [`Navigation`][Navigation] node."] # [doc = ""] # [inline] pub fn set_navigation (& self , navigation : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_navigation ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , navigation . as_arg_ptr ()) ; } } # [doc = "A bitfield determining all navigation map layers the [`NavigationAgent`][NavigationAgent] belongs to. On path requests the agent will ignore navmeshes without at least one matching layer."] # [doc = ""] # [inline] pub fn set_navigation_layers (& self , navigation_layers : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_navigation_layers ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , navigation_layers as _) ; } } # [doc = "Sets the [`RID`][Rid] of the navigation map this NavigationAgent node should use and also updates the `agent` on the NavigationServer."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn set_navigation_map (& self , navigation_map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_navigation_map ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , navigation_map) ; } } # [doc = "The distance to search for other agents."] # [doc = ""] # [inline] pub fn set_neighbor_dist (& self , neighbor_dist : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_neighbor_dist ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , neighbor_dist as _) ; } } # [doc = "The distance threshold before a path point is considered to be reached. This will allow an agent to not have to hit a path point on the path exactly, but in the area. If this value is set to high the NavigationAgent will skip points on the path which can lead to leaving the navigation mesh. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the next point on each physics frame update."] # [doc = ""] # [inline] pub fn set_path_desired_distance (& self , desired_distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_path_desired_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , desired_distance as _) ; } } # [doc = "The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path."] # [doc = ""] # [inline] pub fn set_path_max_distance (& self , max_speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_path_max_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , max_speed as _) ; } } # [doc = "The radius of the avoidance agent. This is the \"body\" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [`neighbor_dist`][Self::neighbor_dist]).\nDoes not affect normal pathfinding. To change an actor's pathfinding radius bake [`NavigationMesh`][NavigationMesh] resources with a different [`NavigationMesh.agent_radius`][NavigationMesh::agent_radius] property and use different navigation maps for each actor size."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = "The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update."] # [doc = ""] # [inline] pub fn set_target_desired_distance (& self , desired_distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_target_desired_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , desired_distance as _) ; } } # [doc = "Sets the user desired final location. This will clear the current navigation path."] # [doc = ""] # [inline] pub fn set_target_location (& self , location : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_target_location ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , location) ; } } # [doc = "The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but the less freedom in choosing its velocities. Must be positive."] # [doc = ""] # [inline] pub fn set_time_horizon (& self , time_horizon : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_time_horizon ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , time_horizon as _) ; } } # [doc = "Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the `velocity_computed` signal."] # [doc = ""] # [inline] pub fn set_velocity (& self , velocity : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgentMethodTable :: get (get_api ()) . set_velocity ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , velocity) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationAgent { } unsafe impl GodotObject for NavigationAgent { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "NavigationAgent" } } impl QueueFree for NavigationAgent { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for NavigationAgent { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationAgent { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for NavigationAgent { } unsafe impl SubClass < crate :: generated :: Object > for NavigationAgent { } impl Instanciable for NavigationAgent { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { NavigationAgent :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationAgentMethodTable { pub class_constructor : sys :: godot_class_constructor , pub distance_to_target : * mut sys :: godot_method_bind , pub get_agent_height_offset : * mut sys :: godot_method_bind , pub get_avoidance_enabled : * mut sys :: godot_method_bind , pub get_final_location : * mut sys :: godot_method_bind , pub get_ignore_y : * mut sys :: godot_method_bind , pub get_max_neighbors : * mut sys :: godot_method_bind , pub get_max_speed : * mut sys :: godot_method_bind , pub get_nav_path : * mut sys :: godot_method_bind , pub get_nav_path_index : * mut sys :: godot_method_bind , pub get_navigation : * mut sys :: godot_method_bind , pub get_navigation_layers : * mut sys :: godot_method_bind , pub get_navigation_map : * mut sys :: godot_method_bind , pub get_neighbor_dist : * mut sys :: godot_method_bind , pub get_next_location : * mut sys :: godot_method_bind , pub get_path_desired_distance : * mut sys :: godot_method_bind , pub get_path_max_distance : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub get_rid : * mut sys :: godot_method_bind , pub get_target_desired_distance : * mut sys :: godot_method_bind , pub get_target_location : * mut sys :: godot_method_bind , pub get_time_horizon : * mut sys :: godot_method_bind , pub is_navigation_finished : * mut sys :: godot_method_bind , pub is_target_reachable : * mut sys :: godot_method_bind , pub is_target_reached : * mut sys :: godot_method_bind , pub set_agent_height_offset : * mut sys :: godot_method_bind , pub set_avoidance_enabled : * mut sys :: godot_method_bind , pub set_ignore_y : * mut sys :: godot_method_bind , pub set_max_neighbors : * mut sys :: godot_method_bind , pub set_max_speed : * mut sys :: godot_method_bind , pub set_navigation : * mut sys :: godot_method_bind , pub set_navigation_layers : * mut sys :: godot_method_bind , pub set_navigation_map : * mut sys :: godot_method_bind , pub set_neighbor_dist : * mut sys :: godot_method_bind , pub set_path_desired_distance : * mut sys :: godot_method_bind , pub set_path_max_distance : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind , pub set_target_desired_distance : * mut sys :: godot_method_bind , pub set_target_location : * mut sys :: godot_method_bind , pub set_time_horizon : * mut sys :: godot_method_bind , pub set_velocity : * mut sys :: godot_method_bind } impl NavigationAgentMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationAgentMethodTable = NavigationAgentMethodTable { class_constructor : None , distance_to_target : 0 as * mut sys :: godot_method_bind , get_agent_height_offset : 0 as * mut sys :: godot_method_bind , get_avoidance_enabled : 0 as * mut sys :: godot_method_bind , get_final_location : 0 as * mut sys :: godot_method_bind , get_ignore_y : 0 as * mut sys :: godot_method_bind , get_max_neighbors : 0 as * mut sys :: godot_method_bind , get_max_speed : 0 as * mut sys :: godot_method_bind , get_nav_path : 0 as * mut sys :: godot_method_bind , get_nav_path_index : 0 as * mut sys :: godot_method_bind , get_navigation : 0 as * mut sys :: godot_method_bind , get_navigation_layers : 0 as * mut sys :: godot_method_bind , get_navigation_map : 0 as * mut sys :: godot_method_bind , get_neighbor_dist : 0 as * mut sys :: godot_method_bind , get_next_location : 0 as * mut sys :: godot_method_bind , get_path_desired_distance : 0 as * mut sys :: godot_method_bind , get_path_max_distance : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , get_rid : 0 as * mut sys :: godot_method_bind , get_target_desired_distance : 0 as * mut sys :: godot_method_bind , get_target_location : 0 as * mut sys :: godot_method_bind , get_time_horizon : 0 as * mut sys :: godot_method_bind , is_navigation_finished : 0 as * mut sys :: godot_method_bind , is_target_reachable : 0 as * mut sys :: godot_method_bind , is_target_reached : 0 as * mut sys :: godot_method_bind , set_agent_height_offset : 0 as * mut sys :: godot_method_bind , set_avoidance_enabled : 0 as * mut sys :: godot_method_bind , set_ignore_y : 0 as * mut sys :: godot_method_bind , set_max_neighbors : 0 as * mut sys :: godot_method_bind , set_max_speed : 0 as * mut sys :: godot_method_bind , set_navigation : 0 as * mut sys :: godot_method_bind , set_navigation_layers : 0 as * mut sys :: godot_method_bind , set_navigation_map : 0 as * mut sys :: godot_method_bind , set_neighbor_dist : 0 as * mut sys :: godot_method_bind , set_path_desired_distance : 0 as * mut sys :: godot_method_bind , set_path_max_distance : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind , set_target_desired_distance : 0 as * mut sys :: godot_method_bind , set_target_location : 0 as * mut sys :: godot_method_bind , set_time_horizon : 0 as * mut sys :: godot_method_bind , set_velocity : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NavigationAgentMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NavigationAgent\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . distance_to_target = (gd_api . godot_method_bind_get_method) (class_name , "distance_to_target\0" . as_ptr () as * const c_char) ; table . get_agent_height_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_agent_height_offset\0" . as_ptr () as * const c_char) ; table . get_avoidance_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_avoidance_enabled\0" . as_ptr () as * const c_char) ; table . get_final_location = (gd_api . godot_method_bind_get_method) (class_name , "get_final_location\0" . as_ptr () as * const c_char) ; table . get_ignore_y = (gd_api . godot_method_bind_get_method) (class_name , "get_ignore_y\0" . as_ptr () as * const c_char) ; table . get_max_neighbors = (gd_api . godot_method_bind_get_method) (class_name , "get_max_neighbors\0" . as_ptr () as * const c_char) ; table . get_max_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_max_speed\0" . as_ptr () as * const c_char) ; table . get_nav_path = (gd_api . godot_method_bind_get_method) (class_name , "get_nav_path\0" . as_ptr () as * const c_char) ; table . get_nav_path_index = (gd_api . godot_method_bind_get_method) (class_name , "get_nav_path_index\0" . as_ptr () as * const c_char) ; table . get_navigation = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation\0" . as_ptr () as * const c_char) ; table . get_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_layers\0" . as_ptr () as * const c_char) ; table . get_navigation_map = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_map\0" . as_ptr () as * const c_char) ; table . get_neighbor_dist = (gd_api . godot_method_bind_get_method) (class_name , "get_neighbor_dist\0" . as_ptr () as * const c_char) ; table . get_next_location = (gd_api . godot_method_bind_get_method) (class_name , "get_next_location\0" . as_ptr () as * const c_char) ; table . get_path_desired_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_path_desired_distance\0" . as_ptr () as * const c_char) ; table . get_path_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_path_max_distance\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . get_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_rid\0" . as_ptr () as * const c_char) ; table . get_target_desired_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_target_desired_distance\0" . as_ptr () as * const c_char) ; table . get_target_location = (gd_api . godot_method_bind_get_method) (class_name , "get_target_location\0" . as_ptr () as * const c_char) ; table . get_time_horizon = (gd_api . godot_method_bind_get_method) (class_name , "get_time_horizon\0" . as_ptr () as * const c_char) ; table . is_navigation_finished = (gd_api . godot_method_bind_get_method) (class_name , "is_navigation_finished\0" . as_ptr () as * const c_char) ; table . is_target_reachable = (gd_api . godot_method_bind_get_method) (class_name , "is_target_reachable\0" . as_ptr () as * const c_char) ; table . is_target_reached = (gd_api . godot_method_bind_get_method) (class_name , "is_target_reached\0" . as_ptr () as * const c_char) ; table . set_agent_height_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_agent_height_offset\0" . as_ptr () as * const c_char) ; table . set_avoidance_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_avoidance_enabled\0" . as_ptr () as * const c_char) ; table . set_ignore_y = (gd_api . godot_method_bind_get_method) (class_name , "set_ignore_y\0" . as_ptr () as * const c_char) ; table . set_max_neighbors = (gd_api . godot_method_bind_get_method) (class_name , "set_max_neighbors\0" . as_ptr () as * const c_char) ; table . set_max_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_max_speed\0" . as_ptr () as * const c_char) ; table . set_navigation = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation\0" . as_ptr () as * const c_char) ; table . set_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_layers\0" . as_ptr () as * const c_char) ; table . set_navigation_map = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_map\0" . as_ptr () as * const c_char) ; table . set_neighbor_dist = (gd_api . godot_method_bind_get_method) (class_name , "set_neighbor_dist\0" . as_ptr () as * const c_char) ; table . set_path_desired_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_path_desired_distance\0" . as_ptr () as * const c_char) ; table . set_path_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_path_max_distance\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; table . set_target_desired_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_target_desired_distance\0" . as_ptr () as * const c_char) ; table . set_target_location = (gd_api . godot_method_bind_get_method) (class_name , "set_target_location\0" . as_ptr () as * const c_char) ; table . set_time_horizon = (gd_api . godot_method_bind_get_method) (class_name , "set_time_horizon\0" . as_ptr () as * const c_char) ; table . set_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_velocity\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::navigation_agent::private::NavigationAgent;
            
            pub(crate) mod navigation_agent_2d {
                # ! [doc = "This module contains types related to the API class [`NavigationAgent2D`][super::NavigationAgent2D]."] pub (crate) mod private { # [doc = "`core class NavigationAgent2D` inherits `Node` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_navigationagent2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`NavigationAgent2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<NavigationAgent2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNavigationAgent2D inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NavigationAgent2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NavigationAgent2D ; impl NavigationAgent2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NavigationAgent2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the distance to the target location, using the agent's global position. The user must set the target location with [`set_target_location`][Self::set_target_location] in order for this to be accurate."] # [doc = ""] # [inline] pub fn distance_to_target (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . distance_to_target ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true` the agent is registered for an RVO avoidance callback on the [`Navigation2DServer`][Navigation2DServer]. When [`set_velocity`][Self::set_velocity] is used and the processing is completed a `safe_velocity` Vector2 is received with a signal connection to `velocity_computed`. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it."] # [doc = ""] # [inline] pub fn avoidance_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_avoidance_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame."] # [doc = ""] # [inline] pub fn get_final_location (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_final_location ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The maximum number of neighbors for the agent to consider."] # [doc = ""] # [inline] pub fn max_neighbors (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_max_neighbors ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum speed that an agent can move."] # [doc = ""] # [inline] pub fn max_speed (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_max_speed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns this agent's current path from start to finish in global coordinates. The path only updates when the target location is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended [`get_next_location`][Self::get_next_location] once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic."] # [doc = ""] # [inline] pub fn get_nav_path (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_nav_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns which index the agent is currently on in the navigation path's [`PoolVector2Array`][PoolArray<Vector2>]."] # [doc = ""] # [inline] pub fn get_nav_path_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_nav_path_index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`Navigation2D`][Navigation2D] node that the agent is using for its navigation system."] # [doc = ""] # [inline] pub fn get_navigation (& self) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_navigation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A bitfield determining all navigation map layers the [`NavigationAgent2D`][NavigationAgent2D] belongs to. On path requests the agent will ignore navmeshes without at least one matching layer."] # [doc = ""] # [inline] pub fn navigation_layers (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_navigation_layers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`RID`][Rid] of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use [`set_navigation_map`][Self::set_navigation_map] to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer."] # [doc = ""] # [inline] pub fn get_navigation_map (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_navigation_map ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The distance to search for other agents."] # [doc = ""] # [inline] pub fn neighbor_dist (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_neighbor_dist ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the next location in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent."] # [doc = ""] # [inline] pub fn get_next_location (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_next_location ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The distance threshold before a path point is considered to be reached. This will allow an agent to not have to hit a path point on the path exactly, but in the area. If this value is set to high the NavigationAgent will skip points on the path which can lead to leaving the navigation mesh. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the next point on each physics frame update."] # [doc = ""] # [inline] pub fn path_desired_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_path_desired_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path."] # [doc = ""] # [inline] pub fn path_max_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_path_max_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The radius of the avoidance agent. This is the \"body\" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [`neighbor_dist`][Self::neighbor_dist]).\nDoes not affect normal pathfinding."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`RID`][Rid] of this agent on the [`Navigation2DServer`][Navigation2DServer]."] # [doc = ""] # [inline] pub fn get_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update."] # [doc = ""] # [inline] pub fn target_desired_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_target_desired_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the user-defined target location (set with [`set_target_location`][Self::set_target_location])."] # [doc = ""] # [inline] pub fn get_target_location (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_target_location ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but the less freedom in choosing its velocities. Must be positive."] # [doc = ""] # [inline] pub fn time_horizon (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . get_time_horizon ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the navigation path's final location has been reached."] # [doc = ""] # [inline] pub fn is_navigation_finished (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . is_navigation_finished ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the target location is reachable. The target location is set using [`set_target_location`][Self::set_target_location]."] # [doc = ""] # [inline] pub fn is_target_reachable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . is_target_reachable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the target location is reached. The target location is set using [`set_target_location`][Self::set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [`get_final_location`][Self::get_final_location]."] # [doc = ""] # [inline] pub fn is_target_reached (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . is_target_reached ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true` the agent is registered for an RVO avoidance callback on the [`Navigation2DServer`][Navigation2DServer]. When [`set_velocity`][Self::set_velocity] is used and the processing is completed a `safe_velocity` Vector2 is received with a signal connection to `velocity_computed`. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it."] # [doc = ""] # [inline] pub fn set_avoidance_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . set_avoidance_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The maximum number of neighbors for the agent to consider."] # [doc = ""] # [inline] pub fn set_max_neighbors (& self , max_neighbors : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . set_max_neighbors ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , max_neighbors as _) ; } } # [doc = "The maximum speed that an agent can move."] # [doc = ""] # [inline] pub fn set_max_speed (& self , max_speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . set_max_speed ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , max_speed as _) ; } } # [doc = "Sets the [`Navigation2D`][Navigation2D] node used by the agent. Useful when you don't want to make the agent a child of a [`Navigation2D`][Navigation2D] node."] # [doc = ""] # [inline] pub fn set_navigation (& self , navigation : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . set_navigation ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , navigation . as_arg_ptr ()) ; } } # [doc = "A bitfield determining all navigation map layers the [`NavigationAgent2D`][NavigationAgent2D] belongs to. On path requests the agent will ignore navmeshes without at least one matching layer."] # [doc = ""] # [inline] pub fn set_navigation_layers (& self , navigation_layers : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . set_navigation_layers ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , navigation_layers as _) ; } } # [doc = "Sets the [`RID`][Rid] of the navigation map this NavigationAgent node should use and also updates the `agent` on the NavigationServer."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn set_navigation_map (& self , navigation_map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . set_navigation_map ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , navigation_map) ; } } # [doc = "The distance to search for other agents."] # [doc = ""] # [inline] pub fn set_neighbor_dist (& self , neighbor_dist : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . set_neighbor_dist ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , neighbor_dist as _) ; } } # [doc = "The distance threshold before a path point is considered to be reached. This will allow an agent to not have to hit a path point on the path exactly, but in the area. If this value is set to high the NavigationAgent will skip points on the path which can lead to leaving the navigation mesh. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the next point on each physics frame update."] # [doc = ""] # [inline] pub fn set_path_desired_distance (& self , desired_distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . set_path_desired_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , desired_distance as _) ; } } # [doc = "The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path."] # [doc = ""] # [inline] pub fn set_path_max_distance (& self , max_speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . set_path_max_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , max_speed as _) ; } } # [doc = "The radius of the avoidance agent. This is the \"body\" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [`neighbor_dist`][Self::neighbor_dist]).\nDoes not affect normal pathfinding."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = "The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update."] # [doc = ""] # [inline] pub fn set_target_desired_distance (& self , desired_distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . set_target_desired_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , desired_distance as _) ; } } # [doc = "Sets the user desired final location. This will clear the current navigation path."] # [doc = ""] # [inline] pub fn set_target_location (& self , location : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . set_target_location ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , location) ; } } # [doc = "The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but the less freedom in choosing its velocities. Must be positive."] # [doc = ""] # [inline] pub fn set_time_horizon (& self , time_horizon : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . set_time_horizon ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , time_horizon as _) ; } } # [doc = "Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the `velocity_computed` signal."] # [doc = ""] # [inline] pub fn set_velocity (& self , velocity : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationAgent2DMethodTable :: get (get_api ()) . set_velocity ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , velocity) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationAgent2D { } unsafe impl GodotObject for NavigationAgent2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "NavigationAgent2D" } } impl QueueFree for NavigationAgent2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for NavigationAgent2D { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationAgent2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for NavigationAgent2D { } unsafe impl SubClass < crate :: generated :: Object > for NavigationAgent2D { } impl Instanciable for NavigationAgent2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { NavigationAgent2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationAgent2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub distance_to_target : * mut sys :: godot_method_bind , pub get_avoidance_enabled : * mut sys :: godot_method_bind , pub get_final_location : * mut sys :: godot_method_bind , pub get_max_neighbors : * mut sys :: godot_method_bind , pub get_max_speed : * mut sys :: godot_method_bind , pub get_nav_path : * mut sys :: godot_method_bind , pub get_nav_path_index : * mut sys :: godot_method_bind , pub get_navigation : * mut sys :: godot_method_bind , pub get_navigation_layers : * mut sys :: godot_method_bind , pub get_navigation_map : * mut sys :: godot_method_bind , pub get_neighbor_dist : * mut sys :: godot_method_bind , pub get_next_location : * mut sys :: godot_method_bind , pub get_path_desired_distance : * mut sys :: godot_method_bind , pub get_path_max_distance : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub get_rid : * mut sys :: godot_method_bind , pub get_target_desired_distance : * mut sys :: godot_method_bind , pub get_target_location : * mut sys :: godot_method_bind , pub get_time_horizon : * mut sys :: godot_method_bind , pub is_navigation_finished : * mut sys :: godot_method_bind , pub is_target_reachable : * mut sys :: godot_method_bind , pub is_target_reached : * mut sys :: godot_method_bind , pub set_avoidance_enabled : * mut sys :: godot_method_bind , pub set_max_neighbors : * mut sys :: godot_method_bind , pub set_max_speed : * mut sys :: godot_method_bind , pub set_navigation : * mut sys :: godot_method_bind , pub set_navigation_layers : * mut sys :: godot_method_bind , pub set_navigation_map : * mut sys :: godot_method_bind , pub set_neighbor_dist : * mut sys :: godot_method_bind , pub set_path_desired_distance : * mut sys :: godot_method_bind , pub set_path_max_distance : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind , pub set_target_desired_distance : * mut sys :: godot_method_bind , pub set_target_location : * mut sys :: godot_method_bind , pub set_time_horizon : * mut sys :: godot_method_bind , pub set_velocity : * mut sys :: godot_method_bind } impl NavigationAgent2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationAgent2DMethodTable = NavigationAgent2DMethodTable { class_constructor : None , distance_to_target : 0 as * mut sys :: godot_method_bind , get_avoidance_enabled : 0 as * mut sys :: godot_method_bind , get_final_location : 0 as * mut sys :: godot_method_bind , get_max_neighbors : 0 as * mut sys :: godot_method_bind , get_max_speed : 0 as * mut sys :: godot_method_bind , get_nav_path : 0 as * mut sys :: godot_method_bind , get_nav_path_index : 0 as * mut sys :: godot_method_bind , get_navigation : 0 as * mut sys :: godot_method_bind , get_navigation_layers : 0 as * mut sys :: godot_method_bind , get_navigation_map : 0 as * mut sys :: godot_method_bind , get_neighbor_dist : 0 as * mut sys :: godot_method_bind , get_next_location : 0 as * mut sys :: godot_method_bind , get_path_desired_distance : 0 as * mut sys :: godot_method_bind , get_path_max_distance : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , get_rid : 0 as * mut sys :: godot_method_bind , get_target_desired_distance : 0 as * mut sys :: godot_method_bind , get_target_location : 0 as * mut sys :: godot_method_bind , get_time_horizon : 0 as * mut sys :: godot_method_bind , is_navigation_finished : 0 as * mut sys :: godot_method_bind , is_target_reachable : 0 as * mut sys :: godot_method_bind , is_target_reached : 0 as * mut sys :: godot_method_bind , set_avoidance_enabled : 0 as * mut sys :: godot_method_bind , set_max_neighbors : 0 as * mut sys :: godot_method_bind , set_max_speed : 0 as * mut sys :: godot_method_bind , set_navigation : 0 as * mut sys :: godot_method_bind , set_navigation_layers : 0 as * mut sys :: godot_method_bind , set_navigation_map : 0 as * mut sys :: godot_method_bind , set_neighbor_dist : 0 as * mut sys :: godot_method_bind , set_path_desired_distance : 0 as * mut sys :: godot_method_bind , set_path_max_distance : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind , set_target_desired_distance : 0 as * mut sys :: godot_method_bind , set_target_location : 0 as * mut sys :: godot_method_bind , set_time_horizon : 0 as * mut sys :: godot_method_bind , set_velocity : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NavigationAgent2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NavigationAgent2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . distance_to_target = (gd_api . godot_method_bind_get_method) (class_name , "distance_to_target\0" . as_ptr () as * const c_char) ; table . get_avoidance_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_avoidance_enabled\0" . as_ptr () as * const c_char) ; table . get_final_location = (gd_api . godot_method_bind_get_method) (class_name , "get_final_location\0" . as_ptr () as * const c_char) ; table . get_max_neighbors = (gd_api . godot_method_bind_get_method) (class_name , "get_max_neighbors\0" . as_ptr () as * const c_char) ; table . get_max_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_max_speed\0" . as_ptr () as * const c_char) ; table . get_nav_path = (gd_api . godot_method_bind_get_method) (class_name , "get_nav_path\0" . as_ptr () as * const c_char) ; table . get_nav_path_index = (gd_api . godot_method_bind_get_method) (class_name , "get_nav_path_index\0" . as_ptr () as * const c_char) ; table . get_navigation = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation\0" . as_ptr () as * const c_char) ; table . get_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_layers\0" . as_ptr () as * const c_char) ; table . get_navigation_map = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_map\0" . as_ptr () as * const c_char) ; table . get_neighbor_dist = (gd_api . godot_method_bind_get_method) (class_name , "get_neighbor_dist\0" . as_ptr () as * const c_char) ; table . get_next_location = (gd_api . godot_method_bind_get_method) (class_name , "get_next_location\0" . as_ptr () as * const c_char) ; table . get_path_desired_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_path_desired_distance\0" . as_ptr () as * const c_char) ; table . get_path_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_path_max_distance\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . get_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_rid\0" . as_ptr () as * const c_char) ; table . get_target_desired_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_target_desired_distance\0" . as_ptr () as * const c_char) ; table . get_target_location = (gd_api . godot_method_bind_get_method) (class_name , "get_target_location\0" . as_ptr () as * const c_char) ; table . get_time_horizon = (gd_api . godot_method_bind_get_method) (class_name , "get_time_horizon\0" . as_ptr () as * const c_char) ; table . is_navigation_finished = (gd_api . godot_method_bind_get_method) (class_name , "is_navigation_finished\0" . as_ptr () as * const c_char) ; table . is_target_reachable = (gd_api . godot_method_bind_get_method) (class_name , "is_target_reachable\0" . as_ptr () as * const c_char) ; table . is_target_reached = (gd_api . godot_method_bind_get_method) (class_name , "is_target_reached\0" . as_ptr () as * const c_char) ; table . set_avoidance_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_avoidance_enabled\0" . as_ptr () as * const c_char) ; table . set_max_neighbors = (gd_api . godot_method_bind_get_method) (class_name , "set_max_neighbors\0" . as_ptr () as * const c_char) ; table . set_max_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_max_speed\0" . as_ptr () as * const c_char) ; table . set_navigation = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation\0" . as_ptr () as * const c_char) ; table . set_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_layers\0" . as_ptr () as * const c_char) ; table . set_navigation_map = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_map\0" . as_ptr () as * const c_char) ; table . set_neighbor_dist = (gd_api . godot_method_bind_get_method) (class_name , "set_neighbor_dist\0" . as_ptr () as * const c_char) ; table . set_path_desired_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_path_desired_distance\0" . as_ptr () as * const c_char) ; table . set_path_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_path_max_distance\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; table . set_target_desired_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_target_desired_distance\0" . as_ptr () as * const c_char) ; table . set_target_location = (gd_api . godot_method_bind_get_method) (class_name , "set_target_location\0" . as_ptr () as * const c_char) ; table . set_time_horizon = (gd_api . godot_method_bind_get_method) (class_name , "set_time_horizon\0" . as_ptr () as * const c_char) ; table . set_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_velocity\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::navigation_agent_2d::private::NavigationAgent2D;
            
            pub mod navigation_mesh {
                # ! [doc = "This module contains types related to the API class [`NavigationMesh`][super::NavigationMesh]."] pub (crate) mod private { # [doc = "`core class NavigationMesh` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`navigation_mesh`][super::navigation_mesh] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_navigationmesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nNavigationMesh inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NavigationMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NavigationMesh ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ParsedGeometryType (pub i64) ; impl ParsedGeometryType { pub const MESH_INSTANCES : ParsedGeometryType = ParsedGeometryType (0i64) ; pub const STATIC_COLLIDERS : ParsedGeometryType = ParsedGeometryType (1i64) ; pub const BOTH : ParsedGeometryType = ParsedGeometryType (2i64) ; pub const MAX : ParsedGeometryType = ParsedGeometryType (3i64) ; } impl From < i64 > for ParsedGeometryType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ParsedGeometryType > for i64 { # [inline] fn from (v : ParsedGeometryType) -> Self { v . 0 } } impl FromVariant for ParsedGeometryType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SamplePartitionType (pub i64) ; impl SamplePartitionType { pub const WATERSHED : SamplePartitionType = SamplePartitionType (0i64) ; pub const MONOTONE : SamplePartitionType = SamplePartitionType (1i64) ; pub const LAYERS : SamplePartitionType = SamplePartitionType (2i64) ; pub const MAX : SamplePartitionType = SamplePartitionType (3i64) ; } impl From < i64 > for SamplePartitionType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SamplePartitionType > for i64 { # [inline] fn from (v : SamplePartitionType) -> Self { v . 0 } } impl FromVariant for SamplePartitionType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SourceGeometryMode (pub i64) ; impl SourceGeometryMode { pub const NAVMESH_CHILDREN : SourceGeometryMode = SourceGeometryMode (0i64) ; pub const GROUPS_WITH_CHILDREN : SourceGeometryMode = SourceGeometryMode (1i64) ; pub const GROUPS_EXPLICIT : SourceGeometryMode = SourceGeometryMode (2i64) ; pub const MAX : SourceGeometryMode = SourceGeometryMode (3i64) ; } impl From < i64 > for SourceGeometryMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SourceGeometryMode > for i64 { # [inline] fn from (v : SourceGeometryMode) -> Self { v . 0 } } impl FromVariant for SourceGeometryMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl NavigationMesh { pub const PARSED_GEOMETRY_MESH_INSTANCES : i64 = 0i64 ; pub const SAMPLE_PARTITION_WATERSHED : i64 = 0i64 ; pub const SOURCE_GEOMETRY_NAVMESH_CHILDREN : i64 = 0i64 ; pub const PARSED_GEOMETRY_STATIC_COLLIDERS : i64 = 1i64 ; pub const SAMPLE_PARTITION_MONOTONE : i64 = 1i64 ; pub const SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN : i64 = 1i64 ; pub const PARSED_GEOMETRY_BOTH : i64 = 2i64 ; pub const SAMPLE_PARTITION_LAYERS : i64 = 2i64 ; pub const SOURCE_GEOMETRY_GROUPS_EXPLICIT : i64 = 2i64 ; pub const PARSED_GEOMETRY_MAX : i64 = 3i64 ; pub const SAMPLE_PARTITION_MAX : i64 = 3i64 ; pub const SOURCE_GEOMETRY_MAX : i64 = 3i64 ; } impl NavigationMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NavigationMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a polygon using the indices of the vertices you get when calling [`get_vertices`][Self::get_vertices]."] # [doc = ""] # [inline] pub fn add_polygon (& self , polygon : PoolArray < i32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . add_polygon ; let ret = crate :: icalls :: icallvar__i32arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } # [doc = "Clears the array of polygons, but it doesn't clear the array of vertices."] # [doc = ""] # [inline] pub fn clear_polygons (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . clear_polygons ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Initializes the navigation mesh by setting the vertices and indices according to a [`Mesh`][Mesh]."] # [doc = ""] # [inline] pub fn create_from_mesh (& self , mesh : impl AsArg < crate :: generated :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . create_from_mesh ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr ()) ; } } # [doc = "The minimum floor to ceiling height that will still allow the floor area to be considered walkable.\n**Note:** While baking, this value will be rounded up to the nearest multiple of [`cell_height`][Self::cell_height]."] # [doc = ""] # [inline] pub fn agent_height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_agent_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The minimum ledge height that is considered to still be traversable.\n**Note:** While baking, this value will be rounded down to the nearest multiple of [`cell_height`][Self::cell_height]."] # [doc = ""] # [inline] pub fn agent_max_climb (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_agent_max_climb ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum slope that is considered walkable, in degrees."] # [doc = ""] # [inline] pub fn agent_max_slope (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_agent_max_slope ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The distance to erode/shrink the walkable area of the heightfield away from obstructions.\n**Note:** While baking, this value will be rounded up to the nearest multiple of [`cell_size`][Self::cell_size]."] # [doc = ""] # [inline] pub fn agent_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_agent_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The Y axis cell size to use for fields."] # [doc = ""] # [inline] pub fn cell_height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_cell_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The XZ plane cell size to use for fields."] # [doc = ""] # [inline] pub fn cell_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_cell_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The physics layers to scan for static colliders.\nOnly used when [`geometry_parsed_geometry_type`][Self::geometry_parsed_geometry_type] is [`PARSED_GEOMETRY_STATIC_COLLIDERS`][Self::PARSED_GEOMETRY_STATIC_COLLIDERS] or [`PARSED_GEOMETRY_BOTH`][Self::PARSED_GEOMETRY_BOTH]."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns whether the specified `bit` of the [`geometry_collision_mask`][Self::geometry_collision_mask] is set."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The sampling distance to use when generating the detail mesh, in cell unit."] # [doc = ""] # [inline] pub fn detail_sample_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_detail_sample_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum distance the detail mesh surface should deviate from heightfield, in cell unit."] # [doc = ""] # [inline] pub fn detail_sample_max_error (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_detail_sample_max_error ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum distance a simplfied contour's border edges should deviate the original raw contour."] # [doc = ""] # [inline] pub fn edge_max_error (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_edge_max_error ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum allowed length for contour edges along the border of the mesh.\n**Note:** While baking, this value will be rounded up to the nearest multiple of [`cell_size`][Self::cell_size]."] # [doc = ""] # [inline] pub fn edge_max_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_edge_max_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If the baking [`AABB`][Aabb] has a volume the navigation mesh baking will be restricted to its enclosing area."] # [doc = ""] # [inline] pub fn filter_baking_aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_filter_baking_aabb ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The position offset applied to the [`filter_baking_aabb`][Self::filter_baking_aabb] [`AABB`][Aabb]."] # [doc = ""] # [inline] pub fn filter_baking_aabb_offset (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_filter_baking_aabb_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, marks spans that are ledges as non-walkable."] # [doc = ""] # [inline] pub fn filter_ledge_spans (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_filter_ledge_spans ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, marks non-walkable spans as walkable if their maximum is within [`agent_max_climb`][Self::agent_max_climb] of a walkable neighbor."] # [doc = ""] # [inline] pub fn filter_low_hanging_obstacles (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_filter_low_hanging_obstacles ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, marks walkable spans as not walkable if the clearance above the span is less than [`agent_height`][Self::agent_height]."] # [doc = ""] # [inline] pub fn filter_walkable_low_height_spans (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_filter_walkable_low_height_spans ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Determines which type of nodes will be parsed as geometry. See [`ParsedGeometryType`][ParsedGeometryType] for possible values."] # [doc = ""] # [inline] pub fn parsed_geometry_type (& self) -> crate :: generated :: navigation_mesh :: ParsedGeometryType { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_parsed_geometry_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: navigation_mesh :: ParsedGeometryType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [`PoolIntArray`][PoolArray<i32>] containing the indices of the vertices of a created polygon."] # [doc = ""] # [inline] pub fn get_polygon (& self , idx : i64) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of polygons in the navigation mesh."] # [doc = ""] # [inline] pub fn get_polygon_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_polygon_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Any regions with a size smaller than this will be merged with larger regions if possible.\n**Note:** This value will be squared to calculate the number of cells. For example, a value of 20 will set the number of cells to 400."] # [doc = ""] # [inline] pub fn region_merge_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_region_merge_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The minimum size of a region for it to be created.\n**Note:** This value will be squared to calculate the minimum number of cells allowed to form isolated island areas. For example, a value of 8 will set the number of cells to 64."] # [doc = ""] # [inline] pub fn region_min_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_region_min_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Partitioning algorithm for creating the navigation mesh polys. See [`SamplePartitionType`][SamplePartitionType] for possible values."] # [doc = ""] # [inline] pub fn sample_partition_type (& self) -> crate :: generated :: navigation_mesh :: SamplePartitionType { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_sample_partition_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: navigation_mesh :: SamplePartitionType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The source of the geometry used when baking. See [`SourceGeometryMode`][SourceGeometryMode] for possible values."] # [doc = ""] # [inline] pub fn source_geometry_mode (& self) -> crate :: generated :: navigation_mesh :: SourceGeometryMode { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_source_geometry_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: navigation_mesh :: SourceGeometryMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The name of the group to scan for geometry.\nOnly used when [`geometry_source_geometry_mode`][Self::geometry_source_geometry_mode] is [`SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN`][Self::SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] or [`SOURCE_GEOMETRY_GROUPS_EXPLICIT`][Self::SOURCE_GEOMETRY_GROUPS_EXPLICIT]."] # [doc = ""] # [inline] pub fn source_group_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_source_group_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [`PoolVector3Array`][PoolArray<Vector3>] containing all the vertices being used to create the polygons."] # [doc = ""] # [inline] pub fn vertices (& self) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_vertices ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process."] # [doc = ""] # [inline] pub fn verts_per_poly (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . get_verts_per_poly ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The minimum floor to ceiling height that will still allow the floor area to be considered walkable.\n**Note:** While baking, this value will be rounded up to the nearest multiple of [`cell_height`][Self::cell_height]."] # [doc = ""] # [inline] pub fn set_agent_height (& self , agent_height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_agent_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , agent_height as _) ; } } # [doc = "The minimum ledge height that is considered to still be traversable.\n**Note:** While baking, this value will be rounded down to the nearest multiple of [`cell_height`][Self::cell_height]."] # [doc = ""] # [inline] pub fn set_agent_max_climb (& self , agent_max_climb : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_agent_max_climb ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , agent_max_climb as _) ; } } # [doc = "The maximum slope that is considered walkable, in degrees."] # [doc = ""] # [inline] pub fn set_agent_max_slope (& self , agent_max_slope : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_agent_max_slope ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , agent_max_slope as _) ; } } # [doc = "The distance to erode/shrink the walkable area of the heightfield away from obstructions.\n**Note:** While baking, this value will be rounded up to the nearest multiple of [`cell_size`][Self::cell_size]."] # [doc = ""] # [inline] pub fn set_agent_radius (& self , agent_radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_agent_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , agent_radius as _) ; } } # [doc = "The Y axis cell size to use for fields."] # [doc = ""] # [inline] pub fn set_cell_height (& self , cell_height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_cell_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , cell_height as _) ; } } # [doc = "The XZ plane cell size to use for fields."] # [doc = ""] # [inline] pub fn set_cell_size (& self , cell_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_cell_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , cell_size as _) ; } } # [doc = "The physics layers to scan for static colliders.\nOnly used when [`geometry_parsed_geometry_type`][Self::geometry_parsed_geometry_type] is [`PARSED_GEOMETRY_STATIC_COLLIDERS`][Self::PARSED_GEOMETRY_STATIC_COLLIDERS] or [`PARSED_GEOMETRY_BOTH`][Self::PARSED_GEOMETRY_BOTH]."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "If `value` is `true`, sets the specified `bit` in the [`geometry_collision_mask`][Self::geometry_collision_mask].\nIf `value` is `false`, clears the specified `bit` in the [`geometry_collision_mask`][Self::geometry_collision_mask]."] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = "The sampling distance to use when generating the detail mesh, in cell unit."] # [doc = ""] # [inline] pub fn set_detail_sample_distance (& self , detail_sample_dist : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_detail_sample_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , detail_sample_dist as _) ; } } # [doc = "The maximum distance the detail mesh surface should deviate from heightfield, in cell unit."] # [doc = ""] # [inline] pub fn set_detail_sample_max_error (& self , detail_sample_max_error : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_detail_sample_max_error ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , detail_sample_max_error as _) ; } } # [doc = "The maximum distance a simplfied contour's border edges should deviate the original raw contour."] # [doc = ""] # [inline] pub fn set_edge_max_error (& self , edge_max_error : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_edge_max_error ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , edge_max_error as _) ; } } # [doc = "The maximum allowed length for contour edges along the border of the mesh.\n**Note:** While baking, this value will be rounded up to the nearest multiple of [`cell_size`][Self::cell_size]."] # [doc = ""] # [inline] pub fn set_edge_max_length (& self , edge_max_length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_edge_max_length ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , edge_max_length as _) ; } } # [doc = "If the baking [`AABB`][Aabb] has a volume the navigation mesh baking will be restricted to its enclosing area."] # [doc = ""] # [inline] pub fn set_filter_baking_aabb (& self , baking_aabb : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_filter_baking_aabb ; let ret = crate :: icalls :: icallvar__aabb (method_bind , self . this . sys () . as_ptr () , baking_aabb) ; } } # [doc = "The position offset applied to the [`filter_baking_aabb`][Self::filter_baking_aabb] [`AABB`][Aabb]."] # [doc = ""] # [inline] pub fn set_filter_baking_aabb_offset (& self , baking_aabb_offset : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_filter_baking_aabb_offset ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , baking_aabb_offset) ; } } # [doc = "If `true`, marks spans that are ledges as non-walkable."] # [doc = ""] # [inline] pub fn set_filter_ledge_spans (& self , filter_ledge_spans : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_filter_ledge_spans ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , filter_ledge_spans as _) ; } } # [doc = "If `true`, marks non-walkable spans as walkable if their maximum is within [`agent_max_climb`][Self::agent_max_climb] of a walkable neighbor."] # [doc = ""] # [inline] pub fn set_filter_low_hanging_obstacles (& self , filter_low_hanging_obstacles : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_filter_low_hanging_obstacles ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , filter_low_hanging_obstacles as _) ; } } # [doc = "If `true`, marks walkable spans as not walkable if the clearance above the span is less than [`agent_height`][Self::agent_height]."] # [doc = ""] # [inline] pub fn set_filter_walkable_low_height_spans (& self , filter_walkable_low_height_spans : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_filter_walkable_low_height_spans ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , filter_walkable_low_height_spans as _) ; } } # [doc = "Determines which type of nodes will be parsed as geometry. See [`ParsedGeometryType`][ParsedGeometryType] for possible values."] # [doc = ""] # [inline] pub fn set_parsed_geometry_type (& self , geometry_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_parsed_geometry_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , geometry_type as _) ; } } # [doc = "Any regions with a size smaller than this will be merged with larger regions if possible.\n**Note:** This value will be squared to calculate the number of cells. For example, a value of 20 will set the number of cells to 400."] # [doc = ""] # [inline] pub fn set_region_merge_size (& self , region_merge_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_region_merge_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , region_merge_size as _) ; } } # [doc = "The minimum size of a region for it to be created.\n**Note:** This value will be squared to calculate the minimum number of cells allowed to form isolated island areas. For example, a value of 8 will set the number of cells to 64."] # [doc = ""] # [inline] pub fn set_region_min_size (& self , region_min_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_region_min_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , region_min_size as _) ; } } # [doc = "Partitioning algorithm for creating the navigation mesh polys. See [`SamplePartitionType`][SamplePartitionType] for possible values."] # [doc = ""] # [inline] pub fn set_sample_partition_type (& self , sample_partition_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_sample_partition_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , sample_partition_type as _) ; } } # [doc = "The source of the geometry used when baking. See [`SourceGeometryMode`][SourceGeometryMode] for possible values."] # [doc = ""] # [inline] pub fn set_source_geometry_mode (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_source_geometry_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "The name of the group to scan for geometry.\nOnly used when [`geometry_source_geometry_mode`][Self::geometry_source_geometry_mode] is [`SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN`][Self::SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] or [`SOURCE_GEOMETRY_GROUPS_EXPLICIT`][Self::SOURCE_GEOMETRY_GROUPS_EXPLICIT]."] # [doc = ""] # [inline] pub fn set_source_group_name (& self , mask : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_source_group_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , mask . into ()) ; } } # [doc = "Sets the vertices that can be then indexed to create polygons with the [`add_polygon`][Self::add_polygon] method."] # [doc = ""] # [inline] pub fn set_vertices (& self , vertices : PoolArray < Vector3 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_vertices ; let ret = crate :: icalls :: icallvar__vec3arr (method_bind , self . this . sys () . as_ptr () , vertices) ; } } # [doc = "The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process."] # [doc = ""] # [inline] pub fn set_verts_per_poly (& self , verts_per_poly : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshMethodTable :: get (get_api ()) . set_verts_per_poly ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , verts_per_poly as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationMesh { } unsafe impl GodotObject for NavigationMesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NavigationMesh" } } impl std :: ops :: Deref for NavigationMesh { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for NavigationMesh { } unsafe impl SubClass < crate :: generated :: Reference > for NavigationMesh { } unsafe impl SubClass < crate :: generated :: Object > for NavigationMesh { } impl Instanciable for NavigationMesh { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { NavigationMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_polygon : * mut sys :: godot_method_bind , pub clear_polygons : * mut sys :: godot_method_bind , pub create_from_mesh : * mut sys :: godot_method_bind , pub get_agent_height : * mut sys :: godot_method_bind , pub get_agent_max_climb : * mut sys :: godot_method_bind , pub get_agent_max_slope : * mut sys :: godot_method_bind , pub get_agent_radius : * mut sys :: godot_method_bind , pub get_cell_height : * mut sys :: godot_method_bind , pub get_cell_size : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_detail_sample_distance : * mut sys :: godot_method_bind , pub get_detail_sample_max_error : * mut sys :: godot_method_bind , pub get_edge_max_error : * mut sys :: godot_method_bind , pub get_edge_max_length : * mut sys :: godot_method_bind , pub get_filter_baking_aabb : * mut sys :: godot_method_bind , pub get_filter_baking_aabb_offset : * mut sys :: godot_method_bind , pub get_filter_ledge_spans : * mut sys :: godot_method_bind , pub get_filter_low_hanging_obstacles : * mut sys :: godot_method_bind , pub get_filter_walkable_low_height_spans : * mut sys :: godot_method_bind , pub get_parsed_geometry_type : * mut sys :: godot_method_bind , pub get_polygon : * mut sys :: godot_method_bind , pub get_polygon_count : * mut sys :: godot_method_bind , pub get_region_merge_size : * mut sys :: godot_method_bind , pub get_region_min_size : * mut sys :: godot_method_bind , pub get_sample_partition_type : * mut sys :: godot_method_bind , pub get_source_geometry_mode : * mut sys :: godot_method_bind , pub get_source_group_name : * mut sys :: godot_method_bind , pub get_vertices : * mut sys :: godot_method_bind , pub get_verts_per_poly : * mut sys :: godot_method_bind , pub set_agent_height : * mut sys :: godot_method_bind , pub set_agent_max_climb : * mut sys :: godot_method_bind , pub set_agent_max_slope : * mut sys :: godot_method_bind , pub set_agent_radius : * mut sys :: godot_method_bind , pub set_cell_height : * mut sys :: godot_method_bind , pub set_cell_size : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_detail_sample_distance : * mut sys :: godot_method_bind , pub set_detail_sample_max_error : * mut sys :: godot_method_bind , pub set_edge_max_error : * mut sys :: godot_method_bind , pub set_edge_max_length : * mut sys :: godot_method_bind , pub set_filter_baking_aabb : * mut sys :: godot_method_bind , pub set_filter_baking_aabb_offset : * mut sys :: godot_method_bind , pub set_filter_ledge_spans : * mut sys :: godot_method_bind , pub set_filter_low_hanging_obstacles : * mut sys :: godot_method_bind , pub set_filter_walkable_low_height_spans : * mut sys :: godot_method_bind , pub set_parsed_geometry_type : * mut sys :: godot_method_bind , pub set_region_merge_size : * mut sys :: godot_method_bind , pub set_region_min_size : * mut sys :: godot_method_bind , pub set_sample_partition_type : * mut sys :: godot_method_bind , pub set_source_geometry_mode : * mut sys :: godot_method_bind , pub set_source_group_name : * mut sys :: godot_method_bind , pub set_vertices : * mut sys :: godot_method_bind , pub set_verts_per_poly : * mut sys :: godot_method_bind } impl NavigationMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationMeshMethodTable = NavigationMeshMethodTable { class_constructor : None , add_polygon : 0 as * mut sys :: godot_method_bind , clear_polygons : 0 as * mut sys :: godot_method_bind , create_from_mesh : 0 as * mut sys :: godot_method_bind , get_agent_height : 0 as * mut sys :: godot_method_bind , get_agent_max_climb : 0 as * mut sys :: godot_method_bind , get_agent_max_slope : 0 as * mut sys :: godot_method_bind , get_agent_radius : 0 as * mut sys :: godot_method_bind , get_cell_height : 0 as * mut sys :: godot_method_bind , get_cell_size : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_detail_sample_distance : 0 as * mut sys :: godot_method_bind , get_detail_sample_max_error : 0 as * mut sys :: godot_method_bind , get_edge_max_error : 0 as * mut sys :: godot_method_bind , get_edge_max_length : 0 as * mut sys :: godot_method_bind , get_filter_baking_aabb : 0 as * mut sys :: godot_method_bind , get_filter_baking_aabb_offset : 0 as * mut sys :: godot_method_bind , get_filter_ledge_spans : 0 as * mut sys :: godot_method_bind , get_filter_low_hanging_obstacles : 0 as * mut sys :: godot_method_bind , get_filter_walkable_low_height_spans : 0 as * mut sys :: godot_method_bind , get_parsed_geometry_type : 0 as * mut sys :: godot_method_bind , get_polygon : 0 as * mut sys :: godot_method_bind , get_polygon_count : 0 as * mut sys :: godot_method_bind , get_region_merge_size : 0 as * mut sys :: godot_method_bind , get_region_min_size : 0 as * mut sys :: godot_method_bind , get_sample_partition_type : 0 as * mut sys :: godot_method_bind , get_source_geometry_mode : 0 as * mut sys :: godot_method_bind , get_source_group_name : 0 as * mut sys :: godot_method_bind , get_vertices : 0 as * mut sys :: godot_method_bind , get_verts_per_poly : 0 as * mut sys :: godot_method_bind , set_agent_height : 0 as * mut sys :: godot_method_bind , set_agent_max_climb : 0 as * mut sys :: godot_method_bind , set_agent_max_slope : 0 as * mut sys :: godot_method_bind , set_agent_radius : 0 as * mut sys :: godot_method_bind , set_cell_height : 0 as * mut sys :: godot_method_bind , set_cell_size : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_detail_sample_distance : 0 as * mut sys :: godot_method_bind , set_detail_sample_max_error : 0 as * mut sys :: godot_method_bind , set_edge_max_error : 0 as * mut sys :: godot_method_bind , set_edge_max_length : 0 as * mut sys :: godot_method_bind , set_filter_baking_aabb : 0 as * mut sys :: godot_method_bind , set_filter_baking_aabb_offset : 0 as * mut sys :: godot_method_bind , set_filter_ledge_spans : 0 as * mut sys :: godot_method_bind , set_filter_low_hanging_obstacles : 0 as * mut sys :: godot_method_bind , set_filter_walkable_low_height_spans : 0 as * mut sys :: godot_method_bind , set_parsed_geometry_type : 0 as * mut sys :: godot_method_bind , set_region_merge_size : 0 as * mut sys :: godot_method_bind , set_region_min_size : 0 as * mut sys :: godot_method_bind , set_sample_partition_type : 0 as * mut sys :: godot_method_bind , set_source_geometry_mode : 0 as * mut sys :: godot_method_bind , set_source_group_name : 0 as * mut sys :: godot_method_bind , set_vertices : 0 as * mut sys :: godot_method_bind , set_verts_per_poly : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NavigationMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NavigationMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_polygon = (gd_api . godot_method_bind_get_method) (class_name , "add_polygon\0" . as_ptr () as * const c_char) ; table . clear_polygons = (gd_api . godot_method_bind_get_method) (class_name , "clear_polygons\0" . as_ptr () as * const c_char) ; table . create_from_mesh = (gd_api . godot_method_bind_get_method) (class_name , "create_from_mesh\0" . as_ptr () as * const c_char) ; table . get_agent_height = (gd_api . godot_method_bind_get_method) (class_name , "get_agent_height\0" . as_ptr () as * const c_char) ; table . get_agent_max_climb = (gd_api . godot_method_bind_get_method) (class_name , "get_agent_max_climb\0" . as_ptr () as * const c_char) ; table . get_agent_max_slope = (gd_api . godot_method_bind_get_method) (class_name , "get_agent_max_slope\0" . as_ptr () as * const c_char) ; table . get_agent_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_agent_radius\0" . as_ptr () as * const c_char) ; table . get_cell_height = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_height\0" . as_ptr () as * const c_char) ; table . get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_size\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_detail_sample_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_detail_sample_distance\0" . as_ptr () as * const c_char) ; table . get_detail_sample_max_error = (gd_api . godot_method_bind_get_method) (class_name , "get_detail_sample_max_error\0" . as_ptr () as * const c_char) ; table . get_edge_max_error = (gd_api . godot_method_bind_get_method) (class_name , "get_edge_max_error\0" . as_ptr () as * const c_char) ; table . get_edge_max_length = (gd_api . godot_method_bind_get_method) (class_name , "get_edge_max_length\0" . as_ptr () as * const c_char) ; table . get_filter_baking_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_filter_baking_aabb\0" . as_ptr () as * const c_char) ; table . get_filter_baking_aabb_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_filter_baking_aabb_offset\0" . as_ptr () as * const c_char) ; table . get_filter_ledge_spans = (gd_api . godot_method_bind_get_method) (class_name , "get_filter_ledge_spans\0" . as_ptr () as * const c_char) ; table . get_filter_low_hanging_obstacles = (gd_api . godot_method_bind_get_method) (class_name , "get_filter_low_hanging_obstacles\0" . as_ptr () as * const c_char) ; table . get_filter_walkable_low_height_spans = (gd_api . godot_method_bind_get_method) (class_name , "get_filter_walkable_low_height_spans\0" . as_ptr () as * const c_char) ; table . get_parsed_geometry_type = (gd_api . godot_method_bind_get_method) (class_name , "get_parsed_geometry_type\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . get_polygon_count = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon_count\0" . as_ptr () as * const c_char) ; table . get_region_merge_size = (gd_api . godot_method_bind_get_method) (class_name , "get_region_merge_size\0" . as_ptr () as * const c_char) ; table . get_region_min_size = (gd_api . godot_method_bind_get_method) (class_name , "get_region_min_size\0" . as_ptr () as * const c_char) ; table . get_sample_partition_type = (gd_api . godot_method_bind_get_method) (class_name , "get_sample_partition_type\0" . as_ptr () as * const c_char) ; table . get_source_geometry_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_source_geometry_mode\0" . as_ptr () as * const c_char) ; table . get_source_group_name = (gd_api . godot_method_bind_get_method) (class_name , "get_source_group_name\0" . as_ptr () as * const c_char) ; table . get_vertices = (gd_api . godot_method_bind_get_method) (class_name , "get_vertices\0" . as_ptr () as * const c_char) ; table . get_verts_per_poly = (gd_api . godot_method_bind_get_method) (class_name , "get_verts_per_poly\0" . as_ptr () as * const c_char) ; table . set_agent_height = (gd_api . godot_method_bind_get_method) (class_name , "set_agent_height\0" . as_ptr () as * const c_char) ; table . set_agent_max_climb = (gd_api . godot_method_bind_get_method) (class_name , "set_agent_max_climb\0" . as_ptr () as * const c_char) ; table . set_agent_max_slope = (gd_api . godot_method_bind_get_method) (class_name , "set_agent_max_slope\0" . as_ptr () as * const c_char) ; table . set_agent_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_agent_radius\0" . as_ptr () as * const c_char) ; table . set_cell_height = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_height\0" . as_ptr () as * const c_char) ; table . set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_size\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_detail_sample_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_detail_sample_distance\0" . as_ptr () as * const c_char) ; table . set_detail_sample_max_error = (gd_api . godot_method_bind_get_method) (class_name , "set_detail_sample_max_error\0" . as_ptr () as * const c_char) ; table . set_edge_max_error = (gd_api . godot_method_bind_get_method) (class_name , "set_edge_max_error\0" . as_ptr () as * const c_char) ; table . set_edge_max_length = (gd_api . godot_method_bind_get_method) (class_name , "set_edge_max_length\0" . as_ptr () as * const c_char) ; table . set_filter_baking_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_baking_aabb\0" . as_ptr () as * const c_char) ; table . set_filter_baking_aabb_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_baking_aabb_offset\0" . as_ptr () as * const c_char) ; table . set_filter_ledge_spans = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_ledge_spans\0" . as_ptr () as * const c_char) ; table . set_filter_low_hanging_obstacles = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_low_hanging_obstacles\0" . as_ptr () as * const c_char) ; table . set_filter_walkable_low_height_spans = (gd_api . godot_method_bind_get_method) (class_name , "set_filter_walkable_low_height_spans\0" . as_ptr () as * const c_char) ; table . set_parsed_geometry_type = (gd_api . godot_method_bind_get_method) (class_name , "set_parsed_geometry_type\0" . as_ptr () as * const c_char) ; table . set_region_merge_size = (gd_api . godot_method_bind_get_method) (class_name , "set_region_merge_size\0" . as_ptr () as * const c_char) ; table . set_region_min_size = (gd_api . godot_method_bind_get_method) (class_name , "set_region_min_size\0" . as_ptr () as * const c_char) ; table . set_sample_partition_type = (gd_api . godot_method_bind_get_method) (class_name , "set_sample_partition_type\0" . as_ptr () as * const c_char) ; table . set_source_geometry_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_source_geometry_mode\0" . as_ptr () as * const c_char) ; table . set_source_group_name = (gd_api . godot_method_bind_get_method) (class_name , "set_source_group_name\0" . as_ptr () as * const c_char) ; table . set_vertices = (gd_api . godot_method_bind_get_method) (class_name , "set_vertices\0" . as_ptr () as * const c_char) ; table . set_verts_per_poly = (gd_api . godot_method_bind_get_method) (class_name , "set_verts_per_poly\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::navigation_mesh::private::NavigationMesh;
            
            pub(crate) mod navigation_mesh_generator {
                # ! [doc = "This module contains types related to the API class [`NavigationMeshGenerator`][super::NavigationMeshGenerator]."] pub (crate) mod private { # [doc = "`core singleton class NavigationMeshGenerator` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_navigationmeshgenerator.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nNavigationMeshGenerator inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NavigationMeshGenerator { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NavigationMeshGenerator ; impl NavigationMeshGenerator { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("NavigationMeshGenerator\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Bakes navigation data to the provided `nav_mesh` by parsing child nodes under the provided `root_node` or a specific group of nodes for potential source geometry. The parse behavior can be controlled with the [`NavigationMesh.geometry_parsed_geometry_type`][NavigationMesh::geometry_parsed_geometry_type] and [`NavigationMesh.geometry_source_geometry_mode`][NavigationMesh::geometry_source_geometry_mode] properties on the [`NavigationMesh`][NavigationMesh] resource."] # [doc = ""] # [inline] pub fn bake (& self , nav_mesh : impl AsArg < crate :: generated :: NavigationMesh > , root_node : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshGeneratorMethodTable :: get (get_api ()) . bake ; let ret = crate :: icalls :: icallvar__obj_obj (method_bind , self . this . sys () . as_ptr () , nav_mesh . as_arg_ptr () , root_node . as_arg_ptr ()) ; } } # [doc = "Removes all polygons and vertices from the provided `nav_mesh` resource."] # [doc = ""] # [inline] pub fn clear (& self , nav_mesh : impl AsArg < crate :: generated :: NavigationMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshGeneratorMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , nav_mesh . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationMeshGenerator { } unsafe impl GodotObject for NavigationMeshGenerator { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "NavigationMeshGenerator" } } impl std :: ops :: Deref for NavigationMeshGenerator { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationMeshGenerator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for NavigationMeshGenerator { } unsafe impl Send for NavigationMeshGenerator { } unsafe impl Sync for NavigationMeshGenerator { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationMeshGeneratorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub bake : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind } impl NavigationMeshGeneratorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationMeshGeneratorMethodTable = NavigationMeshGeneratorMethodTable { class_constructor : None , bake : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NavigationMeshGeneratorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NavigationMeshGenerator\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . bake = (gd_api . godot_method_bind_get_method) (class_name , "bake\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::navigation_mesh_generator::private::NavigationMeshGenerator;
            
            pub(crate) mod navigation_mesh_instance {
                # ! [doc = "This module contains types related to the API class [`NavigationMeshInstance`][super::NavigationMeshInstance]."] pub (crate) mod private { # [doc = "`core class NavigationMeshInstance` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_navigationmeshinstance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`NavigationMeshInstance` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<NavigationMeshInstance>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNavigationMeshInstance inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NavigationMeshInstance { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NavigationMeshInstance ; impl NavigationMeshInstance { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NavigationMeshInstanceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Bakes the [`NavigationMesh`][NavigationMesh]. If `on_thread` is set to `true` (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [`NavigationMesh`][NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as HTML5 with threads disabled).\n# Default Arguments\n* `on_thread` - `true`"] # [doc = ""] # [inline] pub fn bake_navigation_mesh (& self , on_thread : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . bake_navigation_mesh ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , on_thread as _) ; } } # [doc = "When pathfinding enters this region's navmesh from another regions navmesh the `enter_cost` value is added to the path distance for determining the shortest path."] # [doc = ""] # [inline] pub fn enter_cost (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . get_enter_cost ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "A bitfield determining all navigation map layers the [`NavigationMesh`][NavigationMesh] belongs to. On path requests with [`NavigationServer.map_get_path`][NavigationServer::map_get_path] navmeshes without matching layers will be ignored and the navigation map will only proximity merge different navmeshes with matching layers."] # [doc = ""] # [inline] pub fn navigation_layers (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . get_navigation_layers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The [`NavigationMesh`][NavigationMesh] resource to use."] # [doc = ""] # [inline] pub fn navigation_mesh (& self) -> Option < Ref < crate :: generated :: NavigationMesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . get_navigation_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: NavigationMesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`RID`][Rid] of this region on the [`NavigationServer`][NavigationServer]. Combined with [`NavigationServer.map_get_closest_point_owner`][NavigationServer::map_get_closest_point_owner] can be used to identify the [`NavigationMeshInstance`][NavigationMeshInstance] closest to a point on the merged navigation map."] # [doc = ""] # [inline] pub fn get_region_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . get_region_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "When pathfinding moves inside this region's navmesh the traveled distances are multiplied with `travel_cost` for determining the shortest path."] # [doc = ""] # [inline] pub fn travel_cost (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . get_travel_cost ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Determines if the [`NavigationMeshInstance`][NavigationMeshInstance] is enabled or disabled."] # [doc = ""] # [inline] pub fn is_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . is_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Determines if the [`NavigationMeshInstance`][NavigationMeshInstance] is enabled or disabled."] # [doc = ""] # [inline] pub fn set_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . set_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "When pathfinding enters this region's navmesh from another regions navmesh the `enter_cost` value is added to the path distance for determining the shortest path."] # [doc = ""] # [inline] pub fn set_enter_cost (& self , enter_cost : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . set_enter_cost ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , enter_cost as _) ; } } # [doc = "A bitfield determining all navigation map layers the [`NavigationMesh`][NavigationMesh] belongs to. On path requests with [`NavigationServer.map_get_path`][NavigationServer::map_get_path] navmeshes without matching layers will be ignored and the navigation map will only proximity merge different navmeshes with matching layers."] # [doc = ""] # [inline] pub fn set_navigation_layers (& self , navigation_layers : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . set_navigation_layers ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , navigation_layers as _) ; } } # [doc = "The [`NavigationMesh`][NavigationMesh] resource to use."] # [doc = ""] # [inline] pub fn set_navigation_mesh (& self , navmesh : impl AsArg < crate :: generated :: NavigationMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . set_navigation_mesh ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , navmesh . as_arg_ptr ()) ; } } # [doc = "When pathfinding moves inside this region's navmesh the traveled distances are multiplied with `travel_cost` for determining the shortest path."] # [doc = ""] # [inline] pub fn set_travel_cost (& self , travel_cost : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationMeshInstanceMethodTable :: get (get_api ()) . set_travel_cost ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , travel_cost as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationMeshInstance { } unsafe impl GodotObject for NavigationMeshInstance { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "NavigationMeshInstance" } } impl QueueFree for NavigationMeshInstance { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for NavigationMeshInstance { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationMeshInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for NavigationMeshInstance { } unsafe impl SubClass < crate :: generated :: Node > for NavigationMeshInstance { } unsafe impl SubClass < crate :: generated :: Object > for NavigationMeshInstance { } impl Instanciable for NavigationMeshInstance { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { NavigationMeshInstance :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationMeshInstanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub bake_navigation_mesh : * mut sys :: godot_method_bind , pub get_enter_cost : * mut sys :: godot_method_bind , pub get_navigation_layers : * mut sys :: godot_method_bind , pub get_navigation_mesh : * mut sys :: godot_method_bind , pub get_region_rid : * mut sys :: godot_method_bind , pub get_travel_cost : * mut sys :: godot_method_bind , pub is_enabled : * mut sys :: godot_method_bind , pub set_enabled : * mut sys :: godot_method_bind , pub set_enter_cost : * mut sys :: godot_method_bind , pub set_navigation_layers : * mut sys :: godot_method_bind , pub set_navigation_mesh : * mut sys :: godot_method_bind , pub set_travel_cost : * mut sys :: godot_method_bind } impl NavigationMeshInstanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationMeshInstanceMethodTable = NavigationMeshInstanceMethodTable { class_constructor : None , bake_navigation_mesh : 0 as * mut sys :: godot_method_bind , get_enter_cost : 0 as * mut sys :: godot_method_bind , get_navigation_layers : 0 as * mut sys :: godot_method_bind , get_navigation_mesh : 0 as * mut sys :: godot_method_bind , get_region_rid : 0 as * mut sys :: godot_method_bind , get_travel_cost : 0 as * mut sys :: godot_method_bind , is_enabled : 0 as * mut sys :: godot_method_bind , set_enabled : 0 as * mut sys :: godot_method_bind , set_enter_cost : 0 as * mut sys :: godot_method_bind , set_navigation_layers : 0 as * mut sys :: godot_method_bind , set_navigation_mesh : 0 as * mut sys :: godot_method_bind , set_travel_cost : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NavigationMeshInstanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NavigationMeshInstance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . bake_navigation_mesh = (gd_api . godot_method_bind_get_method) (class_name , "bake_navigation_mesh\0" . as_ptr () as * const c_char) ; table . get_enter_cost = (gd_api . godot_method_bind_get_method) (class_name , "get_enter_cost\0" . as_ptr () as * const c_char) ; table . get_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_layers\0" . as_ptr () as * const c_char) ; table . get_navigation_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_mesh\0" . as_ptr () as * const c_char) ; table . get_region_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_region_rid\0" . as_ptr () as * const c_char) ; table . get_travel_cost = (gd_api . godot_method_bind_get_method) (class_name , "get_travel_cost\0" . as_ptr () as * const c_char) ; table . is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabled\0" . as_ptr () as * const c_char) ; table . set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled\0" . as_ptr () as * const c_char) ; table . set_enter_cost = (gd_api . godot_method_bind_get_method) (class_name , "set_enter_cost\0" . as_ptr () as * const c_char) ; table . set_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_layers\0" . as_ptr () as * const c_char) ; table . set_navigation_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_mesh\0" . as_ptr () as * const c_char) ; table . set_travel_cost = (gd_api . godot_method_bind_get_method) (class_name , "set_travel_cost\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::navigation_mesh_instance::private::NavigationMeshInstance;
            
            pub(crate) mod navigation_obstacle {
                # ! [doc = "This module contains types related to the API class [`NavigationObstacle`][super::NavigationObstacle]."] pub (crate) mod private { # [doc = "`core class NavigationObstacle` inherits `Node` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_navigationobstacle.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`NavigationObstacle` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<NavigationObstacle>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNavigationObstacle inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NavigationObstacle { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NavigationObstacle ; impl NavigationObstacle { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NavigationObstacleMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the [`Navigation`][Navigation] node that the obstacle is using for its navigation system."] # [doc = ""] # [inline] pub fn get_navigation (& self) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationObstacleMethodTable :: get (get_api ()) . get_navigation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The radius of the agent. Used only if [`estimate_radius`][Self::estimate_radius] is set to `false`."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationObstacleMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`RID`][Rid] of this obstacle on the [`NavigationServer`][NavigationServer]."] # [doc = ""] # [inline] pub fn get_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationObstacleMethodTable :: get (get_api ()) . get_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius."] # [doc = ""] # [inline] pub fn is_radius_estimated (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationObstacleMethodTable :: get (get_api ()) . is_radius_estimated ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius."] # [doc = ""] # [inline] pub fn set_estimate_radius (& self , estimate_radius : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationObstacleMethodTable :: get (get_api ()) . set_estimate_radius ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , estimate_radius as _) ; } } # [doc = "Sets the [`Navigation`][Navigation] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [`Navigation`][Navigation] node."] # [doc = ""] # [inline] pub fn set_navigation (& self , navigation : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationObstacleMethodTable :: get (get_api ()) . set_navigation ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , navigation . as_arg_ptr ()) ; } } # [doc = "The radius of the agent. Used only if [`estimate_radius`][Self::estimate_radius] is set to `false`."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationObstacleMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationObstacle { } unsafe impl GodotObject for NavigationObstacle { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "NavigationObstacle" } } impl QueueFree for NavigationObstacle { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for NavigationObstacle { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationObstacle { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for NavigationObstacle { } unsafe impl SubClass < crate :: generated :: Object > for NavigationObstacle { } impl Instanciable for NavigationObstacle { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { NavigationObstacle :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationObstacleMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_navigation : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub get_rid : * mut sys :: godot_method_bind , pub is_radius_estimated : * mut sys :: godot_method_bind , pub set_estimate_radius : * mut sys :: godot_method_bind , pub set_navigation : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind } impl NavigationObstacleMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationObstacleMethodTable = NavigationObstacleMethodTable { class_constructor : None , get_navigation : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , get_rid : 0 as * mut sys :: godot_method_bind , is_radius_estimated : 0 as * mut sys :: godot_method_bind , set_estimate_radius : 0 as * mut sys :: godot_method_bind , set_navigation : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NavigationObstacleMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NavigationObstacle\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_navigation = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . get_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_rid\0" . as_ptr () as * const c_char) ; table . is_radius_estimated = (gd_api . godot_method_bind_get_method) (class_name , "is_radius_estimated\0" . as_ptr () as * const c_char) ; table . set_estimate_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_estimate_radius\0" . as_ptr () as * const c_char) ; table . set_navigation = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::navigation_obstacle::private::NavigationObstacle;
            
            pub(crate) mod navigation_obstacle_2d {
                # ! [doc = "This module contains types related to the API class [`NavigationObstacle2D`][super::NavigationObstacle2D]."] pub (crate) mod private { # [doc = "`core class NavigationObstacle2D` inherits `Node` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_navigationobstacle2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`NavigationObstacle2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<NavigationObstacle2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNavigationObstacle2D inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NavigationObstacle2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NavigationObstacle2D ; impl NavigationObstacle2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NavigationObstacle2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the [`Navigation2D`][Navigation2D] node that the obstacle is using for its navigation system."] # [doc = ""] # [inline] pub fn get_navigation (& self) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationObstacle2DMethodTable :: get (get_api ()) . get_navigation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The radius of the agent. Used only if [`estimate_radius`][Self::estimate_radius] is set to `false`."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationObstacle2DMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`RID`][Rid] of this obstacle on the [`Navigation2DServer`][Navigation2DServer]."] # [doc = ""] # [inline] pub fn get_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationObstacle2DMethodTable :: get (get_api ()) . get_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius."] # [doc = ""] # [inline] pub fn is_radius_estimated (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationObstacle2DMethodTable :: get (get_api ()) . is_radius_estimated ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius."] # [doc = ""] # [inline] pub fn set_estimate_radius (& self , estimate_radius : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationObstacle2DMethodTable :: get (get_api ()) . set_estimate_radius ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , estimate_radius as _) ; } } # [doc = "Sets the [`Navigation2D`][Navigation2D] node used by the obstacle. Useful when you don't want to make the obstacle a child of a [`Navigation2D`][Navigation2D] node."] # [doc = ""] # [inline] pub fn set_navigation (& self , navigation : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationObstacle2DMethodTable :: get (get_api ()) . set_navigation ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , navigation . as_arg_ptr ()) ; } } # [doc = "The radius of the agent. Used only if [`estimate_radius`][Self::estimate_radius] is set to `false`."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationObstacle2DMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationObstacle2D { } unsafe impl GodotObject for NavigationObstacle2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "NavigationObstacle2D" } } impl QueueFree for NavigationObstacle2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for NavigationObstacle2D { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationObstacle2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for NavigationObstacle2D { } unsafe impl SubClass < crate :: generated :: Object > for NavigationObstacle2D { } impl Instanciable for NavigationObstacle2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { NavigationObstacle2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationObstacle2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_navigation : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub get_rid : * mut sys :: godot_method_bind , pub is_radius_estimated : * mut sys :: godot_method_bind , pub set_estimate_radius : * mut sys :: godot_method_bind , pub set_navigation : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind } impl NavigationObstacle2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationObstacle2DMethodTable = NavigationObstacle2DMethodTable { class_constructor : None , get_navigation : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , get_rid : 0 as * mut sys :: godot_method_bind , is_radius_estimated : 0 as * mut sys :: godot_method_bind , set_estimate_radius : 0 as * mut sys :: godot_method_bind , set_navigation : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NavigationObstacle2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NavigationObstacle2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_navigation = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . get_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_rid\0" . as_ptr () as * const c_char) ; table . is_radius_estimated = (gd_api . godot_method_bind_get_method) (class_name , "is_radius_estimated\0" . as_ptr () as * const c_char) ; table . set_estimate_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_estimate_radius\0" . as_ptr () as * const c_char) ; table . set_navigation = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::navigation_obstacle_2d::private::NavigationObstacle2D;
            
            pub(crate) mod navigation_polygon {
                # ! [doc = "This module contains types related to the API class [`NavigationPolygon`][super::NavigationPolygon]."] pub (crate) mod private { # [doc = "`core class NavigationPolygon` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_navigationpolygon.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nNavigationPolygon inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NavigationPolygon { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NavigationPolygon ; impl NavigationPolygon { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NavigationPolygonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Appends a [`PoolVector2Array`][PoolArray<Vector2>] that contains the vertices of an outline to the internal array that contains all the outlines. You have to call [`make_polygons_from_outlines`][Self::make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use."] # [doc = ""] # [inline] pub fn add_outline (& self , outline : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . add_outline ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , outline) ; } } # [doc = "Adds a [`PoolVector2Array`][PoolArray<Vector2>] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call [`make_polygons_from_outlines`][Self::make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use."] # [doc = ""] # [inline] pub fn add_outline_at_index (& self , outline : PoolArray < Vector2 > , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . add_outline_at_index ; let ret = crate :: icalls :: icallvar__vec2arr_i64 (method_bind , self . this . sys () . as_ptr () , outline , index as _) ; } } # [doc = "Adds a polygon using the indices of the vertices you get when calling [`get_vertices`][Self::get_vertices]."] # [doc = ""] # [inline] pub fn add_polygon (& self , polygon : PoolArray < i32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . add_polygon ; let ret = crate :: icalls :: icallvar__i32arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } # [doc = "Clears the array of the outlines, but it doesn't clear the vertices and the polygons that were created by them."] # [doc = ""] # [inline] pub fn clear_outlines (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . clear_outlines ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Clears the array of polygons, but it doesn't clear the array of outlines and vertices."] # [doc = ""] # [inline] pub fn clear_polygons (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . clear_polygons ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the [`NavigationMesh`][NavigationMesh] resulting from this navigation polygon. This navmesh can be used to update the navmesh of a region with the [`NavigationServer.region_set_navmesh`][NavigationServer::region_set_navmesh] API directly (as 2D uses the 3D server behind the scene)."] # [doc = ""] # [inline] pub fn get_mesh (& self) -> Option < Ref < crate :: generated :: NavigationMesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . get_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: NavigationMesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [`PoolVector2Array`][PoolArray<Vector2>] containing the vertices of an outline that was created in the editor or by script."] # [doc = ""] # [inline] pub fn get_outline (& self , idx : i64) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . get_outline ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of outlines that were created in the editor or by script."] # [doc = ""] # [inline] pub fn get_outline_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . get_outline_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a [`PoolIntArray`][PoolArray<i32>] containing the indices of the vertices of a created polygon."] # [doc = ""] # [inline] pub fn get_polygon (& self , idx : i64) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the count of all polygons."] # [doc = ""] # [inline] pub fn get_polygon_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . get_polygon_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a [`PoolVector2Array`][PoolArray<Vector2>] containing all the vertices being used to create the polygons."] # [doc = ""] # [inline] pub fn vertices (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . get_vertices ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates polygons from the outlines added in the editor or by script."] # [doc = ""] # [inline] pub fn make_polygons_from_outlines (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . make_polygons_from_outlines ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes an outline created in the editor or by script. You have to call [`make_polygons_from_outlines`][Self::make_polygons_from_outlines] for the polygons to update."] # [doc = ""] # [inline] pub fn remove_outline (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . remove_outline ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; } } # [doc = "Changes an outline created in the editor or by script. You have to call [`make_polygons_from_outlines`][Self::make_polygons_from_outlines] for the polygons to update."] # [doc = ""] # [inline] pub fn set_outline (& self , idx : i64 , outline : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . set_outline ; let ret = crate :: icalls :: icallvar__i64_vec2arr (method_bind , self . this . sys () . as_ptr () , idx as _ , outline) ; } } # [doc = "Sets the vertices that can be then indexed to create polygons with the [`add_polygon`][Self::add_polygon] method."] # [doc = ""] # [inline] pub fn set_vertices (& self , vertices : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonMethodTable :: get (get_api ()) . set_vertices ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , vertices) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationPolygon { } unsafe impl GodotObject for NavigationPolygon { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NavigationPolygon" } } impl std :: ops :: Deref for NavigationPolygon { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationPolygon { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for NavigationPolygon { } unsafe impl SubClass < crate :: generated :: Reference > for NavigationPolygon { } unsafe impl SubClass < crate :: generated :: Object > for NavigationPolygon { } impl Instanciable for NavigationPolygon { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { NavigationPolygon :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationPolygonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_outline : * mut sys :: godot_method_bind , pub add_outline_at_index : * mut sys :: godot_method_bind , pub add_polygon : * mut sys :: godot_method_bind , pub clear_outlines : * mut sys :: godot_method_bind , pub clear_polygons : * mut sys :: godot_method_bind , pub get_mesh : * mut sys :: godot_method_bind , pub get_outline : * mut sys :: godot_method_bind , pub get_outline_count : * mut sys :: godot_method_bind , pub get_polygon : * mut sys :: godot_method_bind , pub get_polygon_count : * mut sys :: godot_method_bind , pub get_vertices : * mut sys :: godot_method_bind , pub make_polygons_from_outlines : * mut sys :: godot_method_bind , pub remove_outline : * mut sys :: godot_method_bind , pub set_outline : * mut sys :: godot_method_bind , pub set_vertices : * mut sys :: godot_method_bind } impl NavigationPolygonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationPolygonMethodTable = NavigationPolygonMethodTable { class_constructor : None , add_outline : 0 as * mut sys :: godot_method_bind , add_outline_at_index : 0 as * mut sys :: godot_method_bind , add_polygon : 0 as * mut sys :: godot_method_bind , clear_outlines : 0 as * mut sys :: godot_method_bind , clear_polygons : 0 as * mut sys :: godot_method_bind , get_mesh : 0 as * mut sys :: godot_method_bind , get_outline : 0 as * mut sys :: godot_method_bind , get_outline_count : 0 as * mut sys :: godot_method_bind , get_polygon : 0 as * mut sys :: godot_method_bind , get_polygon_count : 0 as * mut sys :: godot_method_bind , get_vertices : 0 as * mut sys :: godot_method_bind , make_polygons_from_outlines : 0 as * mut sys :: godot_method_bind , remove_outline : 0 as * mut sys :: godot_method_bind , set_outline : 0 as * mut sys :: godot_method_bind , set_vertices : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NavigationPolygonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NavigationPolygon\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_outline = (gd_api . godot_method_bind_get_method) (class_name , "add_outline\0" . as_ptr () as * const c_char) ; table . add_outline_at_index = (gd_api . godot_method_bind_get_method) (class_name , "add_outline_at_index\0" . as_ptr () as * const c_char) ; table . add_polygon = (gd_api . godot_method_bind_get_method) (class_name , "add_polygon\0" . as_ptr () as * const c_char) ; table . clear_outlines = (gd_api . godot_method_bind_get_method) (class_name , "clear_outlines\0" . as_ptr () as * const c_char) ; table . clear_polygons = (gd_api . godot_method_bind_get_method) (class_name , "clear_polygons\0" . as_ptr () as * const c_char) ; table . get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh\0" . as_ptr () as * const c_char) ; table . get_outline = (gd_api . godot_method_bind_get_method) (class_name , "get_outline\0" . as_ptr () as * const c_char) ; table . get_outline_count = (gd_api . godot_method_bind_get_method) (class_name , "get_outline_count\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . get_polygon_count = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon_count\0" . as_ptr () as * const c_char) ; table . get_vertices = (gd_api . godot_method_bind_get_method) (class_name , "get_vertices\0" . as_ptr () as * const c_char) ; table . make_polygons_from_outlines = (gd_api . godot_method_bind_get_method) (class_name , "make_polygons_from_outlines\0" . as_ptr () as * const c_char) ; table . remove_outline = (gd_api . godot_method_bind_get_method) (class_name , "remove_outline\0" . as_ptr () as * const c_char) ; table . set_outline = (gd_api . godot_method_bind_get_method) (class_name , "set_outline\0" . as_ptr () as * const c_char) ; table . set_vertices = (gd_api . godot_method_bind_get_method) (class_name , "set_vertices\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::navigation_polygon::private::NavigationPolygon;
            
            pub(crate) mod navigation_polygon_instance {
                # ! [doc = "This module contains types related to the API class [`NavigationPolygonInstance`][super::NavigationPolygonInstance]."] pub (crate) mod private { # [doc = "`core class NavigationPolygonInstance` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_navigationpolygoninstance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`NavigationPolygonInstance` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<NavigationPolygonInstance>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNavigationPolygonInstance inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NavigationPolygonInstance { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NavigationPolygonInstance ; impl NavigationPolygonInstance { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NavigationPolygonInstanceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "When pathfinding enters this region's navmesh from another regions navmesh the `enter_cost` value is added to the path distance for determining the shortest path."] # [doc = ""] # [inline] pub fn enter_cost (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonInstanceMethodTable :: get (get_api ()) . get_enter_cost ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "A bitfield determining all navigation map layers the [`NavigationPolygon`][NavigationPolygon] belongs to. On path requests with [`Navigation2DServer.map_get_path`][Navigation2DServer::map_get_path] navmeshes without matching layers will be ignored and the navigation map will only proximity merge different navmeshes with matching layers."] # [doc = ""] # [inline] pub fn navigation_layers (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonInstanceMethodTable :: get (get_api ()) . get_navigation_layers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The [`NavigationPolygon`][NavigationPolygon] resource to use."] # [doc = ""] # [inline] pub fn navigation_polygon (& self) -> Option < Ref < crate :: generated :: NavigationPolygon , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonInstanceMethodTable :: get (get_api ()) . get_navigation_polygon ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: NavigationPolygon , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`RID`][Rid] of this region on the [`Navigation2DServer`][Navigation2DServer]. Combined with [`Navigation2DServer.map_get_closest_point_owner`][Navigation2DServer::map_get_closest_point_owner] can be used to identify the [`NavigationPolygonInstance`][NavigationPolygonInstance] closest to a point on the merged navigation map."] # [doc = ""] # [inline] pub fn get_region_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonInstanceMethodTable :: get (get_api ()) . get_region_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "When pathfinding moves inside this region's navmesh the traveled distances are multiplied with `travel_cost` for determining the shortest path."] # [doc = ""] # [inline] pub fn travel_cost (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonInstanceMethodTable :: get (get_api ()) . get_travel_cost ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Determines if the [`NavigationPolygonInstance`][NavigationPolygonInstance] is enabled or disabled."] # [doc = ""] # [inline] pub fn is_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonInstanceMethodTable :: get (get_api ()) . is_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Determines if the [`NavigationPolygonInstance`][NavigationPolygonInstance] is enabled or disabled."] # [doc = ""] # [inline] pub fn set_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonInstanceMethodTable :: get (get_api ()) . set_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "When pathfinding enters this region's navmesh from another regions navmesh the `enter_cost` value is added to the path distance for determining the shortest path."] # [doc = ""] # [inline] pub fn set_enter_cost (& self , enter_cost : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonInstanceMethodTable :: get (get_api ()) . set_enter_cost ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , enter_cost as _) ; } } # [doc = "A bitfield determining all navigation map layers the [`NavigationPolygon`][NavigationPolygon] belongs to. On path requests with [`Navigation2DServer.map_get_path`][Navigation2DServer::map_get_path] navmeshes without matching layers will be ignored and the navigation map will only proximity merge different navmeshes with matching layers."] # [doc = ""] # [inline] pub fn set_navigation_layers (& self , navigation_layers : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonInstanceMethodTable :: get (get_api ()) . set_navigation_layers ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , navigation_layers as _) ; } } # [doc = "The [`NavigationPolygon`][NavigationPolygon] resource to use."] # [doc = ""] # [inline] pub fn set_navigation_polygon (& self , navpoly : impl AsArg < crate :: generated :: NavigationPolygon >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonInstanceMethodTable :: get (get_api ()) . set_navigation_polygon ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , navpoly . as_arg_ptr ()) ; } } # [doc = "When pathfinding moves inside this region's navmesh the traveled distances are multiplied with `travel_cost` for determining the shortest path."] # [doc = ""] # [inline] pub fn set_travel_cost (& self , travel_cost : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationPolygonInstanceMethodTable :: get (get_api ()) . set_travel_cost ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , travel_cost as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationPolygonInstance { } unsafe impl GodotObject for NavigationPolygonInstance { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "NavigationPolygonInstance" } } impl QueueFree for NavigationPolygonInstance { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for NavigationPolygonInstance { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationPolygonInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for NavigationPolygonInstance { } unsafe impl SubClass < crate :: generated :: CanvasItem > for NavigationPolygonInstance { } unsafe impl SubClass < crate :: generated :: Node > for NavigationPolygonInstance { } unsafe impl SubClass < crate :: generated :: Object > for NavigationPolygonInstance { } impl Instanciable for NavigationPolygonInstance { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { NavigationPolygonInstance :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationPolygonInstanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_enter_cost : * mut sys :: godot_method_bind , pub get_navigation_layers : * mut sys :: godot_method_bind , pub get_navigation_polygon : * mut sys :: godot_method_bind , pub get_region_rid : * mut sys :: godot_method_bind , pub get_travel_cost : * mut sys :: godot_method_bind , pub is_enabled : * mut sys :: godot_method_bind , pub set_enabled : * mut sys :: godot_method_bind , pub set_enter_cost : * mut sys :: godot_method_bind , pub set_navigation_layers : * mut sys :: godot_method_bind , pub set_navigation_polygon : * mut sys :: godot_method_bind , pub set_travel_cost : * mut sys :: godot_method_bind } impl NavigationPolygonInstanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationPolygonInstanceMethodTable = NavigationPolygonInstanceMethodTable { class_constructor : None , get_enter_cost : 0 as * mut sys :: godot_method_bind , get_navigation_layers : 0 as * mut sys :: godot_method_bind , get_navigation_polygon : 0 as * mut sys :: godot_method_bind , get_region_rid : 0 as * mut sys :: godot_method_bind , get_travel_cost : 0 as * mut sys :: godot_method_bind , is_enabled : 0 as * mut sys :: godot_method_bind , set_enabled : 0 as * mut sys :: godot_method_bind , set_enter_cost : 0 as * mut sys :: godot_method_bind , set_navigation_layers : 0 as * mut sys :: godot_method_bind , set_navigation_polygon : 0 as * mut sys :: godot_method_bind , set_travel_cost : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NavigationPolygonInstanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NavigationPolygonInstance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_enter_cost = (gd_api . godot_method_bind_get_method) (class_name , "get_enter_cost\0" . as_ptr () as * const c_char) ; table . get_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_layers\0" . as_ptr () as * const c_char) ; table . get_navigation_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_polygon\0" . as_ptr () as * const c_char) ; table . get_region_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_region_rid\0" . as_ptr () as * const c_char) ; table . get_travel_cost = (gd_api . godot_method_bind_get_method) (class_name , "get_travel_cost\0" . as_ptr () as * const c_char) ; table . is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabled\0" . as_ptr () as * const c_char) ; table . set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled\0" . as_ptr () as * const c_char) ; table . set_enter_cost = (gd_api . godot_method_bind_get_method) (class_name , "set_enter_cost\0" . as_ptr () as * const c_char) ; table . set_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_layers\0" . as_ptr () as * const c_char) ; table . set_navigation_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_polygon\0" . as_ptr () as * const c_char) ; table . set_travel_cost = (gd_api . godot_method_bind_get_method) (class_name , "set_travel_cost\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::navigation_polygon_instance::private::NavigationPolygonInstance;
            
            pub(crate) mod navigation_server {
                # ! [doc = "This module contains types related to the API class [`NavigationServer`][super::NavigationServer]."] pub (crate) mod private { # [doc = "`core singleton class NavigationServer` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_navigationserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nNavigationServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NavigationServer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NavigationServer ; impl NavigationServer { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("NavigationServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Creates the agent."] # [doc = ""] # [inline] pub fn agent_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . agent_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the navigation map [`RID`][Rid] the requested `agent` is currently assigned to."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_get_map (& self , agent : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . agent_get_map ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , agent) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the map got changed the previous frame."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_is_map_changed (& self , agent : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . agent_is_map_changed ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , agent) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Callback called at the end of the RVO process. If a callback is created manually and the agent is placed on a navigation map it will calculate avoidance for the agent and dispatch the calculated `safe_velocity` to the `receiver` object with a signal to the chosen `method` name.\n**Note:** Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [`agent_set_callback`][Self::agent_set_callback] again with a `null` object as the `receiver`.\n# Default Arguments\n* `userdata` - `null`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_callback (& self , agent : Rid , receiver : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString > , userdata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . agent_set_callback ; let ret = crate :: icalls :: icallvar__rid_obj_str_var (method_bind , self . this . sys () . as_ptr () , agent , receiver . as_arg_ptr () , method . into () , userdata . owned_to_variant ()) ; } } # [doc = "Puts the agent in the map."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_map (& self , agent : Rid , map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . agent_set_map ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , agent , map) ; } } # [doc = "Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_max_neighbors (& self , agent : Rid , count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . agent_set_max_neighbors ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , agent , count as _) ; } } # [doc = "Sets the maximum speed of the agent. Must be positive."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_max_speed (& self , agent : Rid , max_speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . agent_set_max_speed ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , agent , max_speed as _) ; } } # [doc = "Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_neighbor_dist (& self , agent : Rid , dist : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . agent_set_neighbor_dist ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , agent , dist as _) ; } } # [doc = "Sets the position of the agent in world space."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_position (& self , agent : Rid , position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . agent_set_position ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , agent , position) ; } } # [doc = "Sets the radius of the agent."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_radius (& self , agent : Rid , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . agent_set_radius ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , agent , radius as _) ; } } # [doc = "Sets the new target velocity."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_target_velocity (& self , agent : Rid , target_velocity : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . agent_set_target_velocity ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , agent , target_velocity) ; } } # [doc = "The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_time_horizon (& self , agent : Rid , time : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . agent_set_time_horizon ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , agent , time as _) ; } } # [doc = "Sets the current velocity of the agent."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn agent_set_velocity (& self , agent : Rid , velocity : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . agent_set_velocity ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , agent , velocity) ; } } # [doc = "Destroys the given RID."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn free_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . free_rid ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Returns all created navigation map [`RID`][Rid]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them."] # [doc = ""] # [inline] pub fn get_maps (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . get_maps ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Create a new map."] # [doc = ""] # [inline] pub fn map_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "This function immediately forces synchronization of the specified navigation `map` [`RID`][Rid]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed).\nDue to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update.\nAvoidance processing and dispatch of the `safe_velocity` signals is untouched by this function and continues to happen for all maps and agents at the end of the physics frame.\n**Note:** With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_force_update (& self , map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_force_update ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , map) ; } } # [doc = "Returns all navigation agents [`RID`][Rid]s that are currently assigned to the requested navigation `map`."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_agents (& self , map : Rid) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_get_agents ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , map) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the map cell height."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_cell_height (& self , map : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_get_cell_height ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , map) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the map cell size."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_cell_size (& self , map : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_get_cell_size ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , map) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the point closest to the provided `to_point` on the navigation mesh surface."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_closest_point (& self , map : Rid , to_point : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_get_closest_point ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , map , to_point) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the normal for the point returned by [`map_get_closest_point`][Self::map_get_closest_point]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_closest_point_normal (& self , map : Rid , to_point : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_get_closest_point_normal ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , map , to_point) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the owner region RID for the point returned by [`map_get_closest_point`][Self::map_get_closest_point]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_closest_point_owner (& self , map : Rid , to_point : Vector3) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_get_closest_point_owner ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , map , to_point) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the closest point between the navigation surface and the segment.\n# Default Arguments\n* `use_collision` - `false`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_closest_point_to_segment (& self , map : Rid , start : Vector3 , end : Vector3 , use_collision : bool) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_get_closest_point_to_segment ; let ret = crate :: icalls :: icallvar__rid_vec3_vec3_bool (method_bind , self . this . sys () . as_ptr () , map , start , end , use_collision as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the edge connection margin of the map. This distance is the minimum vertex distance needed to connect two edges from different regions."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_edge_connection_margin (& self , map : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_get_edge_connection_margin ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , map) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the navigation path to reach the destination from the origin. `navigation_layers` is a bitmask of all region layers that are allowed to be in the path.\n# Default Arguments\n* `navigation_layers` - `1`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_path (& self , map : Rid , origin : Vector3 , destination : Vector3 , optimize : bool , navigation_layers : i64) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_get_path ; let ret = crate :: icalls :: icallvar__rid_vec3_vec3_bool_i64 (method_bind , self . this . sys () . as_ptr () , map , origin , destination , optimize as _ , navigation_layers as _) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all navigation regions [`RID`][Rid]s that are currently assigned to the requested navigation `map`."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_regions (& self , map : Rid) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_get_regions ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , map) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the map's up direction."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_get_up (& self , map : Rid) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_get_up ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , map) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the map is active."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_is_active (& self , map : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_is_active ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , map) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets the map active."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_set_active (& self , map : Rid , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_set_active ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , map , active as _) ; } } # [doc = "Set the map cell height used to weld the navigation mesh polygons."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_set_cell_height (& self , map : Rid , cell_height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_set_cell_height ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , map , cell_height as _) ; } } # [doc = "Set the map cell size used to weld the navigation mesh polygons."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_set_cell_size (& self , map : Rid , cell_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_set_cell_size ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , map , cell_size as _) ; } } # [doc = "Set the map edge connection margin used to weld the compatible region edges."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_set_edge_connection_margin (& self , map : Rid , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_set_edge_connection_margin ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , map , margin as _) ; } } # [doc = "Sets the map up direction."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn map_set_up (& self , map : Rid , up : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . map_set_up ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , map , up) ; } } # [doc = "Process the collision avoidance agents.\nThe result of this process is needed by the physics server, so this must be called in the main thread.\n**Note:** This function is not thread safe."] # [doc = ""] # [inline] pub fn process (& self , delta_time : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . process ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , delta_time as _) ; } } # [doc = "Bakes the navigation mesh."] # [doc = ""] # [inline] pub fn region_bake_navmesh (& self , mesh : impl AsArg < crate :: generated :: NavigationMesh > , node : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_bake_navmesh ; let ret = crate :: icalls :: icallvar__obj_obj (method_bind , self . this . sys () . as_ptr () , mesh . as_arg_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Creates a new region."] # [doc = ""] # [inline] pub fn region_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the ending point of a connection door. `connection` is an index between 0 and the return value of [`region_get_connections_count`][Self::region_get_connections_count]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_get_connection_pathway_end (& self , region : Rid , connection : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_get_connection_pathway_end ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , region , connection as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the starting point of a connection door. `connection` is an index between 0 and the return value of [`region_get_connections_count`][Self::region_get_connections_count]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_get_connection_pathway_start (& self , region : Rid , connection : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_get_connection_pathway_start ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , region , connection as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns how many connections this `region` has with other regions in the map."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_get_connections_count (& self , region : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_get_connections_count ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , region) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the `enter_cost` of this `region`."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_get_enter_cost (& self , region : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_get_enter_cost ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , region) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the navigation map [`RID`][Rid] the requested `region` is currently assigned to."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_get_map (& self , region : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_get_map ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , region) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the region's navigation layers."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_get_navigation_layers (& self , region : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_get_navigation_layers ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , region) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the `travel_cost` of this `region`."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_get_travel_cost (& self , region : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_get_travel_cost ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , region) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the provided `point` in world space is currently owned by the provided navigation `region`. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region.\nIf multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer.\n**Note:** If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_owns_point (& self , region : Rid , point : Vector3) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_owns_point ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , region , point) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets the `enter_cost` for this `region`."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_set_enter_cost (& self , region : Rid , enter_cost : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_set_enter_cost ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , region , enter_cost as _) ; } } # [doc = "Sets the map for the region."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_set_map (& self , region : Rid , map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_set_map ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , region , map) ; } } # [doc = "Set the region's navigation layers. This allows selecting regions from a path request (when using [`NavigationServer.map_get_path`][NavigationServer::map_get_path])."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_set_navigation_layers (& self , region : Rid , navigation_layers : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_set_navigation_layers ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , region , navigation_layers as _) ; } } # [doc = "Sets the navigation mesh for the region."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_set_navmesh (& self , region : Rid , nav_mesh : impl AsArg < crate :: generated :: NavigationMesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_set_navmesh ; let ret = crate :: icalls :: icallvar__rid_obj (method_bind , self . this . sys () . as_ptr () , region , nav_mesh . as_arg_ptr ()) ; } } # [doc = "Sets the global transformation for the region."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_set_transform (& self , region : Rid , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_set_transform ; let ret = crate :: icalls :: icallvar__rid_trans (method_bind , self . this . sys () . as_ptr () , region , transform) ; } } # [doc = "Sets the `travel_cost` for this `region`."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn region_set_travel_cost (& self , region : Rid , travel_cost : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . region_set_travel_cost ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , region , travel_cost as _) ; } } # [doc = "Control activation of this server."] # [doc = ""] # [inline] pub fn set_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NavigationServerMethodTable :: get (get_api ()) . set_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , active as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NavigationServer { } unsafe impl GodotObject for NavigationServer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "NavigationServer" } } impl std :: ops :: Deref for NavigationServer { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NavigationServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for NavigationServer { } unsafe impl Send for NavigationServer { } unsafe impl Sync for NavigationServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NavigationServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub agent_create : * mut sys :: godot_method_bind , pub agent_get_map : * mut sys :: godot_method_bind , pub agent_is_map_changed : * mut sys :: godot_method_bind , pub agent_set_callback : * mut sys :: godot_method_bind , pub agent_set_map : * mut sys :: godot_method_bind , pub agent_set_max_neighbors : * mut sys :: godot_method_bind , pub agent_set_max_speed : * mut sys :: godot_method_bind , pub agent_set_neighbor_dist : * mut sys :: godot_method_bind , pub agent_set_position : * mut sys :: godot_method_bind , pub agent_set_radius : * mut sys :: godot_method_bind , pub agent_set_target_velocity : * mut sys :: godot_method_bind , pub agent_set_time_horizon : * mut sys :: godot_method_bind , pub agent_set_velocity : * mut sys :: godot_method_bind , pub free_rid : * mut sys :: godot_method_bind , pub get_maps : * mut sys :: godot_method_bind , pub map_create : * mut sys :: godot_method_bind , pub map_force_update : * mut sys :: godot_method_bind , pub map_get_agents : * mut sys :: godot_method_bind , pub map_get_cell_height : * mut sys :: godot_method_bind , pub map_get_cell_size : * mut sys :: godot_method_bind , pub map_get_closest_point : * mut sys :: godot_method_bind , pub map_get_closest_point_normal : * mut sys :: godot_method_bind , pub map_get_closest_point_owner : * mut sys :: godot_method_bind , pub map_get_closest_point_to_segment : * mut sys :: godot_method_bind , pub map_get_edge_connection_margin : * mut sys :: godot_method_bind , pub map_get_path : * mut sys :: godot_method_bind , pub map_get_regions : * mut sys :: godot_method_bind , pub map_get_up : * mut sys :: godot_method_bind , pub map_is_active : * mut sys :: godot_method_bind , pub map_set_active : * mut sys :: godot_method_bind , pub map_set_cell_height : * mut sys :: godot_method_bind , pub map_set_cell_size : * mut sys :: godot_method_bind , pub map_set_edge_connection_margin : * mut sys :: godot_method_bind , pub map_set_up : * mut sys :: godot_method_bind , pub process : * mut sys :: godot_method_bind , pub region_bake_navmesh : * mut sys :: godot_method_bind , pub region_create : * mut sys :: godot_method_bind , pub region_get_connection_pathway_end : * mut sys :: godot_method_bind , pub region_get_connection_pathway_start : * mut sys :: godot_method_bind , pub region_get_connections_count : * mut sys :: godot_method_bind , pub region_get_enter_cost : * mut sys :: godot_method_bind , pub region_get_map : * mut sys :: godot_method_bind , pub region_get_navigation_layers : * mut sys :: godot_method_bind , pub region_get_travel_cost : * mut sys :: godot_method_bind , pub region_owns_point : * mut sys :: godot_method_bind , pub region_set_enter_cost : * mut sys :: godot_method_bind , pub region_set_map : * mut sys :: godot_method_bind , pub region_set_navigation_layers : * mut sys :: godot_method_bind , pub region_set_navmesh : * mut sys :: godot_method_bind , pub region_set_transform : * mut sys :: godot_method_bind , pub region_set_travel_cost : * mut sys :: godot_method_bind , pub set_active : * mut sys :: godot_method_bind } impl NavigationServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NavigationServerMethodTable = NavigationServerMethodTable { class_constructor : None , agent_create : 0 as * mut sys :: godot_method_bind , agent_get_map : 0 as * mut sys :: godot_method_bind , agent_is_map_changed : 0 as * mut sys :: godot_method_bind , agent_set_callback : 0 as * mut sys :: godot_method_bind , agent_set_map : 0 as * mut sys :: godot_method_bind , agent_set_max_neighbors : 0 as * mut sys :: godot_method_bind , agent_set_max_speed : 0 as * mut sys :: godot_method_bind , agent_set_neighbor_dist : 0 as * mut sys :: godot_method_bind , agent_set_position : 0 as * mut sys :: godot_method_bind , agent_set_radius : 0 as * mut sys :: godot_method_bind , agent_set_target_velocity : 0 as * mut sys :: godot_method_bind , agent_set_time_horizon : 0 as * mut sys :: godot_method_bind , agent_set_velocity : 0 as * mut sys :: godot_method_bind , free_rid : 0 as * mut sys :: godot_method_bind , get_maps : 0 as * mut sys :: godot_method_bind , map_create : 0 as * mut sys :: godot_method_bind , map_force_update : 0 as * mut sys :: godot_method_bind , map_get_agents : 0 as * mut sys :: godot_method_bind , map_get_cell_height : 0 as * mut sys :: godot_method_bind , map_get_cell_size : 0 as * mut sys :: godot_method_bind , map_get_closest_point : 0 as * mut sys :: godot_method_bind , map_get_closest_point_normal : 0 as * mut sys :: godot_method_bind , map_get_closest_point_owner : 0 as * mut sys :: godot_method_bind , map_get_closest_point_to_segment : 0 as * mut sys :: godot_method_bind , map_get_edge_connection_margin : 0 as * mut sys :: godot_method_bind , map_get_path : 0 as * mut sys :: godot_method_bind , map_get_regions : 0 as * mut sys :: godot_method_bind , map_get_up : 0 as * mut sys :: godot_method_bind , map_is_active : 0 as * mut sys :: godot_method_bind , map_set_active : 0 as * mut sys :: godot_method_bind , map_set_cell_height : 0 as * mut sys :: godot_method_bind , map_set_cell_size : 0 as * mut sys :: godot_method_bind , map_set_edge_connection_margin : 0 as * mut sys :: godot_method_bind , map_set_up : 0 as * mut sys :: godot_method_bind , process : 0 as * mut sys :: godot_method_bind , region_bake_navmesh : 0 as * mut sys :: godot_method_bind , region_create : 0 as * mut sys :: godot_method_bind , region_get_connection_pathway_end : 0 as * mut sys :: godot_method_bind , region_get_connection_pathway_start : 0 as * mut sys :: godot_method_bind , region_get_connections_count : 0 as * mut sys :: godot_method_bind , region_get_enter_cost : 0 as * mut sys :: godot_method_bind , region_get_map : 0 as * mut sys :: godot_method_bind , region_get_navigation_layers : 0 as * mut sys :: godot_method_bind , region_get_travel_cost : 0 as * mut sys :: godot_method_bind , region_owns_point : 0 as * mut sys :: godot_method_bind , region_set_enter_cost : 0 as * mut sys :: godot_method_bind , region_set_map : 0 as * mut sys :: godot_method_bind , region_set_navigation_layers : 0 as * mut sys :: godot_method_bind , region_set_navmesh : 0 as * mut sys :: godot_method_bind , region_set_transform : 0 as * mut sys :: godot_method_bind , region_set_travel_cost : 0 as * mut sys :: godot_method_bind , set_active : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NavigationServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NavigationServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . agent_create = (gd_api . godot_method_bind_get_method) (class_name , "agent_create\0" . as_ptr () as * const c_char) ; table . agent_get_map = (gd_api . godot_method_bind_get_method) (class_name , "agent_get_map\0" . as_ptr () as * const c_char) ; table . agent_is_map_changed = (gd_api . godot_method_bind_get_method) (class_name , "agent_is_map_changed\0" . as_ptr () as * const c_char) ; table . agent_set_callback = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_callback\0" . as_ptr () as * const c_char) ; table . agent_set_map = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_map\0" . as_ptr () as * const c_char) ; table . agent_set_max_neighbors = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_max_neighbors\0" . as_ptr () as * const c_char) ; table . agent_set_max_speed = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_max_speed\0" . as_ptr () as * const c_char) ; table . agent_set_neighbor_dist = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_neighbor_dist\0" . as_ptr () as * const c_char) ; table . agent_set_position = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_position\0" . as_ptr () as * const c_char) ; table . agent_set_radius = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_radius\0" . as_ptr () as * const c_char) ; table . agent_set_target_velocity = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_target_velocity\0" . as_ptr () as * const c_char) ; table . agent_set_time_horizon = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_time_horizon\0" . as_ptr () as * const c_char) ; table . agent_set_velocity = (gd_api . godot_method_bind_get_method) (class_name , "agent_set_velocity\0" . as_ptr () as * const c_char) ; table . free_rid = (gd_api . godot_method_bind_get_method) (class_name , "free_rid\0" . as_ptr () as * const c_char) ; table . get_maps = (gd_api . godot_method_bind_get_method) (class_name , "get_maps\0" . as_ptr () as * const c_char) ; table . map_create = (gd_api . godot_method_bind_get_method) (class_name , "map_create\0" . as_ptr () as * const c_char) ; table . map_force_update = (gd_api . godot_method_bind_get_method) (class_name , "map_force_update\0" . as_ptr () as * const c_char) ; table . map_get_agents = (gd_api . godot_method_bind_get_method) (class_name , "map_get_agents\0" . as_ptr () as * const c_char) ; table . map_get_cell_height = (gd_api . godot_method_bind_get_method) (class_name , "map_get_cell_height\0" . as_ptr () as * const c_char) ; table . map_get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "map_get_cell_size\0" . as_ptr () as * const c_char) ; table . map_get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "map_get_closest_point\0" . as_ptr () as * const c_char) ; table . map_get_closest_point_normal = (gd_api . godot_method_bind_get_method) (class_name , "map_get_closest_point_normal\0" . as_ptr () as * const c_char) ; table . map_get_closest_point_owner = (gd_api . godot_method_bind_get_method) (class_name , "map_get_closest_point_owner\0" . as_ptr () as * const c_char) ; table . map_get_closest_point_to_segment = (gd_api . godot_method_bind_get_method) (class_name , "map_get_closest_point_to_segment\0" . as_ptr () as * const c_char) ; table . map_get_edge_connection_margin = (gd_api . godot_method_bind_get_method) (class_name , "map_get_edge_connection_margin\0" . as_ptr () as * const c_char) ; table . map_get_path = (gd_api . godot_method_bind_get_method) (class_name , "map_get_path\0" . as_ptr () as * const c_char) ; table . map_get_regions = (gd_api . godot_method_bind_get_method) (class_name , "map_get_regions\0" . as_ptr () as * const c_char) ; table . map_get_up = (gd_api . godot_method_bind_get_method) (class_name , "map_get_up\0" . as_ptr () as * const c_char) ; table . map_is_active = (gd_api . godot_method_bind_get_method) (class_name , "map_is_active\0" . as_ptr () as * const c_char) ; table . map_set_active = (gd_api . godot_method_bind_get_method) (class_name , "map_set_active\0" . as_ptr () as * const c_char) ; table . map_set_cell_height = (gd_api . godot_method_bind_get_method) (class_name , "map_set_cell_height\0" . as_ptr () as * const c_char) ; table . map_set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "map_set_cell_size\0" . as_ptr () as * const c_char) ; table . map_set_edge_connection_margin = (gd_api . godot_method_bind_get_method) (class_name , "map_set_edge_connection_margin\0" . as_ptr () as * const c_char) ; table . map_set_up = (gd_api . godot_method_bind_get_method) (class_name , "map_set_up\0" . as_ptr () as * const c_char) ; table . process = (gd_api . godot_method_bind_get_method) (class_name , "process\0" . as_ptr () as * const c_char) ; table . region_bake_navmesh = (gd_api . godot_method_bind_get_method) (class_name , "region_bake_navmesh\0" . as_ptr () as * const c_char) ; table . region_create = (gd_api . godot_method_bind_get_method) (class_name , "region_create\0" . as_ptr () as * const c_char) ; table . region_get_connection_pathway_end = (gd_api . godot_method_bind_get_method) (class_name , "region_get_connection_pathway_end\0" . as_ptr () as * const c_char) ; table . region_get_connection_pathway_start = (gd_api . godot_method_bind_get_method) (class_name , "region_get_connection_pathway_start\0" . as_ptr () as * const c_char) ; table . region_get_connections_count = (gd_api . godot_method_bind_get_method) (class_name , "region_get_connections_count\0" . as_ptr () as * const c_char) ; table . region_get_enter_cost = (gd_api . godot_method_bind_get_method) (class_name , "region_get_enter_cost\0" . as_ptr () as * const c_char) ; table . region_get_map = (gd_api . godot_method_bind_get_method) (class_name , "region_get_map\0" . as_ptr () as * const c_char) ; table . region_get_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "region_get_navigation_layers\0" . as_ptr () as * const c_char) ; table . region_get_travel_cost = (gd_api . godot_method_bind_get_method) (class_name , "region_get_travel_cost\0" . as_ptr () as * const c_char) ; table . region_owns_point = (gd_api . godot_method_bind_get_method) (class_name , "region_owns_point\0" . as_ptr () as * const c_char) ; table . region_set_enter_cost = (gd_api . godot_method_bind_get_method) (class_name , "region_set_enter_cost\0" . as_ptr () as * const c_char) ; table . region_set_map = (gd_api . godot_method_bind_get_method) (class_name , "region_set_map\0" . as_ptr () as * const c_char) ; table . region_set_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "region_set_navigation_layers\0" . as_ptr () as * const c_char) ; table . region_set_navmesh = (gd_api . godot_method_bind_get_method) (class_name , "region_set_navmesh\0" . as_ptr () as * const c_char) ; table . region_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "region_set_transform\0" . as_ptr () as * const c_char) ; table . region_set_travel_cost = (gd_api . godot_method_bind_get_method) (class_name , "region_set_travel_cost\0" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::navigation_server::private::NavigationServer;
            
            pub(crate) mod networked_multiplayer_custom {
                # ! [doc = "This module contains types related to the API class [`NetworkedMultiplayerCustom`][super::NetworkedMultiplayerCustom]."] pub (crate) mod private { # [doc = "`core class NetworkedMultiplayerCustom` inherits `NetworkedMultiplayerPeer` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_networkedmultiplayercustom.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nNetworkedMultiplayerCustom inherits methods from:\n - [NetworkedMultiplayerPeer](struct.NetworkedMultiplayerPeer.html)\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NetworkedMultiplayerCustom { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NetworkedMultiplayerCustom ; impl NetworkedMultiplayerCustom { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NetworkedMultiplayerCustomMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Deliver a packet to the local [`MultiplayerAPI`][MultiplayerAPI].\nWhen your script receives a packet from other peers over the network (originating from the `packet_generated` signal on the sending peer), passing it to this method will deliver it locally."] # [doc = ""] # [inline] pub fn deliver_packet (& self , buffer : PoolArray < u8 > , from_peer_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerCustomMethodTable :: get (get_api ()) . deliver_packet ; let ret = crate :: icalls :: icallvar__bytearr_i64 (method_bind , self . this . sys () . as_ptr () , buffer , from_peer_id as _) ; } } # [doc = "Initialize the peer with the given `peer_id` (must be between 1 and 2147483647).\nCan only be called if the connection status is [`NetworkedMultiplayerPeer.CONNECTION_CONNECTING`][NetworkedMultiplayerPeer::CONNECTION_CONNECTING]. See [`set_connection_status`][Self::set_connection_status]."] # [doc = ""] # [inline] pub fn initialize (& self , self_peer_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerCustomMethodTable :: get (get_api ()) . initialize ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , self_peer_id as _) ; } } # [doc = "Set the state of the connection. See [enum NetworkedMultiplayerPeer.ConnectionStatus].\nThis will emit the [signal NetworkedMultiplayerPeer.connection_succeeded], [signal NetworkedMultiplayerPeer.connection_failed] or [signal NetworkedMultiplayerPeer.server_disconnected] signals depending on the status and if the peer has the unique network id of `1`.\nYou can only change to [`NetworkedMultiplayerPeer.CONNECTION_CONNECTING`][NetworkedMultiplayerPeer::CONNECTION_CONNECTING] from [`NetworkedMultiplayerPeer.CONNECTION_DISCONNECTED`][NetworkedMultiplayerPeer::CONNECTION_DISCONNECTED] and to [`NetworkedMultiplayerPeer.CONNECTION_CONNECTED`][NetworkedMultiplayerPeer::CONNECTION_CONNECTED] from [`NetworkedMultiplayerPeer.CONNECTION_CONNECTING`][NetworkedMultiplayerPeer::CONNECTION_CONNECTING]."] # [doc = ""] # [inline] pub fn set_connection_status (& self , connection_status : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerCustomMethodTable :: get (get_api ()) . set_connection_status ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , connection_status as _) ; } } # [doc = "Set the max packet size that this peer can handle."] # [doc = ""] # [inline] pub fn set_max_packet_size (& self , max_packet_size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerCustomMethodTable :: get (get_api ()) . set_max_packet_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , max_packet_size as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NetworkedMultiplayerCustom { } unsafe impl GodotObject for NetworkedMultiplayerCustom { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NetworkedMultiplayerCustom" } } impl std :: ops :: Deref for NetworkedMultiplayerCustom { type Target = crate :: generated :: NetworkedMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NetworkedMultiplayerCustom { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: NetworkedMultiplayerPeer > for NetworkedMultiplayerCustom { } unsafe impl SubClass < crate :: generated :: PacketPeer > for NetworkedMultiplayerCustom { } unsafe impl SubClass < crate :: generated :: Reference > for NetworkedMultiplayerCustom { } unsafe impl SubClass < crate :: generated :: Object > for NetworkedMultiplayerCustom { } impl Instanciable for NetworkedMultiplayerCustom { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { NetworkedMultiplayerCustom :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NetworkedMultiplayerCustomMethodTable { pub class_constructor : sys :: godot_class_constructor , pub deliver_packet : * mut sys :: godot_method_bind , pub initialize : * mut sys :: godot_method_bind , pub set_connection_status : * mut sys :: godot_method_bind , pub set_max_packet_size : * mut sys :: godot_method_bind } impl NetworkedMultiplayerCustomMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NetworkedMultiplayerCustomMethodTable = NetworkedMultiplayerCustomMethodTable { class_constructor : None , deliver_packet : 0 as * mut sys :: godot_method_bind , initialize : 0 as * mut sys :: godot_method_bind , set_connection_status : 0 as * mut sys :: godot_method_bind , set_max_packet_size : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NetworkedMultiplayerCustomMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NetworkedMultiplayerCustom\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . deliver_packet = (gd_api . godot_method_bind_get_method) (class_name , "deliver_packet\0" . as_ptr () as * const c_char) ; table . initialize = (gd_api . godot_method_bind_get_method) (class_name , "initialize\0" . as_ptr () as * const c_char) ; table . set_connection_status = (gd_api . godot_method_bind_get_method) (class_name , "set_connection_status\0" . as_ptr () as * const c_char) ; table . set_max_packet_size = (gd_api . godot_method_bind_get_method) (class_name , "set_max_packet_size\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::networked_multiplayer_custom::private::NetworkedMultiplayerCustom;
            
            pub mod networked_multiplayer_enet {
                # ! [doc = "This module contains types related to the API class [`NetworkedMultiplayerENet`][super::NetworkedMultiplayerENet]."] pub (crate) mod private { # [doc = "`core class NetworkedMultiplayerENet` inherits `NetworkedMultiplayerPeer` (reference-counted).\n\nThis class has related types in the [`networked_multiplayer_enet`][super::networked_multiplayer_enet] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_networkedmultiplayerenet.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nNetworkedMultiplayerENet inherits methods from:\n - [NetworkedMultiplayerPeer](struct.NetworkedMultiplayerPeer.html)\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NetworkedMultiplayerENet { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NetworkedMultiplayerENet ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CompressionMode (pub i64) ; impl CompressionMode { pub const NONE : CompressionMode = CompressionMode (0i64) ; pub const RANGE_CODER : CompressionMode = CompressionMode (1i64) ; pub const FASTLZ : CompressionMode = CompressionMode (2i64) ; pub const ZLIB : CompressionMode = CompressionMode (3i64) ; pub const ZSTD : CompressionMode = CompressionMode (4i64) ; } impl From < i64 > for CompressionMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CompressionMode > for i64 { # [inline] fn from (v : CompressionMode) -> Self { v . 0 } } impl FromVariant for CompressionMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl NetworkedMultiplayerENet { pub const COMPRESS_NONE : i64 = 0i64 ; pub const COMPRESS_RANGE_CODER : i64 = 1i64 ; pub const COMPRESS_FASTLZ : i64 = 2i64 ; pub const COMPRESS_ZLIB : i64 = 3i64 ; pub const COMPRESS_ZSTD : i64 = 4i64 ; } impl NetworkedMultiplayerENet { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NetworkedMultiplayerENetMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn close_connection (& self , wait_usec : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . close_connection ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , wait_usec as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn create_client (& self , address : impl Into < GodotString > , port : i64 , in_bandwidth : i64 , out_bandwidth : i64 , client_port : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . create_client ; let ret = crate :: icalls :: icallvar__str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , address . into () , port as _ , in_bandwidth as _ , out_bandwidth as _ , client_port as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn create_server (& self , port : i64 , max_clients : i64 , in_bandwidth : i64 , out_bandwidth : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . create_server ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , port as _ , max_clients as _ , in_bandwidth as _ , out_bandwidth as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn disconnect_peer (& self , id : i64 , now : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . disconnect_peer ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , id as _ , now as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn channel_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . get_channel_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn compression_mode (& self) -> crate :: generated :: networked_multiplayer_enet :: CompressionMode { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . get_compression_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: networked_multiplayer_enet :: CompressionMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn dtls_hostname (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . get_dtls_hostname ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_last_packet_channel (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . get_last_packet_channel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_packet_channel (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . get_packet_channel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_peer_address (& self , id : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . get_peer_address ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_peer_port (& self , id : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . get_peer_port ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn transfer_channel (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . get_transfer_channel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_always_ordered (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . is_always_ordered ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_dtls_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . is_dtls_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_dtls_verify_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . is_dtls_verify_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_server_relay_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . is_server_relay_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_always_ordered (& self , ordered : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . set_always_ordered ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , ordered as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bind_ip (& self , ip : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . set_bind_ip ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , ip . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_channel_count (& self , channels : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . set_channel_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , channels as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_compression_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . set_compression_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_dtls_certificate (& self , certificate : impl AsArg < crate :: generated :: X509Certificate >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . set_dtls_certificate ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , certificate . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_dtls_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . set_dtls_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_dtls_hostname (& self , hostname : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . set_dtls_hostname ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , hostname . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_dtls_key (& self , key : impl AsArg < crate :: generated :: CryptoKey >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . set_dtls_key ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , key . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_dtls_verify_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . set_dtls_verify_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_peer_timeout (& self , id : i64 , timeout_limit : i64 , timeout_min : i64 , timeout_max : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . set_peer_timeout ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , id as _ , timeout_limit as _ , timeout_min as _ , timeout_max as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_server_relay_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . set_server_relay_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_transfer_channel (& self , channel : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerENetMethodTable :: get (get_api ()) . set_transfer_channel ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , channel as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NetworkedMultiplayerENet { } unsafe impl GodotObject for NetworkedMultiplayerENet { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NetworkedMultiplayerENet" } } impl std :: ops :: Deref for NetworkedMultiplayerENet { type Target = crate :: generated :: NetworkedMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NetworkedMultiplayerENet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: NetworkedMultiplayerPeer > for NetworkedMultiplayerENet { } unsafe impl SubClass < crate :: generated :: PacketPeer > for NetworkedMultiplayerENet { } unsafe impl SubClass < crate :: generated :: Reference > for NetworkedMultiplayerENet { } unsafe impl SubClass < crate :: generated :: Object > for NetworkedMultiplayerENet { } impl Instanciable for NetworkedMultiplayerENet { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { NetworkedMultiplayerENet :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NetworkedMultiplayerENetMethodTable { pub class_constructor : sys :: godot_class_constructor , pub close_connection : * mut sys :: godot_method_bind , pub create_client : * mut sys :: godot_method_bind , pub create_server : * mut sys :: godot_method_bind , pub disconnect_peer : * mut sys :: godot_method_bind , pub get_channel_count : * mut sys :: godot_method_bind , pub get_compression_mode : * mut sys :: godot_method_bind , pub get_dtls_hostname : * mut sys :: godot_method_bind , pub get_last_packet_channel : * mut sys :: godot_method_bind , pub get_packet_channel : * mut sys :: godot_method_bind , pub get_peer_address : * mut sys :: godot_method_bind , pub get_peer_port : * mut sys :: godot_method_bind , pub get_transfer_channel : * mut sys :: godot_method_bind , pub is_always_ordered : * mut sys :: godot_method_bind , pub is_dtls_enabled : * mut sys :: godot_method_bind , pub is_dtls_verify_enabled : * mut sys :: godot_method_bind , pub is_server_relay_enabled : * mut sys :: godot_method_bind , pub set_always_ordered : * mut sys :: godot_method_bind , pub set_bind_ip : * mut sys :: godot_method_bind , pub set_channel_count : * mut sys :: godot_method_bind , pub set_compression_mode : * mut sys :: godot_method_bind , pub set_dtls_certificate : * mut sys :: godot_method_bind , pub set_dtls_enabled : * mut sys :: godot_method_bind , pub set_dtls_hostname : * mut sys :: godot_method_bind , pub set_dtls_key : * mut sys :: godot_method_bind , pub set_dtls_verify_enabled : * mut sys :: godot_method_bind , pub set_peer_timeout : * mut sys :: godot_method_bind , pub set_server_relay_enabled : * mut sys :: godot_method_bind , pub set_transfer_channel : * mut sys :: godot_method_bind } impl NetworkedMultiplayerENetMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NetworkedMultiplayerENetMethodTable = NetworkedMultiplayerENetMethodTable { class_constructor : None , close_connection : 0 as * mut sys :: godot_method_bind , create_client : 0 as * mut sys :: godot_method_bind , create_server : 0 as * mut sys :: godot_method_bind , disconnect_peer : 0 as * mut sys :: godot_method_bind , get_channel_count : 0 as * mut sys :: godot_method_bind , get_compression_mode : 0 as * mut sys :: godot_method_bind , get_dtls_hostname : 0 as * mut sys :: godot_method_bind , get_last_packet_channel : 0 as * mut sys :: godot_method_bind , get_packet_channel : 0 as * mut sys :: godot_method_bind , get_peer_address : 0 as * mut sys :: godot_method_bind , get_peer_port : 0 as * mut sys :: godot_method_bind , get_transfer_channel : 0 as * mut sys :: godot_method_bind , is_always_ordered : 0 as * mut sys :: godot_method_bind , is_dtls_enabled : 0 as * mut sys :: godot_method_bind , is_dtls_verify_enabled : 0 as * mut sys :: godot_method_bind , is_server_relay_enabled : 0 as * mut sys :: godot_method_bind , set_always_ordered : 0 as * mut sys :: godot_method_bind , set_bind_ip : 0 as * mut sys :: godot_method_bind , set_channel_count : 0 as * mut sys :: godot_method_bind , set_compression_mode : 0 as * mut sys :: godot_method_bind , set_dtls_certificate : 0 as * mut sys :: godot_method_bind , set_dtls_enabled : 0 as * mut sys :: godot_method_bind , set_dtls_hostname : 0 as * mut sys :: godot_method_bind , set_dtls_key : 0 as * mut sys :: godot_method_bind , set_dtls_verify_enabled : 0 as * mut sys :: godot_method_bind , set_peer_timeout : 0 as * mut sys :: godot_method_bind , set_server_relay_enabled : 0 as * mut sys :: godot_method_bind , set_transfer_channel : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NetworkedMultiplayerENetMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NetworkedMultiplayerENet\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . close_connection = (gd_api . godot_method_bind_get_method) (class_name , "close_connection\0" . as_ptr () as * const c_char) ; table . create_client = (gd_api . godot_method_bind_get_method) (class_name , "create_client\0" . as_ptr () as * const c_char) ; table . create_server = (gd_api . godot_method_bind_get_method) (class_name , "create_server\0" . as_ptr () as * const c_char) ; table . disconnect_peer = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_peer\0" . as_ptr () as * const c_char) ; table . get_channel_count = (gd_api . godot_method_bind_get_method) (class_name , "get_channel_count\0" . as_ptr () as * const c_char) ; table . get_compression_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_compression_mode\0" . as_ptr () as * const c_char) ; table . get_dtls_hostname = (gd_api . godot_method_bind_get_method) (class_name , "get_dtls_hostname\0" . as_ptr () as * const c_char) ; table . get_last_packet_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_last_packet_channel\0" . as_ptr () as * const c_char) ; table . get_packet_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_channel\0" . as_ptr () as * const c_char) ; table . get_peer_address = (gd_api . godot_method_bind_get_method) (class_name , "get_peer_address\0" . as_ptr () as * const c_char) ; table . get_peer_port = (gd_api . godot_method_bind_get_method) (class_name , "get_peer_port\0" . as_ptr () as * const c_char) ; table . get_transfer_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_transfer_channel\0" . as_ptr () as * const c_char) ; table . is_always_ordered = (gd_api . godot_method_bind_get_method) (class_name , "is_always_ordered\0" . as_ptr () as * const c_char) ; table . is_dtls_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_dtls_enabled\0" . as_ptr () as * const c_char) ; table . is_dtls_verify_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_dtls_verify_enabled\0" . as_ptr () as * const c_char) ; table . is_server_relay_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_server_relay_enabled\0" . as_ptr () as * const c_char) ; table . set_always_ordered = (gd_api . godot_method_bind_get_method) (class_name , "set_always_ordered\0" . as_ptr () as * const c_char) ; table . set_bind_ip = (gd_api . godot_method_bind_get_method) (class_name , "set_bind_ip\0" . as_ptr () as * const c_char) ; table . set_channel_count = (gd_api . godot_method_bind_get_method) (class_name , "set_channel_count\0" . as_ptr () as * const c_char) ; table . set_compression_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_compression_mode\0" . as_ptr () as * const c_char) ; table . set_dtls_certificate = (gd_api . godot_method_bind_get_method) (class_name , "set_dtls_certificate\0" . as_ptr () as * const c_char) ; table . set_dtls_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_dtls_enabled\0" . as_ptr () as * const c_char) ; table . set_dtls_hostname = (gd_api . godot_method_bind_get_method) (class_name , "set_dtls_hostname\0" . as_ptr () as * const c_char) ; table . set_dtls_key = (gd_api . godot_method_bind_get_method) (class_name , "set_dtls_key\0" . as_ptr () as * const c_char) ; table . set_dtls_verify_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_dtls_verify_enabled\0" . as_ptr () as * const c_char) ; table . set_peer_timeout = (gd_api . godot_method_bind_get_method) (class_name , "set_peer_timeout\0" . as_ptr () as * const c_char) ; table . set_server_relay_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_server_relay_enabled\0" . as_ptr () as * const c_char) ; table . set_transfer_channel = (gd_api . godot_method_bind_get_method) (class_name , "set_transfer_channel\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::networked_multiplayer_enet::private::NetworkedMultiplayerENet;
            
            pub mod networked_multiplayer_peer {
                # ! [doc = "This module contains types related to the API class [`NetworkedMultiplayerPeer`][super::NetworkedMultiplayerPeer]."] pub (crate) mod private { # [doc = "`core class NetworkedMultiplayerPeer` inherits `PacketPeer` (reference-counted).\n\nThis class has related types in the [`networked_multiplayer_peer`][super::networked_multiplayer_peer] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_networkedmultiplayerpeer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nNetworkedMultiplayerPeer inherits methods from:\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NetworkedMultiplayerPeer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NetworkedMultiplayerPeer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ConnectionStatus (pub i64) ; impl ConnectionStatus { pub const DISCONNECTED : ConnectionStatus = ConnectionStatus (0i64) ; pub const CONNECTING : ConnectionStatus = ConnectionStatus (1i64) ; pub const CONNECTED : ConnectionStatus = ConnectionStatus (2i64) ; } impl From < i64 > for ConnectionStatus { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ConnectionStatus > for i64 { # [inline] fn from (v : ConnectionStatus) -> Self { v . 0 } } impl FromVariant for ConnectionStatus { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TransferMode (pub i64) ; impl TransferMode { pub const UNRELIABLE : TransferMode = TransferMode (0i64) ; pub const UNRELIABLE_ORDERED : TransferMode = TransferMode (1i64) ; pub const RELIABLE : TransferMode = TransferMode (2i64) ; } impl From < i64 > for TransferMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TransferMode > for i64 { # [inline] fn from (v : TransferMode) -> Self { v . 0 } } impl FromVariant for TransferMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl NetworkedMultiplayerPeer { pub const CONNECTION_DISCONNECTED : i64 = 0i64 ; pub const TARGET_PEER_BROADCAST : i64 = 0i64 ; pub const TRANSFER_MODE_UNRELIABLE : i64 = 0i64 ; pub const CONNECTION_CONNECTING : i64 = 1i64 ; pub const TARGET_PEER_SERVER : i64 = 1i64 ; pub const TRANSFER_MODE_UNRELIABLE_ORDERED : i64 = 1i64 ; pub const CONNECTION_CONNECTED : i64 = 2i64 ; pub const TRANSFER_MODE_RELIABLE : i64 = 2i64 ; } impl NetworkedMultiplayerPeer { # [doc = "Returns the current state of the connection. See [`ConnectionStatus`][ConnectionStatus]."] # [doc = ""] # [inline] pub fn get_connection_status (& self) -> crate :: generated :: networked_multiplayer_peer :: ConnectionStatus { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . get_connection_status ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: networked_multiplayer_peer :: ConnectionStatus > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the ID of the [`NetworkedMultiplayerPeer`][NetworkedMultiplayerPeer] who sent the most recent packet."] # [doc = ""] # [inline] pub fn get_packet_peer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . get_packet_peer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The manner in which to send packets to the `target_peer`. See [`TransferMode`][TransferMode]."] # [doc = ""] # [inline] pub fn transfer_mode (& self) -> crate :: generated :: networked_multiplayer_peer :: TransferMode { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . get_transfer_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: networked_multiplayer_peer :: TransferMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the ID of this [`NetworkedMultiplayerPeer`][NetworkedMultiplayerPeer]."] # [doc = ""] # [inline] pub fn get_unique_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . get_unique_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, this [`NetworkedMultiplayerPeer`][NetworkedMultiplayerPeer] refuses new connections."] # [doc = ""] # [inline] pub fn is_refusing_new_connections (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . is_refusing_new_connections ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Waits up to 1 second to receive a new network event."] # [doc = ""] # [inline] pub fn poll (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, this [`NetworkedMultiplayerPeer`][NetworkedMultiplayerPeer] refuses new connections."] # [doc = ""] # [inline] pub fn set_refuse_new_connections (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . set_refuse_new_connections ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Sets the peer to which packets will be sent.\nThe `id` can be one of: [`TARGET_PEER_BROADCAST`][Self::TARGET_PEER_BROADCAST] to send to all connected peers, [`TARGET_PEER_SERVER`][Self::TARGET_PEER_SERVER] to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. By default, the target peer is [`TARGET_PEER_BROADCAST`][Self::TARGET_PEER_BROADCAST]."] # [doc = ""] # [inline] pub fn set_target_peer (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . set_target_peer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; } } # [doc = "The manner in which to send packets to the `target_peer`. See [`TransferMode`][TransferMode]."] # [doc = ""] # [inline] pub fn set_transfer_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NetworkedMultiplayerPeerMethodTable :: get (get_api ()) . set_transfer_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NetworkedMultiplayerPeer { } unsafe impl GodotObject for NetworkedMultiplayerPeer { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NetworkedMultiplayerPeer" } } impl std :: ops :: Deref for NetworkedMultiplayerPeer { type Target = crate :: generated :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NetworkedMultiplayerPeer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PacketPeer > for NetworkedMultiplayerPeer { } unsafe impl SubClass < crate :: generated :: Reference > for NetworkedMultiplayerPeer { } unsafe impl SubClass < crate :: generated :: Object > for NetworkedMultiplayerPeer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NetworkedMultiplayerPeerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_connection_status : * mut sys :: godot_method_bind , pub get_packet_peer : * mut sys :: godot_method_bind , pub get_transfer_mode : * mut sys :: godot_method_bind , pub get_unique_id : * mut sys :: godot_method_bind , pub is_refusing_new_connections : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind , pub set_refuse_new_connections : * mut sys :: godot_method_bind , pub set_target_peer : * mut sys :: godot_method_bind , pub set_transfer_mode : * mut sys :: godot_method_bind } impl NetworkedMultiplayerPeerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NetworkedMultiplayerPeerMethodTable = NetworkedMultiplayerPeerMethodTable { class_constructor : None , get_connection_status : 0 as * mut sys :: godot_method_bind , get_packet_peer : 0 as * mut sys :: godot_method_bind , get_transfer_mode : 0 as * mut sys :: godot_method_bind , get_unique_id : 0 as * mut sys :: godot_method_bind , is_refusing_new_connections : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind , set_refuse_new_connections : 0 as * mut sys :: godot_method_bind , set_target_peer : 0 as * mut sys :: godot_method_bind , set_transfer_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NetworkedMultiplayerPeerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NetworkedMultiplayerPeer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_connection_status = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_status\0" . as_ptr () as * const c_char) ; table . get_packet_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_peer\0" . as_ptr () as * const c_char) ; table . get_transfer_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_transfer_mode\0" . as_ptr () as * const c_char) ; table . get_unique_id = (gd_api . godot_method_bind_get_method) (class_name , "get_unique_id\0" . as_ptr () as * const c_char) ; table . is_refusing_new_connections = (gd_api . godot_method_bind_get_method) (class_name , "is_refusing_new_connections\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . set_refuse_new_connections = (gd_api . godot_method_bind_get_method) (class_name , "set_refuse_new_connections\0" . as_ptr () as * const c_char) ; table . set_target_peer = (gd_api . godot_method_bind_get_method) (class_name , "set_target_peer\0" . as_ptr () as * const c_char) ; table . set_transfer_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_transfer_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::networked_multiplayer_peer::private::NetworkedMultiplayerPeer;
            
            pub mod nine_patch_rect {
                # ! [doc = "This module contains types related to the API class [`NinePatchRect`][super::NinePatchRect]."] pub (crate) mod private { # [doc = "`core class NinePatchRect` inherits `Control` (manually managed).\n\nThis class has related types in the [`nine_patch_rect`][super::nine_patch_rect] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_ninepatchrect.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`NinePatchRect` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<NinePatchRect>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNinePatchRect inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NinePatchRect { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NinePatchRect ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AxisStretchMode (pub i64) ; impl AxisStretchMode { pub const STRETCH : AxisStretchMode = AxisStretchMode (0i64) ; pub const TILE : AxisStretchMode = AxisStretchMode (1i64) ; pub const TILE_FIT : AxisStretchMode = AxisStretchMode (2i64) ; } impl From < i64 > for AxisStretchMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AxisStretchMode > for i64 { # [inline] fn from (v : AxisStretchMode) -> Self { v . 0 } } impl FromVariant for AxisStretchMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl NinePatchRect { pub const AXIS_STRETCH_MODE_STRETCH : i64 = 0i64 ; pub const AXIS_STRETCH_MODE_TILE : i64 = 1i64 ; pub const AXIS_STRETCH_MODE_TILE_FIT : i64 = 2i64 ; } impl NinePatchRect { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NinePatchRectMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The stretch mode to use for horizontal stretching/tiling. See [enum NinePatchRect.AxisStretchMode] for possible values."] # [doc = ""] # [inline] pub fn h_axis_stretch_mode (& self) -> crate :: generated :: nine_patch_rect :: AxisStretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_h_axis_stretch_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: nine_patch_rect :: AxisStretchMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the size of the margin identified by the given [`Margin`][Margin] constant."] # [doc = ""] # [inline] pub fn patch_margin (& self , margin : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_patch_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. If the rect is empty, NinePatchRect will use the whole texture."] # [doc = ""] # [inline] pub fn region_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_region_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The node's texture resource."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The stretch mode to use for vertical stretching/tiling. See [enum NinePatchRect.AxisStretchMode] for possible values."] # [doc = ""] # [inline] pub fn v_axis_stretch_mode (& self) -> crate :: generated :: nine_patch_rect :: AxisStretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_v_axis_stretch_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: nine_patch_rect :: AxisStretchMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, draw the panel's center. Else, only draw the 9-slice's borders."] # [doc = ""] # [inline] pub fn is_draw_center_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . is_draw_center_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, draw the panel's center. Else, only draw the 9-slice's borders."] # [doc = ""] # [inline] pub fn set_draw_center (& self , draw_center : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_draw_center ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , draw_center as _) ; } } # [doc = "The stretch mode to use for horizontal stretching/tiling. See [enum NinePatchRect.AxisStretchMode] for possible values."] # [doc = ""] # [inline] pub fn set_h_axis_stretch_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_h_axis_stretch_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Sets the size of the margin identified by the given [`Margin`][Margin] constant to `value` in pixels."] # [doc = ""] # [inline] pub fn set_patch_margin (& self , margin : i64 , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_patch_margin ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , margin as _ , value as _) ; } } # [doc = "Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. If the rect is empty, NinePatchRect will use the whole texture."] # [doc = ""] # [inline] pub fn set_region_rect (& self , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_region_rect ; let ret = crate :: icalls :: icallvar__rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; } } # [doc = "The node's texture resource."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "The stretch mode to use for vertical stretching/tiling. See [enum NinePatchRect.AxisStretchMode] for possible values."] # [doc = ""] # [inline] pub fn set_v_axis_stretch_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_v_axis_stretch_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The height of the 9-slice's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders."] # [doc = ""] # [inline] pub fn patch_margin_bottom (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_patch_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The height of the 9-slice's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders."] # [doc = ""] # [inline] pub fn set_patch_margin_bottom (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_patch_margin ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "The width of the 9-slice's left column. A margin of 16 means the 9-slice's left corners and side will have a width of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders."] # [doc = ""] # [inline] pub fn patch_margin_left (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_patch_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The width of the 9-slice's left column. A margin of 16 means the 9-slice's left corners and side will have a width of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders."] # [doc = ""] # [inline] pub fn set_patch_margin_left (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_patch_margin ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "The width of the 9-slice's right column. A margin of 16 means the 9-slice's right corners and side will have a width of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders."] # [doc = ""] # [inline] pub fn patch_margin_right (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_patch_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The width of the 9-slice's right column. A margin of 16 means the 9-slice's right corners and side will have a width of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders."] # [doc = ""] # [inline] pub fn set_patch_margin_right (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_patch_margin ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "The height of the 9-slice's top row. A margin of 16 means the 9-slice's top corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders."] # [doc = ""] # [inline] pub fn patch_margin_top (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . get_patch_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The height of the 9-slice's top row. A margin of 16 means the 9-slice's top corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders."] # [doc = ""] # [inline] pub fn set_patch_margin_top (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = NinePatchRectMethodTable :: get (get_api ()) . set_patch_margin ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NinePatchRect { } unsafe impl GodotObject for NinePatchRect { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "NinePatchRect" } } impl QueueFree for NinePatchRect { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for NinePatchRect { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NinePatchRect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for NinePatchRect { } unsafe impl SubClass < crate :: generated :: CanvasItem > for NinePatchRect { } unsafe impl SubClass < crate :: generated :: Node > for NinePatchRect { } unsafe impl SubClass < crate :: generated :: Object > for NinePatchRect { } impl Instanciable for NinePatchRect { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { NinePatchRect :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NinePatchRectMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_h_axis_stretch_mode : * mut sys :: godot_method_bind , pub get_patch_margin : * mut sys :: godot_method_bind , pub get_region_rect : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_v_axis_stretch_mode : * mut sys :: godot_method_bind , pub is_draw_center_enabled : * mut sys :: godot_method_bind , pub set_draw_center : * mut sys :: godot_method_bind , pub set_h_axis_stretch_mode : * mut sys :: godot_method_bind , pub set_patch_margin : * mut sys :: godot_method_bind , pub set_region_rect : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_v_axis_stretch_mode : * mut sys :: godot_method_bind } impl NinePatchRectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NinePatchRectMethodTable = NinePatchRectMethodTable { class_constructor : None , get_h_axis_stretch_mode : 0 as * mut sys :: godot_method_bind , get_patch_margin : 0 as * mut sys :: godot_method_bind , get_region_rect : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_v_axis_stretch_mode : 0 as * mut sys :: godot_method_bind , is_draw_center_enabled : 0 as * mut sys :: godot_method_bind , set_draw_center : 0 as * mut sys :: godot_method_bind , set_h_axis_stretch_mode : 0 as * mut sys :: godot_method_bind , set_patch_margin : 0 as * mut sys :: godot_method_bind , set_region_rect : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_v_axis_stretch_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NinePatchRectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NinePatchRect\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_h_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_h_axis_stretch_mode\0" . as_ptr () as * const c_char) ; table . get_patch_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_patch_margin\0" . as_ptr () as * const c_char) ; table . get_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_region_rect\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_v_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_v_axis_stretch_mode\0" . as_ptr () as * const c_char) ; table . is_draw_center_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_draw_center_enabled\0" . as_ptr () as * const c_char) ; table . set_draw_center = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_center\0" . as_ptr () as * const c_char) ; table . set_h_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_h_axis_stretch_mode\0" . as_ptr () as * const c_char) ; table . set_patch_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_patch_margin\0" . as_ptr () as * const c_char) ; table . set_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_region_rect\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_v_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_v_axis_stretch_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::nine_patch_rect::private::NinePatchRect;
            
            pub mod node {
                # ! [doc = "This module contains types related to the API class [`Node`][super::Node]."] pub (crate) mod private { # [doc = "`core class Node` inherits `Object` (manually managed).\n\nThis class has related types in the [`node`][super::node] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_node.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Node` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Node>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNode inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Node { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Node ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DuplicateFlags (pub i64) ; impl DuplicateFlags { pub const SIGNALS : DuplicateFlags = DuplicateFlags (1i64) ; pub const GROUPS : DuplicateFlags = DuplicateFlags (2i64) ; pub const SCRIPTS : DuplicateFlags = DuplicateFlags (4i64) ; pub const USE_INSTANCING : DuplicateFlags = DuplicateFlags (8i64) ; } impl From < i64 > for DuplicateFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DuplicateFlags > for i64 { # [inline] fn from (v : DuplicateFlags) -> Self { v . 0 } } impl FromVariant for DuplicateFlags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PauseMode (pub i64) ; impl PauseMode { pub const INHERIT : PauseMode = PauseMode (0i64) ; pub const STOP : PauseMode = PauseMode (1i64) ; pub const PROCESS : PauseMode = PauseMode (2i64) ; } impl From < i64 > for PauseMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PauseMode > for i64 { # [inline] fn from (v : PauseMode) -> Self { v . 0 } } impl FromVariant for PauseMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PhysicsInterpolationMode (pub i64) ; impl PhysicsInterpolationMode { pub const INHERIT : PhysicsInterpolationMode = PhysicsInterpolationMode (0i64) ; pub const OFF : PhysicsInterpolationMode = PhysicsInterpolationMode (1i64) ; pub const ON : PhysicsInterpolationMode = PhysicsInterpolationMode (2i64) ; } impl From < i64 > for PhysicsInterpolationMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PhysicsInterpolationMode > for i64 { # [inline] fn from (v : PhysicsInterpolationMode) -> Self { v . 0 } } impl FromVariant for PhysicsInterpolationMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Node { pub const PAUSE_MODE_INHERIT : i64 = 0i64 ; pub const PHYSICS_INTERPOLATION_MODE_INHERIT : i64 = 0i64 ; pub const DUPLICATE_SIGNALS : i64 = 1i64 ; pub const PAUSE_MODE_STOP : i64 = 1i64 ; pub const PHYSICS_INTERPOLATION_MODE_OFF : i64 = 1i64 ; pub const DUPLICATE_GROUPS : i64 = 2i64 ; pub const PAUSE_MODE_PROCESS : i64 = 2i64 ; pub const PHYSICS_INTERPOLATION_MODE_ON : i64 = 2i64 ; pub const DUPLICATE_SCRIPTS : i64 = 4i64 ; pub const DUPLICATE_USE_INSTANCING : i64 = 8i64 ; pub const NOTIFICATION_ENTER_TREE : i64 = 10i64 ; pub const NOTIFICATION_EXIT_TREE : i64 = 11i64 ; pub const NOTIFICATION_MOVED_IN_PARENT : i64 = 12i64 ; pub const NOTIFICATION_READY : i64 = 13i64 ; pub const NOTIFICATION_PAUSED : i64 = 14i64 ; pub const NOTIFICATION_UNPAUSED : i64 = 15i64 ; pub const NOTIFICATION_PHYSICS_PROCESS : i64 = 16i64 ; pub const NOTIFICATION_PROCESS : i64 = 17i64 ; pub const NOTIFICATION_PARENTED : i64 = 18i64 ; pub const NOTIFICATION_UNPARENTED : i64 = 19i64 ; pub const NOTIFICATION_INSTANCED : i64 = 20i64 ; pub const NOTIFICATION_DRAG_BEGIN : i64 = 21i64 ; pub const NOTIFICATION_DRAG_END : i64 = 22i64 ; pub const NOTIFICATION_PATH_CHANGED : i64 = 23i64 ; pub const NOTIFICATION_INTERNAL_PROCESS : i64 = 25i64 ; pub const NOTIFICATION_INTERNAL_PHYSICS_PROCESS : i64 = 26i64 ; pub const NOTIFICATION_POST_ENTER_TREE : i64 = 27i64 ; pub const NOTIFICATION_RESET_PHYSICS_INTERPOLATION : i64 = 28i64 ; pub const NOTIFICATION_WM_MOUSE_ENTER : i64 = 1002i64 ; pub const NOTIFICATION_WM_MOUSE_EXIT : i64 = 1003i64 ; pub const NOTIFICATION_WM_FOCUS_IN : i64 = 1004i64 ; pub const NOTIFICATION_WM_FOCUS_OUT : i64 = 1005i64 ; pub const NOTIFICATION_WM_QUIT_REQUEST : i64 = 1006i64 ; pub const NOTIFICATION_WM_GO_BACK_REQUEST : i64 = 1007i64 ; pub const NOTIFICATION_WM_UNFOCUS_REQUEST : i64 = 1008i64 ; pub const NOTIFICATION_OS_MEMORY_WARNING : i64 = 1009i64 ; pub const NOTIFICATION_TRANSLATION_CHANGED : i64 = 1010i64 ; pub const NOTIFICATION_WM_ABOUT : i64 = 1011i64 ; pub const NOTIFICATION_CRASH : i64 = 1012i64 ; pub const NOTIFICATION_OS_IME_UPDATE : i64 = 1013i64 ; pub const NOTIFICATION_APP_RESUMED : i64 = 1014i64 ; pub const NOTIFICATION_APP_PAUSED : i64 = 1015i64 ; } impl Node { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NodeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nAdds a child node. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node.\nIf `legible_unique_name` is `true`, the child node will have a human-readable name based on the name of the node being instanced instead of its type.\n**Note:** If the child node already has a parent, the function will fail. Use [`remove_child`][Self::remove_child] first to remove the node from its current parent. For example:\n```gdscript\nif child_node.get_parent():\n    child_node.get_parent().remove_child(child_node)\nadd_child(child_node)\n```\n**Note:** If you want a child to be persisted to a [`PackedScene`][PackedScene], you must set [`owner`][Self::owner] in addition to calling [`add_child`][Self::add_child]. This is typically relevant for [tool scripts](https://docs.godotengine.org/en/3.5.1/tutorials/plugins/running_code_in_the_editor.html) and [editor plugins]($DOCS_URL/tutorials/plugins/editor/index.html). If [`add_child`][Self::add_child] is called without setting [`owner`][Self::owner], the newly added [`Node`][Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view.\n# Default Arguments\n* `legible_unique_name` - `false`"] # [doc = ""] # [inline] pub fn add_child (& self , node : impl AsArg < crate :: generated :: Node > , legible_unique_name : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . add_child ; let ret = crate :: icalls :: icallvar__obj_bool (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr () , legible_unique_name as _) ; } } # [doc = "Adds `child_node` as a child. The child is placed below the given `node` in the list of children.\nIf `legible_unique_name` is `true`, the child node will have a human-readable name based on the name of the node being instanced instead of its type.\n# Default Arguments\n* `legible_unique_name` - `false`"] # [doc = ""] # [inline] pub fn add_child_below_node (& self , node : impl AsArg < crate :: generated :: Node > , child_node : impl AsArg < crate :: generated :: Node > , legible_unique_name : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . add_child_below_node ; let ret = crate :: icalls :: icallvar__obj_obj_bool (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr () , child_node . as_arg_ptr () , legible_unique_name as _) ; } } # [doc = "Adds the node to a group. Groups are helpers to name and organize a subset of nodes, for example \"enemies\" or \"collectables\". A node can be in any number of groups. Nodes can be assigned a group at any time, but will not be added until they are inside the scene tree (see [`is_inside_tree`][Self::is_inside_tree]). See notes in the description, and the group methods in [`SceneTree`][SceneTree].\nThe `persistent` option is used when packing node to [`PackedScene`][PackedScene] and saving to file. Non-persistent groups aren't stored.\n**Note:** For performance reasons, the order of node groups is _not_ guaranteed. The order of node groups should not be relied upon as it can vary across project runs.\n# Default Arguments\n* `persistent` - `false`"] # [doc = ""] # [inline] pub fn add_to_group (& self , group : impl Into < GodotString > , persistent : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . add_to_group ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , group . into () , persistent as _) ; } } # [doc = "Returns `true` if the node can process while the scene tree is paused (see [`pause_mode`][Self::pause_mode]). Always returns `true` if the scene tree is not paused, and `false` if the node is not in the tree."] # [doc = ""] # [inline] pub fn can_process (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . can_process ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCreates a new [`SceneTreeTween`][SceneTreeTween] and binds it to this node. This is equivalent of doing:\n```gdscript\nget_tree().create_tween().bind_node(self)\n```"] # [doc = ""] # [inline] pub fn create_tween (& self) -> Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . create_tween ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Duplicates the node, returning a new node.\nYou can fine-tune the behavior using the `flags` (see [`DuplicateFlags`][DuplicateFlags]).\n**Note:** It will not work properly if the node contains a script with constructor arguments (i.e. needs to supply arguments to [`Object._init`][Object::_init] method). In that case, the node will be duplicated without a script.\n# Default Arguments\n* `flags` - `15`"] # [doc = ""] # [inline] pub fn duplicate (& self , flags : i64) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . duplicate ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flags as _) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Finds a descendant of this node whose name matches `mask` as in [`String.match`][GodotString::match] (i.e. case-sensitive, but `\"*\"` matches zero or more characters and `\"?\"` matches any single character except `\".\"`). Returns `null` if no matching [`Node`][Node] is found.\n**Note:** It does not match against the full path, just against individual node names.\nIf `owned` is `true`, this method only finds nodes whose owner is this node. This is especially important for scenes instantiated through a script, because those scenes don't have an owner.\n**Note:** As this method walks through all the descendants of the node, it is the slowest way to get a reference to another node. Whenever possible, consider using [`get_node`][Self::get_node] instead. To avoid using [`find_node`][Self::find_node] too often, consider caching the node reference into a variable.\n# Default Arguments\n* `recursive` - `true`\n* `owned` - `true`"] # [doc = ""] # [inline] pub fn find_node (& self , mask : impl Into < GodotString > , recursive : bool , owned : bool) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . find_node ; let ret = crate :: icalls :: icallvar__str_bool_bool (method_bind , self . this . sys () . as_ptr () , mask . into () , recursive as _ , owned as _) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Finds the first parent of the current node whose name matches `mask` as in [`String.match`][GodotString::match] (i.e. case-sensitive, but `\"*\"` matches zero or more characters and `\"?\"` matches any single character except `\".\"`).\n**Note:** It does not match against the full path, just against individual node names.\n**Note:** As this method walks upwards in the scene tree, it can be slow in large, deeply nested scene trees. Whenever possible, consider using [`get_node`][Self::get_node] instead. To avoid using [`find_parent`][Self::find_parent] too often, consider caching the node reference into a variable."] # [doc = ""] # [inline] pub fn find_parent (& self , mask : impl Into < GodotString >) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . find_parent ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , mask . into ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a child node by its index (see [`get_child_count`][Self::get_child_count]). This method is often used for iterating all children of a node.\nTo access a child node via its name, use [`get_node`][Self::get_node]."] # [doc = ""] # [inline] pub fn get_child (& self , idx : i64) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_child ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of child nodes."] # [doc = ""] # [inline] pub fn get_child_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_child_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an array of references to node's children."] # [doc = ""] # [inline] pub fn get_children (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_children ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The override to the default [`MultiplayerAPI`][MultiplayerAPI]. Set to `null` to use the default [`SceneTree`][SceneTree] one."] # [doc = ""] # [inline] pub fn custom_multiplayer (& self) -> Option < Ref < crate :: generated :: MultiplayerAPI , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_custom_multiplayer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: MultiplayerAPI , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If a scene is instantiated from a file, its topmost node contains the absolute file path from which it was loaded in [`filename`][Self::filename] (e.g. `res://levels/1.tscn`). Otherwise, [`filename`][Self::filename] is set to an empty string."] # [doc = ""] # [inline] pub fn filename (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_filename ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns an array listing the groups that the node is a member of.\n**Note:** For performance reasons, the order of node groups is _not_ guaranteed. The order of node groups should not be relied upon as it can vary across project runs.\n**Note:** The engine uses some group names internally (all starting with an underscore). To avoid conflicts with internal groups, do not add custom groups whose name starts with an underscore. To exclude internal groups while looping over [`get_groups`][Self::get_groups], use the following snippet:\n```gdscript\n# Stores the node's non-internal groups only (as an array of Strings).\nvar non_internal_groups = []\nfor group in get_groups():\n    if not group.begins_with(\"_\"):\n        non_internal_groups.push_back(group)\n```"] # [doc = ""] # [inline] pub fn get_groups (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_groups ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the node's index, i.e. its position among the siblings of its parent."] # [doc = ""] # [inline] pub fn get_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The [`MultiplayerAPI`][MultiplayerAPI] instance associated with this node. Either the [`custom_multiplayer`][Self::custom_multiplayer], or the default SceneTree one (if inside tree)."] # [doc = ""] # [inline] pub fn multiplayer (& self) -> Option < Ref < crate :: generated :: MultiplayerAPI , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_multiplayer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: MultiplayerAPI , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed.\n**Note:** Auto-generated names might include the `@` character, which is reserved for unique names when using [`add_child`][Self::add_child]. When setting the name manually, any `@` will be removed."] # [doc = ""] # [inline] pub fn name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the peer ID of the network master for this node. See [`set_network_master`][Self::set_network_master]."] # [doc = ""] # [inline] pub fn get_network_master (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_network_master ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nFetches a node. The [`NodePath`][NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, `null` is returned and an error is logged. Attempts to access methods on the return value will result in an \"Attempt to call <method> on a null instance.\" error.\n**Note:** Fetching absolute paths only works when the node is inside the scene tree (see [`is_inside_tree`][Self::is_inside_tree]).\n**Example:** Assume your current node is Character and the following tree:\n```gdscript\n/root\n/root/Character\n/root/Character/Sword\n/root/Character/Backpack/Dagger\n/root/MyGame\n/root/Swamp/Alligator\n/root/Swamp/Mosquito\n/root/Swamp/Goblin\n```\nPossible paths are:\n```gdscript\nget_node(\"Sword\")\nget_node(\"Backpack/Dagger\")\nget_node(\"../Swamp/Alligator\")\nget_node(\"/root/MyGame\")\n```"] # [doc = ""] # [inline] pub fn get_node (& self , path : impl Into < NodePath >) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_node ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nFetches a node and one of its resources as specified by the [`NodePath`][NodePath]'s subname (e.g. `Area2D/CollisionShape2D:shape`). If several nested resources are specified in the [`NodePath`][NodePath], the last one will be fetched.\nThe return value is an array of size 3: the first index points to the [`Node`][Node] (or `null` if not found), the second index points to the [`Resource`][Resource] (or `null` if not found), and the third index is the remaining [`NodePath`][NodePath], if any.\nFor example, assuming that `Area2D/CollisionShape2D` is a valid node and that its `shape` property has been assigned a [`RectangleShape2D`][RectangleShape2D] resource, one could have this kind of output:\n```gdscript\nprint(get_node_and_resource(\"Area2D/CollisionShape2D\")) # [[CollisionShape2D:1161], Null, ]\nprint(get_node_and_resource(\"Area2D/CollisionShape2D:shape\")) # [[CollisionShape2D:1161], [RectangleShape2D:1156], ]\nprint(get_node_and_resource(\"Area2D/CollisionShape2D:shape:extents\")) # [[CollisionShape2D:1161], [RectangleShape2D:1156], :extents]\n```"] # [doc = ""] # [inline] pub fn get_node_and_resource (& self , path : impl Into < NodePath >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_node_and_resource ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Similar to [`get_node`][Self::get_node], but does not log an error if `path` does not point to a valid [`Node`][Node]."] # [doc = ""] # [inline] pub fn get_node_or_null (& self , path : impl Into < NodePath >) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_node_or_null ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The node owner. A node can have any other node as owner (as long as it is a valid parent, grandparent, etc. ascending in the tree). When saving a node (using [`PackedScene`][PackedScene]), all the nodes it owns will be saved with it. This allows for the creation of complex [`SceneTree`][SceneTree]s, with instancing and subinstancing.\n**Note:** If you want a child to be persisted to a [`PackedScene`][PackedScene], you must set [`owner`][Self::owner] in addition to calling [`add_child`][Self::add_child]. This is typically relevant for [tool scripts](https://docs.godotengine.org/en/3.5.1/tutorials/plugins/running_code_in_the_editor.html) and [editor plugins]($DOCS_URL/tutorials/plugins/editor/index.html). If [`add_child`][Self::add_child] is called without setting [`owner`][Self::owner], the newly added [`Node`][Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view."] # [doc = ""] # [inline] pub fn owner (& self) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_owner ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the parent node of the current node, or `null` if the node lacks a parent."] # [doc = ""] # [inline] pub fn get_parent (& self) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_parent ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the absolute path of the current node. This only works if the current node is inside the scene tree (see [`is_inside_tree`][Self::is_inside_tree])."] # [doc = ""] # [inline] pub fn get_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the relative [`NodePath`][NodePath] from this node to the specified `node`. Both nodes must be in the same scene or the function will fail."] # [doc = ""] # [inline] pub fn get_path_to (& self , node : impl AsArg < crate :: generated :: Node >) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_path_to ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Pause mode. How the node will behave if the [`SceneTree`][SceneTree] is paused."] # [doc = ""] # [inline] pub fn pause_mode (& self) -> crate :: generated :: node :: PauseMode { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_pause_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: node :: PauseMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Allows enabling or disabling physics interpolation per node, offering a finer grain of control than turning physics interpolation on and off globally.\n**Note:** This can be especially useful for [`Camera`][Camera]s, where custom interpolation can sometimes give superior results."] # [doc = ""] # [inline] pub fn physics_interpolation_mode (& self) -> crate :: generated :: node :: PhysicsInterpolationMode { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_physics_interpolation_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: node :: PhysicsInterpolationMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the time elapsed (in seconds) since the last physics-bound frame (see [`_physics_process`][Self::_physics_process]). This is always a constant value in physics processing unless the frames per second is changed via [`Engine.iterations_per_second`][Engine::iterations_per_second]."] # [doc = ""] # [inline] pub fn get_physics_process_delta_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_physics_process_delta_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the node's order in the scene tree branch. For example, if called on the first child node the position is `0`."] # [doc = ""] # [inline] pub fn get_position_in_parent (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_position_in_parent ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the time elapsed (in seconds) since the last process callback. This value may vary from frame to frame."] # [doc = ""] # [inline] pub fn get_process_delta_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_process_delta_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The node's priority in the execution order of the enabled processing callbacks (i.e. [`NOTIFICATION_PROCESS`][Self::NOTIFICATION_PROCESS], [`NOTIFICATION_PHYSICS_PROCESS`][Self::NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose process priority value is _lower_ will have their processing callbacks executed first."] # [doc = ""] # [inline] pub fn process_priority (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_process_priority ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this is an instance load placeholder. See [`InstancePlaceholder`][InstancePlaceholder]."] # [doc = ""] # [inline] pub fn get_scene_instance_load_placeholder (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_scene_instance_load_placeholder ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`SceneTree`][SceneTree] that contains this node."] # [doc = ""] # [inline] pub fn get_tree (& self) -> Option < Ref < crate :: generated :: SceneTree , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_tree ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: SceneTree , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the node's [`Viewport`][Viewport]."] # [doc = ""] # [inline] pub fn get_viewport (& self) -> Option < Ref < crate :: generated :: Viewport , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . get_viewport ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Viewport , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the node that the [`NodePath`][NodePath] points to exists."] # [doc = ""] # [inline] pub fn has_node (& self , path : impl Into < NodePath >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . has_node ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the [`NodePath`][NodePath] points to a valid node and its subname points to a valid resource, e.g. `Area2D/CollisionShape2D:shape`. Properties with a non-[`Resource`][Resource] type (e.g. nodes or primitive math types) are not considered resources."] # [doc = ""] # [inline] pub fn has_node_and_resource (& self , path : impl Into < NodePath >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . has_node_and_resource ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given node is a direct or indirect child of the current node."] # [doc = ""] # [inline] pub fn is_a_parent_of (& self , node : impl AsArg < crate :: generated :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_a_parent_of ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the node is folded (collapsed) in the Scene dock."] # [doc = ""] # [inline] pub fn is_displayed_folded (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_displayed_folded ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given node occurs later in the scene hierarchy than the current node."] # [doc = ""] # [inline] pub fn is_greater_than (& self , node : impl AsArg < crate :: generated :: Node >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_greater_than ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this node is in the specified group. See notes in the description, and the group methods in [`SceneTree`][SceneTree]."] # [doc = ""] # [inline] pub fn is_in_group (& self , group : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_in_group ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , group . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this node is currently inside a [`SceneTree`][SceneTree]."] # [doc = ""] # [inline] pub fn is_inside_tree (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_inside_tree ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the local system is the master of this node."] # [doc = ""] # [inline] pub fn is_network_master (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_network_master ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the physics interpolated flag is set for this Node (see [`physics_interpolation_mode`][Self::physics_interpolation_mode]).\n**Note:** Interpolation will only be active if both the flag is set **and** physics interpolation is enabled within the [`SceneTree`][SceneTree]. This can be tested using [`is_physics_interpolated_and_enabled`][Self::is_physics_interpolated_and_enabled]."] # [doc = ""] # [inline] pub fn is_physics_interpolated (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_physics_interpolated ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if physics interpolation is enabled (see [`physics_interpolation_mode`][Self::physics_interpolation_mode]) **and** enabled in the [`SceneTree`][SceneTree].\nThis is a convenience version of [`is_physics_interpolated`][Self::is_physics_interpolated] that also checks whether physics interpolation is enabled globally.\nSee [`SceneTree.physics_interpolation`][SceneTree::physics_interpolation] and [member ProjectSettings.physics/common/physics_interpolation]."] # [doc = ""] # [inline] pub fn is_physics_interpolated_and_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_physics_interpolated_and_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if physics processing is enabled (see [`set_physics_process`][Self::set_physics_process])."] # [doc = ""] # [inline] pub fn is_physics_processing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_physics_processing ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if internal physics processing is enabled (see [`set_physics_process_internal`][Self::set_physics_process_internal])."] # [doc = ""] # [inline] pub fn is_physics_processing_internal (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_physics_processing_internal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if processing is enabled (see [`set_process`][Self::set_process])."] # [doc = ""] # [inline] pub fn is_processing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_processing ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the node is processing input (see [`set_process_input`][Self::set_process_input])."] # [doc = ""] # [inline] pub fn is_processing_input (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_processing_input ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if internal processing is enabled (see [`set_process_internal`][Self::set_process_internal])."] # [doc = ""] # [inline] pub fn is_processing_internal (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_processing_internal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the node is processing unhandled input (see [`set_process_unhandled_input`][Self::set_process_unhandled_input])."] # [doc = ""] # [inline] pub fn is_processing_unhandled_input (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_processing_unhandled_input ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the node is processing unhandled key input (see [`set_process_unhandled_key_input`][Self::set_process_unhandled_key_input])."] # [doc = ""] # [inline] pub fn is_processing_unhandled_key_input (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_processing_unhandled_key_input ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets this node's name as a unique name in its [`owner`][Self::owner]. This allows the node to be accessed as `%Name` instead of the full path, from any node within that scene.\nIf another node with the same owner already had that name declared as unique, that other node's name will no longer be set as having a unique name."] # [doc = ""] # [inline] pub fn is_unique_name_in_owner (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . is_unique_name_in_owner ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Moves a child node to a different position (order) among the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful."] # [doc = ""] # [inline] pub fn move_child (& self , child_node : impl AsArg < crate :: generated :: Node > , to_position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . move_child ; let ret = crate :: icalls :: icallvar__obj_i64 (method_bind , self . this . sys () . as_ptr () , child_node . as_arg_ptr () , to_position as _) ; } } # [doc = "Prints all stray nodes (nodes outside the [`SceneTree`][SceneTree]). Used for debugging. Works only in debug builds."] # [doc = ""] # [inline] pub fn print_stray_nodes (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . print_stray_nodes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nPrints the tree to stdout. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into the [`get_node`][Self::get_node] function.\n**Example output:**\n```gdscript\nTheGame\nTheGame/Menu\nTheGame/Menu/Label\nTheGame/Menu/Camera2D\nTheGame/SplashScreen\nTheGame/SplashScreen/Camera2D\n```"] # [doc = ""] # [inline] pub fn print_tree (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . print_tree ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSimilar to [`print_tree`][Self::print_tree], this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the scene inspector. It is useful for inspecting larger trees.\n**Example output:**\n```gdscript\n ┖╴TheGame\n    ┠╴Menu\n    ┃  ┠╴Label\n    ┃  ┖╴Camera2D\n    ┖╴SplashScreen\n       ┖╴Camera2D\n```"] # [doc = ""] # [inline] pub fn print_tree_pretty (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . print_tree_pretty ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Calls the given method (if present) with the arguments given in `args` on this node and recursively on all its children. If the `parent_first` argument is `true`, the method will be called on the current node first, then on all its children. If `parent_first` is `false`, the children will be called first.\n# Default Arguments\n* `args` - `[  ]`\n* `parent_first` - `false`"] # [doc = ""] # [inline] pub fn propagate_call (& self , method : impl Into < GodotString > , args : VariantArray , parent_first : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . propagate_call ; let ret = crate :: icalls :: icallvar__str_arr_bool (method_bind , self . this . sys () . as_ptr () , method . into () , args , parent_first as _) ; } } # [doc = "Notifies the current node and all its children recursively by calling [`Object.notification`][Object::notification] on all of them."] # [doc = ""] # [inline] pub fn propagate_notification (& self , what : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . propagate_notification ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , what as _) ; } } # [doc = "Queues a node for deletion at the end of the current frame. When deleted, all of its child nodes will be deleted as well. This method ensures it's safe to delete the node, contrary to [`Object.free`][Object::free]. Use [`Object.is_queued_for_deletion`][Object::is_queued_for_deletion] to check whether a node will be deleted at the end of the frame.\n**Important:** If you have a variable pointing to a node, it will _not_ be assigned to `null` once the node is freed. Instead, it will point to a _previously freed instance_ and you should validate it with [method @GDScript.is_instance_valid] before attempting to call its methods or access its properties."] # [doc = ""] # [inline] pub fn queue_free (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . queue_free ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Moves this node to the bottom of parent node's children hierarchy. This is often useful in GUIs ([`Control`][Control] nodes), because their order of drawing depends on their order in the tree. The top Node is drawn first, then any siblings below the top Node in the hierarchy are successively drawn on top of it. After using `raise`, a Control will be drawn on top of its siblings."] # [doc = ""] # [inline] pub fn raise (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . raise ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes a node and sets all its children as children of the parent node (if it exists). All event subscriptions that pass by the removed node will be unsubscribed."] # [doc = ""] # [inline] pub fn remove_and_skip (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . remove_and_skip ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes a child node. The node is NOT deleted and must be deleted manually.\n**Note:** This function may set the [`owner`][Self::owner] of the removed Node (or its descendants) to be `null`, if that [`owner`][Self::owner] is no longer a parent or ancestor."] # [doc = ""] # [inline] pub fn remove_child (& self , node : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . remove_child ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Removes a node from a group. See notes in the description, and the group methods in [`SceneTree`][SceneTree]."] # [doc = ""] # [inline] pub fn remove_from_group (& self , group : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . remove_from_group ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , group . into ()) ; } } # [doc = "Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost.\n**Note:** The given node will become the new parent of any child nodes that the replaced node had.\n**Note:** The replaced node is not automatically freed, so you either need to keep it in a variable for later use or free it using [`Object.free`][Object::free].\n# Default Arguments\n* `keep_data` - `false`"] # [doc = ""] # [inline] pub fn replace_by (& self , node : impl AsArg < crate :: generated :: Node > , keep_data : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . replace_by ; let ret = crate :: icalls :: icallvar__obj_bool (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr () , keep_data as _) ; } } # [doc = "Requests that `_ready` be called again. Note that the method won't be called immediately, but is scheduled for when the node is added to the scene tree again (see [`_ready`][Self::_ready]). `_ready` is called only for the node which requested it, which means that you need to request ready for each child if you want them to call `_ready` too (in which case, `_ready` will be called in the same order as it would normally)."] # [doc = ""] # [inline] pub fn request_ready (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . request_ready ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "When physics interpolation is active, moving a node to a radically different transform (such as placement within a level) can result in a visible glitch as the object is rendered moving from the old to new position over the physics tick.\nThis glitch can be prevented by calling `reset_physics_interpolation`, which temporarily turns off interpolation until the physics tick is complete.\n[`NOTIFICATION_RESET_PHYSICS_INTERPOLATION`][Self::NOTIFICATION_RESET_PHYSICS_INTERPOLATION] will be received by the node and all children recursively.\n**Note:** This function should be called **after** moving the node, rather than before."] # [doc = ""] # [inline] pub fn reset_physics_interpolation (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . reset_physics_interpolation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sends a remote procedure call request for the given `method` to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [`NodePath`][NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [`rpc_config`][Self::rpc_config]. Methods are not exposed to RPCs by default. See also [`rset`][Self::rset] and [`rset_config`][Self::rset_config] for properties. Returns `null`.\n**Note:** You can only safely use RPCs on clients after you received the `connected_to_server` signal from the [`SceneTree`][SceneTree]. You also need to keep track of the connection state, either by the [`SceneTree`][SceneTree] signals like `server_disconnected` or by checking `SceneTree.network_peer.get_connection_status() == CONNECTION_CONNECTED`."] # [doc = ""] # [inline] pub fn rpc (& self , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . rpc ; let ret = crate :: icalls :: icallvarargs__str (method_bind , self . this . sys () . as_ptr () , method . into () , varargs) ; ret } } # [doc = "Changes the RPC mode for the given `method` to the given `mode`. See [enum MultiplayerAPI.RPCMode]. An alternative is annotating methods and properties with the corresponding keywords (`remote`, `master`, `puppet`, `remotesync`, `mastersync`, `puppetsync`). By default, methods are not exposed to networking (and RPCs). See also [`rset`][Self::rset] and [`rset_config`][Self::rset_config] for properties."] # [doc = ""] # [inline] pub fn rpc_config (& self , method : impl Into < GodotString > , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . rpc_config ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , method . into () , mode as _) ; } } # [doc = "Sends a [`rpc`][Self::rpc] to a specific peer identified by `peer_id` (see [`NetworkedMultiplayerPeer.set_target_peer`][NetworkedMultiplayerPeer::set_target_peer]). Returns `null`."] # [doc = ""] # [inline] pub fn rpc_id (& self , peer_id : i64 , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . rpc_id ; let ret = crate :: icalls :: icallvarargs__i64_str (method_bind , self . this . sys () . as_ptr () , peer_id as _ , method . into () , varargs) ; ret } } # [doc = "Sends a [`rpc`][Self::rpc] using an unreliable protocol. Returns `null`."] # [doc = ""] # [inline] pub fn rpc_unreliable (& self , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . rpc_unreliable ; let ret = crate :: icalls :: icallvarargs__str (method_bind , self . this . sys () . as_ptr () , method . into () , varargs) ; ret } } # [doc = "Sends a [`rpc`][Self::rpc] to a specific peer identified by `peer_id` using an unreliable protocol (see [`NetworkedMultiplayerPeer.set_target_peer`][NetworkedMultiplayerPeer::set_target_peer]). Returns `null`."] # [doc = ""] # [inline] pub fn rpc_unreliable_id (& self , peer_id : i64 , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . rpc_unreliable_id ; let ret = crate :: icalls :: icallvarargs__i64_str (method_bind , self . this . sys () . as_ptr () , peer_id as _ , method . into () , varargs) ; ret } } # [doc = "Remotely changes a property's value on other peers (and locally). Behaviour depends on the RPC configuration for the given property, see [`rset_config`][Self::rset_config]. See also [`rpc`][Self::rpc] for RPCs for methods, most information applies to this method as well."] # [doc = ""] # [inline] pub fn rset (& self , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . rset ; let ret = crate :: icalls :: icallvar__str_var (method_bind , self . this . sys () . as_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "Changes the RPC mode for the given `property` to the given `mode`. See [enum MultiplayerAPI.RPCMode]. An alternative is annotating methods and properties with the corresponding keywords (`remote`, `master`, `puppet`, `remotesync`, `mastersync`, `puppetsync`). By default, properties are not exposed to networking (and RPCs). See also [`rpc`][Self::rpc] and [`rpc_config`][Self::rpc_config] for methods."] # [doc = ""] # [inline] pub fn rset_config (& self , property : impl Into < GodotString > , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . rset_config ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , property . into () , mode as _) ; } } # [doc = "Remotely changes the property's value on a specific peer identified by `peer_id` (see [`NetworkedMultiplayerPeer.set_target_peer`][NetworkedMultiplayerPeer::set_target_peer])."] # [doc = ""] # [inline] pub fn rset_id (& self , peer_id : i64 , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . rset_id ; let ret = crate :: icalls :: icallvar__i64_str_var (method_bind , self . this . sys () . as_ptr () , peer_id as _ , property . into () , value . owned_to_variant ()) ; } } # [doc = "Remotely changes the property's value on other peers (and locally) using an unreliable protocol."] # [doc = ""] # [inline] pub fn rset_unreliable (& self , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . rset_unreliable ; let ret = crate :: icalls :: icallvar__str_var (method_bind , self . this . sys () . as_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "Remotely changes property's value on a specific peer identified by `peer_id` using an unreliable protocol (see [`NetworkedMultiplayerPeer.set_target_peer`][NetworkedMultiplayerPeer::set_target_peer])."] # [doc = ""] # [inline] pub fn rset_unreliable_id (& self , peer_id : i64 , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . rset_unreliable_id ; let ret = crate :: icalls :: icallvar__i64_str_var (method_bind , self . this . sys () . as_ptr () , peer_id as _ , property . into () , value . owned_to_variant ()) ; } } # [doc = "The override to the default [`MultiplayerAPI`][MultiplayerAPI]. Set to `null` to use the default [`SceneTree`][SceneTree] one."] # [doc = ""] # [inline] pub fn set_custom_multiplayer (& self , api : impl AsArg < crate :: generated :: MultiplayerAPI >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_custom_multiplayer ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , api . as_arg_ptr ()) ; } } # [doc = "Sets the folded state of the node in the Scene dock."] # [doc = ""] # [inline] pub fn set_display_folded (& self , fold : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_display_folded ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , fold as _) ; } } # [doc = "If a scene is instantiated from a file, its topmost node contains the absolute file path from which it was loaded in [`filename`][Self::filename] (e.g. `res://levels/1.tscn`). Otherwise, [`filename`][Self::filename] is set to an empty string."] # [doc = ""] # [inline] pub fn set_filename (& self , filename : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_filename ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , filename . into ()) ; } } # [doc = "The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed.\n**Note:** Auto-generated names might include the `@` character, which is reserved for unique names when using [`add_child`][Self::add_child]. When setting the name manually, any `@` will be removed."] # [doc = ""] # [inline] pub fn set_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Sets the node's network master to the peer with the given peer ID. The network master is the peer that has authority over the node on the network. Useful in conjunction with the `master` and `puppet` keywords. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). If `recursive`, the given peer is recursively set as the master for all children of this node.\n# Default Arguments\n* `recursive` - `true`"] # [doc = ""] # [inline] pub fn set_network_master (& self , id : i64 , recursive : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_network_master ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , id as _ , recursive as _) ; } } # [doc = "The node owner. A node can have any other node as owner (as long as it is a valid parent, grandparent, etc. ascending in the tree). When saving a node (using [`PackedScene`][PackedScene]), all the nodes it owns will be saved with it. This allows for the creation of complex [`SceneTree`][SceneTree]s, with instancing and subinstancing.\n**Note:** If you want a child to be persisted to a [`PackedScene`][PackedScene], you must set [`owner`][Self::owner] in addition to calling [`add_child`][Self::add_child]. This is typically relevant for [tool scripts](https://docs.godotengine.org/en/3.5.1/tutorials/plugins/running_code_in_the_editor.html) and [editor plugins]($DOCS_URL/tutorials/plugins/editor/index.html). If [`add_child`][Self::add_child] is called without setting [`owner`][Self::owner], the newly added [`Node`][Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view."] # [doc = ""] # [inline] pub fn set_owner (& self , owner : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_owner ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , owner . as_arg_ptr ()) ; } } # [doc = "Pause mode. How the node will behave if the [`SceneTree`][SceneTree] is paused."] # [doc = ""] # [inline] pub fn set_pause_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_pause_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Allows enabling or disabling physics interpolation per node, offering a finer grain of control than turning physics interpolation on and off globally.\n**Note:** This can be especially useful for [`Camera`][Camera]s, where custom interpolation can sometimes give superior results."] # [doc = ""] # [inline] pub fn set_physics_interpolation_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_physics_interpolation_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a [`NOTIFICATION_PHYSICS_PROCESS`][Self::NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [`Engine.iterations_per_second`][Engine::iterations_per_second] to change) interval (and the [`_physics_process`][Self::_physics_process] callback will be called if exists). Enabled automatically if [`_physics_process`][Self::_physics_process] is overridden. Any calls to this before [`_ready`][Self::_ready] will be ignored."] # [doc = ""] # [inline] pub fn set_physics_process (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_physics_process ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal [`_physics_process`][Self::_physics_process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting ([`set_physics_process`][Self::set_physics_process]). Only useful for advanced uses to manipulate built-in nodes' behavior.\n**Warning:** Built-in Nodes rely on the internal processing for their own logic, so changing this value from your code may lead to unexpected behavior. Script access to this internal logic is provided for specific advanced uses, but is unsafe and not supported."] # [doc = ""] # [inline] pub fn set_physics_process_internal (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_physics_process_internal ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Enables or disables processing. When a node is being processed, it will receive a [`NOTIFICATION_PROCESS`][Self::NOTIFICATION_PROCESS] on every drawn frame (and the [`_process`][Self::_process] callback will be called if exists). Enabled automatically if [`_process`][Self::_process] is overridden. Any calls to this before [`_ready`][Self::_ready] will be ignored."] # [doc = ""] # [inline] pub fn set_process (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_process ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Enables or disables input processing. This is not required for GUI controls! Enabled automatically if [`_input`][Self::_input] is overridden. Any calls to this before [`_ready`][Self::_ready] will be ignored."] # [doc = ""] # [inline] pub fn set_process_input (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_process_input ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal [`_process`][Self::_process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting ([`set_process`][Self::set_process]). Only useful for advanced uses to manipulate built-in nodes' behavior.\n**Warning:** Built-in Nodes rely on the internal processing for their own logic, so changing this value from your code may lead to unexpected behavior. Script access to this internal logic is provided for specific advanced uses, but is unsafe and not supported."] # [doc = ""] # [inline] pub fn set_process_internal (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_process_internal ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The node's priority in the execution order of the enabled processing callbacks (i.e. [`NOTIFICATION_PROCESS`][Self::NOTIFICATION_PROCESS], [`NOTIFICATION_PHYSICS_PROCESS`][Self::NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose process priority value is _lower_ will have their processing callbacks executed first."] # [doc = ""] # [inline] pub fn set_process_priority (& self , priority : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_process_priority ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , priority as _) ; } } # [doc = "Enables unhandled input processing. This is not required for GUI controls! It enables the node to receive all input that was not previously handled (usually by a [`Control`][Control]). Enabled automatically if [`_unhandled_input`][Self::_unhandled_input] is overridden. Any calls to this before [`_ready`][Self::_ready] will be ignored."] # [doc = ""] # [inline] pub fn set_process_unhandled_input (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_process_unhandled_input ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Enables unhandled key input processing. Enabled automatically if [`_unhandled_key_input`][Self::_unhandled_key_input] is overridden. Any calls to this before [`_ready`][Self::_ready] will be ignored."] # [doc = ""] # [inline] pub fn set_process_unhandled_key_input (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_process_unhandled_key_input ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Sets whether this is an instance load placeholder. See [`InstancePlaceholder`][InstancePlaceholder]."] # [doc = ""] # [inline] pub fn set_scene_instance_load_placeholder (& self , load_placeholder : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_scene_instance_load_placeholder ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , load_placeholder as _) ; } } # [doc = "Sets this node's name as a unique name in its [`owner`][Self::owner]. This allows the node to be accessed as `%Name` instead of the full path, from any node within that scene.\nIf another node with the same owner already had that name declared as unique, that other node's name will no longer be set as having a unique name."] # [doc = ""] # [inline] pub fn set_unique_name_in_owner (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . set_unique_name_in_owner ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Updates the warning displayed for this node in the Scene Dock.\nUse [`_get_configuration_warning`][Self::_get_configuration_warning] to setup the warning message to display."] # [doc = ""] # [inline] pub fn update_configuration_warning (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NodeMethodTable :: get (get_api ()) . update_configuration_warning ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Node { } unsafe impl GodotObject for Node { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Node" } } impl QueueFree for Node { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Node { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Node { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for Node { } impl Instanciable for Node { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Node :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NodeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_child : * mut sys :: godot_method_bind , pub add_child_below_node : * mut sys :: godot_method_bind , pub add_to_group : * mut sys :: godot_method_bind , pub can_process : * mut sys :: godot_method_bind , pub create_tween : * mut sys :: godot_method_bind , pub duplicate : * mut sys :: godot_method_bind , pub find_node : * mut sys :: godot_method_bind , pub find_parent : * mut sys :: godot_method_bind , pub get_child : * mut sys :: godot_method_bind , pub get_child_count : * mut sys :: godot_method_bind , pub get_children : * mut sys :: godot_method_bind , pub get_custom_multiplayer : * mut sys :: godot_method_bind , pub get_filename : * mut sys :: godot_method_bind , pub get_groups : * mut sys :: godot_method_bind , pub get_index : * mut sys :: godot_method_bind , pub get_multiplayer : * mut sys :: godot_method_bind , pub get_name : * mut sys :: godot_method_bind , pub get_network_master : * mut sys :: godot_method_bind , pub get_node : * mut sys :: godot_method_bind , pub get_node_and_resource : * mut sys :: godot_method_bind , pub get_node_or_null : * mut sys :: godot_method_bind , pub get_owner : * mut sys :: godot_method_bind , pub get_parent : * mut sys :: godot_method_bind , pub get_path : * mut sys :: godot_method_bind , pub get_path_to : * mut sys :: godot_method_bind , pub get_pause_mode : * mut sys :: godot_method_bind , pub get_physics_interpolation_mode : * mut sys :: godot_method_bind , pub get_physics_process_delta_time : * mut sys :: godot_method_bind , pub get_position_in_parent : * mut sys :: godot_method_bind , pub get_process_delta_time : * mut sys :: godot_method_bind , pub get_process_priority : * mut sys :: godot_method_bind , pub get_scene_instance_load_placeholder : * mut sys :: godot_method_bind , pub get_tree : * mut sys :: godot_method_bind , pub get_viewport : * mut sys :: godot_method_bind , pub has_node : * mut sys :: godot_method_bind , pub has_node_and_resource : * mut sys :: godot_method_bind , pub is_a_parent_of : * mut sys :: godot_method_bind , pub is_displayed_folded : * mut sys :: godot_method_bind , pub is_greater_than : * mut sys :: godot_method_bind , pub is_in_group : * mut sys :: godot_method_bind , pub is_inside_tree : * mut sys :: godot_method_bind , pub is_network_master : * mut sys :: godot_method_bind , pub is_physics_interpolated : * mut sys :: godot_method_bind , pub is_physics_interpolated_and_enabled : * mut sys :: godot_method_bind , pub is_physics_processing : * mut sys :: godot_method_bind , pub is_physics_processing_internal : * mut sys :: godot_method_bind , pub is_processing : * mut sys :: godot_method_bind , pub is_processing_input : * mut sys :: godot_method_bind , pub is_processing_internal : * mut sys :: godot_method_bind , pub is_processing_unhandled_input : * mut sys :: godot_method_bind , pub is_processing_unhandled_key_input : * mut sys :: godot_method_bind , pub is_unique_name_in_owner : * mut sys :: godot_method_bind , pub move_child : * mut sys :: godot_method_bind , pub print_stray_nodes : * mut sys :: godot_method_bind , pub print_tree : * mut sys :: godot_method_bind , pub print_tree_pretty : * mut sys :: godot_method_bind , pub propagate_call : * mut sys :: godot_method_bind , pub propagate_notification : * mut sys :: godot_method_bind , pub queue_free : * mut sys :: godot_method_bind , pub raise : * mut sys :: godot_method_bind , pub remove_and_skip : * mut sys :: godot_method_bind , pub remove_child : * mut sys :: godot_method_bind , pub remove_from_group : * mut sys :: godot_method_bind , pub replace_by : * mut sys :: godot_method_bind , pub request_ready : * mut sys :: godot_method_bind , pub reset_physics_interpolation : * mut sys :: godot_method_bind , pub rpc : * mut sys :: godot_method_bind , pub rpc_config : * mut sys :: godot_method_bind , pub rpc_id : * mut sys :: godot_method_bind , pub rpc_unreliable : * mut sys :: godot_method_bind , pub rpc_unreliable_id : * mut sys :: godot_method_bind , pub rset : * mut sys :: godot_method_bind , pub rset_config : * mut sys :: godot_method_bind , pub rset_id : * mut sys :: godot_method_bind , pub rset_unreliable : * mut sys :: godot_method_bind , pub rset_unreliable_id : * mut sys :: godot_method_bind , pub set_custom_multiplayer : * mut sys :: godot_method_bind , pub set_display_folded : * mut sys :: godot_method_bind , pub set_filename : * mut sys :: godot_method_bind , pub set_name : * mut sys :: godot_method_bind , pub set_network_master : * mut sys :: godot_method_bind , pub set_owner : * mut sys :: godot_method_bind , pub set_pause_mode : * mut sys :: godot_method_bind , pub set_physics_interpolation_mode : * mut sys :: godot_method_bind , pub set_physics_process : * mut sys :: godot_method_bind , pub set_physics_process_internal : * mut sys :: godot_method_bind , pub set_process : * mut sys :: godot_method_bind , pub set_process_input : * mut sys :: godot_method_bind , pub set_process_internal : * mut sys :: godot_method_bind , pub set_process_priority : * mut sys :: godot_method_bind , pub set_process_unhandled_input : * mut sys :: godot_method_bind , pub set_process_unhandled_key_input : * mut sys :: godot_method_bind , pub set_scene_instance_load_placeholder : * mut sys :: godot_method_bind , pub set_unique_name_in_owner : * mut sys :: godot_method_bind , pub update_configuration_warning : * mut sys :: godot_method_bind } impl NodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NodeMethodTable = NodeMethodTable { class_constructor : None , add_child : 0 as * mut sys :: godot_method_bind , add_child_below_node : 0 as * mut sys :: godot_method_bind , add_to_group : 0 as * mut sys :: godot_method_bind , can_process : 0 as * mut sys :: godot_method_bind , create_tween : 0 as * mut sys :: godot_method_bind , duplicate : 0 as * mut sys :: godot_method_bind , find_node : 0 as * mut sys :: godot_method_bind , find_parent : 0 as * mut sys :: godot_method_bind , get_child : 0 as * mut sys :: godot_method_bind , get_child_count : 0 as * mut sys :: godot_method_bind , get_children : 0 as * mut sys :: godot_method_bind , get_custom_multiplayer : 0 as * mut sys :: godot_method_bind , get_filename : 0 as * mut sys :: godot_method_bind , get_groups : 0 as * mut sys :: godot_method_bind , get_index : 0 as * mut sys :: godot_method_bind , get_multiplayer : 0 as * mut sys :: godot_method_bind , get_name : 0 as * mut sys :: godot_method_bind , get_network_master : 0 as * mut sys :: godot_method_bind , get_node : 0 as * mut sys :: godot_method_bind , get_node_and_resource : 0 as * mut sys :: godot_method_bind , get_node_or_null : 0 as * mut sys :: godot_method_bind , get_owner : 0 as * mut sys :: godot_method_bind , get_parent : 0 as * mut sys :: godot_method_bind , get_path : 0 as * mut sys :: godot_method_bind , get_path_to : 0 as * mut sys :: godot_method_bind , get_pause_mode : 0 as * mut sys :: godot_method_bind , get_physics_interpolation_mode : 0 as * mut sys :: godot_method_bind , get_physics_process_delta_time : 0 as * mut sys :: godot_method_bind , get_position_in_parent : 0 as * mut sys :: godot_method_bind , get_process_delta_time : 0 as * mut sys :: godot_method_bind , get_process_priority : 0 as * mut sys :: godot_method_bind , get_scene_instance_load_placeholder : 0 as * mut sys :: godot_method_bind , get_tree : 0 as * mut sys :: godot_method_bind , get_viewport : 0 as * mut sys :: godot_method_bind , has_node : 0 as * mut sys :: godot_method_bind , has_node_and_resource : 0 as * mut sys :: godot_method_bind , is_a_parent_of : 0 as * mut sys :: godot_method_bind , is_displayed_folded : 0 as * mut sys :: godot_method_bind , is_greater_than : 0 as * mut sys :: godot_method_bind , is_in_group : 0 as * mut sys :: godot_method_bind , is_inside_tree : 0 as * mut sys :: godot_method_bind , is_network_master : 0 as * mut sys :: godot_method_bind , is_physics_interpolated : 0 as * mut sys :: godot_method_bind , is_physics_interpolated_and_enabled : 0 as * mut sys :: godot_method_bind , is_physics_processing : 0 as * mut sys :: godot_method_bind , is_physics_processing_internal : 0 as * mut sys :: godot_method_bind , is_processing : 0 as * mut sys :: godot_method_bind , is_processing_input : 0 as * mut sys :: godot_method_bind , is_processing_internal : 0 as * mut sys :: godot_method_bind , is_processing_unhandled_input : 0 as * mut sys :: godot_method_bind , is_processing_unhandled_key_input : 0 as * mut sys :: godot_method_bind , is_unique_name_in_owner : 0 as * mut sys :: godot_method_bind , move_child : 0 as * mut sys :: godot_method_bind , print_stray_nodes : 0 as * mut sys :: godot_method_bind , print_tree : 0 as * mut sys :: godot_method_bind , print_tree_pretty : 0 as * mut sys :: godot_method_bind , propagate_call : 0 as * mut sys :: godot_method_bind , propagate_notification : 0 as * mut sys :: godot_method_bind , queue_free : 0 as * mut sys :: godot_method_bind , raise : 0 as * mut sys :: godot_method_bind , remove_and_skip : 0 as * mut sys :: godot_method_bind , remove_child : 0 as * mut sys :: godot_method_bind , remove_from_group : 0 as * mut sys :: godot_method_bind , replace_by : 0 as * mut sys :: godot_method_bind , request_ready : 0 as * mut sys :: godot_method_bind , reset_physics_interpolation : 0 as * mut sys :: godot_method_bind , rpc : 0 as * mut sys :: godot_method_bind , rpc_config : 0 as * mut sys :: godot_method_bind , rpc_id : 0 as * mut sys :: godot_method_bind , rpc_unreliable : 0 as * mut sys :: godot_method_bind , rpc_unreliable_id : 0 as * mut sys :: godot_method_bind , rset : 0 as * mut sys :: godot_method_bind , rset_config : 0 as * mut sys :: godot_method_bind , rset_id : 0 as * mut sys :: godot_method_bind , rset_unreliable : 0 as * mut sys :: godot_method_bind , rset_unreliable_id : 0 as * mut sys :: godot_method_bind , set_custom_multiplayer : 0 as * mut sys :: godot_method_bind , set_display_folded : 0 as * mut sys :: godot_method_bind , set_filename : 0 as * mut sys :: godot_method_bind , set_name : 0 as * mut sys :: godot_method_bind , set_network_master : 0 as * mut sys :: godot_method_bind , set_owner : 0 as * mut sys :: godot_method_bind , set_pause_mode : 0 as * mut sys :: godot_method_bind , set_physics_interpolation_mode : 0 as * mut sys :: godot_method_bind , set_physics_process : 0 as * mut sys :: godot_method_bind , set_physics_process_internal : 0 as * mut sys :: godot_method_bind , set_process : 0 as * mut sys :: godot_method_bind , set_process_input : 0 as * mut sys :: godot_method_bind , set_process_internal : 0 as * mut sys :: godot_method_bind , set_process_priority : 0 as * mut sys :: godot_method_bind , set_process_unhandled_input : 0 as * mut sys :: godot_method_bind , set_process_unhandled_key_input : 0 as * mut sys :: godot_method_bind , set_scene_instance_load_placeholder : 0 as * mut sys :: godot_method_bind , set_unique_name_in_owner : 0 as * mut sys :: godot_method_bind , update_configuration_warning : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Node\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_child = (gd_api . godot_method_bind_get_method) (class_name , "add_child\0" . as_ptr () as * const c_char) ; table . add_child_below_node = (gd_api . godot_method_bind_get_method) (class_name , "add_child_below_node\0" . as_ptr () as * const c_char) ; table . add_to_group = (gd_api . godot_method_bind_get_method) (class_name , "add_to_group\0" . as_ptr () as * const c_char) ; table . can_process = (gd_api . godot_method_bind_get_method) (class_name , "can_process\0" . as_ptr () as * const c_char) ; table . create_tween = (gd_api . godot_method_bind_get_method) (class_name , "create_tween\0" . as_ptr () as * const c_char) ; table . duplicate = (gd_api . godot_method_bind_get_method) (class_name , "duplicate\0" . as_ptr () as * const c_char) ; table . find_node = (gd_api . godot_method_bind_get_method) (class_name , "find_node\0" . as_ptr () as * const c_char) ; table . find_parent = (gd_api . godot_method_bind_get_method) (class_name , "find_parent\0" . as_ptr () as * const c_char) ; table . get_child = (gd_api . godot_method_bind_get_method) (class_name , "get_child\0" . as_ptr () as * const c_char) ; table . get_child_count = (gd_api . godot_method_bind_get_method) (class_name , "get_child_count\0" . as_ptr () as * const c_char) ; table . get_children = (gd_api . godot_method_bind_get_method) (class_name , "get_children\0" . as_ptr () as * const c_char) ; table . get_custom_multiplayer = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_multiplayer\0" . as_ptr () as * const c_char) ; table . get_filename = (gd_api . godot_method_bind_get_method) (class_name , "get_filename\0" . as_ptr () as * const c_char) ; table . get_groups = (gd_api . godot_method_bind_get_method) (class_name , "get_groups\0" . as_ptr () as * const c_char) ; table . get_index = (gd_api . godot_method_bind_get_method) (class_name , "get_index\0" . as_ptr () as * const c_char) ; table . get_multiplayer = (gd_api . godot_method_bind_get_method) (class_name , "get_multiplayer\0" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\0" . as_ptr () as * const c_char) ; table . get_network_master = (gd_api . godot_method_bind_get_method) (class_name , "get_network_master\0" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\0" . as_ptr () as * const c_char) ; table . get_node_and_resource = (gd_api . godot_method_bind_get_method) (class_name , "get_node_and_resource\0" . as_ptr () as * const c_char) ; table . get_node_or_null = (gd_api . godot_method_bind_get_method) (class_name , "get_node_or_null\0" . as_ptr () as * const c_char) ; table . get_owner = (gd_api . godot_method_bind_get_method) (class_name , "get_owner\0" . as_ptr () as * const c_char) ; table . get_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_parent\0" . as_ptr () as * const c_char) ; table . get_path = (gd_api . godot_method_bind_get_method) (class_name , "get_path\0" . as_ptr () as * const c_char) ; table . get_path_to = (gd_api . godot_method_bind_get_method) (class_name , "get_path_to\0" . as_ptr () as * const c_char) ; table . get_pause_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_pause_mode\0" . as_ptr () as * const c_char) ; table . get_physics_interpolation_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_interpolation_mode\0" . as_ptr () as * const c_char) ; table . get_physics_process_delta_time = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_process_delta_time\0" . as_ptr () as * const c_char) ; table . get_position_in_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_position_in_parent\0" . as_ptr () as * const c_char) ; table . get_process_delta_time = (gd_api . godot_method_bind_get_method) (class_name , "get_process_delta_time\0" . as_ptr () as * const c_char) ; table . get_process_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_process_priority\0" . as_ptr () as * const c_char) ; table . get_scene_instance_load_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "get_scene_instance_load_placeholder\0" . as_ptr () as * const c_char) ; table . get_tree = (gd_api . godot_method_bind_get_method) (class_name , "get_tree\0" . as_ptr () as * const c_char) ; table . get_viewport = (gd_api . godot_method_bind_get_method) (class_name , "get_viewport\0" . as_ptr () as * const c_char) ; table . has_node = (gd_api . godot_method_bind_get_method) (class_name , "has_node\0" . as_ptr () as * const c_char) ; table . has_node_and_resource = (gd_api . godot_method_bind_get_method) (class_name , "has_node_and_resource\0" . as_ptr () as * const c_char) ; table . is_a_parent_of = (gd_api . godot_method_bind_get_method) (class_name , "is_a_parent_of\0" . as_ptr () as * const c_char) ; table . is_displayed_folded = (gd_api . godot_method_bind_get_method) (class_name , "is_displayed_folded\0" . as_ptr () as * const c_char) ; table . is_greater_than = (gd_api . godot_method_bind_get_method) (class_name , "is_greater_than\0" . as_ptr () as * const c_char) ; table . is_in_group = (gd_api . godot_method_bind_get_method) (class_name , "is_in_group\0" . as_ptr () as * const c_char) ; table . is_inside_tree = (gd_api . godot_method_bind_get_method) (class_name , "is_inside_tree\0" . as_ptr () as * const c_char) ; table . is_network_master = (gd_api . godot_method_bind_get_method) (class_name , "is_network_master\0" . as_ptr () as * const c_char) ; table . is_physics_interpolated = (gd_api . godot_method_bind_get_method) (class_name , "is_physics_interpolated\0" . as_ptr () as * const c_char) ; table . is_physics_interpolated_and_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_physics_interpolated_and_enabled\0" . as_ptr () as * const c_char) ; table . is_physics_processing = (gd_api . godot_method_bind_get_method) (class_name , "is_physics_processing\0" . as_ptr () as * const c_char) ; table . is_physics_processing_internal = (gd_api . godot_method_bind_get_method) (class_name , "is_physics_processing_internal\0" . as_ptr () as * const c_char) ; table . is_processing = (gd_api . godot_method_bind_get_method) (class_name , "is_processing\0" . as_ptr () as * const c_char) ; table . is_processing_input = (gd_api . godot_method_bind_get_method) (class_name , "is_processing_input\0" . as_ptr () as * const c_char) ; table . is_processing_internal = (gd_api . godot_method_bind_get_method) (class_name , "is_processing_internal\0" . as_ptr () as * const c_char) ; table . is_processing_unhandled_input = (gd_api . godot_method_bind_get_method) (class_name , "is_processing_unhandled_input\0" . as_ptr () as * const c_char) ; table . is_processing_unhandled_key_input = (gd_api . godot_method_bind_get_method) (class_name , "is_processing_unhandled_key_input\0" . as_ptr () as * const c_char) ; table . is_unique_name_in_owner = (gd_api . godot_method_bind_get_method) (class_name , "is_unique_name_in_owner\0" . as_ptr () as * const c_char) ; table . move_child = (gd_api . godot_method_bind_get_method) (class_name , "move_child\0" . as_ptr () as * const c_char) ; table . print_stray_nodes = (gd_api . godot_method_bind_get_method) (class_name , "print_stray_nodes\0" . as_ptr () as * const c_char) ; table . print_tree = (gd_api . godot_method_bind_get_method) (class_name , "print_tree\0" . as_ptr () as * const c_char) ; table . print_tree_pretty = (gd_api . godot_method_bind_get_method) (class_name , "print_tree_pretty\0" . as_ptr () as * const c_char) ; table . propagate_call = (gd_api . godot_method_bind_get_method) (class_name , "propagate_call\0" . as_ptr () as * const c_char) ; table . propagate_notification = (gd_api . godot_method_bind_get_method) (class_name , "propagate_notification\0" . as_ptr () as * const c_char) ; table . queue_free = (gd_api . godot_method_bind_get_method) (class_name , "queue_free\0" . as_ptr () as * const c_char) ; table . raise = (gd_api . godot_method_bind_get_method) (class_name , "raise\0" . as_ptr () as * const c_char) ; table . remove_and_skip = (gd_api . godot_method_bind_get_method) (class_name , "remove_and_skip\0" . as_ptr () as * const c_char) ; table . remove_child = (gd_api . godot_method_bind_get_method) (class_name , "remove_child\0" . as_ptr () as * const c_char) ; table . remove_from_group = (gd_api . godot_method_bind_get_method) (class_name , "remove_from_group\0" . as_ptr () as * const c_char) ; table . replace_by = (gd_api . godot_method_bind_get_method) (class_name , "replace_by\0" . as_ptr () as * const c_char) ; table . request_ready = (gd_api . godot_method_bind_get_method) (class_name , "request_ready\0" . as_ptr () as * const c_char) ; table . reset_physics_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "reset_physics_interpolation\0" . as_ptr () as * const c_char) ; table . rpc = (gd_api . godot_method_bind_get_method) (class_name , "rpc\0" . as_ptr () as * const c_char) ; table . rpc_config = (gd_api . godot_method_bind_get_method) (class_name , "rpc_config\0" . as_ptr () as * const c_char) ; table . rpc_id = (gd_api . godot_method_bind_get_method) (class_name , "rpc_id\0" . as_ptr () as * const c_char) ; table . rpc_unreliable = (gd_api . godot_method_bind_get_method) (class_name , "rpc_unreliable\0" . as_ptr () as * const c_char) ; table . rpc_unreliable_id = (gd_api . godot_method_bind_get_method) (class_name , "rpc_unreliable_id\0" . as_ptr () as * const c_char) ; table . rset = (gd_api . godot_method_bind_get_method) (class_name , "rset\0" . as_ptr () as * const c_char) ; table . rset_config = (gd_api . godot_method_bind_get_method) (class_name , "rset_config\0" . as_ptr () as * const c_char) ; table . rset_id = (gd_api . godot_method_bind_get_method) (class_name , "rset_id\0" . as_ptr () as * const c_char) ; table . rset_unreliable = (gd_api . godot_method_bind_get_method) (class_name , "rset_unreliable\0" . as_ptr () as * const c_char) ; table . rset_unreliable_id = (gd_api . godot_method_bind_get_method) (class_name , "rset_unreliable_id\0" . as_ptr () as * const c_char) ; table . set_custom_multiplayer = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_multiplayer\0" . as_ptr () as * const c_char) ; table . set_display_folded = (gd_api . godot_method_bind_get_method) (class_name , "set_display_folded\0" . as_ptr () as * const c_char) ; table . set_filename = (gd_api . godot_method_bind_get_method) (class_name , "set_filename\0" . as_ptr () as * const c_char) ; table . set_name = (gd_api . godot_method_bind_get_method) (class_name , "set_name\0" . as_ptr () as * const c_char) ; table . set_network_master = (gd_api . godot_method_bind_get_method) (class_name , "set_network_master\0" . as_ptr () as * const c_char) ; table . set_owner = (gd_api . godot_method_bind_get_method) (class_name , "set_owner\0" . as_ptr () as * const c_char) ; table . set_pause_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_pause_mode\0" . as_ptr () as * const c_char) ; table . set_physics_interpolation_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_interpolation_mode\0" . as_ptr () as * const c_char) ; table . set_physics_process = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_process\0" . as_ptr () as * const c_char) ; table . set_physics_process_internal = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_process_internal\0" . as_ptr () as * const c_char) ; table . set_process = (gd_api . godot_method_bind_get_method) (class_name , "set_process\0" . as_ptr () as * const c_char) ; table . set_process_input = (gd_api . godot_method_bind_get_method) (class_name , "set_process_input\0" . as_ptr () as * const c_char) ; table . set_process_internal = (gd_api . godot_method_bind_get_method) (class_name , "set_process_internal\0" . as_ptr () as * const c_char) ; table . set_process_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_process_priority\0" . as_ptr () as * const c_char) ; table . set_process_unhandled_input = (gd_api . godot_method_bind_get_method) (class_name , "set_process_unhandled_input\0" . as_ptr () as * const c_char) ; table . set_process_unhandled_key_input = (gd_api . godot_method_bind_get_method) (class_name , "set_process_unhandled_key_input\0" . as_ptr () as * const c_char) ; table . set_scene_instance_load_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "set_scene_instance_load_placeholder\0" . as_ptr () as * const c_char) ; table . set_unique_name_in_owner = (gd_api . godot_method_bind_get_method) (class_name , "set_unique_name_in_owner\0" . as_ptr () as * const c_char) ; table . update_configuration_warning = (gd_api . godot_method_bind_get_method) (class_name , "update_configuration_warning\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::node::private::Node;
            
            pub(crate) mod node_2d {
                # ! [doc = "This module contains types related to the API class [`Node2D`][super::Node2D]."] pub (crate) mod private { # [doc = "`core class Node2D` inherits `CanvasItem` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_node2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Node2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Node2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nNode2D inherits methods from:\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Node2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Node2D ; impl Node2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Node2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Multiplies the current scale by the `ratio` vector."] # [doc = ""] # [inline] pub fn apply_scale (& self , ratio : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . apply_scale ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , ratio) ; } } # [doc = "Returns the angle between the node and the `point` in radians.\n[Illustration of the returned angle.](https://raw.githubusercontent.com/godotengine/godot-docs/master/img/node2d_get_angle_to.png)"] # [doc = ""] # [inline] pub fn get_angle_to (& self , point : Vector2) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_angle_to ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , point) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Global position."] # [doc = ""] # [inline] pub fn global_position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_global_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Global rotation in radians."] # [doc = ""] # [inline] pub fn global_rotation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_global_rotation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Global rotation in degrees."] # [doc = ""] # [inline] pub fn global_rotation_degrees (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_global_rotation_degrees ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Global scale."] # [doc = ""] # [inline] pub fn global_scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_global_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Position, relative to the node's parent."] # [doc = ""] # [inline] pub fn position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`Transform2D`][Transform2D] relative to this node's parent."] # [doc = ""] # [inline] pub fn get_relative_transform_to_parent (& self , parent : impl AsArg < crate :: generated :: Node >) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_relative_transform_to_parent ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , parent . as_arg_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Rotation in radians, relative to the node's parent."] # [doc = ""] # [inline] pub fn rotation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_rotation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Rotation in degrees, relative to the node's parent."] # [doc = ""] # [inline] pub fn rotation_degrees (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_rotation_degrees ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The node's scale. Unscaled value: `(1, 1)`.\n**Note:** Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed."] # [doc = ""] # [inline] pub fn scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Must be between [`VisualServer.CANVAS_ITEM_Z_MIN`][VisualServer::CANVAS_ITEM_Z_MIN] and [`VisualServer.CANVAS_ITEM_Z_MAX`][VisualServer::CANVAS_ITEM_Z_MAX] (inclusive)."] # [doc = ""] # [inline] pub fn z_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . get_z_index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Adds the `offset` vector to the node's global position."] # [doc = ""] # [inline] pub fn global_translate (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . global_translate ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "If `true`, the node's Z index is relative to its parent's Z index. If this node's Z index is 2 and its parent's effective Z index is 3, then this node's effective Z index will be 2 + 3 = 5."] # [doc = ""] # [inline] pub fn is_z_relative (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . is_z_relative ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Rotates the node so it points towards the `point`, which is expected to use global coordinates."] # [doc = ""] # [inline] pub fn look_at (& self , point : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . look_at ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , point) ; } } # [doc = "Applies a local translation on the node's X axis based on the [`Node._process`][Node::_process]'s `delta`. If `scaled` is `false`, normalizes the movement.\n# Default Arguments\n* `scaled` - `false`"] # [doc = ""] # [inline] pub fn move_local_x (& self , delta : f64 , scaled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . move_local_x ; let ret = crate :: icalls :: icallvar__f64_bool (method_bind , self . this . sys () . as_ptr () , delta as _ , scaled as _) ; } } # [doc = "Applies a local translation on the node's Y axis based on the [`Node._process`][Node::_process]'s `delta`. If `scaled` is `false`, normalizes the movement.\n# Default Arguments\n* `scaled` - `false`"] # [doc = ""] # [inline] pub fn move_local_y (& self , delta : f64 , scaled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . move_local_y ; let ret = crate :: icalls :: icallvar__f64_bool (method_bind , self . this . sys () . as_ptr () , delta as _ , scaled as _) ; } } # [doc = "Applies a rotation to the node, in radians, starting from its current rotation."] # [doc = ""] # [inline] pub fn rotate (& self , radians : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . rotate ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radians as _) ; } } # [doc = "Global position."] # [doc = ""] # [inline] pub fn set_global_position (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_global_position ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "Global rotation in radians."] # [doc = ""] # [inline] pub fn set_global_rotation (& self , radians : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_global_rotation ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radians as _) ; } } # [doc = "Global rotation in degrees."] # [doc = ""] # [inline] pub fn set_global_rotation_degrees (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_global_rotation_degrees ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , degrees as _) ; } } # [doc = "Global scale."] # [doc = ""] # [inline] pub fn set_global_scale (& self , scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_global_scale ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Global [`Transform2D`][Transform2D]."] # [doc = ""] # [inline] pub fn set_global_transform (& self , xform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_global_transform ; let ret = crate :: icalls :: icallvar__trans2D (method_bind , self . this . sys () . as_ptr () , xform) ; } } # [doc = "Position, relative to the node's parent."] # [doc = ""] # [inline] pub fn set_position (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_position ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "Rotation in radians, relative to the node's parent."] # [doc = ""] # [inline] pub fn set_rotation (& self , radians : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_rotation ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radians as _) ; } } # [doc = "Rotation in degrees, relative to the node's parent."] # [doc = ""] # [inline] pub fn set_rotation_degrees (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_rotation_degrees ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , degrees as _) ; } } # [doc = "The node's scale. Unscaled value: `(1, 1)`.\n**Note:** Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed."] # [doc = ""] # [inline] pub fn set_scale (& self , scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_scale ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Local [`Transform2D`][Transform2D]."] # [doc = ""] # [inline] pub fn set_transform (& self , xform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_transform ; let ret = crate :: icalls :: icallvar__trans2D (method_bind , self . this . sys () . as_ptr () , xform) ; } } # [doc = "If `true`, the node's Z index is relative to its parent's Z index. If this node's Z index is 2 and its parent's effective Z index is 3, then this node's effective Z index will be 2 + 3 = 5."] # [doc = ""] # [inline] pub fn set_z_as_relative (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_z_as_relative ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Must be between [`VisualServer.CANVAS_ITEM_Z_MIN`][VisualServer::CANVAS_ITEM_Z_MIN] and [`VisualServer.CANVAS_ITEM_Z_MAX`][VisualServer::CANVAS_ITEM_Z_MAX] (inclusive)."] # [doc = ""] # [inline] pub fn set_z_index (& self , z_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . set_z_index ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , z_index as _) ; } } # [doc = "Transforms the provided local position into a position in global coordinate space. The input is expected to be local relative to the [`Node2D`][Node2D] it is called on. e.g. Applying this method to the positions of child nodes will correctly transform their positions into the global coordinate space, but applying it to a node's own position will give an incorrect result, as it will incorporate the node's own transformation into its global position."] # [doc = ""] # [inline] pub fn to_global (& self , local_point : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . to_global ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , local_point) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Transforms the provided global position into a position in local coordinate space. The output will be local relative to the [`Node2D`][Node2D] it is called on. e.g. It is appropriate for determining the positions of child nodes, but it is not appropriate for determining its own position relative to its parent."] # [doc = ""] # [inline] pub fn to_local (& self , global_point : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . to_local ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , global_point) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Translates the node by the given `offset` in local coordinates."] # [doc = ""] # [inline] pub fn translate (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Node2DMethodTable :: get (get_api ()) . translate ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Node2D { } unsafe impl GodotObject for Node2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Node2D" } } impl QueueFree for Node2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Node2D { type Target = crate :: generated :: CanvasItem ; # [inline] fn deref (& self) -> & crate :: generated :: CanvasItem { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Node2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CanvasItem { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CanvasItem > for Node2D { } unsafe impl SubClass < crate :: generated :: Node > for Node2D { } unsafe impl SubClass < crate :: generated :: Object > for Node2D { } impl Instanciable for Node2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Node2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Node2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub apply_scale : * mut sys :: godot_method_bind , pub get_angle_to : * mut sys :: godot_method_bind , pub get_global_position : * mut sys :: godot_method_bind , pub get_global_rotation : * mut sys :: godot_method_bind , pub get_global_rotation_degrees : * mut sys :: godot_method_bind , pub get_global_scale : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub get_relative_transform_to_parent : * mut sys :: godot_method_bind , pub get_rotation : * mut sys :: godot_method_bind , pub get_rotation_degrees : * mut sys :: godot_method_bind , pub get_scale : * mut sys :: godot_method_bind , pub get_z_index : * mut sys :: godot_method_bind , pub global_translate : * mut sys :: godot_method_bind , pub is_z_relative : * mut sys :: godot_method_bind , pub look_at : * mut sys :: godot_method_bind , pub move_local_x : * mut sys :: godot_method_bind , pub move_local_y : * mut sys :: godot_method_bind , pub rotate : * mut sys :: godot_method_bind , pub set_global_position : * mut sys :: godot_method_bind , pub set_global_rotation : * mut sys :: godot_method_bind , pub set_global_rotation_degrees : * mut sys :: godot_method_bind , pub set_global_scale : * mut sys :: godot_method_bind , pub set_global_transform : * mut sys :: godot_method_bind , pub set_position : * mut sys :: godot_method_bind , pub set_rotation : * mut sys :: godot_method_bind , pub set_rotation_degrees : * mut sys :: godot_method_bind , pub set_scale : * mut sys :: godot_method_bind , pub set_transform : * mut sys :: godot_method_bind , pub set_z_as_relative : * mut sys :: godot_method_bind , pub set_z_index : * mut sys :: godot_method_bind , pub to_global : * mut sys :: godot_method_bind , pub to_local : * mut sys :: godot_method_bind , pub translate : * mut sys :: godot_method_bind } impl Node2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Node2DMethodTable = Node2DMethodTable { class_constructor : None , apply_scale : 0 as * mut sys :: godot_method_bind , get_angle_to : 0 as * mut sys :: godot_method_bind , get_global_position : 0 as * mut sys :: godot_method_bind , get_global_rotation : 0 as * mut sys :: godot_method_bind , get_global_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_global_scale : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , get_relative_transform_to_parent : 0 as * mut sys :: godot_method_bind , get_rotation : 0 as * mut sys :: godot_method_bind , get_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_scale : 0 as * mut sys :: godot_method_bind , get_z_index : 0 as * mut sys :: godot_method_bind , global_translate : 0 as * mut sys :: godot_method_bind , is_z_relative : 0 as * mut sys :: godot_method_bind , look_at : 0 as * mut sys :: godot_method_bind , move_local_x : 0 as * mut sys :: godot_method_bind , move_local_y : 0 as * mut sys :: godot_method_bind , rotate : 0 as * mut sys :: godot_method_bind , set_global_position : 0 as * mut sys :: godot_method_bind , set_global_rotation : 0 as * mut sys :: godot_method_bind , set_global_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_global_scale : 0 as * mut sys :: godot_method_bind , set_global_transform : 0 as * mut sys :: godot_method_bind , set_position : 0 as * mut sys :: godot_method_bind , set_rotation : 0 as * mut sys :: godot_method_bind , set_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_scale : 0 as * mut sys :: godot_method_bind , set_transform : 0 as * mut sys :: godot_method_bind , set_z_as_relative : 0 as * mut sys :: godot_method_bind , set_z_index : 0 as * mut sys :: godot_method_bind , to_global : 0 as * mut sys :: godot_method_bind , to_local : 0 as * mut sys :: godot_method_bind , translate : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Node2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Node2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . apply_scale = (gd_api . godot_method_bind_get_method) (class_name , "apply_scale\0" . as_ptr () as * const c_char) ; table . get_angle_to = (gd_api . godot_method_bind_get_method) (class_name , "get_angle_to\0" . as_ptr () as * const c_char) ; table . get_global_position = (gd_api . godot_method_bind_get_method) (class_name , "get_global_position\0" . as_ptr () as * const c_char) ; table . get_global_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_global_rotation\0" . as_ptr () as * const c_char) ; table . get_global_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_global_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_global_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_global_scale\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_relative_transform_to_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_relative_transform_to_parent\0" . as_ptr () as * const c_char) ; table . get_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation\0" . as_ptr () as * const c_char) ; table . get_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_scale\0" . as_ptr () as * const c_char) ; table . get_z_index = (gd_api . godot_method_bind_get_method) (class_name , "get_z_index\0" . as_ptr () as * const c_char) ; table . global_translate = (gd_api . godot_method_bind_get_method) (class_name , "global_translate\0" . as_ptr () as * const c_char) ; table . is_z_relative = (gd_api . godot_method_bind_get_method) (class_name , "is_z_relative\0" . as_ptr () as * const c_char) ; table . look_at = (gd_api . godot_method_bind_get_method) (class_name , "look_at\0" . as_ptr () as * const c_char) ; table . move_local_x = (gd_api . godot_method_bind_get_method) (class_name , "move_local_x\0" . as_ptr () as * const c_char) ; table . move_local_y = (gd_api . godot_method_bind_get_method) (class_name , "move_local_y\0" . as_ptr () as * const c_char) ; table . rotate = (gd_api . godot_method_bind_get_method) (class_name , "rotate\0" . as_ptr () as * const c_char) ; table . set_global_position = (gd_api . godot_method_bind_get_method) (class_name , "set_global_position\0" . as_ptr () as * const c_char) ; table . set_global_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_global_rotation\0" . as_ptr () as * const c_char) ; table . set_global_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_global_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_global_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_global_scale\0" . as_ptr () as * const c_char) ; table . set_global_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_global_transform\0" . as_ptr () as * const c_char) ; table . set_position = (gd_api . godot_method_bind_get_method) (class_name , "set_position\0" . as_ptr () as * const c_char) ; table . set_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation\0" . as_ptr () as * const c_char) ; table . set_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_scale\0" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\0" . as_ptr () as * const c_char) ; table . set_z_as_relative = (gd_api . godot_method_bind_get_method) (class_name , "set_z_as_relative\0" . as_ptr () as * const c_char) ; table . set_z_index = (gd_api . godot_method_bind_get_method) (class_name , "set_z_index\0" . as_ptr () as * const c_char) ; table . to_global = (gd_api . godot_method_bind_get_method) (class_name , "to_global\0" . as_ptr () as * const c_char) ; table . to_local = (gd_api . godot_method_bind_get_method) (class_name , "to_local\0" . as_ptr () as * const c_char) ; table . translate = (gd_api . godot_method_bind_get_method) (class_name , "translate\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::node_2d::private::Node2D;
            
            pub(crate) mod noise_texture {
                # ! [doc = "This module contains types related to the API class [`NoiseTexture`][super::NoiseTexture]."] pub (crate) mod private { # [doc = "`core class NoiseTexture` inherits `Texture` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_noisetexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nNoiseTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct NoiseTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: NoiseTexture ; impl NoiseTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = NoiseTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn bump_strength (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . get_bump_strength ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn noise (& self) -> Option < Ref < crate :: generated :: OpenSimplexNoise , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . get_noise ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: OpenSimplexNoise , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn noise_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . get_noise_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn seamless (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . get_seamless ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_normalmap (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . is_normalmap ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_as_normalmap (& self , as_normalmap : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_as_normalmap ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , as_normalmap as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bump_strength (& self , bump_strength : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_bump_strength ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , bump_strength as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_height (& self , height : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_noise (& self , noise : impl AsArg < crate :: generated :: OpenSimplexNoise >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_noise ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , noise . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_noise_offset (& self , noise_offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_noise_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , noise_offset) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_seamless (& self , seamless : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_seamless ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , seamless as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_width (& self , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = NoiseTextureMethodTable :: get (get_api ()) . set_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , width as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for NoiseTexture { } unsafe impl GodotObject for NoiseTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "NoiseTexture" } } impl std :: ops :: Deref for NoiseTexture { type Target = crate :: generated :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for NoiseTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Texture > for NoiseTexture { } unsafe impl SubClass < crate :: generated :: Resource > for NoiseTexture { } unsafe impl SubClass < crate :: generated :: Reference > for NoiseTexture { } unsafe impl SubClass < crate :: generated :: Object > for NoiseTexture { } impl Instanciable for NoiseTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { NoiseTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct NoiseTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bump_strength : * mut sys :: godot_method_bind , pub get_noise : * mut sys :: godot_method_bind , pub get_noise_offset : * mut sys :: godot_method_bind , pub get_seamless : * mut sys :: godot_method_bind , pub is_normalmap : * mut sys :: godot_method_bind , pub set_as_normalmap : * mut sys :: godot_method_bind , pub set_bump_strength : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_noise : * mut sys :: godot_method_bind , pub set_noise_offset : * mut sys :: godot_method_bind , pub set_seamless : * mut sys :: godot_method_bind , pub set_width : * mut sys :: godot_method_bind } impl NoiseTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : NoiseTextureMethodTable = NoiseTextureMethodTable { class_constructor : None , get_bump_strength : 0 as * mut sys :: godot_method_bind , get_noise : 0 as * mut sys :: godot_method_bind , get_noise_offset : 0 as * mut sys :: godot_method_bind , get_seamless : 0 as * mut sys :: godot_method_bind , is_normalmap : 0 as * mut sys :: godot_method_bind , set_as_normalmap : 0 as * mut sys :: godot_method_bind , set_bump_strength : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_noise : 0 as * mut sys :: godot_method_bind , set_noise_offset : 0 as * mut sys :: godot_method_bind , set_seamless : 0 as * mut sys :: godot_method_bind , set_width : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { NoiseTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "NoiseTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bump_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_bump_strength\0" . as_ptr () as * const c_char) ; table . get_noise = (gd_api . godot_method_bind_get_method) (class_name , "get_noise\0" . as_ptr () as * const c_char) ; table . get_noise_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_noise_offset\0" . as_ptr () as * const c_char) ; table . get_seamless = (gd_api . godot_method_bind_get_method) (class_name , "get_seamless\0" . as_ptr () as * const c_char) ; table . is_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "is_normalmap\0" . as_ptr () as * const c_char) ; table . set_as_normalmap = (gd_api . godot_method_bind_get_method) (class_name , "set_as_normalmap\0" . as_ptr () as * const c_char) ; table . set_bump_strength = (gd_api . godot_method_bind_get_method) (class_name , "set_bump_strength\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_noise = (gd_api . godot_method_bind_get_method) (class_name , "set_noise\0" . as_ptr () as * const c_char) ; table . set_noise_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_noise_offset\0" . as_ptr () as * const c_char) ; table . set_seamless = (gd_api . godot_method_bind_get_method) (class_name , "set_seamless\0" . as_ptr () as * const c_char) ; table . set_width = (gd_api . godot_method_bind_get_method) (class_name , "set_width\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::noise_texture::private::NoiseTexture;
            
            pub mod object {
                # ! [doc = "This module contains types related to the API class [`Object`][super::Object]."] pub (crate) mod private { # [doc = "The base class of all classes in the Godot hierarchy.\n\nThis class has related types in the [`object`][super::object] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_object.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Object` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Object>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = ""] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Object { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Object ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ConnectFlags (pub i64) ; impl ConnectFlags { pub const DEFERRED : ConnectFlags = ConnectFlags (1i64) ; pub const PERSIST : ConnectFlags = ConnectFlags (2i64) ; pub const ONESHOT : ConnectFlags = ConnectFlags (4i64) ; pub const REFERENCE_COUNTED : ConnectFlags = ConnectFlags (8i64) ; } impl From < i64 > for ConnectFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ConnectFlags > for i64 { # [inline] fn from (v : ConnectFlags) -> Self { v . 0 } } impl FromVariant for ConnectFlags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Object { pub const NOTIFICATION_POSTINITIALIZE : i64 = 0i64 ; pub const CONNECT_DEFERRED : i64 = 1i64 ; pub const NOTIFICATION_PREDELETE : i64 = 1i64 ; pub const CONNECT_PERSIST : i64 = 2i64 ; pub const CONNECT_ONESHOT : i64 = 4i64 ; pub const CONNECT_REFERENCE_COUNTED : i64 = 8i64 ; } impl Object { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ObjectMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a user-defined `signal`. Arguments are optional, but can be added as an [`Array`][VariantArray] of dictionaries, each containing `name: String` and `type: int` (see [enum Variant.Type]) entries.\n# Default Arguments\n* `arguments` - `[  ]`"] # [doc = ""] # [inline] pub fn add_user_signal (& self , signal : impl Into < GodotString > , arguments : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . add_user_signal ; let ret = crate :: icalls :: icallvar__str_arr (method_bind , self . this . sys () . as_ptr () , signal . into () , arguments) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCalls the `method` on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:\n```gdscript\ncall(\"set\", \"position\", Vector2(42.0, 0.0))\n```\n**Note:** In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase)."] # [doc = "\n# Safety\nThis function bypasses Rust's static type checks (aliasing, thread boundaries, calls to free(), ...)."] # [inline] pub unsafe fn call (& self , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . call ; let ret = crate :: icalls :: icallvarargs__str (method_bind , self . this . sys () . as_ptr () , method . into () , varargs) ; ret } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCalls the `method` on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:\n```gdscript\ncall_deferred(\"set\", \"position\", Vector2(42.0, 0.0))\n```\n**Note:** In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase)."] # [doc = "\n# Safety\nThis function bypasses Rust's static type checks (aliasing, thread boundaries, calls to free(), ...)."] # [inline] pub unsafe fn call_deferred (& self , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . call_deferred ; let ret = crate :: icalls :: icallvarargs__str (method_bind , self . this . sys () . as_ptr () , method . into () , varargs) ; ret } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCalls the `method` on the object and returns the result. Contrarily to [`call`][Self::call], this method does not support a variable number of arguments but expects all parameters to be via a single [`Array`][VariantArray].\n```gdscript\ncallv(\"set\", [ \"position\", Vector2(42.0, 0.0) ])\n```"] # [doc = "\n# Safety\nThis function bypasses Rust's static type checks (aliasing, thread boundaries, calls to free(), ...)."] # [inline] pub unsafe fn callv (& self , method : impl Into < GodotString > , arg_array : VariantArray) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . callv ; let ret = crate :: icalls :: icallvar__str_arr (method_bind , self . this . sys () . as_ptr () , method . into () , arg_array) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the object can translate strings. See [`set_message_translation`][Self::set_message_translation] and [`tr`][Self::tr]."] # [doc = ""] # [inline] pub fn can_translate_messages (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . can_translate_messages ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nConnects a `signal` to a `method` on a `target` object. Pass optional `binds` to the call as an [`Array`][VariantArray] of parameters. These parameters will be passed to the method after any parameter used in the call to [`emit_signal`][Self::emit_signal]. Use `flags` to set deferred or one-shot connections. See [`ConnectFlags`][ConnectFlags] constants.\nA `signal` can only be connected once to a `method`. It will print an error if already connected, unless the signal was connected with [`CONNECT_REFERENCE_COUNTED`][Self::CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [`is_connected`][Self::is_connected] to check for existing connections.\nIf the `target` is destroyed in the game's lifecycle, the connection will be lost.\nExamples:\n```gdscript\nconnect(\"pressed\", self, \"_on_Button_pressed\") # BaseButton signal\nconnect(\"text_entered\", self, \"_on_LineEdit_text_entered\") # LineEdit signal\nconnect(\"hit\", self, \"_on_Player_hit\", [ weapon_type, damage ]) # User-defined signal\n```\nAn example of the relationship between `binds` passed to [`connect`][Self::connect] and parameters used when calling [`emit_signal`][Self::emit_signal]:\n```gdscript\nconnect(\"hit\", self, \"_on_Player_hit\", [ weapon_type, damage ]) # weapon_type and damage are passed last\nemit_signal(\"hit\", \"Dark lord\", 5) # \"Dark lord\" and 5 are passed first\nfunc _on_Player_hit(hit_by, level, weapon_type, damage):\n    print(\"Hit by %s (lvl %d) with weapon %s for %d damage\" % [hit_by, level, weapon_type, damage])\n```\n# Default Arguments\n* `binds` - `[  ]`\n* `flags` - `0`"] # [doc = ""] # [inline] pub fn connect (& self , signal : impl Into < GodotString > , target : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString > , binds : VariantArray , flags : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . connect ; let ret = crate :: icalls :: icallvar__str_obj_str_arr_i64 (method_bind , self . this . sys () . as_ptr () , signal . into () , target . as_arg_ptr () , method . into () , binds , flags as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Disconnects a `signal` from a `method` on the given `target`.\nIf you try to disconnect a connection that does not exist, the method will print an error. Use [`is_connected`][Self::is_connected] to ensure that the connection exists."] # [doc = ""] # [inline] pub fn disconnect (& self , signal : impl Into < GodotString > , target : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . disconnect ; let ret = crate :: icalls :: icallvar__str_obj_str (method_bind , self . this . sys () . as_ptr () , signal . into () , target . as_arg_ptr () , method . into ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nEmits the given `signal`. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:\n```gdscript\nemit_signal(\"hit\", weapon_type, damage)\nemit_signal(\"game_over\")\n```"] # [doc = ""] # [inline] pub fn emit_signal (& self , signal : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . emit_signal ; let ret = crate :: icalls :: icallvarargs__str (method_bind , self . this . sys () . as_ptr () , signal . into () , varargs) ; ret } } # [doc = "Returns the [`Variant`][Variant] value of the given `property`. If the `property` doesn't exist, this will return `null`.\n**Note:** In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase)."] # [doc = ""] # [inline] pub fn get (& self , property : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , property . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the object's class as a [`String`][GodotString]. See also [`is_class`][Self::is_class].\n**Note:** [`get_class`][Self::get_class] does not take `class_name` declarations into account. If the object has a `class_name` defined, the base class name will be returned instead."] # [doc = ""] # [inline] pub fn get_class (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_class ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an [`Array`][VariantArray] of dictionaries with information about signals that are connected to the object.\nEach [`Dictionary`][Dictionary] contains three String entries:\n- `source` is a reference to the signal emitter.\n- `signal_name` is the name of the connected signal.\n- `method_name` is the name of the method to which the signal is connected."] # [doc = ""] # [inline] pub fn get_incoming_connections (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_incoming_connections ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the object's property indexed by the given [`NodePath`][NodePath]. The node path should be relative to the current object and can use the colon character (`:`) to access nested properties. Examples: `\"position:x\"` or `\"material:next_pass:blend_mode\"`.\n**Note:** Even though the method takes [`NodePath`][NodePath] argument, it doesn't support actual paths to [`Node`][Node]s in the scene tree, only colon-separated sub-property paths. For the purpose of nodes, use [`Node.get_node_and_resource`][Node::get_node_and_resource] instead."] # [doc = ""] # [inline] pub fn get_indexed (& self , property : impl Into < NodePath >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_indexed ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , property . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the object's unique instance ID.\nThis ID can be saved in [`EncodedObjectAsID`][EncodedObjectAsID], and can be used to retrieve the object instance with [method @GDScript.instance_from_id]."] # [doc = ""] # [inline] pub fn get_instance_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_instance_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the object's metadata entry for the given `name`.\nThrows error if the entry does not exist, unless `default` is not `null` (in which case the default value will be returned).\n# Default Arguments\n* `default` - `null`"] # [doc = ""] # [inline] pub fn get_meta (& self , name : impl Into < GodotString > , default : impl OwnedToVariant) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_meta ; let ret = crate :: icalls :: icallvar__str_var (method_bind , self . this . sys () . as_ptr () , name . into () , default . owned_to_variant ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the object's metadata as a [`PoolStringArray`][PoolArray<GodotString>]."] # [doc = ""] # [inline] pub fn get_meta_list (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_meta_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the object's methods and their signatures as an [`Array`][VariantArray]."] # [doc = ""] # [inline] pub fn get_method_list (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_method_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the object's property list as an [`Array`][VariantArray] of dictionaries.\nEach property's [`Dictionary`][Dictionary] contain at least `name: String` and `type: int` (see [enum Variant.Type]) entries. Optionally, it can also include `hint: int` (see [`PropertyHint`][PropertyHint]), `hint_string: String`, and `usage: int` (see [`PropertyUsageFlags`][PropertyUsageFlags])."] # [doc = ""] # [inline] pub fn get_property_list (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_property_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the object's [`Script`][Script] instance, or `null` if none is assigned."] # [doc = ""] # [inline] pub fn get_script (& self) -> Option < Ref < crate :: generated :: Reference , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_script ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Reference , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an [`Array`][VariantArray] of connections for the given `signal`."] # [doc = ""] # [inline] pub fn get_signal_connection_list (& self , signal : impl Into < GodotString >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_signal_connection_list ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , signal . into ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the list of signals as an [`Array`][VariantArray] of dictionaries."] # [doc = ""] # [inline] pub fn get_signal_list (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . get_signal_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if a metadata entry is found with the given `name`."] # [doc = ""] # [inline] pub fn has_meta (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . has_meta ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the object contains the given `method`."] # [doc = ""] # [inline] pub fn has_method (& self , method : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . has_method ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , method . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given `signal` exists."] # [doc = ""] # [inline] pub fn has_signal (& self , signal : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . has_signal ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , signal . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given user-defined `signal` exists. Only signals added using [`add_user_signal`][Self::add_user_signal] are taken into account."] # [doc = ""] # [inline] pub fn has_user_signal (& self , signal : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . has_user_signal ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , signal . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if signal emission blocking is enabled."] # [doc = ""] # [inline] pub fn is_blocking_signals (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . is_blocking_signals ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the object inherits from the given `class`. See also [`get_class`][Self::get_class].\n**Note:** [`is_class`][Self::is_class] does not take `class_name` declarations into account. If the object has a `class_name` defined, [`is_class`][Self::is_class] will return `false` for that name."] # [doc = ""] # [inline] pub fn is_class (& self , class : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . is_class ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if a connection exists for a given `signal`, `target`, and `method`."] # [doc = ""] # [inline] pub fn is_connected (& self , signal : impl Into < GodotString > , target : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . is_connected ; let ret = crate :: icalls :: icallvar__str_obj_str (method_bind , self . this . sys () . as_ptr () , signal . into () , target . as_arg_ptr () , method . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the [`Node.queue_free`][Node::queue_free] method was called for the object."] # [doc = ""] # [inline] pub fn is_queued_for_deletion (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . is_queued_for_deletion ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Send a given notification to the object, which will also trigger a call to the [`_notification`][Self::_notification] method of all classes that the object inherits from.\nIf `reversed` is `true`, [`_notification`][Self::_notification] is called first on the object's own class, and then up to its successive parent classes. If `reversed` is `false`, [`_notification`][Self::_notification] is called first on the highest ancestor ([`Object`][Object] itself), and then down to its successive inheriting classes.\n# Default Arguments\n* `reversed` - `false`"] # [doc = ""] # [inline] pub fn notification (& self , what : i64 , reversed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . notification ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , what as _ , reversed as _) ; } } # [doc = "Notify the editor that the property list has changed, so that editor plugins can take the new values into account. Does nothing on export builds."] # [doc = ""] # [inline] pub fn property_list_changed_notify (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . property_list_changed_notify ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes a given entry from the object's metadata. See also [`set_meta`][Self::set_meta]."] # [doc = ""] # [inline] pub fn remove_meta (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . remove_meta ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Assigns a new value to the given property. If the `property` does not exist or the given value's type doesn't match, nothing will happen.\n**Note:** In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase)."] # [doc = ""] # [inline] pub fn set (& self , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . set ; let ret = crate :: icalls :: icallvar__str_var (method_bind , self . this . sys () . as_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "If set to `true`, signal emission is blocked."] # [doc = ""] # [inline] pub fn set_block_signals (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . set_block_signals ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling [`set`][Self::set] via [`call_deferred`][Self::call_deferred], i.e. `call_deferred(\"set\", property, value)`.\n**Note:** In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase)."] # [doc = ""] # [inline] pub fn set_deferred (& self , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . set_deferred ; let ret = crate :: icalls :: icallvar__str_var (method_bind , self . this . sys () . as_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nAssigns a new value to the property identified by the [`NodePath`][NodePath]. The node path should be relative to the current object and can use the colon character (`:`) to access nested properties. Example:\n```gdscript\nset_indexed(\"position\", Vector2(42, 0))\nset_indexed(\"position:y\", -10)\nprint(position) # (42, -10)\n```"] # [doc = ""] # [inline] pub fn set_indexed (& self , property : impl Into < NodePath > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . set_indexed ; let ret = crate :: icalls :: icallvar__nodepath_var (method_bind , self . this . sys () . as_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "Defines whether the object can translate strings (with calls to [`tr`][Self::tr]). Enabled by default."] # [doc = ""] # [inline] pub fn set_message_translation (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . set_message_translation ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any [`Variant`][Variant] value.\nTo remove a given entry from the object's metadata, use [`remove_meta`][Self::remove_meta]. Metadata is also removed if its value is set to `null`. This means you can also use `set_meta(\"name\", null)` to remove metadata for `\"name\"`."] # [doc = ""] # [inline] pub fn set_meta (& self , name : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . set_meta ; let ret = crate :: icalls :: icallvar__str_var (method_bind , self . this . sys () . as_ptr () , name . into () , value . owned_to_variant ()) ; } } # [doc = "Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality.\nIf the object already had a script, the previous script instance will be freed and its variables and state will be lost. The new script's [`_init`][Self::_init] method will be called."] # [doc = ""] # [inline] pub fn set_script (& self , script : impl AsArg < crate :: generated :: Reference >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . set_script ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , script . as_arg_ptr ()) ; } } # [doc = "Returns a [`String`][GodotString] representing the object. If not overridden, defaults to `\"[ClassName:RID]\"`.\nOverride the method [`_to_string`][Self::_to_string] to customize the [`String`][GodotString] representation."] # [doc = ""] # [inline] pub fn to_string (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . to_string ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Translates a message using translation catalogs configured in the Project Settings.\nOnly works if message translation is enabled (which it is by default), otherwise it returns the `message` unchanged. See [`set_message_translation`][Self::set_message_translation]."] # [doc = ""] # [inline] pub fn tr (& self , message : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ObjectMethodTable :: get (get_api ()) . tr ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , message . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for Object { } unsafe impl GodotObject for Object { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Object" } } impl Instanciable for Object { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Object :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ObjectMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_user_signal : * mut sys :: godot_method_bind , pub call : * mut sys :: godot_method_bind , pub call_deferred : * mut sys :: godot_method_bind , pub callv : * mut sys :: godot_method_bind , pub can_translate_messages : * mut sys :: godot_method_bind , pub connect : * mut sys :: godot_method_bind , pub disconnect : * mut sys :: godot_method_bind , pub emit_signal : * mut sys :: godot_method_bind , pub get : * mut sys :: godot_method_bind , pub get_class : * mut sys :: godot_method_bind , pub get_incoming_connections : * mut sys :: godot_method_bind , pub get_indexed : * mut sys :: godot_method_bind , pub get_instance_id : * mut sys :: godot_method_bind , pub get_meta : * mut sys :: godot_method_bind , pub get_meta_list : * mut sys :: godot_method_bind , pub get_method_list : * mut sys :: godot_method_bind , pub get_property_list : * mut sys :: godot_method_bind , pub get_script : * mut sys :: godot_method_bind , pub get_signal_connection_list : * mut sys :: godot_method_bind , pub get_signal_list : * mut sys :: godot_method_bind , pub has_meta : * mut sys :: godot_method_bind , pub has_method : * mut sys :: godot_method_bind , pub has_signal : * mut sys :: godot_method_bind , pub has_user_signal : * mut sys :: godot_method_bind , pub is_blocking_signals : * mut sys :: godot_method_bind , pub is_class : * mut sys :: godot_method_bind , pub is_connected : * mut sys :: godot_method_bind , pub is_queued_for_deletion : * mut sys :: godot_method_bind , pub notification : * mut sys :: godot_method_bind , pub property_list_changed_notify : * mut sys :: godot_method_bind , pub remove_meta : * mut sys :: godot_method_bind , pub set : * mut sys :: godot_method_bind , pub set_block_signals : * mut sys :: godot_method_bind , pub set_deferred : * mut sys :: godot_method_bind , pub set_indexed : * mut sys :: godot_method_bind , pub set_message_translation : * mut sys :: godot_method_bind , pub set_meta : * mut sys :: godot_method_bind , pub set_script : * mut sys :: godot_method_bind , pub to_string : * mut sys :: godot_method_bind , pub tr : * mut sys :: godot_method_bind } impl ObjectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ObjectMethodTable = ObjectMethodTable { class_constructor : None , add_user_signal : 0 as * mut sys :: godot_method_bind , call : 0 as * mut sys :: godot_method_bind , call_deferred : 0 as * mut sys :: godot_method_bind , callv : 0 as * mut sys :: godot_method_bind , can_translate_messages : 0 as * mut sys :: godot_method_bind , connect : 0 as * mut sys :: godot_method_bind , disconnect : 0 as * mut sys :: godot_method_bind , emit_signal : 0 as * mut sys :: godot_method_bind , get : 0 as * mut sys :: godot_method_bind , get_class : 0 as * mut sys :: godot_method_bind , get_incoming_connections : 0 as * mut sys :: godot_method_bind , get_indexed : 0 as * mut sys :: godot_method_bind , get_instance_id : 0 as * mut sys :: godot_method_bind , get_meta : 0 as * mut sys :: godot_method_bind , get_meta_list : 0 as * mut sys :: godot_method_bind , get_method_list : 0 as * mut sys :: godot_method_bind , get_property_list : 0 as * mut sys :: godot_method_bind , get_script : 0 as * mut sys :: godot_method_bind , get_signal_connection_list : 0 as * mut sys :: godot_method_bind , get_signal_list : 0 as * mut sys :: godot_method_bind , has_meta : 0 as * mut sys :: godot_method_bind , has_method : 0 as * mut sys :: godot_method_bind , has_signal : 0 as * mut sys :: godot_method_bind , has_user_signal : 0 as * mut sys :: godot_method_bind , is_blocking_signals : 0 as * mut sys :: godot_method_bind , is_class : 0 as * mut sys :: godot_method_bind , is_connected : 0 as * mut sys :: godot_method_bind , is_queued_for_deletion : 0 as * mut sys :: godot_method_bind , notification : 0 as * mut sys :: godot_method_bind , property_list_changed_notify : 0 as * mut sys :: godot_method_bind , remove_meta : 0 as * mut sys :: godot_method_bind , set : 0 as * mut sys :: godot_method_bind , set_block_signals : 0 as * mut sys :: godot_method_bind , set_deferred : 0 as * mut sys :: godot_method_bind , set_indexed : 0 as * mut sys :: godot_method_bind , set_message_translation : 0 as * mut sys :: godot_method_bind , set_meta : 0 as * mut sys :: godot_method_bind , set_script : 0 as * mut sys :: godot_method_bind , to_string : 0 as * mut sys :: godot_method_bind , tr : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ObjectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Object\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_user_signal = (gd_api . godot_method_bind_get_method) (class_name , "add_user_signal\0" . as_ptr () as * const c_char) ; table . call = (gd_api . godot_method_bind_get_method) (class_name , "call\0" . as_ptr () as * const c_char) ; table . call_deferred = (gd_api . godot_method_bind_get_method) (class_name , "call_deferred\0" . as_ptr () as * const c_char) ; table . callv = (gd_api . godot_method_bind_get_method) (class_name , "callv\0" . as_ptr () as * const c_char) ; table . can_translate_messages = (gd_api . godot_method_bind_get_method) (class_name , "can_translate_messages\0" . as_ptr () as * const c_char) ; table . connect = (gd_api . godot_method_bind_get_method) (class_name , "connect\0" . as_ptr () as * const c_char) ; table . disconnect = (gd_api . godot_method_bind_get_method) (class_name , "disconnect\0" . as_ptr () as * const c_char) ; table . emit_signal = (gd_api . godot_method_bind_get_method) (class_name , "emit_signal\0" . as_ptr () as * const c_char) ; table . get = (gd_api . godot_method_bind_get_method) (class_name , "get\0" . as_ptr () as * const c_char) ; table . get_class = (gd_api . godot_method_bind_get_method) (class_name , "get_class\0" . as_ptr () as * const c_char) ; table . get_incoming_connections = (gd_api . godot_method_bind_get_method) (class_name , "get_incoming_connections\0" . as_ptr () as * const c_char) ; table . get_indexed = (gd_api . godot_method_bind_get_method) (class_name , "get_indexed\0" . as_ptr () as * const c_char) ; table . get_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_id\0" . as_ptr () as * const c_char) ; table . get_meta = (gd_api . godot_method_bind_get_method) (class_name , "get_meta\0" . as_ptr () as * const c_char) ; table . get_meta_list = (gd_api . godot_method_bind_get_method) (class_name , "get_meta_list\0" . as_ptr () as * const c_char) ; table . get_method_list = (gd_api . godot_method_bind_get_method) (class_name , "get_method_list\0" . as_ptr () as * const c_char) ; table . get_property_list = (gd_api . godot_method_bind_get_method) (class_name , "get_property_list\0" . as_ptr () as * const c_char) ; table . get_script = (gd_api . godot_method_bind_get_method) (class_name , "get_script\0" . as_ptr () as * const c_char) ; table . get_signal_connection_list = (gd_api . godot_method_bind_get_method) (class_name , "get_signal_connection_list\0" . as_ptr () as * const c_char) ; table . get_signal_list = (gd_api . godot_method_bind_get_method) (class_name , "get_signal_list\0" . as_ptr () as * const c_char) ; table . has_meta = (gd_api . godot_method_bind_get_method) (class_name , "has_meta\0" . as_ptr () as * const c_char) ; table . has_method = (gd_api . godot_method_bind_get_method) (class_name , "has_method\0" . as_ptr () as * const c_char) ; table . has_signal = (gd_api . godot_method_bind_get_method) (class_name , "has_signal\0" . as_ptr () as * const c_char) ; table . has_user_signal = (gd_api . godot_method_bind_get_method) (class_name , "has_user_signal\0" . as_ptr () as * const c_char) ; table . is_blocking_signals = (gd_api . godot_method_bind_get_method) (class_name , "is_blocking_signals\0" . as_ptr () as * const c_char) ; table . is_class = (gd_api . godot_method_bind_get_method) (class_name , "is_class\0" . as_ptr () as * const c_char) ; table . is_connected = (gd_api . godot_method_bind_get_method) (class_name , "is_connected\0" . as_ptr () as * const c_char) ; table . is_queued_for_deletion = (gd_api . godot_method_bind_get_method) (class_name , "is_queued_for_deletion\0" . as_ptr () as * const c_char) ; table . notification = (gd_api . godot_method_bind_get_method) (class_name , "notification\0" . as_ptr () as * const c_char) ; table . property_list_changed_notify = (gd_api . godot_method_bind_get_method) (class_name , "property_list_changed_notify\0" . as_ptr () as * const c_char) ; table . remove_meta = (gd_api . godot_method_bind_get_method) (class_name , "remove_meta\0" . as_ptr () as * const c_char) ; table . set = (gd_api . godot_method_bind_get_method) (class_name , "set\0" . as_ptr () as * const c_char) ; table . set_block_signals = (gd_api . godot_method_bind_get_method) (class_name , "set_block_signals\0" . as_ptr () as * const c_char) ; table . set_deferred = (gd_api . godot_method_bind_get_method) (class_name , "set_deferred\0" . as_ptr () as * const c_char) ; table . set_indexed = (gd_api . godot_method_bind_get_method) (class_name , "set_indexed\0" . as_ptr () as * const c_char) ; table . set_message_translation = (gd_api . godot_method_bind_get_method) (class_name , "set_message_translation\0" . as_ptr () as * const c_char) ; table . set_meta = (gd_api . godot_method_bind_get_method) (class_name , "set_meta\0" . as_ptr () as * const c_char) ; table . set_script = (gd_api . godot_method_bind_get_method) (class_name , "set_script\0" . as_ptr () as * const c_char) ; table . to_string = (gd_api . godot_method_bind_get_method) (class_name , "to_string\0" . as_ptr () as * const c_char) ; table . tr = (gd_api . godot_method_bind_get_method) (class_name , "tr\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::object::private::Object;
            
            pub(crate) mod occluder {
                # ! [doc = "This module contains types related to the API class [`Occluder`][super::Occluder]."] pub (crate) mod private { # [doc = "`core class Occluder` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_occluder.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Occluder` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Occluder>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nOccluder inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Occluder { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Occluder ; impl Occluder { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = OccluderMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn shape (& self) -> Option < Ref < crate :: generated :: OccluderShape , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderMethodTable :: get (get_api ()) . get_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: OccluderShape , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn resource_changed (& self , resource : impl AsArg < crate :: generated :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderMethodTable :: get (get_api ()) . resource_changed ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , resource . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: OccluderShape >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Occluder { } unsafe impl GodotObject for Occluder { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Occluder" } } impl QueueFree for Occluder { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Occluder { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Occluder { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for Occluder { } unsafe impl SubClass < crate :: generated :: Node > for Occluder { } unsafe impl SubClass < crate :: generated :: Object > for Occluder { } impl Instanciable for Occluder { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Occluder :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct OccluderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_shape : * mut sys :: godot_method_bind , pub resource_changed : * mut sys :: godot_method_bind , pub set_shape : * mut sys :: godot_method_bind } impl OccluderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : OccluderMethodTable = OccluderMethodTable { class_constructor : None , get_shape : 0 as * mut sys :: godot_method_bind , resource_changed : 0 as * mut sys :: godot_method_bind , set_shape : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { OccluderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Occluder\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_shape\0" . as_ptr () as * const c_char) ; table . resource_changed = (gd_api . godot_method_bind_get_method) (class_name , "resource_changed\0" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::occluder::private::Occluder;
            
            pub mod occluder_polygon_2d {
                # ! [doc = "This module contains types related to the API class [`OccluderPolygon2D`][super::OccluderPolygon2D]."] pub (crate) mod private { # [doc = "`core class OccluderPolygon2D` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`occluder_polygon_2d`][super::occluder_polygon_2d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_occluderpolygon2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nOccluderPolygon2D inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct OccluderPolygon2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: OccluderPolygon2D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CullMode (pub i64) ; impl CullMode { pub const DISABLED : CullMode = CullMode (0i64) ; pub const CLOCKWISE : CullMode = CullMode (1i64) ; pub const COUNTER_CLOCKWISE : CullMode = CullMode (2i64) ; } impl From < i64 > for CullMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CullMode > for i64 { # [inline] fn from (v : CullMode) -> Self { v . 0 } } impl FromVariant for CullMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl OccluderPolygon2D { pub const CULL_DISABLED : i64 = 0i64 ; pub const CULL_CLOCKWISE : i64 = 1i64 ; pub const CULL_COUNTER_CLOCKWISE : i64 = 2i64 ; } impl OccluderPolygon2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = OccluderPolygon2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The culling mode to use."] # [doc = ""] # [inline] pub fn cull_mode (& self) -> crate :: generated :: occluder_polygon_2d :: CullMode { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderPolygon2DMethodTable :: get (get_api ()) . get_cull_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: occluder_polygon_2d :: CullMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A [`Vector2`][Vector2] array with the index for polygon's vertices positions.\n**Note:** The returned value is a copy of the underlying array, rather than a reference."] # [doc = ""] # [inline] pub fn polygon (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderPolygon2DMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction."] # [doc = ""] # [inline] pub fn is_closed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderPolygon2DMethodTable :: get (get_api ()) . is_closed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction."] # [doc = ""] # [inline] pub fn set_closed (& self , closed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderPolygon2DMethodTable :: get (get_api ()) . set_closed ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , closed as _) ; } } # [doc = "The culling mode to use."] # [doc = ""] # [inline] pub fn set_cull_mode (& self , cull_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderPolygon2DMethodTable :: get (get_api ()) . set_cull_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , cull_mode as _) ; } } # [doc = "A [`Vector2`][Vector2] array with the index for polygon's vertices positions.\n**Note:** The returned value is a copy of the underlying array, rather than a reference."] # [doc = ""] # [inline] pub fn set_polygon (& self , polygon : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderPolygon2DMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for OccluderPolygon2D { } unsafe impl GodotObject for OccluderPolygon2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "OccluderPolygon2D" } } impl std :: ops :: Deref for OccluderPolygon2D { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for OccluderPolygon2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for OccluderPolygon2D { } unsafe impl SubClass < crate :: generated :: Reference > for OccluderPolygon2D { } unsafe impl SubClass < crate :: generated :: Object > for OccluderPolygon2D { } impl Instanciable for OccluderPolygon2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { OccluderPolygon2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct OccluderPolygon2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_cull_mode : * mut sys :: godot_method_bind , pub get_polygon : * mut sys :: godot_method_bind , pub is_closed : * mut sys :: godot_method_bind , pub set_closed : * mut sys :: godot_method_bind , pub set_cull_mode : * mut sys :: godot_method_bind , pub set_polygon : * mut sys :: godot_method_bind } impl OccluderPolygon2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : OccluderPolygon2DMethodTable = OccluderPolygon2DMethodTable { class_constructor : None , get_cull_mode : 0 as * mut sys :: godot_method_bind , get_polygon : 0 as * mut sys :: godot_method_bind , is_closed : 0 as * mut sys :: godot_method_bind , set_closed : 0 as * mut sys :: godot_method_bind , set_cull_mode : 0 as * mut sys :: godot_method_bind , set_polygon : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { OccluderPolygon2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "OccluderPolygon2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cull_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_cull_mode\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . is_closed = (gd_api . godot_method_bind_get_method) (class_name , "is_closed\0" . as_ptr () as * const c_char) ; table . set_closed = (gd_api . godot_method_bind_get_method) (class_name , "set_closed\0" . as_ptr () as * const c_char) ; table . set_cull_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mode\0" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::occluder_polygon_2d::private::OccluderPolygon2D;
            
            pub(crate) mod occluder_shape {
                # ! [doc = "This module contains types related to the API class [`OccluderShape`][super::OccluderShape]."] pub (crate) mod private { # [doc = "`core class OccluderShape` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_occludershape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nOccluderShape inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct OccluderShape { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: OccluderShape ; impl OccluderShape { } impl gdnative_core :: private :: godot_object :: Sealed for OccluderShape { } unsafe impl GodotObject for OccluderShape { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "OccluderShape" } } impl std :: ops :: Deref for OccluderShape { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for OccluderShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for OccluderShape { } unsafe impl SubClass < crate :: generated :: Reference > for OccluderShape { } unsafe impl SubClass < crate :: generated :: Object > for OccluderShape { }
                use super::*;
            }
            pub use crate::generated::occluder_shape::private::OccluderShape;
            
            pub(crate) mod occluder_shape_polygon {
                # ! [doc = "This module contains types related to the API class [`OccluderShapePolygon`][super::OccluderShapePolygon]."] pub (crate) mod private { # [doc = "`core class OccluderShapePolygon` inherits `OccluderShape` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_occludershapepolygon.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nOccluderShapePolygon inherits methods from:\n - [OccluderShape](struct.OccluderShape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct OccluderShapePolygon { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: OccluderShapePolygon ; impl OccluderShapePolygon { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = OccluderShapePolygonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Allows changing the hole geometry from code."] # [doc = ""] # [inline] pub fn hole_points (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderShapePolygonMethodTable :: get (get_api ()) . get_hole_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Allows changing the polygon geometry from code."] # [doc = ""] # [inline] pub fn polygon_points (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderShapePolygonMethodTable :: get (get_api ()) . get_polygon_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Specifies whether the occluder should operate from both sides. If `false`, the occluder will operate one way only."] # [doc = ""] # [inline] pub fn is_two_way (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderShapePolygonMethodTable :: get (get_api ()) . is_two_way ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets an individual hole point position."] # [doc = ""] # [inline] pub fn set_hole_point (& self , index : i64 , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderShapePolygonMethodTable :: get (get_api ()) . set_hole_point ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , index as _ , position) ; } } # [doc = "Allows changing the hole geometry from code."] # [doc = ""] # [inline] pub fn set_hole_points (& self , points : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderShapePolygonMethodTable :: get (get_api ()) . set_hole_points ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , points) ; } } # [doc = "Sets an individual polygon point position."] # [doc = ""] # [inline] pub fn set_polygon_point (& self , index : i64 , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderShapePolygonMethodTable :: get (get_api ()) . set_polygon_point ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , index as _ , position) ; } } # [doc = "Allows changing the polygon geometry from code."] # [doc = ""] # [inline] pub fn set_polygon_points (& self , points : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderShapePolygonMethodTable :: get (get_api ()) . set_polygon_points ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , points) ; } } # [doc = "Specifies whether the occluder should operate from both sides. If `false`, the occluder will operate one way only."] # [doc = ""] # [inline] pub fn set_two_way (& self , two_way : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderShapePolygonMethodTable :: get (get_api ()) . set_two_way ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , two_way as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for OccluderShapePolygon { } unsafe impl GodotObject for OccluderShapePolygon { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "OccluderShapePolygon" } } impl std :: ops :: Deref for OccluderShapePolygon { type Target = crate :: generated :: OccluderShape ; # [inline] fn deref (& self) -> & crate :: generated :: OccluderShape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for OccluderShapePolygon { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: OccluderShape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: OccluderShape > for OccluderShapePolygon { } unsafe impl SubClass < crate :: generated :: Resource > for OccluderShapePolygon { } unsafe impl SubClass < crate :: generated :: Reference > for OccluderShapePolygon { } unsafe impl SubClass < crate :: generated :: Object > for OccluderShapePolygon { } impl Instanciable for OccluderShapePolygon { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { OccluderShapePolygon :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct OccluderShapePolygonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_hole_points : * mut sys :: godot_method_bind , pub get_polygon_points : * mut sys :: godot_method_bind , pub is_two_way : * mut sys :: godot_method_bind , pub set_hole_point : * mut sys :: godot_method_bind , pub set_hole_points : * mut sys :: godot_method_bind , pub set_polygon_point : * mut sys :: godot_method_bind , pub set_polygon_points : * mut sys :: godot_method_bind , pub set_two_way : * mut sys :: godot_method_bind } impl OccluderShapePolygonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : OccluderShapePolygonMethodTable = OccluderShapePolygonMethodTable { class_constructor : None , get_hole_points : 0 as * mut sys :: godot_method_bind , get_polygon_points : 0 as * mut sys :: godot_method_bind , is_two_way : 0 as * mut sys :: godot_method_bind , set_hole_point : 0 as * mut sys :: godot_method_bind , set_hole_points : 0 as * mut sys :: godot_method_bind , set_polygon_point : 0 as * mut sys :: godot_method_bind , set_polygon_points : 0 as * mut sys :: godot_method_bind , set_two_way : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { OccluderShapePolygonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "OccluderShapePolygon\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_hole_points = (gd_api . godot_method_bind_get_method) (class_name , "get_hole_points\0" . as_ptr () as * const c_char) ; table . get_polygon_points = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon_points\0" . as_ptr () as * const c_char) ; table . is_two_way = (gd_api . godot_method_bind_get_method) (class_name , "is_two_way\0" . as_ptr () as * const c_char) ; table . set_hole_point = (gd_api . godot_method_bind_get_method) (class_name , "set_hole_point\0" . as_ptr () as * const c_char) ; table . set_hole_points = (gd_api . godot_method_bind_get_method) (class_name , "set_hole_points\0" . as_ptr () as * const c_char) ; table . set_polygon_point = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon_point\0" . as_ptr () as * const c_char) ; table . set_polygon_points = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon_points\0" . as_ptr () as * const c_char) ; table . set_two_way = (gd_api . godot_method_bind_get_method) (class_name , "set_two_way\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::occluder_shape_polygon::private::OccluderShapePolygon;
            
            pub(crate) mod occluder_shape_sphere {
                # ! [doc = "This module contains types related to the API class [`OccluderShapeSphere`][super::OccluderShapeSphere]."] pub (crate) mod private { # [doc = "`core class OccluderShapeSphere` inherits `OccluderShape` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_occludershapesphere.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nOccluderShapeSphere inherits methods from:\n - [OccluderShape](struct.OccluderShape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct OccluderShapeSphere { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: OccluderShapeSphere ; impl OccluderShapeSphere { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = OccluderShapeSphereMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The sphere data can be accessed as an array of [`Plane`][Plane]s. The position of each sphere is stored in the `normal`, and the radius is stored in the `d` value of the plane."] # [doc = ""] # [inline] pub fn spheres (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderShapeSphereMethodTable :: get (get_api ()) . get_spheres ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets an individual sphere's position."] # [doc = ""] # [inline] pub fn set_sphere_position (& self , index : i64 , position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderShapeSphereMethodTable :: get (get_api ()) . set_sphere_position ; let ret = crate :: icalls :: icallvar__i64_vec3 (method_bind , self . this . sys () . as_ptr () , index as _ , position) ; } } # [doc = "Sets an individual sphere's radius."] # [doc = ""] # [inline] pub fn set_sphere_radius (& self , index : i64 , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderShapeSphereMethodTable :: get (get_api ()) . set_sphere_radius ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , index as _ , radius as _) ; } } # [doc = "The sphere data can be accessed as an array of [`Plane`][Plane]s. The position of each sphere is stored in the `normal`, and the radius is stored in the `d` value of the plane."] # [doc = ""] # [inline] pub fn set_spheres (& self , spheres : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OccluderShapeSphereMethodTable :: get (get_api ()) . set_spheres ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , spheres) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for OccluderShapeSphere { } unsafe impl GodotObject for OccluderShapeSphere { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "OccluderShapeSphere" } } impl std :: ops :: Deref for OccluderShapeSphere { type Target = crate :: generated :: OccluderShape ; # [inline] fn deref (& self) -> & crate :: generated :: OccluderShape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for OccluderShapeSphere { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: OccluderShape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: OccluderShape > for OccluderShapeSphere { } unsafe impl SubClass < crate :: generated :: Resource > for OccluderShapeSphere { } unsafe impl SubClass < crate :: generated :: Reference > for OccluderShapeSphere { } unsafe impl SubClass < crate :: generated :: Object > for OccluderShapeSphere { } impl Instanciable for OccluderShapeSphere { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { OccluderShapeSphere :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct OccluderShapeSphereMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_spheres : * mut sys :: godot_method_bind , pub set_sphere_position : * mut sys :: godot_method_bind , pub set_sphere_radius : * mut sys :: godot_method_bind , pub set_spheres : * mut sys :: godot_method_bind } impl OccluderShapeSphereMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : OccluderShapeSphereMethodTable = OccluderShapeSphereMethodTable { class_constructor : None , get_spheres : 0 as * mut sys :: godot_method_bind , set_sphere_position : 0 as * mut sys :: godot_method_bind , set_sphere_radius : 0 as * mut sys :: godot_method_bind , set_spheres : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { OccluderShapeSphereMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "OccluderShapeSphere\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_spheres = (gd_api . godot_method_bind_get_method) (class_name , "get_spheres\0" . as_ptr () as * const c_char) ; table . set_sphere_position = (gd_api . godot_method_bind_get_method) (class_name , "set_sphere_position\0" . as_ptr () as * const c_char) ; table . set_sphere_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_sphere_radius\0" . as_ptr () as * const c_char) ; table . set_spheres = (gd_api . godot_method_bind_get_method) (class_name , "set_spheres\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::occluder_shape_sphere::private::OccluderShapeSphere;
            
            pub mod omni_light {
                # ! [doc = "This module contains types related to the API class [`OmniLight`][super::OmniLight]."] pub (crate) mod private { # [doc = "`core class OmniLight` inherits `Light` (manually managed).\n\nThis class has related types in the [`omni_light`][super::omni_light] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_omnilight.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`OmniLight` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<OmniLight>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nOmniLight inherits methods from:\n - [Light](struct.Light.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct OmniLight { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: OmniLight ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShadowDetail (pub i64) ; impl ShadowDetail { pub const VERTICAL : ShadowDetail = ShadowDetail (0i64) ; pub const HORIZONTAL : ShadowDetail = ShadowDetail (1i64) ; } impl From < i64 > for ShadowDetail { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShadowDetail > for i64 { # [inline] fn from (v : ShadowDetail) -> Self { v . 0 } } impl FromVariant for ShadowDetail { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShadowMode (pub i64) ; impl ShadowMode { pub const DUAL_PARABOLOID : ShadowMode = ShadowMode (0i64) ; pub const CUBE : ShadowMode = ShadowMode (1i64) ; } impl From < i64 > for ShadowMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShadowMode > for i64 { # [inline] fn from (v : ShadowMode) -> Self { v . 0 } } impl FromVariant for ShadowMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl OmniLight { pub const SHADOW_DETAIL_VERTICAL : i64 = 0i64 ; pub const SHADOW_DUAL_PARABOLOID : i64 = 0i64 ; pub const SHADOW_CUBE : i64 = 1i64 ; pub const SHADOW_DETAIL_HORIZONTAL : i64 = 1i64 ; } impl OmniLight { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = OmniLightMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "See [`ShadowDetail`][ShadowDetail]."] # [doc = ""] # [inline] pub fn shadow_detail (& self) -> crate :: generated :: omni_light :: ShadowDetail { unsafe { let method_bind : * mut sys :: godot_method_bind = OmniLightMethodTable :: get (get_api ()) . get_shadow_detail ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: omni_light :: ShadowDetail > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The shadow rendering mode to use for this [`OmniLight`][OmniLight]. See [`ShadowMode`][ShadowMode].\n**Note:** In GLES2, [`SHADOW_CUBE`][Self::SHADOW_CUBE] is only supported on GPUs that feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 series don't support cubemap shadows and will fall back to dual paraboloid shadows as a result."] # [doc = ""] # [inline] pub fn shadow_mode (& self) -> crate :: generated :: omni_light :: ShadowMode { unsafe { let method_bind : * mut sys :: godot_method_bind = OmniLightMethodTable :: get (get_api ()) . get_shadow_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: omni_light :: ShadowMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "See [`ShadowDetail`][ShadowDetail]."] # [doc = ""] # [inline] pub fn set_shadow_detail (& self , detail : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OmniLightMethodTable :: get (get_api ()) . set_shadow_detail ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , detail as _) ; } } # [doc = "The shadow rendering mode to use for this [`OmniLight`][OmniLight]. See [`ShadowMode`][ShadowMode].\n**Note:** In GLES2, [`SHADOW_CUBE`][Self::SHADOW_CUBE] is only supported on GPUs that feature support for depth cubemaps. Old GPUs such as the Radeon HD 4000 series don't support cubemap shadows and will fall back to dual paraboloid shadows as a result."] # [doc = ""] # [inline] pub fn set_shadow_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OmniLightMethodTable :: get (get_api ()) . set_shadow_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for OmniLight { } unsafe impl GodotObject for OmniLight { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "OmniLight" } } impl QueueFree for OmniLight { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for OmniLight { type Target = crate :: generated :: Light ; # [inline] fn deref (& self) -> & crate :: generated :: Light { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for OmniLight { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Light { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Light > for OmniLight { } unsafe impl SubClass < crate :: generated :: VisualInstance > for OmniLight { } unsafe impl SubClass < crate :: generated :: CullInstance > for OmniLight { } unsafe impl SubClass < crate :: generated :: Spatial > for OmniLight { } unsafe impl SubClass < crate :: generated :: Node > for OmniLight { } unsafe impl SubClass < crate :: generated :: Object > for OmniLight { } impl Instanciable for OmniLight { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { OmniLight :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct OmniLightMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_shadow_detail : * mut sys :: godot_method_bind , pub get_shadow_mode : * mut sys :: godot_method_bind , pub set_shadow_detail : * mut sys :: godot_method_bind , pub set_shadow_mode : * mut sys :: godot_method_bind } impl OmniLightMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : OmniLightMethodTable = OmniLightMethodTable { class_constructor : None , get_shadow_detail : 0 as * mut sys :: godot_method_bind , get_shadow_mode : 0 as * mut sys :: godot_method_bind , set_shadow_detail : 0 as * mut sys :: godot_method_bind , set_shadow_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { OmniLightMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "OmniLight\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_shadow_detail = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_detail\0" . as_ptr () as * const c_char) ; table . get_shadow_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_mode\0" . as_ptr () as * const c_char) ; table . set_shadow_detail = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_detail\0" . as_ptr () as * const c_char) ; table . set_shadow_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::omni_light::private::OmniLight;
            
            pub(crate) mod open_simplex_noise {
                # ! [doc = "This module contains types related to the API class [`OpenSimplexNoise`][super::OpenSimplexNoise]."] pub (crate) mod private { # [doc = "`core class OpenSimplexNoise` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_opensimplexnoise.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nOpenSimplexNoise inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct OpenSimplexNoise { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: OpenSimplexNoise ; impl OpenSimplexNoise { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = OpenSimplexNoiseMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_image (& self , width : i64 , height : i64 , noise_offset : Vector2) -> Option < Ref < crate :: generated :: Image , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . get_image ; let ret = crate :: icalls :: icallvar__i64_i64_vec2 (method_bind , self . this . sys () . as_ptr () , width as _ , height as _ , noise_offset) ; < Option < Ref < crate :: generated :: Image , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn lacunarity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . get_lacunarity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_noise_1d (& self , x : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . get_noise_1d ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , x as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_noise_2d (& self , x : f64 , y : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . get_noise_2d ; let ret = crate :: icalls :: icallvar__f64_f64 (method_bind , self . this . sys () . as_ptr () , x as _ , y as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_noise_2dv (& self , pos : Vector2) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . get_noise_2dv ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , pos) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_noise_3d (& self , x : f64 , y : f64 , z : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . get_noise_3d ; let ret = crate :: icalls :: icallvar__f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , x as _ , y as _ , z as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_noise_3dv (& self , pos : Vector3) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . get_noise_3dv ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , pos) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_noise_4d (& self , x : f64 , y : f64 , z : f64 , w : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . get_noise_4d ; let ret = crate :: icalls :: icallvar__f64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , x as _ , y as _ , z as _ , w as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn octaves (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . get_octaves ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn period (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . get_period ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn persistence (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . get_persistence ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_seamless_image (& self , size : i64) -> Option < Ref < crate :: generated :: Image , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . get_seamless_image ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , size as _) ; < Option < Ref < crate :: generated :: Image , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn seed (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . get_seed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_lacunarity (& self , lacunarity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . set_lacunarity ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , lacunarity as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_octaves (& self , octave_count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . set_octaves ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , octave_count as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_period (& self , period : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . set_period ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , period as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_persistence (& self , persistence : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . set_persistence ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , persistence as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_seed (& self , seed : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OpenSimplexNoiseMethodTable :: get (get_api ()) . set_seed ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , seed as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for OpenSimplexNoise { } unsafe impl GodotObject for OpenSimplexNoise { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "OpenSimplexNoise" } } impl std :: ops :: Deref for OpenSimplexNoise { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for OpenSimplexNoise { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for OpenSimplexNoise { } unsafe impl SubClass < crate :: generated :: Reference > for OpenSimplexNoise { } unsafe impl SubClass < crate :: generated :: Object > for OpenSimplexNoise { } impl Instanciable for OpenSimplexNoise { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { OpenSimplexNoise :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct OpenSimplexNoiseMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_image : * mut sys :: godot_method_bind , pub get_lacunarity : * mut sys :: godot_method_bind , pub get_noise_1d : * mut sys :: godot_method_bind , pub get_noise_2d : * mut sys :: godot_method_bind , pub get_noise_2dv : * mut sys :: godot_method_bind , pub get_noise_3d : * mut sys :: godot_method_bind , pub get_noise_3dv : * mut sys :: godot_method_bind , pub get_noise_4d : * mut sys :: godot_method_bind , pub get_octaves : * mut sys :: godot_method_bind , pub get_period : * mut sys :: godot_method_bind , pub get_persistence : * mut sys :: godot_method_bind , pub get_seamless_image : * mut sys :: godot_method_bind , pub get_seed : * mut sys :: godot_method_bind , pub set_lacunarity : * mut sys :: godot_method_bind , pub set_octaves : * mut sys :: godot_method_bind , pub set_period : * mut sys :: godot_method_bind , pub set_persistence : * mut sys :: godot_method_bind , pub set_seed : * mut sys :: godot_method_bind } impl OpenSimplexNoiseMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : OpenSimplexNoiseMethodTable = OpenSimplexNoiseMethodTable { class_constructor : None , get_image : 0 as * mut sys :: godot_method_bind , get_lacunarity : 0 as * mut sys :: godot_method_bind , get_noise_1d : 0 as * mut sys :: godot_method_bind , get_noise_2d : 0 as * mut sys :: godot_method_bind , get_noise_2dv : 0 as * mut sys :: godot_method_bind , get_noise_3d : 0 as * mut sys :: godot_method_bind , get_noise_3dv : 0 as * mut sys :: godot_method_bind , get_noise_4d : 0 as * mut sys :: godot_method_bind , get_octaves : 0 as * mut sys :: godot_method_bind , get_period : 0 as * mut sys :: godot_method_bind , get_persistence : 0 as * mut sys :: godot_method_bind , get_seamless_image : 0 as * mut sys :: godot_method_bind , get_seed : 0 as * mut sys :: godot_method_bind , set_lacunarity : 0 as * mut sys :: godot_method_bind , set_octaves : 0 as * mut sys :: godot_method_bind , set_period : 0 as * mut sys :: godot_method_bind , set_persistence : 0 as * mut sys :: godot_method_bind , set_seed : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { OpenSimplexNoiseMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "OpenSimplexNoise\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_image = (gd_api . godot_method_bind_get_method) (class_name , "get_image\0" . as_ptr () as * const c_char) ; table . get_lacunarity = (gd_api . godot_method_bind_get_method) (class_name , "get_lacunarity\0" . as_ptr () as * const c_char) ; table . get_noise_1d = (gd_api . godot_method_bind_get_method) (class_name , "get_noise_1d\0" . as_ptr () as * const c_char) ; table . get_noise_2d = (gd_api . godot_method_bind_get_method) (class_name , "get_noise_2d\0" . as_ptr () as * const c_char) ; table . get_noise_2dv = (gd_api . godot_method_bind_get_method) (class_name , "get_noise_2dv\0" . as_ptr () as * const c_char) ; table . get_noise_3d = (gd_api . godot_method_bind_get_method) (class_name , "get_noise_3d\0" . as_ptr () as * const c_char) ; table . get_noise_3dv = (gd_api . godot_method_bind_get_method) (class_name , "get_noise_3dv\0" . as_ptr () as * const c_char) ; table . get_noise_4d = (gd_api . godot_method_bind_get_method) (class_name , "get_noise_4d\0" . as_ptr () as * const c_char) ; table . get_octaves = (gd_api . godot_method_bind_get_method) (class_name , "get_octaves\0" . as_ptr () as * const c_char) ; table . get_period = (gd_api . godot_method_bind_get_method) (class_name , "get_period\0" . as_ptr () as * const c_char) ; table . get_persistence = (gd_api . godot_method_bind_get_method) (class_name , "get_persistence\0" . as_ptr () as * const c_char) ; table . get_seamless_image = (gd_api . godot_method_bind_get_method) (class_name , "get_seamless_image\0" . as_ptr () as * const c_char) ; table . get_seed = (gd_api . godot_method_bind_get_method) (class_name , "get_seed\0" . as_ptr () as * const c_char) ; table . set_lacunarity = (gd_api . godot_method_bind_get_method) (class_name , "set_lacunarity\0" . as_ptr () as * const c_char) ; table . set_octaves = (gd_api . godot_method_bind_get_method) (class_name , "set_octaves\0" . as_ptr () as * const c_char) ; table . set_period = (gd_api . godot_method_bind_get_method) (class_name , "set_period\0" . as_ptr () as * const c_char) ; table . set_persistence = (gd_api . godot_method_bind_get_method) (class_name , "set_persistence\0" . as_ptr () as * const c_char) ; table . set_seed = (gd_api . godot_method_bind_get_method) (class_name , "set_seed\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::open_simplex_noise::private::OpenSimplexNoise;
            
            pub(crate) mod option_button {
                # ! [doc = "This module contains types related to the API class [`OptionButton`][super::OptionButton]."] pub (crate) mod private { # [doc = "`core class OptionButton` inherits `Button` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_optionbutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`OptionButton` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<OptionButton>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nOptionButton inherits methods from:\n - [Button](struct.Button.html)\n - [BaseButton](struct.BaseButton.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct OptionButton { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: OptionButton ; impl OptionButton { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = OptionButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds an item, with a `texture` icon, text `label` and (optionally) `id`. If no `id` is passed, the item index will be used as the item's ID. New items are appended at the end.\n# Default Arguments\n* `id` - `-1`"] # [doc = ""] # [inline] pub fn add_icon_item (& self , texture : impl AsArg < crate :: generated :: Texture > , label : impl Into < GodotString > , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . add_icon_item ; let ret = crate :: icalls :: icallvar__obj_str_i64 (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , label . into () , id as _) ; } } # [doc = "Adds an item, with text `label` and (optionally) `id`. If no `id` is passed, the item index will be used as the item's ID. New items are appended at the end.\n# Default Arguments\n* `id` - `-1`"] # [doc = ""] # [inline] pub fn add_item (& self , label : impl Into < GodotString > , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . add_item ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , label . into () , id as _) ; } } # [doc = "Adds a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end."] # [doc = ""] # [inline] pub fn add_separator (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . add_separator ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Clears all the items in the [`OptionButton`][OptionButton]."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the amount of items in the OptionButton, including separators."] # [doc = ""] # [inline] pub fn get_item_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . get_item_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the icon of the item at index `idx`."] # [doc = ""] # [inline] pub fn get_item_icon (& self , idx : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . get_item_icon ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the ID of the item at index `idx`."] # [doc = ""] # [inline] pub fn get_item_id (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . get_item_id ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the index of the item with the given `id`."] # [doc = ""] # [inline] pub fn get_item_index (& self , id : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . get_item_index ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Retrieves the metadata of an item. Metadata may be any type and can be used to store extra information about an item, such as an external string ID."] # [doc = ""] # [inline] pub fn get_item_metadata (& self , idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . get_item_metadata ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the text of the item at index `idx`."] # [doc = ""] # [inline] pub fn get_item_text (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . get_item_text ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tooltip of the item at index `idx`."] # [doc = ""] # [inline] pub fn get_item_tooltip (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . get_item_tooltip ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`PopupMenu`][PopupMenu] contained in this button.\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_popup (& self) -> Option < Ref < crate :: generated :: PopupMenu , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . get_popup ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: PopupMenu , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The index of the currently selected item, or `-1` if no item is selected."] # [doc = ""] # [inline] pub fn selected (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . get_selected ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the ID of the selected item, or `-1` if no item is selected."] # [doc = ""] # [inline] pub fn get_selected_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . get_selected_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets the metadata of the selected item. Metadata for items can be set using [`set_item_metadata`][Self::set_item_metadata]."] # [doc = ""] # [inline] pub fn get_selected_metadata (& self) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . get_selected_metadata ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the item at index `idx` is disabled."] # [doc = ""] # [inline] pub fn is_item_disabled (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . is_item_disabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes the item at index `idx`."] # [doc = ""] # [inline] pub fn remove_item (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . remove_item ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; } } # [doc = "Selects an item by index and makes it the current item. This will work even if the item is disabled.\nPassing `-1` as the index deselects any currently selected item."] # [doc = ""] # [inline] pub fn select (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . select ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; } } # [doc = "Sets whether the item at index `idx` is disabled.\nDisabled items are drawn differently in the dropdown and are not selectable by the user. If the current selected item is set as disabled, it will remain selected."] # [doc = ""] # [inline] pub fn set_item_disabled (& self , idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . set_item_disabled ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , disabled as _) ; } } # [doc = "Sets the icon of the item at index `idx`."] # [doc = ""] # [inline] pub fn set_item_icon (& self , idx : i64 , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . set_item_icon ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , idx as _ , texture . as_arg_ptr ()) ; } } # [doc = "Sets the ID of the item at index `idx`."] # [doc = ""] # [inline] pub fn set_item_id (& self , idx : i64 , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . set_item_id ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , idx as _ , id as _) ; } } # [doc = "Sets the metadata of an item. Metadata may be of any type and can be used to store extra information about an item, such as an external string ID."] # [doc = ""] # [inline] pub fn set_item_metadata (& self , idx : i64 , metadata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . set_item_metadata ; let ret = crate :: icalls :: icallvar__i64_var (method_bind , self . this . sys () . as_ptr () , idx as _ , metadata . owned_to_variant ()) ; } } # [doc = "Sets the text of the item at index `idx`."] # [doc = ""] # [inline] pub fn set_item_text (& self , idx : i64 , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . set_item_text ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , idx as _ , text . into ()) ; } } # [doc = "Sets the tooltip of the item at index `idx`."] # [doc = ""] # [inline] pub fn set_item_tooltip (& self , idx : i64 , tooltip : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OptionButtonMethodTable :: get (get_api ()) . set_item_tooltip ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , idx as _ , tooltip . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for OptionButton { } unsafe impl GodotObject for OptionButton { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "OptionButton" } } impl QueueFree for OptionButton { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for OptionButton { type Target = crate :: generated :: Button ; # [inline] fn deref (& self) -> & crate :: generated :: Button { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for OptionButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Button { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Button > for OptionButton { } unsafe impl SubClass < crate :: generated :: BaseButton > for OptionButton { } unsafe impl SubClass < crate :: generated :: Control > for OptionButton { } unsafe impl SubClass < crate :: generated :: CanvasItem > for OptionButton { } unsafe impl SubClass < crate :: generated :: Node > for OptionButton { } unsafe impl SubClass < crate :: generated :: Object > for OptionButton { } impl Instanciable for OptionButton { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { OptionButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct OptionButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_icon_item : * mut sys :: godot_method_bind , pub add_item : * mut sys :: godot_method_bind , pub add_separator : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub get_item_count : * mut sys :: godot_method_bind , pub get_item_icon : * mut sys :: godot_method_bind , pub get_item_id : * mut sys :: godot_method_bind , pub get_item_index : * mut sys :: godot_method_bind , pub get_item_metadata : * mut sys :: godot_method_bind , pub get_item_text : * mut sys :: godot_method_bind , pub get_item_tooltip : * mut sys :: godot_method_bind , pub get_popup : * mut sys :: godot_method_bind , pub get_selected : * mut sys :: godot_method_bind , pub get_selected_id : * mut sys :: godot_method_bind , pub get_selected_metadata : * mut sys :: godot_method_bind , pub is_item_disabled : * mut sys :: godot_method_bind , pub remove_item : * mut sys :: godot_method_bind , pub select : * mut sys :: godot_method_bind , pub set_item_disabled : * mut sys :: godot_method_bind , pub set_item_icon : * mut sys :: godot_method_bind , pub set_item_id : * mut sys :: godot_method_bind , pub set_item_metadata : * mut sys :: godot_method_bind , pub set_item_text : * mut sys :: godot_method_bind , pub set_item_tooltip : * mut sys :: godot_method_bind } impl OptionButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : OptionButtonMethodTable = OptionButtonMethodTable { class_constructor : None , add_icon_item : 0 as * mut sys :: godot_method_bind , add_item : 0 as * mut sys :: godot_method_bind , add_separator : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , get_item_count : 0 as * mut sys :: godot_method_bind , get_item_icon : 0 as * mut sys :: godot_method_bind , get_item_id : 0 as * mut sys :: godot_method_bind , get_item_index : 0 as * mut sys :: godot_method_bind , get_item_metadata : 0 as * mut sys :: godot_method_bind , get_item_text : 0 as * mut sys :: godot_method_bind , get_item_tooltip : 0 as * mut sys :: godot_method_bind , get_popup : 0 as * mut sys :: godot_method_bind , get_selected : 0 as * mut sys :: godot_method_bind , get_selected_id : 0 as * mut sys :: godot_method_bind , get_selected_metadata : 0 as * mut sys :: godot_method_bind , is_item_disabled : 0 as * mut sys :: godot_method_bind , remove_item : 0 as * mut sys :: godot_method_bind , select : 0 as * mut sys :: godot_method_bind , set_item_disabled : 0 as * mut sys :: godot_method_bind , set_item_icon : 0 as * mut sys :: godot_method_bind , set_item_id : 0 as * mut sys :: godot_method_bind , set_item_metadata : 0 as * mut sys :: godot_method_bind , set_item_text : 0 as * mut sys :: godot_method_bind , set_item_tooltip : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { OptionButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "OptionButton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_icon_item = (gd_api . godot_method_bind_get_method) (class_name , "add_icon_item\0" . as_ptr () as * const c_char) ; table . add_item = (gd_api . godot_method_bind_get_method) (class_name , "add_item\0" . as_ptr () as * const c_char) ; table . add_separator = (gd_api . godot_method_bind_get_method) (class_name , "add_separator\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_item_count = (gd_api . godot_method_bind_get_method) (class_name , "get_item_count\0" . as_ptr () as * const c_char) ; table . get_item_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_item_icon\0" . as_ptr () as * const c_char) ; table . get_item_id = (gd_api . godot_method_bind_get_method) (class_name , "get_item_id\0" . as_ptr () as * const c_char) ; table . get_item_index = (gd_api . godot_method_bind_get_method) (class_name , "get_item_index\0" . as_ptr () as * const c_char) ; table . get_item_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_item_metadata\0" . as_ptr () as * const c_char) ; table . get_item_text = (gd_api . godot_method_bind_get_method) (class_name , "get_item_text\0" . as_ptr () as * const c_char) ; table . get_item_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "get_item_tooltip\0" . as_ptr () as * const c_char) ; table . get_popup = (gd_api . godot_method_bind_get_method) (class_name , "get_popup\0" . as_ptr () as * const c_char) ; table . get_selected = (gd_api . godot_method_bind_get_method) (class_name , "get_selected\0" . as_ptr () as * const c_char) ; table . get_selected_id = (gd_api . godot_method_bind_get_method) (class_name , "get_selected_id\0" . as_ptr () as * const c_char) ; table . get_selected_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_selected_metadata\0" . as_ptr () as * const c_char) ; table . is_item_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_item_disabled\0" . as_ptr () as * const c_char) ; table . remove_item = (gd_api . godot_method_bind_get_method) (class_name , "remove_item\0" . as_ptr () as * const c_char) ; table . select = (gd_api . godot_method_bind_get_method) (class_name , "select\0" . as_ptr () as * const c_char) ; table . set_item_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_item_disabled\0" . as_ptr () as * const c_char) ; table . set_item_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_item_icon\0" . as_ptr () as * const c_char) ; table . set_item_id = (gd_api . godot_method_bind_get_method) (class_name , "set_item_id\0" . as_ptr () as * const c_char) ; table . set_item_metadata = (gd_api . godot_method_bind_get_method) (class_name , "set_item_metadata\0" . as_ptr () as * const c_char) ; table . set_item_text = (gd_api . godot_method_bind_get_method) (class_name , "set_item_text\0" . as_ptr () as * const c_char) ; table . set_item_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "set_item_tooltip\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::option_button::private::OptionButton;
            
            pub(crate) mod pck_packer {
                # ! [doc = "This module contains types related to the API class [`PCKPacker`][super::PCKPacker]."] pub (crate) mod private { # [doc = "`core class PCKPacker` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_pckpacker.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPCKPacker inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PCKPacker { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PCKPacker ; impl PCKPacker { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PCKPackerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds the `source_path` file to the current PCK package at the `pck_path` internal path (should start with `res://`)."] # [doc = ""] # [inline] pub fn add_file (& self , pck_path : impl Into < GodotString > , source_path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PCKPackerMethodTable :: get (get_api ()) . add_file ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , pck_path . into () , source_path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Writes the files specified using all [`add_file`][Self::add_file] calls since the last flush. If `verbose` is `true`, a list of files added will be printed to the console for easier debugging.\n# Default Arguments\n* `verbose` - `false`"] # [doc = ""] # [inline] pub fn flush (& self , verbose : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PCKPackerMethodTable :: get (get_api ()) . flush ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , verbose as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Creates a new PCK file with the name `pck_name`. The `.pck` file extension isn't added automatically, so it should be part of `pck_name` (even though it's not required).\n# Default Arguments\n* `alignment` - `0`"] # [doc = ""] # [inline] pub fn pck_start (& self , pck_name : impl Into < GodotString > , alignment : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PCKPackerMethodTable :: get (get_api ()) . pck_start ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , pck_name . into () , alignment as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } } impl gdnative_core :: private :: godot_object :: Sealed for PCKPacker { } unsafe impl GodotObject for PCKPacker { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PCKPacker" } } impl std :: ops :: Deref for PCKPacker { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PCKPacker { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for PCKPacker { } unsafe impl SubClass < crate :: generated :: Object > for PCKPacker { } impl Instanciable for PCKPacker { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PCKPacker :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PCKPackerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_file : * mut sys :: godot_method_bind , pub flush : * mut sys :: godot_method_bind , pub pck_start : * mut sys :: godot_method_bind } impl PCKPackerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PCKPackerMethodTable = PCKPackerMethodTable { class_constructor : None , add_file : 0 as * mut sys :: godot_method_bind , flush : 0 as * mut sys :: godot_method_bind , pck_start : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PCKPackerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PCKPacker\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_file = (gd_api . godot_method_bind_get_method) (class_name , "add_file\0" . as_ptr () as * const c_char) ; table . flush = (gd_api . godot_method_bind_get_method) (class_name , "flush\0" . as_ptr () as * const c_char) ; table . pck_start = (gd_api . godot_method_bind_get_method) (class_name , "pck_start\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::pck_packer::private::PCKPacker;
            
            pub(crate) mod phash_translation {
                # ! [doc = "This module contains types related to the API class [`PHashTranslation`][super::PHashTranslation]."] pub (crate) mod private { # [doc = "`core class PHashTranslation` inherits `Translation` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_phashtranslation.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPHashTranslation inherits methods from:\n - [Translation](struct.Translation.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PHashTranslation { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PHashTranslation ; impl PHashTranslation { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PHashTranslationMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Generates and sets an optimized translation from the given [`Translation`][Translation] resource."] # [doc = ""] # [inline] pub fn generate (& self , from : impl AsArg < crate :: generated :: Translation >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PHashTranslationMethodTable :: get (get_api ()) . generate ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , from . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PHashTranslation { } unsafe impl GodotObject for PHashTranslation { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PHashTranslation" } } impl std :: ops :: Deref for PHashTranslation { type Target = crate :: generated :: Translation ; # [inline] fn deref (& self) -> & crate :: generated :: Translation { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PHashTranslation { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Translation { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Translation > for PHashTranslation { } unsafe impl SubClass < crate :: generated :: Resource > for PHashTranslation { } unsafe impl SubClass < crate :: generated :: Reference > for PHashTranslation { } unsafe impl SubClass < crate :: generated :: Object > for PHashTranslation { } impl Instanciable for PHashTranslation { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PHashTranslation :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PHashTranslationMethodTable { pub class_constructor : sys :: godot_class_constructor , pub generate : * mut sys :: godot_method_bind } impl PHashTranslationMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PHashTranslationMethodTable = PHashTranslationMethodTable { class_constructor : None , generate : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PHashTranslationMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PHashTranslation\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . generate = (gd_api . godot_method_bind_get_method) (class_name , "generate\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::phash_translation::private::PHashTranslation;
            
            pub(crate) mod packed_data_container {
                # ! [doc = "This module contains types related to the API class [`PackedDataContainer`][super::PackedDataContainer]."] pub (crate) mod private { # [doc = "`core class PackedDataContainer` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_packeddatacontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPackedDataContainer inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PackedDataContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PackedDataContainer ; impl PackedDataContainer { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PackedDataContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn pack (& self , value : impl OwnedToVariant) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PackedDataContainerMethodTable :: get (get_api ()) . pack ; let ret = crate :: icalls :: icallvar__var (method_bind , self . this . sys () . as_ptr () , value . owned_to_variant ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PackedDataContainerMethodTable :: get (get_api ()) . size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for PackedDataContainer { } unsafe impl GodotObject for PackedDataContainer { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PackedDataContainer" } } impl std :: ops :: Deref for PackedDataContainer { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PackedDataContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for PackedDataContainer { } unsafe impl SubClass < crate :: generated :: Reference > for PackedDataContainer { } unsafe impl SubClass < crate :: generated :: Object > for PackedDataContainer { } impl Instanciable for PackedDataContainer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PackedDataContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PackedDataContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub pack : * mut sys :: godot_method_bind , pub size : * mut sys :: godot_method_bind } impl PackedDataContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PackedDataContainerMethodTable = PackedDataContainerMethodTable { class_constructor : None , pack : 0 as * mut sys :: godot_method_bind , size : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PackedDataContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PackedDataContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . pack = (gd_api . godot_method_bind_get_method) (class_name , "pack\0" . as_ptr () as * const c_char) ; table . size = (gd_api . godot_method_bind_get_method) (class_name , "size\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::packed_data_container::private::PackedDataContainer;
            
            pub(crate) mod packed_data_container_ref {
                # ! [doc = "This module contains types related to the API class [`PackedDataContainerRef`][super::PackedDataContainerRef]."] pub (crate) mod private { # [doc = "`core class PackedDataContainerRef` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_packeddatacontainerref.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPackedDataContainerRef inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PackedDataContainerRef { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PackedDataContainerRef ; impl PackedDataContainerRef { # [doc = ""] # [doc = ""] # [inline] pub fn size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PackedDataContainerRefMethodTable :: get (get_api ()) . size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for PackedDataContainerRef { } unsafe impl GodotObject for PackedDataContainerRef { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PackedDataContainerRef" } } impl std :: ops :: Deref for PackedDataContainerRef { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PackedDataContainerRef { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for PackedDataContainerRef { } unsafe impl SubClass < crate :: generated :: Object > for PackedDataContainerRef { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PackedDataContainerRefMethodTable { pub class_constructor : sys :: godot_class_constructor , pub size : * mut sys :: godot_method_bind } impl PackedDataContainerRefMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PackedDataContainerRefMethodTable = PackedDataContainerRefMethodTable { class_constructor : None , size : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PackedDataContainerRefMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PackedDataContainerRef\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . size = (gd_api . godot_method_bind_get_method) (class_name , "size\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::packed_data_container_ref::private::PackedDataContainerRef;
            
            pub mod packed_scene {
                # ! [doc = "This module contains types related to the API class [`PackedScene`][super::PackedScene]."] pub (crate) mod private { # [doc = "`core class PackedScene` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`packed_scene`][super::packed_scene] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_packedscene.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPackedScene inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PackedScene { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PackedScene ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct GenEditState (pub i64) ; impl GenEditState { pub const DISABLED : GenEditState = GenEditState (0i64) ; pub const INSTANCE : GenEditState = GenEditState (1i64) ; pub const MAIN : GenEditState = GenEditState (2i64) ; pub const MAIN_INHERITED : GenEditState = GenEditState (3i64) ; } impl From < i64 > for GenEditState { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < GenEditState > for i64 { # [inline] fn from (v : GenEditState) -> Self { v . 0 } } impl FromVariant for GenEditState { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl PackedScene { pub const GEN_EDIT_STATE_DISABLED : i64 = 0i64 ; pub const GEN_EDIT_STATE_INSTANCE : i64 = 1i64 ; pub const GEN_EDIT_STATE_MAIN : i64 = 2i64 ; pub const GEN_EDIT_STATE_MAIN_INHERITED : i64 = 3i64 ; } impl PackedScene { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PackedSceneMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns `true` if the scene file has nodes."] # [doc = ""] # [inline] pub fn can_instance (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PackedSceneMethodTable :: get (get_api ()) . can_instance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the `SceneState` representing the scene file contents."] # [doc = ""] # [inline] pub fn get_state (& self) -> Option < Ref < crate :: generated :: SceneState , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PackedSceneMethodTable :: get (get_api ()) . get_state ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: SceneState , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a [`Node.NOTIFICATION_INSTANCED`][Node::NOTIFICATION_INSTANCED] notification on the root node.\n# Default Arguments\n* `edit_state` - `0`"] # [doc = ""] # [inline] pub fn instance (& self , edit_state : i64) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PackedSceneMethodTable :: get (get_api ()) . instance ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , edit_state as _) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Pack will ignore any sub-nodes not owned by given node. See [`Node.owner`][Node::owner]."] # [doc = ""] # [inline] pub fn pack (& self , path : impl AsArg < crate :: generated :: Node >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PackedSceneMethodTable :: get (get_api ()) . pack ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , path . as_arg_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } } impl gdnative_core :: private :: godot_object :: Sealed for PackedScene { } unsafe impl GodotObject for PackedScene { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PackedScene" } } impl std :: ops :: Deref for PackedScene { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PackedScene { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for PackedScene { } unsafe impl SubClass < crate :: generated :: Reference > for PackedScene { } unsafe impl SubClass < crate :: generated :: Object > for PackedScene { } impl Instanciable for PackedScene { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PackedScene :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PackedSceneMethodTable { pub class_constructor : sys :: godot_class_constructor , pub can_instance : * mut sys :: godot_method_bind , pub get_state : * mut sys :: godot_method_bind , pub instance : * mut sys :: godot_method_bind , pub pack : * mut sys :: godot_method_bind } impl PackedSceneMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PackedSceneMethodTable = PackedSceneMethodTable { class_constructor : None , can_instance : 0 as * mut sys :: godot_method_bind , get_state : 0 as * mut sys :: godot_method_bind , instance : 0 as * mut sys :: godot_method_bind , pack : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PackedSceneMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PackedScene\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . can_instance = (gd_api . godot_method_bind_get_method) (class_name , "can_instance\0" . as_ptr () as * const c_char) ; table . get_state = (gd_api . godot_method_bind_get_method) (class_name , "get_state\0" . as_ptr () as * const c_char) ; table . instance = (gd_api . godot_method_bind_get_method) (class_name , "instance\0" . as_ptr () as * const c_char) ; table . pack = (gd_api . godot_method_bind_get_method) (class_name , "pack\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::packed_scene::private::PackedScene;
            
            pub(crate) mod packed_scene_gltf {
                # ! [doc = "This module contains types related to the API class [`PackedSceneGLTF`][super::PackedSceneGLTF]."] pub (crate) mod private { # [doc = "`core class PackedSceneGLTF` inherits `PackedScene` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_packedscenegltf.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPackedSceneGLTF inherits methods from:\n - [PackedScene](struct.PackedScene.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PackedSceneGLTF { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PackedSceneGLTF ; impl PackedSceneGLTF { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PackedSceneGLTFMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn export_gltf (& self , node : impl AsArg < crate :: generated :: Node > , path : impl Into < GodotString > , flags : i64 , bake_fps : f64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PackedSceneGLTFMethodTable :: get (get_api ()) . export_gltf ; let ret = crate :: icalls :: icallvar__obj_str_i64_f64 (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr () , path . into () , flags as _ , bake_fps as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn import_gltf_scene (& self , path : impl Into < GodotString > , flags : i64 , bake_fps : f64 , compress_flags : i64 , state : impl AsArg < crate :: generated :: GLTFState >) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PackedSceneGLTFMethodTable :: get (get_api ()) . import_gltf_scene ; let ret = crate :: icalls :: icallvar__str_i64_f64_i64_obj (method_bind , self . this . sys () . as_ptr () , path . into () , flags as _ , bake_fps as _ , compress_flags as _ , state . as_arg_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn pack_gltf (& self , path : impl Into < GodotString > , flags : i64 , bake_fps : f64 , compress_flags : i64 , state : impl AsArg < crate :: generated :: GLTFState >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PackedSceneGLTFMethodTable :: get (get_api ()) . pack_gltf ; let ret = crate :: icalls :: icallvar__str_i64_f64_i64_obj (method_bind , self . this . sys () . as_ptr () , path . into () , flags as _ , bake_fps as _ , compress_flags as _ , state . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PackedSceneGLTF { } unsafe impl GodotObject for PackedSceneGLTF { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PackedSceneGLTF" } } impl std :: ops :: Deref for PackedSceneGLTF { type Target = crate :: generated :: PackedScene ; # [inline] fn deref (& self) -> & crate :: generated :: PackedScene { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PackedSceneGLTF { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PackedScene { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PackedScene > for PackedSceneGLTF { } unsafe impl SubClass < crate :: generated :: Resource > for PackedSceneGLTF { } unsafe impl SubClass < crate :: generated :: Reference > for PackedSceneGLTF { } unsafe impl SubClass < crate :: generated :: Object > for PackedSceneGLTF { } impl Instanciable for PackedSceneGLTF { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PackedSceneGLTF :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PackedSceneGLTFMethodTable { pub class_constructor : sys :: godot_class_constructor , pub export_gltf : * mut sys :: godot_method_bind , pub import_gltf_scene : * mut sys :: godot_method_bind , pub pack_gltf : * mut sys :: godot_method_bind } impl PackedSceneGLTFMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PackedSceneGLTFMethodTable = PackedSceneGLTFMethodTable { class_constructor : None , export_gltf : 0 as * mut sys :: godot_method_bind , import_gltf_scene : 0 as * mut sys :: godot_method_bind , pack_gltf : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PackedSceneGLTFMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PackedSceneGLTF\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . export_gltf = (gd_api . godot_method_bind_get_method) (class_name , "export_gltf\0" . as_ptr () as * const c_char) ; table . import_gltf_scene = (gd_api . godot_method_bind_get_method) (class_name , "import_gltf_scene\0" . as_ptr () as * const c_char) ; table . pack_gltf = (gd_api . godot_method_bind_get_method) (class_name , "pack_gltf\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::packed_scene_gltf::private::PackedSceneGLTF;
            
            pub(crate) mod packet_peer {
                # ! [doc = "This module contains types related to the API class [`PacketPeer`][super::PacketPeer]."] pub (crate) mod private { # [doc = "`core class PacketPeer` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_packetpeer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPacketPeer inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PacketPeer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PacketPeer ; impl PacketPeer { # [doc = "Returns the number of packets currently available in the ring-buffer."] # [doc = ""] # [inline] pub fn get_available_packet_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_available_packet_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Maximum buffer size allowed when encoding [`Variant`][Variant]s. Raise this value to support heavier memory allocations.\nThe [`put_var`][Self::put_var] method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the [`Variant`][Variant]. If the [`Variant`][Variant] is bigger than `encode_buffer_max_size`, the method will error out with [`ERR_OUT_OF_MEMORY`][Self::ERR_OUT_OF_MEMORY]."] # [doc = ""] # [inline] pub fn encode_buffer_max_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_encode_buffer_max_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets a raw packet."] # [doc = ""] # [inline] pub fn get_packet (& self) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_packet ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the error state of the last packet received (via [`get_packet`][Self::get_packet] and [`get_var`][Self::get_var])."] # [doc = ""] # [inline] pub fn get_packet_error (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_packet_error ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Gets a Variant. If `allow_objects` (or [`allow_object_decoding`][Self::allow_object_decoding]) is `true`, decoding objects is allowed.\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.\n# Default Arguments\n* `allow_objects` - `false`"] # [doc = ""] # [inline] pub fn get_var (& self , allow_objects : bool) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . get_var ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , allow_objects as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Deprecated._ Use `get_var` and `put_var` parameters instead.\nIf `true`, the PacketPeer will allow encoding and decoding of object via [`get_var`][Self::get_var] and [`put_var`][Self::put_var].\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution."] # [doc = ""] # [inline] pub fn is_object_decoding_allowed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . is_object_decoding_allowed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sends a raw packet."] # [doc = ""] # [inline] pub fn put_packet (& self , buffer : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . put_packet ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Sends a [`Variant`][Variant] as a packet. If `full_objects` (or [`allow_object_decoding`][Self::allow_object_decoding]) is `true`, encoding objects is allowed (and can potentially include code).\n# Default Arguments\n* `full_objects` - `false`"] # [doc = ""] # [inline] pub fn put_var (& self , var : impl OwnedToVariant , full_objects : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . put_var ; let ret = crate :: icalls :: icallvar__var_bool (method_bind , self . this . sys () . as_ptr () , var . owned_to_variant () , full_objects as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "_Deprecated._ Use `get_var` and `put_var` parameters instead.\nIf `true`, the PacketPeer will allow encoding and decoding of object via [`get_var`][Self::get_var] and [`put_var`][Self::put_var].\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution."] # [doc = ""] # [inline] pub fn set_allow_object_decoding (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . set_allow_object_decoding ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Maximum buffer size allowed when encoding [`Variant`][Variant]s. Raise this value to support heavier memory allocations.\nThe [`put_var`][Self::put_var] method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the [`Variant`][Variant]. If the [`Variant`][Variant] is bigger than `encode_buffer_max_size`, the method will error out with [`ERR_OUT_OF_MEMORY`][Self::ERR_OUT_OF_MEMORY]."] # [doc = ""] # [inline] pub fn set_encode_buffer_max_size (& self , max_size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerMethodTable :: get (get_api ()) . set_encode_buffer_max_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , max_size as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PacketPeer { } unsafe impl GodotObject for PacketPeer { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PacketPeer" } } impl std :: ops :: Deref for PacketPeer { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PacketPeer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for PacketPeer { } unsafe impl SubClass < crate :: generated :: Object > for PacketPeer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PacketPeerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_available_packet_count : * mut sys :: godot_method_bind , pub get_encode_buffer_max_size : * mut sys :: godot_method_bind , pub get_packet : * mut sys :: godot_method_bind , pub get_packet_error : * mut sys :: godot_method_bind , pub get_var : * mut sys :: godot_method_bind , pub is_object_decoding_allowed : * mut sys :: godot_method_bind , pub put_packet : * mut sys :: godot_method_bind , pub put_var : * mut sys :: godot_method_bind , pub set_allow_object_decoding : * mut sys :: godot_method_bind , pub set_encode_buffer_max_size : * mut sys :: godot_method_bind } impl PacketPeerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PacketPeerMethodTable = PacketPeerMethodTable { class_constructor : None , get_available_packet_count : 0 as * mut sys :: godot_method_bind , get_encode_buffer_max_size : 0 as * mut sys :: godot_method_bind , get_packet : 0 as * mut sys :: godot_method_bind , get_packet_error : 0 as * mut sys :: godot_method_bind , get_var : 0 as * mut sys :: godot_method_bind , is_object_decoding_allowed : 0 as * mut sys :: godot_method_bind , put_packet : 0 as * mut sys :: godot_method_bind , put_var : 0 as * mut sys :: godot_method_bind , set_allow_object_decoding : 0 as * mut sys :: godot_method_bind , set_encode_buffer_max_size : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PacketPeerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PacketPeer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_available_packet_count = (gd_api . godot_method_bind_get_method) (class_name , "get_available_packet_count\0" . as_ptr () as * const c_char) ; table . get_encode_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "get_encode_buffer_max_size\0" . as_ptr () as * const c_char) ; table . get_packet = (gd_api . godot_method_bind_get_method) (class_name , "get_packet\0" . as_ptr () as * const c_char) ; table . get_packet_error = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_error\0" . as_ptr () as * const c_char) ; table . get_var = (gd_api . godot_method_bind_get_method) (class_name , "get_var\0" . as_ptr () as * const c_char) ; table . is_object_decoding_allowed = (gd_api . godot_method_bind_get_method) (class_name , "is_object_decoding_allowed\0" . as_ptr () as * const c_char) ; table . put_packet = (gd_api . godot_method_bind_get_method) (class_name , "put_packet\0" . as_ptr () as * const c_char) ; table . put_var = (gd_api . godot_method_bind_get_method) (class_name , "put_var\0" . as_ptr () as * const c_char) ; table . set_allow_object_decoding = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_object_decoding\0" . as_ptr () as * const c_char) ; table . set_encode_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "set_encode_buffer_max_size\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::packet_peer::private::PacketPeer;
            
            pub mod packet_peer_dtls {
                # ! [doc = "This module contains types related to the API class [`PacketPeerDTLS`][super::PacketPeerDTLS]."] pub (crate) mod private { # [doc = "`core class PacketPeerDTLS` inherits `PacketPeer` (reference-counted).\n\nThis class has related types in the [`packet_peer_dtls`][super::packet_peer_dtls] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_packetpeerdtls.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPacketPeerDTLS inherits methods from:\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PacketPeerDTLS { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PacketPeerDTLS ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Status (pub i64) ; impl Status { pub const DISCONNECTED : Status = Status (0i64) ; pub const HANDSHAKING : Status = Status (1i64) ; pub const CONNECTED : Status = Status (2i64) ; pub const ERROR : Status = Status (3i64) ; pub const ERROR_HOSTNAME_MISMATCH : Status = Status (4i64) ; } impl From < i64 > for Status { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Status > for i64 { # [inline] fn from (v : Status) -> Self { v . 0 } } impl FromVariant for Status { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl PacketPeerDTLS { pub const STATUS_DISCONNECTED : i64 = 0i64 ; pub const STATUS_HANDSHAKING : i64 = 1i64 ; pub const STATUS_CONNECTED : i64 = 2i64 ; pub const STATUS_ERROR : i64 = 3i64 ; pub const STATUS_ERROR_HOSTNAME_MISMATCH : i64 = 4i64 ; } impl PacketPeerDTLS { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PacketPeerDTLSMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Connects a `peer` beginning the DTLS handshake using the underlying [`PacketPeerUDP`][PacketPeerUDP] which must be connected (see [`PacketPeerUDP.connect_to_host`][PacketPeerUDP::connect_to_host]). If `validate_certs` is `true`, [`PacketPeerDTLS`][PacketPeerDTLS] will validate that the certificate presented by the remote peer and match it with the `for_hostname` argument. You can specify a custom [`X509Certificate`][X509Certificate] to use for validation via the `valid_certificate` argument.\n# Default Arguments\n* `validate_certs` - `true`\n* `for_hostname` - `\"\"`\n* `valid_certificate` - `null`"] # [doc = ""] # [inline] pub fn connect_to_peer (& self , packet_peer : impl AsArg < crate :: generated :: PacketPeerUDP > , validate_certs : bool , for_hostname : impl Into < GodotString > , valid_certificate : impl AsArg < crate :: generated :: X509Certificate >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerDTLSMethodTable :: get (get_api ()) . connect_to_peer ; let ret = crate :: icalls :: icallvar__obj_bool_str_obj (method_bind , self . this . sys () . as_ptr () , packet_peer . as_arg_ptr () , validate_certs as _ , for_hostname . into () , valid_certificate . as_arg_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Disconnects this peer, terminating the DTLS session."] # [doc = ""] # [inline] pub fn disconnect_from_peer (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerDTLSMethodTable :: get (get_api ()) . disconnect_from_peer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the status of the connection. See [`Status`][Status] for values."] # [doc = ""] # [inline] pub fn get_status (& self) -> crate :: generated :: packet_peer_dtls :: Status { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerDTLSMethodTable :: get (get_api ()) . get_status ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: packet_peer_dtls :: Status > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Poll the connection to check for incoming packets. Call this frequently to update the status and keep the connection working."] # [doc = ""] # [inline] pub fn poll (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerDTLSMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PacketPeerDTLS { } unsafe impl GodotObject for PacketPeerDTLS { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PacketPeerDTLS" } } impl std :: ops :: Deref for PacketPeerDTLS { type Target = crate :: generated :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PacketPeerDTLS { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PacketPeer > for PacketPeerDTLS { } unsafe impl SubClass < crate :: generated :: Reference > for PacketPeerDTLS { } unsafe impl SubClass < crate :: generated :: Object > for PacketPeerDTLS { } impl Instanciable for PacketPeerDTLS { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PacketPeerDTLS :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PacketPeerDTLSMethodTable { pub class_constructor : sys :: godot_class_constructor , pub connect_to_peer : * mut sys :: godot_method_bind , pub disconnect_from_peer : * mut sys :: godot_method_bind , pub get_status : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind } impl PacketPeerDTLSMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PacketPeerDTLSMethodTable = PacketPeerDTLSMethodTable { class_constructor : None , connect_to_peer : 0 as * mut sys :: godot_method_bind , disconnect_from_peer : 0 as * mut sys :: godot_method_bind , get_status : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PacketPeerDTLSMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PacketPeerDTLS\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . connect_to_peer = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_peer\0" . as_ptr () as * const c_char) ; table . disconnect_from_peer = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_from_peer\0" . as_ptr () as * const c_char) ; table . get_status = (gd_api . godot_method_bind_get_method) (class_name , "get_status\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::packet_peer_dtls::private::PacketPeerDTLS;
            
            pub(crate) mod packet_peer_gdnative {
                # ! [doc = "This module contains types related to the API class [`PacketPeerGDNative`][super::PacketPeerGDNative]."] pub (crate) mod private { # [doc = "`core class PacketPeerGDNative` inherits `PacketPeer` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_packetpeergdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPacketPeerGDNative inherits methods from:\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PacketPeerGDNative { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PacketPeerGDNative ; impl PacketPeerGDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PacketPeerGDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for PacketPeerGDNative { } unsafe impl GodotObject for PacketPeerGDNative { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PacketPeerGDNative" } } impl std :: ops :: Deref for PacketPeerGDNative { type Target = crate :: generated :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PacketPeerGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PacketPeer > for PacketPeerGDNative { } unsafe impl SubClass < crate :: generated :: Reference > for PacketPeerGDNative { } unsafe impl SubClass < crate :: generated :: Object > for PacketPeerGDNative { } impl Instanciable for PacketPeerGDNative { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PacketPeerGDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PacketPeerGDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl PacketPeerGDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PacketPeerGDNativeMethodTable = PacketPeerGDNativeMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PacketPeerGDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PacketPeerGDNative\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::packet_peer_gdnative::private::PacketPeerGDNative;
            
            pub(crate) mod packet_peer_stream {
                # ! [doc = "This module contains types related to the API class [`PacketPeerStream`][super::PacketPeerStream]."] pub (crate) mod private { # [doc = "`core class PacketPeerStream` inherits `PacketPeer` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_packetpeerstream.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPacketPeerStream inherits methods from:\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PacketPeerStream { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PacketPeerStream ; impl PacketPeerStream { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PacketPeerStreamMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn input_buffer_max_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerStreamMethodTable :: get (get_api ()) . get_input_buffer_max_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn output_buffer_max_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerStreamMethodTable :: get (get_api ()) . get_output_buffer_max_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The wrapped [`StreamPeer`][StreamPeer] object."] # [doc = ""] # [inline] pub fn stream_peer (& self) -> Option < Ref < crate :: generated :: StreamPeer , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerStreamMethodTable :: get (get_api ()) . get_stream_peer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: StreamPeer , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_input_buffer_max_size (& self , max_size_bytes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerStreamMethodTable :: get (get_api ()) . set_input_buffer_max_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , max_size_bytes as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_output_buffer_max_size (& self , max_size_bytes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerStreamMethodTable :: get (get_api ()) . set_output_buffer_max_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , max_size_bytes as _) ; } } # [doc = "The wrapped [`StreamPeer`][StreamPeer] object."] # [doc = ""] # [inline] pub fn set_stream_peer (& self , peer : impl AsArg < crate :: generated :: StreamPeer >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerStreamMethodTable :: get (get_api ()) . set_stream_peer ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , peer . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PacketPeerStream { } unsafe impl GodotObject for PacketPeerStream { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PacketPeerStream" } } impl std :: ops :: Deref for PacketPeerStream { type Target = crate :: generated :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PacketPeerStream { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PacketPeer > for PacketPeerStream { } unsafe impl SubClass < crate :: generated :: Reference > for PacketPeerStream { } unsafe impl SubClass < crate :: generated :: Object > for PacketPeerStream { } impl Instanciable for PacketPeerStream { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PacketPeerStream :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PacketPeerStreamMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_input_buffer_max_size : * mut sys :: godot_method_bind , pub get_output_buffer_max_size : * mut sys :: godot_method_bind , pub get_stream_peer : * mut sys :: godot_method_bind , pub set_input_buffer_max_size : * mut sys :: godot_method_bind , pub set_output_buffer_max_size : * mut sys :: godot_method_bind , pub set_stream_peer : * mut sys :: godot_method_bind } impl PacketPeerStreamMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PacketPeerStreamMethodTable = PacketPeerStreamMethodTable { class_constructor : None , get_input_buffer_max_size : 0 as * mut sys :: godot_method_bind , get_output_buffer_max_size : 0 as * mut sys :: godot_method_bind , get_stream_peer : 0 as * mut sys :: godot_method_bind , set_input_buffer_max_size : 0 as * mut sys :: godot_method_bind , set_output_buffer_max_size : 0 as * mut sys :: godot_method_bind , set_stream_peer : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PacketPeerStreamMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PacketPeerStream\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_input_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "get_input_buffer_max_size\0" . as_ptr () as * const c_char) ; table . get_output_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "get_output_buffer_max_size\0" . as_ptr () as * const c_char) ; table . get_stream_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_peer\0" . as_ptr () as * const c_char) ; table . set_input_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "set_input_buffer_max_size\0" . as_ptr () as * const c_char) ; table . set_output_buffer_max_size = (gd_api . godot_method_bind_get_method) (class_name , "set_output_buffer_max_size\0" . as_ptr () as * const c_char) ; table . set_stream_peer = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_peer\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::packet_peer_stream::private::PacketPeerStream;
            
            pub(crate) mod packet_peer_udp {
                # ! [doc = "This module contains types related to the API class [`PacketPeerUDP`][super::PacketPeerUDP]."] pub (crate) mod private { # [doc = "`core class PacketPeerUDP` inherits `PacketPeer` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_packetpeerudp.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPacketPeerUDP inherits methods from:\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PacketPeerUDP { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PacketPeerUDP ; impl PacketPeerUDP { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PacketPeerUDPMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Closes the UDP socket the [`PacketPeerUDP`][PacketPeerUDP] is currently listening on."] # [doc = ""] # [inline] pub fn close (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerUDPMethodTable :: get (get_api ()) . close ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Calling this method connects this UDP peer to the given `host`/`port` pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to [`set_dest_address`][Self::set_dest_address] are not allowed). This method does not send any data to the remote peer, to do that, use [`PacketPeer.put_var`][PacketPeer::put_var] or [`PacketPeer.put_packet`][PacketPeer::put_packet] as usual. See also [`UDPServer`][UDPServer].\n**Note:** Connecting to the remote peer does not help to protect from malicious attacks like IP spoofing, etc. Think about using an encryption technique like SSL or DTLS if you feel like your application is transferring sensitive information."] # [doc = ""] # [inline] pub fn connect_to_host (& self , host : impl Into < GodotString > , port : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerUDPMethodTable :: get (get_api ()) . connect_to_host ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , port as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Returns the IP of the remote peer that sent the last packet(that was received with [`PacketPeer.get_packet`][PacketPeer::get_packet] or [`PacketPeer.get_var`][PacketPeer::get_var])."] # [doc = ""] # [inline] pub fn get_packet_ip (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerUDPMethodTable :: get (get_api ()) . get_packet_ip ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the port of the remote peer that sent the last packet(that was received with [`PacketPeer.get_packet`][PacketPeer::get_packet] or [`PacketPeer.get_var`][PacketPeer::get_var])."] # [doc = ""] # [inline] pub fn get_packet_port (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerUDPMethodTable :: get (get_api ()) . get_packet_port ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the UDP socket is open and has been connected to a remote address. See [`connect_to_host`][Self::connect_to_host]."] # [doc = ""] # [inline] pub fn is_connected_to_host (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerUDPMethodTable :: get (get_api ()) . is_connected_to_host ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether this [`PacketPeerUDP`][PacketPeerUDP] is listening."] # [doc = ""] # [inline] pub fn is_listening (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerUDPMethodTable :: get (get_api ()) . is_listening ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Joins the multicast group specified by `multicast_address` using the interface identified by `interface_name`.\nYou can join the same multicast group with multiple interfaces. Use [`IP.get_local_interfaces`][IP::get_local_interfaces] to know which are available.\n**Note:** Some Android devices might require the `CHANGE_WIFI_MULTICAST_STATE` permission for multicast to work."] # [doc = ""] # [inline] pub fn join_multicast_group (& self , multicast_address : impl Into < GodotString > , interface_name : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerUDPMethodTable :: get (get_api ()) . join_multicast_group ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , multicast_address . into () , interface_name . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Removes the interface identified by `interface_name` from the multicast group specified by `multicast_address`."] # [doc = ""] # [inline] pub fn leave_multicast_group (& self , multicast_address : impl Into < GodotString > , interface_name : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerUDPMethodTable :: get (get_api ()) . leave_multicast_group ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , multicast_address . into () , interface_name . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Makes this [`PacketPeerUDP`][PacketPeerUDP] listen on the `port` binding to `bind_address` with a buffer size `recv_buf_size`.\nIf `bind_address` is set to `\"*\"` (default), the peer will listen on all available addresses (both IPv4 and IPv6).\nIf `bind_address` is set to `\"0.0.0.0\"` (for IPv4) or `\"::\"` (for IPv6), the peer will listen on all available addresses matching that IP type.\nIf `bind_address` is set to any valid address (e.g. `\"192.168.1.101\"`, `\"::1\"`, etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists).\n# Default Arguments\n* `bind_address` - `\"*\"`\n* `recv_buf_size` - `65536`"] # [doc = ""] # [inline] pub fn listen (& self , port : i64 , bind_address : impl Into < GodotString > , recv_buf_size : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerUDPMethodTable :: get (get_api ()) . listen ; let ret = crate :: icalls :: icallvar__i64_str_i64 (method_bind , self . this . sys () . as_ptr () , port as _ , bind_address . into () , recv_buf_size as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Enable or disable sending of broadcast packets (e.g. `set_dest_address(\"255.255.255.255\", 4343)`. This option is disabled by default.\n**Note:** Some Android devices might require the `CHANGE_WIFI_MULTICAST_STATE` permission and this option to be enabled to receive broadcast packets too."] # [doc = ""] # [inline] pub fn set_broadcast_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerUDPMethodTable :: get (get_api ()) . set_broadcast_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed.\n**Note:** [`set_broadcast_enabled`][Self::set_broadcast_enabled] must be enabled before sending packets to a broadcast address (e.g. `255.255.255.255`)."] # [doc = ""] # [inline] pub fn set_dest_address (& self , host : impl Into < GodotString > , port : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerUDPMethodTable :: get (get_api ()) . set_dest_address ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , port as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nWaits for a packet to arrive on the listening port. See [`listen`][Self::listen].\n**Note:** [`wait`][Self::wait] can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific \"death pill\" packet like this:\n```gdscript\n# Server\nsocket.set_dest_address(\"127.0.0.1\", 789)\nsocket.put_packet(\"Time to stop\".to_ascii())\n\n# Client\nwhile socket.wait() == OK:\n    var data = socket.get_packet().get_string_from_ascii()\n    if data == \"Time to stop\":\n        return\n```"] # [doc = ""] # [inline] pub fn wait (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = PacketPeerUDPMethodTable :: get (get_api ()) . wait ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } } impl gdnative_core :: private :: godot_object :: Sealed for PacketPeerUDP { } unsafe impl GodotObject for PacketPeerUDP { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PacketPeerUDP" } } impl std :: ops :: Deref for PacketPeerUDP { type Target = crate :: generated :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PacketPeerUDP { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PacketPeer > for PacketPeerUDP { } unsafe impl SubClass < crate :: generated :: Reference > for PacketPeerUDP { } unsafe impl SubClass < crate :: generated :: Object > for PacketPeerUDP { } impl Instanciable for PacketPeerUDP { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PacketPeerUDP :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PacketPeerUDPMethodTable { pub class_constructor : sys :: godot_class_constructor , pub close : * mut sys :: godot_method_bind , pub connect_to_host : * mut sys :: godot_method_bind , pub get_packet_ip : * mut sys :: godot_method_bind , pub get_packet_port : * mut sys :: godot_method_bind , pub is_connected_to_host : * mut sys :: godot_method_bind , pub is_listening : * mut sys :: godot_method_bind , pub join_multicast_group : * mut sys :: godot_method_bind , pub leave_multicast_group : * mut sys :: godot_method_bind , pub listen : * mut sys :: godot_method_bind , pub set_broadcast_enabled : * mut sys :: godot_method_bind , pub set_dest_address : * mut sys :: godot_method_bind , pub wait : * mut sys :: godot_method_bind } impl PacketPeerUDPMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PacketPeerUDPMethodTable = PacketPeerUDPMethodTable { class_constructor : None , close : 0 as * mut sys :: godot_method_bind , connect_to_host : 0 as * mut sys :: godot_method_bind , get_packet_ip : 0 as * mut sys :: godot_method_bind , get_packet_port : 0 as * mut sys :: godot_method_bind , is_connected_to_host : 0 as * mut sys :: godot_method_bind , is_listening : 0 as * mut sys :: godot_method_bind , join_multicast_group : 0 as * mut sys :: godot_method_bind , leave_multicast_group : 0 as * mut sys :: godot_method_bind , listen : 0 as * mut sys :: godot_method_bind , set_broadcast_enabled : 0 as * mut sys :: godot_method_bind , set_dest_address : 0 as * mut sys :: godot_method_bind , wait : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PacketPeerUDPMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PacketPeerUDP\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\0" . as_ptr () as * const c_char) ; table . connect_to_host = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_host\0" . as_ptr () as * const c_char) ; table . get_packet_ip = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_ip\0" . as_ptr () as * const c_char) ; table . get_packet_port = (gd_api . godot_method_bind_get_method) (class_name , "get_packet_port\0" . as_ptr () as * const c_char) ; table . is_connected_to_host = (gd_api . godot_method_bind_get_method) (class_name , "is_connected_to_host\0" . as_ptr () as * const c_char) ; table . is_listening = (gd_api . godot_method_bind_get_method) (class_name , "is_listening\0" . as_ptr () as * const c_char) ; table . join_multicast_group = (gd_api . godot_method_bind_get_method) (class_name , "join_multicast_group\0" . as_ptr () as * const c_char) ; table . leave_multicast_group = (gd_api . godot_method_bind_get_method) (class_name , "leave_multicast_group\0" . as_ptr () as * const c_char) ; table . listen = (gd_api . godot_method_bind_get_method) (class_name , "listen\0" . as_ptr () as * const c_char) ; table . set_broadcast_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_broadcast_enabled\0" . as_ptr () as * const c_char) ; table . set_dest_address = (gd_api . godot_method_bind_get_method) (class_name , "set_dest_address\0" . as_ptr () as * const c_char) ; table . wait = (gd_api . godot_method_bind_get_method) (class_name , "wait\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::packet_peer_udp::private::PacketPeerUDP;
            
            pub(crate) mod panel {
                # ! [doc = "This module contains types related to the API class [`Panel`][super::Panel]."] pub (crate) mod private { # [doc = "`core class Panel` inherits `Control` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_panel.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Panel` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Panel>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPanel inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Panel { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Panel ; impl Panel { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PanelMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for Panel { } unsafe impl GodotObject for Panel { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Panel" } } impl QueueFree for Panel { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Panel { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Panel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for Panel { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Panel { } unsafe impl SubClass < crate :: generated :: Node > for Panel { } unsafe impl SubClass < crate :: generated :: Object > for Panel { } impl Instanciable for Panel { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Panel :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PanelMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl PanelMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PanelMethodTable = PanelMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PanelMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Panel\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::panel::private::Panel;
            
            pub(crate) mod panel_container {
                # ! [doc = "This module contains types related to the API class [`PanelContainer`][super::PanelContainer]."] pub (crate) mod private { # [doc = "`core class PanelContainer` inherits `Container` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_panelcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`PanelContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<PanelContainer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPanelContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PanelContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PanelContainer ; impl PanelContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PanelContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for PanelContainer { } unsafe impl GodotObject for PanelContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PanelContainer" } } impl QueueFree for PanelContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for PanelContainer { type Target = crate :: generated :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PanelContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Container > for PanelContainer { } unsafe impl SubClass < crate :: generated :: Control > for PanelContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for PanelContainer { } unsafe impl SubClass < crate :: generated :: Node > for PanelContainer { } unsafe impl SubClass < crate :: generated :: Object > for PanelContainer { } impl Instanciable for PanelContainer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PanelContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PanelContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl PanelContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PanelContainerMethodTable = PanelContainerMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PanelContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PanelContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::panel_container::private::PanelContainer;
            
            pub(crate) mod panorama_sky {
                # ! [doc = "This module contains types related to the API class [`PanoramaSky`][super::PanoramaSky]."] pub (crate) mod private { # [doc = "`core class PanoramaSky` inherits `Sky` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_panoramasky.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPanoramaSky inherits methods from:\n - [Sky](struct.Sky.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PanoramaSky { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PanoramaSky ; impl PanoramaSky { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PanoramaSkyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "[`Texture`][Texture] to be applied to the PanoramaSky."] # [doc = ""] # [inline] pub fn panorama (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PanoramaSkyMethodTable :: get (get_api ()) . get_panorama ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "[`Texture`][Texture] to be applied to the PanoramaSky."] # [doc = ""] # [inline] pub fn set_panorama (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PanoramaSkyMethodTable :: get (get_api ()) . set_panorama ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PanoramaSky { } unsafe impl GodotObject for PanoramaSky { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PanoramaSky" } } impl std :: ops :: Deref for PanoramaSky { type Target = crate :: generated :: Sky ; # [inline] fn deref (& self) -> & crate :: generated :: Sky { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PanoramaSky { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Sky { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Sky > for PanoramaSky { } unsafe impl SubClass < crate :: generated :: Resource > for PanoramaSky { } unsafe impl SubClass < crate :: generated :: Reference > for PanoramaSky { } unsafe impl SubClass < crate :: generated :: Object > for PanoramaSky { } impl Instanciable for PanoramaSky { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PanoramaSky :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PanoramaSkyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_panorama : * mut sys :: godot_method_bind , pub set_panorama : * mut sys :: godot_method_bind } impl PanoramaSkyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PanoramaSkyMethodTable = PanoramaSkyMethodTable { class_constructor : None , get_panorama : 0 as * mut sys :: godot_method_bind , set_panorama : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PanoramaSkyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PanoramaSky\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_panorama = (gd_api . godot_method_bind_get_method) (class_name , "get_panorama\0" . as_ptr () as * const c_char) ; table . set_panorama = (gd_api . godot_method_bind_get_method) (class_name , "set_panorama\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::panorama_sky::private::PanoramaSky;
            
            pub(crate) mod parallax_background {
                # ! [doc = "This module contains types related to the API class [`ParallaxBackground`][super::ParallaxBackground]."] pub (crate) mod private { # [doc = "`core class ParallaxBackground` inherits `CanvasLayer` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_parallaxbackground.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ParallaxBackground` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ParallaxBackground>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nParallaxBackground inherits methods from:\n - [CanvasLayer](struct.CanvasLayer.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ParallaxBackground { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ParallaxBackground ; impl ParallaxBackground { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ParallaxBackgroundMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Top-left limits for scrolling to begin. If the camera is outside of this limit, the background will stop scrolling. Must be lower than [`scroll_limit_end`][Self::scroll_limit_end] to work."] # [doc = ""] # [inline] pub fn limit_begin (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . get_limit_begin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Bottom-right limits for scrolling to end. If the camera is outside of this limit, the background will stop scrolling. Must be higher than [`scroll_limit_begin`][Self::scroll_limit_begin] to work."] # [doc = ""] # [inline] pub fn limit_end (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . get_limit_end ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The base position offset for all [`ParallaxLayer`][ParallaxLayer] children."] # [doc = ""] # [inline] pub fn scroll_base_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . get_scroll_base_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The base motion scale for all [`ParallaxLayer`][ParallaxLayer] children."] # [doc = ""] # [inline] pub fn scroll_base_scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . get_scroll_base_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The ParallaxBackground's scroll value. Calculated automatically when using a [`Camera2D`][Camera2D], but can be used to manually manage scrolling when no camera is present."] # [doc = ""] # [inline] pub fn scroll_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . get_scroll_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, elements in [`ParallaxLayer`][ParallaxLayer] child aren't affected by the zoom level of the camera."] # [doc = ""] # [inline] pub fn is_ignore_camera_zoom (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . is_ignore_camera_zoom ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, elements in [`ParallaxLayer`][ParallaxLayer] child aren't affected by the zoom level of the camera."] # [doc = ""] # [inline] pub fn set_ignore_camera_zoom (& self , ignore : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . set_ignore_camera_zoom ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , ignore as _) ; } } # [doc = "Top-left limits for scrolling to begin. If the camera is outside of this limit, the background will stop scrolling. Must be lower than [`scroll_limit_end`][Self::scroll_limit_end] to work."] # [doc = ""] # [inline] pub fn set_limit_begin (& self , ofs : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . set_limit_begin ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } # [doc = "Bottom-right limits for scrolling to end. If the camera is outside of this limit, the background will stop scrolling. Must be higher than [`scroll_limit_begin`][Self::scroll_limit_begin] to work."] # [doc = ""] # [inline] pub fn set_limit_end (& self , ofs : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . set_limit_end ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } # [doc = "The base position offset for all [`ParallaxLayer`][ParallaxLayer] children."] # [doc = ""] # [inline] pub fn set_scroll_base_offset (& self , ofs : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . set_scroll_base_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } # [doc = "The base motion scale for all [`ParallaxLayer`][ParallaxLayer] children."] # [doc = ""] # [inline] pub fn set_scroll_base_scale (& self , scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . set_scroll_base_scale ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "The ParallaxBackground's scroll value. Calculated automatically when using a [`Camera2D`][Camera2D], but can be used to manually manage scrolling when no camera is present."] # [doc = ""] # [inline] pub fn set_scroll_offset (& self , ofs : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxBackgroundMethodTable :: get (get_api ()) . set_scroll_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , ofs) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ParallaxBackground { } unsafe impl GodotObject for ParallaxBackground { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ParallaxBackground" } } impl QueueFree for ParallaxBackground { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ParallaxBackground { type Target = crate :: generated :: CanvasLayer ; # [inline] fn deref (& self) -> & crate :: generated :: CanvasLayer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ParallaxBackground { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CanvasLayer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CanvasLayer > for ParallaxBackground { } unsafe impl SubClass < crate :: generated :: Node > for ParallaxBackground { } unsafe impl SubClass < crate :: generated :: Object > for ParallaxBackground { } impl Instanciable for ParallaxBackground { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ParallaxBackground :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ParallaxBackgroundMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_limit_begin : * mut sys :: godot_method_bind , pub get_limit_end : * mut sys :: godot_method_bind , pub get_scroll_base_offset : * mut sys :: godot_method_bind , pub get_scroll_base_scale : * mut sys :: godot_method_bind , pub get_scroll_offset : * mut sys :: godot_method_bind , pub is_ignore_camera_zoom : * mut sys :: godot_method_bind , pub set_ignore_camera_zoom : * mut sys :: godot_method_bind , pub set_limit_begin : * mut sys :: godot_method_bind , pub set_limit_end : * mut sys :: godot_method_bind , pub set_scroll_base_offset : * mut sys :: godot_method_bind , pub set_scroll_base_scale : * mut sys :: godot_method_bind , pub set_scroll_offset : * mut sys :: godot_method_bind } impl ParallaxBackgroundMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ParallaxBackgroundMethodTable = ParallaxBackgroundMethodTable { class_constructor : None , get_limit_begin : 0 as * mut sys :: godot_method_bind , get_limit_end : 0 as * mut sys :: godot_method_bind , get_scroll_base_offset : 0 as * mut sys :: godot_method_bind , get_scroll_base_scale : 0 as * mut sys :: godot_method_bind , get_scroll_offset : 0 as * mut sys :: godot_method_bind , is_ignore_camera_zoom : 0 as * mut sys :: godot_method_bind , set_ignore_camera_zoom : 0 as * mut sys :: godot_method_bind , set_limit_begin : 0 as * mut sys :: godot_method_bind , set_limit_end : 0 as * mut sys :: godot_method_bind , set_scroll_base_offset : 0 as * mut sys :: godot_method_bind , set_scroll_base_scale : 0 as * mut sys :: godot_method_bind , set_scroll_offset : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ParallaxBackgroundMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ParallaxBackground\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_limit_begin = (gd_api . godot_method_bind_get_method) (class_name , "get_limit_begin\0" . as_ptr () as * const c_char) ; table . get_limit_end = (gd_api . godot_method_bind_get_method) (class_name , "get_limit_end\0" . as_ptr () as * const c_char) ; table . get_scroll_base_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll_base_offset\0" . as_ptr () as * const c_char) ; table . get_scroll_base_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll_base_scale\0" . as_ptr () as * const c_char) ; table . get_scroll_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll_offset\0" . as_ptr () as * const c_char) ; table . is_ignore_camera_zoom = (gd_api . godot_method_bind_get_method) (class_name , "is_ignore_camera_zoom\0" . as_ptr () as * const c_char) ; table . set_ignore_camera_zoom = (gd_api . godot_method_bind_get_method) (class_name , "set_ignore_camera_zoom\0" . as_ptr () as * const c_char) ; table . set_limit_begin = (gd_api . godot_method_bind_get_method) (class_name , "set_limit_begin\0" . as_ptr () as * const c_char) ; table . set_limit_end = (gd_api . godot_method_bind_get_method) (class_name , "set_limit_end\0" . as_ptr () as * const c_char) ; table . set_scroll_base_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_base_offset\0" . as_ptr () as * const c_char) ; table . set_scroll_base_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_base_scale\0" . as_ptr () as * const c_char) ; table . set_scroll_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_offset\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::parallax_background::private::ParallaxBackground;
            
            pub(crate) mod parallax_layer {
                # ! [doc = "This module contains types related to the API class [`ParallaxLayer`][super::ParallaxLayer]."] pub (crate) mod private { # [doc = "`core class ParallaxLayer` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_parallaxlayer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ParallaxLayer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ParallaxLayer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nParallaxLayer inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ParallaxLayer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ParallaxLayer ; impl ParallaxLayer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ParallaxLayerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The ParallaxLayer's [`Texture`][Texture] mirroring. Useful for creating an infinite scrolling background. If an axis is set to `0`, the [`Texture`][Texture] will not be mirrored."] # [doc = ""] # [inline] pub fn mirroring (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxLayerMethodTable :: get (get_api ()) . get_mirroring ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The ParallaxLayer's offset relative to the parent ParallaxBackground's [`ParallaxBackground.scroll_offset`][ParallaxBackground::scroll_offset]."] # [doc = ""] # [inline] pub fn motion_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxLayerMethodTable :: get (get_api ()) . get_motion_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Multiplies the ParallaxLayer's motion. If an axis is set to `0`, it will not scroll."] # [doc = ""] # [inline] pub fn motion_scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxLayerMethodTable :: get (get_api ()) . get_motion_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The ParallaxLayer's [`Texture`][Texture] mirroring. Useful for creating an infinite scrolling background. If an axis is set to `0`, the [`Texture`][Texture] will not be mirrored."] # [doc = ""] # [inline] pub fn set_mirroring (& self , mirror : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxLayerMethodTable :: get (get_api ()) . set_mirroring ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , mirror) ; } } # [doc = "The ParallaxLayer's offset relative to the parent ParallaxBackground's [`ParallaxBackground.scroll_offset`][ParallaxBackground::scroll_offset]."] # [doc = ""] # [inline] pub fn set_motion_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxLayerMethodTable :: get (get_api ()) . set_motion_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Multiplies the ParallaxLayer's motion. If an axis is set to `0`, it will not scroll."] # [doc = ""] # [inline] pub fn set_motion_scale (& self , scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParallaxLayerMethodTable :: get (get_api ()) . set_motion_scale ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , scale) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ParallaxLayer { } unsafe impl GodotObject for ParallaxLayer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ParallaxLayer" } } impl QueueFree for ParallaxLayer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ParallaxLayer { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ParallaxLayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for ParallaxLayer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for ParallaxLayer { } unsafe impl SubClass < crate :: generated :: Node > for ParallaxLayer { } unsafe impl SubClass < crate :: generated :: Object > for ParallaxLayer { } impl Instanciable for ParallaxLayer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ParallaxLayer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ParallaxLayerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_mirroring : * mut sys :: godot_method_bind , pub get_motion_offset : * mut sys :: godot_method_bind , pub get_motion_scale : * mut sys :: godot_method_bind , pub set_mirroring : * mut sys :: godot_method_bind , pub set_motion_offset : * mut sys :: godot_method_bind , pub set_motion_scale : * mut sys :: godot_method_bind } impl ParallaxLayerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ParallaxLayerMethodTable = ParallaxLayerMethodTable { class_constructor : None , get_mirroring : 0 as * mut sys :: godot_method_bind , get_motion_offset : 0 as * mut sys :: godot_method_bind , get_motion_scale : 0 as * mut sys :: godot_method_bind , set_mirroring : 0 as * mut sys :: godot_method_bind , set_motion_offset : 0 as * mut sys :: godot_method_bind , set_motion_scale : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ParallaxLayerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ParallaxLayer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_mirroring = (gd_api . godot_method_bind_get_method) (class_name , "get_mirroring\0" . as_ptr () as * const c_char) ; table . get_motion_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_motion_offset\0" . as_ptr () as * const c_char) ; table . get_motion_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_motion_scale\0" . as_ptr () as * const c_char) ; table . set_mirroring = (gd_api . godot_method_bind_get_method) (class_name , "set_mirroring\0" . as_ptr () as * const c_char) ; table . set_motion_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_motion_offset\0" . as_ptr () as * const c_char) ; table . set_motion_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_motion_scale\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::parallax_layer::private::ParallaxLayer;
            
            pub mod particles {
                # ! [doc = "This module contains types related to the API class [`Particles`][super::Particles]."] pub (crate) mod private { # [doc = "`core class Particles` inherits `GeometryInstance` (manually managed).\n\nThis class has related types in the [`particles`][super::particles] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_particles.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Particles` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Particles>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nParticles inherits methods from:\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Particles { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Particles ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DrawOrder (pub i64) ; impl DrawOrder { pub const INDEX : DrawOrder = DrawOrder (0i64) ; pub const LIFETIME : DrawOrder = DrawOrder (1i64) ; pub const VIEW_DEPTH : DrawOrder = DrawOrder (2i64) ; } impl From < i64 > for DrawOrder { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DrawOrder > for i64 { # [inline] fn from (v : DrawOrder) -> Self { v . 0 } } impl FromVariant for DrawOrder { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Particles { pub const DRAW_ORDER_INDEX : i64 = 0i64 ; pub const DRAW_ORDER_LIFETIME : i64 = 1i64 ; pub const DRAW_ORDER_VIEW_DEPTH : i64 = 2i64 ; pub const MAX_DRAW_PASSES : i64 = 4i64 ; } impl Particles { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ParticlesMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the axis-aligned bounding box that contains all the particles that are active in the current frame."] # [doc = ""] # [inline] pub fn capture_aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . capture_aabb ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The number of particles emitted in one emission cycle (corresponding to the [`lifetime`][Self::lifetime]).\n**Note:** Changing [`amount`][Self::amount] will reset the particle emission, therefore removing all particles that were already emitted before changing [`amount`][Self::amount]."] # [doc = ""] # [inline] pub fn amount (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_amount ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Particle draw order. Uses [`DrawOrder`][DrawOrder] values."] # [doc = ""] # [inline] pub fn draw_order (& self) -> crate :: generated :: particles :: DrawOrder { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_draw_order ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: particles :: DrawOrder > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`Mesh`][Mesh] that is drawn at index `pass`."] # [doc = ""] # [inline] pub fn draw_pass_mesh (& self , pass : i64) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_draw_pass_mesh ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , pass as _) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The number of draw passes when rendering particles."] # [doc = ""] # [inline] pub fn draw_passes (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_draw_passes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Time ratio between each emission. If `0`, particles are emitted continuously. If `1`, all particles are emitted simultaneously."] # [doc = ""] # [inline] pub fn explosiveness_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_explosiveness_ratio ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself."] # [doc = ""] # [inline] pub fn fixed_fps (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_fixed_fps ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, results in fractional delta calculation which has a smoother particles display effect."] # [doc = ""] # [inline] pub fn fractional_delta (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_fractional_delta ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The amount of time each particle will exist (in seconds)."] # [doc = ""] # [inline] pub fn lifetime (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_lifetime ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, only `amount` particles will be emitted."] # [doc = ""] # [inline] pub fn one_shot (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_one_shot ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Amount of time to preprocess the particles before animation starts. Lets you start the animation some time after particles have started emitting."] # [doc = ""] # [inline] pub fn pre_process_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_pre_process_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "[`Material`][Material] for processing particles. Can be a [`ParticlesMaterial`][ParticlesMaterial] or a [`ShaderMaterial`][ShaderMaterial]."] # [doc = ""] # [inline] pub fn process_material (& self) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_process_material ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Emission randomness ratio."] # [doc = ""] # [inline] pub fn randomness_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_randomness_ratio ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Speed scaling ratio. A value of `0` can be used to pause the particles."] # [doc = ""] # [inline] pub fn speed_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_speed_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, particles use the parent node's coordinate space. If `false`, they use global coordinates."] # [doc = ""] # [inline] pub fn use_local_coordinates (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_use_local_coordinates ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The [`AABB`][Aabb] that determines the node's region which needs to be visible on screen for the particle system to be active.\nGrow the box if particles suddenly appear/disappear when the node enters/exits the screen. The [`AABB`][Aabb] can be grown via code or with the **Particles → Generate AABB** editor tool.\n**Note:** If the [`ParticlesMaterial`][ParticlesMaterial] in use is configured to cast shadows, you may want to enlarge this AABB to ensure the shadow is updated when particles are off-screen."] # [doc = ""] # [inline] pub fn visibility_aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_visibility_aabb ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, particles are being emitted."] # [doc = ""] # [inline] pub fn is_emitting (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . is_emitting ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Restarts the particle emission, clearing existing particles."] # [doc = ""] # [inline] pub fn restart (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . restart ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The number of particles emitted in one emission cycle (corresponding to the [`lifetime`][Self::lifetime]).\n**Note:** Changing [`amount`][Self::amount] will reset the particle emission, therefore removing all particles that were already emitted before changing [`amount`][Self::amount]."] # [doc = ""] # [inline] pub fn set_amount (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_amount ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Particle draw order. Uses [`DrawOrder`][DrawOrder] values."] # [doc = ""] # [inline] pub fn set_draw_order (& self , order : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_draw_order ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , order as _) ; } } # [doc = "Sets the [`Mesh`][Mesh] that is drawn at index `pass`."] # [doc = ""] # [inline] pub fn set_draw_pass_mesh (& self , pass : i64 , mesh : impl AsArg < crate :: generated :: Mesh >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_draw_pass_mesh ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , pass as _ , mesh . as_arg_ptr ()) ; } } # [doc = "The number of draw passes when rendering particles."] # [doc = ""] # [inline] pub fn set_draw_passes (& self , passes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_draw_passes ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , passes as _) ; } } # [doc = "If `true`, particles are being emitted."] # [doc = ""] # [inline] pub fn set_emitting (& self , emitting : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_emitting ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , emitting as _) ; } } # [doc = "Time ratio between each emission. If `0`, particles are emitted continuously. If `1`, all particles are emitted simultaneously."] # [doc = ""] # [inline] pub fn set_explosiveness_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_explosiveness_ratio ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ratio as _) ; } } # [doc = "The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself."] # [doc = ""] # [inline] pub fn set_fixed_fps (& self , fps : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_fixed_fps ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , fps as _) ; } } # [doc = "If `true`, results in fractional delta calculation which has a smoother particles display effect."] # [doc = ""] # [inline] pub fn set_fractional_delta (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_fractional_delta ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The amount of time each particle will exist (in seconds)."] # [doc = ""] # [inline] pub fn set_lifetime (& self , secs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_lifetime ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , secs as _) ; } } # [doc = "If `true`, only `amount` particles will be emitted."] # [doc = ""] # [inline] pub fn set_one_shot (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_one_shot ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Amount of time to preprocess the particles before animation starts. Lets you start the animation some time after particles have started emitting."] # [doc = ""] # [inline] pub fn set_pre_process_time (& self , secs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_pre_process_time ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , secs as _) ; } } # [doc = "[`Material`][Material] for processing particles. Can be a [`ParticlesMaterial`][ParticlesMaterial] or a [`ShaderMaterial`][ShaderMaterial]."] # [doc = ""] # [inline] pub fn set_process_material (& self , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_process_material ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = "Emission randomness ratio."] # [doc = ""] # [inline] pub fn set_randomness_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_randomness_ratio ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ratio as _) ; } } # [doc = "Speed scaling ratio. A value of `0` can be used to pause the particles."] # [doc = ""] # [inline] pub fn set_speed_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_speed_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , scale as _) ; } } # [doc = "If `true`, particles use the parent node's coordinate space. If `false`, they use global coordinates."] # [doc = ""] # [inline] pub fn set_use_local_coordinates (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_use_local_coordinates ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The [`AABB`][Aabb] that determines the node's region which needs to be visible on screen for the particle system to be active.\nGrow the box if particles suddenly appear/disappear when the node enters/exits the screen. The [`AABB`][Aabb] can be grown via code or with the **Particles → Generate AABB** editor tool.\n**Note:** If the [`ParticlesMaterial`][ParticlesMaterial] in use is configured to cast shadows, you may want to enlarge this AABB to ensure the shadow is updated when particles are off-screen."] # [doc = ""] # [inline] pub fn set_visibility_aabb (& self , aabb : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_visibility_aabb ; let ret = crate :: icalls :: icallvar__aabb (method_bind , self . this . sys () . as_ptr () , aabb) ; } } # [doc = "[`Mesh`][Mesh] that is drawn for the first draw pass."] # [doc = ""] # [inline] pub fn draw_pass_1 (& self) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_draw_pass_mesh ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "[`Mesh`][Mesh] that is drawn for the first draw pass."] # [doc = ""] # [inline] pub fn set_draw_pass_1 (& self , value : impl AsArg < crate :: generated :: Mesh >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_draw_pass_mesh ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 0i64 , value . as_arg_ptr ()) ; } } # [doc = "[`Mesh`][Mesh] that is drawn for the second draw pass."] # [doc = ""] # [inline] pub fn draw_pass_2 (& self) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_draw_pass_mesh ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "[`Mesh`][Mesh] that is drawn for the second draw pass."] # [doc = ""] # [inline] pub fn set_draw_pass_2 (& self , value : impl AsArg < crate :: generated :: Mesh >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_draw_pass_mesh ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 1i64 , value . as_arg_ptr ()) ; } } # [doc = "[`Mesh`][Mesh] that is drawn for the third draw pass."] # [doc = ""] # [inline] pub fn draw_pass_3 (& self) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_draw_pass_mesh ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "[`Mesh`][Mesh] that is drawn for the third draw pass."] # [doc = ""] # [inline] pub fn set_draw_pass_3 (& self , value : impl AsArg < crate :: generated :: Mesh >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_draw_pass_mesh ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 2i64 , value . as_arg_ptr ()) ; } } # [doc = "[`Mesh`][Mesh] that is drawn for the fourth draw pass."] # [doc = ""] # [inline] pub fn draw_pass_4 (& self) -> Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . get_draw_pass_mesh ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < Option < Ref < crate :: generated :: Mesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "[`Mesh`][Mesh] that is drawn for the fourth draw pass."] # [doc = ""] # [inline] pub fn set_draw_pass_4 (& self , value : impl AsArg < crate :: generated :: Mesh >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMethodTable :: get (get_api ()) . set_draw_pass_mesh ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 3i64 , value . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Particles { } unsafe impl GodotObject for Particles { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Particles" } } impl QueueFree for Particles { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Particles { type Target = crate :: generated :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Particles { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: GeometryInstance > for Particles { } unsafe impl SubClass < crate :: generated :: VisualInstance > for Particles { } unsafe impl SubClass < crate :: generated :: CullInstance > for Particles { } unsafe impl SubClass < crate :: generated :: Spatial > for Particles { } unsafe impl SubClass < crate :: generated :: Node > for Particles { } unsafe impl SubClass < crate :: generated :: Object > for Particles { } impl Instanciable for Particles { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Particles :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ParticlesMethodTable { pub class_constructor : sys :: godot_class_constructor , pub capture_aabb : * mut sys :: godot_method_bind , pub get_amount : * mut sys :: godot_method_bind , pub get_draw_order : * mut sys :: godot_method_bind , pub get_draw_pass_mesh : * mut sys :: godot_method_bind , pub get_draw_passes : * mut sys :: godot_method_bind , pub get_explosiveness_ratio : * mut sys :: godot_method_bind , pub get_fixed_fps : * mut sys :: godot_method_bind , pub get_fractional_delta : * mut sys :: godot_method_bind , pub get_lifetime : * mut sys :: godot_method_bind , pub get_one_shot : * mut sys :: godot_method_bind , pub get_pre_process_time : * mut sys :: godot_method_bind , pub get_process_material : * mut sys :: godot_method_bind , pub get_randomness_ratio : * mut sys :: godot_method_bind , pub get_speed_scale : * mut sys :: godot_method_bind , pub get_use_local_coordinates : * mut sys :: godot_method_bind , pub get_visibility_aabb : * mut sys :: godot_method_bind , pub is_emitting : * mut sys :: godot_method_bind , pub restart : * mut sys :: godot_method_bind , pub set_amount : * mut sys :: godot_method_bind , pub set_draw_order : * mut sys :: godot_method_bind , pub set_draw_pass_mesh : * mut sys :: godot_method_bind , pub set_draw_passes : * mut sys :: godot_method_bind , pub set_emitting : * mut sys :: godot_method_bind , pub set_explosiveness_ratio : * mut sys :: godot_method_bind , pub set_fixed_fps : * mut sys :: godot_method_bind , pub set_fractional_delta : * mut sys :: godot_method_bind , pub set_lifetime : * mut sys :: godot_method_bind , pub set_one_shot : * mut sys :: godot_method_bind , pub set_pre_process_time : * mut sys :: godot_method_bind , pub set_process_material : * mut sys :: godot_method_bind , pub set_randomness_ratio : * mut sys :: godot_method_bind , pub set_speed_scale : * mut sys :: godot_method_bind , pub set_use_local_coordinates : * mut sys :: godot_method_bind , pub set_visibility_aabb : * mut sys :: godot_method_bind } impl ParticlesMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ParticlesMethodTable = ParticlesMethodTable { class_constructor : None , capture_aabb : 0 as * mut sys :: godot_method_bind , get_amount : 0 as * mut sys :: godot_method_bind , get_draw_order : 0 as * mut sys :: godot_method_bind , get_draw_pass_mesh : 0 as * mut sys :: godot_method_bind , get_draw_passes : 0 as * mut sys :: godot_method_bind , get_explosiveness_ratio : 0 as * mut sys :: godot_method_bind , get_fixed_fps : 0 as * mut sys :: godot_method_bind , get_fractional_delta : 0 as * mut sys :: godot_method_bind , get_lifetime : 0 as * mut sys :: godot_method_bind , get_one_shot : 0 as * mut sys :: godot_method_bind , get_pre_process_time : 0 as * mut sys :: godot_method_bind , get_process_material : 0 as * mut sys :: godot_method_bind , get_randomness_ratio : 0 as * mut sys :: godot_method_bind , get_speed_scale : 0 as * mut sys :: godot_method_bind , get_use_local_coordinates : 0 as * mut sys :: godot_method_bind , get_visibility_aabb : 0 as * mut sys :: godot_method_bind , is_emitting : 0 as * mut sys :: godot_method_bind , restart : 0 as * mut sys :: godot_method_bind , set_amount : 0 as * mut sys :: godot_method_bind , set_draw_order : 0 as * mut sys :: godot_method_bind , set_draw_pass_mesh : 0 as * mut sys :: godot_method_bind , set_draw_passes : 0 as * mut sys :: godot_method_bind , set_emitting : 0 as * mut sys :: godot_method_bind , set_explosiveness_ratio : 0 as * mut sys :: godot_method_bind , set_fixed_fps : 0 as * mut sys :: godot_method_bind , set_fractional_delta : 0 as * mut sys :: godot_method_bind , set_lifetime : 0 as * mut sys :: godot_method_bind , set_one_shot : 0 as * mut sys :: godot_method_bind , set_pre_process_time : 0 as * mut sys :: godot_method_bind , set_process_material : 0 as * mut sys :: godot_method_bind , set_randomness_ratio : 0 as * mut sys :: godot_method_bind , set_speed_scale : 0 as * mut sys :: godot_method_bind , set_use_local_coordinates : 0 as * mut sys :: godot_method_bind , set_visibility_aabb : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ParticlesMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Particles\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . capture_aabb = (gd_api . godot_method_bind_get_method) (class_name , "capture_aabb\0" . as_ptr () as * const c_char) ; table . get_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_amount\0" . as_ptr () as * const c_char) ; table . get_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_order\0" . as_ptr () as * const c_char) ; table . get_draw_pass_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_pass_mesh\0" . as_ptr () as * const c_char) ; table . get_draw_passes = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_passes\0" . as_ptr () as * const c_char) ; table . get_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . get_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_fixed_fps\0" . as_ptr () as * const c_char) ; table . get_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "get_fractional_delta\0" . as_ptr () as * const c_char) ; table . get_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime\0" . as_ptr () as * const c_char) ; table . get_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "get_one_shot\0" . as_ptr () as * const c_char) ; table . get_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "get_pre_process_time\0" . as_ptr () as * const c_char) ; table . get_process_material = (gd_api . godot_method_bind_get_method) (class_name , "get_process_material\0" . as_ptr () as * const c_char) ; table . get_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_randomness_ratio\0" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\0" . as_ptr () as * const c_char) ; table . get_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "get_use_local_coordinates\0" . as_ptr () as * const c_char) ; table . get_visibility_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_visibility_aabb\0" . as_ptr () as * const c_char) ; table . is_emitting = (gd_api . godot_method_bind_get_method) (class_name , "is_emitting\0" . as_ptr () as * const c_char) ; table . restart = (gd_api . godot_method_bind_get_method) (class_name , "restart\0" . as_ptr () as * const c_char) ; table . set_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_amount\0" . as_ptr () as * const c_char) ; table . set_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_order\0" . as_ptr () as * const c_char) ; table . set_draw_pass_mesh = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_pass_mesh\0" . as_ptr () as * const c_char) ; table . set_draw_passes = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_passes\0" . as_ptr () as * const c_char) ; table . set_emitting = (gd_api . godot_method_bind_get_method) (class_name , "set_emitting\0" . as_ptr () as * const c_char) ; table . set_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . set_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_fixed_fps\0" . as_ptr () as * const c_char) ; table . set_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "set_fractional_delta\0" . as_ptr () as * const c_char) ; table . set_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime\0" . as_ptr () as * const c_char) ; table . set_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "set_one_shot\0" . as_ptr () as * const c_char) ; table . set_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "set_pre_process_time\0" . as_ptr () as * const c_char) ; table . set_process_material = (gd_api . godot_method_bind_get_method) (class_name , "set_process_material\0" . as_ptr () as * const c_char) ; table . set_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_randomness_ratio\0" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\0" . as_ptr () as * const c_char) ; table . set_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "set_use_local_coordinates\0" . as_ptr () as * const c_char) ; table . set_visibility_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_visibility_aabb\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::particles::private::Particles;
            
            pub mod particles_2d {
                # ! [doc = "This module contains types related to the API class [`Particles2D`][super::Particles2D]."] pub (crate) mod private { # [doc = "`core class Particles2D` inherits `Node2D` (manually managed).\n\nThis class has related types in the [`particles_2d`][super::particles_2d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_particles2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Particles2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Particles2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nParticles2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Particles2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Particles2D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DrawOrder (pub i64) ; impl DrawOrder { pub const INDEX : DrawOrder = DrawOrder (0i64) ; pub const LIFETIME : DrawOrder = DrawOrder (1i64) ; } impl From < i64 > for DrawOrder { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DrawOrder > for i64 { # [inline] fn from (v : DrawOrder) -> Self { v . 0 } } impl FromVariant for DrawOrder { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Particles2D { pub const DRAW_ORDER_INDEX : i64 = 0i64 ; pub const DRAW_ORDER_LIFETIME : i64 = 1i64 ; } impl Particles2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Particles2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns a rectangle containing the positions of all existing particles."] # [doc = ""] # [inline] pub fn capture_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . capture_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The number of particles emitted in one emission cycle (corresponding to the [`lifetime`][Self::lifetime]).\n**Note:** Changing [`amount`][Self::amount] will reset the particle emission, therefore removing all particles that were already emitted before changing [`amount`][Self::amount]."] # [doc = ""] # [inline] pub fn amount (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_amount ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Particle draw order. Uses [`DrawOrder`][DrawOrder] values."] # [doc = ""] # [inline] pub fn draw_order (& self) -> crate :: generated :: particles_2d :: DrawOrder { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_draw_order ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: particles_2d :: DrawOrder > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "How rapidly particles in an emission cycle are emitted. If greater than `0`, there will be a gap in emissions before the next cycle begins."] # [doc = ""] # [inline] pub fn explosiveness_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_explosiveness_ratio ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself."] # [doc = ""] # [inline] pub fn fixed_fps (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_fixed_fps ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, results in fractional delta calculation which has a smoother particles display effect."] # [doc = ""] # [inline] pub fn fractional_delta (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_fractional_delta ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The amount of time each particle will exist (in seconds)."] # [doc = ""] # [inline] pub fn lifetime (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_lifetime ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Normal map to be used for the [`texture`][Self::texture] property.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normal_map (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_normal_map ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end."] # [doc = ""] # [inline] pub fn one_shot (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_one_shot ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Particle system starts as if it had already run for this many seconds."] # [doc = ""] # [inline] pub fn pre_process_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_pre_process_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "[`Material`][Material] for processing particles. Can be a [`ParticlesMaterial`][ParticlesMaterial] or a [`ShaderMaterial`][ShaderMaterial]."] # [doc = ""] # [inline] pub fn process_material (& self) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_process_material ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Emission lifetime randomness ratio."] # [doc = ""] # [inline] pub fn randomness_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_randomness_ratio ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles."] # [doc = ""] # [inline] pub fn speed_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_speed_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Particle texture. If `null`, particles will be squares."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, particles use the parent node's coordinate space. If `false`, they use global coordinates."] # [doc = ""] # [inline] pub fn use_local_coordinates (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_use_local_coordinates ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The [`Rect2`][Rect2] that determines the node's region which needs to be visible on screen for the particle system to be active.\nGrow the rect if particles suddenly appear/disappear when the node enters/exits the screen. The [`Rect2`][Rect2] can be grown via code or with the **Particles → Generate Visibility Rect** editor tool."] # [doc = ""] # [inline] pub fn visibility_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . get_visibility_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, particles are being emitted."] # [doc = ""] # [inline] pub fn is_emitting (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . is_emitting ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Restarts all the existing particles."] # [doc = ""] # [inline] pub fn restart (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . restart ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The number of particles emitted in one emission cycle (corresponding to the [`lifetime`][Self::lifetime]).\n**Note:** Changing [`amount`][Self::amount] will reset the particle emission, therefore removing all particles that were already emitted before changing [`amount`][Self::amount]."] # [doc = ""] # [inline] pub fn set_amount (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_amount ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Particle draw order. Uses [`DrawOrder`][DrawOrder] values."] # [doc = ""] # [inline] pub fn set_draw_order (& self , order : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_draw_order ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , order as _) ; } } # [doc = "If `true`, particles are being emitted."] # [doc = ""] # [inline] pub fn set_emitting (& self , emitting : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_emitting ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , emitting as _) ; } } # [doc = "How rapidly particles in an emission cycle are emitted. If greater than `0`, there will be a gap in emissions before the next cycle begins."] # [doc = ""] # [inline] pub fn set_explosiveness_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_explosiveness_ratio ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ratio as _) ; } } # [doc = "The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself."] # [doc = ""] # [inline] pub fn set_fixed_fps (& self , fps : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_fixed_fps ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , fps as _) ; } } # [doc = "If `true`, results in fractional delta calculation which has a smoother particles display effect."] # [doc = ""] # [inline] pub fn set_fractional_delta (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_fractional_delta ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The amount of time each particle will exist (in seconds)."] # [doc = ""] # [inline] pub fn set_lifetime (& self , secs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_lifetime ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , secs as _) ; } } # [doc = "Normal map to be used for the [`texture`][Self::texture] property.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn set_normal_map (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_normal_map ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end."] # [doc = ""] # [inline] pub fn set_one_shot (& self , secs : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_one_shot ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , secs as _) ; } } # [doc = "Particle system starts as if it had already run for this many seconds."] # [doc = ""] # [inline] pub fn set_pre_process_time (& self , secs : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_pre_process_time ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , secs as _) ; } } # [doc = "[`Material`][Material] for processing particles. Can be a [`ParticlesMaterial`][ParticlesMaterial] or a [`ShaderMaterial`][ShaderMaterial]."] # [doc = ""] # [inline] pub fn set_process_material (& self , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_process_material ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } # [doc = "Emission lifetime randomness ratio."] # [doc = ""] # [inline] pub fn set_randomness_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_randomness_ratio ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ratio as _) ; } } # [doc = "Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles."] # [doc = ""] # [inline] pub fn set_speed_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_speed_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , scale as _) ; } } # [doc = "Particle texture. If `null`, particles will be squares."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "If `true`, particles use the parent node's coordinate space. If `false`, they use global coordinates."] # [doc = ""] # [inline] pub fn set_use_local_coordinates (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_use_local_coordinates ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The [`Rect2`][Rect2] that determines the node's region which needs to be visible on screen for the particle system to be active.\nGrow the rect if particles suddenly appear/disappear when the node enters/exits the screen. The [`Rect2`][Rect2] can be grown via code or with the **Particles → Generate Visibility Rect** editor tool."] # [doc = ""] # [inline] pub fn set_visibility_rect (& self , visibility_rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Particles2DMethodTable :: get (get_api ()) . set_visibility_rect ; let ret = crate :: icalls :: icallvar__rect2 (method_bind , self . this . sys () . as_ptr () , visibility_rect) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Particles2D { } unsafe impl GodotObject for Particles2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Particles2D" } } impl QueueFree for Particles2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Particles2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Particles2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for Particles2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Particles2D { } unsafe impl SubClass < crate :: generated :: Node > for Particles2D { } unsafe impl SubClass < crate :: generated :: Object > for Particles2D { } impl Instanciable for Particles2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Particles2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Particles2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub capture_rect : * mut sys :: godot_method_bind , pub get_amount : * mut sys :: godot_method_bind , pub get_draw_order : * mut sys :: godot_method_bind , pub get_explosiveness_ratio : * mut sys :: godot_method_bind , pub get_fixed_fps : * mut sys :: godot_method_bind , pub get_fractional_delta : * mut sys :: godot_method_bind , pub get_lifetime : * mut sys :: godot_method_bind , pub get_normal_map : * mut sys :: godot_method_bind , pub get_one_shot : * mut sys :: godot_method_bind , pub get_pre_process_time : * mut sys :: godot_method_bind , pub get_process_material : * mut sys :: godot_method_bind , pub get_randomness_ratio : * mut sys :: godot_method_bind , pub get_speed_scale : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_use_local_coordinates : * mut sys :: godot_method_bind , pub get_visibility_rect : * mut sys :: godot_method_bind , pub is_emitting : * mut sys :: godot_method_bind , pub restart : * mut sys :: godot_method_bind , pub set_amount : * mut sys :: godot_method_bind , pub set_draw_order : * mut sys :: godot_method_bind , pub set_emitting : * mut sys :: godot_method_bind , pub set_explosiveness_ratio : * mut sys :: godot_method_bind , pub set_fixed_fps : * mut sys :: godot_method_bind , pub set_fractional_delta : * mut sys :: godot_method_bind , pub set_lifetime : * mut sys :: godot_method_bind , pub set_normal_map : * mut sys :: godot_method_bind , pub set_one_shot : * mut sys :: godot_method_bind , pub set_pre_process_time : * mut sys :: godot_method_bind , pub set_process_material : * mut sys :: godot_method_bind , pub set_randomness_ratio : * mut sys :: godot_method_bind , pub set_speed_scale : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_use_local_coordinates : * mut sys :: godot_method_bind , pub set_visibility_rect : * mut sys :: godot_method_bind } impl Particles2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Particles2DMethodTable = Particles2DMethodTable { class_constructor : None , capture_rect : 0 as * mut sys :: godot_method_bind , get_amount : 0 as * mut sys :: godot_method_bind , get_draw_order : 0 as * mut sys :: godot_method_bind , get_explosiveness_ratio : 0 as * mut sys :: godot_method_bind , get_fixed_fps : 0 as * mut sys :: godot_method_bind , get_fractional_delta : 0 as * mut sys :: godot_method_bind , get_lifetime : 0 as * mut sys :: godot_method_bind , get_normal_map : 0 as * mut sys :: godot_method_bind , get_one_shot : 0 as * mut sys :: godot_method_bind , get_pre_process_time : 0 as * mut sys :: godot_method_bind , get_process_material : 0 as * mut sys :: godot_method_bind , get_randomness_ratio : 0 as * mut sys :: godot_method_bind , get_speed_scale : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_use_local_coordinates : 0 as * mut sys :: godot_method_bind , get_visibility_rect : 0 as * mut sys :: godot_method_bind , is_emitting : 0 as * mut sys :: godot_method_bind , restart : 0 as * mut sys :: godot_method_bind , set_amount : 0 as * mut sys :: godot_method_bind , set_draw_order : 0 as * mut sys :: godot_method_bind , set_emitting : 0 as * mut sys :: godot_method_bind , set_explosiveness_ratio : 0 as * mut sys :: godot_method_bind , set_fixed_fps : 0 as * mut sys :: godot_method_bind , set_fractional_delta : 0 as * mut sys :: godot_method_bind , set_lifetime : 0 as * mut sys :: godot_method_bind , set_normal_map : 0 as * mut sys :: godot_method_bind , set_one_shot : 0 as * mut sys :: godot_method_bind , set_pre_process_time : 0 as * mut sys :: godot_method_bind , set_process_material : 0 as * mut sys :: godot_method_bind , set_randomness_ratio : 0 as * mut sys :: godot_method_bind , set_speed_scale : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_use_local_coordinates : 0 as * mut sys :: godot_method_bind , set_visibility_rect : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Particles2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Particles2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . capture_rect = (gd_api . godot_method_bind_get_method) (class_name , "capture_rect\0" . as_ptr () as * const c_char) ; table . get_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_amount\0" . as_ptr () as * const c_char) ; table . get_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_order\0" . as_ptr () as * const c_char) ; table . get_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . get_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_fixed_fps\0" . as_ptr () as * const c_char) ; table . get_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "get_fractional_delta\0" . as_ptr () as * const c_char) ; table . get_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime\0" . as_ptr () as * const c_char) ; table . get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_map\0" . as_ptr () as * const c_char) ; table . get_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "get_one_shot\0" . as_ptr () as * const c_char) ; table . get_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "get_pre_process_time\0" . as_ptr () as * const c_char) ; table . get_process_material = (gd_api . godot_method_bind_get_method) (class_name , "get_process_material\0" . as_ptr () as * const c_char) ; table . get_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_randomness_ratio\0" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "get_use_local_coordinates\0" . as_ptr () as * const c_char) ; table . get_visibility_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_visibility_rect\0" . as_ptr () as * const c_char) ; table . is_emitting = (gd_api . godot_method_bind_get_method) (class_name , "is_emitting\0" . as_ptr () as * const c_char) ; table . restart = (gd_api . godot_method_bind_get_method) (class_name , "restart\0" . as_ptr () as * const c_char) ; table . set_amount = (gd_api . godot_method_bind_get_method) (class_name , "set_amount\0" . as_ptr () as * const c_char) ; table . set_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_order\0" . as_ptr () as * const c_char) ; table . set_emitting = (gd_api . godot_method_bind_get_method) (class_name , "set_emitting\0" . as_ptr () as * const c_char) ; table . set_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . set_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_fixed_fps\0" . as_ptr () as * const c_char) ; table . set_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "set_fractional_delta\0" . as_ptr () as * const c_char) ; table . set_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime\0" . as_ptr () as * const c_char) ; table . set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_map\0" . as_ptr () as * const c_char) ; table . set_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "set_one_shot\0" . as_ptr () as * const c_char) ; table . set_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "set_pre_process_time\0" . as_ptr () as * const c_char) ; table . set_process_material = (gd_api . godot_method_bind_get_method) (class_name , "set_process_material\0" . as_ptr () as * const c_char) ; table . set_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_randomness_ratio\0" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "set_use_local_coordinates\0" . as_ptr () as * const c_char) ; table . set_visibility_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_visibility_rect\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::particles_2d::private::Particles2D;
            
            pub mod particles_material {
                # ! [doc = "This module contains types related to the API class [`ParticlesMaterial`][super::ParticlesMaterial]."] pub (crate) mod private { # [doc = "`core class ParticlesMaterial` inherits `Material` (reference-counted).\n\nThis class has related types in the [`particles_material`][super::particles_material] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_particlesmaterial.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nParticlesMaterial inherits methods from:\n - [Material](struct.Material.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ParticlesMaterial { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ParticlesMaterial ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EmissionShape (pub i64) ; impl EmissionShape { pub const POINT : EmissionShape = EmissionShape (0i64) ; pub const SPHERE : EmissionShape = EmissionShape (1i64) ; pub const BOX : EmissionShape = EmissionShape (2i64) ; pub const POINTS : EmissionShape = EmissionShape (3i64) ; pub const DIRECTED_POINTS : EmissionShape = EmissionShape (4i64) ; pub const RING : EmissionShape = EmissionShape (5i64) ; pub const MAX : EmissionShape = EmissionShape (6i64) ; } impl From < i64 > for EmissionShape { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EmissionShape > for i64 { # [inline] fn from (v : EmissionShape) -> Self { v . 0 } } impl FromVariant for EmissionShape { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flags (pub i64) ; impl Flags { pub const ALIGN_Y_TO_VELOCITY : Flags = Flags (0i64) ; pub const ROTATE_Y : Flags = Flags (1i64) ; pub const DISABLE_Z : Flags = Flags (2i64) ; pub const MAX : Flags = Flags (3i64) ; } impl From < i64 > for Flags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flags > for i64 { # [inline] fn from (v : Flags) -> Self { v . 0 } } impl FromVariant for Flags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Parameter (pub i64) ; impl Parameter { pub const INITIAL_LINEAR_VELOCITY : Parameter = Parameter (0i64) ; pub const ANGULAR_VELOCITY : Parameter = Parameter (1i64) ; pub const ORBIT_VELOCITY : Parameter = Parameter (2i64) ; pub const LINEAR_ACCEL : Parameter = Parameter (3i64) ; pub const RADIAL_ACCEL : Parameter = Parameter (4i64) ; pub const TANGENTIAL_ACCEL : Parameter = Parameter (5i64) ; pub const DAMPING : Parameter = Parameter (6i64) ; pub const ANGLE : Parameter = Parameter (7i64) ; pub const SCALE : Parameter = Parameter (8i64) ; pub const HUE_VARIATION : Parameter = Parameter (9i64) ; pub const ANIM_SPEED : Parameter = Parameter (10i64) ; pub const ANIM_OFFSET : Parameter = Parameter (11i64) ; pub const MAX : Parameter = Parameter (12i64) ; } impl From < i64 > for Parameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Parameter > for i64 { # [inline] fn from (v : Parameter) -> Self { v . 0 } } impl FromVariant for Parameter { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ParticlesMaterial { pub const EMISSION_SHAPE_POINT : i64 = 0i64 ; pub const FLAG_ALIGN_Y_TO_VELOCITY : i64 = 0i64 ; pub const PARAM_INITIAL_LINEAR_VELOCITY : i64 = 0i64 ; pub const EMISSION_SHAPE_SPHERE : i64 = 1i64 ; pub const FLAG_ROTATE_Y : i64 = 1i64 ; pub const PARAM_ANGULAR_VELOCITY : i64 = 1i64 ; pub const EMISSION_SHAPE_BOX : i64 = 2i64 ; pub const FLAG_DISABLE_Z : i64 = 2i64 ; pub const PARAM_ORBIT_VELOCITY : i64 = 2i64 ; pub const EMISSION_SHAPE_POINTS : i64 = 3i64 ; pub const FLAG_MAX : i64 = 3i64 ; pub const PARAM_LINEAR_ACCEL : i64 = 3i64 ; pub const EMISSION_SHAPE_DIRECTED_POINTS : i64 = 4i64 ; pub const PARAM_RADIAL_ACCEL : i64 = 4i64 ; pub const EMISSION_SHAPE_RING : i64 = 5i64 ; pub const PARAM_TANGENTIAL_ACCEL : i64 = 5i64 ; pub const EMISSION_SHAPE_MAX : i64 = 6i64 ; pub const PARAM_DAMPING : i64 = 6i64 ; pub const PARAM_ANGLE : i64 = 7i64 ; pub const PARAM_SCALE : i64 = 8i64 ; pub const PARAM_HUE_VARIATION : i64 = 9i64 ; pub const PARAM_ANIM_SPEED : i64 = 10i64 ; pub const PARAM_ANIM_OFFSET : i64 = 11i64 ; pub const PARAM_MAX : i64 = 12i64 ; } impl ParticlesMaterial { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ParticlesMaterialMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Each particle's initial color. If the [`Particles2D`][Particles2D]'s `texture` is defined, it will be multiplied by this color. To have particle display color in a [`SpatialMaterial`][SpatialMaterial] make sure to set [`SpatialMaterial.vertex_color_use_as_albedo`][SpatialMaterial::vertex_color_use_as_albedo] to `true`."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's initial color will vary along this [`GradientTexture`][GradientTexture] (multiplied with [`color`][Self::color])."] # [doc = ""] # [inline] pub fn color_initial_ramp (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_color_initial_ramp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's color will vary along this [`GradientTexture`][GradientTexture] over its lifetime (multiplied with [`color`][Self::color])."] # [doc = ""] # [inline] pub fn color_ramp (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_color_ramp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Unit vector specifying the particles' emission direction."] # [doc = ""] # [inline] pub fn direction (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_direction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The box's extents if `emission_shape` is set to [`EMISSION_SHAPE_BOX`][Self::EMISSION_SHAPE_BOX]."] # [doc = ""] # [inline] pub fn emission_box_extents (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_emission_box_extents ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Particle color will be modulated by color determined by sampling this texture at the same point as the [`emission_point_texture`][Self::emission_point_texture]."] # [doc = ""] # [inline] pub fn emission_color_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_emission_color_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Particle velocity and rotation will be set by sampling this texture at the same point as the [`emission_point_texture`][Self::emission_point_texture]. Used only in [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting \"Create Emission Points from Mesh/Node\" under the \"Particles\" tool in the toolbar."] # [doc = ""] # [inline] pub fn emission_normal_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_emission_normal_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The number of emission points if `emission_shape` is set to [`EMISSION_SHAPE_POINTS`][Self::EMISSION_SHAPE_POINTS] or [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn emission_point_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_emission_point_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Particles will be emitted at positions determined by sampling this texture at a random position. Used with [`EMISSION_SHAPE_POINTS`][Self::EMISSION_SHAPE_POINTS] and [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting \"Create Emission Points from Mesh/Node\" under the \"Particles\" tool in the toolbar."] # [doc = ""] # [inline] pub fn emission_point_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_emission_point_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The axis of the ring when using the emitter [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn emission_ring_axis (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_emission_ring_axis ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The height of the ring when using the emitter [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn emission_ring_height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_emission_ring_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The inner radius of the ring when using the emitter [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn emission_ring_inner_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_emission_ring_inner_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The radius of the ring when using the emitter [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn emission_ring_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_emission_ring_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Particles will be emitted inside this region. Use [`EmissionShape`][EmissionShape] constants for values."] # [doc = ""] # [inline] pub fn emission_shape (& self) -> crate :: generated :: particles_material :: EmissionShape { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_emission_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: particles_material :: EmissionShape > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The sphere's radius if `emission_shape` is set to [`EMISSION_SHAPE_SPHERE`][Self::EMISSION_SHAPE_SPHERE]."] # [doc = ""] # [inline] pub fn emission_sphere_radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_emission_sphere_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the specified flag is enabled."] # [doc = ""] # [inline] pub fn flag (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flag as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Amount of [`spread`][Self::spread] along the Y axis."] # [doc = ""] # [inline] pub fn flatness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_flatness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Gravity applied to every particle."] # [doc = ""] # [inline] pub fn gravity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_gravity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Particle lifetime randomness ratio."] # [doc = ""] # [inline] pub fn lifetime_randomness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_lifetime_randomness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the value of the specified parameter."] # [doc = ""] # [inline] pub fn param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the randomness ratio associated with the specified parameter."] # [doc = ""] # [inline] pub fn param_randomness (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`Texture`][Texture] used by the specified parameter."] # [doc = ""] # [inline] pub fn param_texture (& self , param : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's initial direction range from `+spread` to `-spread` degrees."] # [doc = ""] # [inline] pub fn spread (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_spread ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Trail particles' color will vary along this [`GradientTexture`][GradientTexture]."] # [doc = ""] # [inline] pub fn trail_color_modifier (& self) -> Option < Ref < crate :: generated :: GradientTexture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_trail_color_modifier ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: GradientTexture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Emitter will emit `amount` divided by `trail_divisor` particles. The remaining particles will be used as trail(s)."] # [doc = ""] # [inline] pub fn trail_divisor (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_trail_divisor ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Trail particles' size will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn trail_size_modifier (& self) -> Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_trail_size_modifier ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's initial color. If the [`Particles2D`][Particles2D]'s `texture` is defined, it will be multiplied by this color. To have particle display color in a [`SpatialMaterial`][SpatialMaterial] make sure to set [`SpatialMaterial.vertex_color_use_as_albedo`][SpatialMaterial::vertex_color_use_as_albedo] to `true`."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Each particle's initial color will vary along this [`GradientTexture`][GradientTexture] (multiplied with [`color`][Self::color])."] # [doc = ""] # [inline] pub fn set_color_initial_ramp (& self , ramp : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_color_initial_ramp ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , ramp . as_arg_ptr ()) ; } } # [doc = "Each particle's color will vary along this [`GradientTexture`][GradientTexture] over its lifetime (multiplied with [`color`][Self::color])."] # [doc = ""] # [inline] pub fn set_color_ramp (& self , ramp : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_color_ramp ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , ramp . as_arg_ptr ()) ; } } # [doc = "Unit vector specifying the particles' emission direction."] # [doc = ""] # [inline] pub fn set_direction (& self , degrees : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_direction ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , degrees) ; } } # [doc = "The box's extents if `emission_shape` is set to [`EMISSION_SHAPE_BOX`][Self::EMISSION_SHAPE_BOX]."] # [doc = ""] # [inline] pub fn set_emission_box_extents (& self , extents : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_emission_box_extents ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , extents) ; } } # [doc = "Particle color will be modulated by color determined by sampling this texture at the same point as the [`emission_point_texture`][Self::emission_point_texture]."] # [doc = ""] # [inline] pub fn set_emission_color_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_emission_color_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Particle velocity and rotation will be set by sampling this texture at the same point as the [`emission_point_texture`][Self::emission_point_texture]. Used only in [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting \"Create Emission Points from Mesh/Node\" under the \"Particles\" tool in the toolbar."] # [doc = ""] # [inline] pub fn set_emission_normal_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_emission_normal_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "The number of emission points if `emission_shape` is set to [`EMISSION_SHAPE_POINTS`][Self::EMISSION_SHAPE_POINTS] or [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]."] # [doc = ""] # [inline] pub fn set_emission_point_count (& self , point_count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_emission_point_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , point_count as _) ; } } # [doc = "Particles will be emitted at positions determined by sampling this texture at a random position. Used with [`EMISSION_SHAPE_POINTS`][Self::EMISSION_SHAPE_POINTS] and [`EMISSION_SHAPE_DIRECTED_POINTS`][Self::EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting \"Create Emission Points from Mesh/Node\" under the \"Particles\" tool in the toolbar."] # [doc = ""] # [inline] pub fn set_emission_point_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_emission_point_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "The axis of the ring when using the emitter [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn set_emission_ring_axis (& self , axis : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_emission_ring_axis ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , axis) ; } } # [doc = "The height of the ring when using the emitter [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn set_emission_ring_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_emission_ring_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = "The inner radius of the ring when using the emitter [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn set_emission_ring_inner_radius (& self , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_emission_ring_inner_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , offset as _) ; } } # [doc = "The radius of the ring when using the emitter [`EMISSION_SHAPE_RING`][Self::EMISSION_SHAPE_RING]."] # [doc = ""] # [inline] pub fn set_emission_ring_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_emission_ring_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = "Particles will be emitted inside this region. Use [`EmissionShape`][EmissionShape] constants for values."] # [doc = ""] # [inline] pub fn set_emission_shape (& self , shape : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_emission_shape ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , shape as _) ; } } # [doc = "The sphere's radius if `emission_shape` is set to [`EMISSION_SHAPE_SPHERE`][Self::EMISSION_SHAPE_SPHERE]."] # [doc = ""] # [inline] pub fn set_emission_sphere_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_emission_sphere_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = "If `true`, enables the specified flag. See [`Flags`][Flags] for options."] # [doc = ""] # [inline] pub fn set_flag (& self , flag : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , flag as _ , enable as _) ; } } # [doc = "Amount of [`spread`][Self::spread] along the Y axis."] # [doc = ""] # [inline] pub fn set_flatness (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_flatness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Gravity applied to every particle."] # [doc = ""] # [inline] pub fn set_gravity (& self , accel_vec : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_gravity ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , accel_vec) ; } } # [doc = "Particle lifetime randomness ratio."] # [doc = ""] # [inline] pub fn set_lifetime_randomness (& self , randomness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_lifetime_randomness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , randomness as _) ; } } # [doc = "Sets the specified [`Parameter`][Parameter]."] # [doc = ""] # [inline] pub fn set_param (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , param as _ , value as _) ; } } # [doc = "Sets the randomness ratio for the specified [`Parameter`][Parameter]."] # [doc = ""] # [inline] pub fn set_param_randomness (& self , param : i64 , randomness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , param as _ , randomness as _) ; } } # [doc = "Sets the [`Texture`][Texture] for the specified [`Parameter`][Parameter]."] # [doc = ""] # [inline] pub fn set_param_texture (& self , param : i64 , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , param as _ , texture . as_arg_ptr ()) ; } } # [doc = "Each particle's initial direction range from `+spread` to `-spread` degrees."] # [doc = ""] # [inline] pub fn set_spread (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_spread ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , degrees as _) ; } } # [doc = "Trail particles' color will vary along this [`GradientTexture`][GradientTexture]."] # [doc = ""] # [inline] pub fn set_trail_color_modifier (& self , texture : impl AsArg < crate :: generated :: GradientTexture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_trail_color_modifier ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Emitter will emit `amount` divided by `trail_divisor` particles. The remaining particles will be used as trail(s)."] # [doc = ""] # [inline] pub fn set_trail_divisor (& self , divisor : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_trail_divisor ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , divisor as _) ; } } # [doc = "Trail particles' size will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn set_trail_size_modifier (& self , texture : impl AsArg < crate :: generated :: CurveTexture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_trail_size_modifier ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Initial rotation applied to each particle, in degrees.\n**Note:** Only applied when [`flag_disable_z`][Self::flag_disable_z] or [`flag_rotate_y`][Self::flag_rotate_y] are `true` or the [`SpatialMaterial`][SpatialMaterial] being used to draw the particle is using [`SpatialMaterial.BILLBOARD_PARTICLES`][SpatialMaterial::BILLBOARD_PARTICLES]."] # [doc = ""] # [inline] pub fn angle (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 7i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial rotation applied to each particle, in degrees.\n**Note:** Only applied when [`flag_disable_z`][Self::flag_disable_z] or [`flag_rotate_y`][Self::flag_rotate_y] are `true` or the [`SpatialMaterial`][SpatialMaterial] being used to draw the particle is using [`SpatialMaterial.BILLBOARD_PARTICLES`][SpatialMaterial::BILLBOARD_PARTICLES]."] # [doc = ""] # [inline] pub fn set_angle (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 7i64 , value as _) ; } } # [doc = "Each particle's rotation will be animated along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn angle_curve (& self) -> Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 7i64) ; < Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's rotation will be animated along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn set_angle_curve (& self , value : impl AsArg < crate :: generated :: CurveTexture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 7i64 , value . as_arg_ptr ()) ; } } # [doc = "Rotation randomness ratio."] # [doc = ""] # [inline] pub fn angle_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 7i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Rotation randomness ratio."] # [doc = ""] # [inline] pub fn set_angle_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 7i64 , value as _) ; } } # [doc = "Initial angular velocity applied to each particle in _degrees_ per second. Sets the speed of rotation of the particle.\n**Note:** Only applied when [`flag_disable_z`][Self::flag_disable_z] or [`flag_rotate_y`][Self::flag_rotate_y] are `true` or the [`SpatialMaterial`][SpatialMaterial] being used to draw the particle is using [`SpatialMaterial.BILLBOARD_PARTICLES`][SpatialMaterial::BILLBOARD_PARTICLES]."] # [doc = ""] # [inline] pub fn angular_velocity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial angular velocity applied to each particle in _degrees_ per second. Sets the speed of rotation of the particle.\n**Note:** Only applied when [`flag_disable_z`][Self::flag_disable_z] or [`flag_rotate_y`][Self::flag_rotate_y] are `true` or the [`SpatialMaterial`][SpatialMaterial] being used to draw the particle is using [`SpatialMaterial.BILLBOARD_PARTICLES`][SpatialMaterial::BILLBOARD_PARTICLES]."] # [doc = ""] # [inline] pub fn set_angular_velocity (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Each particle's angular velocity will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn angular_velocity_curve (& self) -> Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's angular velocity will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn set_angular_velocity_curve (& self , value : impl AsArg < crate :: generated :: CurveTexture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 1i64 , value . as_arg_ptr ()) ; } } # [doc = "Angular velocity randomness ratio."] # [doc = ""] # [inline] pub fn angular_velocity_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Angular velocity randomness ratio."] # [doc = ""] # [inline] pub fn set_angular_velocity_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Particle animation offset."] # [doc = ""] # [inline] pub fn anim_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 11i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Particle animation offset."] # [doc = ""] # [inline] pub fn set_anim_offset (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 11i64 , value as _) ; } } # [doc = "Each particle's animation offset will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn anim_offset_curve (& self) -> Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 11i64) ; < Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's animation offset will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn set_anim_offset_curve (& self , value : impl AsArg < crate :: generated :: CurveTexture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 11i64 , value . as_arg_ptr ()) ; } } # [doc = "Animation offset randomness ratio."] # [doc = ""] # [inline] pub fn anim_offset_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 11i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Animation offset randomness ratio."] # [doc = ""] # [inline] pub fn set_anim_offset_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 11i64 , value as _) ; } } # [doc = "Particle animation speed."] # [doc = ""] # [inline] pub fn anim_speed (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 10i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Particle animation speed."] # [doc = ""] # [inline] pub fn set_anim_speed (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 10i64 , value as _) ; } } # [doc = "Each particle's animation speed will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn anim_speed_curve (& self) -> Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 10i64) ; < Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's animation speed will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn set_anim_speed_curve (& self , value : impl AsArg < crate :: generated :: CurveTexture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 10i64 , value . as_arg_ptr ()) ; } } # [doc = "Animation speed randomness ratio."] # [doc = ""] # [inline] pub fn anim_speed_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 10i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Animation speed randomness ratio."] # [doc = ""] # [inline] pub fn set_anim_speed_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 10i64 , value as _) ; } } # [doc = "The rate at which particles lose velocity."] # [doc = ""] # [inline] pub fn damping (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 6i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The rate at which particles lose velocity."] # [doc = ""] # [inline] pub fn set_damping (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 6i64 , value as _) ; } } # [doc = "Damping will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn damping_curve (& self) -> Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 6i64) ; < Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Damping will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn set_damping_curve (& self , value : impl AsArg < crate :: generated :: CurveTexture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 6i64 , value . as_arg_ptr ()) ; } } # [doc = "Damping randomness ratio."] # [doc = ""] # [inline] pub fn damping_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 6i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Damping randomness ratio."] # [doc = ""] # [inline] pub fn set_damping_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 6i64 , value as _) ; } } # [doc = "Align Y axis of particle with the direction of its velocity."] # [doc = ""] # [inline] pub fn flag_align_y (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Align Y axis of particle with the direction of its velocity."] # [doc = ""] # [inline] pub fn set_flag_align_y (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "If `true`, particles will not move on the z axis."] # [doc = ""] # [inline] pub fn flag_disable_z (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, particles will not move on the z axis."] # [doc = ""] # [inline] pub fn set_flag_disable_z (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "If `true`, particles rotate around Y axis by [`angle`][Self::angle]."] # [doc = ""] # [inline] pub fn flag_rotate_y (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, particles rotate around Y axis by [`angle`][Self::angle]."] # [doc = ""] # [inline] pub fn set_flag_rotate_y (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Initial hue variation applied to each particle."] # [doc = ""] # [inline] pub fn hue_variation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 9i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial hue variation applied to each particle."] # [doc = ""] # [inline] pub fn set_hue_variation (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 9i64 , value as _) ; } } # [doc = "Each particle's hue will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn hue_variation_curve (& self) -> Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 9i64) ; < Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's hue will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn set_hue_variation_curve (& self , value : impl AsArg < crate :: generated :: CurveTexture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 9i64 , value . as_arg_ptr ()) ; } } # [doc = "Hue variation randomness ratio."] # [doc = ""] # [inline] pub fn hue_variation_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 9i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Hue variation randomness ratio."] # [doc = ""] # [inline] pub fn set_hue_variation_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 9i64 , value as _) ; } } # [doc = "Initial velocity magnitude for each particle. Direction comes from [`spread`][Self::spread] and the node's orientation."] # [doc = ""] # [inline] pub fn initial_velocity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial velocity magnitude for each particle. Direction comes from [`spread`][Self::spread] and the node's orientation."] # [doc = ""] # [inline] pub fn set_initial_velocity (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "Initial velocity randomness ratio."] # [doc = ""] # [inline] pub fn initial_velocity_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial velocity randomness ratio."] # [doc = ""] # [inline] pub fn set_initial_velocity_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "Linear acceleration applied to each particle in the direction of motion."] # [doc = ""] # [inline] pub fn linear_accel (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Linear acceleration applied to each particle in the direction of motion."] # [doc = ""] # [inline] pub fn set_linear_accel (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Each particle's linear acceleration will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn linear_accel_curve (& self) -> Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's linear acceleration will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn set_linear_accel_curve (& self , value : impl AsArg < crate :: generated :: CurveTexture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 3i64 , value . as_arg_ptr ()) ; } } # [doc = "Linear acceleration randomness ratio."] # [doc = ""] # [inline] pub fn linear_accel_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Linear acceleration randomness ratio."] # [doc = ""] # [inline] pub fn set_linear_accel_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.\n**Note:** Only available when [`flag_disable_z`][Self::flag_disable_z] is `true`."] # [doc = ""] # [inline] pub fn orbit_velocity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second.\n**Note:** Only available when [`flag_disable_z`][Self::flag_disable_z] is `true`."] # [doc = ""] # [inline] pub fn set_orbit_velocity (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Each particle's orbital velocity will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn orbit_velocity_curve (& self) -> Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's orbital velocity will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn set_orbit_velocity_curve (& self , value : impl AsArg < crate :: generated :: CurveTexture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 2i64 , value . as_arg_ptr ()) ; } } # [doc = "Orbital velocity randomness ratio."] # [doc = ""] # [inline] pub fn orbit_velocity_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Orbital velocity randomness ratio."] # [doc = ""] # [inline] pub fn set_orbit_velocity_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Radial acceleration applied to each particle. Makes particle accelerate away from origin."] # [doc = ""] # [inline] pub fn radial_accel (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Radial acceleration applied to each particle. Makes particle accelerate away from origin."] # [doc = ""] # [inline] pub fn set_radial_accel (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 4i64 , value as _) ; } } # [doc = "Each particle's radial acceleration will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn radial_accel_curve (& self) -> Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's radial acceleration will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn set_radial_accel_curve (& self , value : impl AsArg < crate :: generated :: CurveTexture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 4i64 , value . as_arg_ptr ()) ; } } # [doc = "Radial acceleration randomness ratio."] # [doc = ""] # [inline] pub fn radial_accel_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Radial acceleration randomness ratio."] # [doc = ""] # [inline] pub fn set_radial_accel_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 4i64 , value as _) ; } } # [doc = "Initial scale applied to each particle."] # [doc = ""] # [inline] pub fn scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 8i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Initial scale applied to each particle."] # [doc = ""] # [inline] pub fn set_scale (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 8i64 , value as _) ; } } # [doc = "Each particle's scale will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn scale_curve (& self) -> Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 8i64) ; < Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's scale will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn set_scale_curve (& self , value : impl AsArg < crate :: generated :: CurveTexture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 8i64 , value . as_arg_ptr ()) ; } } # [doc = "Scale randomness ratio."] # [doc = ""] # [inline] pub fn scale_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 8i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Scale randomness ratio."] # [doc = ""] # [inline] pub fn set_scale_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 8i64 , value as _) ; } } # [doc = "Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion."] # [doc = ""] # [inline] pub fn tangential_accel (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 5i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion."] # [doc = ""] # [inline] pub fn set_tangential_accel (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 5i64 , value as _) ; } } # [doc = "Each particle's tangential acceleration will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn tangential_accel_curve (& self) -> Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 5i64) ; < Option < Ref < crate :: generated :: CurveTexture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Each particle's tangential acceleration will vary along this [`CurveTexture`][CurveTexture]."] # [doc = ""] # [inline] pub fn set_tangential_accel_curve (& self , value : impl AsArg < crate :: generated :: CurveTexture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 5i64 , value . as_arg_ptr ()) ; } } # [doc = "Tangential acceleration randomness ratio."] # [doc = ""] # [inline] pub fn tangential_accel_random (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . get_param_randomness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 5i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Tangential acceleration randomness ratio."] # [doc = ""] # [inline] pub fn set_tangential_accel_random (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ParticlesMaterialMethodTable :: get (get_api ()) . set_param_randomness ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 5i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ParticlesMaterial { } unsafe impl GodotObject for ParticlesMaterial { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ParticlesMaterial" } } impl std :: ops :: Deref for ParticlesMaterial { type Target = crate :: generated :: Material ; # [inline] fn deref (& self) -> & crate :: generated :: Material { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ParticlesMaterial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Material { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Material > for ParticlesMaterial { } unsafe impl SubClass < crate :: generated :: Resource > for ParticlesMaterial { } unsafe impl SubClass < crate :: generated :: Reference > for ParticlesMaterial { } unsafe impl SubClass < crate :: generated :: Object > for ParticlesMaterial { } impl Instanciable for ParticlesMaterial { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ParticlesMaterial :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ParticlesMaterialMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_color : * mut sys :: godot_method_bind , pub get_color_initial_ramp : * mut sys :: godot_method_bind , pub get_color_ramp : * mut sys :: godot_method_bind , pub get_direction : * mut sys :: godot_method_bind , pub get_emission_box_extents : * mut sys :: godot_method_bind , pub get_emission_color_texture : * mut sys :: godot_method_bind , pub get_emission_normal_texture : * mut sys :: godot_method_bind , pub get_emission_point_count : * mut sys :: godot_method_bind , pub get_emission_point_texture : * mut sys :: godot_method_bind , pub get_emission_ring_axis : * mut sys :: godot_method_bind , pub get_emission_ring_height : * mut sys :: godot_method_bind , pub get_emission_ring_inner_radius : * mut sys :: godot_method_bind , pub get_emission_ring_radius : * mut sys :: godot_method_bind , pub get_emission_shape : * mut sys :: godot_method_bind , pub get_emission_sphere_radius : * mut sys :: godot_method_bind , pub get_flag : * mut sys :: godot_method_bind , pub get_flatness : * mut sys :: godot_method_bind , pub get_gravity : * mut sys :: godot_method_bind , pub get_lifetime_randomness : * mut sys :: godot_method_bind , pub get_param : * mut sys :: godot_method_bind , pub get_param_randomness : * mut sys :: godot_method_bind , pub get_param_texture : * mut sys :: godot_method_bind , pub get_spread : * mut sys :: godot_method_bind , pub get_trail_color_modifier : * mut sys :: godot_method_bind , pub get_trail_divisor : * mut sys :: godot_method_bind , pub get_trail_size_modifier : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_color_initial_ramp : * mut sys :: godot_method_bind , pub set_color_ramp : * mut sys :: godot_method_bind , pub set_direction : * mut sys :: godot_method_bind , pub set_emission_box_extents : * mut sys :: godot_method_bind , pub set_emission_color_texture : * mut sys :: godot_method_bind , pub set_emission_normal_texture : * mut sys :: godot_method_bind , pub set_emission_point_count : * mut sys :: godot_method_bind , pub set_emission_point_texture : * mut sys :: godot_method_bind , pub set_emission_ring_axis : * mut sys :: godot_method_bind , pub set_emission_ring_height : * mut sys :: godot_method_bind , pub set_emission_ring_inner_radius : * mut sys :: godot_method_bind , pub set_emission_ring_radius : * mut sys :: godot_method_bind , pub set_emission_shape : * mut sys :: godot_method_bind , pub set_emission_sphere_radius : * mut sys :: godot_method_bind , pub set_flag : * mut sys :: godot_method_bind , pub set_flatness : * mut sys :: godot_method_bind , pub set_gravity : * mut sys :: godot_method_bind , pub set_lifetime_randomness : * mut sys :: godot_method_bind , pub set_param : * mut sys :: godot_method_bind , pub set_param_randomness : * mut sys :: godot_method_bind , pub set_param_texture : * mut sys :: godot_method_bind , pub set_spread : * mut sys :: godot_method_bind , pub set_trail_color_modifier : * mut sys :: godot_method_bind , pub set_trail_divisor : * mut sys :: godot_method_bind , pub set_trail_size_modifier : * mut sys :: godot_method_bind } impl ParticlesMaterialMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ParticlesMaterialMethodTable = ParticlesMaterialMethodTable { class_constructor : None , get_color : 0 as * mut sys :: godot_method_bind , get_color_initial_ramp : 0 as * mut sys :: godot_method_bind , get_color_ramp : 0 as * mut sys :: godot_method_bind , get_direction : 0 as * mut sys :: godot_method_bind , get_emission_box_extents : 0 as * mut sys :: godot_method_bind , get_emission_color_texture : 0 as * mut sys :: godot_method_bind , get_emission_normal_texture : 0 as * mut sys :: godot_method_bind , get_emission_point_count : 0 as * mut sys :: godot_method_bind , get_emission_point_texture : 0 as * mut sys :: godot_method_bind , get_emission_ring_axis : 0 as * mut sys :: godot_method_bind , get_emission_ring_height : 0 as * mut sys :: godot_method_bind , get_emission_ring_inner_radius : 0 as * mut sys :: godot_method_bind , get_emission_ring_radius : 0 as * mut sys :: godot_method_bind , get_emission_shape : 0 as * mut sys :: godot_method_bind , get_emission_sphere_radius : 0 as * mut sys :: godot_method_bind , get_flag : 0 as * mut sys :: godot_method_bind , get_flatness : 0 as * mut sys :: godot_method_bind , get_gravity : 0 as * mut sys :: godot_method_bind , get_lifetime_randomness : 0 as * mut sys :: godot_method_bind , get_param : 0 as * mut sys :: godot_method_bind , get_param_randomness : 0 as * mut sys :: godot_method_bind , get_param_texture : 0 as * mut sys :: godot_method_bind , get_spread : 0 as * mut sys :: godot_method_bind , get_trail_color_modifier : 0 as * mut sys :: godot_method_bind , get_trail_divisor : 0 as * mut sys :: godot_method_bind , get_trail_size_modifier : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_color_initial_ramp : 0 as * mut sys :: godot_method_bind , set_color_ramp : 0 as * mut sys :: godot_method_bind , set_direction : 0 as * mut sys :: godot_method_bind , set_emission_box_extents : 0 as * mut sys :: godot_method_bind , set_emission_color_texture : 0 as * mut sys :: godot_method_bind , set_emission_normal_texture : 0 as * mut sys :: godot_method_bind , set_emission_point_count : 0 as * mut sys :: godot_method_bind , set_emission_point_texture : 0 as * mut sys :: godot_method_bind , set_emission_ring_axis : 0 as * mut sys :: godot_method_bind , set_emission_ring_height : 0 as * mut sys :: godot_method_bind , set_emission_ring_inner_radius : 0 as * mut sys :: godot_method_bind , set_emission_ring_radius : 0 as * mut sys :: godot_method_bind , set_emission_shape : 0 as * mut sys :: godot_method_bind , set_emission_sphere_radius : 0 as * mut sys :: godot_method_bind , set_flag : 0 as * mut sys :: godot_method_bind , set_flatness : 0 as * mut sys :: godot_method_bind , set_gravity : 0 as * mut sys :: godot_method_bind , set_lifetime_randomness : 0 as * mut sys :: godot_method_bind , set_param : 0 as * mut sys :: godot_method_bind , set_param_randomness : 0 as * mut sys :: godot_method_bind , set_param_texture : 0 as * mut sys :: godot_method_bind , set_spread : 0 as * mut sys :: godot_method_bind , set_trail_color_modifier : 0 as * mut sys :: godot_method_bind , set_trail_divisor : 0 as * mut sys :: godot_method_bind , set_trail_size_modifier : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ParticlesMaterialMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ParticlesMaterial\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_color_initial_ramp = (gd_api . godot_method_bind_get_method) (class_name , "get_color_initial_ramp\0" . as_ptr () as * const c_char) ; table . get_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "get_color_ramp\0" . as_ptr () as * const c_char) ; table . get_direction = (gd_api . godot_method_bind_get_method) (class_name , "get_direction\0" . as_ptr () as * const c_char) ; table . get_emission_box_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_box_extents\0" . as_ptr () as * const c_char) ; table . get_emission_color_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_color_texture\0" . as_ptr () as * const c_char) ; table . get_emission_normal_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_normal_texture\0" . as_ptr () as * const c_char) ; table . get_emission_point_count = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_point_count\0" . as_ptr () as * const c_char) ; table . get_emission_point_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_point_texture\0" . as_ptr () as * const c_char) ; table . get_emission_ring_axis = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_ring_axis\0" . as_ptr () as * const c_char) ; table . get_emission_ring_height = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_ring_height\0" . as_ptr () as * const c_char) ; table . get_emission_ring_inner_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_ring_inner_radius\0" . as_ptr () as * const c_char) ; table . get_emission_ring_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_ring_radius\0" . as_ptr () as * const c_char) ; table . get_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_shape\0" . as_ptr () as * const c_char) ; table . get_emission_sphere_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_sphere_radius\0" . as_ptr () as * const c_char) ; table . get_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_flag\0" . as_ptr () as * const c_char) ; table . get_flatness = (gd_api . godot_method_bind_get_method) (class_name , "get_flatness\0" . as_ptr () as * const c_char) ; table . get_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity\0" . as_ptr () as * const c_char) ; table . get_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_lifetime_randomness\0" . as_ptr () as * const c_char) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . get_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "get_param_randomness\0" . as_ptr () as * const c_char) ; table . get_param_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_param_texture\0" . as_ptr () as * const c_char) ; table . get_spread = (gd_api . godot_method_bind_get_method) (class_name , "get_spread\0" . as_ptr () as * const c_char) ; table . get_trail_color_modifier = (gd_api . godot_method_bind_get_method) (class_name , "get_trail_color_modifier\0" . as_ptr () as * const c_char) ; table . get_trail_divisor = (gd_api . godot_method_bind_get_method) (class_name , "get_trail_divisor\0" . as_ptr () as * const c_char) ; table . get_trail_size_modifier = (gd_api . godot_method_bind_get_method) (class_name , "get_trail_size_modifier\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_color_initial_ramp = (gd_api . godot_method_bind_get_method) (class_name , "set_color_initial_ramp\0" . as_ptr () as * const c_char) ; table . set_color_ramp = (gd_api . godot_method_bind_get_method) (class_name , "set_color_ramp\0" . as_ptr () as * const c_char) ; table . set_direction = (gd_api . godot_method_bind_get_method) (class_name , "set_direction\0" . as_ptr () as * const c_char) ; table . set_emission_box_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_box_extents\0" . as_ptr () as * const c_char) ; table . set_emission_color_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_color_texture\0" . as_ptr () as * const c_char) ; table . set_emission_normal_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_normal_texture\0" . as_ptr () as * const c_char) ; table . set_emission_point_count = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_point_count\0" . as_ptr () as * const c_char) ; table . set_emission_point_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_point_texture\0" . as_ptr () as * const c_char) ; table . set_emission_ring_axis = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_ring_axis\0" . as_ptr () as * const c_char) ; table . set_emission_ring_height = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_ring_height\0" . as_ptr () as * const c_char) ; table . set_emission_ring_inner_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_ring_inner_radius\0" . as_ptr () as * const c_char) ; table . set_emission_ring_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_ring_radius\0" . as_ptr () as * const c_char) ; table . set_emission_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_shape\0" . as_ptr () as * const c_char) ; table . set_emission_sphere_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_sphere_radius\0" . as_ptr () as * const c_char) ; table . set_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_flag\0" . as_ptr () as * const c_char) ; table . set_flatness = (gd_api . godot_method_bind_get_method) (class_name , "set_flatness\0" . as_ptr () as * const c_char) ; table . set_gravity = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity\0" . as_ptr () as * const c_char) ; table . set_lifetime_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_lifetime_randomness\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; table . set_param_randomness = (gd_api . godot_method_bind_get_method) (class_name , "set_param_randomness\0" . as_ptr () as * const c_char) ; table . set_param_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_param_texture\0" . as_ptr () as * const c_char) ; table . set_spread = (gd_api . godot_method_bind_get_method) (class_name , "set_spread\0" . as_ptr () as * const c_char) ; table . set_trail_color_modifier = (gd_api . godot_method_bind_get_method) (class_name , "set_trail_color_modifier\0" . as_ptr () as * const c_char) ; table . set_trail_divisor = (gd_api . godot_method_bind_get_method) (class_name , "set_trail_divisor\0" . as_ptr () as * const c_char) ; table . set_trail_size_modifier = (gd_api . godot_method_bind_get_method) (class_name , "set_trail_size_modifier\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::particles_material::private::ParticlesMaterial;
            
            pub(crate) mod path {
                # ! [doc = "This module contains types related to the API class [`Path`][super::Path]."] pub (crate) mod private { # [doc = "`core class Path` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_path.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Path` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Path>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPath inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Path { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Path ; impl Path { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PathMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A [`Curve3D`][Curve3D] describing the path."] # [doc = ""] # [inline] pub fn curve (& self) -> Option < Ref < crate :: generated :: Curve3D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PathMethodTable :: get (get_api ()) . get_curve ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Curve3D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A [`Curve3D`][Curve3D] describing the path."] # [doc = ""] # [inline] pub fn set_curve (& self , curve : impl AsArg < crate :: generated :: Curve3D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathMethodTable :: get (get_api ()) . set_curve ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , curve . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Path { } unsafe impl GodotObject for Path { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Path" } } impl QueueFree for Path { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Path { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Path { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for Path { } unsafe impl SubClass < crate :: generated :: Node > for Path { } unsafe impl SubClass < crate :: generated :: Object > for Path { } impl Instanciable for Path { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Path :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PathMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_curve : * mut sys :: godot_method_bind , pub set_curve : * mut sys :: godot_method_bind } impl PathMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PathMethodTable = PathMethodTable { class_constructor : None , get_curve : 0 as * mut sys :: godot_method_bind , set_curve : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PathMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Path\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_curve\0" . as_ptr () as * const c_char) ; table . set_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_curve\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::path::private::Path;
            
            pub(crate) mod path_2d {
                # ! [doc = "This module contains types related to the API class [`Path2D`][super::Path2D]."] pub (crate) mod private { # [doc = "`core class Path2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_path2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Path2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Path2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPath2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Path2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Path2D ; impl Path2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Path2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A [`Curve2D`][Curve2D] describing the path."] # [doc = ""] # [inline] pub fn curve (& self) -> Option < Ref < crate :: generated :: Curve2D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Path2DMethodTable :: get (get_api ()) . get_curve ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Curve2D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A [`Curve2D`][Curve2D] describing the path."] # [doc = ""] # [inline] pub fn set_curve (& self , curve : impl AsArg < crate :: generated :: Curve2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Path2DMethodTable :: get (get_api ()) . set_curve ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , curve . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Path2D { } unsafe impl GodotObject for Path2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Path2D" } } impl QueueFree for Path2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Path2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Path2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for Path2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Path2D { } unsafe impl SubClass < crate :: generated :: Node > for Path2D { } unsafe impl SubClass < crate :: generated :: Object > for Path2D { } impl Instanciable for Path2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Path2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Path2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_curve : * mut sys :: godot_method_bind , pub set_curve : * mut sys :: godot_method_bind } impl Path2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Path2DMethodTable = Path2DMethodTable { class_constructor : None , get_curve : 0 as * mut sys :: godot_method_bind , set_curve : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Path2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Path2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_curve\0" . as_ptr () as * const c_char) ; table . set_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_curve\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::path_2d::private::Path2D;
            
            pub mod path_follow {
                # ! [doc = "This module contains types related to the API class [`PathFollow`][super::PathFollow]."] pub (crate) mod private { # [doc = "`core class PathFollow` inherits `Spatial` (manually managed).\n\nThis class has related types in the [`path_follow`][super::path_follow] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_pathfollow.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`PathFollow` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<PathFollow>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPathFollow inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PathFollow { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PathFollow ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct RotationMode (pub i64) ; impl RotationMode { pub const NONE : RotationMode = RotationMode (0i64) ; pub const Y : RotationMode = RotationMode (1i64) ; pub const XY : RotationMode = RotationMode (2i64) ; pub const XYZ : RotationMode = RotationMode (3i64) ; pub const ORIENTED : RotationMode = RotationMode (4i64) ; } impl From < i64 > for RotationMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < RotationMode > for i64 { # [inline] fn from (v : RotationMode) -> Self { v . 0 } } impl FromVariant for RotationMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl PathFollow { pub const ROTATION_NONE : i64 = 0i64 ; pub const ROTATION_Y : i64 = 1i64 ; pub const ROTATION_XY : i64 = 2i64 ; pub const ROTATION_XYZ : i64 = 3i64 ; pub const ROTATION_ORIENTED : i64 = 4i64 ; } impl PathFollow { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PathFollowMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, the position between two cached points is interpolated cubically, and linearly otherwise.\nThe points along the [`Curve3D`][Curve3D] of the [`Path`][Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.\nThere are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations."] # [doc = ""] # [inline] pub fn cubic_interpolation (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . get_cubic_interpolation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The node's offset along the curve."] # [doc = ""] # [inline] pub fn h_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . get_h_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path."] # [doc = ""] # [inline] pub fn offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Allows or forbids rotation on one or more axes, depending on the [`RotationMode`][RotationMode] constants being used."] # [doc = ""] # [inline] pub fn rotation_mode (& self) -> crate :: generated :: path_follow :: RotationMode { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . get_rotation_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: path_follow :: RotationMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length."] # [doc = ""] # [inline] pub fn unit_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . get_unit_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The node's offset perpendicular to the curve."] # [doc = ""] # [inline] pub fn v_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . get_v_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths."] # [doc = ""] # [inline] pub fn has_loop (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . has_loop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the position between two cached points is interpolated cubically, and linearly otherwise.\nThe points along the [`Curve3D`][Curve3D] of the [`Path`][Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.\nThere are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations."] # [doc = ""] # [inline] pub fn set_cubic_interpolation (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . set_cubic_interpolation ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The node's offset along the curve."] # [doc = ""] # [inline] pub fn set_h_offset (& self , h_offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . set_h_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , h_offset as _) ; } } # [doc = "If `true`, any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths."] # [doc = ""] # [inline] pub fn set_loop (& self , loop_ : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . set_loop ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , loop_ as _) ; } } # [doc = "The distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , offset as _) ; } } # [doc = "Allows or forbids rotation on one or more axes, depending on the [`RotationMode`][RotationMode] constants being used."] # [doc = ""] # [inline] pub fn set_rotation_mode (& self , rotation_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . set_rotation_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , rotation_mode as _) ; } } # [doc = "The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length."] # [doc = ""] # [inline] pub fn set_unit_offset (& self , unit_offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . set_unit_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , unit_offset as _) ; } } # [doc = "The node's offset perpendicular to the curve."] # [doc = ""] # [inline] pub fn set_v_offset (& self , v_offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollowMethodTable :: get (get_api ()) . set_v_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , v_offset as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PathFollow { } unsafe impl GodotObject for PathFollow { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PathFollow" } } impl QueueFree for PathFollow { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for PathFollow { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PathFollow { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for PathFollow { } unsafe impl SubClass < crate :: generated :: Node > for PathFollow { } unsafe impl SubClass < crate :: generated :: Object > for PathFollow { } impl Instanciable for PathFollow { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PathFollow :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PathFollowMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_cubic_interpolation : * mut sys :: godot_method_bind , pub get_h_offset : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_rotation_mode : * mut sys :: godot_method_bind , pub get_unit_offset : * mut sys :: godot_method_bind , pub get_v_offset : * mut sys :: godot_method_bind , pub has_loop : * mut sys :: godot_method_bind , pub set_cubic_interpolation : * mut sys :: godot_method_bind , pub set_h_offset : * mut sys :: godot_method_bind , pub set_loop : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_rotation_mode : * mut sys :: godot_method_bind , pub set_unit_offset : * mut sys :: godot_method_bind , pub set_v_offset : * mut sys :: godot_method_bind } impl PathFollowMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PathFollowMethodTable = PathFollowMethodTable { class_constructor : None , get_cubic_interpolation : 0 as * mut sys :: godot_method_bind , get_h_offset : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_rotation_mode : 0 as * mut sys :: godot_method_bind , get_unit_offset : 0 as * mut sys :: godot_method_bind , get_v_offset : 0 as * mut sys :: godot_method_bind , has_loop : 0 as * mut sys :: godot_method_bind , set_cubic_interpolation : 0 as * mut sys :: godot_method_bind , set_h_offset : 0 as * mut sys :: godot_method_bind , set_loop : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_rotation_mode : 0 as * mut sys :: godot_method_bind , set_unit_offset : 0 as * mut sys :: godot_method_bind , set_v_offset : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PathFollowMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PathFollow\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cubic_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "get_cubic_interpolation\0" . as_ptr () as * const c_char) ; table . get_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_h_offset\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_rotation_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation_mode\0" . as_ptr () as * const c_char) ; table . get_unit_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_unit_offset\0" . as_ptr () as * const c_char) ; table . get_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_v_offset\0" . as_ptr () as * const c_char) ; table . has_loop = (gd_api . godot_method_bind_get_method) (class_name , "has_loop\0" . as_ptr () as * const c_char) ; table . set_cubic_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "set_cubic_interpolation\0" . as_ptr () as * const c_char) ; table . set_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_h_offset\0" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_rotation_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation_mode\0" . as_ptr () as * const c_char) ; table . set_unit_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_unit_offset\0" . as_ptr () as * const c_char) ; table . set_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_v_offset\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::path_follow::private::PathFollow;
            
            pub(crate) mod path_follow_2d {
                # ! [doc = "This module contains types related to the API class [`PathFollow2D`][super::PathFollow2D]."] pub (crate) mod private { # [doc = "`core class PathFollow2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_pathfollow2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`PathFollow2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<PathFollow2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPathFollow2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PathFollow2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PathFollow2D ; impl PathFollow2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PathFollow2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, the position between two cached points is interpolated cubically, and linearly otherwise.\nThe points along the [`Curve2D`][Curve2D] of the [`Path2D`][Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.\nThere are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations."] # [doc = ""] # [inline] pub fn cubic_interpolation (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . get_cubic_interpolation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The node's offset along the curve."] # [doc = ""] # [inline] pub fn h_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . get_h_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "How far to look ahead of the curve to calculate the tangent if the node is rotating. E.g. shorter lookaheads will lead to faster rotations."] # [doc = ""] # [inline] pub fn lookahead (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . get_lookahead ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The distance along the path in pixels."] # [doc = ""] # [inline] pub fn offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length."] # [doc = ""] # [inline] pub fn unit_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . get_unit_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The node's offset perpendicular to the curve."] # [doc = ""] # [inline] pub fn v_offset (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . get_v_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths."] # [doc = ""] # [inline] pub fn has_loop (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . has_loop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, this node rotates to follow the path, making its descendants rotate."] # [doc = ""] # [inline] pub fn is_rotating (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . is_rotating ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the position between two cached points is interpolated cubically, and linearly otherwise.\nThe points along the [`Curve2D`][Curve2D] of the [`Path2D`][Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough.\nThere are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations."] # [doc = ""] # [inline] pub fn set_cubic_interpolation (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . set_cubic_interpolation ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The node's offset along the curve."] # [doc = ""] # [inline] pub fn set_h_offset (& self , h_offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . set_h_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , h_offset as _) ; } } # [doc = "How far to look ahead of the curve to calculate the tangent if the node is rotating. E.g. shorter lookaheads will lead to faster rotations."] # [doc = ""] # [inline] pub fn set_lookahead (& self , lookahead : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . set_lookahead ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , lookahead as _) ; } } # [doc = "If `true`, any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths."] # [doc = ""] # [inline] pub fn set_loop (& self , loop_ : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . set_loop ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , loop_ as _) ; } } # [doc = "The distance along the path in pixels."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , offset as _) ; } } # [doc = "If `true`, this node rotates to follow the path, making its descendants rotate."] # [doc = ""] # [inline] pub fn set_rotate (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . set_rotate ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length."] # [doc = ""] # [inline] pub fn set_unit_offset (& self , unit_offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . set_unit_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , unit_offset as _) ; } } # [doc = "The node's offset perpendicular to the curve."] # [doc = ""] # [inline] pub fn set_v_offset (& self , v_offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PathFollow2DMethodTable :: get (get_api ()) . set_v_offset ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , v_offset as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PathFollow2D { } unsafe impl GodotObject for PathFollow2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PathFollow2D" } } impl QueueFree for PathFollow2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for PathFollow2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PathFollow2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for PathFollow2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for PathFollow2D { } unsafe impl SubClass < crate :: generated :: Node > for PathFollow2D { } unsafe impl SubClass < crate :: generated :: Object > for PathFollow2D { } impl Instanciable for PathFollow2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PathFollow2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PathFollow2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_cubic_interpolation : * mut sys :: godot_method_bind , pub get_h_offset : * mut sys :: godot_method_bind , pub get_lookahead : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_unit_offset : * mut sys :: godot_method_bind , pub get_v_offset : * mut sys :: godot_method_bind , pub has_loop : * mut sys :: godot_method_bind , pub is_rotating : * mut sys :: godot_method_bind , pub set_cubic_interpolation : * mut sys :: godot_method_bind , pub set_h_offset : * mut sys :: godot_method_bind , pub set_lookahead : * mut sys :: godot_method_bind , pub set_loop : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_rotate : * mut sys :: godot_method_bind , pub set_unit_offset : * mut sys :: godot_method_bind , pub set_v_offset : * mut sys :: godot_method_bind } impl PathFollow2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PathFollow2DMethodTable = PathFollow2DMethodTable { class_constructor : None , get_cubic_interpolation : 0 as * mut sys :: godot_method_bind , get_h_offset : 0 as * mut sys :: godot_method_bind , get_lookahead : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_unit_offset : 0 as * mut sys :: godot_method_bind , get_v_offset : 0 as * mut sys :: godot_method_bind , has_loop : 0 as * mut sys :: godot_method_bind , is_rotating : 0 as * mut sys :: godot_method_bind , set_cubic_interpolation : 0 as * mut sys :: godot_method_bind , set_h_offset : 0 as * mut sys :: godot_method_bind , set_lookahead : 0 as * mut sys :: godot_method_bind , set_loop : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_rotate : 0 as * mut sys :: godot_method_bind , set_unit_offset : 0 as * mut sys :: godot_method_bind , set_v_offset : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PathFollow2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PathFollow2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cubic_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "get_cubic_interpolation\0" . as_ptr () as * const c_char) ; table . get_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_h_offset\0" . as_ptr () as * const c_char) ; table . get_lookahead = (gd_api . godot_method_bind_get_method) (class_name , "get_lookahead\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_unit_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_unit_offset\0" . as_ptr () as * const c_char) ; table . get_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_v_offset\0" . as_ptr () as * const c_char) ; table . has_loop = (gd_api . godot_method_bind_get_method) (class_name , "has_loop\0" . as_ptr () as * const c_char) ; table . is_rotating = (gd_api . godot_method_bind_get_method) (class_name , "is_rotating\0" . as_ptr () as * const c_char) ; table . set_cubic_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "set_cubic_interpolation\0" . as_ptr () as * const c_char) ; table . set_h_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_h_offset\0" . as_ptr () as * const c_char) ; table . set_lookahead = (gd_api . godot_method_bind_get_method) (class_name , "set_lookahead\0" . as_ptr () as * const c_char) ; table . set_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_loop\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_rotate = (gd_api . godot_method_bind_get_method) (class_name , "set_rotate\0" . as_ptr () as * const c_char) ; table . set_unit_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_unit_offset\0" . as_ptr () as * const c_char) ; table . set_v_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_v_offset\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::path_follow_2d::private::PathFollow2D;
            
            pub mod performance {
                # ! [doc = "This module contains types related to the API class [`Performance`][super::Performance]."] pub (crate) mod private { # [doc = "`core singleton class Performance` inherits `Object` (manually managed).\n\nThis class has related types in the [`performance`][super::performance] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_performance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nPerformance inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Performance { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Performance ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Monitor (pub i64) ; impl Monitor { pub const TIME_FPS : Monitor = Monitor (0i64) ; pub const TIME_PROCESS : Monitor = Monitor (1i64) ; pub const TIME_PHYSICS_PROCESS : Monitor = Monitor (2i64) ; pub const MEMORY_STATIC : Monitor = Monitor (3i64) ; pub const MEMORY_DYNAMIC : Monitor = Monitor (4i64) ; pub const MEMORY_STATIC_MAX : Monitor = Monitor (5i64) ; pub const MEMORY_DYNAMIC_MAX : Monitor = Monitor (6i64) ; pub const MEMORY_MESSAGE_BUFFER_MAX : Monitor = Monitor (7i64) ; pub const OBJECT_COUNT : Monitor = Monitor (8i64) ; pub const OBJECT_RESOURCE_COUNT : Monitor = Monitor (9i64) ; pub const OBJECT_NODE_COUNT : Monitor = Monitor (10i64) ; pub const OBJECT_ORPHAN_NODE_COUNT : Monitor = Monitor (11i64) ; pub const RENDER_OBJECTS_IN_FRAME : Monitor = Monitor (12i64) ; pub const RENDER_VERTICES_IN_FRAME : Monitor = Monitor (13i64) ; pub const RENDER_MATERIAL_CHANGES_IN_FRAME : Monitor = Monitor (14i64) ; pub const RENDER_SHADER_CHANGES_IN_FRAME : Monitor = Monitor (15i64) ; pub const RENDER_SURFACE_CHANGES_IN_FRAME : Monitor = Monitor (16i64) ; pub const RENDER_DRAW_CALLS_IN_FRAME : Monitor = Monitor (17i64) ; pub const RENDER_2D_ITEMS_IN_FRAME : Monitor = Monitor (18i64) ; pub const RENDER_2D_DRAW_CALLS_IN_FRAME : Monitor = Monitor (19i64) ; pub const RENDER_VIDEO_MEM_USED : Monitor = Monitor (20i64) ; pub const RENDER_TEXTURE_MEM_USED : Monitor = Monitor (21i64) ; pub const RENDER_VERTEX_MEM_USED : Monitor = Monitor (22i64) ; pub const RENDER_USAGE_VIDEO_MEM_TOTAL : Monitor = Monitor (23i64) ; pub const PHYSICS_2D_ACTIVE_OBJECTS : Monitor = Monitor (24i64) ; pub const PHYSICS_2D_COLLISION_PAIRS : Monitor = Monitor (25i64) ; pub const PHYSICS_2D_ISLAND_COUNT : Monitor = Monitor (26i64) ; pub const PHYSICS_3D_ACTIVE_OBJECTS : Monitor = Monitor (27i64) ; pub const PHYSICS_3D_COLLISION_PAIRS : Monitor = Monitor (28i64) ; pub const PHYSICS_3D_ISLAND_COUNT : Monitor = Monitor (29i64) ; pub const AUDIO_OUTPUT_LATENCY : Monitor = Monitor (30i64) ; pub const MONITOR_MAX : Monitor = Monitor (31i64) ; } impl From < i64 > for Monitor { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Monitor > for i64 { # [inline] fn from (v : Monitor) -> Self { v . 0 } } impl FromVariant for Monitor { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Performance { pub const TIME_FPS : i64 = 0i64 ; pub const TIME_PROCESS : i64 = 1i64 ; pub const TIME_PHYSICS_PROCESS : i64 = 2i64 ; pub const MEMORY_STATIC : i64 = 3i64 ; pub const MEMORY_DYNAMIC : i64 = 4i64 ; pub const MEMORY_STATIC_MAX : i64 = 5i64 ; pub const MEMORY_DYNAMIC_MAX : i64 = 6i64 ; pub const MEMORY_MESSAGE_BUFFER_MAX : i64 = 7i64 ; pub const OBJECT_COUNT : i64 = 8i64 ; pub const OBJECT_RESOURCE_COUNT : i64 = 9i64 ; pub const OBJECT_NODE_COUNT : i64 = 10i64 ; pub const OBJECT_ORPHAN_NODE_COUNT : i64 = 11i64 ; pub const RENDER_OBJECTS_IN_FRAME : i64 = 12i64 ; pub const RENDER_VERTICES_IN_FRAME : i64 = 13i64 ; pub const RENDER_MATERIAL_CHANGES_IN_FRAME : i64 = 14i64 ; pub const RENDER_SHADER_CHANGES_IN_FRAME : i64 = 15i64 ; pub const RENDER_SURFACE_CHANGES_IN_FRAME : i64 = 16i64 ; pub const RENDER_DRAW_CALLS_IN_FRAME : i64 = 17i64 ; pub const RENDER_2D_ITEMS_IN_FRAME : i64 = 18i64 ; pub const RENDER_2D_DRAW_CALLS_IN_FRAME : i64 = 19i64 ; pub const RENDER_VIDEO_MEM_USED : i64 = 20i64 ; pub const RENDER_TEXTURE_MEM_USED : i64 = 21i64 ; pub const RENDER_VERTEX_MEM_USED : i64 = 22i64 ; pub const RENDER_USAGE_VIDEO_MEM_TOTAL : i64 = 23i64 ; pub const PHYSICS_2D_ACTIVE_OBJECTS : i64 = 24i64 ; pub const PHYSICS_2D_COLLISION_PAIRS : i64 = 25i64 ; pub const PHYSICS_2D_ISLAND_COUNT : i64 = 26i64 ; pub const PHYSICS_3D_ACTIVE_OBJECTS : i64 = 27i64 ; pub const PHYSICS_3D_COLLISION_PAIRS : i64 = 28i64 ; pub const PHYSICS_3D_ISLAND_COUNT : i64 = 29i64 ; pub const AUDIO_OUTPUT_LATENCY : i64 = 30i64 ; pub const MONITOR_MAX : i64 = 31i64 ; } impl Performance { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("Performance\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the value of one of the available monitors. You should provide one of the [`Monitor`][Monitor] constants as the argument, like this:\n```gdscript\nprint(Performance.get_monitor(Performance.TIME_FPS)) # Prints the FPS to the console\n```"] # [doc = ""] # [inline] pub fn get_monitor (& self , monitor : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PerformanceMethodTable :: get (get_api ()) . get_monitor ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , monitor as _) ; < f64 > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Performance { } unsafe impl GodotObject for Performance { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Performance" } } impl std :: ops :: Deref for Performance { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Performance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for Performance { } unsafe impl Send for Performance { } unsafe impl Sync for Performance { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PerformanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_monitor : * mut sys :: godot_method_bind } impl PerformanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PerformanceMethodTable = PerformanceMethodTable { class_constructor : None , get_monitor : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PerformanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Performance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_monitor = (gd_api . godot_method_bind_get_method) (class_name , "get_monitor\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::performance::private::Performance;
            
            pub mod physical_bone {
                # ! [doc = "This module contains types related to the API class [`PhysicalBone`][super::PhysicalBone]."] pub (crate) mod private { # [doc = "`core class PhysicalBone` inherits `PhysicsBody` (manually managed).\n\nThis class has related types in the [`physical_bone`][super::physical_bone] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_physicalbone.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`PhysicalBone` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<PhysicalBone>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPhysicalBone inherits methods from:\n - [PhysicsBody](struct.PhysicsBody.html)\n - [CollisionObject](struct.CollisionObject.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PhysicalBone { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PhysicalBone ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct JointType (pub i64) ; impl JointType { pub const NONE : JointType = JointType (0i64) ; pub const PIN : JointType = JointType (1i64) ; pub const CONE : JointType = JointType (2i64) ; pub const HINGE : JointType = JointType (3i64) ; pub const SLIDER : JointType = JointType (4i64) ; pub const _6DOF : JointType = JointType (5i64) ; } impl From < i64 > for JointType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < JointType > for i64 { # [inline] fn from (v : JointType) -> Self { v . 0 } } impl FromVariant for JointType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl PhysicalBone { pub const JOINT_TYPE_NONE : i64 = 0i64 ; pub const JOINT_TYPE_PIN : i64 = 1i64 ; pub const JOINT_TYPE_CONE : i64 = 2i64 ; pub const JOINT_TYPE_HINGE : i64 = 3i64 ; pub const JOINT_TYPE_SLIDER : i64 = 4i64 ; pub const JOINT_TYPE_6DOF : i64 = 5i64 ; } impl PhysicalBone { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PhysicalBoneMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn apply_central_impulse (& self , impulse : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . apply_central_impulse ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , impulse) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn apply_impulse (& self , position : Vector3 , impulse : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . apply_impulse ; let ret = crate :: icalls :: icallvar__vec3_vec3 (method_bind , self . this . sys () . as_ptr () , position , impulse) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn body_offset (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_body_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_bone_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_bone_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn bounce (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_bounce ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn friction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_friction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn gravity_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_gravity_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn joint_offset (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_joint_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn joint_type (& self) -> crate :: generated :: physical_bone :: JointType { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_joint_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: physical_bone :: JointType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn mass (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_mass ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_simulate_physics (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_simulate_physics ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn weight (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . get_weight ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_simulating_physics (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . is_simulating_physics ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_static_body (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . is_static_body ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_body_offset (& self , offset : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_body_offset ; let ret = crate :: icalls :: icallvar__trans (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bounce (& self , bounce : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_bounce ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , bounce as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_friction (& self , friction : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_friction ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , friction as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_gravity_scale (& self , gravity_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_gravity_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , gravity_scale as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_joint_offset (& self , offset : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_joint_offset ; let ret = crate :: icalls :: icallvar__trans (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_joint_type (& self , joint_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_joint_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , joint_type as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_mass (& self , mass : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_mass ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , mass as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_weight (& self , weight : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicalBoneMethodTable :: get (get_api ()) . set_weight ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , weight as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicalBone { } unsafe impl GodotObject for PhysicalBone { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PhysicalBone" } } impl QueueFree for PhysicalBone { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for PhysicalBone { type Target = crate :: generated :: PhysicsBody ; # [inline] fn deref (& self) -> & crate :: generated :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicalBone { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PhysicsBody > for PhysicalBone { } unsafe impl SubClass < crate :: generated :: CollisionObject > for PhysicalBone { } unsafe impl SubClass < crate :: generated :: Spatial > for PhysicalBone { } unsafe impl SubClass < crate :: generated :: Node > for PhysicalBone { } unsafe impl SubClass < crate :: generated :: Object > for PhysicalBone { } impl Instanciable for PhysicalBone { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PhysicalBone :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PhysicalBoneMethodTable { pub class_constructor : sys :: godot_class_constructor , pub apply_central_impulse : * mut sys :: godot_method_bind , pub apply_impulse : * mut sys :: godot_method_bind , pub get_body_offset : * mut sys :: godot_method_bind , pub get_bone_id : * mut sys :: godot_method_bind , pub get_bounce : * mut sys :: godot_method_bind , pub get_friction : * mut sys :: godot_method_bind , pub get_gravity_scale : * mut sys :: godot_method_bind , pub get_joint_offset : * mut sys :: godot_method_bind , pub get_joint_type : * mut sys :: godot_method_bind , pub get_mass : * mut sys :: godot_method_bind , pub get_simulate_physics : * mut sys :: godot_method_bind , pub get_weight : * mut sys :: godot_method_bind , pub is_simulating_physics : * mut sys :: godot_method_bind , pub is_static_body : * mut sys :: godot_method_bind , pub set_body_offset : * mut sys :: godot_method_bind , pub set_bounce : * mut sys :: godot_method_bind , pub set_friction : * mut sys :: godot_method_bind , pub set_gravity_scale : * mut sys :: godot_method_bind , pub set_joint_offset : * mut sys :: godot_method_bind , pub set_joint_type : * mut sys :: godot_method_bind , pub set_mass : * mut sys :: godot_method_bind , pub set_weight : * mut sys :: godot_method_bind } impl PhysicalBoneMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PhysicalBoneMethodTable = PhysicalBoneMethodTable { class_constructor : None , apply_central_impulse : 0 as * mut sys :: godot_method_bind , apply_impulse : 0 as * mut sys :: godot_method_bind , get_body_offset : 0 as * mut sys :: godot_method_bind , get_bone_id : 0 as * mut sys :: godot_method_bind , get_bounce : 0 as * mut sys :: godot_method_bind , get_friction : 0 as * mut sys :: godot_method_bind , get_gravity_scale : 0 as * mut sys :: godot_method_bind , get_joint_offset : 0 as * mut sys :: godot_method_bind , get_joint_type : 0 as * mut sys :: godot_method_bind , get_mass : 0 as * mut sys :: godot_method_bind , get_simulate_physics : 0 as * mut sys :: godot_method_bind , get_weight : 0 as * mut sys :: godot_method_bind , is_simulating_physics : 0 as * mut sys :: godot_method_bind , is_static_body : 0 as * mut sys :: godot_method_bind , set_body_offset : 0 as * mut sys :: godot_method_bind , set_bounce : 0 as * mut sys :: godot_method_bind , set_friction : 0 as * mut sys :: godot_method_bind , set_gravity_scale : 0 as * mut sys :: godot_method_bind , set_joint_offset : 0 as * mut sys :: godot_method_bind , set_joint_type : 0 as * mut sys :: godot_method_bind , set_mass : 0 as * mut sys :: godot_method_bind , set_weight : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PhysicalBoneMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PhysicalBone\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_central_impulse\0" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\0" . as_ptr () as * const c_char) ; table . get_body_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_body_offset\0" . as_ptr () as * const c_char) ; table . get_bone_id = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_id\0" . as_ptr () as * const c_char) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\0" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\0" . as_ptr () as * const c_char) ; table . get_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_scale\0" . as_ptr () as * const c_char) ; table . get_joint_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_joint_offset\0" . as_ptr () as * const c_char) ; table . get_joint_type = (gd_api . godot_method_bind_get_method) (class_name , "get_joint_type\0" . as_ptr () as * const c_char) ; table . get_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_mass\0" . as_ptr () as * const c_char) ; table . get_simulate_physics = (gd_api . godot_method_bind_get_method) (class_name , "get_simulate_physics\0" . as_ptr () as * const c_char) ; table . get_weight = (gd_api . godot_method_bind_get_method) (class_name , "get_weight\0" . as_ptr () as * const c_char) ; table . is_simulating_physics = (gd_api . godot_method_bind_get_method) (class_name , "is_simulating_physics\0" . as_ptr () as * const c_char) ; table . is_static_body = (gd_api . godot_method_bind_get_method) (class_name , "is_static_body\0" . as_ptr () as * const c_char) ; table . set_body_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_body_offset\0" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\0" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\0" . as_ptr () as * const c_char) ; table . set_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_scale\0" . as_ptr () as * const c_char) ; table . set_joint_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_joint_offset\0" . as_ptr () as * const c_char) ; table . set_joint_type = (gd_api . godot_method_bind_get_method) (class_name , "set_joint_type\0" . as_ptr () as * const c_char) ; table . set_mass = (gd_api . godot_method_bind_get_method) (class_name , "set_mass\0" . as_ptr () as * const c_char) ; table . set_weight = (gd_api . godot_method_bind_get_method) (class_name , "set_weight\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::physical_bone::private::PhysicalBone;
            
            pub(crate) mod physics_2d_direct_body_state {
                # ! [doc = "This module contains types related to the API class [`Physics2DDirectBodyState`][super::Physics2DDirectBodyState]."] pub (crate) mod private { # [doc = "`core class Physics2DDirectBodyState` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_physics2ddirectbodystate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nPhysics2DDirectBodyState inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Physics2DDirectBodyState { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Physics2DDirectBodyState ; impl Physics2DDirectBodyState { # [doc = "Adds a constant directional force without affecting rotation."] # [doc = ""] # [inline] pub fn add_central_force (& self , force : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . add_central_force ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , force) ; } } # [doc = "Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates."] # [doc = ""] # [inline] pub fn add_force (& self , offset : Vector2 , force : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . add_force ; let ret = crate :: icalls :: icallvar__vec2_vec2 (method_bind , self . this . sys () . as_ptr () , offset , force) ; } } # [doc = "Adds a constant rotational force."] # [doc = ""] # [inline] pub fn add_torque (& self , torque : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . add_torque ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , torque as _) ; } } # [doc = "Applies a directional impulse without affecting rotation."] # [doc = ""] # [inline] pub fn apply_central_impulse (& self , impulse : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . apply_central_impulse ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , impulse) ; } } # [doc = "Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the \"_force\" functions otherwise). The offset uses the rotation of the global coordinate system, but is centered at the object's origin."] # [doc = ""] # [inline] pub fn apply_impulse (& self , offset : Vector2 , impulse : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . apply_impulse ; let ret = crate :: icalls :: icallvar__vec2_vec2 (method_bind , self . this . sys () . as_ptr () , offset , impulse) ; } } # [doc = "Applies a rotational impulse to the body."] # [doc = ""] # [inline] pub fn apply_torque_impulse (& self , impulse : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . apply_torque_impulse ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , impulse as _) ; } } # [doc = "The body's rotational velocity in _radians_ per second."] # [doc = ""] # [inline] pub fn angular_velocity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_angular_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the collider's [`RID`][Rid]."] # [doc = ""] # [inline] pub fn get_contact_collider (& self , contact_idx : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the collider's object id."] # [doc = ""] # [inline] pub fn get_contact_collider_id (& self , contact_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider_id ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the collider object. This depends on how it was created (will return a scene node if such was used to create it)."] # [doc = ""] # [inline] pub fn get_contact_collider_object (& self , contact_idx : i64) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider_object ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the contact position in the collider."] # [doc = ""] # [inline] pub fn get_contact_collider_position (& self , contact_idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the collider's shape index."] # [doc = ""] # [inline] pub fn get_contact_collider_shape (& self , contact_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider_shape ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the collided shape's metadata. This metadata is different from [`Object.get_meta`][Object::get_meta], and is set with [`Physics2DServer.shape_set_data`][Physics2DServer::shape_set_data]."] # [doc = ""] # [inline] pub fn get_contact_collider_shape_metadata (& self , contact_idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider_shape_metadata ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the linear velocity vector at the collider's contact point."] # [doc = ""] # [inline] pub fn get_contact_collider_velocity_at_position (& self , contact_idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider_velocity_at_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of contacts this body has with other bodies.\n**Note:** By default, this returns 0 unless bodies are configured to monitor contacts. See [`RigidBody2D.contact_monitor`][RigidBody2D::contact_monitor]."] # [doc = ""] # [inline] pub fn get_contact_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_contact_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the local normal at the contact point."] # [doc = ""] # [inline] pub fn get_contact_local_normal (& self , contact_idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_contact_local_normal ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the local position of the contact point."] # [doc = ""] # [inline] pub fn get_contact_local_position (& self , contact_idx : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_contact_local_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the local shape index of the collision."] # [doc = ""] # [inline] pub fn get_contact_local_shape (& self , contact_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_contact_local_shape ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The inverse of the inertia of the body."] # [doc = ""] # [inline] pub fn inverse_inertia (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_inverse_inertia ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The inverse of the mass of the body."] # [doc = ""] # [inline] pub fn inverse_mass (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_inverse_mass ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body's linear velocity in pixels per second."] # [doc = ""] # [inline] pub fn linear_velocity (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_linear_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current state of the space, useful for queries."] # [doc = ""] # [inline] pub fn get_space_state (& self) -> Option < Ref < crate :: generated :: Physics2DDirectSpaceState , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_space_state ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Physics2DDirectSpaceState , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The timestep (delta) used for the simulation."] # [doc = ""] # [inline] pub fn step (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_step ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The rate at which the body stops rotating, if there are not any other forces moving it."] # [doc = ""] # [inline] pub fn total_angular_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_total_angular_damp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The total gravity vector being currently applied to this body."] # [doc = ""] # [inline] pub fn total_gravity (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_total_gravity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The rate at which the body stops moving, if there are not any other forces moving it."] # [doc = ""] # [inline] pub fn total_linear_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_total_linear_damp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body's transformation matrix."] # [doc = ""] # [inline] pub fn transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the body's velocity at the given relative position, including both translation and rotation."] # [doc = ""] # [inline] pub fn get_velocity_at_local_position (& self , local_position : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . get_velocity_at_local_position ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , local_position) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Calls the built-in force integration code."] # [doc = ""] # [inline] pub fn integrate_forces (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . integrate_forces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, this body is currently sleeping (not active)."] # [doc = ""] # [inline] pub fn is_sleeping (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . is_sleeping ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The body's rotational velocity in _radians_ per second."] # [doc = ""] # [inline] pub fn set_angular_velocity (& self , velocity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . set_angular_velocity ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , velocity as _) ; } } # [doc = "The body's linear velocity in pixels per second."] # [doc = ""] # [inline] pub fn set_linear_velocity (& self , velocity : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . set_linear_velocity ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , velocity) ; } } # [doc = "If `true`, this body is currently sleeping (not active)."] # [doc = ""] # [inline] pub fn set_sleep_state (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . set_sleep_state ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The body's transformation matrix."] # [doc = ""] # [inline] pub fn set_transform (& self , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectBodyStateMethodTable :: get (get_api ()) . set_transform ; let ret = crate :: icalls :: icallvar__trans2D (method_bind , self . this . sys () . as_ptr () , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DDirectBodyState { } unsafe impl GodotObject for Physics2DDirectBodyState { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Physics2DDirectBodyState" } } impl std :: ops :: Deref for Physics2DDirectBodyState { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DDirectBodyState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for Physics2DDirectBodyState { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Physics2DDirectBodyStateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_central_force : * mut sys :: godot_method_bind , pub add_force : * mut sys :: godot_method_bind , pub add_torque : * mut sys :: godot_method_bind , pub apply_central_impulse : * mut sys :: godot_method_bind , pub apply_impulse : * mut sys :: godot_method_bind , pub apply_torque_impulse : * mut sys :: godot_method_bind , pub get_angular_velocity : * mut sys :: godot_method_bind , pub get_contact_collider : * mut sys :: godot_method_bind , pub get_contact_collider_id : * mut sys :: godot_method_bind , pub get_contact_collider_object : * mut sys :: godot_method_bind , pub get_contact_collider_position : * mut sys :: godot_method_bind , pub get_contact_collider_shape : * mut sys :: godot_method_bind , pub get_contact_collider_shape_metadata : * mut sys :: godot_method_bind , pub get_contact_collider_velocity_at_position : * mut sys :: godot_method_bind , pub get_contact_count : * mut sys :: godot_method_bind , pub get_contact_local_normal : * mut sys :: godot_method_bind , pub get_contact_local_position : * mut sys :: godot_method_bind , pub get_contact_local_shape : * mut sys :: godot_method_bind , pub get_inverse_inertia : * mut sys :: godot_method_bind , pub get_inverse_mass : * mut sys :: godot_method_bind , pub get_linear_velocity : * mut sys :: godot_method_bind , pub get_space_state : * mut sys :: godot_method_bind , pub get_step : * mut sys :: godot_method_bind , pub get_total_angular_damp : * mut sys :: godot_method_bind , pub get_total_gravity : * mut sys :: godot_method_bind , pub get_total_linear_damp : * mut sys :: godot_method_bind , pub get_transform : * mut sys :: godot_method_bind , pub get_velocity_at_local_position : * mut sys :: godot_method_bind , pub integrate_forces : * mut sys :: godot_method_bind , pub is_sleeping : * mut sys :: godot_method_bind , pub set_angular_velocity : * mut sys :: godot_method_bind , pub set_linear_velocity : * mut sys :: godot_method_bind , pub set_sleep_state : * mut sys :: godot_method_bind , pub set_transform : * mut sys :: godot_method_bind } impl Physics2DDirectBodyStateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Physics2DDirectBodyStateMethodTable = Physics2DDirectBodyStateMethodTable { class_constructor : None , add_central_force : 0 as * mut sys :: godot_method_bind , add_force : 0 as * mut sys :: godot_method_bind , add_torque : 0 as * mut sys :: godot_method_bind , apply_central_impulse : 0 as * mut sys :: godot_method_bind , apply_impulse : 0 as * mut sys :: godot_method_bind , apply_torque_impulse : 0 as * mut sys :: godot_method_bind , get_angular_velocity : 0 as * mut sys :: godot_method_bind , get_contact_collider : 0 as * mut sys :: godot_method_bind , get_contact_collider_id : 0 as * mut sys :: godot_method_bind , get_contact_collider_object : 0 as * mut sys :: godot_method_bind , get_contact_collider_position : 0 as * mut sys :: godot_method_bind , get_contact_collider_shape : 0 as * mut sys :: godot_method_bind , get_contact_collider_shape_metadata : 0 as * mut sys :: godot_method_bind , get_contact_collider_velocity_at_position : 0 as * mut sys :: godot_method_bind , get_contact_count : 0 as * mut sys :: godot_method_bind , get_contact_local_normal : 0 as * mut sys :: godot_method_bind , get_contact_local_position : 0 as * mut sys :: godot_method_bind , get_contact_local_shape : 0 as * mut sys :: godot_method_bind , get_inverse_inertia : 0 as * mut sys :: godot_method_bind , get_inverse_mass : 0 as * mut sys :: godot_method_bind , get_linear_velocity : 0 as * mut sys :: godot_method_bind , get_space_state : 0 as * mut sys :: godot_method_bind , get_step : 0 as * mut sys :: godot_method_bind , get_total_angular_damp : 0 as * mut sys :: godot_method_bind , get_total_gravity : 0 as * mut sys :: godot_method_bind , get_total_linear_damp : 0 as * mut sys :: godot_method_bind , get_transform : 0 as * mut sys :: godot_method_bind , get_velocity_at_local_position : 0 as * mut sys :: godot_method_bind , integrate_forces : 0 as * mut sys :: godot_method_bind , is_sleeping : 0 as * mut sys :: godot_method_bind , set_angular_velocity : 0 as * mut sys :: godot_method_bind , set_linear_velocity : 0 as * mut sys :: godot_method_bind , set_sleep_state : 0 as * mut sys :: godot_method_bind , set_transform : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Physics2DDirectBodyStateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Physics2DDirectBodyState\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_central_force = (gd_api . godot_method_bind_get_method) (class_name , "add_central_force\0" . as_ptr () as * const c_char) ; table . add_force = (gd_api . godot_method_bind_get_method) (class_name , "add_force\0" . as_ptr () as * const c_char) ; table . add_torque = (gd_api . godot_method_bind_get_method) (class_name , "add_torque\0" . as_ptr () as * const c_char) ; table . apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_central_impulse\0" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\0" . as_ptr () as * const c_char) ; table . apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_torque_impulse\0" . as_ptr () as * const c_char) ; table . get_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_velocity\0" . as_ptr () as * const c_char) ; table . get_contact_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider\0" . as_ptr () as * const c_char) ; table . get_contact_collider_id = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_id\0" . as_ptr () as * const c_char) ; table . get_contact_collider_object = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_object\0" . as_ptr () as * const c_char) ; table . get_contact_collider_position = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_position\0" . as_ptr () as * const c_char) ; table . get_contact_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_shape\0" . as_ptr () as * const c_char) ; table . get_contact_collider_shape_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_shape_metadata\0" . as_ptr () as * const c_char) ; table . get_contact_collider_velocity_at_position = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_velocity_at_position\0" . as_ptr () as * const c_char) ; table . get_contact_count = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_count\0" . as_ptr () as * const c_char) ; table . get_contact_local_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_local_normal\0" . as_ptr () as * const c_char) ; table . get_contact_local_position = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_local_position\0" . as_ptr () as * const c_char) ; table . get_contact_local_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_local_shape\0" . as_ptr () as * const c_char) ; table . get_inverse_inertia = (gd_api . godot_method_bind_get_method) (class_name , "get_inverse_inertia\0" . as_ptr () as * const c_char) ; table . get_inverse_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_inverse_mass\0" . as_ptr () as * const c_char) ; table . get_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_velocity\0" . as_ptr () as * const c_char) ; table . get_space_state = (gd_api . godot_method_bind_get_method) (class_name , "get_space_state\0" . as_ptr () as * const c_char) ; table . get_step = (gd_api . godot_method_bind_get_method) (class_name , "get_step\0" . as_ptr () as * const c_char) ; table . get_total_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_total_angular_damp\0" . as_ptr () as * const c_char) ; table . get_total_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_total_gravity\0" . as_ptr () as * const c_char) ; table . get_total_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_total_linear_damp\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . get_velocity_at_local_position = (gd_api . godot_method_bind_get_method) (class_name , "get_velocity_at_local_position\0" . as_ptr () as * const c_char) ; table . integrate_forces = (gd_api . godot_method_bind_get_method) (class_name , "integrate_forces\0" . as_ptr () as * const c_char) ; table . is_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "is_sleeping\0" . as_ptr () as * const c_char) ; table . set_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_velocity\0" . as_ptr () as * const c_char) ; table . set_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_velocity\0" . as_ptr () as * const c_char) ; table . set_sleep_state = (gd_api . godot_method_bind_get_method) (class_name , "set_sleep_state\0" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::physics_2d_direct_body_state::private::Physics2DDirectBodyState;
            
            pub(crate) mod physics_2d_direct_space_state {
                # ! [doc = "This module contains types related to the API class [`Physics2DDirectSpaceState`][super::Physics2DDirectSpaceState]."] pub (crate) mod private { # [doc = "`core class Physics2DDirectSpaceState` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_physics2ddirectspacestate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nPhysics2DDirectSpaceState inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Physics2DDirectSpaceState { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Physics2DDirectSpaceState ; impl Physics2DDirectSpaceState { # [doc = "Checks how far a [`Shape2D`][Shape2D] can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a [`Physics2DShapeQueryParameters`][Physics2DShapeQueryParameters] object.\nReturns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of `[1.0, 1.0]` will be returned.\n**Note:** Any [`Shape2D`][Shape2D]s that the shape is already colliding with e.g. inside of, will be ignored. Use [`collide_shape`][Self::collide_shape] to determine the [`Shape2D`][Shape2D]s that the shape is already colliding with."] # [doc = ""] # [inline] pub fn cast_motion (& self , shape : impl AsArg < crate :: generated :: Physics2DShapeQueryParameters >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectSpaceStateMethodTable :: get (get_api ()) . cast_motion ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks the intersections of a shape, given through a [`Physics2DShapeQueryParameters`][Physics2DShapeQueryParameters] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [`intersect_shape`][Self::intersect_shape], the number of returned results can be limited to save processing time.\n# Default Arguments\n* `max_results` - `32`"] # [doc = ""] # [inline] pub fn collide_shape (& self , shape : impl AsArg < crate :: generated :: Physics2DShapeQueryParameters > , max_results : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectSpaceStateMethodTable :: get (get_api ()) . collide_shape ; let ret = crate :: icalls :: icallvar__obj_i64 (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr () , max_results as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks the intersections of a shape, given through a [`Physics2DShapeQueryParameters`][Physics2DShapeQueryParameters] object, against the space. If it collides with more than one shape, the nearest one is selected. If the shape did not intersect anything, then an empty dictionary is returned instead.\n**Note:** This method does not take into account the `motion` property of the object. The returned object is a dictionary containing the following fields:\n`collider_id`: The colliding object's ID.\n`linear_velocity`: The colliding object's velocity [`Vector2`][Vector2]. If the object is an [`Area2D`][Area2D], the result is `(0, 0)`.\n`metadata`: The intersecting shape's metadata. This metadata is different from [`Object.get_meta`][Object::get_meta], and is set with [`Physics2DServer.shape_set_data`][Physics2DServer::shape_set_data].\n`normal`: The object's surface normal at the intersection point.\n`point`: The intersection point.\n`rid`: The intersecting object's [`RID`][Rid].\n`shape`: The shape index of the colliding shape."] # [doc = ""] # [inline] pub fn get_rest_info (& self , shape : impl AsArg < crate :: generated :: Physics2DShapeQueryParameters >) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectSpaceStateMethodTable :: get (get_api ()) . get_rest_info ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks whether a point is inside any solid shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:\n`collider`: The colliding object.\n`collider_id`: The colliding object's ID.\n`metadata`: The intersecting shape's metadata. This metadata is different from [`Object.get_meta`][Object::get_meta], and is set with [`Physics2DServer.shape_set_data`][Physics2DServer::shape_set_data].\n`rid`: The intersecting object's [`RID`][Rid].\n`shape`: The shape index of the colliding shape.\nThe number of intersections can be limited with the `max_results` parameter, to reduce the processing time.\nAdditionally, the method can take an `exclude` array of objects or [`RID`][Rid]s that are to be excluded from collisions, a `collision_mask` bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [`PhysicsBody2D`][PhysicsBody2D]s or [`Area2D`][Area2D]s, respectively.\n**Note:** [`ConcavePolygonShape2D`][ConcavePolygonShape2D]s and [`CollisionPolygon2D`][CollisionPolygon2D]s in `Segments` build mode are not solid shapes. Therefore, they will not be detected.\n# Default Arguments\n* `max_results` - `32`\n* `exclude` - `[  ]`\n* `collision_layer` - `2147483647`\n* `collide_with_bodies` - `true`\n* `collide_with_areas` - `false`"] # [doc = ""] # [inline] pub fn intersect_point (& self , point : Vector2 , max_results : i64 , exclude : VariantArray , collision_layer : i64 , collide_with_bodies : bool , collide_with_areas : bool) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectSpaceStateMethodTable :: get (get_api ()) . intersect_point ; let ret = crate :: icalls :: icallvar__vec2_i64_arr_i64_bool_bool (method_bind , self . this . sys () . as_ptr () , point , max_results as _ , exclude , collision_layer as _ , collide_with_bodies as _ , collide_with_areas as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks whether a point is inside any solid shape, in a specific canvas layer given by `canvas_instance_id`. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:\n`collider`: The colliding object.\n`collider_id`: The colliding object's ID.\n`metadata`: The intersecting shape's metadata. This metadata is different from [`Object.get_meta`][Object::get_meta], and is set with [`Physics2DServer.shape_set_data`][Physics2DServer::shape_set_data].\n`rid`: The intersecting object's [`RID`][Rid].\n`shape`: The shape index of the colliding shape.\nThe number of intersections can be limited with the `max_results` parameter, to reduce the processing time.\nAdditionally, the method can take an `exclude` array of objects or [`RID`][Rid]s that are to be excluded from collisions, a `collision_mask` bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [`PhysicsBody2D`][PhysicsBody2D]s or [`Area2D`][Area2D]s, respectively.\n**Note:** [`ConcavePolygonShape2D`][ConcavePolygonShape2D]s and [`CollisionPolygon2D`][CollisionPolygon2D]s in `Segments` build mode are not solid shapes. Therefore, they will not be detected.\n# Default Arguments\n* `max_results` - `32`\n* `exclude` - `[  ]`\n* `collision_layer` - `2147483647`\n* `collide_with_bodies` - `true`\n* `collide_with_areas` - `false`"] # [doc = ""] # [inline] pub fn intersect_point_on_canvas (& self , point : Vector2 , canvas_instance_id : i64 , max_results : i64 , exclude : VariantArray , collision_layer : i64 , collide_with_bodies : bool , collide_with_areas : bool) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectSpaceStateMethodTable :: get (get_api ()) . intersect_point_on_canvas ; let ret = crate :: icalls :: icallvar__vec2_i64_i64_arr_i64_bool_bool (method_bind , self . this . sys () . as_ptr () , point , canvas_instance_id as _ , max_results as _ , exclude , collision_layer as _ , collide_with_bodies as _ , collide_with_areas as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Intersects a ray in a given space. The returned object is a dictionary with the following fields:\n`collider`: The colliding object.\n`collider_id`: The colliding object's ID.\n`metadata`: The intersecting shape's metadata. This metadata is different from [`Object.get_meta`][Object::get_meta], and is set with [`Physics2DServer.shape_set_data`][Physics2DServer::shape_set_data].\n`normal`: The object's surface normal at the intersection point.\n`position`: The intersection point.\n`rid`: The intersecting object's [`RID`][Rid].\n`shape`: The shape index of the colliding shape.\nIf the ray did not intersect anything, then an empty dictionary is returned instead.\nAdditionally, the method can take an `exclude` array of objects or [`RID`][Rid]s that are to be excluded from collisions, a `collision_mask` bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [`PhysicsBody2D`][PhysicsBody2D]s or [`Area2D`][Area2D]s, respectively.\n# Default Arguments\n* `exclude` - `[  ]`\n* `collision_layer` - `2147483647`\n* `collide_with_bodies` - `true`\n* `collide_with_areas` - `false`"] # [doc = ""] # [inline] pub fn intersect_ray (& self , from : Vector2 , to : Vector2 , exclude : VariantArray , collision_layer : i64 , collide_with_bodies : bool , collide_with_areas : bool) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectSpaceStateMethodTable :: get (get_api ()) . intersect_ray ; let ret = crate :: icalls :: icallvar__vec2_vec2_arr_i64_bool_bool (method_bind , self . this . sys () . as_ptr () , from , to , exclude , collision_layer as _ , collide_with_bodies as _ , collide_with_areas as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks the intersections of a shape, given through a [`Physics2DShapeQueryParameters`][Physics2DShapeQueryParameters] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields:\n`collider`: The colliding object.\n`collider_id`: The colliding object's ID.\n`metadata`: The intersecting shape's metadata. This metadata is different from [`Object.get_meta`][Object::get_meta], and is set with [`Physics2DServer.shape_set_data`][Physics2DServer::shape_set_data].\n`rid`: The intersecting object's [`RID`][Rid].\n`shape`: The shape index of the colliding shape.\nThe number of intersections can be limited with the `max_results` parameter, to reduce the processing time.\n# Default Arguments\n* `max_results` - `32`"] # [doc = ""] # [inline] pub fn intersect_shape (& self , shape : impl AsArg < crate :: generated :: Physics2DShapeQueryParameters > , max_results : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DDirectSpaceStateMethodTable :: get (get_api ()) . intersect_shape ; let ret = crate :: icalls :: icallvar__obj_i64 (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr () , max_results as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DDirectSpaceState { } unsafe impl GodotObject for Physics2DDirectSpaceState { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Physics2DDirectSpaceState" } } impl std :: ops :: Deref for Physics2DDirectSpaceState { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DDirectSpaceState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for Physics2DDirectSpaceState { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Physics2DDirectSpaceStateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub cast_motion : * mut sys :: godot_method_bind , pub collide_shape : * mut sys :: godot_method_bind , pub get_rest_info : * mut sys :: godot_method_bind , pub intersect_point : * mut sys :: godot_method_bind , pub intersect_point_on_canvas : * mut sys :: godot_method_bind , pub intersect_ray : * mut sys :: godot_method_bind , pub intersect_shape : * mut sys :: godot_method_bind } impl Physics2DDirectSpaceStateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Physics2DDirectSpaceStateMethodTable = Physics2DDirectSpaceStateMethodTable { class_constructor : None , cast_motion : 0 as * mut sys :: godot_method_bind , collide_shape : 0 as * mut sys :: godot_method_bind , get_rest_info : 0 as * mut sys :: godot_method_bind , intersect_point : 0 as * mut sys :: godot_method_bind , intersect_point_on_canvas : 0 as * mut sys :: godot_method_bind , intersect_ray : 0 as * mut sys :: godot_method_bind , intersect_shape : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Physics2DDirectSpaceStateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Physics2DDirectSpaceState\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . cast_motion = (gd_api . godot_method_bind_get_method) (class_name , "cast_motion\0" . as_ptr () as * const c_char) ; table . collide_shape = (gd_api . godot_method_bind_get_method) (class_name , "collide_shape\0" . as_ptr () as * const c_char) ; table . get_rest_info = (gd_api . godot_method_bind_get_method) (class_name , "get_rest_info\0" . as_ptr () as * const c_char) ; table . intersect_point = (gd_api . godot_method_bind_get_method) (class_name , "intersect_point\0" . as_ptr () as * const c_char) ; table . intersect_point_on_canvas = (gd_api . godot_method_bind_get_method) (class_name , "intersect_point_on_canvas\0" . as_ptr () as * const c_char) ; table . intersect_ray = (gd_api . godot_method_bind_get_method) (class_name , "intersect_ray\0" . as_ptr () as * const c_char) ; table . intersect_shape = (gd_api . godot_method_bind_get_method) (class_name , "intersect_shape\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::physics_2d_direct_space_state::private::Physics2DDirectSpaceState;
            
            pub mod physics_2d_server {
                # ! [doc = "This module contains types related to the API class [`Physics2DServer`][super::Physics2DServer]."] pub (crate) mod private { # [doc = "`core singleton class Physics2DServer` inherits `Object` (manually managed).\n\nThis class has related types in the [`physics_2d_server`][super::physics_2d_server] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_physics2dserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nPhysics2DServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Physics2DServer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Physics2DServer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AreaBodyStatus (pub i64) ; impl AreaBodyStatus { pub const ADDED : AreaBodyStatus = AreaBodyStatus (0i64) ; pub const REMOVED : AreaBodyStatus = AreaBodyStatus (1i64) ; } impl From < i64 > for AreaBodyStatus { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AreaBodyStatus > for i64 { # [inline] fn from (v : AreaBodyStatus) -> Self { v . 0 } } impl FromVariant for AreaBodyStatus { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AreaParameter (pub i64) ; impl AreaParameter { pub const GRAVITY : AreaParameter = AreaParameter (0i64) ; pub const GRAVITY_VECTOR : AreaParameter = AreaParameter (1i64) ; pub const GRAVITY_IS_POINT : AreaParameter = AreaParameter (2i64) ; pub const GRAVITY_DISTANCE_SCALE : AreaParameter = AreaParameter (3i64) ; pub const GRAVITY_POINT_ATTENUATION : AreaParameter = AreaParameter (4i64) ; pub const LINEAR_DAMP : AreaParameter = AreaParameter (5i64) ; pub const ANGULAR_DAMP : AreaParameter = AreaParameter (6i64) ; pub const PRIORITY : AreaParameter = AreaParameter (7i64) ; } impl From < i64 > for AreaParameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AreaParameter > for i64 { # [inline] fn from (v : AreaParameter) -> Self { v . 0 } } impl FromVariant for AreaParameter { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AreaSpaceOverrideMode (pub i64) ; impl AreaSpaceOverrideMode { pub const DISABLED : AreaSpaceOverrideMode = AreaSpaceOverrideMode (0i64) ; pub const COMBINE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (1i64) ; pub const COMBINE_REPLACE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (2i64) ; pub const REPLACE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (3i64) ; pub const REPLACE_COMBINE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (4i64) ; } impl From < i64 > for AreaSpaceOverrideMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AreaSpaceOverrideMode > for i64 { # [inline] fn from (v : AreaSpaceOverrideMode) -> Self { v . 0 } } impl FromVariant for AreaSpaceOverrideMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BodyMode (pub i64) ; impl BodyMode { pub const STATIC : BodyMode = BodyMode (0i64) ; pub const KINEMATIC : BodyMode = BodyMode (1i64) ; pub const RIGID : BodyMode = BodyMode (2i64) ; pub const CHARACTER : BodyMode = BodyMode (3i64) ; } impl From < i64 > for BodyMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BodyMode > for i64 { # [inline] fn from (v : BodyMode) -> Self { v . 0 } } impl FromVariant for BodyMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BodyParameter (pub i64) ; impl BodyParameter { pub const BOUNCE : BodyParameter = BodyParameter (0i64) ; pub const FRICTION : BodyParameter = BodyParameter (1i64) ; pub const MASS : BodyParameter = BodyParameter (2i64) ; pub const INERTIA : BodyParameter = BodyParameter (3i64) ; pub const GRAVITY_SCALE : BodyParameter = BodyParameter (4i64) ; pub const LINEAR_DAMP : BodyParameter = BodyParameter (5i64) ; pub const ANGULAR_DAMP : BodyParameter = BodyParameter (6i64) ; pub const MAX : BodyParameter = BodyParameter (7i64) ; } impl From < i64 > for BodyParameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BodyParameter > for i64 { # [inline] fn from (v : BodyParameter) -> Self { v . 0 } } impl FromVariant for BodyParameter { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BodyState (pub i64) ; impl BodyState { pub const TRANSFORM : BodyState = BodyState (0i64) ; pub const LINEAR_VELOCITY : BodyState = BodyState (1i64) ; pub const ANGULAR_VELOCITY : BodyState = BodyState (2i64) ; pub const SLEEPING : BodyState = BodyState (3i64) ; pub const CAN_SLEEP : BodyState = BodyState (4i64) ; } impl From < i64 > for BodyState { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BodyState > for i64 { # [inline] fn from (v : BodyState) -> Self { v . 0 } } impl FromVariant for BodyState { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CcdMode (pub i64) ; impl CcdMode { pub const DISABLED : CcdMode = CcdMode (0i64) ; pub const CAST_RAY : CcdMode = CcdMode (1i64) ; pub const CAST_SHAPE : CcdMode = CcdMode (2i64) ; } impl From < i64 > for CcdMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CcdMode > for i64 { # [inline] fn from (v : CcdMode) -> Self { v . 0 } } impl FromVariant for CcdMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DampedStringParam (pub i64) ; impl DampedStringParam { pub const REST_LENGTH : DampedStringParam = DampedStringParam (0i64) ; pub const STIFFNESS : DampedStringParam = DampedStringParam (1i64) ; pub const DAMPING : DampedStringParam = DampedStringParam (2i64) ; } impl From < i64 > for DampedStringParam { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DampedStringParam > for i64 { # [inline] fn from (v : DampedStringParam) -> Self { v . 0 } } impl FromVariant for DampedStringParam { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct JointParam (pub i64) ; impl JointParam { pub const BIAS : JointParam = JointParam (0i64) ; pub const MAX_BIAS : JointParam = JointParam (1i64) ; pub const MAX_FORCE : JointParam = JointParam (2i64) ; } impl From < i64 > for JointParam { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < JointParam > for i64 { # [inline] fn from (v : JointParam) -> Self { v . 0 } } impl FromVariant for JointParam { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct JointType (pub i64) ; impl JointType { pub const PIN : JointType = JointType (0i64) ; pub const GROOVE : JointType = JointType (1i64) ; pub const DAMPED_SPRING : JointType = JointType (2i64) ; } impl From < i64 > for JointType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < JointType > for i64 { # [inline] fn from (v : JointType) -> Self { v . 0 } } impl FromVariant for JointType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ProcessInfo (pub i64) ; impl ProcessInfo { pub const ACTIVE_OBJECTS : ProcessInfo = ProcessInfo (0i64) ; pub const COLLISION_PAIRS : ProcessInfo = ProcessInfo (1i64) ; pub const ISLAND_COUNT : ProcessInfo = ProcessInfo (2i64) ; } impl From < i64 > for ProcessInfo { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ProcessInfo > for i64 { # [inline] fn from (v : ProcessInfo) -> Self { v . 0 } } impl FromVariant for ProcessInfo { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShapeType (pub i64) ; impl ShapeType { pub const LINE : ShapeType = ShapeType (0i64) ; pub const RAY : ShapeType = ShapeType (1i64) ; pub const SEGMENT : ShapeType = ShapeType (2i64) ; pub const CIRCLE : ShapeType = ShapeType (3i64) ; pub const RECTANGLE : ShapeType = ShapeType (4i64) ; pub const CAPSULE : ShapeType = ShapeType (5i64) ; pub const CONVEX_POLYGON : ShapeType = ShapeType (6i64) ; pub const CONCAVE_POLYGON : ShapeType = ShapeType (7i64) ; pub const CUSTOM : ShapeType = ShapeType (8i64) ; } impl From < i64 > for ShapeType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShapeType > for i64 { # [inline] fn from (v : ShapeType) -> Self { v . 0 } } impl FromVariant for ShapeType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SpaceParameter (pub i64) ; impl SpaceParameter { pub const CONTACT_RECYCLE_RADIUS : SpaceParameter = SpaceParameter (0i64) ; pub const CONTACT_MAX_SEPARATION : SpaceParameter = SpaceParameter (1i64) ; pub const BODY_MAX_ALLOWED_PENETRATION : SpaceParameter = SpaceParameter (2i64) ; pub const BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD : SpaceParameter = SpaceParameter (3i64) ; pub const BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD : SpaceParameter = SpaceParameter (4i64) ; pub const BODY_TIME_TO_SLEEP : SpaceParameter = SpaceParameter (5i64) ; pub const CONSTRAINT_DEFAULT_BIAS : SpaceParameter = SpaceParameter (6i64) ; } impl From < i64 > for SpaceParameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SpaceParameter > for i64 { # [inline] fn from (v : SpaceParameter) -> Self { v . 0 } } impl FromVariant for SpaceParameter { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Physics2DServer { pub const AREA_BODY_ADDED : i64 = 0i64 ; pub const AREA_PARAM_GRAVITY : i64 = 0i64 ; pub const AREA_SPACE_OVERRIDE_DISABLED : i64 = 0i64 ; pub const BODY_MODE_STATIC : i64 = 0i64 ; pub const BODY_PARAM_BOUNCE : i64 = 0i64 ; pub const BODY_STATE_TRANSFORM : i64 = 0i64 ; pub const CCD_MODE_DISABLED : i64 = 0i64 ; pub const DAMPED_STRING_REST_LENGTH : i64 = 0i64 ; pub const INFO_ACTIVE_OBJECTS : i64 = 0i64 ; pub const JOINT_PARAM_BIAS : i64 = 0i64 ; pub const JOINT_PIN : i64 = 0i64 ; pub const SHAPE_LINE : i64 = 0i64 ; pub const SPACE_PARAM_CONTACT_RECYCLE_RADIUS : i64 = 0i64 ; pub const AREA_BODY_REMOVED : i64 = 1i64 ; pub const AREA_PARAM_GRAVITY_VECTOR : i64 = 1i64 ; pub const AREA_SPACE_OVERRIDE_COMBINE : i64 = 1i64 ; pub const BODY_MODE_KINEMATIC : i64 = 1i64 ; pub const BODY_PARAM_FRICTION : i64 = 1i64 ; pub const BODY_STATE_LINEAR_VELOCITY : i64 = 1i64 ; pub const CCD_MODE_CAST_RAY : i64 = 1i64 ; pub const DAMPED_STRING_STIFFNESS : i64 = 1i64 ; pub const INFO_COLLISION_PAIRS : i64 = 1i64 ; pub const JOINT_GROOVE : i64 = 1i64 ; pub const JOINT_PARAM_MAX_BIAS : i64 = 1i64 ; pub const SHAPE_RAY : i64 = 1i64 ; pub const SPACE_PARAM_CONTACT_MAX_SEPARATION : i64 = 1i64 ; pub const AREA_PARAM_GRAVITY_IS_POINT : i64 = 2i64 ; pub const AREA_SPACE_OVERRIDE_COMBINE_REPLACE : i64 = 2i64 ; pub const BODY_MODE_RIGID : i64 = 2i64 ; pub const BODY_PARAM_MASS : i64 = 2i64 ; pub const BODY_STATE_ANGULAR_VELOCITY : i64 = 2i64 ; pub const CCD_MODE_CAST_SHAPE : i64 = 2i64 ; pub const DAMPED_STRING_DAMPING : i64 = 2i64 ; pub const INFO_ISLAND_COUNT : i64 = 2i64 ; pub const JOINT_DAMPED_SPRING : i64 = 2i64 ; pub const JOINT_PARAM_MAX_FORCE : i64 = 2i64 ; pub const SHAPE_SEGMENT : i64 = 2i64 ; pub const SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION : i64 = 2i64 ; pub const AREA_PARAM_GRAVITY_DISTANCE_SCALE : i64 = 3i64 ; pub const AREA_SPACE_OVERRIDE_REPLACE : i64 = 3i64 ; pub const BODY_MODE_CHARACTER : i64 = 3i64 ; pub const BODY_PARAM_INERTIA : i64 = 3i64 ; pub const BODY_STATE_SLEEPING : i64 = 3i64 ; pub const SHAPE_CIRCLE : i64 = 3i64 ; pub const SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD : i64 = 3i64 ; pub const AREA_PARAM_GRAVITY_POINT_ATTENUATION : i64 = 4i64 ; pub const AREA_SPACE_OVERRIDE_REPLACE_COMBINE : i64 = 4i64 ; pub const BODY_PARAM_GRAVITY_SCALE : i64 = 4i64 ; pub const BODY_STATE_CAN_SLEEP : i64 = 4i64 ; pub const SHAPE_RECTANGLE : i64 = 4i64 ; pub const SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD : i64 = 4i64 ; pub const AREA_PARAM_LINEAR_DAMP : i64 = 5i64 ; pub const BODY_PARAM_LINEAR_DAMP : i64 = 5i64 ; pub const SHAPE_CAPSULE : i64 = 5i64 ; pub const SPACE_PARAM_BODY_TIME_TO_SLEEP : i64 = 5i64 ; pub const AREA_PARAM_ANGULAR_DAMP : i64 = 6i64 ; pub const BODY_PARAM_ANGULAR_DAMP : i64 = 6i64 ; pub const SHAPE_CONVEX_POLYGON : i64 = 6i64 ; pub const SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS : i64 = 6i64 ; pub const AREA_PARAM_PRIORITY : i64 = 7i64 ; pub const BODY_PARAM_MAX : i64 = 7i64 ; pub const SHAPE_CONCAVE_POLYGON : i64 = 7i64 ; pub const SHAPE_CUSTOM : i64 = 8i64 ; } impl Physics2DServer { # [doc = "Returns a reference to the singleton instance.\n\n# Safety\n\nThis singleton server is only safe to access from outside the main thread if thread-safe\noperations are enabled in the project settings. See the official\n[thread-safety guidelines][thread-safety] for more information.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [inline] pub unsafe fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("Physics2DServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.\n# Default Arguments\n* `transform` - `Transform2D( 1, 0, 0, 1, 0, 0 )`\n* `disabled` - `false`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_add_shape (& self , area : Rid , shape : Rid , transform : Transform2D , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_add_shape ; let ret = crate :: icalls :: icallvar__rid_rid_trans2D_bool (method_bind , self . this . sys () . as_ptr () , area , shape , transform , disabled as _) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_attach_canvas_instance_id (& self , area : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_attach_canvas_instance_id ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , id as _) ; } } # [doc = "Assigns the area to a descendant of [`Object`][Object], so it can exist in the node tree."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_attach_object_instance_id (& self , area : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_attach_object_instance_id ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , id as _) ; } } # [doc = "Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_clear_shapes (& self , area : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_clear_shapes ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , area) ; } } # [doc = "Creates an [`Area2D`][Area2D]. After creating an [`Area2D`][Area2D] with this method, assign it to a space using [`area_set_space`][Self::area_set_space] to use the created [`Area2D`][Area2D] in the physics world."] # [doc = ""] # [inline] pub fn area_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_canvas_instance_id (& self , area : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_canvas_instance_id ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , area) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets the instance ID of the object the area is assigned to."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_object_instance_id (& self , area : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_object_instance_id ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , area) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an area parameter value. See [`AreaParameter`][AreaParameter] for a list of available parameters."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_param (& self , area : Rid , param : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_param ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , param as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`RID`][Rid] of the nth shape of an area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_shape (& self , area : Rid , shape_idx : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_shape ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx as _) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of shapes assigned to an area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_shape_count (& self , area : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_shape_count ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , area) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the transform matrix of a shape within an area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_shape_transform (& self , area : Rid , shape_idx : i64) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_shape_transform ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx as _) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the space assigned to the area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_space (& self , area : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_space ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , area) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the space override mode for the area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_space_override_mode (& self , area : Rid) -> crate :: generated :: physics_2d_server :: AreaSpaceOverrideMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_space_override_mode ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , area) ; < crate :: generated :: physics_2d_server :: AreaSpaceOverrideMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the transform matrix for an area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_transform (& self , area : Rid) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_get_transform ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , area) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Removes a shape from an area. It does not delete the shape, so it can be reassigned later."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_remove_shape (& self , area : Rid , shape_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_remove_shape ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx as _) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_area_monitor_callback (& self , area : Rid , receiver : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_area_monitor_callback ; let ret = crate :: icalls :: icallvar__rid_obj_str (method_bind , self . this . sys () . as_ptr () , area , receiver . as_arg_ptr () , method . into ()) ; } } # [doc = "Assigns the area to one or many physics layers."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_collision_layer (& self , area : Rid , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_collision_layer ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , layer as _) ; } } # [doc = "Sets which physics layers the area will monitor."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_collision_mask (& self , area : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_collision_mask ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , mask as _) ; } } # [doc = "Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:\n1: [`AREA_BODY_ADDED`][Self::AREA_BODY_ADDED] or [`AREA_BODY_REMOVED`][Self::AREA_BODY_REMOVED], depending on whether the object entered or exited the area.\n2: [`RID`][Rid] of the object that entered/exited the area.\n3: Instance ID of the object that entered/exited the area.\n4: The shape index of the object that entered/exited the area.\n5: The shape index of the area where the object entered/exited."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_monitor_callback (& self , area : Rid , receiver : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_monitor_callback ; let ret = crate :: icalls :: icallvar__rid_obj_str (method_bind , self . this . sys () . as_ptr () , area , receiver . as_arg_ptr () , method . into ()) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_monitorable (& self , area : Rid , monitorable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_monitorable ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , area , monitorable as _) ; } } # [doc = "Sets the value for an area parameter. See [`AreaParameter`][AreaParameter] for a list of available parameters."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_param (& self , area : Rid , param : i64 , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_param ; let ret = crate :: icalls :: icallvar__rid_i64_var (method_bind , self . this . sys () . as_ptr () , area , param as _ , value . owned_to_variant ()) ; } } # [doc = "Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [`RID`][Rid]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_shape (& self , area : Rid , shape_idx : i64 , shape : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_shape ; let ret = crate :: icalls :: icallvar__rid_i64_rid (method_bind , self . this . sys () . as_ptr () , area , shape_idx as _ , shape) ; } } # [doc = "Disables a given shape in an area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_shape_disabled (& self , area : Rid , shape_idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_shape_disabled ; let ret = crate :: icalls :: icallvar__rid_i64_bool (method_bind , self . this . sys () . as_ptr () , area , shape_idx as _ , disabled as _) ; } } # [doc = "Sets the transform matrix for an area shape."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_shape_transform (& self , area : Rid , shape_idx : i64 , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_shape_transform ; let ret = crate :: icalls :: icallvar__rid_i64_trans2D (method_bind , self . this . sys () . as_ptr () , area , shape_idx as _ , transform) ; } } # [doc = "Assigns a space to the area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_space (& self , area : Rid , space : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_space ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , area , space) ; } } # [doc = "Sets the space override mode for the area. See [`AreaSpaceOverrideMode`][AreaSpaceOverrideMode] for a list of available modes."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_space_override_mode (& self , area : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_space_override_mode ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , mode as _) ; } } # [doc = "Sets the transform matrix for an area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_transform (& self , area : Rid , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . area_set_transform ; let ret = crate :: icalls :: icallvar__rid_trans2D (method_bind , self . this . sys () . as_ptr () , area , transform) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_add_central_force (& self , body : Rid , force : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_add_central_force ; let ret = crate :: icalls :: icallvar__rid_vec2 (method_bind , self . this . sys () . as_ptr () , body , force) ; } } # [doc = "Adds a body to the list of bodies exempt from collisions."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_add_collision_exception (& self , body : Rid , excepted_body : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_add_collision_exception ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , body , excepted_body) ; } } # [doc = "Adds a positioned force to the applied force and torque. As with [`body_apply_impulse`][Self::body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_add_force (& self , body : Rid , offset : Vector2 , force : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_add_force ; let ret = crate :: icalls :: icallvar__rid_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , body , offset , force) ; } } # [doc = "Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.\n# Default Arguments\n* `transform` - `Transform2D( 1, 0, 0, 1, 0, 0 )`\n* `disabled` - `false`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_add_shape (& self , body : Rid , shape : Rid , transform : Transform2D , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_add_shape ; let ret = crate :: icalls :: icallvar__rid_rid_trans2D_bool (method_bind , self . this . sys () . as_ptr () , body , shape , transform , disabled as _) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_add_torque (& self , body : Rid , torque : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_add_torque ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , body , torque as _) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_apply_central_impulse (& self , body : Rid , impulse : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_apply_central_impulse ; let ret = crate :: icalls :: icallvar__rid_vec2 (method_bind , self . this . sys () . as_ptr () , body , impulse) ; } } # [doc = "Adds a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_apply_impulse (& self , body : Rid , position : Vector2 , impulse : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_apply_impulse ; let ret = crate :: icalls :: icallvar__rid_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , body , position , impulse) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_apply_torque_impulse (& self , body : Rid , impulse : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_apply_torque_impulse ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , body , impulse as _) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_attach_canvas_instance_id (& self , body : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_attach_canvas_instance_id ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , id as _) ; } } # [doc = "Assigns the area to a descendant of [`Object`][Object], so it can exist in the node tree."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_attach_object_instance_id (& self , body : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_attach_object_instance_id ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , id as _) ; } } # [doc = "Removes all shapes from a body."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_clear_shapes (& self , body : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_clear_shapes ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; } } # [doc = "Creates a physics body."] # [doc = ""] # [inline] pub fn body_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_canvas_instance_id (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_canvas_instance_id ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the physics layer or layers a body belongs to."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_collision_layer (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_collision_layer ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the physics layer or layers a body can collide with."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_collision_mask (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_collision_mask ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the continuous collision detection mode."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_continuous_collision_detection_mode (& self , body : Rid) -> crate :: generated :: physics_2d_server :: CcdMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_continuous_collision_detection_mode ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < crate :: generated :: physics_2d_server :: CcdMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`Physics2DDirectBodyState`][Physics2DDirectBodyState] of the body. Returns `null` if the body is destroyed or removed from the physics space."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_direct_state (& self , body : Rid) -> Option < Ref < crate :: generated :: Physics2DDirectBodyState , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_direct_state ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < Option < Ref < crate :: generated :: Physics2DDirectBodyState , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the maximum contacts that can be reported. See [`body_set_max_contacts_reported`][Self::body_set_max_contacts_reported]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_max_contacts_reported (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_max_contacts_reported ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the body mode."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_mode (& self , body : Rid) -> crate :: generated :: physics_2d_server :: BodyMode { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_mode ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < crate :: generated :: physics_2d_server :: BodyMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the instance ID of the object the area is assigned to."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_object_instance_id (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_object_instance_id ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the value of a body parameter. See [`BodyParameter`][BodyParameter] for a list of available parameters."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_param (& self , body : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_param ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`RID`][Rid] of the nth shape of a body."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_shape (& self , body : Rid , shape_idx : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_shape ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx as _) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of shapes assigned to a body."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_shape_count (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_shape_count ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the metadata of a shape of a body."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_shape_metadata (& self , body : Rid , shape_idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_shape_metadata ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the transform matrix of a body shape."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_shape_transform (& self , body : Rid , shape_idx : i64) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_shape_transform ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx as _) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`RID`][Rid] of the space assigned to a body."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_space (& self , body : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_space ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a body state."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_state (& self , body : Rid , state : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_get_state ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , state as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns whether a body uses a callback function to calculate its own physics (see [`body_set_force_integration_callback`][Self::body_set_force_integration_callback])."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_is_omitting_force_integration (& self , body : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_is_omitting_force_integration ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes a body from the list of bodies exempt from collisions."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_remove_collision_exception (& self , body : Rid , excepted_body : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_remove_collision_exception ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , body , excepted_body) ; } } # [doc = "Removes a shape from a body. The shape is not deleted, so it can be reused afterwards."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_remove_shape (& self , body : Rid , shape_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_remove_shape ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx as _) ; } } # [doc = "Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_axis_velocity (& self , body : Rid , axis_velocity : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_axis_velocity ; let ret = crate :: icalls :: icallvar__rid_vec2 (method_bind , self . this . sys () . as_ptr () , body , axis_velocity) ; } } # [doc = "Sets the physics layer or layers a body belongs to."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_collision_layer (& self , body : Rid , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_collision_layer ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , layer as _) ; } } # [doc = "Sets the physics layer or layers a body can collide with."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_collision_mask (& self , body : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_collision_mask ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mask as _) ; } } # [doc = "Sets the continuous collision detection mode using one of the [`CCDMode`][CCDMode] constants.\nContinuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_continuous_collision_detection_mode (& self , body : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_continuous_collision_detection_mode ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mode as _) ; } } # [doc = "Sets the function used to calculate physics for an object, if that object allows it (see [`body_set_omit_force_integration`][Self::body_set_omit_force_integration]).\n# Default Arguments\n* `userdata` - `null`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_force_integration_callback (& self , body : Rid , receiver : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString > , userdata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_force_integration_callback ; let ret = crate :: icalls :: icallvar__rid_obj_str_var (method_bind , self . this . sys () . as_ptr () , body , receiver . as_arg_ptr () , method . into () , userdata . owned_to_variant ()) ; } } # [doc = "Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_max_contacts_reported (& self , body : Rid , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_max_contacts_reported ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , amount as _) ; } } # [doc = "Sets the body mode using one of the [`BodyMode`][BodyMode] constants."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_mode (& self , body : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_mode ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mode as _) ; } } # [doc = "Sets whether a body uses a callback function to calculate its own physics (see [`body_set_force_integration_callback`][Self::body_set_force_integration_callback])."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_omit_force_integration (& self , body : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_omit_force_integration ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , body , enable as _) ; } } # [doc = "Sets a body parameter. See [`BodyParameter`][BodyParameter] for a list of available parameters."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_param (& self , body : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_param ; let ret = crate :: icalls :: icallvar__rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , body , param as _ , value as _) ; } } # [doc = "Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [`RID`][Rid]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_shape (& self , body : Rid , shape_idx : i64 , shape : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_shape ; let ret = crate :: icalls :: icallvar__rid_i64_rid (method_bind , self . this . sys () . as_ptr () , body , shape_idx as _ , shape) ; } } # [doc = "Enables one way collision on body if `enable` is `true`."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_shape_as_one_way_collision (& self , body : Rid , shape_idx : i64 , enable : bool , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_shape_as_one_way_collision ; let ret = crate :: icalls :: icallvar__rid_i64_bool_f64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx as _ , enable as _ , margin as _) ; } } # [doc = "Disables shape in body if `disable` is `true`."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_shape_disabled (& self , body : Rid , shape_idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_shape_disabled ; let ret = crate :: icalls :: icallvar__rid_i64_bool (method_bind , self . this . sys () . as_ptr () , body , shape_idx as _ , disabled as _) ; } } # [doc = "Sets metadata of a shape within a body. This metadata is different from [`Object.set_meta`][Object::set_meta], and can be retrieved on shape queries."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_shape_metadata (& self , body : Rid , shape_idx : i64 , metadata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_shape_metadata ; let ret = crate :: icalls :: icallvar__rid_i64_var (method_bind , self . this . sys () . as_ptr () , body , shape_idx as _ , metadata . owned_to_variant ()) ; } } # [doc = "Sets the transform matrix for a body shape."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_shape_transform (& self , body : Rid , shape_idx : i64 , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_shape_transform ; let ret = crate :: icalls :: icallvar__rid_i64_trans2D (method_bind , self . this . sys () . as_ptr () , body , shape_idx as _ , transform) ; } } # [doc = "Assigns a space to the body (see [`space_create`][Self::space_create])."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_space (& self , body : Rid , space : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_space ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , body , space) ; } } # [doc = "Sets a body state using one of the [`BodyState`][BodyState] constants.\nNote that the method doesn't take effect immediately. The state will change on the next physics frame."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_state (& self , body : Rid , state : i64 , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_set_state ; let ret = crate :: icalls :: icallvar__rid_i64_var (method_bind , self . this . sys () . as_ptr () , body , state as _ , value . owned_to_variant ()) ; } } # [doc = "Returns `true` if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [`Physics2DTestMotionResult`][Physics2DTestMotionResult] can be passed to return additional information in.\n# Default Arguments\n* `margin` - `0.08`\n* `result` - `null`\n* `exclude_raycast_shapes` - `true`\n* `exclude` - `[  ]`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_test_motion (& self , body : Rid , from : Transform2D , motion : Vector2 , infinite_inertia : bool , margin : f64 , result : impl AsArg < crate :: generated :: Physics2DTestMotionResult > , exclude_raycast_shapes : bool , exclude : VariantArray) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . body_test_motion ; let ret = crate :: icalls :: icallvar__rid_trans2D_vec2_bool_f64_obj_bool_arr (method_bind , self . this . sys () . as_ptr () , body , from , motion , infinite_inertia as _ , margin as _ , result . as_arg_ptr () , exclude_raycast_shapes as _ , exclude) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn capsule_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . capsule_shape_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn circle_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . circle_shape_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn concave_polygon_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . concave_polygon_shape_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn convex_polygon_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . convex_polygon_shape_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn damped_spring_joint_create (& self , anchor_a : Vector2 , anchor_b : Vector2 , body_a : Rid , body_b : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . damped_spring_joint_create ; let ret = crate :: icalls :: icallvar__vec2_vec2_rid_rid (method_bind , self . this . sys () . as_ptr () , anchor_a , anchor_b , body_a , body_b) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the value of a damped spring joint parameter."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn damped_string_joint_get_param (& self , joint : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . damped_string_joint_get_param ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets a damped spring joint parameter. See [`DampedStringParam`][DampedStringParam] for a list of available parameters."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn damped_string_joint_set_param (& self , joint : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . damped_string_joint_set_param ; let ret = crate :: icalls :: icallvar__rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param as _ , value as _) ; } } # [doc = "Destroys any of the objects created by Physics2DServer. If the [`RID`][Rid] passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn free_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . free_rid ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Returns information about the current state of the 2D physics engine. See [`ProcessInfo`][ProcessInfo] for a list of available states."] # [doc = ""] # [inline] pub fn get_process_info (& self , process_info : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . get_process_info ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , process_info as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Creates a groove joint between two bodies. If not specified, the bodies are assumed to be the joint itself."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn groove_joint_create (& self , groove1_a : Vector2 , groove2_a : Vector2 , anchor_b : Vector2 , body_a : Rid , body_b : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . groove_joint_create ; let ret = crate :: icalls :: icallvar__vec2_vec2_vec2_rid_rid (method_bind , self . this . sys () . as_ptr () , groove1_a , groove2_a , anchor_b , body_a , body_b) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the value of a joint parameter."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn joint_get_param (& self , joint : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . joint_get_param ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a joint's type (see [`JointType`][JointType])."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn joint_get_type (& self , joint : Rid) -> crate :: generated :: physics_2d_server :: JointType { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . joint_get_type ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , joint) ; < crate :: generated :: physics_2d_server :: JointType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets a joint parameter. See [`JointParam`][JointParam] for a list of available parameters."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn joint_set_param (& self , joint : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . joint_set_param ; let ret = crate :: icalls :: icallvar__rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param as _ , value as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn line_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . line_shape_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn pin_joint_create (& self , anchor : Vector2 , body_a : Rid , body_b : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . pin_joint_create ; let ret = crate :: icalls :: icallvar__vec2_rid_rid (method_bind , self . this . sys () . as_ptr () , anchor , body_a , body_b) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn ray_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . ray_shape_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn rectangle_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . rectangle_shape_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn segment_shape_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . segment_shape_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Activates or deactivates the 2D physics engine."] # [doc = ""] # [inline] pub fn set_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . set_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , active as _) ; } } # [doc = "Sets the amount of iterations for calculating velocities of colliding bodies. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. The default value is `8`."] # [doc = ""] # [inline] pub fn set_collision_iterations (& self , iterations : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . set_collision_iterations ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , iterations as _) ; } } # [doc = "Returns the shape data."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn shape_get_data (& self , shape : Rid) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . shape_get_data ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , shape) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a shape's type (see [`ShapeType`][ShapeType])."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn shape_get_type (& self , shape : Rid) -> crate :: generated :: physics_2d_server :: ShapeType { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . shape_get_type ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , shape) ; < crate :: generated :: physics_2d_server :: ShapeType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [`shape_get_type`][Self::shape_get_type]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn shape_set_data (& self , shape : Rid , data : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . shape_set_data ; let ret = crate :: icalls :: icallvar__rid_var (method_bind , self . this . sys () . as_ptr () , shape , data . owned_to_variant ()) ; } } # [doc = "Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [`area_set_space`][Self::area_set_space], or to a body with [`body_set_space`][Self::body_set_space]."] # [doc = ""] # [inline] pub fn space_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the state of a space, a [`Physics2DDirectSpaceState`][Physics2DDirectSpaceState]. This object can be used to make collision/intersection queries."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn space_get_direct_state (& self , space : Rid) -> Option < Ref < crate :: generated :: Physics2DDirectSpaceState , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_get_direct_state ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , space) ; < Option < Ref < crate :: generated :: Physics2DDirectSpaceState , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the value of a space parameter."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn space_get_param (& self , space : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_get_param ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , space , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns whether the space is active."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn space_is_active (& self , space : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_is_active ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , space) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Marks a space as active. It will not have an effect, unless it is assigned to an area or body."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn space_set_active (& self , space : Rid , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_set_active ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , space , active as _) ; } } # [doc = "Sets the value for a space parameter. See [`SpaceParameter`][SpaceParameter] for a list of available parameters."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn space_set_param (& self , space : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DServerMethodTable :: get (get_api ()) . space_set_param ; let ret = crate :: icalls :: icallvar__rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , space , param as _ , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DServer { } unsafe impl GodotObject for Physics2DServer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Physics2DServer" } } impl std :: ops :: Deref for Physics2DServer { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for Physics2DServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Physics2DServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub area_add_shape : * mut sys :: godot_method_bind , pub area_attach_canvas_instance_id : * mut sys :: godot_method_bind , pub area_attach_object_instance_id : * mut sys :: godot_method_bind , pub area_clear_shapes : * mut sys :: godot_method_bind , pub area_create : * mut sys :: godot_method_bind , pub area_get_canvas_instance_id : * mut sys :: godot_method_bind , pub area_get_object_instance_id : * mut sys :: godot_method_bind , pub area_get_param : * mut sys :: godot_method_bind , pub area_get_shape : * mut sys :: godot_method_bind , pub area_get_shape_count : * mut sys :: godot_method_bind , pub area_get_shape_transform : * mut sys :: godot_method_bind , pub area_get_space : * mut sys :: godot_method_bind , pub area_get_space_override_mode : * mut sys :: godot_method_bind , pub area_get_transform : * mut sys :: godot_method_bind , pub area_remove_shape : * mut sys :: godot_method_bind , pub area_set_area_monitor_callback : * mut sys :: godot_method_bind , pub area_set_collision_layer : * mut sys :: godot_method_bind , pub area_set_collision_mask : * mut sys :: godot_method_bind , pub area_set_monitor_callback : * mut sys :: godot_method_bind , pub area_set_monitorable : * mut sys :: godot_method_bind , pub area_set_param : * mut sys :: godot_method_bind , pub area_set_shape : * mut sys :: godot_method_bind , pub area_set_shape_disabled : * mut sys :: godot_method_bind , pub area_set_shape_transform : * mut sys :: godot_method_bind , pub area_set_space : * mut sys :: godot_method_bind , pub area_set_space_override_mode : * mut sys :: godot_method_bind , pub area_set_transform : * mut sys :: godot_method_bind , pub body_add_central_force : * mut sys :: godot_method_bind , pub body_add_collision_exception : * mut sys :: godot_method_bind , pub body_add_force : * mut sys :: godot_method_bind , pub body_add_shape : * mut sys :: godot_method_bind , pub body_add_torque : * mut sys :: godot_method_bind , pub body_apply_central_impulse : * mut sys :: godot_method_bind , pub body_apply_impulse : * mut sys :: godot_method_bind , pub body_apply_torque_impulse : * mut sys :: godot_method_bind , pub body_attach_canvas_instance_id : * mut sys :: godot_method_bind , pub body_attach_object_instance_id : * mut sys :: godot_method_bind , pub body_clear_shapes : * mut sys :: godot_method_bind , pub body_create : * mut sys :: godot_method_bind , pub body_get_canvas_instance_id : * mut sys :: godot_method_bind , pub body_get_collision_layer : * mut sys :: godot_method_bind , pub body_get_collision_mask : * mut sys :: godot_method_bind , pub body_get_continuous_collision_detection_mode : * mut sys :: godot_method_bind , pub body_get_direct_state : * mut sys :: godot_method_bind , pub body_get_max_contacts_reported : * mut sys :: godot_method_bind , pub body_get_mode : * mut sys :: godot_method_bind , pub body_get_object_instance_id : * mut sys :: godot_method_bind , pub body_get_param : * mut sys :: godot_method_bind , pub body_get_shape : * mut sys :: godot_method_bind , pub body_get_shape_count : * mut sys :: godot_method_bind , pub body_get_shape_metadata : * mut sys :: godot_method_bind , pub body_get_shape_transform : * mut sys :: godot_method_bind , pub body_get_space : * mut sys :: godot_method_bind , pub body_get_state : * mut sys :: godot_method_bind , pub body_is_omitting_force_integration : * mut sys :: godot_method_bind , pub body_remove_collision_exception : * mut sys :: godot_method_bind , pub body_remove_shape : * mut sys :: godot_method_bind , pub body_set_axis_velocity : * mut sys :: godot_method_bind , pub body_set_collision_layer : * mut sys :: godot_method_bind , pub body_set_collision_mask : * mut sys :: godot_method_bind , pub body_set_continuous_collision_detection_mode : * mut sys :: godot_method_bind , pub body_set_force_integration_callback : * mut sys :: godot_method_bind , pub body_set_max_contacts_reported : * mut sys :: godot_method_bind , pub body_set_mode : * mut sys :: godot_method_bind , pub body_set_omit_force_integration : * mut sys :: godot_method_bind , pub body_set_param : * mut sys :: godot_method_bind , pub body_set_shape : * mut sys :: godot_method_bind , pub body_set_shape_as_one_way_collision : * mut sys :: godot_method_bind , pub body_set_shape_disabled : * mut sys :: godot_method_bind , pub body_set_shape_metadata : * mut sys :: godot_method_bind , pub body_set_shape_transform : * mut sys :: godot_method_bind , pub body_set_space : * mut sys :: godot_method_bind , pub body_set_state : * mut sys :: godot_method_bind , pub body_test_motion : * mut sys :: godot_method_bind , pub capsule_shape_create : * mut sys :: godot_method_bind , pub circle_shape_create : * mut sys :: godot_method_bind , pub concave_polygon_shape_create : * mut sys :: godot_method_bind , pub convex_polygon_shape_create : * mut sys :: godot_method_bind , pub damped_spring_joint_create : * mut sys :: godot_method_bind , pub damped_string_joint_get_param : * mut sys :: godot_method_bind , pub damped_string_joint_set_param : * mut sys :: godot_method_bind , pub free_rid : * mut sys :: godot_method_bind , pub get_process_info : * mut sys :: godot_method_bind , pub groove_joint_create : * mut sys :: godot_method_bind , pub joint_get_param : * mut sys :: godot_method_bind , pub joint_get_type : * mut sys :: godot_method_bind , pub joint_set_param : * mut sys :: godot_method_bind , pub line_shape_create : * mut sys :: godot_method_bind , pub pin_joint_create : * mut sys :: godot_method_bind , pub ray_shape_create : * mut sys :: godot_method_bind , pub rectangle_shape_create : * mut sys :: godot_method_bind , pub segment_shape_create : * mut sys :: godot_method_bind , pub set_active : * mut sys :: godot_method_bind , pub set_collision_iterations : * mut sys :: godot_method_bind , pub shape_get_data : * mut sys :: godot_method_bind , pub shape_get_type : * mut sys :: godot_method_bind , pub shape_set_data : * mut sys :: godot_method_bind , pub space_create : * mut sys :: godot_method_bind , pub space_get_direct_state : * mut sys :: godot_method_bind , pub space_get_param : * mut sys :: godot_method_bind , pub space_is_active : * mut sys :: godot_method_bind , pub space_set_active : * mut sys :: godot_method_bind , pub space_set_param : * mut sys :: godot_method_bind } impl Physics2DServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Physics2DServerMethodTable = Physics2DServerMethodTable { class_constructor : None , area_add_shape : 0 as * mut sys :: godot_method_bind , area_attach_canvas_instance_id : 0 as * mut sys :: godot_method_bind , area_attach_object_instance_id : 0 as * mut sys :: godot_method_bind , area_clear_shapes : 0 as * mut sys :: godot_method_bind , area_create : 0 as * mut sys :: godot_method_bind , area_get_canvas_instance_id : 0 as * mut sys :: godot_method_bind , area_get_object_instance_id : 0 as * mut sys :: godot_method_bind , area_get_param : 0 as * mut sys :: godot_method_bind , area_get_shape : 0 as * mut sys :: godot_method_bind , area_get_shape_count : 0 as * mut sys :: godot_method_bind , area_get_shape_transform : 0 as * mut sys :: godot_method_bind , area_get_space : 0 as * mut sys :: godot_method_bind , area_get_space_override_mode : 0 as * mut sys :: godot_method_bind , area_get_transform : 0 as * mut sys :: godot_method_bind , area_remove_shape : 0 as * mut sys :: godot_method_bind , area_set_area_monitor_callback : 0 as * mut sys :: godot_method_bind , area_set_collision_layer : 0 as * mut sys :: godot_method_bind , area_set_collision_mask : 0 as * mut sys :: godot_method_bind , area_set_monitor_callback : 0 as * mut sys :: godot_method_bind , area_set_monitorable : 0 as * mut sys :: godot_method_bind , area_set_param : 0 as * mut sys :: godot_method_bind , area_set_shape : 0 as * mut sys :: godot_method_bind , area_set_shape_disabled : 0 as * mut sys :: godot_method_bind , area_set_shape_transform : 0 as * mut sys :: godot_method_bind , area_set_space : 0 as * mut sys :: godot_method_bind , area_set_space_override_mode : 0 as * mut sys :: godot_method_bind , area_set_transform : 0 as * mut sys :: godot_method_bind , body_add_central_force : 0 as * mut sys :: godot_method_bind , body_add_collision_exception : 0 as * mut sys :: godot_method_bind , body_add_force : 0 as * mut sys :: godot_method_bind , body_add_shape : 0 as * mut sys :: godot_method_bind , body_add_torque : 0 as * mut sys :: godot_method_bind , body_apply_central_impulse : 0 as * mut sys :: godot_method_bind , body_apply_impulse : 0 as * mut sys :: godot_method_bind , body_apply_torque_impulse : 0 as * mut sys :: godot_method_bind , body_attach_canvas_instance_id : 0 as * mut sys :: godot_method_bind , body_attach_object_instance_id : 0 as * mut sys :: godot_method_bind , body_clear_shapes : 0 as * mut sys :: godot_method_bind , body_create : 0 as * mut sys :: godot_method_bind , body_get_canvas_instance_id : 0 as * mut sys :: godot_method_bind , body_get_collision_layer : 0 as * mut sys :: godot_method_bind , body_get_collision_mask : 0 as * mut sys :: godot_method_bind , body_get_continuous_collision_detection_mode : 0 as * mut sys :: godot_method_bind , body_get_direct_state : 0 as * mut sys :: godot_method_bind , body_get_max_contacts_reported : 0 as * mut sys :: godot_method_bind , body_get_mode : 0 as * mut sys :: godot_method_bind , body_get_object_instance_id : 0 as * mut sys :: godot_method_bind , body_get_param : 0 as * mut sys :: godot_method_bind , body_get_shape : 0 as * mut sys :: godot_method_bind , body_get_shape_count : 0 as * mut sys :: godot_method_bind , body_get_shape_metadata : 0 as * mut sys :: godot_method_bind , body_get_shape_transform : 0 as * mut sys :: godot_method_bind , body_get_space : 0 as * mut sys :: godot_method_bind , body_get_state : 0 as * mut sys :: godot_method_bind , body_is_omitting_force_integration : 0 as * mut sys :: godot_method_bind , body_remove_collision_exception : 0 as * mut sys :: godot_method_bind , body_remove_shape : 0 as * mut sys :: godot_method_bind , body_set_axis_velocity : 0 as * mut sys :: godot_method_bind , body_set_collision_layer : 0 as * mut sys :: godot_method_bind , body_set_collision_mask : 0 as * mut sys :: godot_method_bind , body_set_continuous_collision_detection_mode : 0 as * mut sys :: godot_method_bind , body_set_force_integration_callback : 0 as * mut sys :: godot_method_bind , body_set_max_contacts_reported : 0 as * mut sys :: godot_method_bind , body_set_mode : 0 as * mut sys :: godot_method_bind , body_set_omit_force_integration : 0 as * mut sys :: godot_method_bind , body_set_param : 0 as * mut sys :: godot_method_bind , body_set_shape : 0 as * mut sys :: godot_method_bind , body_set_shape_as_one_way_collision : 0 as * mut sys :: godot_method_bind , body_set_shape_disabled : 0 as * mut sys :: godot_method_bind , body_set_shape_metadata : 0 as * mut sys :: godot_method_bind , body_set_shape_transform : 0 as * mut sys :: godot_method_bind , body_set_space : 0 as * mut sys :: godot_method_bind , body_set_state : 0 as * mut sys :: godot_method_bind , body_test_motion : 0 as * mut sys :: godot_method_bind , capsule_shape_create : 0 as * mut sys :: godot_method_bind , circle_shape_create : 0 as * mut sys :: godot_method_bind , concave_polygon_shape_create : 0 as * mut sys :: godot_method_bind , convex_polygon_shape_create : 0 as * mut sys :: godot_method_bind , damped_spring_joint_create : 0 as * mut sys :: godot_method_bind , damped_string_joint_get_param : 0 as * mut sys :: godot_method_bind , damped_string_joint_set_param : 0 as * mut sys :: godot_method_bind , free_rid : 0 as * mut sys :: godot_method_bind , get_process_info : 0 as * mut sys :: godot_method_bind , groove_joint_create : 0 as * mut sys :: godot_method_bind , joint_get_param : 0 as * mut sys :: godot_method_bind , joint_get_type : 0 as * mut sys :: godot_method_bind , joint_set_param : 0 as * mut sys :: godot_method_bind , line_shape_create : 0 as * mut sys :: godot_method_bind , pin_joint_create : 0 as * mut sys :: godot_method_bind , ray_shape_create : 0 as * mut sys :: godot_method_bind , rectangle_shape_create : 0 as * mut sys :: godot_method_bind , segment_shape_create : 0 as * mut sys :: godot_method_bind , set_active : 0 as * mut sys :: godot_method_bind , set_collision_iterations : 0 as * mut sys :: godot_method_bind , shape_get_data : 0 as * mut sys :: godot_method_bind , shape_get_type : 0 as * mut sys :: godot_method_bind , shape_set_data : 0 as * mut sys :: godot_method_bind , space_create : 0 as * mut sys :: godot_method_bind , space_get_direct_state : 0 as * mut sys :: godot_method_bind , space_get_param : 0 as * mut sys :: godot_method_bind , space_is_active : 0 as * mut sys :: godot_method_bind , space_set_active : 0 as * mut sys :: godot_method_bind , space_set_param : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Physics2DServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Physics2DServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . area_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_add_shape\0" . as_ptr () as * const c_char) ; table . area_attach_canvas_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_attach_canvas_instance_id\0" . as_ptr () as * const c_char) ; table . area_attach_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_attach_object_instance_id\0" . as_ptr () as * const c_char) ; table . area_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "area_clear_shapes\0" . as_ptr () as * const c_char) ; table . area_create = (gd_api . godot_method_bind_get_method) (class_name , "area_create\0" . as_ptr () as * const c_char) ; table . area_get_canvas_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_get_canvas_instance_id\0" . as_ptr () as * const c_char) ; table . area_get_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_get_object_instance_id\0" . as_ptr () as * const c_char) ; table . area_get_param = (gd_api . godot_method_bind_get_method) (class_name , "area_get_param\0" . as_ptr () as * const c_char) ; table . area_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape\0" . as_ptr () as * const c_char) ; table . area_get_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape_count\0" . as_ptr () as * const c_char) ; table . area_get_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape_transform\0" . as_ptr () as * const c_char) ; table . area_get_space = (gd_api . godot_method_bind_get_method) (class_name , "area_get_space\0" . as_ptr () as * const c_char) ; table . area_get_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "area_get_space_override_mode\0" . as_ptr () as * const c_char) ; table . area_get_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_get_transform\0" . as_ptr () as * const c_char) ; table . area_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_remove_shape\0" . as_ptr () as * const c_char) ; table . area_set_area_monitor_callback = (gd_api . godot_method_bind_get_method) (class_name , "area_set_area_monitor_callback\0" . as_ptr () as * const c_char) ; table . area_set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "area_set_collision_layer\0" . as_ptr () as * const c_char) ; table . area_set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "area_set_collision_mask\0" . as_ptr () as * const c_char) ; table . area_set_monitor_callback = (gd_api . godot_method_bind_get_method) (class_name , "area_set_monitor_callback\0" . as_ptr () as * const c_char) ; table . area_set_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "area_set_monitorable\0" . as_ptr () as * const c_char) ; table . area_set_param = (gd_api . godot_method_bind_get_method) (class_name , "area_set_param\0" . as_ptr () as * const c_char) ; table . area_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape\0" . as_ptr () as * const c_char) ; table . area_set_shape_disabled = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape_disabled\0" . as_ptr () as * const c_char) ; table . area_set_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape_transform\0" . as_ptr () as * const c_char) ; table . area_set_space = (gd_api . godot_method_bind_get_method) (class_name , "area_set_space\0" . as_ptr () as * const c_char) ; table . area_set_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "area_set_space_override_mode\0" . as_ptr () as * const c_char) ; table . area_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_set_transform\0" . as_ptr () as * const c_char) ; table . body_add_central_force = (gd_api . godot_method_bind_get_method) (class_name , "body_add_central_force\0" . as_ptr () as * const c_char) ; table . body_add_collision_exception = (gd_api . godot_method_bind_get_method) (class_name , "body_add_collision_exception\0" . as_ptr () as * const c_char) ; table . body_add_force = (gd_api . godot_method_bind_get_method) (class_name , "body_add_force\0" . as_ptr () as * const c_char) ; table . body_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_add_shape\0" . as_ptr () as * const c_char) ; table . body_add_torque = (gd_api . godot_method_bind_get_method) (class_name , "body_add_torque\0" . as_ptr () as * const c_char) ; table . body_apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_central_impulse\0" . as_ptr () as * const c_char) ; table . body_apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_impulse\0" . as_ptr () as * const c_char) ; table . body_apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_torque_impulse\0" . as_ptr () as * const c_char) ; table . body_attach_canvas_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_attach_canvas_instance_id\0" . as_ptr () as * const c_char) ; table . body_attach_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_attach_object_instance_id\0" . as_ptr () as * const c_char) ; table . body_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "body_clear_shapes\0" . as_ptr () as * const c_char) ; table . body_create = (gd_api . godot_method_bind_get_method) (class_name , "body_create\0" . as_ptr () as * const c_char) ; table . body_get_canvas_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_get_canvas_instance_id\0" . as_ptr () as * const c_char) ; table . body_get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "body_get_collision_layer\0" . as_ptr () as * const c_char) ; table . body_get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "body_get_collision_mask\0" . as_ptr () as * const c_char) ; table . body_get_continuous_collision_detection_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_get_continuous_collision_detection_mode\0" . as_ptr () as * const c_char) ; table . body_get_direct_state = (gd_api . godot_method_bind_get_method) (class_name , "body_get_direct_state\0" . as_ptr () as * const c_char) ; table . body_get_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "body_get_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . body_get_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_get_mode\0" . as_ptr () as * const c_char) ; table . body_get_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_get_object_instance_id\0" . as_ptr () as * const c_char) ; table . body_get_param = (gd_api . godot_method_bind_get_method) (class_name , "body_get_param\0" . as_ptr () as * const c_char) ; table . body_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape\0" . as_ptr () as * const c_char) ; table . body_get_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape_count\0" . as_ptr () as * const c_char) ; table . body_get_shape_metadata = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape_metadata\0" . as_ptr () as * const c_char) ; table . body_get_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape_transform\0" . as_ptr () as * const c_char) ; table . body_get_space = (gd_api . godot_method_bind_get_method) (class_name , "body_get_space\0" . as_ptr () as * const c_char) ; table . body_get_state = (gd_api . godot_method_bind_get_method) (class_name , "body_get_state\0" . as_ptr () as * const c_char) ; table . body_is_omitting_force_integration = (gd_api . godot_method_bind_get_method) (class_name , "body_is_omitting_force_integration\0" . as_ptr () as * const c_char) ; table . body_remove_collision_exception = (gd_api . godot_method_bind_get_method) (class_name , "body_remove_collision_exception\0" . as_ptr () as * const c_char) ; table . body_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_remove_shape\0" . as_ptr () as * const c_char) ; table . body_set_axis_velocity = (gd_api . godot_method_bind_get_method) (class_name , "body_set_axis_velocity\0" . as_ptr () as * const c_char) ; table . body_set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "body_set_collision_layer\0" . as_ptr () as * const c_char) ; table . body_set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "body_set_collision_mask\0" . as_ptr () as * const c_char) ; table . body_set_continuous_collision_detection_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_set_continuous_collision_detection_mode\0" . as_ptr () as * const c_char) ; table . body_set_force_integration_callback = (gd_api . godot_method_bind_get_method) (class_name , "body_set_force_integration_callback\0" . as_ptr () as * const c_char) ; table . body_set_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "body_set_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . body_set_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_set_mode\0" . as_ptr () as * const c_char) ; table . body_set_omit_force_integration = (gd_api . godot_method_bind_get_method) (class_name , "body_set_omit_force_integration\0" . as_ptr () as * const c_char) ; table . body_set_param = (gd_api . godot_method_bind_get_method) (class_name , "body_set_param\0" . as_ptr () as * const c_char) ; table . body_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape\0" . as_ptr () as * const c_char) ; table . body_set_shape_as_one_way_collision = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_as_one_way_collision\0" . as_ptr () as * const c_char) ; table . body_set_shape_disabled = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_disabled\0" . as_ptr () as * const c_char) ; table . body_set_shape_metadata = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_metadata\0" . as_ptr () as * const c_char) ; table . body_set_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_transform\0" . as_ptr () as * const c_char) ; table . body_set_space = (gd_api . godot_method_bind_get_method) (class_name , "body_set_space\0" . as_ptr () as * const c_char) ; table . body_set_state = (gd_api . godot_method_bind_get_method) (class_name , "body_set_state\0" . as_ptr () as * const c_char) ; table . body_test_motion = (gd_api . godot_method_bind_get_method) (class_name , "body_test_motion\0" . as_ptr () as * const c_char) ; table . capsule_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "capsule_shape_create\0" . as_ptr () as * const c_char) ; table . circle_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "circle_shape_create\0" . as_ptr () as * const c_char) ; table . concave_polygon_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "concave_polygon_shape_create\0" . as_ptr () as * const c_char) ; table . convex_polygon_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "convex_polygon_shape_create\0" . as_ptr () as * const c_char) ; table . damped_spring_joint_create = (gd_api . godot_method_bind_get_method) (class_name , "damped_spring_joint_create\0" . as_ptr () as * const c_char) ; table . damped_string_joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "damped_string_joint_get_param\0" . as_ptr () as * const c_char) ; table . damped_string_joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "damped_string_joint_set_param\0" . as_ptr () as * const c_char) ; table . free_rid = (gd_api . godot_method_bind_get_method) (class_name , "free_rid\0" . as_ptr () as * const c_char) ; table . get_process_info = (gd_api . godot_method_bind_get_method) (class_name , "get_process_info\0" . as_ptr () as * const c_char) ; table . groove_joint_create = (gd_api . godot_method_bind_get_method) (class_name , "groove_joint_create\0" . as_ptr () as * const c_char) ; table . joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "joint_get_param\0" . as_ptr () as * const c_char) ; table . joint_get_type = (gd_api . godot_method_bind_get_method) (class_name , "joint_get_type\0" . as_ptr () as * const c_char) ; table . joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "joint_set_param\0" . as_ptr () as * const c_char) ; table . line_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "line_shape_create\0" . as_ptr () as * const c_char) ; table . pin_joint_create = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_create\0" . as_ptr () as * const c_char) ; table . ray_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "ray_shape_create\0" . as_ptr () as * const c_char) ; table . rectangle_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "rectangle_shape_create\0" . as_ptr () as * const c_char) ; table . segment_shape_create = (gd_api . godot_method_bind_get_method) (class_name , "segment_shape_create\0" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\0" . as_ptr () as * const c_char) ; table . set_collision_iterations = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_iterations\0" . as_ptr () as * const c_char) ; table . shape_get_data = (gd_api . godot_method_bind_get_method) (class_name , "shape_get_data\0" . as_ptr () as * const c_char) ; table . shape_get_type = (gd_api . godot_method_bind_get_method) (class_name , "shape_get_type\0" . as_ptr () as * const c_char) ; table . shape_set_data = (gd_api . godot_method_bind_get_method) (class_name , "shape_set_data\0" . as_ptr () as * const c_char) ; table . space_create = (gd_api . godot_method_bind_get_method) (class_name , "space_create\0" . as_ptr () as * const c_char) ; table . space_get_direct_state = (gd_api . godot_method_bind_get_method) (class_name , "space_get_direct_state\0" . as_ptr () as * const c_char) ; table . space_get_param = (gd_api . godot_method_bind_get_method) (class_name , "space_get_param\0" . as_ptr () as * const c_char) ; table . space_is_active = (gd_api . godot_method_bind_get_method) (class_name , "space_is_active\0" . as_ptr () as * const c_char) ; table . space_set_active = (gd_api . godot_method_bind_get_method) (class_name , "space_set_active\0" . as_ptr () as * const c_char) ; table . space_set_param = (gd_api . godot_method_bind_get_method) (class_name , "space_set_param\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::physics_2d_server::private::Physics2DServer;
            
            pub(crate) mod physics_2d_server_sw {
                # ! [doc = "This module contains types related to the API class [`Physics2DServerSW`][super::Physics2DServerSW]."] pub (crate) mod private { # [doc = "`core class Physics2DServerSW` inherits `Physics2DServer` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_physics2dserversw.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nPhysics2DServerSW inherits methods from:\n - [Physics2DServer](struct.Physics2DServer.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Physics2DServerSW { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Physics2DServerSW ; impl Physics2DServerSW { } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DServerSW { } unsafe impl GodotObject for Physics2DServerSW { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Physics2DServerSW" } } impl std :: ops :: Deref for Physics2DServerSW { type Target = crate :: generated :: Physics2DServer ; # [inline] fn deref (& self) -> & crate :: generated :: Physics2DServer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DServerSW { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Physics2DServer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Physics2DServer > for Physics2DServerSW { } unsafe impl SubClass < crate :: generated :: Object > for Physics2DServerSW { }
                use super::*;
            }
            pub use crate::generated::physics_2d_server_sw::private::Physics2DServerSW;
            
            pub(crate) mod physics_2d_shape_query_parameters {
                # ! [doc = "This module contains types related to the API class [`Physics2DShapeQueryParameters`][super::Physics2DShapeQueryParameters]."] pub (crate) mod private { # [doc = "`core class Physics2DShapeQueryParameters` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_physics2dshapequeryparameters.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPhysics2DShapeQueryParameters inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Physics2DShapeQueryParameters { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Physics2DShapeQueryParameters ; impl Physics2DShapeQueryParameters { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Physics2DShapeQueryParametersMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The physics layer(s) the query will take into account (as a bitmask). See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The list of objects or object [`RID`][Rid]s that will be excluded from collisions."] # [doc = ""] # [inline] pub fn exclude (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . get_exclude ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The collision margin for the shape."] # [doc = ""] # [inline] pub fn margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The motion of the shape being queried for."] # [doc = ""] # [inline] pub fn motion (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . get_motion ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The queried shape's [`RID`][Rid]. See also [`set_shape`][Self::set_shape]."] # [doc = ""] # [inline] pub fn shape_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . get_shape_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The queried shape's transform matrix."] # [doc = ""] # [inline] pub fn transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . get_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the query will take [`Area2D`][Area2D]s into account."] # [doc = ""] # [inline] pub fn is_collide_with_areas_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . is_collide_with_areas_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the query will take [`PhysicsBody2D`][PhysicsBody2D]s into account."] # [doc = ""] # [inline] pub fn is_collide_with_bodies_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . is_collide_with_bodies_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the query will take [`Area2D`][Area2D]s into account."] # [doc = ""] # [inline] pub fn set_collide_with_areas (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_collide_with_areas ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the query will take [`PhysicsBody2D`][PhysicsBody2D]s into account."] # [doc = ""] # [inline] pub fn set_collide_with_bodies (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_collide_with_bodies ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The physics layer(s) the query will take into account (as a bitmask). See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_layer (& self , collision_layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , collision_layer as _) ; } } # [doc = "The list of objects or object [`RID`][Rid]s that will be excluded from collisions."] # [doc = ""] # [inline] pub fn set_exclude (& self , exclude : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_exclude ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , exclude) ; } } # [doc = "The collision margin for the shape."] # [doc = ""] # [inline] pub fn set_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; } } # [doc = "The motion of the shape being queried for."] # [doc = ""] # [inline] pub fn set_motion (& self , motion : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_motion ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , motion) ; } } # [doc = "Sets the [`Shape2D`][Shape2D] that will be used for collision/intersection queries."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; } } # [doc = "The queried shape's [`RID`][Rid]. See also [`set_shape`][Self::set_shape]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn set_shape_rid (& self , shape : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_shape_rid ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , shape) ; } } # [doc = "The queried shape's transform matrix."] # [doc = ""] # [inline] pub fn set_transform (& self , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DShapeQueryParametersMethodTable :: get (get_api ()) . set_transform ; let ret = crate :: icalls :: icallvar__trans2D (method_bind , self . this . sys () . as_ptr () , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DShapeQueryParameters { } unsafe impl GodotObject for Physics2DShapeQueryParameters { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Physics2DShapeQueryParameters" } } impl std :: ops :: Deref for Physics2DShapeQueryParameters { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DShapeQueryParameters { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for Physics2DShapeQueryParameters { } unsafe impl SubClass < crate :: generated :: Object > for Physics2DShapeQueryParameters { } impl Instanciable for Physics2DShapeQueryParameters { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Physics2DShapeQueryParameters :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Physics2DShapeQueryParametersMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_collision_layer : * mut sys :: godot_method_bind , pub get_exclude : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub get_motion : * mut sys :: godot_method_bind , pub get_shape_rid : * mut sys :: godot_method_bind , pub get_transform : * mut sys :: godot_method_bind , pub is_collide_with_areas_enabled : * mut sys :: godot_method_bind , pub is_collide_with_bodies_enabled : * mut sys :: godot_method_bind , pub set_collide_with_areas : * mut sys :: godot_method_bind , pub set_collide_with_bodies : * mut sys :: godot_method_bind , pub set_collision_layer : * mut sys :: godot_method_bind , pub set_exclude : * mut sys :: godot_method_bind , pub set_margin : * mut sys :: godot_method_bind , pub set_motion : * mut sys :: godot_method_bind , pub set_shape : * mut sys :: godot_method_bind , pub set_shape_rid : * mut sys :: godot_method_bind , pub set_transform : * mut sys :: godot_method_bind } impl Physics2DShapeQueryParametersMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Physics2DShapeQueryParametersMethodTable = Physics2DShapeQueryParametersMethodTable { class_constructor : None , get_collision_layer : 0 as * mut sys :: godot_method_bind , get_exclude : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , get_motion : 0 as * mut sys :: godot_method_bind , get_shape_rid : 0 as * mut sys :: godot_method_bind , get_transform : 0 as * mut sys :: godot_method_bind , is_collide_with_areas_enabled : 0 as * mut sys :: godot_method_bind , is_collide_with_bodies_enabled : 0 as * mut sys :: godot_method_bind , set_collide_with_areas : 0 as * mut sys :: godot_method_bind , set_collide_with_bodies : 0 as * mut sys :: godot_method_bind , set_collision_layer : 0 as * mut sys :: godot_method_bind , set_exclude : 0 as * mut sys :: godot_method_bind , set_margin : 0 as * mut sys :: godot_method_bind , set_motion : 0 as * mut sys :: godot_method_bind , set_shape : 0 as * mut sys :: godot_method_bind , set_shape_rid : 0 as * mut sys :: godot_method_bind , set_transform : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Physics2DShapeQueryParametersMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Physics2DShapeQueryParameters\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\0" . as_ptr () as * const c_char) ; table . get_exclude = (gd_api . godot_method_bind_get_method) (class_name , "get_exclude\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . get_motion = (gd_api . godot_method_bind_get_method) (class_name , "get_motion\0" . as_ptr () as * const c_char) ; table . get_shape_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_shape_rid\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . is_collide_with_areas_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_collide_with_areas_enabled\0" . as_ptr () as * const c_char) ; table . is_collide_with_bodies_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_collide_with_bodies_enabled\0" . as_ptr () as * const c_char) ; table . set_collide_with_areas = (gd_api . godot_method_bind_get_method) (class_name , "set_collide_with_areas\0" . as_ptr () as * const c_char) ; table . set_collide_with_bodies = (gd_api . godot_method_bind_get_method) (class_name , "set_collide_with_bodies\0" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\0" . as_ptr () as * const c_char) ; table . set_exclude = (gd_api . godot_method_bind_get_method) (class_name , "set_exclude\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; table . set_motion = (gd_api . godot_method_bind_get_method) (class_name , "set_motion\0" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\0" . as_ptr () as * const c_char) ; table . set_shape_rid = (gd_api . godot_method_bind_get_method) (class_name , "set_shape_rid\0" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::physics_2d_shape_query_parameters::private::Physics2DShapeQueryParameters;
            
            pub(crate) mod physics_2d_test_motion_result {
                # ! [doc = "This module contains types related to the API class [`Physics2DTestMotionResult`][super::Physics2DTestMotionResult]."] pub (crate) mod private { # [doc = "`core class Physics2DTestMotionResult` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_physics2dtestmotionresult.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPhysics2DTestMotionResult inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Physics2DTestMotionResult { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Physics2DTestMotionResult ; impl Physics2DTestMotionResult { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Physics2DTestMotionResultMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn collider (& self) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collider ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn collider_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collider_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn collider_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collider_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn collider_shape (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collider_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn collider_velocity (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collider_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_depth (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collision_depth ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_normal (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collision_normal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_point (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collision_point ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_safe_fraction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collision_safe_fraction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_unsafe_fraction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_collision_unsafe_fraction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn motion (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_motion ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn motion_remainder (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Physics2DTestMotionResultMethodTable :: get (get_api ()) . get_motion_remainder ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for Physics2DTestMotionResult { } unsafe impl GodotObject for Physics2DTestMotionResult { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Physics2DTestMotionResult" } } impl std :: ops :: Deref for Physics2DTestMotionResult { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Physics2DTestMotionResult { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for Physics2DTestMotionResult { } unsafe impl SubClass < crate :: generated :: Object > for Physics2DTestMotionResult { } impl Instanciable for Physics2DTestMotionResult { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Physics2DTestMotionResult :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Physics2DTestMotionResultMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_collider : * mut sys :: godot_method_bind , pub get_collider_id : * mut sys :: godot_method_bind , pub get_collider_rid : * mut sys :: godot_method_bind , pub get_collider_shape : * mut sys :: godot_method_bind , pub get_collider_velocity : * mut sys :: godot_method_bind , pub get_collision_depth : * mut sys :: godot_method_bind , pub get_collision_normal : * mut sys :: godot_method_bind , pub get_collision_point : * mut sys :: godot_method_bind , pub get_collision_safe_fraction : * mut sys :: godot_method_bind , pub get_collision_unsafe_fraction : * mut sys :: godot_method_bind , pub get_motion : * mut sys :: godot_method_bind , pub get_motion_remainder : * mut sys :: godot_method_bind } impl Physics2DTestMotionResultMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Physics2DTestMotionResultMethodTable = Physics2DTestMotionResultMethodTable { class_constructor : None , get_collider : 0 as * mut sys :: godot_method_bind , get_collider_id : 0 as * mut sys :: godot_method_bind , get_collider_rid : 0 as * mut sys :: godot_method_bind , get_collider_shape : 0 as * mut sys :: godot_method_bind , get_collider_velocity : 0 as * mut sys :: godot_method_bind , get_collision_depth : 0 as * mut sys :: godot_method_bind , get_collision_normal : 0 as * mut sys :: godot_method_bind , get_collision_point : 0 as * mut sys :: godot_method_bind , get_collision_safe_fraction : 0 as * mut sys :: godot_method_bind , get_collision_unsafe_fraction : 0 as * mut sys :: godot_method_bind , get_motion : 0 as * mut sys :: godot_method_bind , get_motion_remainder : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Physics2DTestMotionResultMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Physics2DTestMotionResult\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_collider\0" . as_ptr () as * const c_char) ; table . get_collider_id = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_id\0" . as_ptr () as * const c_char) ; table . get_collider_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_rid\0" . as_ptr () as * const c_char) ; table . get_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape\0" . as_ptr () as * const c_char) ; table . get_collider_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_velocity\0" . as_ptr () as * const c_char) ; table . get_collision_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_depth\0" . as_ptr () as * const c_char) ; table . get_collision_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_normal\0" . as_ptr () as * const c_char) ; table . get_collision_point = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_point\0" . as_ptr () as * const c_char) ; table . get_collision_safe_fraction = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_safe_fraction\0" . as_ptr () as * const c_char) ; table . get_collision_unsafe_fraction = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_unsafe_fraction\0" . as_ptr () as * const c_char) ; table . get_motion = (gd_api . godot_method_bind_get_method) (class_name , "get_motion\0" . as_ptr () as * const c_char) ; table . get_motion_remainder = (gd_api . godot_method_bind_get_method) (class_name , "get_motion_remainder\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::physics_2d_test_motion_result::private::Physics2DTestMotionResult;
            
            pub(crate) mod physics_body {
                # ! [doc = "This module contains types related to the API class [`PhysicsBody`][super::PhysicsBody]."] pub (crate) mod private { # [doc = "`core class PhysicsBody` inherits `CollisionObject` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_physicsbody.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nPhysicsBody inherits methods from:\n - [CollisionObject](struct.CollisionObject.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PhysicsBody { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PhysicsBody ; impl PhysicsBody { # [doc = "Adds a body to the list of bodies that this body can't collide with."] # [doc = ""] # [inline] pub fn add_collision_exception_with (& self , body : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBodyMethodTable :: get (get_api ()) . add_collision_exception_with ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; } } # [doc = "Returns an array of nodes that were added as collision exceptions for this body."] # [doc = ""] # [inline] pub fn get_collision_exceptions (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBodyMethodTable :: get (get_api ()) . get_collision_exceptions ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Removes a body from the list of bodies that this body can't collide with."] # [doc = ""] # [inline] pub fn remove_collision_exception_with (& self , body : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBodyMethodTable :: get (get_api ()) . remove_collision_exception_with ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsBody { } unsafe impl GodotObject for PhysicsBody { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PhysicsBody" } } impl QueueFree for PhysicsBody { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for PhysicsBody { type Target = crate :: generated :: CollisionObject ; # [inline] fn deref (& self) -> & crate :: generated :: CollisionObject { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsBody { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CollisionObject { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CollisionObject > for PhysicsBody { } unsafe impl SubClass < crate :: generated :: Spatial > for PhysicsBody { } unsafe impl SubClass < crate :: generated :: Node > for PhysicsBody { } unsafe impl SubClass < crate :: generated :: Object > for PhysicsBody { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PhysicsBodyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_collision_exception_with : * mut sys :: godot_method_bind , pub get_collision_exceptions : * mut sys :: godot_method_bind , pub remove_collision_exception_with : * mut sys :: godot_method_bind } impl PhysicsBodyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PhysicsBodyMethodTable = PhysicsBodyMethodTable { class_constructor : None , add_collision_exception_with : 0 as * mut sys :: godot_method_bind , get_collision_exceptions : 0 as * mut sys :: godot_method_bind , remove_collision_exception_with : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PhysicsBodyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PhysicsBody\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_collision_exception_with = (gd_api . godot_method_bind_get_method) (class_name , "add_collision_exception_with\0" . as_ptr () as * const c_char) ; table . get_collision_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_exceptions\0" . as_ptr () as * const c_char) ; table . remove_collision_exception_with = (gd_api . godot_method_bind_get_method) (class_name , "remove_collision_exception_with\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::physics_body::private::PhysicsBody;
            
            pub(crate) mod physics_body_2d {
                # ! [doc = "This module contains types related to the API class [`PhysicsBody2D`][super::PhysicsBody2D]."] pub (crate) mod private { # [doc = "`core class PhysicsBody2D` inherits `CollisionObject2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_physicsbody2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nPhysicsBody2D inherits methods from:\n - [CollisionObject2D](struct.CollisionObject2D.html)\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PhysicsBody2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PhysicsBody2D ; impl PhysicsBody2D { # [doc = "Adds a body to the list of bodies that this body can't collide with."] # [doc = ""] # [inline] pub fn add_collision_exception_with (& self , body : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBody2DMethodTable :: get (get_api ()) . add_collision_exception_with ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; } } # [doc = "Returns an array of nodes that were added as collision exceptions for this body."] # [doc = ""] # [inline] pub fn get_collision_exceptions (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBody2DMethodTable :: get (get_api ()) . get_collision_exceptions ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Removes a body from the list of bodies that this body can't collide with."] # [doc = ""] # [inline] pub fn remove_collision_exception_with (& self , body : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsBody2DMethodTable :: get (get_api ()) . remove_collision_exception_with ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsBody2D { } unsafe impl GodotObject for PhysicsBody2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PhysicsBody2D" } } impl QueueFree for PhysicsBody2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for PhysicsBody2D { type Target = crate :: generated :: CollisionObject2D ; # [inline] fn deref (& self) -> & crate :: generated :: CollisionObject2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsBody2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CollisionObject2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CollisionObject2D > for PhysicsBody2D { } unsafe impl SubClass < crate :: generated :: Node2D > for PhysicsBody2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for PhysicsBody2D { } unsafe impl SubClass < crate :: generated :: Node > for PhysicsBody2D { } unsafe impl SubClass < crate :: generated :: Object > for PhysicsBody2D { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PhysicsBody2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_collision_exception_with : * mut sys :: godot_method_bind , pub get_collision_exceptions : * mut sys :: godot_method_bind , pub remove_collision_exception_with : * mut sys :: godot_method_bind } impl PhysicsBody2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PhysicsBody2DMethodTable = PhysicsBody2DMethodTable { class_constructor : None , add_collision_exception_with : 0 as * mut sys :: godot_method_bind , get_collision_exceptions : 0 as * mut sys :: godot_method_bind , remove_collision_exception_with : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PhysicsBody2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PhysicsBody2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_collision_exception_with = (gd_api . godot_method_bind_get_method) (class_name , "add_collision_exception_with\0" . as_ptr () as * const c_char) ; table . get_collision_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_exceptions\0" . as_ptr () as * const c_char) ; table . remove_collision_exception_with = (gd_api . godot_method_bind_get_method) (class_name , "remove_collision_exception_with\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::physics_body_2d::private::PhysicsBody2D;
            
            pub(crate) mod physics_direct_body_state {
                # ! [doc = "This module contains types related to the API class [`PhysicsDirectBodyState`][super::PhysicsDirectBodyState]."] pub (crate) mod private { # [doc = "`core class PhysicsDirectBodyState` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_physicsdirectbodystate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nPhysicsDirectBodyState inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PhysicsDirectBodyState { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PhysicsDirectBodyState ; impl PhysicsDirectBodyState { # [doc = "Adds a constant directional force without affecting rotation.\nThis is equivalent to `add_force(force, Vector3(0,0,0))`."] # [doc = ""] # [inline] pub fn add_central_force (& self , force : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . add_central_force ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , force) ; } } # [doc = "Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates."] # [doc = ""] # [inline] pub fn add_force (& self , force : Vector3 , position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . add_force ; let ret = crate :: icalls :: icallvar__vec3_vec3 (method_bind , self . this . sys () . as_ptr () , force , position) ; } } # [doc = "Adds a constant rotational force without affecting position."] # [doc = ""] # [inline] pub fn add_torque (& self , torque : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . add_torque ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , torque) ; } } # [doc = "Applies a single directional impulse without affecting rotation.\nThis is equivalent to `apply_impulse(Vector3(0, 0, 0), impulse)`."] # [doc = ""] # [inline] pub fn apply_central_impulse (& self , j : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . apply_central_impulse ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , j) ; } } # [doc = "Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin."] # [doc = ""] # [inline] pub fn apply_impulse (& self , position : Vector3 , j : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . apply_impulse ; let ret = crate :: icalls :: icallvar__vec3_vec3 (method_bind , self . this . sys () . as_ptr () , position , j) ; } } # [doc = "Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the vector `j` passed as parameter."] # [doc = ""] # [inline] pub fn apply_torque_impulse (& self , j : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . apply_torque_impulse ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , j) ; } } # [doc = "The body's rotational velocity in axis-angle format. The magnitude of the vector is the rotation rate in _radians_ per second."] # [doc = ""] # [inline] pub fn angular_velocity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_angular_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn center_of_mass (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_center_of_mass ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the collider's [`RID`][Rid]."] # [doc = ""] # [inline] pub fn get_contact_collider (& self , contact_idx : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the collider's object id."] # [doc = ""] # [inline] pub fn get_contact_collider_id (& self , contact_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider_id ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the collider object."] # [doc = ""] # [inline] pub fn get_contact_collider_object (& self , contact_idx : i64) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider_object ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the contact position in the collider."] # [doc = ""] # [inline] pub fn get_contact_collider_position (& self , contact_idx : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the collider's shape index."] # [doc = ""] # [inline] pub fn get_contact_collider_shape (& self , contact_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider_shape ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the linear velocity vector at the collider's contact point."] # [doc = ""] # [inline] pub fn get_contact_collider_velocity_at_position (& self , contact_idx : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_contact_collider_velocity_at_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of contacts this body has with other bodies.\n**Note:** By default, this returns 0 unless bodies are configured to monitor contacts. See [`RigidBody.contact_monitor`][RigidBody::contact_monitor]."] # [doc = ""] # [inline] pub fn get_contact_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_contact_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Impulse created by the contact. Only implemented for Bullet physics."] # [doc = ""] # [inline] pub fn get_contact_impulse (& self , contact_idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_contact_impulse ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the local normal at the contact point."] # [doc = ""] # [inline] pub fn get_contact_local_normal (& self , contact_idx : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_contact_local_normal ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the local position of the contact point."] # [doc = ""] # [inline] pub fn get_contact_local_position (& self , contact_idx : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_contact_local_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the local shape index of the collision."] # [doc = ""] # [inline] pub fn get_contact_local_shape (& self , contact_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_contact_local_shape ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , contact_idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The inverse of the inertia of the body."] # [doc = ""] # [inline] pub fn inverse_inertia (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_inverse_inertia ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The inverse of the mass of the body."] # [doc = ""] # [inline] pub fn inverse_mass (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_inverse_mass ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body's linear velocity in units per second."] # [doc = ""] # [inline] pub fn linear_velocity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_linear_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn principal_inertia_axes (& self) -> Basis { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_principal_inertia_axes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Basis > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current state of the space, useful for queries."] # [doc = ""] # [inline] pub fn get_space_state (& self) -> Option < Ref < crate :: generated :: PhysicsDirectSpaceState , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_space_state ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: PhysicsDirectSpaceState , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The timestep (delta) used for the simulation."] # [doc = ""] # [inline] pub fn step (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_step ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The rate at which the body stops rotating, if there are not any other forces moving it."] # [doc = ""] # [inline] pub fn total_angular_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_total_angular_damp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The total gravity vector being currently applied to this body."] # [doc = ""] # [inline] pub fn total_gravity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_total_gravity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The rate at which the body stops moving, if there are not any other forces moving it."] # [doc = ""] # [inline] pub fn total_linear_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_total_linear_damp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body's transformation matrix."] # [doc = ""] # [inline] pub fn transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the body's velocity at the given relative position, including both translation and rotation."] # [doc = ""] # [inline] pub fn get_velocity_at_local_position (& self , local_position : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . get_velocity_at_local_position ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , local_position) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Calls the built-in force integration code."] # [doc = ""] # [inline] pub fn integrate_forces (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . integrate_forces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, this body is currently sleeping (not active)."] # [doc = ""] # [inline] pub fn is_sleeping (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . is_sleeping ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The body's rotational velocity in axis-angle format. The magnitude of the vector is the rotation rate in _radians_ per second."] # [doc = ""] # [inline] pub fn set_angular_velocity (& self , velocity : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . set_angular_velocity ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , velocity) ; } } # [doc = "The body's linear velocity in units per second."] # [doc = ""] # [inline] pub fn set_linear_velocity (& self , velocity : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . set_linear_velocity ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , velocity) ; } } # [doc = "If `true`, this body is currently sleeping (not active)."] # [doc = ""] # [inline] pub fn set_sleep_state (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . set_sleep_state ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The body's transformation matrix."] # [doc = ""] # [inline] pub fn set_transform (& self , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectBodyStateMethodTable :: get (get_api ()) . set_transform ; let ret = crate :: icalls :: icallvar__trans (method_bind , self . this . sys () . as_ptr () , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsDirectBodyState { } unsafe impl GodotObject for PhysicsDirectBodyState { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PhysicsDirectBodyState" } } impl std :: ops :: Deref for PhysicsDirectBodyState { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsDirectBodyState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for PhysicsDirectBodyState { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PhysicsDirectBodyStateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_central_force : * mut sys :: godot_method_bind , pub add_force : * mut sys :: godot_method_bind , pub add_torque : * mut sys :: godot_method_bind , pub apply_central_impulse : * mut sys :: godot_method_bind , pub apply_impulse : * mut sys :: godot_method_bind , pub apply_torque_impulse : * mut sys :: godot_method_bind , pub get_angular_velocity : * mut sys :: godot_method_bind , pub get_center_of_mass : * mut sys :: godot_method_bind , pub get_contact_collider : * mut sys :: godot_method_bind , pub get_contact_collider_id : * mut sys :: godot_method_bind , pub get_contact_collider_object : * mut sys :: godot_method_bind , pub get_contact_collider_position : * mut sys :: godot_method_bind , pub get_contact_collider_shape : * mut sys :: godot_method_bind , pub get_contact_collider_velocity_at_position : * mut sys :: godot_method_bind , pub get_contact_count : * mut sys :: godot_method_bind , pub get_contact_impulse : * mut sys :: godot_method_bind , pub get_contact_local_normal : * mut sys :: godot_method_bind , pub get_contact_local_position : * mut sys :: godot_method_bind , pub get_contact_local_shape : * mut sys :: godot_method_bind , pub get_inverse_inertia : * mut sys :: godot_method_bind , pub get_inverse_mass : * mut sys :: godot_method_bind , pub get_linear_velocity : * mut sys :: godot_method_bind , pub get_principal_inertia_axes : * mut sys :: godot_method_bind , pub get_space_state : * mut sys :: godot_method_bind , pub get_step : * mut sys :: godot_method_bind , pub get_total_angular_damp : * mut sys :: godot_method_bind , pub get_total_gravity : * mut sys :: godot_method_bind , pub get_total_linear_damp : * mut sys :: godot_method_bind , pub get_transform : * mut sys :: godot_method_bind , pub get_velocity_at_local_position : * mut sys :: godot_method_bind , pub integrate_forces : * mut sys :: godot_method_bind , pub is_sleeping : * mut sys :: godot_method_bind , pub set_angular_velocity : * mut sys :: godot_method_bind , pub set_linear_velocity : * mut sys :: godot_method_bind , pub set_sleep_state : * mut sys :: godot_method_bind , pub set_transform : * mut sys :: godot_method_bind } impl PhysicsDirectBodyStateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PhysicsDirectBodyStateMethodTable = PhysicsDirectBodyStateMethodTable { class_constructor : None , add_central_force : 0 as * mut sys :: godot_method_bind , add_force : 0 as * mut sys :: godot_method_bind , add_torque : 0 as * mut sys :: godot_method_bind , apply_central_impulse : 0 as * mut sys :: godot_method_bind , apply_impulse : 0 as * mut sys :: godot_method_bind , apply_torque_impulse : 0 as * mut sys :: godot_method_bind , get_angular_velocity : 0 as * mut sys :: godot_method_bind , get_center_of_mass : 0 as * mut sys :: godot_method_bind , get_contact_collider : 0 as * mut sys :: godot_method_bind , get_contact_collider_id : 0 as * mut sys :: godot_method_bind , get_contact_collider_object : 0 as * mut sys :: godot_method_bind , get_contact_collider_position : 0 as * mut sys :: godot_method_bind , get_contact_collider_shape : 0 as * mut sys :: godot_method_bind , get_contact_collider_velocity_at_position : 0 as * mut sys :: godot_method_bind , get_contact_count : 0 as * mut sys :: godot_method_bind , get_contact_impulse : 0 as * mut sys :: godot_method_bind , get_contact_local_normal : 0 as * mut sys :: godot_method_bind , get_contact_local_position : 0 as * mut sys :: godot_method_bind , get_contact_local_shape : 0 as * mut sys :: godot_method_bind , get_inverse_inertia : 0 as * mut sys :: godot_method_bind , get_inverse_mass : 0 as * mut sys :: godot_method_bind , get_linear_velocity : 0 as * mut sys :: godot_method_bind , get_principal_inertia_axes : 0 as * mut sys :: godot_method_bind , get_space_state : 0 as * mut sys :: godot_method_bind , get_step : 0 as * mut sys :: godot_method_bind , get_total_angular_damp : 0 as * mut sys :: godot_method_bind , get_total_gravity : 0 as * mut sys :: godot_method_bind , get_total_linear_damp : 0 as * mut sys :: godot_method_bind , get_transform : 0 as * mut sys :: godot_method_bind , get_velocity_at_local_position : 0 as * mut sys :: godot_method_bind , integrate_forces : 0 as * mut sys :: godot_method_bind , is_sleeping : 0 as * mut sys :: godot_method_bind , set_angular_velocity : 0 as * mut sys :: godot_method_bind , set_linear_velocity : 0 as * mut sys :: godot_method_bind , set_sleep_state : 0 as * mut sys :: godot_method_bind , set_transform : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PhysicsDirectBodyStateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PhysicsDirectBodyState\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_central_force = (gd_api . godot_method_bind_get_method) (class_name , "add_central_force\0" . as_ptr () as * const c_char) ; table . add_force = (gd_api . godot_method_bind_get_method) (class_name , "add_force\0" . as_ptr () as * const c_char) ; table . add_torque = (gd_api . godot_method_bind_get_method) (class_name , "add_torque\0" . as_ptr () as * const c_char) ; table . apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_central_impulse\0" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\0" . as_ptr () as * const c_char) ; table . apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_torque_impulse\0" . as_ptr () as * const c_char) ; table . get_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_velocity\0" . as_ptr () as * const c_char) ; table . get_center_of_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_center_of_mass\0" . as_ptr () as * const c_char) ; table . get_contact_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider\0" . as_ptr () as * const c_char) ; table . get_contact_collider_id = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_id\0" . as_ptr () as * const c_char) ; table . get_contact_collider_object = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_object\0" . as_ptr () as * const c_char) ; table . get_contact_collider_position = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_position\0" . as_ptr () as * const c_char) ; table . get_contact_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_shape\0" . as_ptr () as * const c_char) ; table . get_contact_collider_velocity_at_position = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_collider_velocity_at_position\0" . as_ptr () as * const c_char) ; table . get_contact_count = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_count\0" . as_ptr () as * const c_char) ; table . get_contact_impulse = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_impulse\0" . as_ptr () as * const c_char) ; table . get_contact_local_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_local_normal\0" . as_ptr () as * const c_char) ; table . get_contact_local_position = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_local_position\0" . as_ptr () as * const c_char) ; table . get_contact_local_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_local_shape\0" . as_ptr () as * const c_char) ; table . get_inverse_inertia = (gd_api . godot_method_bind_get_method) (class_name , "get_inverse_inertia\0" . as_ptr () as * const c_char) ; table . get_inverse_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_inverse_mass\0" . as_ptr () as * const c_char) ; table . get_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_velocity\0" . as_ptr () as * const c_char) ; table . get_principal_inertia_axes = (gd_api . godot_method_bind_get_method) (class_name , "get_principal_inertia_axes\0" . as_ptr () as * const c_char) ; table . get_space_state = (gd_api . godot_method_bind_get_method) (class_name , "get_space_state\0" . as_ptr () as * const c_char) ; table . get_step = (gd_api . godot_method_bind_get_method) (class_name , "get_step\0" . as_ptr () as * const c_char) ; table . get_total_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_total_angular_damp\0" . as_ptr () as * const c_char) ; table . get_total_gravity = (gd_api . godot_method_bind_get_method) (class_name , "get_total_gravity\0" . as_ptr () as * const c_char) ; table . get_total_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_total_linear_damp\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . get_velocity_at_local_position = (gd_api . godot_method_bind_get_method) (class_name , "get_velocity_at_local_position\0" . as_ptr () as * const c_char) ; table . integrate_forces = (gd_api . godot_method_bind_get_method) (class_name , "integrate_forces\0" . as_ptr () as * const c_char) ; table . is_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "is_sleeping\0" . as_ptr () as * const c_char) ; table . set_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_velocity\0" . as_ptr () as * const c_char) ; table . set_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_velocity\0" . as_ptr () as * const c_char) ; table . set_sleep_state = (gd_api . godot_method_bind_get_method) (class_name , "set_sleep_state\0" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::physics_direct_body_state::private::PhysicsDirectBodyState;
            
            pub(crate) mod physics_direct_space_state {
                # ! [doc = "This module contains types related to the API class [`PhysicsDirectSpaceState`][super::PhysicsDirectSpaceState]."] pub (crate) mod private { # [doc = "`core class PhysicsDirectSpaceState` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_physicsdirectspacestate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nPhysicsDirectSpaceState inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PhysicsDirectSpaceState { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PhysicsDirectSpaceState ; impl PhysicsDirectSpaceState { # [doc = "Checks how far a [`Shape`][Shape] can move without colliding. All the parameters for the query, including the shape, are supplied through a [`PhysicsShapeQueryParameters`][PhysicsShapeQueryParameters] object.\nReturns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of `[1.0, 1.0]` will be returned.\n**Note:** Any [`Shape`][Shape]s that the shape is already colliding with e.g. inside of, will be ignored. Use [`collide_shape`][Self::collide_shape] to determine the [`Shape`][Shape]s that the shape is already colliding with."] # [doc = ""] # [inline] pub fn cast_motion (& self , shape : impl AsArg < crate :: generated :: PhysicsShapeQueryParameters > , motion : Vector3) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectSpaceStateMethodTable :: get (get_api ()) . cast_motion ; let ret = crate :: icalls :: icallvar__obj_vec3 (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr () , motion) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks the intersections of a shape, given through a [`PhysicsShapeQueryParameters`][PhysicsShapeQueryParameters] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [`intersect_shape`][Self::intersect_shape], the number of returned results can be limited to save processing time.\n# Default Arguments\n* `max_results` - `32`"] # [doc = ""] # [inline] pub fn collide_shape (& self , shape : impl AsArg < crate :: generated :: PhysicsShapeQueryParameters > , max_results : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectSpaceStateMethodTable :: get (get_api ()) . collide_shape ; let ret = crate :: icalls :: icallvar__obj_i64 (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr () , max_results as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks the intersections of a shape, given through a [`PhysicsShapeQueryParameters`][PhysicsShapeQueryParameters] object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields:\n`collider_id`: The colliding object's ID.\n`linear_velocity`: The colliding object's velocity [`Vector3`][Vector3]. If the object is an [`Area`][Area], the result is `(0, 0, 0)`.\n`normal`: The object's surface normal at the intersection point.\n`point`: The intersection point.\n`rid`: The intersecting object's [`RID`][Rid].\n`shape`: The shape index of the colliding shape.\nIf the shape did not intersect anything, then an empty dictionary is returned instead."] # [doc = ""] # [inline] pub fn get_rest_info (& self , shape : impl AsArg < crate :: generated :: PhysicsShapeQueryParameters >) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectSpaceStateMethodTable :: get (get_api ()) . get_rest_info ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks whether a point is inside any solid shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:\n`collider`: The colliding object.\n`collider_id`: The colliding object's ID.\n`rid`: The intersecting object's [`RID`][Rid].\n`shape`: The shape index of the colliding shape.\nThe number of intersections can be limited with the `max_results` parameter, to reduce the processing time.\nAdditionally, the method can take an `exclude` array of objects or [`RID`][Rid]s that are to be excluded from collisions, a `collision_mask` bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [`PhysicsBody`][PhysicsBody]s or [`Area`][Area]s, respectively.\n# Default Arguments\n* `max_results` - `32`\n* `exclude` - `[  ]`\n* `collision_layer` - `2147483647`\n* `collide_with_bodies` - `true`\n* `collide_with_areas` - `false`"] # [doc = ""] # [inline] pub fn intersect_point (& self , point : Vector3 , max_results : i64 , exclude : VariantArray , collision_layer : i64 , collide_with_bodies : bool , collide_with_areas : bool) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectSpaceStateMethodTable :: get (get_api ()) . intersect_point ; let ret = crate :: icalls :: icallvar__vec3_i64_arr_i64_bool_bool (method_bind , self . this . sys () . as_ptr () , point , max_results as _ , exclude , collision_layer as _ , collide_with_bodies as _ , collide_with_areas as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Intersects a ray in a given space. The returned object is a dictionary with the following fields:\n`collider`: The colliding object.\n`collider_id`: The colliding object's ID.\n`normal`: The object's surface normal at the intersection point.\n`position`: The intersection point.\n`rid`: The intersecting object's [`RID`][Rid].\n`shape`: The shape index of the colliding shape.\nIf the ray did not intersect anything, then an empty dictionary is returned instead.\nAdditionally, the method can take an `exclude` array of objects or [`RID`][Rid]s that are to be excluded from collisions, a `collision_mask` bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [`PhysicsBody`][PhysicsBody]s or [`Area`][Area]s, respectively.\n# Default Arguments\n* `exclude` - `[  ]`\n* `collision_mask` - `2147483647`\n* `collide_with_bodies` - `true`\n* `collide_with_areas` - `false`"] # [doc = ""] # [inline] pub fn intersect_ray (& self , from : Vector3 , to : Vector3 , exclude : VariantArray , collision_mask : i64 , collide_with_bodies : bool , collide_with_areas : bool) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectSpaceStateMethodTable :: get (get_api ()) . intersect_ray ; let ret = crate :: icalls :: icallvar__vec3_vec3_arr_i64_bool_bool (method_bind , self . this . sys () . as_ptr () , from , to , exclude , collision_mask as _ , collide_with_bodies as _ , collide_with_areas as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks the intersections of a shape, given through a [`PhysicsShapeQueryParameters`][PhysicsShapeQueryParameters] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields:\n`collider`: The colliding object.\n`collider_id`: The colliding object's ID.\n`rid`: The intersecting object's [`RID`][Rid].\n`shape`: The shape index of the colliding shape.\nThe number of intersections can be limited with the `max_results` parameter, to reduce the processing time.\n# Default Arguments\n* `max_results` - `32`"] # [doc = ""] # [inline] pub fn intersect_shape (& self , shape : impl AsArg < crate :: generated :: PhysicsShapeQueryParameters > , max_results : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsDirectSpaceStateMethodTable :: get (get_api ()) . intersect_shape ; let ret = crate :: icalls :: icallvar__obj_i64 (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr () , max_results as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsDirectSpaceState { } unsafe impl GodotObject for PhysicsDirectSpaceState { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PhysicsDirectSpaceState" } } impl std :: ops :: Deref for PhysicsDirectSpaceState { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsDirectSpaceState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for PhysicsDirectSpaceState { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PhysicsDirectSpaceStateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub cast_motion : * mut sys :: godot_method_bind , pub collide_shape : * mut sys :: godot_method_bind , pub get_rest_info : * mut sys :: godot_method_bind , pub intersect_point : * mut sys :: godot_method_bind , pub intersect_ray : * mut sys :: godot_method_bind , pub intersect_shape : * mut sys :: godot_method_bind } impl PhysicsDirectSpaceStateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PhysicsDirectSpaceStateMethodTable = PhysicsDirectSpaceStateMethodTable { class_constructor : None , cast_motion : 0 as * mut sys :: godot_method_bind , collide_shape : 0 as * mut sys :: godot_method_bind , get_rest_info : 0 as * mut sys :: godot_method_bind , intersect_point : 0 as * mut sys :: godot_method_bind , intersect_ray : 0 as * mut sys :: godot_method_bind , intersect_shape : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PhysicsDirectSpaceStateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PhysicsDirectSpaceState\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . cast_motion = (gd_api . godot_method_bind_get_method) (class_name , "cast_motion\0" . as_ptr () as * const c_char) ; table . collide_shape = (gd_api . godot_method_bind_get_method) (class_name , "collide_shape\0" . as_ptr () as * const c_char) ; table . get_rest_info = (gd_api . godot_method_bind_get_method) (class_name , "get_rest_info\0" . as_ptr () as * const c_char) ; table . intersect_point = (gd_api . godot_method_bind_get_method) (class_name , "intersect_point\0" . as_ptr () as * const c_char) ; table . intersect_ray = (gd_api . godot_method_bind_get_method) (class_name , "intersect_ray\0" . as_ptr () as * const c_char) ; table . intersect_shape = (gd_api . godot_method_bind_get_method) (class_name , "intersect_shape\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::physics_direct_space_state::private::PhysicsDirectSpaceState;
            
            pub(crate) mod physics_material {
                # ! [doc = "This module contains types related to the API class [`PhysicsMaterial`][super::PhysicsMaterial]."] pub (crate) mod private { # [doc = "`core class PhysicsMaterial` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_physicsmaterial.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPhysicsMaterial inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PhysicsMaterial { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PhysicsMaterial ; impl PhysicsMaterial { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PhysicsMaterialMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness)."] # [doc = ""] # [inline] pub fn bounce (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . get_bounce ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body's friction. Values range from `0` (frictionless) to `1` (maximum friction)."] # [doc = ""] # [inline] pub fn friction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . get_friction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, subtracts the bounciness from the colliding object's bounciness instead of adding it."] # [doc = ""] # [inline] pub fn is_absorbent (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . is_absorbent ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the physics engine will use the friction of the object marked as \"rough\" when two objects collide. If `false`, the physics engine will use the lowest friction of all colliding objects instead. If `true` for both colliding objects, the physics engine will use the highest friction."] # [doc = ""] # [inline] pub fn is_rough (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . is_rough ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, subtracts the bounciness from the colliding object's bounciness instead of adding it."] # [doc = ""] # [inline] pub fn set_absorbent (& self , absorbent : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . set_absorbent ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , absorbent as _) ; } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness)."] # [doc = ""] # [inline] pub fn set_bounce (& self , bounce : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . set_bounce ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , bounce as _) ; } } # [doc = "The body's friction. Values range from `0` (frictionless) to `1` (maximum friction)."] # [doc = ""] # [inline] pub fn set_friction (& self , friction : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . set_friction ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , friction as _) ; } } # [doc = "If `true`, the physics engine will use the friction of the object marked as \"rough\" when two objects collide. If `false`, the physics engine will use the lowest friction of all colliding objects instead. If `true` for both colliding objects, the physics engine will use the highest friction."] # [doc = ""] # [inline] pub fn set_rough (& self , rough : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsMaterialMethodTable :: get (get_api ()) . set_rough ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , rough as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsMaterial { } unsafe impl GodotObject for PhysicsMaterial { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PhysicsMaterial" } } impl std :: ops :: Deref for PhysicsMaterial { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsMaterial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for PhysicsMaterial { } unsafe impl SubClass < crate :: generated :: Reference > for PhysicsMaterial { } unsafe impl SubClass < crate :: generated :: Object > for PhysicsMaterial { } impl Instanciable for PhysicsMaterial { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PhysicsMaterial :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PhysicsMaterialMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bounce : * mut sys :: godot_method_bind , pub get_friction : * mut sys :: godot_method_bind , pub is_absorbent : * mut sys :: godot_method_bind , pub is_rough : * mut sys :: godot_method_bind , pub set_absorbent : * mut sys :: godot_method_bind , pub set_bounce : * mut sys :: godot_method_bind , pub set_friction : * mut sys :: godot_method_bind , pub set_rough : * mut sys :: godot_method_bind } impl PhysicsMaterialMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PhysicsMaterialMethodTable = PhysicsMaterialMethodTable { class_constructor : None , get_bounce : 0 as * mut sys :: godot_method_bind , get_friction : 0 as * mut sys :: godot_method_bind , is_absorbent : 0 as * mut sys :: godot_method_bind , is_rough : 0 as * mut sys :: godot_method_bind , set_absorbent : 0 as * mut sys :: godot_method_bind , set_bounce : 0 as * mut sys :: godot_method_bind , set_friction : 0 as * mut sys :: godot_method_bind , set_rough : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PhysicsMaterialMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PhysicsMaterial\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\0" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\0" . as_ptr () as * const c_char) ; table . is_absorbent = (gd_api . godot_method_bind_get_method) (class_name , "is_absorbent\0" . as_ptr () as * const c_char) ; table . is_rough = (gd_api . godot_method_bind_get_method) (class_name , "is_rough\0" . as_ptr () as * const c_char) ; table . set_absorbent = (gd_api . godot_method_bind_get_method) (class_name , "set_absorbent\0" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\0" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\0" . as_ptr () as * const c_char) ; table . set_rough = (gd_api . godot_method_bind_get_method) (class_name , "set_rough\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::physics_material::private::PhysicsMaterial;
            
            pub mod physics_server {
                # ! [doc = "This module contains types related to the API class [`PhysicsServer`][super::PhysicsServer]."] pub (crate) mod private { # [doc = "`core singleton class PhysicsServer` inherits `Object` (manually managed).\n\nThis class has related types in the [`physics_server`][super::physics_server] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_physicsserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nPhysicsServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PhysicsServer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PhysicsServer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AreaBodyStatus (pub i64) ; impl AreaBodyStatus { pub const ADDED : AreaBodyStatus = AreaBodyStatus (0i64) ; pub const REMOVED : AreaBodyStatus = AreaBodyStatus (1i64) ; } impl From < i64 > for AreaBodyStatus { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AreaBodyStatus > for i64 { # [inline] fn from (v : AreaBodyStatus) -> Self { v . 0 } } impl FromVariant for AreaBodyStatus { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AreaParameter (pub i64) ; impl AreaParameter { pub const GRAVITY : AreaParameter = AreaParameter (0i64) ; pub const GRAVITY_VECTOR : AreaParameter = AreaParameter (1i64) ; pub const GRAVITY_IS_POINT : AreaParameter = AreaParameter (2i64) ; pub const GRAVITY_DISTANCE_SCALE : AreaParameter = AreaParameter (3i64) ; pub const GRAVITY_POINT_ATTENUATION : AreaParameter = AreaParameter (4i64) ; pub const LINEAR_DAMP : AreaParameter = AreaParameter (5i64) ; pub const ANGULAR_DAMP : AreaParameter = AreaParameter (6i64) ; pub const PRIORITY : AreaParameter = AreaParameter (7i64) ; } impl From < i64 > for AreaParameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AreaParameter > for i64 { # [inline] fn from (v : AreaParameter) -> Self { v . 0 } } impl FromVariant for AreaParameter { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AreaSpaceOverrideMode (pub i64) ; impl AreaSpaceOverrideMode { pub const DISABLED : AreaSpaceOverrideMode = AreaSpaceOverrideMode (0i64) ; pub const COMBINE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (1i64) ; pub const COMBINE_REPLACE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (2i64) ; pub const REPLACE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (3i64) ; pub const REPLACE_COMBINE : AreaSpaceOverrideMode = AreaSpaceOverrideMode (4i64) ; } impl From < i64 > for AreaSpaceOverrideMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AreaSpaceOverrideMode > for i64 { # [inline] fn from (v : AreaSpaceOverrideMode) -> Self { v . 0 } } impl FromVariant for AreaSpaceOverrideMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BodyAxis (pub i64) ; impl BodyAxis { pub const LINEAR_X : BodyAxis = BodyAxis (1i64) ; pub const LINEAR_Y : BodyAxis = BodyAxis (2i64) ; pub const LINEAR_Z : BodyAxis = BodyAxis (4i64) ; pub const ANGULAR_X : BodyAxis = BodyAxis (8i64) ; pub const ANGULAR_Y : BodyAxis = BodyAxis (16i64) ; pub const ANGULAR_Z : BodyAxis = BodyAxis (32i64) ; } impl From < i64 > for BodyAxis { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BodyAxis > for i64 { # [inline] fn from (v : BodyAxis) -> Self { v . 0 } } impl FromVariant for BodyAxis { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BodyMode (pub i64) ; impl BodyMode { pub const STATIC : BodyMode = BodyMode (0i64) ; pub const KINEMATIC : BodyMode = BodyMode (1i64) ; pub const RIGID : BodyMode = BodyMode (2i64) ; pub const CHARACTER : BodyMode = BodyMode (3i64) ; } impl From < i64 > for BodyMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BodyMode > for i64 { # [inline] fn from (v : BodyMode) -> Self { v . 0 } } impl FromVariant for BodyMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BodyParameter (pub i64) ; impl BodyParameter { pub const BOUNCE : BodyParameter = BodyParameter (0i64) ; pub const FRICTION : BodyParameter = BodyParameter (1i64) ; pub const MASS : BodyParameter = BodyParameter (2i64) ; pub const GRAVITY_SCALE : BodyParameter = BodyParameter (3i64) ; pub const LINEAR_DAMP : BodyParameter = BodyParameter (4i64) ; pub const ANGULAR_DAMP : BodyParameter = BodyParameter (5i64) ; pub const MAX : BodyParameter = BodyParameter (6i64) ; } impl From < i64 > for BodyParameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BodyParameter > for i64 { # [inline] fn from (v : BodyParameter) -> Self { v . 0 } } impl FromVariant for BodyParameter { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BodyState (pub i64) ; impl BodyState { pub const TRANSFORM : BodyState = BodyState (0i64) ; pub const LINEAR_VELOCITY : BodyState = BodyState (1i64) ; pub const ANGULAR_VELOCITY : BodyState = BodyState (2i64) ; pub const SLEEPING : BodyState = BodyState (3i64) ; pub const CAN_SLEEP : BodyState = BodyState (4i64) ; } impl From < i64 > for BodyState { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BodyState > for i64 { # [inline] fn from (v : BodyState) -> Self { v . 0 } } impl FromVariant for BodyState { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ConeTwistJointParam (pub i64) ; impl ConeTwistJointParam { pub const SWING_SPAN : ConeTwistJointParam = ConeTwistJointParam (0i64) ; pub const TWIST_SPAN : ConeTwistJointParam = ConeTwistJointParam (1i64) ; pub const BIAS : ConeTwistJointParam = ConeTwistJointParam (2i64) ; pub const SOFTNESS : ConeTwistJointParam = ConeTwistJointParam (3i64) ; pub const RELAXATION : ConeTwistJointParam = ConeTwistJointParam (4i64) ; } impl From < i64 > for ConeTwistJointParam { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ConeTwistJointParam > for i64 { # [inline] fn from (v : ConeTwistJointParam) -> Self { v . 0 } } impl FromVariant for ConeTwistJointParam { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct G6dofJointAxisFlag (pub i64) ; impl G6dofJointAxisFlag { pub const LINEAR_LIMIT : G6dofJointAxisFlag = G6dofJointAxisFlag (0i64) ; pub const ANGULAR_LIMIT : G6dofJointAxisFlag = G6dofJointAxisFlag (1i64) ; pub const MOTOR : G6dofJointAxisFlag = G6dofJointAxisFlag (4i64) ; pub const LINEAR_MOTOR : G6dofJointAxisFlag = G6dofJointAxisFlag (5i64) ; } impl From < i64 > for G6dofJointAxisFlag { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < G6dofJointAxisFlag > for i64 { # [inline] fn from (v : G6dofJointAxisFlag) -> Self { v . 0 } } impl FromVariant for G6dofJointAxisFlag { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct G6dofJointAxisParam (pub i64) ; impl G6dofJointAxisParam { pub const LINEAR_LOWER_LIMIT : G6dofJointAxisParam = G6dofJointAxisParam (0i64) ; pub const LINEAR_UPPER_LIMIT : G6dofJointAxisParam = G6dofJointAxisParam (1i64) ; pub const LINEAR_LIMIT_SOFTNESS : G6dofJointAxisParam = G6dofJointAxisParam (2i64) ; pub const LINEAR_RESTITUTION : G6dofJointAxisParam = G6dofJointAxisParam (3i64) ; pub const LINEAR_DAMPING : G6dofJointAxisParam = G6dofJointAxisParam (4i64) ; pub const LINEAR_MOTOR_TARGET_VELOCITY : G6dofJointAxisParam = G6dofJointAxisParam (5i64) ; pub const LINEAR_MOTOR_FORCE_LIMIT : G6dofJointAxisParam = G6dofJointAxisParam (6i64) ; pub const ANGULAR_LOWER_LIMIT : G6dofJointAxisParam = G6dofJointAxisParam (10i64) ; pub const ANGULAR_UPPER_LIMIT : G6dofJointAxisParam = G6dofJointAxisParam (11i64) ; pub const ANGULAR_LIMIT_SOFTNESS : G6dofJointAxisParam = G6dofJointAxisParam (12i64) ; pub const ANGULAR_DAMPING : G6dofJointAxisParam = G6dofJointAxisParam (13i64) ; pub const ANGULAR_RESTITUTION : G6dofJointAxisParam = G6dofJointAxisParam (14i64) ; pub const ANGULAR_FORCE_LIMIT : G6dofJointAxisParam = G6dofJointAxisParam (15i64) ; pub const ANGULAR_ERP : G6dofJointAxisParam = G6dofJointAxisParam (16i64) ; pub const ANGULAR_MOTOR_TARGET_VELOCITY : G6dofJointAxisParam = G6dofJointAxisParam (17i64) ; pub const ANGULAR_MOTOR_FORCE_LIMIT : G6dofJointAxisParam = G6dofJointAxisParam (18i64) ; } impl From < i64 > for G6dofJointAxisParam { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < G6dofJointAxisParam > for i64 { # [inline] fn from (v : G6dofJointAxisParam) -> Self { v . 0 } } impl FromVariant for G6dofJointAxisParam { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct HingeJointFlag (pub i64) ; impl HingeJointFlag { pub const USE_LIMIT : HingeJointFlag = HingeJointFlag (0i64) ; pub const ENABLE_MOTOR : HingeJointFlag = HingeJointFlag (1i64) ; } impl From < i64 > for HingeJointFlag { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < HingeJointFlag > for i64 { # [inline] fn from (v : HingeJointFlag) -> Self { v . 0 } } impl FromVariant for HingeJointFlag { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct HingeJointParam (pub i64) ; impl HingeJointParam { pub const BIAS : HingeJointParam = HingeJointParam (0i64) ; pub const LIMIT_UPPER : HingeJointParam = HingeJointParam (1i64) ; pub const LIMIT_LOWER : HingeJointParam = HingeJointParam (2i64) ; pub const LIMIT_BIAS : HingeJointParam = HingeJointParam (3i64) ; pub const LIMIT_SOFTNESS : HingeJointParam = HingeJointParam (4i64) ; pub const LIMIT_RELAXATION : HingeJointParam = HingeJointParam (5i64) ; pub const MOTOR_TARGET_VELOCITY : HingeJointParam = HingeJointParam (6i64) ; pub const MOTOR_MAX_IMPULSE : HingeJointParam = HingeJointParam (7i64) ; } impl From < i64 > for HingeJointParam { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < HingeJointParam > for i64 { # [inline] fn from (v : HingeJointParam) -> Self { v . 0 } } impl FromVariant for HingeJointParam { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct JointType (pub i64) ; impl JointType { pub const PIN : JointType = JointType (0i64) ; pub const HINGE : JointType = JointType (1i64) ; pub const SLIDER : JointType = JointType (2i64) ; pub const CONE_TWIST : JointType = JointType (3i64) ; pub const _6DOF : JointType = JointType (4i64) ; } impl From < i64 > for JointType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < JointType > for i64 { # [inline] fn from (v : JointType) -> Self { v . 0 } } impl FromVariant for JointType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PinJointParam (pub i64) ; impl PinJointParam { pub const BIAS : PinJointParam = PinJointParam (0i64) ; pub const DAMPING : PinJointParam = PinJointParam (1i64) ; pub const IMPULSE_CLAMP : PinJointParam = PinJointParam (2i64) ; } impl From < i64 > for PinJointParam { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PinJointParam > for i64 { # [inline] fn from (v : PinJointParam) -> Self { v . 0 } } impl FromVariant for PinJointParam { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ProcessInfo (pub i64) ; impl ProcessInfo { pub const ACTIVE_OBJECTS : ProcessInfo = ProcessInfo (0i64) ; pub const COLLISION_PAIRS : ProcessInfo = ProcessInfo (1i64) ; pub const ISLAND_COUNT : ProcessInfo = ProcessInfo (2i64) ; } impl From < i64 > for ProcessInfo { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ProcessInfo > for i64 { # [inline] fn from (v : ProcessInfo) -> Self { v . 0 } } impl FromVariant for ProcessInfo { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShapeType (pub i64) ; impl ShapeType { pub const PLANE : ShapeType = ShapeType (0i64) ; pub const RAY : ShapeType = ShapeType (1i64) ; pub const SPHERE : ShapeType = ShapeType (2i64) ; pub const BOX : ShapeType = ShapeType (3i64) ; pub const CAPSULE : ShapeType = ShapeType (4i64) ; pub const CYLINDER : ShapeType = ShapeType (5i64) ; pub const CONVEX_POLYGON : ShapeType = ShapeType (6i64) ; pub const CONCAVE_POLYGON : ShapeType = ShapeType (7i64) ; pub const HEIGHTMAP : ShapeType = ShapeType (8i64) ; pub const CUSTOM : ShapeType = ShapeType (9i64) ; } impl From < i64 > for ShapeType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShapeType > for i64 { # [inline] fn from (v : ShapeType) -> Self { v . 0 } } impl FromVariant for ShapeType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SliderJointParam (pub i64) ; impl SliderJointParam { pub const LINEAR_LIMIT_UPPER : SliderJointParam = SliderJointParam (0i64) ; pub const LINEAR_LIMIT_LOWER : SliderJointParam = SliderJointParam (1i64) ; pub const LINEAR_LIMIT_SOFTNESS : SliderJointParam = SliderJointParam (2i64) ; pub const LINEAR_LIMIT_RESTITUTION : SliderJointParam = SliderJointParam (3i64) ; pub const LINEAR_LIMIT_DAMPING : SliderJointParam = SliderJointParam (4i64) ; pub const LINEAR_MOTION_SOFTNESS : SliderJointParam = SliderJointParam (5i64) ; pub const LINEAR_MOTION_RESTITUTION : SliderJointParam = SliderJointParam (6i64) ; pub const LINEAR_MOTION_DAMPING : SliderJointParam = SliderJointParam (7i64) ; pub const LINEAR_ORTHOGONAL_SOFTNESS : SliderJointParam = SliderJointParam (8i64) ; pub const LINEAR_ORTHOGONAL_RESTITUTION : SliderJointParam = SliderJointParam (9i64) ; pub const LINEAR_ORTHOGONAL_DAMPING : SliderJointParam = SliderJointParam (10i64) ; pub const ANGULAR_LIMIT_UPPER : SliderJointParam = SliderJointParam (11i64) ; pub const ANGULAR_LIMIT_LOWER : SliderJointParam = SliderJointParam (12i64) ; pub const ANGULAR_LIMIT_SOFTNESS : SliderJointParam = SliderJointParam (13i64) ; pub const ANGULAR_LIMIT_RESTITUTION : SliderJointParam = SliderJointParam (14i64) ; pub const ANGULAR_LIMIT_DAMPING : SliderJointParam = SliderJointParam (15i64) ; pub const ANGULAR_MOTION_SOFTNESS : SliderJointParam = SliderJointParam (16i64) ; pub const ANGULAR_MOTION_RESTITUTION : SliderJointParam = SliderJointParam (17i64) ; pub const ANGULAR_MOTION_DAMPING : SliderJointParam = SliderJointParam (18i64) ; pub const ANGULAR_ORTHOGONAL_SOFTNESS : SliderJointParam = SliderJointParam (19i64) ; pub const ANGULAR_ORTHOGONAL_RESTITUTION : SliderJointParam = SliderJointParam (20i64) ; pub const ANGULAR_ORTHOGONAL_DAMPING : SliderJointParam = SliderJointParam (21i64) ; pub const MAX : SliderJointParam = SliderJointParam (22i64) ; } impl From < i64 > for SliderJointParam { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SliderJointParam > for i64 { # [inline] fn from (v : SliderJointParam) -> Self { v . 0 } } impl FromVariant for SliderJointParam { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SpaceParameter (pub i64) ; impl SpaceParameter { pub const CONTACT_RECYCLE_RADIUS : SpaceParameter = SpaceParameter (0i64) ; pub const CONTACT_MAX_SEPARATION : SpaceParameter = SpaceParameter (1i64) ; pub const BODY_MAX_ALLOWED_PENETRATION : SpaceParameter = SpaceParameter (2i64) ; pub const BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD : SpaceParameter = SpaceParameter (3i64) ; pub const BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD : SpaceParameter = SpaceParameter (4i64) ; pub const BODY_TIME_TO_SLEEP : SpaceParameter = SpaceParameter (5i64) ; pub const BODY_ANGULAR_VELOCITY_DAMP_RATIO : SpaceParameter = SpaceParameter (6i64) ; pub const CONSTRAINT_DEFAULT_BIAS : SpaceParameter = SpaceParameter (7i64) ; } impl From < i64 > for SpaceParameter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SpaceParameter > for i64 { # [inline] fn from (v : SpaceParameter) -> Self { v . 0 } } impl FromVariant for SpaceParameter { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl PhysicsServer { pub const AREA_BODY_ADDED : i64 = 0i64 ; pub const AREA_PARAM_GRAVITY : i64 = 0i64 ; pub const AREA_SPACE_OVERRIDE_DISABLED : i64 = 0i64 ; pub const BODY_MODE_STATIC : i64 = 0i64 ; pub const BODY_PARAM_BOUNCE : i64 = 0i64 ; pub const BODY_STATE_TRANSFORM : i64 = 0i64 ; pub const CONE_TWIST_JOINT_SWING_SPAN : i64 = 0i64 ; pub const G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT : i64 = 0i64 ; pub const G6DOF_JOINT_LINEAR_LOWER_LIMIT : i64 = 0i64 ; pub const HINGE_JOINT_BIAS : i64 = 0i64 ; pub const HINGE_JOINT_FLAG_USE_LIMIT : i64 = 0i64 ; pub const INFO_ACTIVE_OBJECTS : i64 = 0i64 ; pub const JOINT_PIN : i64 = 0i64 ; pub const PIN_JOINT_BIAS : i64 = 0i64 ; pub const SHAPE_PLANE : i64 = 0i64 ; pub const SLIDER_JOINT_LINEAR_LIMIT_UPPER : i64 = 0i64 ; pub const SPACE_PARAM_CONTACT_RECYCLE_RADIUS : i64 = 0i64 ; pub const AREA_BODY_REMOVED : i64 = 1i64 ; pub const AREA_PARAM_GRAVITY_VECTOR : i64 = 1i64 ; pub const AREA_SPACE_OVERRIDE_COMBINE : i64 = 1i64 ; pub const BODY_AXIS_LINEAR_X : i64 = 1i64 ; pub const BODY_MODE_KINEMATIC : i64 = 1i64 ; pub const BODY_PARAM_FRICTION : i64 = 1i64 ; pub const BODY_STATE_LINEAR_VELOCITY : i64 = 1i64 ; pub const CONE_TWIST_JOINT_TWIST_SPAN : i64 = 1i64 ; pub const G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT : i64 = 1i64 ; pub const G6DOF_JOINT_LINEAR_UPPER_LIMIT : i64 = 1i64 ; pub const HINGE_JOINT_FLAG_ENABLE_MOTOR : i64 = 1i64 ; pub const HINGE_JOINT_LIMIT_UPPER : i64 = 1i64 ; pub const INFO_COLLISION_PAIRS : i64 = 1i64 ; pub const JOINT_HINGE : i64 = 1i64 ; pub const PIN_JOINT_DAMPING : i64 = 1i64 ; pub const SHAPE_RAY : i64 = 1i64 ; pub const SLIDER_JOINT_LINEAR_LIMIT_LOWER : i64 = 1i64 ; pub const SPACE_PARAM_CONTACT_MAX_SEPARATION : i64 = 1i64 ; pub const AREA_PARAM_GRAVITY_IS_POINT : i64 = 2i64 ; pub const AREA_SPACE_OVERRIDE_COMBINE_REPLACE : i64 = 2i64 ; pub const BODY_AXIS_LINEAR_Y : i64 = 2i64 ; pub const BODY_MODE_RIGID : i64 = 2i64 ; pub const BODY_PARAM_MASS : i64 = 2i64 ; pub const BODY_STATE_ANGULAR_VELOCITY : i64 = 2i64 ; pub const CONE_TWIST_JOINT_BIAS : i64 = 2i64 ; pub const G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS : i64 = 2i64 ; pub const HINGE_JOINT_LIMIT_LOWER : i64 = 2i64 ; pub const INFO_ISLAND_COUNT : i64 = 2i64 ; pub const JOINT_SLIDER : i64 = 2i64 ; pub const PIN_JOINT_IMPULSE_CLAMP : i64 = 2i64 ; pub const SHAPE_SPHERE : i64 = 2i64 ; pub const SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS : i64 = 2i64 ; pub const SPACE_PARAM_BODY_MAX_ALLOWED_PENETRATION : i64 = 2i64 ; pub const AREA_PARAM_GRAVITY_DISTANCE_SCALE : i64 = 3i64 ; pub const AREA_SPACE_OVERRIDE_REPLACE : i64 = 3i64 ; pub const BODY_MODE_CHARACTER : i64 = 3i64 ; pub const BODY_PARAM_GRAVITY_SCALE : i64 = 3i64 ; pub const BODY_STATE_SLEEPING : i64 = 3i64 ; pub const CONE_TWIST_JOINT_SOFTNESS : i64 = 3i64 ; pub const G6DOF_JOINT_LINEAR_RESTITUTION : i64 = 3i64 ; pub const HINGE_JOINT_LIMIT_BIAS : i64 = 3i64 ; pub const JOINT_CONE_TWIST : i64 = 3i64 ; pub const SHAPE_BOX : i64 = 3i64 ; pub const SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION : i64 = 3i64 ; pub const SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD : i64 = 3i64 ; pub const AREA_PARAM_GRAVITY_POINT_ATTENUATION : i64 = 4i64 ; pub const AREA_SPACE_OVERRIDE_REPLACE_COMBINE : i64 = 4i64 ; pub const BODY_AXIS_LINEAR_Z : i64 = 4i64 ; pub const BODY_PARAM_LINEAR_DAMP : i64 = 4i64 ; pub const BODY_STATE_CAN_SLEEP : i64 = 4i64 ; pub const CONE_TWIST_JOINT_RELAXATION : i64 = 4i64 ; pub const G6DOF_JOINT_FLAG_ENABLE_MOTOR : i64 = 4i64 ; pub const G6DOF_JOINT_LINEAR_DAMPING : i64 = 4i64 ; pub const HINGE_JOINT_LIMIT_SOFTNESS : i64 = 4i64 ; pub const JOINT_6DOF : i64 = 4i64 ; pub const SHAPE_CAPSULE : i64 = 4i64 ; pub const SLIDER_JOINT_LINEAR_LIMIT_DAMPING : i64 = 4i64 ; pub const SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD : i64 = 4i64 ; pub const AREA_PARAM_LINEAR_DAMP : i64 = 5i64 ; pub const BODY_PARAM_ANGULAR_DAMP : i64 = 5i64 ; pub const G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR : i64 = 5i64 ; pub const G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY : i64 = 5i64 ; pub const HINGE_JOINT_LIMIT_RELAXATION : i64 = 5i64 ; pub const SHAPE_CYLINDER : i64 = 5i64 ; pub const SLIDER_JOINT_LINEAR_MOTION_SOFTNESS : i64 = 5i64 ; pub const SPACE_PARAM_BODY_TIME_TO_SLEEP : i64 = 5i64 ; pub const AREA_PARAM_ANGULAR_DAMP : i64 = 6i64 ; pub const BODY_PARAM_MAX : i64 = 6i64 ; pub const G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT : i64 = 6i64 ; pub const HINGE_JOINT_MOTOR_TARGET_VELOCITY : i64 = 6i64 ; pub const SHAPE_CONVEX_POLYGON : i64 = 6i64 ; pub const SLIDER_JOINT_LINEAR_MOTION_RESTITUTION : i64 = 6i64 ; pub const SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO : i64 = 6i64 ; pub const AREA_PARAM_PRIORITY : i64 = 7i64 ; pub const HINGE_JOINT_MOTOR_MAX_IMPULSE : i64 = 7i64 ; pub const SHAPE_CONCAVE_POLYGON : i64 = 7i64 ; pub const SLIDER_JOINT_LINEAR_MOTION_DAMPING : i64 = 7i64 ; pub const SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS : i64 = 7i64 ; pub const BODY_AXIS_ANGULAR_X : i64 = 8i64 ; pub const SHAPE_HEIGHTMAP : i64 = 8i64 ; pub const SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS : i64 = 8i64 ; pub const SHAPE_CUSTOM : i64 = 9i64 ; pub const SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION : i64 = 9i64 ; pub const G6DOF_JOINT_ANGULAR_LOWER_LIMIT : i64 = 10i64 ; pub const SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING : i64 = 10i64 ; pub const G6DOF_JOINT_ANGULAR_UPPER_LIMIT : i64 = 11i64 ; pub const SLIDER_JOINT_ANGULAR_LIMIT_UPPER : i64 = 11i64 ; pub const G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS : i64 = 12i64 ; pub const SLIDER_JOINT_ANGULAR_LIMIT_LOWER : i64 = 12i64 ; pub const G6DOF_JOINT_ANGULAR_DAMPING : i64 = 13i64 ; pub const SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS : i64 = 13i64 ; pub const G6DOF_JOINT_ANGULAR_RESTITUTION : i64 = 14i64 ; pub const SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION : i64 = 14i64 ; pub const G6DOF_JOINT_ANGULAR_FORCE_LIMIT : i64 = 15i64 ; pub const SLIDER_JOINT_ANGULAR_LIMIT_DAMPING : i64 = 15i64 ; pub const BODY_AXIS_ANGULAR_Y : i64 = 16i64 ; pub const G6DOF_JOINT_ANGULAR_ERP : i64 = 16i64 ; pub const SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS : i64 = 16i64 ; pub const G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY : i64 = 17i64 ; pub const SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION : i64 = 17i64 ; pub const G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT : i64 = 18i64 ; pub const SLIDER_JOINT_ANGULAR_MOTION_DAMPING : i64 = 18i64 ; pub const SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS : i64 = 19i64 ; pub const SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION : i64 = 20i64 ; pub const SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING : i64 = 21i64 ; pub const SLIDER_JOINT_MAX : i64 = 22i64 ; pub const BODY_AXIS_ANGULAR_Z : i64 = 32i64 ; } impl PhysicsServer { # [doc = "Returns a reference to the singleton instance.\n\n# Safety\n\nThis singleton server is only safe to access from outside the main thread if thread-safe\noperations are enabled in the project settings. See the official\n[thread-safety guidelines][thread-safety] for more information.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [inline] pub unsafe fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("PhysicsServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.\n# Default Arguments\n* `transform` - `Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )`\n* `disabled` - `false`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_add_shape (& self , area : Rid , shape : Rid , transform : Transform , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_add_shape ; let ret = crate :: icalls :: icallvar__rid_rid_trans_bool (method_bind , self . this . sys () . as_ptr () , area , shape , transform , disabled as _) ; } } # [doc = "Assigns the area to a descendant of [`Object`][Object], so it can exist in the node tree."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_attach_object_instance_id (& self , area : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_attach_object_instance_id ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , id as _) ; } } # [doc = "Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_clear_shapes (& self , area : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_clear_shapes ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , area) ; } } # [doc = "Creates an [`Area`][Area]."] # [doc = ""] # [inline] pub fn area_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the instance ID of the object the area is assigned to."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_object_instance_id (& self , area : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_get_object_instance_id ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , area) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an area parameter value. A list of available parameters is on the [`AreaParameter`][AreaParameter] constants."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_param (& self , area : Rid , param : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_get_param ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , param as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`RID`][Rid] of the nth shape of an area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_shape (& self , area : Rid , shape_idx : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_get_shape ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx as _) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of shapes assigned to an area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_shape_count (& self , area : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_get_shape_count ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , area) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the transform matrix of a shape within an area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_shape_transform (& self , area : Rid , shape_idx : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_get_shape_transform ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx as _) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the space assigned to the area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_space (& self , area : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_get_space ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , area) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the space override mode for the area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_space_override_mode (& self , area : Rid) -> crate :: generated :: physics_server :: AreaSpaceOverrideMode { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_get_space_override_mode ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , area) ; < crate :: generated :: physics_server :: AreaSpaceOverrideMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the transform matrix for an area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_get_transform (& self , area : Rid) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_get_transform ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , area) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, area collides with rays."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_is_ray_pickable (& self , area : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_is_ray_pickable ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , area) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes a shape from an area. It does not delete the shape, so it can be reassigned later."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_remove_shape (& self , area : Rid , shape_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_remove_shape ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , shape_idx as _) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_area_monitor_callback (& self , area : Rid , receiver : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_set_area_monitor_callback ; let ret = crate :: icalls :: icallvar__rid_obj_str (method_bind , self . this . sys () . as_ptr () , area , receiver . as_arg_ptr () , method . into ()) ; } } # [doc = "Assigns the area to one or many physics layers."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_collision_layer (& self , area : Rid , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_set_collision_layer ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , layer as _) ; } } # [doc = "Sets which physics layers the area will monitor."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_collision_mask (& self , area : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_set_collision_mask ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , mask as _) ; } } # [doc = "Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:\n1: [`AREA_BODY_ADDED`][Self::AREA_BODY_ADDED] or [`AREA_BODY_REMOVED`][Self::AREA_BODY_REMOVED], depending on whether the object entered or exited the area.\n2: [`RID`][Rid] of the object that entered/exited the area.\n3: Instance ID of the object that entered/exited the area.\n4: The shape index of the object that entered/exited the area.\n5: The shape index of the area where the object entered/exited."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_monitor_callback (& self , area : Rid , receiver : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_set_monitor_callback ; let ret = crate :: icalls :: icallvar__rid_obj_str (method_bind , self . this . sys () . as_ptr () , area , receiver . as_arg_ptr () , method . into ()) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_monitorable (& self , area : Rid , monitorable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_set_monitorable ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , area , monitorable as _) ; } } # [doc = "Sets the value for an area parameter. A list of available parameters is on the [`AreaParameter`][AreaParameter] constants."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_param (& self , area : Rid , param : i64 , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_set_param ; let ret = crate :: icalls :: icallvar__rid_i64_var (method_bind , self . this . sys () . as_ptr () , area , param as _ , value . owned_to_variant ()) ; } } # [doc = "Sets object pickable with rays."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_ray_pickable (& self , area : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_set_ray_pickable ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , area , enable as _) ; } } # [doc = "Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [`RID`][Rid]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_shape (& self , area : Rid , shape_idx : i64 , shape : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_set_shape ; let ret = crate :: icalls :: icallvar__rid_i64_rid (method_bind , self . this . sys () . as_ptr () , area , shape_idx as _ , shape) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_shape_disabled (& self , area : Rid , shape_idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_set_shape_disabled ; let ret = crate :: icalls :: icallvar__rid_i64_bool (method_bind , self . this . sys () . as_ptr () , area , shape_idx as _ , disabled as _) ; } } # [doc = "Sets the transform matrix for an area shape."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_shape_transform (& self , area : Rid , shape_idx : i64 , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_set_shape_transform ; let ret = crate :: icalls :: icallvar__rid_i64_trans (method_bind , self . this . sys () . as_ptr () , area , shape_idx as _ , transform) ; } } # [doc = "Assigns a space to the area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_space (& self , area : Rid , space : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_set_space ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , area , space) ; } } # [doc = "Sets the space override mode for the area. The modes are described in the [`AreaSpaceOverrideMode`][AreaSpaceOverrideMode] constants."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_space_override_mode (& self , area : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_set_space_override_mode ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , area , mode as _) ; } } # [doc = "Sets the transform matrix for an area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn area_set_transform (& self , area : Rid , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . area_set_transform ; let ret = crate :: icalls :: icallvar__rid_trans (method_bind , self . this . sys () . as_ptr () , area , transform) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_add_central_force (& self , body : Rid , force : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_add_central_force ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , body , force) ; } } # [doc = "Adds a body to the list of bodies exempt from collisions."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_add_collision_exception (& self , body : Rid , excepted_body : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_add_collision_exception ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , body , excepted_body) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_add_force (& self , body : Rid , force : Vector3 , position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_add_force ; let ret = crate :: icalls :: icallvar__rid_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , body , force , position) ; } } # [doc = "Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.\n# Default Arguments\n* `transform` - `Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )`\n* `disabled` - `false`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_add_shape (& self , body : Rid , shape : Rid , transform : Transform , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_add_shape ; let ret = crate :: icalls :: icallvar__rid_rid_trans_bool (method_bind , self . this . sys () . as_ptr () , body , shape , transform , disabled as _) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_add_torque (& self , body : Rid , torque : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_add_torque ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , body , torque) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_apply_central_impulse (& self , body : Rid , impulse : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_apply_central_impulse ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , body , impulse) ; } } # [doc = "Gives the body a push at a `position` in the direction of the `impulse`."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_apply_impulse (& self , body : Rid , position : Vector3 , impulse : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_apply_impulse ; let ret = crate :: icalls :: icallvar__rid_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , body , position , impulse) ; } } # [doc = "Gives the body a push to rotate it."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_apply_torque_impulse (& self , body : Rid , impulse : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_apply_torque_impulse ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , body , impulse) ; } } # [doc = "Assigns the area to a descendant of [`Object`][Object], so it can exist in the node tree."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_attach_object_instance_id (& self , body : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_attach_object_instance_id ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , id as _) ; } } # [doc = "Removes all shapes from a body."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_clear_shapes (& self , body : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_clear_shapes ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; } } # [doc = "Creates a physics body. The first parameter can be any value from [`BodyMode`][BodyMode] constants, for the type of body created. Additionally, the body can be created in sleeping state to save processing time.\n# Default Arguments\n* `mode` - `2`\n* `init_sleeping` - `false`"] # [doc = ""] # [inline] pub fn body_create (& self , mode : i64 , init_sleeping : bool) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_create ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , mode as _ , init_sleeping as _) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the physics layer or layers a body belongs to."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_collision_layer (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_get_collision_layer ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the physics layer or layers a body can collide with."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_collision_mask (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_get_collision_mask ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`PhysicsDirectBodyState`][PhysicsDirectBodyState] of the body. Returns `null` if the body is destroyed or removed from the physics space."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_direct_state (& self , body : Rid) -> Option < Ref < crate :: generated :: PhysicsDirectBodyState , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_get_direct_state ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < Option < Ref < crate :: generated :: PhysicsDirectBodyState , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_kinematic_safe_margin (& self , body : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_get_kinematic_safe_margin ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the maximum contacts that can be reported. See [`body_set_max_contacts_reported`][Self::body_set_max_contacts_reported]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_max_contacts_reported (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_get_max_contacts_reported ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the body mode."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_mode (& self , body : Rid) -> crate :: generated :: physics_server :: BodyMode { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_get_mode ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < crate :: generated :: physics_server :: BodyMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the instance ID of the object the area is assigned to."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_object_instance_id (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_get_object_instance_id ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the value of a body parameter. A list of available parameters is on the [`BodyParameter`][BodyParameter] constants."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_param (& self , body : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_get_param ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`RID`][Rid] of the nth shape of a body."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_shape (& self , body : Rid , shape_idx : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_get_shape ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx as _) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of shapes assigned to a body."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_shape_count (& self , body : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_get_shape_count ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the transform matrix of a body shape."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_shape_transform (& self , body : Rid , shape_idx : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_get_shape_transform ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx as _) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`RID`][Rid] of the space assigned to a body."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_space (& self , body : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_get_space ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a body state."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_get_state (& self , body : Rid , state : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_get_state ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , state as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_is_axis_locked (& self , body : Rid , axis : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_is_axis_locked ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , axis as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the continuous collision detection mode is enabled."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_is_continuous_collision_detection_enabled (& self , body : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_is_continuous_collision_detection_enabled ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether a body uses a callback function to calculate its own physics (see [`body_set_force_integration_callback`][Self::body_set_force_integration_callback])."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_is_omitting_force_integration (& self , body : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_is_omitting_force_integration ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the body can be detected by rays."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_is_ray_pickable (& self , body : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_is_ray_pickable ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , body) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes a body from the list of bodies exempt from collisions.\nContinuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_remove_collision_exception (& self , body : Rid , excepted_body : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_remove_collision_exception ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , body , excepted_body) ; } } # [doc = "Removes a shape from a body. The shape is not deleted, so it can be reused afterwards."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_remove_shape (& self , body : Rid , shape_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_remove_shape ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , shape_idx as _) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_axis_lock (& self , body : Rid , axis : i64 , lock : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_axis_lock ; let ret = crate :: icalls :: icallvar__rid_i64_bool (method_bind , self . this . sys () . as_ptr () , body , axis as _ , lock as _) ; } } # [doc = "Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_axis_velocity (& self , body : Rid , axis_velocity : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_axis_velocity ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , body , axis_velocity) ; } } # [doc = "Sets the physics layer or layers a body belongs to."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_collision_layer (& self , body : Rid , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_collision_layer ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , layer as _) ; } } # [doc = "Sets the physics layer or layers a body can collide with."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_collision_mask (& self , body : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_collision_mask ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mask as _) ; } } # [doc = "If `true`, the continuous collision detection mode is enabled.\nContinuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_enable_continuous_collision_detection (& self , body : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_enable_continuous_collision_detection ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , body , enable as _) ; } } # [doc = "Sets the function used to calculate physics for an object, if that object allows it (see [`body_set_omit_force_integration`][Self::body_set_omit_force_integration]).\n# Default Arguments\n* `userdata` - `null`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_force_integration_callback (& self , body : Rid , receiver : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString > , userdata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_force_integration_callback ; let ret = crate :: icalls :: icallvar__rid_obj_str_var (method_bind , self . this . sys () . as_ptr () , body , receiver . as_arg_ptr () , method . into () , userdata . owned_to_variant ()) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_kinematic_safe_margin (& self , body : Rid , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_kinematic_safe_margin ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , body , margin as _) ; } } # [doc = "Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_max_contacts_reported (& self , body : Rid , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_max_contacts_reported ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , amount as _) ; } } # [doc = "Sets the body mode, from one of the [`BodyMode`][BodyMode] constants."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_mode (& self , body : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_mode ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , body , mode as _) ; } } # [doc = "Sets whether a body uses a callback function to calculate its own physics (see [`body_set_force_integration_callback`][Self::body_set_force_integration_callback])."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_omit_force_integration (& self , body : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_omit_force_integration ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , body , enable as _) ; } } # [doc = "Sets a body parameter. A list of available parameters is on the [`BodyParameter`][BodyParameter] constants."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_param (& self , body : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_param ; let ret = crate :: icalls :: icallvar__rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , body , param as _ , value as _) ; } } # [doc = "Sets the body pickable with rays if `enabled` is set."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_ray_pickable (& self , body : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_ray_pickable ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , body , enable as _) ; } } # [doc = "Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [`RID`][Rid]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_shape (& self , body : Rid , shape_idx : i64 , shape : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_shape ; let ret = crate :: icalls :: icallvar__rid_i64_rid (method_bind , self . this . sys () . as_ptr () , body , shape_idx as _ , shape) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_shape_disabled (& self , body : Rid , shape_idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_shape_disabled ; let ret = crate :: icalls :: icallvar__rid_i64_bool (method_bind , self . this . sys () . as_ptr () , body , shape_idx as _ , disabled as _) ; } } # [doc = "Sets the transform matrix for a body shape."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_shape_transform (& self , body : Rid , shape_idx : i64 , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_shape_transform ; let ret = crate :: icalls :: icallvar__rid_i64_trans (method_bind , self . this . sys () . as_ptr () , body , shape_idx as _ , transform) ; } } # [doc = "Assigns a space to the body (see [`space_create`][Self::space_create])."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_space (& self , body : Rid , space : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_space ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , body , space) ; } } # [doc = "Sets a body state (see [`BodyState`][BodyState] constants)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_set_state (& self , body : Rid , state : i64 , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_set_state ; let ret = crate :: icalls :: icallvar__rid_i64_var (method_bind , self . this . sys () . as_ptr () , body , state as _ , value . owned_to_variant ()) ; } } # [doc = "Returns `true` if a collision would result from moving in the given direction from a given point in space. [`PhysicsTestMotionResult`][PhysicsTestMotionResult] can be passed to return additional information in.\n# Default Arguments\n* `result` - `null`\n* `exclude_raycast_shapes` - `true`\n* `exclude` - `[  ]`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn body_test_motion (& self , body : Rid , from : Transform , motion : Vector3 , infinite_inertia : bool , result : impl AsArg < crate :: generated :: PhysicsTestMotionResult > , exclude_raycast_shapes : bool , exclude : VariantArray) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . body_test_motion ; let ret = crate :: icalls :: icallvar__rid_trans_vec3_bool_obj_bool_arr (method_bind , self . this . sys () . as_ptr () , body , from , motion , infinite_inertia as _ , result . as_arg_ptr () , exclude_raycast_shapes as _ , exclude) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Gets a cone_twist_joint parameter (see [`ConeTwistJointParam`][ConeTwistJointParam] constants)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn cone_twist_joint_get_param (& self , joint : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . cone_twist_joint_get_param ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets a cone_twist_joint parameter (see [`ConeTwistJointParam`][ConeTwistJointParam] constants)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn cone_twist_joint_set_param (& self , joint : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . cone_twist_joint_set_param ; let ret = crate :: icalls :: icallvar__rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param as _ , value as _) ; } } # [doc = "Destroys any of the objects created by PhysicsServer. If the [`RID`][Rid] passed is not one of the objects that can be created by PhysicsServer, an error will be sent to the console."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn free_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . free_rid ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Gets a generic_6_DOF_joint flag (see [`G6DOFJointAxisFlag`][G6dofJointAxisFlag] constants)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn generic_6dof_joint_get_flag (& self , joint : Rid , axis : i64 , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . generic_6dof_joint_get_flag ; let ret = crate :: icalls :: icallvar__rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , joint , axis as _ , flag as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Gets a generic_6_DOF_joint parameter (see [`G6DOFJointAxisParam`][G6dofJointAxisParam] constants)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn generic_6dof_joint_get_param (& self , joint : Rid , axis : i64 , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . generic_6dof_joint_get_param ; let ret = crate :: icalls :: icallvar__rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , joint , axis as _ , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets a generic_6_DOF_joint flag (see [`G6DOFJointAxisFlag`][G6dofJointAxisFlag] constants)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn generic_6dof_joint_set_flag (& self , joint : Rid , axis : i64 , flag : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . generic_6dof_joint_set_flag ; let ret = crate :: icalls :: icallvar__rid_i64_i64_bool (method_bind , self . this . sys () . as_ptr () , joint , axis as _ , flag as _ , enable as _) ; } } # [doc = "Sets a generic_6_DOF_joint parameter (see [`G6DOFJointAxisParam`][G6dofJointAxisParam] constants)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn generic_6dof_joint_set_param (& self , joint : Rid , axis : i64 , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . generic_6dof_joint_set_param ; let ret = crate :: icalls :: icallvar__rid_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , axis as _ , param as _ , value as _) ; } } # [doc = "Returns information about the current state of the 3D physics engine. See [`ProcessInfo`][ProcessInfo] for a list of available states. Only implemented for Godot Physics."] # [doc = ""] # [inline] pub fn get_process_info (& self , process_info : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . get_process_info ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , process_info as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets a hinge_joint flag (see [`HingeJointFlag`][HingeJointFlag] constants)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn hinge_joint_get_flag (& self , joint : Rid , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . hinge_joint_get_flag ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , flag as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Gets a hinge_joint parameter (see [`HingeJointParam`][HingeJointParam])."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn hinge_joint_get_param (& self , joint : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . hinge_joint_get_param ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets a hinge_joint flag (see [`HingeJointFlag`][HingeJointFlag] constants)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn hinge_joint_set_flag (& self , joint : Rid , flag : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . hinge_joint_set_flag ; let ret = crate :: icalls :: icallvar__rid_i64_bool (method_bind , self . this . sys () . as_ptr () , joint , flag as _ , enabled as _) ; } } # [doc = "Sets a hinge_joint parameter (see [`HingeJointParam`][HingeJointParam] constants)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn hinge_joint_set_param (& self , joint : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . hinge_joint_set_param ; let ret = crate :: icalls :: icallvar__rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param as _ , value as _) ; } } # [doc = "Creates a [`ConeTwistJoint`][ConeTwistJoint]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn joint_create_cone_twist (& self , body_A : Rid , local_ref_A : Transform , body_B : Rid , local_ref_B : Transform) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . joint_create_cone_twist ; let ret = crate :: icalls :: icallvar__rid_trans_rid_trans (method_bind , self . this . sys () . as_ptr () , body_A , local_ref_A , body_B , local_ref_B) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a [`Generic6DOFJoint`][Generic6DOFJoint]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn joint_create_generic_6dof (& self , body_A : Rid , local_ref_A : Transform , body_B : Rid , local_ref_B : Transform) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . joint_create_generic_6dof ; let ret = crate :: icalls :: icallvar__rid_trans_rid_trans (method_bind , self . this . sys () . as_ptr () , body_A , local_ref_A , body_B , local_ref_B) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a [`HingeJoint`][HingeJoint]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn joint_create_hinge (& self , body_A : Rid , hinge_A : Transform , body_B : Rid , hinge_B : Transform) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . joint_create_hinge ; let ret = crate :: icalls :: icallvar__rid_trans_rid_trans (method_bind , self . this . sys () . as_ptr () , body_A , hinge_A , body_B , hinge_B) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a [`PinJoint`][PinJoint]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn joint_create_pin (& self , body_A : Rid , local_A : Vector3 , body_B : Rid , local_B : Vector3) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . joint_create_pin ; let ret = crate :: icalls :: icallvar__rid_vec3_rid_vec3 (method_bind , self . this . sys () . as_ptr () , body_A , local_A , body_B , local_B) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a [`SliderJoint`][SliderJoint]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn joint_create_slider (& self , body_A : Rid , local_ref_A : Transform , body_B : Rid , local_ref_B : Transform) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . joint_create_slider ; let ret = crate :: icalls :: icallvar__rid_trans_rid_trans (method_bind , self . this . sys () . as_ptr () , body_A , local_ref_A , body_B , local_ref_B) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the priority value of the Joint."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn joint_get_solver_priority (& self , joint : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . joint_get_solver_priority ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , joint) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the type of the Joint."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn joint_get_type (& self , joint : Rid) -> crate :: generated :: physics_server :: JointType { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . joint_get_type ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , joint) ; < crate :: generated :: physics_server :: JointType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the priority value of the Joint."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn joint_set_solver_priority (& self , joint : Rid , priority : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . joint_set_solver_priority ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , priority as _) ; } } # [doc = "Returns position of the joint in the local space of body a of the joint."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn pin_joint_get_local_a (& self , joint : Rid) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . pin_joint_get_local_a ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , joint) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns position of the joint in the local space of body b of the joint."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn pin_joint_get_local_b (& self , joint : Rid) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . pin_joint_get_local_b ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , joint) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets a pin_joint parameter (see [`PinJointParam`][PinJointParam] constants)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn pin_joint_get_param (& self , joint : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . pin_joint_get_param ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets position of the joint in the local space of body a of the joint."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn pin_joint_set_local_a (& self , joint : Rid , local_A : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . pin_joint_set_local_a ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , joint , local_A) ; } } # [doc = "Sets position of the joint in the local space of body b of the joint."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn pin_joint_set_local_b (& self , joint : Rid , local_B : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . pin_joint_set_local_b ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , joint , local_B) ; } } # [doc = "Sets a pin_joint parameter (see [`PinJointParam`][PinJointParam] constants)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn pin_joint_set_param (& self , joint : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . pin_joint_set_param ; let ret = crate :: icalls :: icallvar__rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param as _ , value as _) ; } } # [doc = "Activates or deactivates the 3D physics engine."] # [doc = ""] # [inline] pub fn set_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . set_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , active as _) ; } } # [doc = "Sets the amount of iterations for calculating velocities of colliding bodies. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. The default value is `8`.\n**Note:** Only has an effect when using the GodotPhysics engine, not the default Bullet physics engine."] # [doc = ""] # [inline] pub fn set_collision_iterations (& self , iterations : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . set_collision_iterations ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , iterations as _) ; } } # [doc = "Creates a shape of a type from [`ShapeType`][ShapeType]. Does not assign it to a body or an area. To do so, you must use [`area_set_shape`][Self::area_set_shape] or [`body_set_shape`][Self::body_set_shape]."] # [doc = ""] # [inline] pub fn shape_create (& self , type_ : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . shape_create ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the shape data."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn shape_get_data (& self , shape : Rid) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . shape_get_data ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , shape) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the type of shape (see [`ShapeType`][ShapeType] constants)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn shape_get_type (& self , shape : Rid) -> crate :: generated :: physics_server :: ShapeType { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . shape_get_type ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , shape) ; < crate :: generated :: physics_server :: ShapeType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [`shape_get_type`][Self::shape_get_type]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn shape_set_data (& self , shape : Rid , data : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . shape_set_data ; let ret = crate :: icalls :: icallvar__rid_var (method_bind , self . this . sys () . as_ptr () , shape , data . owned_to_variant ()) ; } } # [doc = "Gets a slider_joint parameter (see [`SliderJointParam`][SliderJointParam] constants)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn slider_joint_get_param (& self , joint : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . slider_joint_get_param ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , joint , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Gets a slider_joint parameter (see [`SliderJointParam`][SliderJointParam] constants)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn slider_joint_set_param (& self , joint : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . slider_joint_set_param ; let ret = crate :: icalls :: icallvar__rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , joint , param as _ , value as _) ; } } # [doc = "Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [`area_set_space`][Self::area_set_space], or to a body with [`body_set_space`][Self::body_set_space]."] # [doc = ""] # [inline] pub fn space_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . space_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the state of a space, a [`PhysicsDirectSpaceState`][PhysicsDirectSpaceState]. This object can be used to make collision/intersection queries."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn space_get_direct_state (& self , space : Rid) -> Option < Ref < crate :: generated :: PhysicsDirectSpaceState , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . space_get_direct_state ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , space) ; < Option < Ref < crate :: generated :: PhysicsDirectSpaceState , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the value of a space parameter."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn space_get_param (& self , space : Rid , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . space_get_param ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , space , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns whether the space is active."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn space_is_active (& self , space : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . space_is_active ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , space) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Marks a space as active. It will not have an effect, unless it is assigned to an area or body."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn space_set_active (& self , space : Rid , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . space_set_active ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , space , active as _) ; } } # [doc = "Sets the value for a space parameter. A list of available parameters is on the [`SpaceParameter`][SpaceParameter] constants."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn space_set_param (& self , space : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsServerMethodTable :: get (get_api ()) . space_set_param ; let ret = crate :: icalls :: icallvar__rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , space , param as _ , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsServer { } unsafe impl GodotObject for PhysicsServer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PhysicsServer" } } impl std :: ops :: Deref for PhysicsServer { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for PhysicsServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PhysicsServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub area_add_shape : * mut sys :: godot_method_bind , pub area_attach_object_instance_id : * mut sys :: godot_method_bind , pub area_clear_shapes : * mut sys :: godot_method_bind , pub area_create : * mut sys :: godot_method_bind , pub area_get_object_instance_id : * mut sys :: godot_method_bind , pub area_get_param : * mut sys :: godot_method_bind , pub area_get_shape : * mut sys :: godot_method_bind , pub area_get_shape_count : * mut sys :: godot_method_bind , pub area_get_shape_transform : * mut sys :: godot_method_bind , pub area_get_space : * mut sys :: godot_method_bind , pub area_get_space_override_mode : * mut sys :: godot_method_bind , pub area_get_transform : * mut sys :: godot_method_bind , pub area_is_ray_pickable : * mut sys :: godot_method_bind , pub area_remove_shape : * mut sys :: godot_method_bind , pub area_set_area_monitor_callback : * mut sys :: godot_method_bind , pub area_set_collision_layer : * mut sys :: godot_method_bind , pub area_set_collision_mask : * mut sys :: godot_method_bind , pub area_set_monitor_callback : * mut sys :: godot_method_bind , pub area_set_monitorable : * mut sys :: godot_method_bind , pub area_set_param : * mut sys :: godot_method_bind , pub area_set_ray_pickable : * mut sys :: godot_method_bind , pub area_set_shape : * mut sys :: godot_method_bind , pub area_set_shape_disabled : * mut sys :: godot_method_bind , pub area_set_shape_transform : * mut sys :: godot_method_bind , pub area_set_space : * mut sys :: godot_method_bind , pub area_set_space_override_mode : * mut sys :: godot_method_bind , pub area_set_transform : * mut sys :: godot_method_bind , pub body_add_central_force : * mut sys :: godot_method_bind , pub body_add_collision_exception : * mut sys :: godot_method_bind , pub body_add_force : * mut sys :: godot_method_bind , pub body_add_shape : * mut sys :: godot_method_bind , pub body_add_torque : * mut sys :: godot_method_bind , pub body_apply_central_impulse : * mut sys :: godot_method_bind , pub body_apply_impulse : * mut sys :: godot_method_bind , pub body_apply_torque_impulse : * mut sys :: godot_method_bind , pub body_attach_object_instance_id : * mut sys :: godot_method_bind , pub body_clear_shapes : * mut sys :: godot_method_bind , pub body_create : * mut sys :: godot_method_bind , pub body_get_collision_layer : * mut sys :: godot_method_bind , pub body_get_collision_mask : * mut sys :: godot_method_bind , pub body_get_direct_state : * mut sys :: godot_method_bind , pub body_get_kinematic_safe_margin : * mut sys :: godot_method_bind , pub body_get_max_contacts_reported : * mut sys :: godot_method_bind , pub body_get_mode : * mut sys :: godot_method_bind , pub body_get_object_instance_id : * mut sys :: godot_method_bind , pub body_get_param : * mut sys :: godot_method_bind , pub body_get_shape : * mut sys :: godot_method_bind , pub body_get_shape_count : * mut sys :: godot_method_bind , pub body_get_shape_transform : * mut sys :: godot_method_bind , pub body_get_space : * mut sys :: godot_method_bind , pub body_get_state : * mut sys :: godot_method_bind , pub body_is_axis_locked : * mut sys :: godot_method_bind , pub body_is_continuous_collision_detection_enabled : * mut sys :: godot_method_bind , pub body_is_omitting_force_integration : * mut sys :: godot_method_bind , pub body_is_ray_pickable : * mut sys :: godot_method_bind , pub body_remove_collision_exception : * mut sys :: godot_method_bind , pub body_remove_shape : * mut sys :: godot_method_bind , pub body_set_axis_lock : * mut sys :: godot_method_bind , pub body_set_axis_velocity : * mut sys :: godot_method_bind , pub body_set_collision_layer : * mut sys :: godot_method_bind , pub body_set_collision_mask : * mut sys :: godot_method_bind , pub body_set_enable_continuous_collision_detection : * mut sys :: godot_method_bind , pub body_set_force_integration_callback : * mut sys :: godot_method_bind , pub body_set_kinematic_safe_margin : * mut sys :: godot_method_bind , pub body_set_max_contacts_reported : * mut sys :: godot_method_bind , pub body_set_mode : * mut sys :: godot_method_bind , pub body_set_omit_force_integration : * mut sys :: godot_method_bind , pub body_set_param : * mut sys :: godot_method_bind , pub body_set_ray_pickable : * mut sys :: godot_method_bind , pub body_set_shape : * mut sys :: godot_method_bind , pub body_set_shape_disabled : * mut sys :: godot_method_bind , pub body_set_shape_transform : * mut sys :: godot_method_bind , pub body_set_space : * mut sys :: godot_method_bind , pub body_set_state : * mut sys :: godot_method_bind , pub body_test_motion : * mut sys :: godot_method_bind , pub cone_twist_joint_get_param : * mut sys :: godot_method_bind , pub cone_twist_joint_set_param : * mut sys :: godot_method_bind , pub free_rid : * mut sys :: godot_method_bind , pub generic_6dof_joint_get_flag : * mut sys :: godot_method_bind , pub generic_6dof_joint_get_param : * mut sys :: godot_method_bind , pub generic_6dof_joint_set_flag : * mut sys :: godot_method_bind , pub generic_6dof_joint_set_param : * mut sys :: godot_method_bind , pub get_process_info : * mut sys :: godot_method_bind , pub hinge_joint_get_flag : * mut sys :: godot_method_bind , pub hinge_joint_get_param : * mut sys :: godot_method_bind , pub hinge_joint_set_flag : * mut sys :: godot_method_bind , pub hinge_joint_set_param : * mut sys :: godot_method_bind , pub joint_create_cone_twist : * mut sys :: godot_method_bind , pub joint_create_generic_6dof : * mut sys :: godot_method_bind , pub joint_create_hinge : * mut sys :: godot_method_bind , pub joint_create_pin : * mut sys :: godot_method_bind , pub joint_create_slider : * mut sys :: godot_method_bind , pub joint_get_solver_priority : * mut sys :: godot_method_bind , pub joint_get_type : * mut sys :: godot_method_bind , pub joint_set_solver_priority : * mut sys :: godot_method_bind , pub pin_joint_get_local_a : * mut sys :: godot_method_bind , pub pin_joint_get_local_b : * mut sys :: godot_method_bind , pub pin_joint_get_param : * mut sys :: godot_method_bind , pub pin_joint_set_local_a : * mut sys :: godot_method_bind , pub pin_joint_set_local_b : * mut sys :: godot_method_bind , pub pin_joint_set_param : * mut sys :: godot_method_bind , pub set_active : * mut sys :: godot_method_bind , pub set_collision_iterations : * mut sys :: godot_method_bind , pub shape_create : * mut sys :: godot_method_bind , pub shape_get_data : * mut sys :: godot_method_bind , pub shape_get_type : * mut sys :: godot_method_bind , pub shape_set_data : * mut sys :: godot_method_bind , pub slider_joint_get_param : * mut sys :: godot_method_bind , pub slider_joint_set_param : * mut sys :: godot_method_bind , pub space_create : * mut sys :: godot_method_bind , pub space_get_direct_state : * mut sys :: godot_method_bind , pub space_get_param : * mut sys :: godot_method_bind , pub space_is_active : * mut sys :: godot_method_bind , pub space_set_active : * mut sys :: godot_method_bind , pub space_set_param : * mut sys :: godot_method_bind } impl PhysicsServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PhysicsServerMethodTable = PhysicsServerMethodTable { class_constructor : None , area_add_shape : 0 as * mut sys :: godot_method_bind , area_attach_object_instance_id : 0 as * mut sys :: godot_method_bind , area_clear_shapes : 0 as * mut sys :: godot_method_bind , area_create : 0 as * mut sys :: godot_method_bind , area_get_object_instance_id : 0 as * mut sys :: godot_method_bind , area_get_param : 0 as * mut sys :: godot_method_bind , area_get_shape : 0 as * mut sys :: godot_method_bind , area_get_shape_count : 0 as * mut sys :: godot_method_bind , area_get_shape_transform : 0 as * mut sys :: godot_method_bind , area_get_space : 0 as * mut sys :: godot_method_bind , area_get_space_override_mode : 0 as * mut sys :: godot_method_bind , area_get_transform : 0 as * mut sys :: godot_method_bind , area_is_ray_pickable : 0 as * mut sys :: godot_method_bind , area_remove_shape : 0 as * mut sys :: godot_method_bind , area_set_area_monitor_callback : 0 as * mut sys :: godot_method_bind , area_set_collision_layer : 0 as * mut sys :: godot_method_bind , area_set_collision_mask : 0 as * mut sys :: godot_method_bind , area_set_monitor_callback : 0 as * mut sys :: godot_method_bind , area_set_monitorable : 0 as * mut sys :: godot_method_bind , area_set_param : 0 as * mut sys :: godot_method_bind , area_set_ray_pickable : 0 as * mut sys :: godot_method_bind , area_set_shape : 0 as * mut sys :: godot_method_bind , area_set_shape_disabled : 0 as * mut sys :: godot_method_bind , area_set_shape_transform : 0 as * mut sys :: godot_method_bind , area_set_space : 0 as * mut sys :: godot_method_bind , area_set_space_override_mode : 0 as * mut sys :: godot_method_bind , area_set_transform : 0 as * mut sys :: godot_method_bind , body_add_central_force : 0 as * mut sys :: godot_method_bind , body_add_collision_exception : 0 as * mut sys :: godot_method_bind , body_add_force : 0 as * mut sys :: godot_method_bind , body_add_shape : 0 as * mut sys :: godot_method_bind , body_add_torque : 0 as * mut sys :: godot_method_bind , body_apply_central_impulse : 0 as * mut sys :: godot_method_bind , body_apply_impulse : 0 as * mut sys :: godot_method_bind , body_apply_torque_impulse : 0 as * mut sys :: godot_method_bind , body_attach_object_instance_id : 0 as * mut sys :: godot_method_bind , body_clear_shapes : 0 as * mut sys :: godot_method_bind , body_create : 0 as * mut sys :: godot_method_bind , body_get_collision_layer : 0 as * mut sys :: godot_method_bind , body_get_collision_mask : 0 as * mut sys :: godot_method_bind , body_get_direct_state : 0 as * mut sys :: godot_method_bind , body_get_kinematic_safe_margin : 0 as * mut sys :: godot_method_bind , body_get_max_contacts_reported : 0 as * mut sys :: godot_method_bind , body_get_mode : 0 as * mut sys :: godot_method_bind , body_get_object_instance_id : 0 as * mut sys :: godot_method_bind , body_get_param : 0 as * mut sys :: godot_method_bind , body_get_shape : 0 as * mut sys :: godot_method_bind , body_get_shape_count : 0 as * mut sys :: godot_method_bind , body_get_shape_transform : 0 as * mut sys :: godot_method_bind , body_get_space : 0 as * mut sys :: godot_method_bind , body_get_state : 0 as * mut sys :: godot_method_bind , body_is_axis_locked : 0 as * mut sys :: godot_method_bind , body_is_continuous_collision_detection_enabled : 0 as * mut sys :: godot_method_bind , body_is_omitting_force_integration : 0 as * mut sys :: godot_method_bind , body_is_ray_pickable : 0 as * mut sys :: godot_method_bind , body_remove_collision_exception : 0 as * mut sys :: godot_method_bind , body_remove_shape : 0 as * mut sys :: godot_method_bind , body_set_axis_lock : 0 as * mut sys :: godot_method_bind , body_set_axis_velocity : 0 as * mut sys :: godot_method_bind , body_set_collision_layer : 0 as * mut sys :: godot_method_bind , body_set_collision_mask : 0 as * mut sys :: godot_method_bind , body_set_enable_continuous_collision_detection : 0 as * mut sys :: godot_method_bind , body_set_force_integration_callback : 0 as * mut sys :: godot_method_bind , body_set_kinematic_safe_margin : 0 as * mut sys :: godot_method_bind , body_set_max_contacts_reported : 0 as * mut sys :: godot_method_bind , body_set_mode : 0 as * mut sys :: godot_method_bind , body_set_omit_force_integration : 0 as * mut sys :: godot_method_bind , body_set_param : 0 as * mut sys :: godot_method_bind , body_set_ray_pickable : 0 as * mut sys :: godot_method_bind , body_set_shape : 0 as * mut sys :: godot_method_bind , body_set_shape_disabled : 0 as * mut sys :: godot_method_bind , body_set_shape_transform : 0 as * mut sys :: godot_method_bind , body_set_space : 0 as * mut sys :: godot_method_bind , body_set_state : 0 as * mut sys :: godot_method_bind , body_test_motion : 0 as * mut sys :: godot_method_bind , cone_twist_joint_get_param : 0 as * mut sys :: godot_method_bind , cone_twist_joint_set_param : 0 as * mut sys :: godot_method_bind , free_rid : 0 as * mut sys :: godot_method_bind , generic_6dof_joint_get_flag : 0 as * mut sys :: godot_method_bind , generic_6dof_joint_get_param : 0 as * mut sys :: godot_method_bind , generic_6dof_joint_set_flag : 0 as * mut sys :: godot_method_bind , generic_6dof_joint_set_param : 0 as * mut sys :: godot_method_bind , get_process_info : 0 as * mut sys :: godot_method_bind , hinge_joint_get_flag : 0 as * mut sys :: godot_method_bind , hinge_joint_get_param : 0 as * mut sys :: godot_method_bind , hinge_joint_set_flag : 0 as * mut sys :: godot_method_bind , hinge_joint_set_param : 0 as * mut sys :: godot_method_bind , joint_create_cone_twist : 0 as * mut sys :: godot_method_bind , joint_create_generic_6dof : 0 as * mut sys :: godot_method_bind , joint_create_hinge : 0 as * mut sys :: godot_method_bind , joint_create_pin : 0 as * mut sys :: godot_method_bind , joint_create_slider : 0 as * mut sys :: godot_method_bind , joint_get_solver_priority : 0 as * mut sys :: godot_method_bind , joint_get_type : 0 as * mut sys :: godot_method_bind , joint_set_solver_priority : 0 as * mut sys :: godot_method_bind , pin_joint_get_local_a : 0 as * mut sys :: godot_method_bind , pin_joint_get_local_b : 0 as * mut sys :: godot_method_bind , pin_joint_get_param : 0 as * mut sys :: godot_method_bind , pin_joint_set_local_a : 0 as * mut sys :: godot_method_bind , pin_joint_set_local_b : 0 as * mut sys :: godot_method_bind , pin_joint_set_param : 0 as * mut sys :: godot_method_bind , set_active : 0 as * mut sys :: godot_method_bind , set_collision_iterations : 0 as * mut sys :: godot_method_bind , shape_create : 0 as * mut sys :: godot_method_bind , shape_get_data : 0 as * mut sys :: godot_method_bind , shape_get_type : 0 as * mut sys :: godot_method_bind , shape_set_data : 0 as * mut sys :: godot_method_bind , slider_joint_get_param : 0 as * mut sys :: godot_method_bind , slider_joint_set_param : 0 as * mut sys :: godot_method_bind , space_create : 0 as * mut sys :: godot_method_bind , space_get_direct_state : 0 as * mut sys :: godot_method_bind , space_get_param : 0 as * mut sys :: godot_method_bind , space_is_active : 0 as * mut sys :: godot_method_bind , space_set_active : 0 as * mut sys :: godot_method_bind , space_set_param : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PhysicsServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PhysicsServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . area_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_add_shape\0" . as_ptr () as * const c_char) ; table . area_attach_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_attach_object_instance_id\0" . as_ptr () as * const c_char) ; table . area_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "area_clear_shapes\0" . as_ptr () as * const c_char) ; table . area_create = (gd_api . godot_method_bind_get_method) (class_name , "area_create\0" . as_ptr () as * const c_char) ; table . area_get_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "area_get_object_instance_id\0" . as_ptr () as * const c_char) ; table . area_get_param = (gd_api . godot_method_bind_get_method) (class_name , "area_get_param\0" . as_ptr () as * const c_char) ; table . area_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape\0" . as_ptr () as * const c_char) ; table . area_get_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape_count\0" . as_ptr () as * const c_char) ; table . area_get_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_get_shape_transform\0" . as_ptr () as * const c_char) ; table . area_get_space = (gd_api . godot_method_bind_get_method) (class_name , "area_get_space\0" . as_ptr () as * const c_char) ; table . area_get_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "area_get_space_override_mode\0" . as_ptr () as * const c_char) ; table . area_get_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_get_transform\0" . as_ptr () as * const c_char) ; table . area_is_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "area_is_ray_pickable\0" . as_ptr () as * const c_char) ; table . area_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_remove_shape\0" . as_ptr () as * const c_char) ; table . area_set_area_monitor_callback = (gd_api . godot_method_bind_get_method) (class_name , "area_set_area_monitor_callback\0" . as_ptr () as * const c_char) ; table . area_set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "area_set_collision_layer\0" . as_ptr () as * const c_char) ; table . area_set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "area_set_collision_mask\0" . as_ptr () as * const c_char) ; table . area_set_monitor_callback = (gd_api . godot_method_bind_get_method) (class_name , "area_set_monitor_callback\0" . as_ptr () as * const c_char) ; table . area_set_monitorable = (gd_api . godot_method_bind_get_method) (class_name , "area_set_monitorable\0" . as_ptr () as * const c_char) ; table . area_set_param = (gd_api . godot_method_bind_get_method) (class_name , "area_set_param\0" . as_ptr () as * const c_char) ; table . area_set_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "area_set_ray_pickable\0" . as_ptr () as * const c_char) ; table . area_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape\0" . as_ptr () as * const c_char) ; table . area_set_shape_disabled = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape_disabled\0" . as_ptr () as * const c_char) ; table . area_set_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_set_shape_transform\0" . as_ptr () as * const c_char) ; table . area_set_space = (gd_api . godot_method_bind_get_method) (class_name , "area_set_space\0" . as_ptr () as * const c_char) ; table . area_set_space_override_mode = (gd_api . godot_method_bind_get_method) (class_name , "area_set_space_override_mode\0" . as_ptr () as * const c_char) ; table . area_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "area_set_transform\0" . as_ptr () as * const c_char) ; table . body_add_central_force = (gd_api . godot_method_bind_get_method) (class_name , "body_add_central_force\0" . as_ptr () as * const c_char) ; table . body_add_collision_exception = (gd_api . godot_method_bind_get_method) (class_name , "body_add_collision_exception\0" . as_ptr () as * const c_char) ; table . body_add_force = (gd_api . godot_method_bind_get_method) (class_name , "body_add_force\0" . as_ptr () as * const c_char) ; table . body_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_add_shape\0" . as_ptr () as * const c_char) ; table . body_add_torque = (gd_api . godot_method_bind_get_method) (class_name , "body_add_torque\0" . as_ptr () as * const c_char) ; table . body_apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_central_impulse\0" . as_ptr () as * const c_char) ; table . body_apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_impulse\0" . as_ptr () as * const c_char) ; table . body_apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "body_apply_torque_impulse\0" . as_ptr () as * const c_char) ; table . body_attach_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_attach_object_instance_id\0" . as_ptr () as * const c_char) ; table . body_clear_shapes = (gd_api . godot_method_bind_get_method) (class_name , "body_clear_shapes\0" . as_ptr () as * const c_char) ; table . body_create = (gd_api . godot_method_bind_get_method) (class_name , "body_create\0" . as_ptr () as * const c_char) ; table . body_get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "body_get_collision_layer\0" . as_ptr () as * const c_char) ; table . body_get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "body_get_collision_mask\0" . as_ptr () as * const c_char) ; table . body_get_direct_state = (gd_api . godot_method_bind_get_method) (class_name , "body_get_direct_state\0" . as_ptr () as * const c_char) ; table . body_get_kinematic_safe_margin = (gd_api . godot_method_bind_get_method) (class_name , "body_get_kinematic_safe_margin\0" . as_ptr () as * const c_char) ; table . body_get_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "body_get_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . body_get_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_get_mode\0" . as_ptr () as * const c_char) ; table . body_get_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "body_get_object_instance_id\0" . as_ptr () as * const c_char) ; table . body_get_param = (gd_api . godot_method_bind_get_method) (class_name , "body_get_param\0" . as_ptr () as * const c_char) ; table . body_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape\0" . as_ptr () as * const c_char) ; table . body_get_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape_count\0" . as_ptr () as * const c_char) ; table . body_get_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "body_get_shape_transform\0" . as_ptr () as * const c_char) ; table . body_get_space = (gd_api . godot_method_bind_get_method) (class_name , "body_get_space\0" . as_ptr () as * const c_char) ; table . body_get_state = (gd_api . godot_method_bind_get_method) (class_name , "body_get_state\0" . as_ptr () as * const c_char) ; table . body_is_axis_locked = (gd_api . godot_method_bind_get_method) (class_name , "body_is_axis_locked\0" . as_ptr () as * const c_char) ; table . body_is_continuous_collision_detection_enabled = (gd_api . godot_method_bind_get_method) (class_name , "body_is_continuous_collision_detection_enabled\0" . as_ptr () as * const c_char) ; table . body_is_omitting_force_integration = (gd_api . godot_method_bind_get_method) (class_name , "body_is_omitting_force_integration\0" . as_ptr () as * const c_char) ; table . body_is_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "body_is_ray_pickable\0" . as_ptr () as * const c_char) ; table . body_remove_collision_exception = (gd_api . godot_method_bind_get_method) (class_name , "body_remove_collision_exception\0" . as_ptr () as * const c_char) ; table . body_remove_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_remove_shape\0" . as_ptr () as * const c_char) ; table . body_set_axis_lock = (gd_api . godot_method_bind_get_method) (class_name , "body_set_axis_lock\0" . as_ptr () as * const c_char) ; table . body_set_axis_velocity = (gd_api . godot_method_bind_get_method) (class_name , "body_set_axis_velocity\0" . as_ptr () as * const c_char) ; table . body_set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "body_set_collision_layer\0" . as_ptr () as * const c_char) ; table . body_set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "body_set_collision_mask\0" . as_ptr () as * const c_char) ; table . body_set_enable_continuous_collision_detection = (gd_api . godot_method_bind_get_method) (class_name , "body_set_enable_continuous_collision_detection\0" . as_ptr () as * const c_char) ; table . body_set_force_integration_callback = (gd_api . godot_method_bind_get_method) (class_name , "body_set_force_integration_callback\0" . as_ptr () as * const c_char) ; table . body_set_kinematic_safe_margin = (gd_api . godot_method_bind_get_method) (class_name , "body_set_kinematic_safe_margin\0" . as_ptr () as * const c_char) ; table . body_set_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "body_set_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . body_set_mode = (gd_api . godot_method_bind_get_method) (class_name , "body_set_mode\0" . as_ptr () as * const c_char) ; table . body_set_omit_force_integration = (gd_api . godot_method_bind_get_method) (class_name , "body_set_omit_force_integration\0" . as_ptr () as * const c_char) ; table . body_set_param = (gd_api . godot_method_bind_get_method) (class_name , "body_set_param\0" . as_ptr () as * const c_char) ; table . body_set_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "body_set_ray_pickable\0" . as_ptr () as * const c_char) ; table . body_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape\0" . as_ptr () as * const c_char) ; table . body_set_shape_disabled = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_disabled\0" . as_ptr () as * const c_char) ; table . body_set_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "body_set_shape_transform\0" . as_ptr () as * const c_char) ; table . body_set_space = (gd_api . godot_method_bind_get_method) (class_name , "body_set_space\0" . as_ptr () as * const c_char) ; table . body_set_state = (gd_api . godot_method_bind_get_method) (class_name , "body_set_state\0" . as_ptr () as * const c_char) ; table . body_test_motion = (gd_api . godot_method_bind_get_method) (class_name , "body_test_motion\0" . as_ptr () as * const c_char) ; table . cone_twist_joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "cone_twist_joint_get_param\0" . as_ptr () as * const c_char) ; table . cone_twist_joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "cone_twist_joint_set_param\0" . as_ptr () as * const c_char) ; table . free_rid = (gd_api . godot_method_bind_get_method) (class_name , "free_rid\0" . as_ptr () as * const c_char) ; table . generic_6dof_joint_get_flag = (gd_api . godot_method_bind_get_method) (class_name , "generic_6dof_joint_get_flag\0" . as_ptr () as * const c_char) ; table . generic_6dof_joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "generic_6dof_joint_get_param\0" . as_ptr () as * const c_char) ; table . generic_6dof_joint_set_flag = (gd_api . godot_method_bind_get_method) (class_name , "generic_6dof_joint_set_flag\0" . as_ptr () as * const c_char) ; table . generic_6dof_joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "generic_6dof_joint_set_param\0" . as_ptr () as * const c_char) ; table . get_process_info = (gd_api . godot_method_bind_get_method) (class_name , "get_process_info\0" . as_ptr () as * const c_char) ; table . hinge_joint_get_flag = (gd_api . godot_method_bind_get_method) (class_name , "hinge_joint_get_flag\0" . as_ptr () as * const c_char) ; table . hinge_joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "hinge_joint_get_param\0" . as_ptr () as * const c_char) ; table . hinge_joint_set_flag = (gd_api . godot_method_bind_get_method) (class_name , "hinge_joint_set_flag\0" . as_ptr () as * const c_char) ; table . hinge_joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "hinge_joint_set_param\0" . as_ptr () as * const c_char) ; table . joint_create_cone_twist = (gd_api . godot_method_bind_get_method) (class_name , "joint_create_cone_twist\0" . as_ptr () as * const c_char) ; table . joint_create_generic_6dof = (gd_api . godot_method_bind_get_method) (class_name , "joint_create_generic_6dof\0" . as_ptr () as * const c_char) ; table . joint_create_hinge = (gd_api . godot_method_bind_get_method) (class_name , "joint_create_hinge\0" . as_ptr () as * const c_char) ; table . joint_create_pin = (gd_api . godot_method_bind_get_method) (class_name , "joint_create_pin\0" . as_ptr () as * const c_char) ; table . joint_create_slider = (gd_api . godot_method_bind_get_method) (class_name , "joint_create_slider\0" . as_ptr () as * const c_char) ; table . joint_get_solver_priority = (gd_api . godot_method_bind_get_method) (class_name , "joint_get_solver_priority\0" . as_ptr () as * const c_char) ; table . joint_get_type = (gd_api . godot_method_bind_get_method) (class_name , "joint_get_type\0" . as_ptr () as * const c_char) ; table . joint_set_solver_priority = (gd_api . godot_method_bind_get_method) (class_name , "joint_set_solver_priority\0" . as_ptr () as * const c_char) ; table . pin_joint_get_local_a = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_get_local_a\0" . as_ptr () as * const c_char) ; table . pin_joint_get_local_b = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_get_local_b\0" . as_ptr () as * const c_char) ; table . pin_joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_get_param\0" . as_ptr () as * const c_char) ; table . pin_joint_set_local_a = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_set_local_a\0" . as_ptr () as * const c_char) ; table . pin_joint_set_local_b = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_set_local_b\0" . as_ptr () as * const c_char) ; table . pin_joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "pin_joint_set_param\0" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\0" . as_ptr () as * const c_char) ; table . set_collision_iterations = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_iterations\0" . as_ptr () as * const c_char) ; table . shape_create = (gd_api . godot_method_bind_get_method) (class_name , "shape_create\0" . as_ptr () as * const c_char) ; table . shape_get_data = (gd_api . godot_method_bind_get_method) (class_name , "shape_get_data\0" . as_ptr () as * const c_char) ; table . shape_get_type = (gd_api . godot_method_bind_get_method) (class_name , "shape_get_type\0" . as_ptr () as * const c_char) ; table . shape_set_data = (gd_api . godot_method_bind_get_method) (class_name , "shape_set_data\0" . as_ptr () as * const c_char) ; table . slider_joint_get_param = (gd_api . godot_method_bind_get_method) (class_name , "slider_joint_get_param\0" . as_ptr () as * const c_char) ; table . slider_joint_set_param = (gd_api . godot_method_bind_get_method) (class_name , "slider_joint_set_param\0" . as_ptr () as * const c_char) ; table . space_create = (gd_api . godot_method_bind_get_method) (class_name , "space_create\0" . as_ptr () as * const c_char) ; table . space_get_direct_state = (gd_api . godot_method_bind_get_method) (class_name , "space_get_direct_state\0" . as_ptr () as * const c_char) ; table . space_get_param = (gd_api . godot_method_bind_get_method) (class_name , "space_get_param\0" . as_ptr () as * const c_char) ; table . space_is_active = (gd_api . godot_method_bind_get_method) (class_name , "space_is_active\0" . as_ptr () as * const c_char) ; table . space_set_active = (gd_api . godot_method_bind_get_method) (class_name , "space_set_active\0" . as_ptr () as * const c_char) ; table . space_set_param = (gd_api . godot_method_bind_get_method) (class_name , "space_set_param\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::physics_server::private::PhysicsServer;
            
            pub(crate) mod physics_shape_query_parameters {
                # ! [doc = "This module contains types related to the API class [`PhysicsShapeQueryParameters`][super::PhysicsShapeQueryParameters]."] pub (crate) mod private { # [doc = "`core class PhysicsShapeQueryParameters` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_physicsshapequeryparameters.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPhysicsShapeQueryParameters inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PhysicsShapeQueryParameters { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PhysicsShapeQueryParameters ; impl PhysicsShapeQueryParameters { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PhysicsShapeQueryParametersMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The physics layer(s) the query will take into account (as a bitmask). See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The list of objects or object [`RID`][Rid]s that will be excluded from collisions."] # [doc = ""] # [inline] pub fn exclude (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . get_exclude ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The collision margin for the shape."] # [doc = ""] # [inline] pub fn margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The queried shape's [`RID`][Rid]. See also [`set_shape`][Self::set_shape]."] # [doc = ""] # [inline] pub fn shape_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . get_shape_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The queried shape's transform matrix."] # [doc = ""] # [inline] pub fn transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . get_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the query will take [`Area`][Area]s into account."] # [doc = ""] # [inline] pub fn is_collide_with_areas_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . is_collide_with_areas_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the query will take [`PhysicsBody`][PhysicsBody]s into account."] # [doc = ""] # [inline] pub fn is_collide_with_bodies_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . is_collide_with_bodies_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the query will take [`Area`][Area]s into account."] # [doc = ""] # [inline] pub fn set_collide_with_areas (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . set_collide_with_areas ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the query will take [`PhysicsBody`][PhysicsBody]s into account."] # [doc = ""] # [inline] pub fn set_collide_with_bodies (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . set_collide_with_bodies ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The physics layer(s) the query will take into account (as a bitmask). See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , collision_mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , collision_mask as _) ; } } # [doc = "The list of objects or object [`RID`][Rid]s that will be excluded from collisions."] # [doc = ""] # [inline] pub fn set_exclude (& self , exclude : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . set_exclude ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , exclude) ; } } # [doc = "The collision margin for the shape."] # [doc = ""] # [inline] pub fn set_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; } } # [doc = "Sets the [`Shape`][Shape] that will be used for collision/intersection queries."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; } } # [doc = "The queried shape's [`RID`][Rid]. See also [`set_shape`][Self::set_shape]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn set_shape_rid (& self , shape : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . set_shape_rid ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , shape) ; } } # [doc = "The queried shape's transform matrix."] # [doc = ""] # [inline] pub fn set_transform (& self , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsShapeQueryParametersMethodTable :: get (get_api ()) . set_transform ; let ret = crate :: icalls :: icallvar__trans (method_bind , self . this . sys () . as_ptr () , transform) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsShapeQueryParameters { } unsafe impl GodotObject for PhysicsShapeQueryParameters { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PhysicsShapeQueryParameters" } } impl std :: ops :: Deref for PhysicsShapeQueryParameters { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsShapeQueryParameters { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for PhysicsShapeQueryParameters { } unsafe impl SubClass < crate :: generated :: Object > for PhysicsShapeQueryParameters { } impl Instanciable for PhysicsShapeQueryParameters { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PhysicsShapeQueryParameters :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PhysicsShapeQueryParametersMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_exclude : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub get_shape_rid : * mut sys :: godot_method_bind , pub get_transform : * mut sys :: godot_method_bind , pub is_collide_with_areas_enabled : * mut sys :: godot_method_bind , pub is_collide_with_bodies_enabled : * mut sys :: godot_method_bind , pub set_collide_with_areas : * mut sys :: godot_method_bind , pub set_collide_with_bodies : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_exclude : * mut sys :: godot_method_bind , pub set_margin : * mut sys :: godot_method_bind , pub set_shape : * mut sys :: godot_method_bind , pub set_shape_rid : * mut sys :: godot_method_bind , pub set_transform : * mut sys :: godot_method_bind } impl PhysicsShapeQueryParametersMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PhysicsShapeQueryParametersMethodTable = PhysicsShapeQueryParametersMethodTable { class_constructor : None , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_exclude : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , get_shape_rid : 0 as * mut sys :: godot_method_bind , get_transform : 0 as * mut sys :: godot_method_bind , is_collide_with_areas_enabled : 0 as * mut sys :: godot_method_bind , is_collide_with_bodies_enabled : 0 as * mut sys :: godot_method_bind , set_collide_with_areas : 0 as * mut sys :: godot_method_bind , set_collide_with_bodies : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_exclude : 0 as * mut sys :: godot_method_bind , set_margin : 0 as * mut sys :: godot_method_bind , set_shape : 0 as * mut sys :: godot_method_bind , set_shape_rid : 0 as * mut sys :: godot_method_bind , set_transform : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PhysicsShapeQueryParametersMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PhysicsShapeQueryParameters\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_exclude = (gd_api . godot_method_bind_get_method) (class_name , "get_exclude\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . get_shape_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_shape_rid\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . is_collide_with_areas_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_collide_with_areas_enabled\0" . as_ptr () as * const c_char) ; table . is_collide_with_bodies_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_collide_with_bodies_enabled\0" . as_ptr () as * const c_char) ; table . set_collide_with_areas = (gd_api . godot_method_bind_get_method) (class_name , "set_collide_with_areas\0" . as_ptr () as * const c_char) ; table . set_collide_with_bodies = (gd_api . godot_method_bind_get_method) (class_name , "set_collide_with_bodies\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_exclude = (gd_api . godot_method_bind_get_method) (class_name , "set_exclude\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\0" . as_ptr () as * const c_char) ; table . set_shape_rid = (gd_api . godot_method_bind_get_method) (class_name , "set_shape_rid\0" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::physics_shape_query_parameters::private::PhysicsShapeQueryParameters;
            
            pub(crate) mod physics_test_motion_result {
                # ! [doc = "This module contains types related to the API class [`PhysicsTestMotionResult`][super::PhysicsTestMotionResult]."] pub (crate) mod private { # [doc = "`core class PhysicsTestMotionResult` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_physicstestmotionresult.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPhysicsTestMotionResult inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PhysicsTestMotionResult { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PhysicsTestMotionResult ; impl PhysicsTestMotionResult { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PhysicsTestMotionResultMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn collider (& self) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsTestMotionResultMethodTable :: get (get_api ()) . get_collider ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn collider_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsTestMotionResultMethodTable :: get (get_api ()) . get_collider_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn collider_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsTestMotionResultMethodTable :: get (get_api ()) . get_collider_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn collider_shape (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsTestMotionResultMethodTable :: get (get_api ()) . get_collider_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn collider_velocity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsTestMotionResultMethodTable :: get (get_api ()) . get_collider_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_depth (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsTestMotionResultMethodTable :: get (get_api ()) . get_collision_depth ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_normal (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsTestMotionResultMethodTable :: get (get_api ()) . get_collision_normal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_point (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsTestMotionResultMethodTable :: get (get_api ()) . get_collision_point ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_safe_fraction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsTestMotionResultMethodTable :: get (get_api ()) . get_collision_safe_fraction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn collision_unsafe_fraction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsTestMotionResultMethodTable :: get (get_api ()) . get_collision_unsafe_fraction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn motion (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsTestMotionResultMethodTable :: get (get_api ()) . get_motion ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn motion_remainder (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PhysicsTestMotionResultMethodTable :: get (get_api ()) . get_motion_remainder ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for PhysicsTestMotionResult { } unsafe impl GodotObject for PhysicsTestMotionResult { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PhysicsTestMotionResult" } } impl std :: ops :: Deref for PhysicsTestMotionResult { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PhysicsTestMotionResult { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for PhysicsTestMotionResult { } unsafe impl SubClass < crate :: generated :: Object > for PhysicsTestMotionResult { } impl Instanciable for PhysicsTestMotionResult { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PhysicsTestMotionResult :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PhysicsTestMotionResultMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_collider : * mut sys :: godot_method_bind , pub get_collider_id : * mut sys :: godot_method_bind , pub get_collider_rid : * mut sys :: godot_method_bind , pub get_collider_shape : * mut sys :: godot_method_bind , pub get_collider_velocity : * mut sys :: godot_method_bind , pub get_collision_depth : * mut sys :: godot_method_bind , pub get_collision_normal : * mut sys :: godot_method_bind , pub get_collision_point : * mut sys :: godot_method_bind , pub get_collision_safe_fraction : * mut sys :: godot_method_bind , pub get_collision_unsafe_fraction : * mut sys :: godot_method_bind , pub get_motion : * mut sys :: godot_method_bind , pub get_motion_remainder : * mut sys :: godot_method_bind } impl PhysicsTestMotionResultMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PhysicsTestMotionResultMethodTable = PhysicsTestMotionResultMethodTable { class_constructor : None , get_collider : 0 as * mut sys :: godot_method_bind , get_collider_id : 0 as * mut sys :: godot_method_bind , get_collider_rid : 0 as * mut sys :: godot_method_bind , get_collider_shape : 0 as * mut sys :: godot_method_bind , get_collider_velocity : 0 as * mut sys :: godot_method_bind , get_collision_depth : 0 as * mut sys :: godot_method_bind , get_collision_normal : 0 as * mut sys :: godot_method_bind , get_collision_point : 0 as * mut sys :: godot_method_bind , get_collision_safe_fraction : 0 as * mut sys :: godot_method_bind , get_collision_unsafe_fraction : 0 as * mut sys :: godot_method_bind , get_motion : 0 as * mut sys :: godot_method_bind , get_motion_remainder : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PhysicsTestMotionResultMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PhysicsTestMotionResult\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_collider\0" . as_ptr () as * const c_char) ; table . get_collider_id = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_id\0" . as_ptr () as * const c_char) ; table . get_collider_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_rid\0" . as_ptr () as * const c_char) ; table . get_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape\0" . as_ptr () as * const c_char) ; table . get_collider_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_velocity\0" . as_ptr () as * const c_char) ; table . get_collision_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_depth\0" . as_ptr () as * const c_char) ; table . get_collision_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_normal\0" . as_ptr () as * const c_char) ; table . get_collision_point = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_point\0" . as_ptr () as * const c_char) ; table . get_collision_safe_fraction = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_safe_fraction\0" . as_ptr () as * const c_char) ; table . get_collision_unsafe_fraction = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_unsafe_fraction\0" . as_ptr () as * const c_char) ; table . get_motion = (gd_api . godot_method_bind_get_method) (class_name , "get_motion\0" . as_ptr () as * const c_char) ; table . get_motion_remainder = (gd_api . godot_method_bind_get_method) (class_name , "get_motion_remainder\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::physics_test_motion_result::private::PhysicsTestMotionResult;
            
            pub mod pin_joint {
                # ! [doc = "This module contains types related to the API class [`PinJoint`][super::PinJoint]."] pub (crate) mod private { # [doc = "`core class PinJoint` inherits `Joint` (manually managed).\n\nThis class has related types in the [`pin_joint`][super::pin_joint] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_pinjoint.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`PinJoint` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<PinJoint>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPinJoint inherits methods from:\n - [Joint](struct.Joint.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PinJoint { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PinJoint ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Param (pub i64) ; impl Param { pub const BIAS : Param = Param (0i64) ; pub const DAMPING : Param = Param (1i64) ; pub const IMPULSE_CLAMP : Param = Param (2i64) ; } impl From < i64 > for Param { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Param > for i64 { # [inline] fn from (v : Param) -> Self { v . 0 } } impl FromVariant for Param { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl PinJoint { pub const PARAM_BIAS : i64 = 0i64 ; pub const PARAM_DAMPING : i64 = 1i64 ; pub const PARAM_IMPULSE_CLAMP : i64 = 2i64 ; } impl PinJoint { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PinJointMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the value of the specified parameter."] # [doc = ""] # [inline] pub fn param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PinJointMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the value of the specified parameter."] # [doc = ""] # [inline] pub fn set_param (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PinJointMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , param as _ , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PinJoint { } unsafe impl GodotObject for PinJoint { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PinJoint" } } impl QueueFree for PinJoint { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for PinJoint { type Target = crate :: generated :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PinJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Joint > for PinJoint { } unsafe impl SubClass < crate :: generated :: Spatial > for PinJoint { } unsafe impl SubClass < crate :: generated :: Node > for PinJoint { } unsafe impl SubClass < crate :: generated :: Object > for PinJoint { } impl Instanciable for PinJoint { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PinJoint :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PinJointMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_param : * mut sys :: godot_method_bind , pub set_param : * mut sys :: godot_method_bind } impl PinJointMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PinJointMethodTable = PinJointMethodTable { class_constructor : None , get_param : 0 as * mut sys :: godot_method_bind , set_param : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PinJointMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PinJoint\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::pin_joint::private::PinJoint;
            
            pub(crate) mod pin_joint_2d {
                # ! [doc = "This module contains types related to the API class [`PinJoint2D`][super::PinJoint2D]."] pub (crate) mod private { # [doc = "`core class PinJoint2D` inherits `Joint2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_pinjoint2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`PinJoint2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<PinJoint2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPinJoint2D inherits methods from:\n - [Joint2D](struct.Joint2D.html)\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PinJoint2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PinJoint2D ; impl PinJoint2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PinJoint2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The higher this value, the more the bond to the pinned partner can flex."] # [doc = ""] # [inline] pub fn softness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PinJoint2DMethodTable :: get (get_api ()) . get_softness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The higher this value, the more the bond to the pinned partner can flex."] # [doc = ""] # [inline] pub fn set_softness (& self , softness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PinJoint2DMethodTable :: get (get_api ()) . set_softness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , softness as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PinJoint2D { } unsafe impl GodotObject for PinJoint2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PinJoint2D" } } impl QueueFree for PinJoint2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for PinJoint2D { type Target = crate :: generated :: Joint2D ; # [inline] fn deref (& self) -> & crate :: generated :: Joint2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PinJoint2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Joint2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Joint2D > for PinJoint2D { } unsafe impl SubClass < crate :: generated :: Node2D > for PinJoint2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for PinJoint2D { } unsafe impl SubClass < crate :: generated :: Node > for PinJoint2D { } unsafe impl SubClass < crate :: generated :: Object > for PinJoint2D { } impl Instanciable for PinJoint2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PinJoint2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PinJoint2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_softness : * mut sys :: godot_method_bind , pub set_softness : * mut sys :: godot_method_bind } impl PinJoint2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PinJoint2DMethodTable = PinJoint2DMethodTable { class_constructor : None , get_softness : 0 as * mut sys :: godot_method_bind , set_softness : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PinJoint2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PinJoint2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_softness = (gd_api . godot_method_bind_get_method) (class_name , "get_softness\0" . as_ptr () as * const c_char) ; table . set_softness = (gd_api . godot_method_bind_get_method) (class_name , "set_softness\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::pin_joint_2d::private::PinJoint2D;
            
            pub(crate) mod plane_mesh {
                # ! [doc = "This module contains types related to the API class [`PlaneMesh`][super::PlaneMesh]."] pub (crate) mod private { # [doc = "`core class PlaneMesh` inherits `PrimitiveMesh` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_planemesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPlaneMesh inherits methods from:\n - [PrimitiveMesh](struct.PrimitiveMesh.html)\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PlaneMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PlaneMesh ; impl PlaneMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PlaneMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Offset from the origin of the generated plane. Useful for particles."] # [doc = ""] # [inline] pub fn center_offset (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PlaneMeshMethodTable :: get (get_api ()) . get_center_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Size of the generated plane."] # [doc = ""] # [inline] pub fn size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = PlaneMeshMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Number of subdivision along the Z axis."] # [doc = ""] # [inline] pub fn subdivide_depth (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PlaneMeshMethodTable :: get (get_api ()) . get_subdivide_depth ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Number of subdivision along the X axis."] # [doc = ""] # [inline] pub fn subdivide_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PlaneMeshMethodTable :: get (get_api ()) . get_subdivide_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Offset from the origin of the generated plane. Useful for particles."] # [doc = ""] # [inline] pub fn set_center_offset (& self , offset : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PlaneMeshMethodTable :: get (get_api ()) . set_center_offset ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Size of the generated plane."] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PlaneMeshMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Number of subdivision along the Z axis."] # [doc = ""] # [inline] pub fn set_subdivide_depth (& self , subdivide : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PlaneMeshMethodTable :: get (get_api ()) . set_subdivide_depth ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , subdivide as _) ; } } # [doc = "Number of subdivision along the X axis."] # [doc = ""] # [inline] pub fn set_subdivide_width (& self , subdivide : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PlaneMeshMethodTable :: get (get_api ()) . set_subdivide_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , subdivide as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PlaneMesh { } unsafe impl GodotObject for PlaneMesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PlaneMesh" } } impl std :: ops :: Deref for PlaneMesh { type Target = crate :: generated :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PlaneMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PrimitiveMesh > for PlaneMesh { } unsafe impl SubClass < crate :: generated :: Mesh > for PlaneMesh { } unsafe impl SubClass < crate :: generated :: Resource > for PlaneMesh { } unsafe impl SubClass < crate :: generated :: Reference > for PlaneMesh { } unsafe impl SubClass < crate :: generated :: Object > for PlaneMesh { } impl Instanciable for PlaneMesh { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PlaneMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PlaneMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_center_offset : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_subdivide_depth : * mut sys :: godot_method_bind , pub get_subdivide_width : * mut sys :: godot_method_bind , pub set_center_offset : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind , pub set_subdivide_depth : * mut sys :: godot_method_bind , pub set_subdivide_width : * mut sys :: godot_method_bind } impl PlaneMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PlaneMeshMethodTable = PlaneMeshMethodTable { class_constructor : None , get_center_offset : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_subdivide_depth : 0 as * mut sys :: godot_method_bind , get_subdivide_width : 0 as * mut sys :: godot_method_bind , set_center_offset : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind , set_subdivide_depth : 0 as * mut sys :: godot_method_bind , set_subdivide_width : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PlaneMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PlaneMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_center_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_center_offset\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_depth\0" . as_ptr () as * const c_char) ; table . get_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_width\0" . as_ptr () as * const c_char) ; table . set_center_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_center_offset\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; table . set_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_depth\0" . as_ptr () as * const c_char) ; table . set_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_width\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::plane_mesh::private::PlaneMesh;
            
            pub(crate) mod plane_shape {
                # ! [doc = "This module contains types related to the API class [`PlaneShape`][super::PlaneShape]."] pub (crate) mod private { # [doc = "`core class PlaneShape` inherits `Shape` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_planeshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPlaneShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PlaneShape { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PlaneShape ; impl PlaneShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PlaneShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [`Plane`][Plane] used by the [`PlaneShape`][PlaneShape] for collision."] # [doc = ""] # [inline] pub fn plane (& self) -> Plane { unsafe { let method_bind : * mut sys :: godot_method_bind = PlaneShapeMethodTable :: get (get_api ()) . get_plane ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Plane > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Plane`][Plane] used by the [`PlaneShape`][PlaneShape] for collision."] # [doc = ""] # [inline] pub fn set_plane (& self , plane : Plane) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PlaneShapeMethodTable :: get (get_api ()) . set_plane ; let ret = crate :: icalls :: icallvar__plane (method_bind , self . this . sys () . as_ptr () , plane) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PlaneShape { } unsafe impl GodotObject for PlaneShape { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PlaneShape" } } impl std :: ops :: Deref for PlaneShape { type Target = crate :: generated :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PlaneShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape > for PlaneShape { } unsafe impl SubClass < crate :: generated :: Resource > for PlaneShape { } unsafe impl SubClass < crate :: generated :: Reference > for PlaneShape { } unsafe impl SubClass < crate :: generated :: Object > for PlaneShape { } impl Instanciable for PlaneShape { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PlaneShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PlaneShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_plane : * mut sys :: godot_method_bind , pub set_plane : * mut sys :: godot_method_bind } impl PlaneShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PlaneShapeMethodTable = PlaneShapeMethodTable { class_constructor : None , get_plane : 0 as * mut sys :: godot_method_bind , set_plane : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PlaneShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PlaneShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_plane = (gd_api . godot_method_bind_get_method) (class_name , "get_plane\0" . as_ptr () as * const c_char) ; table . set_plane = (gd_api . godot_method_bind_get_method) (class_name , "set_plane\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::plane_shape::private::PlaneShape;
            
            pub(crate) mod plugin_script {
                # ! [doc = "This module contains types related to the API class [`PluginScript`][super::PluginScript]."] pub (crate) mod private { # [doc = "`core class PluginScript` inherits `Script` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_pluginscript.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPluginScript inherits methods from:\n - [Script](struct.Script.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PluginScript { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PluginScript ; impl PluginScript { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PluginScriptMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn _new (& self , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = PluginScriptMethodTable :: get (get_api ()) . _new ; let ret = crate :: icalls :: icallvarargs_ (method_bind , self . this . sys () . as_ptr () , varargs) ; ret } } } impl gdnative_core :: private :: godot_object :: Sealed for PluginScript { } unsafe impl GodotObject for PluginScript { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PluginScript" } } impl std :: ops :: Deref for PluginScript { type Target = crate :: generated :: Script ; # [inline] fn deref (& self) -> & crate :: generated :: Script { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PluginScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Script { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Script > for PluginScript { } unsafe impl SubClass < crate :: generated :: Resource > for PluginScript { } unsafe impl SubClass < crate :: generated :: Reference > for PluginScript { } unsafe impl SubClass < crate :: generated :: Object > for PluginScript { } impl Instanciable for PluginScript { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PluginScript :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PluginScriptMethodTable { pub class_constructor : sys :: godot_class_constructor , pub _new : * mut sys :: godot_method_bind } impl PluginScriptMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PluginScriptMethodTable = PluginScriptMethodTable { class_constructor : None , _new : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PluginScriptMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PluginScript\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . _new = (gd_api . godot_method_bind_get_method) (class_name , "new\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::plugin_script::private::PluginScript;
            
            pub(crate) mod point_mesh {
                # ! [doc = "This module contains types related to the API class [`PointMesh`][super::PointMesh]."] pub (crate) mod private { # [doc = "`core class PointMesh` inherits `PrimitiveMesh` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_pointmesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPointMesh inherits methods from:\n - [PrimitiveMesh](struct.PrimitiveMesh.html)\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PointMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PointMesh ; impl PointMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PointMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for PointMesh { } unsafe impl GodotObject for PointMesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PointMesh" } } impl std :: ops :: Deref for PointMesh { type Target = crate :: generated :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PointMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PrimitiveMesh > for PointMesh { } unsafe impl SubClass < crate :: generated :: Mesh > for PointMesh { } unsafe impl SubClass < crate :: generated :: Resource > for PointMesh { } unsafe impl SubClass < crate :: generated :: Reference > for PointMesh { } unsafe impl SubClass < crate :: generated :: Object > for PointMesh { } impl Instanciable for PointMesh { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PointMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PointMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl PointMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PointMeshMethodTable = PointMeshMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PointMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PointMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::point_mesh::private::PointMesh;
            
            pub(crate) mod polygon_2d {
                # ! [doc = "This module contains types related to the API class [`Polygon2D`][super::Polygon2D]."] pub (crate) mod private { # [doc = "`core class Polygon2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_polygon2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Polygon2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Polygon2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPolygon2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Polygon2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Polygon2D ; impl Polygon2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Polygon2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a bone with the specified `path` and `weights`."] # [doc = ""] # [inline] pub fn add_bone (& self , path : impl Into < NodePath > , weights : PoolArray < f32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . add_bone ; let ret = crate :: icalls :: icallvar__nodepath_f32arr (method_bind , self . this . sys () . as_ptr () , path . into () , weights) ; } } # [doc = "Removes all bones from this [`Polygon2D`][Polygon2D]."] # [doc = ""] # [inline] pub fn clear_bones (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . clear_bones ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes the specified bone from this [`Polygon2D`][Polygon2D]."] # [doc = ""] # [inline] pub fn erase_bone (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . erase_bone ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } # [doc = "If `true`, attempts to perform antialiasing for polygon edges by drawing a thin OpenGL smooth line on the edges.\n**Note:** Due to how it works, built-in antialiasing will not look correct for translucent polygons and may not work on certain platforms. As a workaround, install the [Antialiased Line2D](https://github.com/godot-extended-libraries/godot-antialiased-line2d) add-on then create an AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing."] # [doc = ""] # [inline] pub fn antialiased (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_antialiased ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of bones in this [`Polygon2D`][Polygon2D]."] # [doc = ""] # [inline] pub fn get_bone_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_bone_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the path to the node associated with the specified bone."] # [doc = ""] # [inline] pub fn get_bone_path (& self , index : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_bone_path ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the height values of the specified bone."] # [doc = ""] # [inline] pub fn get_bone_weights (& self , index : i64) -> PoolArray < f32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_bone_weights ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; < PoolArray < f32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The polygon's fill color. If `texture` is defined, it will be multiplied by this color. It will also be the default color for vertices not set in `vertex_colors`."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn internal_vertex_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_internal_vertex_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, polygon will be inverted, containing the area outside the defined points and extending to the `invert_border`."] # [doc = ""] # [inline] pub fn invert (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_invert ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Added padding applied to the bounding box when using `invert`. Setting this value too small may result in a \"Bad Polygon\" error."] # [doc = ""] # [inline] pub fn invert_border (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_invert_border ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The offset applied to each vertex."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The polygon's list of vertices. The final point will be connected to the first.\n**Note:** This returns a copy of the [`PoolVector2Array`][PoolArray<Vector2>] rather than a reference."] # [doc = ""] # [inline] pub fn polygon (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_polygon ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn polygons (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_polygons ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn skeleton (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_skeleton ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The polygon's fill texture. Use `uv` to set texture coordinates."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Amount to offset the polygon's `texture`. If `(0, 0)` the texture's origin (its top-left corner) will be placed at the polygon's `position`."] # [doc = ""] # [inline] pub fn texture_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The texture's rotation in radians."] # [doc = ""] # [inline] pub fn texture_rotation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_rotation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The texture's rotation in degrees."] # [doc = ""] # [inline] pub fn texture_rotation_degrees (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_rotation_degrees ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Amount to multiply the `uv` coordinates when using a `texture`. Larger values make the texture smaller, and vice versa."] # [doc = ""] # [inline] pub fn texture_scale (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_texture_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture coordinates for each vertex of the polygon. There should be one `uv` per polygon vertex. If there are fewer, undefined vertices will use `(0, 0)`."] # [doc = ""] # [inline] pub fn uv (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_uv ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use `color`."] # [doc = ""] # [inline] pub fn vertex_colors (& self) -> PoolArray < Color > { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . get_vertex_colors ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Color > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, attempts to perform antialiasing for polygon edges by drawing a thin OpenGL smooth line on the edges.\n**Note:** Due to how it works, built-in antialiasing will not look correct for translucent polygons and may not work on certain platforms. As a workaround, install the [Antialiased Line2D](https://github.com/godot-extended-libraries/godot-antialiased-line2d) add-on then create an AntialiasedPolygon2D node. That node relies on a texture with custom mipmaps to perform antialiasing."] # [doc = ""] # [inline] pub fn set_antialiased (& self , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_antialiased ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , antialiased as _) ; } } # [doc = "Sets the path to the node associated with the specified bone."] # [doc = ""] # [inline] pub fn set_bone_path (& self , index : i64 , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_bone_path ; let ret = crate :: icalls :: icallvar__i64_nodepath (method_bind , self . this . sys () . as_ptr () , index as _ , path . into ()) ; } } # [doc = "Sets the weight values for the specified bone."] # [doc = ""] # [inline] pub fn set_bone_weights (& self , index : i64 , weights : PoolArray < f32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_bone_weights ; let ret = crate :: icalls :: icallvar__i64_f32arr (method_bind , self . this . sys () . as_ptr () , index as _ , weights) ; } } # [doc = "The polygon's fill color. If `texture` is defined, it will be multiplied by this color. It will also be the default color for vertices not set in `vertex_colors`."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_internal_vertex_count (& self , internal_vertex_count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_internal_vertex_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , internal_vertex_count as _) ; } } # [doc = "If `true`, polygon will be inverted, containing the area outside the defined points and extending to the `invert_border`."] # [doc = ""] # [inline] pub fn set_invert (& self , invert : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_invert ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , invert as _) ; } } # [doc = "Added padding applied to the bounding box when using `invert`. Setting this value too small may result in a \"Bad Polygon\" error."] # [doc = ""] # [inline] pub fn set_invert_border (& self , invert_border : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_invert_border ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , invert_border as _) ; } } # [doc = "The offset applied to each vertex."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The polygon's list of vertices. The final point will be connected to the first.\n**Note:** This returns a copy of the [`PoolVector2Array`][PoolArray<Vector2>] rather than a reference."] # [doc = ""] # [inline] pub fn set_polygon (& self , polygon : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_polygon ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_polygons (& self , polygons : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_polygons ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , polygons) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_skeleton (& self , skeleton : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_skeleton ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , skeleton . into ()) ; } } # [doc = "The polygon's fill texture. Use `uv` to set texture coordinates."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Amount to offset the polygon's `texture`. If `(0, 0)` the texture's origin (its top-left corner) will be placed at the polygon's `position`."] # [doc = ""] # [inline] pub fn set_texture_offset (& self , texture_offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , texture_offset) ; } } # [doc = "The texture's rotation in radians."] # [doc = ""] # [inline] pub fn set_texture_rotation (& self , texture_rotation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_rotation ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , texture_rotation as _) ; } } # [doc = "The texture's rotation in degrees."] # [doc = ""] # [inline] pub fn set_texture_rotation_degrees (& self , texture_rotation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_rotation_degrees ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , texture_rotation as _) ; } } # [doc = "Amount to multiply the `uv` coordinates when using a `texture`. Larger values make the texture smaller, and vice versa."] # [doc = ""] # [inline] pub fn set_texture_scale (& self , texture_scale : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_texture_scale ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , texture_scale) ; } } # [doc = "Texture coordinates for each vertex of the polygon. There should be one `uv` per polygon vertex. If there are fewer, undefined vertices will use `(0, 0)`."] # [doc = ""] # [inline] pub fn set_uv (& self , uv : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_uv ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , uv) ; } } # [doc = "Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use `color`."] # [doc = ""] # [inline] pub fn set_vertex_colors (& self , vertex_colors : PoolArray < Color >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Polygon2DMethodTable :: get (get_api ()) . set_vertex_colors ; let ret = crate :: icalls :: icallvar__colorarr (method_bind , self . this . sys () . as_ptr () , vertex_colors) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Polygon2D { } unsafe impl GodotObject for Polygon2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Polygon2D" } } impl QueueFree for Polygon2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Polygon2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Polygon2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for Polygon2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Polygon2D { } unsafe impl SubClass < crate :: generated :: Node > for Polygon2D { } unsafe impl SubClass < crate :: generated :: Object > for Polygon2D { } impl Instanciable for Polygon2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Polygon2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Polygon2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_bone : * mut sys :: godot_method_bind , pub clear_bones : * mut sys :: godot_method_bind , pub erase_bone : * mut sys :: godot_method_bind , pub get_antialiased : * mut sys :: godot_method_bind , pub get_bone_count : * mut sys :: godot_method_bind , pub get_bone_path : * mut sys :: godot_method_bind , pub get_bone_weights : * mut sys :: godot_method_bind , pub get_color : * mut sys :: godot_method_bind , pub get_internal_vertex_count : * mut sys :: godot_method_bind , pub get_invert : * mut sys :: godot_method_bind , pub get_invert_border : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_polygon : * mut sys :: godot_method_bind , pub get_polygons : * mut sys :: godot_method_bind , pub get_skeleton : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_texture_offset : * mut sys :: godot_method_bind , pub get_texture_rotation : * mut sys :: godot_method_bind , pub get_texture_rotation_degrees : * mut sys :: godot_method_bind , pub get_texture_scale : * mut sys :: godot_method_bind , pub get_uv : * mut sys :: godot_method_bind , pub get_vertex_colors : * mut sys :: godot_method_bind , pub set_antialiased : * mut sys :: godot_method_bind , pub set_bone_path : * mut sys :: godot_method_bind , pub set_bone_weights : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_internal_vertex_count : * mut sys :: godot_method_bind , pub set_invert : * mut sys :: godot_method_bind , pub set_invert_border : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_polygon : * mut sys :: godot_method_bind , pub set_polygons : * mut sys :: godot_method_bind , pub set_skeleton : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_texture_offset : * mut sys :: godot_method_bind , pub set_texture_rotation : * mut sys :: godot_method_bind , pub set_texture_rotation_degrees : * mut sys :: godot_method_bind , pub set_texture_scale : * mut sys :: godot_method_bind , pub set_uv : * mut sys :: godot_method_bind , pub set_vertex_colors : * mut sys :: godot_method_bind } impl Polygon2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Polygon2DMethodTable = Polygon2DMethodTable { class_constructor : None , add_bone : 0 as * mut sys :: godot_method_bind , clear_bones : 0 as * mut sys :: godot_method_bind , erase_bone : 0 as * mut sys :: godot_method_bind , get_antialiased : 0 as * mut sys :: godot_method_bind , get_bone_count : 0 as * mut sys :: godot_method_bind , get_bone_path : 0 as * mut sys :: godot_method_bind , get_bone_weights : 0 as * mut sys :: godot_method_bind , get_color : 0 as * mut sys :: godot_method_bind , get_internal_vertex_count : 0 as * mut sys :: godot_method_bind , get_invert : 0 as * mut sys :: godot_method_bind , get_invert_border : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_polygon : 0 as * mut sys :: godot_method_bind , get_polygons : 0 as * mut sys :: godot_method_bind , get_skeleton : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_texture_offset : 0 as * mut sys :: godot_method_bind , get_texture_rotation : 0 as * mut sys :: godot_method_bind , get_texture_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_texture_scale : 0 as * mut sys :: godot_method_bind , get_uv : 0 as * mut sys :: godot_method_bind , get_vertex_colors : 0 as * mut sys :: godot_method_bind , set_antialiased : 0 as * mut sys :: godot_method_bind , set_bone_path : 0 as * mut sys :: godot_method_bind , set_bone_weights : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_internal_vertex_count : 0 as * mut sys :: godot_method_bind , set_invert : 0 as * mut sys :: godot_method_bind , set_invert_border : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_polygon : 0 as * mut sys :: godot_method_bind , set_polygons : 0 as * mut sys :: godot_method_bind , set_skeleton : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_texture_offset : 0 as * mut sys :: godot_method_bind , set_texture_rotation : 0 as * mut sys :: godot_method_bind , set_texture_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_texture_scale : 0 as * mut sys :: godot_method_bind , set_uv : 0 as * mut sys :: godot_method_bind , set_vertex_colors : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Polygon2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Polygon2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_bone = (gd_api . godot_method_bind_get_method) (class_name , "add_bone\0" . as_ptr () as * const c_char) ; table . clear_bones = (gd_api . godot_method_bind_get_method) (class_name , "clear_bones\0" . as_ptr () as * const c_char) ; table . erase_bone = (gd_api . godot_method_bind_get_method) (class_name , "erase_bone\0" . as_ptr () as * const c_char) ; table . get_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "get_antialiased\0" . as_ptr () as * const c_char) ; table . get_bone_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_count\0" . as_ptr () as * const c_char) ; table . get_bone_path = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_path\0" . as_ptr () as * const c_char) ; table . get_bone_weights = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_weights\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_internal_vertex_count = (gd_api . godot_method_bind_get_method) (class_name , "get_internal_vertex_count\0" . as_ptr () as * const c_char) ; table . get_invert = (gd_api . godot_method_bind_get_method) (class_name , "get_invert\0" . as_ptr () as * const c_char) ; table . get_invert_border = (gd_api . godot_method_bind_get_method) (class_name , "get_invert_border\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_polygon = (gd_api . godot_method_bind_get_method) (class_name , "get_polygon\0" . as_ptr () as * const c_char) ; table . get_polygons = (gd_api . godot_method_bind_get_method) (class_name , "get_polygons\0" . as_ptr () as * const c_char) ; table . get_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_offset\0" . as_ptr () as * const c_char) ; table . get_texture_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_rotation\0" . as_ptr () as * const c_char) ; table . get_texture_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_scale\0" . as_ptr () as * const c_char) ; table . get_uv = (gd_api . godot_method_bind_get_method) (class_name , "get_uv\0" . as_ptr () as * const c_char) ; table . get_vertex_colors = (gd_api . godot_method_bind_get_method) (class_name , "get_vertex_colors\0" . as_ptr () as * const c_char) ; table . set_antialiased = (gd_api . godot_method_bind_get_method) (class_name , "set_antialiased\0" . as_ptr () as * const c_char) ; table . set_bone_path = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_path\0" . as_ptr () as * const c_char) ; table . set_bone_weights = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_weights\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_internal_vertex_count = (gd_api . godot_method_bind_get_method) (class_name , "set_internal_vertex_count\0" . as_ptr () as * const c_char) ; table . set_invert = (gd_api . godot_method_bind_get_method) (class_name , "set_invert\0" . as_ptr () as * const c_char) ; table . set_invert_border = (gd_api . godot_method_bind_get_method) (class_name , "set_invert_border\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "set_polygon\0" . as_ptr () as * const c_char) ; table . set_polygons = (gd_api . godot_method_bind_get_method) (class_name , "set_polygons\0" . as_ptr () as * const c_char) ; table . set_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "set_skeleton\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_offset\0" . as_ptr () as * const c_char) ; table . set_texture_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_rotation\0" . as_ptr () as * const c_char) ; table . set_texture_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_texture_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_scale\0" . as_ptr () as * const c_char) ; table . set_uv = (gd_api . godot_method_bind_get_method) (class_name , "set_uv\0" . as_ptr () as * const c_char) ; table . set_vertex_colors = (gd_api . godot_method_bind_get_method) (class_name , "set_vertex_colors\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::polygon_2d::private::Polygon2D;
            
            pub(crate) mod polygon_path_finder {
                # ! [doc = "This module contains types related to the API class [`PolygonPathFinder`][super::PolygonPathFinder]."] pub (crate) mod private { # [doc = "`core class PolygonPathFinder` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_polygonpathfinder.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPolygonPathFinder inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PolygonPathFinder { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PolygonPathFinder ; impl PolygonPathFinder { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PolygonPathFinderMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn find_path (& self , from : Vector2 , to : Vector2) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . find_path ; let ret = crate :: icalls :: icallvar__vec2_vec2 (method_bind , self . this . sys () . as_ptr () , from , to) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_bounds (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . get_bounds ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_closest_point (& self , point : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . get_closest_point ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , point) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_intersections (& self , from : Vector2 , to : Vector2) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . get_intersections ; let ret = crate :: icalls :: icallvar__vec2_vec2 (method_bind , self . this . sys () . as_ptr () , from , to) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_point_penalty (& self , idx : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . get_point_penalty ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_point_inside (& self , point : Vector2) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . is_point_inside ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , point) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_point_penalty (& self , idx : i64 , penalty : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . set_point_penalty ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , idx as _ , penalty as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn setup (& self , points : PoolArray < Vector2 > , connections : PoolArray < i32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PolygonPathFinderMethodTable :: get (get_api ()) . setup ; let ret = crate :: icalls :: icallvar__vec2arr_i32arr (method_bind , self . this . sys () . as_ptr () , points , connections) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PolygonPathFinder { } unsafe impl GodotObject for PolygonPathFinder { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PolygonPathFinder" } } impl std :: ops :: Deref for PolygonPathFinder { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PolygonPathFinder { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for PolygonPathFinder { } unsafe impl SubClass < crate :: generated :: Reference > for PolygonPathFinder { } unsafe impl SubClass < crate :: generated :: Object > for PolygonPathFinder { } impl Instanciable for PolygonPathFinder { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PolygonPathFinder :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PolygonPathFinderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub find_path : * mut sys :: godot_method_bind , pub get_bounds : * mut sys :: godot_method_bind , pub get_closest_point : * mut sys :: godot_method_bind , pub get_intersections : * mut sys :: godot_method_bind , pub get_point_penalty : * mut sys :: godot_method_bind , pub is_point_inside : * mut sys :: godot_method_bind , pub set_point_penalty : * mut sys :: godot_method_bind , pub setup : * mut sys :: godot_method_bind } impl PolygonPathFinderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PolygonPathFinderMethodTable = PolygonPathFinderMethodTable { class_constructor : None , find_path : 0 as * mut sys :: godot_method_bind , get_bounds : 0 as * mut sys :: godot_method_bind , get_closest_point : 0 as * mut sys :: godot_method_bind , get_intersections : 0 as * mut sys :: godot_method_bind , get_point_penalty : 0 as * mut sys :: godot_method_bind , is_point_inside : 0 as * mut sys :: godot_method_bind , set_point_penalty : 0 as * mut sys :: godot_method_bind , setup : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PolygonPathFinderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PolygonPathFinder\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . find_path = (gd_api . godot_method_bind_get_method) (class_name , "find_path\0" . as_ptr () as * const c_char) ; table . get_bounds = (gd_api . godot_method_bind_get_method) (class_name , "get_bounds\0" . as_ptr () as * const c_char) ; table . get_closest_point = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point\0" . as_ptr () as * const c_char) ; table . get_intersections = (gd_api . godot_method_bind_get_method) (class_name , "get_intersections\0" . as_ptr () as * const c_char) ; table . get_point_penalty = (gd_api . godot_method_bind_get_method) (class_name , "get_point_penalty\0" . as_ptr () as * const c_char) ; table . is_point_inside = (gd_api . godot_method_bind_get_method) (class_name , "is_point_inside\0" . as_ptr () as * const c_char) ; table . set_point_penalty = (gd_api . godot_method_bind_get_method) (class_name , "set_point_penalty\0" . as_ptr () as * const c_char) ; table . setup = (gd_api . godot_method_bind_get_method) (class_name , "setup\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::polygon_path_finder::private::PolygonPathFinder;
            
            pub(crate) mod popup {
                # ! [doc = "This module contains types related to the API class [`Popup`][super::Popup]."] pub (crate) mod private { # [doc = "`core class Popup` inherits `Control` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_popup.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Popup` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Popup>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPopup inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Popup { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Popup ; # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Popup { pub const NOTIFICATION_POST_POPUP : i64 = 80i64 ; pub const NOTIFICATION_POPUP_HIDE : i64 = 81i64 ; } impl Popup { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PopupMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, the popup will not be hidden when a click event occurs outside of it, or when it receives the `ui_cancel` action event.\n**Note:** Enabling this property doesn't affect the Close or Cancel buttons' behavior in dialogs that inherit from this class. As a workaround, you can use [`WindowDialog.get_close_button`][WindowDialog::get_close_button] or [`ConfirmationDialog.get_cancel`][ConfirmationDialog::get_cancel] and hide the buttons in question by setting their [`CanvasItem.visible`][CanvasItem::visible] property to `false`."] # [doc = ""] # [inline] pub fn is_exclusive (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMethodTable :: get (get_api ()) . is_exclusive ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Popup (show the control in modal form).\n# Default Arguments\n* `bounds` - `Rect2( 0, 0, 0, 0 )`"] # [doc = ""] # [inline] pub fn popup (& self , bounds : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMethodTable :: get (get_api ()) . popup ; let ret = crate :: icalls :: icallvar__rect2 (method_bind , self . this . sys () . as_ptr () , bounds) ; } } # [doc = "Popup (show the control in modal form) in the center of the screen relative to its current canvas transform, at the current size, or at a size determined by `size`.\n# Default Arguments\n* `size` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn popup_centered (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMethodTable :: get (get_api ()) . popup_centered ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, clamping the size to `size`, then ensuring the popup is no larger than the viewport size multiplied by `fallback_ratio`.\n# Default Arguments\n* `size` - `Vector2( 0, 0 )`\n* `fallback_ratio` - `0.75`"] # [doc = ""] # [inline] pub fn popup_centered_clamped (& self , size : Vector2 , fallback_ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMethodTable :: get (get_api ()) . popup_centered_clamped ; let ret = crate :: icalls :: icallvar__vec2_f64 (method_bind , self . this . sys () . as_ptr () , size , fallback_ratio as _) ; } } # [doc = "Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, ensuring the size is never smaller than `minsize`.\n# Default Arguments\n* `minsize` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn popup_centered_minsize (& self , minsize : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMethodTable :: get (get_api ()) . popup_centered_minsize ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , minsize) ; } } # [doc = "Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, scaled at a ratio of size of the screen.\n# Default Arguments\n* `ratio` - `0.75`"] # [doc = ""] # [inline] pub fn popup_centered_ratio (& self , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMethodTable :: get (get_api ()) . popup_centered_ratio ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ratio as _) ; } } # [doc = "Shrink popup to keep to the minimum size of content."] # [doc = ""] # [inline] pub fn set_as_minsize (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMethodTable :: get (get_api ()) . set_as_minsize ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the popup will not be hidden when a click event occurs outside of it, or when it receives the `ui_cancel` action event.\n**Note:** Enabling this property doesn't affect the Close or Cancel buttons' behavior in dialogs that inherit from this class. As a workaround, you can use [`WindowDialog.get_close_button`][WindowDialog::get_close_button] or [`ConfirmationDialog.get_cancel`][ConfirmationDialog::get_cancel] and hide the buttons in question by setting their [`CanvasItem.visible`][CanvasItem::visible] property to `false`."] # [doc = ""] # [inline] pub fn set_exclusive (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMethodTable :: get (get_api ()) . set_exclusive ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Popup { } unsafe impl GodotObject for Popup { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Popup" } } impl QueueFree for Popup { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Popup { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Popup { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for Popup { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Popup { } unsafe impl SubClass < crate :: generated :: Node > for Popup { } unsafe impl SubClass < crate :: generated :: Object > for Popup { } impl Instanciable for Popup { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Popup :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PopupMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_exclusive : * mut sys :: godot_method_bind , pub popup : * mut sys :: godot_method_bind , pub popup_centered : * mut sys :: godot_method_bind , pub popup_centered_clamped : * mut sys :: godot_method_bind , pub popup_centered_minsize : * mut sys :: godot_method_bind , pub popup_centered_ratio : * mut sys :: godot_method_bind , pub set_as_minsize : * mut sys :: godot_method_bind , pub set_exclusive : * mut sys :: godot_method_bind } impl PopupMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PopupMethodTable = PopupMethodTable { class_constructor : None , is_exclusive : 0 as * mut sys :: godot_method_bind , popup : 0 as * mut sys :: godot_method_bind , popup_centered : 0 as * mut sys :: godot_method_bind , popup_centered_clamped : 0 as * mut sys :: godot_method_bind , popup_centered_minsize : 0 as * mut sys :: godot_method_bind , popup_centered_ratio : 0 as * mut sys :: godot_method_bind , set_as_minsize : 0 as * mut sys :: godot_method_bind , set_exclusive : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PopupMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Popup\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_exclusive = (gd_api . godot_method_bind_get_method) (class_name , "is_exclusive\0" . as_ptr () as * const c_char) ; table . popup = (gd_api . godot_method_bind_get_method) (class_name , "popup\0" . as_ptr () as * const c_char) ; table . popup_centered = (gd_api . godot_method_bind_get_method) (class_name , "popup_centered\0" . as_ptr () as * const c_char) ; table . popup_centered_clamped = (gd_api . godot_method_bind_get_method) (class_name , "popup_centered_clamped\0" . as_ptr () as * const c_char) ; table . popup_centered_minsize = (gd_api . godot_method_bind_get_method) (class_name , "popup_centered_minsize\0" . as_ptr () as * const c_char) ; table . popup_centered_ratio = (gd_api . godot_method_bind_get_method) (class_name , "popup_centered_ratio\0" . as_ptr () as * const c_char) ; table . set_as_minsize = (gd_api . godot_method_bind_get_method) (class_name , "set_as_minsize\0" . as_ptr () as * const c_char) ; table . set_exclusive = (gd_api . godot_method_bind_get_method) (class_name , "set_exclusive\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::popup::private::Popup;
            
            pub(crate) mod popup_dialog {
                # ! [doc = "This module contains types related to the API class [`PopupDialog`][super::PopupDialog]."] pub (crate) mod private { # [doc = "`core class PopupDialog` inherits `Popup` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_popupdialog.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`PopupDialog` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<PopupDialog>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPopupDialog inherits methods from:\n - [Popup](struct.Popup.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PopupDialog { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PopupDialog ; impl PopupDialog { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PopupDialogMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for PopupDialog { } unsafe impl GodotObject for PopupDialog { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PopupDialog" } } impl QueueFree for PopupDialog { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for PopupDialog { type Target = crate :: generated :: Popup ; # [inline] fn deref (& self) -> & crate :: generated :: Popup { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PopupDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Popup { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Popup > for PopupDialog { } unsafe impl SubClass < crate :: generated :: Control > for PopupDialog { } unsafe impl SubClass < crate :: generated :: CanvasItem > for PopupDialog { } unsafe impl SubClass < crate :: generated :: Node > for PopupDialog { } unsafe impl SubClass < crate :: generated :: Object > for PopupDialog { } impl Instanciable for PopupDialog { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PopupDialog :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PopupDialogMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl PopupDialogMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PopupDialogMethodTable = PopupDialogMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PopupDialogMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PopupDialog\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::popup_dialog::private::PopupDialog;
            
            pub(crate) mod popup_menu {
                # ! [doc = "This module contains types related to the API class [`PopupMenu`][super::PopupMenu]."] pub (crate) mod private { # [doc = "`core class PopupMenu` inherits `Popup` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_popupmenu.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`PopupMenu` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<PopupMenu>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPopupMenu inherits methods from:\n - [Popup](struct.Popup.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PopupMenu { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PopupMenu ; impl PopupMenu { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PopupMenuMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a new checkable item with text `label`.\nAn `id` can optionally be provided, as well as an accelerator (`accel`). If no `id` is provided, one will be created from the index. If no `accel` is provided then the default `0` will be assigned to it. See [`get_item_accelerator`][Self::get_item_accelerator] for more info on accelerators.\n**Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [`set_item_checked`][Self::set_item_checked] for more info on how to control it.\n# Default Arguments\n* `id` - `-1`\n* `accel` - `0`"] # [doc = ""] # [inline] pub fn add_check_item (& self , label : impl Into < GodotString > , id : i64 , accel : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_check_item ; let ret = crate :: icalls :: icallvar__str_i64_i64 (method_bind , self . this . sys () . as_ptr () , label . into () , id as _ , accel as _) ; } } # [doc = "Adds a new checkable item and assigns the specified [`ShortCut`][ShortCut] to it. Sets the label of the checkbox to the [`ShortCut`][ShortCut]'s name.\nAn `id` can optionally be provided. If no `id` is provided, one will be created from the index.\n**Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [`set_item_checked`][Self::set_item_checked] for more info on how to control it.\n# Default Arguments\n* `id` - `-1`\n* `global` - `false`"] # [doc = ""] # [inline] pub fn add_check_shortcut (& self , shortcut : impl AsArg < crate :: generated :: ShortCut > , id : i64 , global : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_check_shortcut ; let ret = crate :: icalls :: icallvar__obj_i64_bool (method_bind , self . this . sys () . as_ptr () , shortcut . as_arg_ptr () , id as _ , global as _) ; } } # [doc = "Adds a new checkable item with text `label` and icon `texture`.\nAn `id` can optionally be provided, as well as an accelerator (`accel`). If no `id` is provided, one will be created from the index. If no `accel` is provided then the default `0` will be assigned to it. See [`get_item_accelerator`][Self::get_item_accelerator] for more info on accelerators.\n**Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [`set_item_checked`][Self::set_item_checked] for more info on how to control it.\n# Default Arguments\n* `id` - `-1`\n* `accel` - `0`"] # [doc = ""] # [inline] pub fn add_icon_check_item (& self , texture : impl AsArg < crate :: generated :: Texture > , label : impl Into < GodotString > , id : i64 , accel : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_icon_check_item ; let ret = crate :: icalls :: icallvar__obj_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , label . into () , id as _ , accel as _) ; } } # [doc = "Adds a new checkable item and assigns the specified [`ShortCut`][ShortCut] and icon `texture` to it. Sets the label of the checkbox to the [`ShortCut`][ShortCut]'s name.\nAn `id` can optionally be provided. If no `id` is provided, one will be created from the index.\n**Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [`set_item_checked`][Self::set_item_checked] for more info on how to control it.\n# Default Arguments\n* `id` - `-1`\n* `global` - `false`"] # [doc = ""] # [inline] pub fn add_icon_check_shortcut (& self , texture : impl AsArg < crate :: generated :: Texture > , shortcut : impl AsArg < crate :: generated :: ShortCut > , id : i64 , global : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_icon_check_shortcut ; let ret = crate :: icalls :: icallvar__obj_obj_i64_bool (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , shortcut . as_arg_ptr () , id as _ , global as _) ; } } # [doc = "Adds a new item with text `label` and icon `texture`.\nAn `id` can optionally be provided, as well as an accelerator (`accel`). If no `id` is provided, one will be created from the index. If no `accel` is provided then the default `0` will be assigned to it. See [`get_item_accelerator`][Self::get_item_accelerator] for more info on accelerators.\n# Default Arguments\n* `id` - `-1`\n* `accel` - `0`"] # [doc = ""] # [inline] pub fn add_icon_item (& self , texture : impl AsArg < crate :: generated :: Texture > , label : impl Into < GodotString > , id : i64 , accel : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_icon_item ; let ret = crate :: icalls :: icallvar__obj_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , label . into () , id as _ , accel as _) ; } } # [doc = "Same as [`add_icon_check_item`][Self::add_icon_check_item], but uses a radio check button.\n# Default Arguments\n* `id` - `-1`\n* `accel` - `0`"] # [doc = ""] # [inline] pub fn add_icon_radio_check_item (& self , texture : impl AsArg < crate :: generated :: Texture > , label : impl Into < GodotString > , id : i64 , accel : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_icon_radio_check_item ; let ret = crate :: icalls :: icallvar__obj_str_i64_i64 (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , label . into () , id as _ , accel as _) ; } } # [doc = "Same as [`add_icon_check_shortcut`][Self::add_icon_check_shortcut], but uses a radio check button.\n# Default Arguments\n* `id` - `-1`\n* `global` - `false`"] # [doc = ""] # [inline] pub fn add_icon_radio_check_shortcut (& self , texture : impl AsArg < crate :: generated :: Texture > , shortcut : impl AsArg < crate :: generated :: ShortCut > , id : i64 , global : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_icon_radio_check_shortcut ; let ret = crate :: icalls :: icallvar__obj_obj_i64_bool (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , shortcut . as_arg_ptr () , id as _ , global as _) ; } } # [doc = "Adds a new item and assigns the specified [`ShortCut`][ShortCut] and icon `texture` to it. Sets the label of the checkbox to the [`ShortCut`][ShortCut]'s name.\nAn `id` can optionally be provided. If no `id` is provided, one will be created from the index.\n# Default Arguments\n* `id` - `-1`\n* `global` - `false`"] # [doc = ""] # [inline] pub fn add_icon_shortcut (& self , texture : impl AsArg < crate :: generated :: Texture > , shortcut : impl AsArg < crate :: generated :: ShortCut > , id : i64 , global : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_icon_shortcut ; let ret = crate :: icalls :: icallvar__obj_obj_i64_bool (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr () , shortcut . as_arg_ptr () , id as _ , global as _) ; } } # [doc = "Adds a new item with text `label`.\nAn `id` can optionally be provided, as well as an accelerator (`accel`). If no `id` is provided, one will be created from the index. If no `accel` is provided then the default `0` will be assigned to it. See [`get_item_accelerator`][Self::get_item_accelerator] for more info on accelerators.\n# Default Arguments\n* `id` - `-1`\n* `accel` - `0`"] # [doc = ""] # [inline] pub fn add_item (& self , label : impl Into < GodotString > , id : i64 , accel : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_item ; let ret = crate :: icalls :: icallvar__str_i64_i64 (method_bind , self . this . sys () . as_ptr () , label . into () , id as _ , accel as _) ; } } # [doc = "Adds a new multistate item with text `label`.\nContrarily to normal binary items, multistate items can have more than two states, as defined by `max_states`. Each press or activate of the item will increase the state by one. The default value is defined by `default_state`.\nAn `id` can optionally be provided, as well as an accelerator (`accel`). If no `id` is provided, one will be created from the index. If no `accel` is provided then the default `0` will be assigned to it. See [`get_item_accelerator`][Self::get_item_accelerator] for more info on accelerators.\n# Default Arguments\n* `default_state` - `0`\n* `id` - `-1`\n* `accel` - `0`"] # [doc = ""] # [inline] pub fn add_multistate_item (& self , label : impl Into < GodotString > , max_states : i64 , default_state : i64 , id : i64 , accel : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_multistate_item ; let ret = crate :: icalls :: icallvar__str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , label . into () , max_states as _ , default_state as _ , id as _ , accel as _) ; } } # [doc = "Adds a new radio check button with text `label`.\nAn `id` can optionally be provided, as well as an accelerator (`accel`). If no `id` is provided, one will be created from the index. If no `accel` is provided then the default `0` will be assigned to it. See [`get_item_accelerator`][Self::get_item_accelerator] for more info on accelerators.\n**Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [`set_item_checked`][Self::set_item_checked] for more info on how to control it.\n# Default Arguments\n* `id` - `-1`\n* `accel` - `0`"] # [doc = ""] # [inline] pub fn add_radio_check_item (& self , label : impl Into < GodotString > , id : i64 , accel : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_radio_check_item ; let ret = crate :: icalls :: icallvar__str_i64_i64 (method_bind , self . this . sys () . as_ptr () , label . into () , id as _ , accel as _) ; } } # [doc = "Adds a new radio check button and assigns a [`ShortCut`][ShortCut] to it. Sets the label of the checkbox to the [`ShortCut`][ShortCut]'s name.\nAn `id` can optionally be provided. If no `id` is provided, one will be created from the index.\n**Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [`set_item_checked`][Self::set_item_checked] for more info on how to control it.\n# Default Arguments\n* `id` - `-1`\n* `global` - `false`"] # [doc = ""] # [inline] pub fn add_radio_check_shortcut (& self , shortcut : impl AsArg < crate :: generated :: ShortCut > , id : i64 , global : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_radio_check_shortcut ; let ret = crate :: icalls :: icallvar__obj_i64_bool (method_bind , self . this . sys () . as_ptr () , shortcut . as_arg_ptr () , id as _ , global as _) ; } } # [doc = "Adds a separator between items. Separators also occupy an index, which you can set by using the `id` parameter.\nA `label` can optionally be provided, which will appear at the center of the separator.\n# Default Arguments\n* `label` - `\"\"`\n* `id` - `-1`"] # [doc = ""] # [inline] pub fn add_separator (& self , label : impl Into < GodotString > , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_separator ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , label . into () , id as _) ; } } # [doc = "Adds a [`ShortCut`][ShortCut].\nAn `id` can optionally be provided. If no `id` is provided, one will be created from the index.\n# Default Arguments\n* `id` - `-1`\n* `global` - `false`"] # [doc = ""] # [inline] pub fn add_shortcut (& self , shortcut : impl AsArg < crate :: generated :: ShortCut > , id : i64 , global : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_shortcut ; let ret = crate :: icalls :: icallvar__obj_i64_bool (method_bind , self . this . sys () . as_ptr () , shortcut . as_arg_ptr () , id as _ , global as _) ; } } # [doc = "Adds an item that will act as a submenu of the parent [`PopupMenu`][PopupMenu] node when clicked. The `submenu` argument is the name of the child [`PopupMenu`][PopupMenu] node that will be shown when the item is clicked.\nAn `id` can optionally be provided. If no `id` is provided, one will be created from the index.\n# Default Arguments\n* `id` - `-1`"] # [doc = ""] # [inline] pub fn add_submenu_item (& self , label : impl Into < GodotString > , submenu : impl Into < GodotString > , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . add_submenu_item ; let ret = crate :: icalls :: icallvar__str_str_i64 (method_bind , self . this . sys () . as_ptr () , label . into () , submenu . into () , id as _) ; } } # [doc = "Removes all items from the [`PopupMenu`][PopupMenu]."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, allows navigating [`PopupMenu`][PopupMenu] with letter keys."] # [doc = ""] # [inline] pub fn allow_search (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . get_allow_search ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the index of the currently focused item. Returns `-1` if no item is focused."] # [doc = ""] # [inline] pub fn get_current_index (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . get_current_index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the accelerator of the item at index `idx`. Accelerators are special combinations of keys that activate the item, no matter which control is focused."] # [doc = ""] # [inline] pub fn get_item_accelerator (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . get_item_accelerator ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of items in the [`PopupMenu`][PopupMenu]."] # [doc = ""] # [inline] pub fn get_item_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . get_item_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the icon of the item at index `idx`."] # [doc = ""] # [inline] pub fn get_item_icon (& self , idx : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . get_item_icon ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the id of the item at index `idx`. `id` can be manually assigned, while index can not."] # [doc = ""] # [inline] pub fn get_item_id (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . get_item_id ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the index of the item containing the specified `id`. Index is automatically assigned to each item by the engine. Index can not be set manually."] # [doc = ""] # [inline] pub fn get_item_index (& self , id : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . get_item_index ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the metadata of the specified item, which might be of any type. You can set it with [`set_item_metadata`][Self::set_item_metadata], which provides a simple way of assigning context data to items."] # [doc = ""] # [inline] pub fn get_item_metadata (& self , idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . get_item_metadata ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`ShortCut`][ShortCut] associated with the specified `idx` item."] # [doc = ""] # [inline] pub fn get_item_shortcut (& self , idx : i64) -> Option < Ref < crate :: generated :: ShortCut , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . get_item_shortcut ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: ShortCut , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the submenu name of the item at index `idx`. See [`add_submenu_item`][Self::add_submenu_item] for more info on how to add a submenu."] # [doc = ""] # [inline] pub fn get_item_submenu (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . get_item_submenu ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the text of the item at index `idx`."] # [doc = ""] # [inline] pub fn get_item_text (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . get_item_text ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tooltip associated with the specified index `idx`."] # [doc = ""] # [inline] pub fn get_item_tooltip (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . get_item_tooltip ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the delay time in seconds for the submenu item to popup on mouse hovering. If the popup menu is added as a child of another (acting as a submenu), it will inherit the delay time of the parent menu item."] # [doc = ""] # [inline] pub fn submenu_popup_delay (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . get_submenu_popup_delay ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, hides the [`PopupMenu`][PopupMenu] when a checkbox or radio button is selected."] # [doc = ""] # [inline] pub fn is_hide_on_checkable_item_selection (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . is_hide_on_checkable_item_selection ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, hides the [`PopupMenu`][PopupMenu] when an item is selected."] # [doc = ""] # [inline] pub fn is_hide_on_item_selection (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . is_hide_on_item_selection ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, hides the [`PopupMenu`][PopupMenu] when a state item is selected."] # [doc = ""] # [inline] pub fn is_hide_on_state_item_selection (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . is_hide_on_state_item_selection ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the popup will be hidden when the window loses focus or not."] # [doc = ""] # [inline] pub fn is_hide_on_window_lose_focus (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . is_hide_on_window_lose_focus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the item at index `idx` is checkable in some way, i.e. if it has a checkbox or radio button.\n**Note:** Checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually."] # [doc = ""] # [inline] pub fn is_item_checkable (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . is_item_checkable ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the item at index `idx` is checked."] # [doc = ""] # [inline] pub fn is_item_checked (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . is_item_checked ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the item at index `idx` is disabled. When it is disabled it can't be selected, or its action invoked.\nSee [`set_item_disabled`][Self::set_item_disabled] for more info on how to disable an item."] # [doc = ""] # [inline] pub fn is_item_disabled (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . is_item_disabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the item at index `idx` has radio button-style checkability.\n**Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups."] # [doc = ""] # [inline] pub fn is_item_radio_checkable (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . is_item_radio_checkable ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the item is a separator. If it is, it will be displayed as a line. See [`add_separator`][Self::add_separator] for more info on how to add a separator."] # [doc = ""] # [inline] pub fn is_item_separator (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . is_item_separator ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the specified item's shortcut is disabled."] # [doc = ""] # [inline] pub fn is_item_shortcut_disabled (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . is_item_shortcut_disabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes the item at index `idx` from the menu.\n**Note:** The indices of items after the removed item will be shifted by one."] # [doc = ""] # [inline] pub fn remove_item (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . remove_item ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; } } # [doc = "If `true`, allows navigating [`PopupMenu`][PopupMenu] with letter keys."] # [doc = ""] # [inline] pub fn set_allow_search (& self , allow : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_allow_search ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , allow as _) ; } } # [doc = "Sets the currently focused item as the given `index`.\nPassing `-1` as the index makes so that no item is focused."] # [doc = ""] # [inline] pub fn set_current_index (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_current_index ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } # [doc = "If `true`, hides the [`PopupMenu`][PopupMenu] when a checkbox or radio button is selected."] # [doc = ""] # [inline] pub fn set_hide_on_checkable_item_selection (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_hide_on_checkable_item_selection ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, hides the [`PopupMenu`][PopupMenu] when an item is selected."] # [doc = ""] # [inline] pub fn set_hide_on_item_selection (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_hide_on_item_selection ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, hides the [`PopupMenu`][PopupMenu] when a state item is selected."] # [doc = ""] # [inline] pub fn set_hide_on_state_item_selection (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_hide_on_state_item_selection ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Hides the [`PopupMenu`][PopupMenu] when the window loses focus."] # [doc = ""] # [inline] pub fn set_hide_on_window_lose_focus (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_hide_on_window_lose_focus ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Sets the accelerator of the item at index `idx`. Accelerators are special combinations of keys that activate the item, no matter which control is focused."] # [doc = ""] # [inline] pub fn set_item_accelerator (& self , idx : i64 , accel : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_accelerator ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , idx as _ , accel as _) ; } } # [doc = "Sets whether the item at index `idx` has a checkbox. If `false`, sets the type of the item to plain text.\n**Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually."] # [doc = ""] # [inline] pub fn set_item_as_checkable (& self , idx : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_as_checkable ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , enable as _) ; } } # [doc = "Sets the type of the item at the specified index `idx` to radio button. If `false`, sets the type of the item to plain text."] # [doc = ""] # [inline] pub fn set_item_as_radio_checkable (& self , idx : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_as_radio_checkable ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , enable as _) ; } } # [doc = "Mark the item at index `idx` as a separator, which means that it would be displayed as a line. If `false`, sets the type of the item to plain text."] # [doc = ""] # [inline] pub fn set_item_as_separator (& self , idx : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_as_separator ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , enable as _) ; } } # [doc = "Sets the checkstate status of the item at index `idx`."] # [doc = ""] # [inline] pub fn set_item_checked (& self , idx : i64 , checked : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_checked ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , checked as _) ; } } # [doc = "Enables/disables the item at index `idx`. When it is disabled, it can't be selected and its action can't be invoked."] # [doc = ""] # [inline] pub fn set_item_disabled (& self , idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_disabled ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , disabled as _) ; } } # [doc = "Replaces the [`Texture`][Texture] icon of the specified `idx`."] # [doc = ""] # [inline] pub fn set_item_icon (& self , idx : i64 , icon : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_icon ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , idx as _ , icon . as_arg_ptr ()) ; } } # [doc = "Sets the `id` of the item at index `idx`."] # [doc = ""] # [inline] pub fn set_item_id (& self , idx : i64 , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_id ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , idx as _ , id as _) ; } } # [doc = "Sets the metadata of an item, which may be of any type. You can later get it with [`get_item_metadata`][Self::get_item_metadata], which provides a simple way of assigning context data to items."] # [doc = ""] # [inline] pub fn set_item_metadata (& self , idx : i64 , metadata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_metadata ; let ret = crate :: icalls :: icallvar__i64_var (method_bind , self . this . sys () . as_ptr () , idx as _ , metadata . owned_to_variant ()) ; } } # [doc = "Sets the state of a multistate item. See [`add_multistate_item`][Self::add_multistate_item] for details."] # [doc = ""] # [inline] pub fn set_item_multistate (& self , idx : i64 , state : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_multistate ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , idx as _ , state as _) ; } } # [doc = "Sets a [`ShortCut`][ShortCut] for the specified item `idx`.\n# Default Arguments\n* `global` - `false`"] # [doc = ""] # [inline] pub fn set_item_shortcut (& self , idx : i64 , shortcut : impl AsArg < crate :: generated :: ShortCut > , global : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_shortcut ; let ret = crate :: icalls :: icallvar__i64_obj_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , shortcut . as_arg_ptr () , global as _) ; } } # [doc = "Disables the [`ShortCut`][ShortCut] of the specified index `idx`."] # [doc = ""] # [inline] pub fn set_item_shortcut_disabled (& self , idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_shortcut_disabled ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , disabled as _) ; } } # [doc = "Sets the submenu of the item at index `idx`. The submenu is the name of a child [`PopupMenu`][PopupMenu] node that would be shown when the item is clicked."] # [doc = ""] # [inline] pub fn set_item_submenu (& self , idx : i64 , submenu : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_submenu ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , idx as _ , submenu . into ()) ; } } # [doc = "Sets the text of the item at index `idx`."] # [doc = ""] # [inline] pub fn set_item_text (& self , idx : i64 , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_text ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , idx as _ , text . into ()) ; } } # [doc = "Sets the [`String`][GodotString] tooltip of the item at the specified index `idx`."] # [doc = ""] # [inline] pub fn set_item_tooltip (& self , idx : i64 , tooltip : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_item_tooltip ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , idx as _ , tooltip . into ()) ; } } # [doc = "Sets the delay time in seconds for the submenu item to popup on mouse hovering. If the popup menu is added as a child of another (acting as a submenu), it will inherit the delay time of the parent menu item."] # [doc = ""] # [inline] pub fn set_submenu_popup_delay (& self , seconds : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . set_submenu_popup_delay ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , seconds as _) ; } } # [doc = "Toggles the check state of the item of the specified index `idx`."] # [doc = ""] # [inline] pub fn toggle_item_checked (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . toggle_item_checked ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; } } # [doc = "Cycle to the next state of a multistate item. See [`add_multistate_item`][Self::add_multistate_item] for details."] # [doc = ""] # [inline] pub fn toggle_item_multistate (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PopupMenuMethodTable :: get (get_api ()) . toggle_item_multistate ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PopupMenu { } unsafe impl GodotObject for PopupMenu { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PopupMenu" } } impl QueueFree for PopupMenu { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for PopupMenu { type Target = crate :: generated :: Popup ; # [inline] fn deref (& self) -> & crate :: generated :: Popup { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PopupMenu { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Popup { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Popup > for PopupMenu { } unsafe impl SubClass < crate :: generated :: Control > for PopupMenu { } unsafe impl SubClass < crate :: generated :: CanvasItem > for PopupMenu { } unsafe impl SubClass < crate :: generated :: Node > for PopupMenu { } unsafe impl SubClass < crate :: generated :: Object > for PopupMenu { } impl Instanciable for PopupMenu { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PopupMenu :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PopupMenuMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_check_item : * mut sys :: godot_method_bind , pub add_check_shortcut : * mut sys :: godot_method_bind , pub add_icon_check_item : * mut sys :: godot_method_bind , pub add_icon_check_shortcut : * mut sys :: godot_method_bind , pub add_icon_item : * mut sys :: godot_method_bind , pub add_icon_radio_check_item : * mut sys :: godot_method_bind , pub add_icon_radio_check_shortcut : * mut sys :: godot_method_bind , pub add_icon_shortcut : * mut sys :: godot_method_bind , pub add_item : * mut sys :: godot_method_bind , pub add_multistate_item : * mut sys :: godot_method_bind , pub add_radio_check_item : * mut sys :: godot_method_bind , pub add_radio_check_shortcut : * mut sys :: godot_method_bind , pub add_separator : * mut sys :: godot_method_bind , pub add_shortcut : * mut sys :: godot_method_bind , pub add_submenu_item : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub get_allow_search : * mut sys :: godot_method_bind , pub get_current_index : * mut sys :: godot_method_bind , pub get_item_accelerator : * mut sys :: godot_method_bind , pub get_item_count : * mut sys :: godot_method_bind , pub get_item_icon : * mut sys :: godot_method_bind , pub get_item_id : * mut sys :: godot_method_bind , pub get_item_index : * mut sys :: godot_method_bind , pub get_item_metadata : * mut sys :: godot_method_bind , pub get_item_shortcut : * mut sys :: godot_method_bind , pub get_item_submenu : * mut sys :: godot_method_bind , pub get_item_text : * mut sys :: godot_method_bind , pub get_item_tooltip : * mut sys :: godot_method_bind , pub get_submenu_popup_delay : * mut sys :: godot_method_bind , pub is_hide_on_checkable_item_selection : * mut sys :: godot_method_bind , pub is_hide_on_item_selection : * mut sys :: godot_method_bind , pub is_hide_on_state_item_selection : * mut sys :: godot_method_bind , pub is_hide_on_window_lose_focus : * mut sys :: godot_method_bind , pub is_item_checkable : * mut sys :: godot_method_bind , pub is_item_checked : * mut sys :: godot_method_bind , pub is_item_disabled : * mut sys :: godot_method_bind , pub is_item_radio_checkable : * mut sys :: godot_method_bind , pub is_item_separator : * mut sys :: godot_method_bind , pub is_item_shortcut_disabled : * mut sys :: godot_method_bind , pub remove_item : * mut sys :: godot_method_bind , pub set_allow_search : * mut sys :: godot_method_bind , pub set_current_index : * mut sys :: godot_method_bind , pub set_hide_on_checkable_item_selection : * mut sys :: godot_method_bind , pub set_hide_on_item_selection : * mut sys :: godot_method_bind , pub set_hide_on_state_item_selection : * mut sys :: godot_method_bind , pub set_hide_on_window_lose_focus : * mut sys :: godot_method_bind , pub set_item_accelerator : * mut sys :: godot_method_bind , pub set_item_as_checkable : * mut sys :: godot_method_bind , pub set_item_as_radio_checkable : * mut sys :: godot_method_bind , pub set_item_as_separator : * mut sys :: godot_method_bind , pub set_item_checked : * mut sys :: godot_method_bind , pub set_item_disabled : * mut sys :: godot_method_bind , pub set_item_icon : * mut sys :: godot_method_bind , pub set_item_id : * mut sys :: godot_method_bind , pub set_item_metadata : * mut sys :: godot_method_bind , pub set_item_multistate : * mut sys :: godot_method_bind , pub set_item_shortcut : * mut sys :: godot_method_bind , pub set_item_shortcut_disabled : * mut sys :: godot_method_bind , pub set_item_submenu : * mut sys :: godot_method_bind , pub set_item_text : * mut sys :: godot_method_bind , pub set_item_tooltip : * mut sys :: godot_method_bind , pub set_submenu_popup_delay : * mut sys :: godot_method_bind , pub toggle_item_checked : * mut sys :: godot_method_bind , pub toggle_item_multistate : * mut sys :: godot_method_bind } impl PopupMenuMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PopupMenuMethodTable = PopupMenuMethodTable { class_constructor : None , add_check_item : 0 as * mut sys :: godot_method_bind , add_check_shortcut : 0 as * mut sys :: godot_method_bind , add_icon_check_item : 0 as * mut sys :: godot_method_bind , add_icon_check_shortcut : 0 as * mut sys :: godot_method_bind , add_icon_item : 0 as * mut sys :: godot_method_bind , add_icon_radio_check_item : 0 as * mut sys :: godot_method_bind , add_icon_radio_check_shortcut : 0 as * mut sys :: godot_method_bind , add_icon_shortcut : 0 as * mut sys :: godot_method_bind , add_item : 0 as * mut sys :: godot_method_bind , add_multistate_item : 0 as * mut sys :: godot_method_bind , add_radio_check_item : 0 as * mut sys :: godot_method_bind , add_radio_check_shortcut : 0 as * mut sys :: godot_method_bind , add_separator : 0 as * mut sys :: godot_method_bind , add_shortcut : 0 as * mut sys :: godot_method_bind , add_submenu_item : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , get_allow_search : 0 as * mut sys :: godot_method_bind , get_current_index : 0 as * mut sys :: godot_method_bind , get_item_accelerator : 0 as * mut sys :: godot_method_bind , get_item_count : 0 as * mut sys :: godot_method_bind , get_item_icon : 0 as * mut sys :: godot_method_bind , get_item_id : 0 as * mut sys :: godot_method_bind , get_item_index : 0 as * mut sys :: godot_method_bind , get_item_metadata : 0 as * mut sys :: godot_method_bind , get_item_shortcut : 0 as * mut sys :: godot_method_bind , get_item_submenu : 0 as * mut sys :: godot_method_bind , get_item_text : 0 as * mut sys :: godot_method_bind , get_item_tooltip : 0 as * mut sys :: godot_method_bind , get_submenu_popup_delay : 0 as * mut sys :: godot_method_bind , is_hide_on_checkable_item_selection : 0 as * mut sys :: godot_method_bind , is_hide_on_item_selection : 0 as * mut sys :: godot_method_bind , is_hide_on_state_item_selection : 0 as * mut sys :: godot_method_bind , is_hide_on_window_lose_focus : 0 as * mut sys :: godot_method_bind , is_item_checkable : 0 as * mut sys :: godot_method_bind , is_item_checked : 0 as * mut sys :: godot_method_bind , is_item_disabled : 0 as * mut sys :: godot_method_bind , is_item_radio_checkable : 0 as * mut sys :: godot_method_bind , is_item_separator : 0 as * mut sys :: godot_method_bind , is_item_shortcut_disabled : 0 as * mut sys :: godot_method_bind , remove_item : 0 as * mut sys :: godot_method_bind , set_allow_search : 0 as * mut sys :: godot_method_bind , set_current_index : 0 as * mut sys :: godot_method_bind , set_hide_on_checkable_item_selection : 0 as * mut sys :: godot_method_bind , set_hide_on_item_selection : 0 as * mut sys :: godot_method_bind , set_hide_on_state_item_selection : 0 as * mut sys :: godot_method_bind , set_hide_on_window_lose_focus : 0 as * mut sys :: godot_method_bind , set_item_accelerator : 0 as * mut sys :: godot_method_bind , set_item_as_checkable : 0 as * mut sys :: godot_method_bind , set_item_as_radio_checkable : 0 as * mut sys :: godot_method_bind , set_item_as_separator : 0 as * mut sys :: godot_method_bind , set_item_checked : 0 as * mut sys :: godot_method_bind , set_item_disabled : 0 as * mut sys :: godot_method_bind , set_item_icon : 0 as * mut sys :: godot_method_bind , set_item_id : 0 as * mut sys :: godot_method_bind , set_item_metadata : 0 as * mut sys :: godot_method_bind , set_item_multistate : 0 as * mut sys :: godot_method_bind , set_item_shortcut : 0 as * mut sys :: godot_method_bind , set_item_shortcut_disabled : 0 as * mut sys :: godot_method_bind , set_item_submenu : 0 as * mut sys :: godot_method_bind , set_item_text : 0 as * mut sys :: godot_method_bind , set_item_tooltip : 0 as * mut sys :: godot_method_bind , set_submenu_popup_delay : 0 as * mut sys :: godot_method_bind , toggle_item_checked : 0 as * mut sys :: godot_method_bind , toggle_item_multistate : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PopupMenuMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PopupMenu\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_check_item = (gd_api . godot_method_bind_get_method) (class_name , "add_check_item\0" . as_ptr () as * const c_char) ; table . add_check_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "add_check_shortcut\0" . as_ptr () as * const c_char) ; table . add_icon_check_item = (gd_api . godot_method_bind_get_method) (class_name , "add_icon_check_item\0" . as_ptr () as * const c_char) ; table . add_icon_check_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "add_icon_check_shortcut\0" . as_ptr () as * const c_char) ; table . add_icon_item = (gd_api . godot_method_bind_get_method) (class_name , "add_icon_item\0" . as_ptr () as * const c_char) ; table . add_icon_radio_check_item = (gd_api . godot_method_bind_get_method) (class_name , "add_icon_radio_check_item\0" . as_ptr () as * const c_char) ; table . add_icon_radio_check_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "add_icon_radio_check_shortcut\0" . as_ptr () as * const c_char) ; table . add_icon_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "add_icon_shortcut\0" . as_ptr () as * const c_char) ; table . add_item = (gd_api . godot_method_bind_get_method) (class_name , "add_item\0" . as_ptr () as * const c_char) ; table . add_multistate_item = (gd_api . godot_method_bind_get_method) (class_name , "add_multistate_item\0" . as_ptr () as * const c_char) ; table . add_radio_check_item = (gd_api . godot_method_bind_get_method) (class_name , "add_radio_check_item\0" . as_ptr () as * const c_char) ; table . add_radio_check_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "add_radio_check_shortcut\0" . as_ptr () as * const c_char) ; table . add_separator = (gd_api . godot_method_bind_get_method) (class_name , "add_separator\0" . as_ptr () as * const c_char) ; table . add_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "add_shortcut\0" . as_ptr () as * const c_char) ; table . add_submenu_item = (gd_api . godot_method_bind_get_method) (class_name , "add_submenu_item\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_allow_search = (gd_api . godot_method_bind_get_method) (class_name , "get_allow_search\0" . as_ptr () as * const c_char) ; table . get_current_index = (gd_api . godot_method_bind_get_method) (class_name , "get_current_index\0" . as_ptr () as * const c_char) ; table . get_item_accelerator = (gd_api . godot_method_bind_get_method) (class_name , "get_item_accelerator\0" . as_ptr () as * const c_char) ; table . get_item_count = (gd_api . godot_method_bind_get_method) (class_name , "get_item_count\0" . as_ptr () as * const c_char) ; table . get_item_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_item_icon\0" . as_ptr () as * const c_char) ; table . get_item_id = (gd_api . godot_method_bind_get_method) (class_name , "get_item_id\0" . as_ptr () as * const c_char) ; table . get_item_index = (gd_api . godot_method_bind_get_method) (class_name , "get_item_index\0" . as_ptr () as * const c_char) ; table . get_item_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_item_metadata\0" . as_ptr () as * const c_char) ; table . get_item_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "get_item_shortcut\0" . as_ptr () as * const c_char) ; table . get_item_submenu = (gd_api . godot_method_bind_get_method) (class_name , "get_item_submenu\0" . as_ptr () as * const c_char) ; table . get_item_text = (gd_api . godot_method_bind_get_method) (class_name , "get_item_text\0" . as_ptr () as * const c_char) ; table . get_item_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "get_item_tooltip\0" . as_ptr () as * const c_char) ; table . get_submenu_popup_delay = (gd_api . godot_method_bind_get_method) (class_name , "get_submenu_popup_delay\0" . as_ptr () as * const c_char) ; table . is_hide_on_checkable_item_selection = (gd_api . godot_method_bind_get_method) (class_name , "is_hide_on_checkable_item_selection\0" . as_ptr () as * const c_char) ; table . is_hide_on_item_selection = (gd_api . godot_method_bind_get_method) (class_name , "is_hide_on_item_selection\0" . as_ptr () as * const c_char) ; table . is_hide_on_state_item_selection = (gd_api . godot_method_bind_get_method) (class_name , "is_hide_on_state_item_selection\0" . as_ptr () as * const c_char) ; table . is_hide_on_window_lose_focus = (gd_api . godot_method_bind_get_method) (class_name , "is_hide_on_window_lose_focus\0" . as_ptr () as * const c_char) ; table . is_item_checkable = (gd_api . godot_method_bind_get_method) (class_name , "is_item_checkable\0" . as_ptr () as * const c_char) ; table . is_item_checked = (gd_api . godot_method_bind_get_method) (class_name , "is_item_checked\0" . as_ptr () as * const c_char) ; table . is_item_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_item_disabled\0" . as_ptr () as * const c_char) ; table . is_item_radio_checkable = (gd_api . godot_method_bind_get_method) (class_name , "is_item_radio_checkable\0" . as_ptr () as * const c_char) ; table . is_item_separator = (gd_api . godot_method_bind_get_method) (class_name , "is_item_separator\0" . as_ptr () as * const c_char) ; table . is_item_shortcut_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_item_shortcut_disabled\0" . as_ptr () as * const c_char) ; table . remove_item = (gd_api . godot_method_bind_get_method) (class_name , "remove_item\0" . as_ptr () as * const c_char) ; table . set_allow_search = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_search\0" . as_ptr () as * const c_char) ; table . set_current_index = (gd_api . godot_method_bind_get_method) (class_name , "set_current_index\0" . as_ptr () as * const c_char) ; table . set_hide_on_checkable_item_selection = (gd_api . godot_method_bind_get_method) (class_name , "set_hide_on_checkable_item_selection\0" . as_ptr () as * const c_char) ; table . set_hide_on_item_selection = (gd_api . godot_method_bind_get_method) (class_name , "set_hide_on_item_selection\0" . as_ptr () as * const c_char) ; table . set_hide_on_state_item_selection = (gd_api . godot_method_bind_get_method) (class_name , "set_hide_on_state_item_selection\0" . as_ptr () as * const c_char) ; table . set_hide_on_window_lose_focus = (gd_api . godot_method_bind_get_method) (class_name , "set_hide_on_window_lose_focus\0" . as_ptr () as * const c_char) ; table . set_item_accelerator = (gd_api . godot_method_bind_get_method) (class_name , "set_item_accelerator\0" . as_ptr () as * const c_char) ; table . set_item_as_checkable = (gd_api . godot_method_bind_get_method) (class_name , "set_item_as_checkable\0" . as_ptr () as * const c_char) ; table . set_item_as_radio_checkable = (gd_api . godot_method_bind_get_method) (class_name , "set_item_as_radio_checkable\0" . as_ptr () as * const c_char) ; table . set_item_as_separator = (gd_api . godot_method_bind_get_method) (class_name , "set_item_as_separator\0" . as_ptr () as * const c_char) ; table . set_item_checked = (gd_api . godot_method_bind_get_method) (class_name , "set_item_checked\0" . as_ptr () as * const c_char) ; table . set_item_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_item_disabled\0" . as_ptr () as * const c_char) ; table . set_item_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_item_icon\0" . as_ptr () as * const c_char) ; table . set_item_id = (gd_api . godot_method_bind_get_method) (class_name , "set_item_id\0" . as_ptr () as * const c_char) ; table . set_item_metadata = (gd_api . godot_method_bind_get_method) (class_name , "set_item_metadata\0" . as_ptr () as * const c_char) ; table . set_item_multistate = (gd_api . godot_method_bind_get_method) (class_name , "set_item_multistate\0" . as_ptr () as * const c_char) ; table . set_item_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "set_item_shortcut\0" . as_ptr () as * const c_char) ; table . set_item_shortcut_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_item_shortcut_disabled\0" . as_ptr () as * const c_char) ; table . set_item_submenu = (gd_api . godot_method_bind_get_method) (class_name , "set_item_submenu\0" . as_ptr () as * const c_char) ; table . set_item_text = (gd_api . godot_method_bind_get_method) (class_name , "set_item_text\0" . as_ptr () as * const c_char) ; table . set_item_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "set_item_tooltip\0" . as_ptr () as * const c_char) ; table . set_submenu_popup_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_submenu_popup_delay\0" . as_ptr () as * const c_char) ; table . toggle_item_checked = (gd_api . godot_method_bind_get_method) (class_name , "toggle_item_checked\0" . as_ptr () as * const c_char) ; table . toggle_item_multistate = (gd_api . godot_method_bind_get_method) (class_name , "toggle_item_multistate\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::popup_menu::private::PopupMenu;
            
            pub(crate) mod popup_panel {
                # ! [doc = "This module contains types related to the API class [`PopupPanel`][super::PopupPanel]."] pub (crate) mod private { # [doc = "`core class PopupPanel` inherits `Popup` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_popuppanel.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`PopupPanel` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<PopupPanel>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPopupPanel inherits methods from:\n - [Popup](struct.Popup.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PopupPanel { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PopupPanel ; impl PopupPanel { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PopupPanelMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for PopupPanel { } unsafe impl GodotObject for PopupPanel { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "PopupPanel" } } impl QueueFree for PopupPanel { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for PopupPanel { type Target = crate :: generated :: Popup ; # [inline] fn deref (& self) -> & crate :: generated :: Popup { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PopupPanel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Popup { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Popup > for PopupPanel { } unsafe impl SubClass < crate :: generated :: Control > for PopupPanel { } unsafe impl SubClass < crate :: generated :: CanvasItem > for PopupPanel { } unsafe impl SubClass < crate :: generated :: Node > for PopupPanel { } unsafe impl SubClass < crate :: generated :: Object > for PopupPanel { } impl Instanciable for PopupPanel { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PopupPanel :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PopupPanelMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl PopupPanelMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PopupPanelMethodTable = PopupPanelMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PopupPanelMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PopupPanel\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::popup_panel::private::PopupPanel;
            
            pub(crate) mod portal {
                # ! [doc = "This module contains types related to the API class [`Portal`][super::Portal]."] pub (crate) mod private { # [doc = "`core class Portal` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_portal.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Portal` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Portal>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPortal inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Portal { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Portal ; impl Portal { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PortalMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "This is a shortcut for setting the linked [`Room`][Room] in the name of the [`Portal`][Portal] (the name is used during conversion)."] # [doc = ""] # [inline] pub fn linked_room (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = PortalMethodTable :: get (get_api ()) . get_linked_room ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The points defining the shape of the [`Portal`][Portal] polygon (which should be convex).\nThese are defined in 2D, with `0,0` being the origin of the [`Portal`][Portal] node's [`Spatial.global_transform`][Spatial::global_transform].\n**Note:** These raw points are sanitized for winding order internally."] # [doc = ""] # [inline] pub fn points (& self) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = PortalMethodTable :: get (get_api ()) . get_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Visibility through [`Portal`][Portal]s can be turned on and off at runtime - this is useful for having closable doors."] # [doc = ""] # [inline] pub fn portal_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PortalMethodTable :: get (get_api ()) . get_portal_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Some objects are so big that they may be present in more than one [`Room`][Room] ('sprawling'). As we often don't want objects that *just* breach the edges to be assigned to neighbouring rooms, you can assign an extra margin through the [`Portal`][Portal] to allow objects to breach without sprawling."] # [doc = ""] # [inline] pub fn portal_margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PortalMethodTable :: get (get_api ()) . get_portal_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "In most cases you will want to use the default [`Portal`][Portal] margin in your portals (this is set in the [`RoomManager`][RoomManager]).\nIf you want to override this default, set this value to `false`, and the local [`portal_margin`][Self::portal_margin] will take effect."] # [doc = ""] # [inline] pub fn use_default_margin (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PortalMethodTable :: get (get_api ()) . get_use_default_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Portals default to being two way - see through in both directions, however you can make them one way, visible from the source room only."] # [doc = ""] # [inline] pub fn is_two_way (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PortalMethodTable :: get (get_api ()) . is_two_way ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "This is a shortcut for setting the linked [`Room`][Room] in the name of the [`Portal`][Portal] (the name is used during conversion)."] # [doc = ""] # [inline] pub fn set_linked_room (& self , p_room : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PortalMethodTable :: get (get_api ()) . set_linked_room ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , p_room . into ()) ; } } # [doc = "Sets individual points. Primarily for use by the editor."] # [doc = ""] # [inline] pub fn set_point (& self , index : i64 , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PortalMethodTable :: get (get_api ()) . set_point ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , index as _ , position) ; } } # [doc = "The points defining the shape of the [`Portal`][Portal] polygon (which should be convex).\nThese are defined in 2D, with `0,0` being the origin of the [`Portal`][Portal] node's [`Spatial.global_transform`][Spatial::global_transform].\n**Note:** These raw points are sanitized for winding order internally."] # [doc = ""] # [inline] pub fn set_points (& self , points : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PortalMethodTable :: get (get_api ()) . set_points ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , points) ; } } # [doc = "Visibility through [`Portal`][Portal]s can be turned on and off at runtime - this is useful for having closable doors."] # [doc = ""] # [inline] pub fn set_portal_active (& self , p_active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PortalMethodTable :: get (get_api ()) . set_portal_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , p_active as _) ; } } # [doc = "Some objects are so big that they may be present in more than one [`Room`][Room] ('sprawling'). As we often don't want objects that *just* breach the edges to be assigned to neighbouring rooms, you can assign an extra margin through the [`Portal`][Portal] to allow objects to breach without sprawling."] # [doc = ""] # [inline] pub fn set_portal_margin (& self , p_margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PortalMethodTable :: get (get_api ()) . set_portal_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , p_margin as _) ; } } # [doc = "Portals default to being two way - see through in both directions, however you can make them one way, visible from the source room only."] # [doc = ""] # [inline] pub fn set_two_way (& self , p_two_way : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PortalMethodTable :: get (get_api ()) . set_two_way ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , p_two_way as _) ; } } # [doc = "In most cases you will want to use the default [`Portal`][Portal] margin in your portals (this is set in the [`RoomManager`][RoomManager]).\nIf you want to override this default, set this value to `false`, and the local [`portal_margin`][Self::portal_margin] will take effect."] # [doc = ""] # [inline] pub fn set_use_default_margin (& self , p_use : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PortalMethodTable :: get (get_api ()) . set_use_default_margin ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , p_use as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Portal { } unsafe impl GodotObject for Portal { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Portal" } } impl QueueFree for Portal { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Portal { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Portal { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for Portal { } unsafe impl SubClass < crate :: generated :: Node > for Portal { } unsafe impl SubClass < crate :: generated :: Object > for Portal { } impl Instanciable for Portal { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Portal :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PortalMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_linked_room : * mut sys :: godot_method_bind , pub get_points : * mut sys :: godot_method_bind , pub get_portal_active : * mut sys :: godot_method_bind , pub get_portal_margin : * mut sys :: godot_method_bind , pub get_use_default_margin : * mut sys :: godot_method_bind , pub is_two_way : * mut sys :: godot_method_bind , pub set_linked_room : * mut sys :: godot_method_bind , pub set_point : * mut sys :: godot_method_bind , pub set_points : * mut sys :: godot_method_bind , pub set_portal_active : * mut sys :: godot_method_bind , pub set_portal_margin : * mut sys :: godot_method_bind , pub set_two_way : * mut sys :: godot_method_bind , pub set_use_default_margin : * mut sys :: godot_method_bind } impl PortalMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PortalMethodTable = PortalMethodTable { class_constructor : None , get_linked_room : 0 as * mut sys :: godot_method_bind , get_points : 0 as * mut sys :: godot_method_bind , get_portal_active : 0 as * mut sys :: godot_method_bind , get_portal_margin : 0 as * mut sys :: godot_method_bind , get_use_default_margin : 0 as * mut sys :: godot_method_bind , is_two_way : 0 as * mut sys :: godot_method_bind , set_linked_room : 0 as * mut sys :: godot_method_bind , set_point : 0 as * mut sys :: godot_method_bind , set_points : 0 as * mut sys :: godot_method_bind , set_portal_active : 0 as * mut sys :: godot_method_bind , set_portal_margin : 0 as * mut sys :: godot_method_bind , set_two_way : 0 as * mut sys :: godot_method_bind , set_use_default_margin : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PortalMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Portal\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_linked_room = (gd_api . godot_method_bind_get_method) (class_name , "get_linked_room\0" . as_ptr () as * const c_char) ; table . get_points = (gd_api . godot_method_bind_get_method) (class_name , "get_points\0" . as_ptr () as * const c_char) ; table . get_portal_active = (gd_api . godot_method_bind_get_method) (class_name , "get_portal_active\0" . as_ptr () as * const c_char) ; table . get_portal_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_portal_margin\0" . as_ptr () as * const c_char) ; table . get_use_default_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_use_default_margin\0" . as_ptr () as * const c_char) ; table . is_two_way = (gd_api . godot_method_bind_get_method) (class_name , "is_two_way\0" . as_ptr () as * const c_char) ; table . set_linked_room = (gd_api . godot_method_bind_get_method) (class_name , "set_linked_room\0" . as_ptr () as * const c_char) ; table . set_point = (gd_api . godot_method_bind_get_method) (class_name , "set_point\0" . as_ptr () as * const c_char) ; table . set_points = (gd_api . godot_method_bind_get_method) (class_name , "set_points\0" . as_ptr () as * const c_char) ; table . set_portal_active = (gd_api . godot_method_bind_get_method) (class_name , "set_portal_active\0" . as_ptr () as * const c_char) ; table . set_portal_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_portal_margin\0" . as_ptr () as * const c_char) ; table . set_two_way = (gd_api . godot_method_bind_get_method) (class_name , "set_two_way\0" . as_ptr () as * const c_char) ; table . set_use_default_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_use_default_margin\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::portal::private::Portal;
            
            pub(crate) mod position_2d {
                # ! [doc = "This module contains types related to the API class [`Position2D`][super::Position2D]."] pub (crate) mod private { # [doc = "`core class Position2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_position2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Position2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Position2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPosition2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Position2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Position2D ; impl Position2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Position2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for Position2D { } unsafe impl GodotObject for Position2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Position2D" } } impl QueueFree for Position2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Position2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Position2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for Position2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Position2D { } unsafe impl SubClass < crate :: generated :: Node > for Position2D { } unsafe impl SubClass < crate :: generated :: Object > for Position2D { } impl Instanciable for Position2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Position2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Position2DMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl Position2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Position2DMethodTable = Position2DMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Position2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Position2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::position_2d::private::Position2D;
            
            pub(crate) mod position_3d {
                # ! [doc = "This module contains types related to the API class [`Position3D`][super::Position3D]."] pub (crate) mod private { # [doc = "`core class Position3D` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_position3d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Position3D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Position3D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nPosition3D inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Position3D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Position3D ; impl Position3D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Position3DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for Position3D { } unsafe impl GodotObject for Position3D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Position3D" } } impl QueueFree for Position3D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Position3D { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Position3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for Position3D { } unsafe impl SubClass < crate :: generated :: Node > for Position3D { } unsafe impl SubClass < crate :: generated :: Object > for Position3D { } impl Instanciable for Position3D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Position3D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Position3DMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl Position3DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Position3DMethodTable = Position3DMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Position3DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Position3D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::position_3d::private::Position3D;
            
            pub(crate) mod primitive_mesh {
                # ! [doc = "This module contains types related to the API class [`PrimitiveMesh`][super::PrimitiveMesh]."] pub (crate) mod private { # [doc = "`core class PrimitiveMesh` inherits `Mesh` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_primitivemesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPrimitiveMesh inherits methods from:\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PrimitiveMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PrimitiveMesh ; impl PrimitiveMesh { # [doc = "Overrides the [`AABB`][Aabb] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices."] # [doc = ""] # [inline] pub fn custom_aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . get_custom_aabb ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn.\nThis gives the same result as using [`SpatialMaterial.CULL_BACK`][SpatialMaterial::CULL_BACK] in [`SpatialMaterial.params_cull_mode`][SpatialMaterial::params_cull_mode]."] # [doc = ""] # [inline] pub fn flip_faces (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . get_flip_faces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The current [`Material`][Material] of the primitive mesh."] # [doc = ""] # [inline] pub fn material (& self) -> Option < Ref < crate :: generated :: Material , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . get_material ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Material , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns mesh arrays used to constitute surface of [`Mesh`][Mesh]. The result can be passed to [`ArrayMesh.add_surface_from_arrays`][ArrayMesh::add_surface_from_arrays] to create a new surface. For example:\n```gdscript\nvar c := CylinderMesh.new()\nvar arr_mesh := ArrayMesh.new()\narr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, c.get_mesh_arrays())\n```"] # [doc = ""] # [inline] pub fn get_mesh_arrays (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . get_mesh_arrays ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Overrides the [`AABB`][Aabb] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices."] # [doc = ""] # [inline] pub fn set_custom_aabb (& self , aabb : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . set_custom_aabb ; let ret = crate :: icalls :: icallvar__aabb (method_bind , self . this . sys () . as_ptr () , aabb) ; } } # [doc = "If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn.\nThis gives the same result as using [`SpatialMaterial.CULL_BACK`][SpatialMaterial::CULL_BACK] in [`SpatialMaterial.params_cull_mode`][SpatialMaterial::params_cull_mode]."] # [doc = ""] # [inline] pub fn set_flip_faces (& self , flip_faces : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . set_flip_faces ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , flip_faces as _) ; } } # [doc = "The current [`Material`][Material] of the primitive mesh."] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrimitiveMeshMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PrimitiveMesh { } unsafe impl GodotObject for PrimitiveMesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PrimitiveMesh" } } impl std :: ops :: Deref for PrimitiveMesh { type Target = crate :: generated :: Mesh ; # [inline] fn deref (& self) -> & crate :: generated :: Mesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PrimitiveMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Mesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Mesh > for PrimitiveMesh { } unsafe impl SubClass < crate :: generated :: Resource > for PrimitiveMesh { } unsafe impl SubClass < crate :: generated :: Reference > for PrimitiveMesh { } unsafe impl SubClass < crate :: generated :: Object > for PrimitiveMesh { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PrimitiveMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_custom_aabb : * mut sys :: godot_method_bind , pub get_flip_faces : * mut sys :: godot_method_bind , pub get_material : * mut sys :: godot_method_bind , pub get_mesh_arrays : * mut sys :: godot_method_bind , pub set_custom_aabb : * mut sys :: godot_method_bind , pub set_flip_faces : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind } impl PrimitiveMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PrimitiveMeshMethodTable = PrimitiveMeshMethodTable { class_constructor : None , get_custom_aabb : 0 as * mut sys :: godot_method_bind , get_flip_faces : 0 as * mut sys :: godot_method_bind , get_material : 0 as * mut sys :: godot_method_bind , get_mesh_arrays : 0 as * mut sys :: godot_method_bind , set_custom_aabb : 0 as * mut sys :: godot_method_bind , set_flip_faces : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PrimitiveMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PrimitiveMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_aabb\0" . as_ptr () as * const c_char) ; table . get_flip_faces = (gd_api . godot_method_bind_get_method) (class_name , "get_flip_faces\0" . as_ptr () as * const c_char) ; table . get_material = (gd_api . godot_method_bind_get_method) (class_name , "get_material\0" . as_ptr () as * const c_char) ; table . get_mesh_arrays = (gd_api . godot_method_bind_get_method) (class_name , "get_mesh_arrays\0" . as_ptr () as * const c_char) ; table . set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_aabb\0" . as_ptr () as * const c_char) ; table . set_flip_faces = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_faces\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::primitive_mesh::private::PrimitiveMesh;
            
            pub(crate) mod prism_mesh {
                # ! [doc = "This module contains types related to the API class [`PrismMesh`][super::PrismMesh]."] pub (crate) mod private { # [doc = "`core class PrismMesh` inherits `PrimitiveMesh` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_prismmesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPrismMesh inherits methods from:\n - [PrimitiveMesh](struct.PrimitiveMesh.html)\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PrismMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PrismMesh ; impl PrismMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PrismMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge."] # [doc = ""] # [inline] pub fn left_to_right (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . get_left_to_right ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Size of the prism."] # [doc = ""] # [inline] pub fn size (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Number of added edge loops along the Z axis."] # [doc = ""] # [inline] pub fn subdivide_depth (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . get_subdivide_depth ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Number of added edge loops along the Y axis."] # [doc = ""] # [inline] pub fn subdivide_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . get_subdivide_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Number of added edge loops along the X axis."] # [doc = ""] # [inline] pub fn subdivide_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . get_subdivide_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge."] # [doc = ""] # [inline] pub fn set_left_to_right (& self , left_to_right : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . set_left_to_right ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , left_to_right as _) ; } } # [doc = "Size of the prism."] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Number of added edge loops along the Z axis."] # [doc = ""] # [inline] pub fn set_subdivide_depth (& self , segments : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . set_subdivide_depth ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , segments as _) ; } } # [doc = "Number of added edge loops along the Y axis."] # [doc = ""] # [inline] pub fn set_subdivide_height (& self , segments : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . set_subdivide_height ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , segments as _) ; } } # [doc = "Number of added edge loops along the X axis."] # [doc = ""] # [inline] pub fn set_subdivide_width (& self , segments : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = PrismMeshMethodTable :: get (get_api ()) . set_subdivide_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , segments as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for PrismMesh { } unsafe impl GodotObject for PrismMesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PrismMesh" } } impl std :: ops :: Deref for PrismMesh { type Target = crate :: generated :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PrismMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PrimitiveMesh > for PrismMesh { } unsafe impl SubClass < crate :: generated :: Mesh > for PrismMesh { } unsafe impl SubClass < crate :: generated :: Resource > for PrismMesh { } unsafe impl SubClass < crate :: generated :: Reference > for PrismMesh { } unsafe impl SubClass < crate :: generated :: Object > for PrismMesh { } impl Instanciable for PrismMesh { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PrismMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PrismMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_left_to_right : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_subdivide_depth : * mut sys :: godot_method_bind , pub get_subdivide_height : * mut sys :: godot_method_bind , pub get_subdivide_width : * mut sys :: godot_method_bind , pub set_left_to_right : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind , pub set_subdivide_depth : * mut sys :: godot_method_bind , pub set_subdivide_height : * mut sys :: godot_method_bind , pub set_subdivide_width : * mut sys :: godot_method_bind } impl PrismMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PrismMeshMethodTable = PrismMeshMethodTable { class_constructor : None , get_left_to_right : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_subdivide_depth : 0 as * mut sys :: godot_method_bind , get_subdivide_height : 0 as * mut sys :: godot_method_bind , get_subdivide_width : 0 as * mut sys :: godot_method_bind , set_left_to_right : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind , set_subdivide_depth : 0 as * mut sys :: godot_method_bind , set_subdivide_height : 0 as * mut sys :: godot_method_bind , set_subdivide_width : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PrismMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PrismMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_left_to_right = (gd_api . godot_method_bind_get_method) (class_name , "get_left_to_right\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_depth\0" . as_ptr () as * const c_char) ; table . get_subdivide_height = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_height\0" . as_ptr () as * const c_char) ; table . get_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "get_subdivide_width\0" . as_ptr () as * const c_char) ; table . set_left_to_right = (gd_api . godot_method_bind_get_method) (class_name , "set_left_to_right\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; table . set_subdivide_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_depth\0" . as_ptr () as * const c_char) ; table . set_subdivide_height = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_height\0" . as_ptr () as * const c_char) ; table . set_subdivide_width = (gd_api . godot_method_bind_get_method) (class_name , "set_subdivide_width\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::prism_mesh::private::PrismMesh;
            
            pub mod procedural_sky {
                # ! [doc = "This module contains types related to the API class [`ProceduralSky`][super::ProceduralSky]."] pub (crate) mod private { # [doc = "`core class ProceduralSky` inherits `Sky` (reference-counted).\n\nThis class has related types in the [`procedural_sky`][super::procedural_sky] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_proceduralsky.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nProceduralSky inherits methods from:\n - [Sky](struct.Sky.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ProceduralSky { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ProceduralSky ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TextureSize (pub i64) ; impl TextureSize { pub const _256 : TextureSize = TextureSize (0i64) ; pub const _512 : TextureSize = TextureSize (1i64) ; pub const _1024 : TextureSize = TextureSize (2i64) ; pub const _2048 : TextureSize = TextureSize (3i64) ; pub const _4096 : TextureSize = TextureSize (4i64) ; pub const MAX : TextureSize = TextureSize (5i64) ; } impl From < i64 > for TextureSize { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TextureSize > for i64 { # [inline] fn from (v : TextureSize) -> Self { v . 0 } } impl FromVariant for TextureSize { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ProceduralSky { pub const TEXTURE_SIZE_256 : i64 = 0i64 ; pub const TEXTURE_SIZE_512 : i64 = 1i64 ; pub const TEXTURE_SIZE_1024 : i64 = 2i64 ; pub const TEXTURE_SIZE_2048 : i64 = 3i64 ; pub const TEXTURE_SIZE_4096 : i64 = 4i64 ; pub const TEXTURE_SIZE_MAX : i64 = 5i64 ; } impl ProceduralSky { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ProceduralSkyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Color of the ground at the bottom."] # [doc = ""] # [inline] pub fn ground_bottom_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_ground_bottom_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "How quickly the [`ground_horizon_color`][Self::ground_horizon_color] fades into the [`ground_bottom_color`][Self::ground_bottom_color]."] # [doc = ""] # [inline] pub fn ground_curve (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_ground_curve ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Amount of energy contribution from the ground."] # [doc = ""] # [inline] pub fn ground_energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_ground_energy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Color of the ground at the horizon."] # [doc = ""] # [inline] pub fn ground_horizon_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_ground_horizon_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "How quickly the [`sky_horizon_color`][Self::sky_horizon_color] fades into the [`sky_top_color`][Self::sky_top_color]."] # [doc = ""] # [inline] pub fn sky_curve (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_sky_curve ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Amount of energy contribution from the sky."] # [doc = ""] # [inline] pub fn sky_energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_sky_energy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Color of the sky at the horizon."] # [doc = ""] # [inline] pub fn sky_horizon_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_sky_horizon_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Color of the sky at the top."] # [doc = ""] # [inline] pub fn sky_top_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_sky_top_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Distance from center of sun where it fades out completely."] # [doc = ""] # [inline] pub fn sun_angle_max (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_sun_angle_max ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Distance from sun where it goes from solid to starting to fade."] # [doc = ""] # [inline] pub fn sun_angle_min (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_sun_angle_min ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The sun's color."] # [doc = ""] # [inline] pub fn sun_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_sun_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "How quickly the sun fades away between [`sun_angle_min`][Self::sun_angle_min] and [`sun_angle_max`][Self::sun_angle_max]."] # [doc = ""] # [inline] pub fn sun_curve (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_sun_curve ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Amount of energy contribution from the sun."] # [doc = ""] # [inline] pub fn sun_energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_sun_energy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The sun's height using polar coordinates."] # [doc = ""] # [inline] pub fn sun_latitude (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_sun_latitude ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The direction of the sun using polar coordinates."] # [doc = ""] # [inline] pub fn sun_longitude (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_sun_longitude ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Size of [`Texture`][Texture] that the ProceduralSky will generate. The size is set using [`TextureSize`][TextureSize]."] # [doc = ""] # [inline] pub fn texture_size (& self) -> crate :: generated :: procedural_sky :: TextureSize { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . get_texture_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: procedural_sky :: TextureSize > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Color of the ground at the bottom."] # [doc = ""] # [inline] pub fn set_ground_bottom_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_ground_bottom_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "How quickly the [`ground_horizon_color`][Self::ground_horizon_color] fades into the [`ground_bottom_color`][Self::ground_bottom_color]."] # [doc = ""] # [inline] pub fn set_ground_curve (& self , curve : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_ground_curve ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , curve as _) ; } } # [doc = "Amount of energy contribution from the ground."] # [doc = ""] # [inline] pub fn set_ground_energy (& self , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_ground_energy ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , energy as _) ; } } # [doc = "Color of the ground at the horizon."] # [doc = ""] # [inline] pub fn set_ground_horizon_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_ground_horizon_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "How quickly the [`sky_horizon_color`][Self::sky_horizon_color] fades into the [`sky_top_color`][Self::sky_top_color]."] # [doc = ""] # [inline] pub fn set_sky_curve (& self , curve : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_sky_curve ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , curve as _) ; } } # [doc = "Amount of energy contribution from the sky."] # [doc = ""] # [inline] pub fn set_sky_energy (& self , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_sky_energy ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , energy as _) ; } } # [doc = "Color of the sky at the horizon."] # [doc = ""] # [inline] pub fn set_sky_horizon_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_sky_horizon_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Color of the sky at the top."] # [doc = ""] # [inline] pub fn set_sky_top_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_sky_top_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Distance from center of sun where it fades out completely."] # [doc = ""] # [inline] pub fn set_sun_angle_max (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_sun_angle_max ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , degrees as _) ; } } # [doc = "Distance from sun where it goes from solid to starting to fade."] # [doc = ""] # [inline] pub fn set_sun_angle_min (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_sun_angle_min ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , degrees as _) ; } } # [doc = "The sun's color."] # [doc = ""] # [inline] pub fn set_sun_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_sun_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "How quickly the sun fades away between [`sun_angle_min`][Self::sun_angle_min] and [`sun_angle_max`][Self::sun_angle_max]."] # [doc = ""] # [inline] pub fn set_sun_curve (& self , curve : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_sun_curve ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , curve as _) ; } } # [doc = "Amount of energy contribution from the sun."] # [doc = ""] # [inline] pub fn set_sun_energy (& self , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_sun_energy ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , energy as _) ; } } # [doc = "The sun's height using polar coordinates."] # [doc = ""] # [inline] pub fn set_sun_latitude (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_sun_latitude ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , degrees as _) ; } } # [doc = "The direction of the sun using polar coordinates."] # [doc = ""] # [inline] pub fn set_sun_longitude (& self , degrees : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_sun_longitude ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , degrees as _) ; } } # [doc = "Size of [`Texture`][Texture] that the ProceduralSky will generate. The size is set using [`TextureSize`][TextureSize]."] # [doc = ""] # [inline] pub fn set_texture_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProceduralSkyMethodTable :: get (get_api ()) . set_texture_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ProceduralSky { } unsafe impl GodotObject for ProceduralSky { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ProceduralSky" } } impl std :: ops :: Deref for ProceduralSky { type Target = crate :: generated :: Sky ; # [inline] fn deref (& self) -> & crate :: generated :: Sky { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ProceduralSky { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Sky { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Sky > for ProceduralSky { } unsafe impl SubClass < crate :: generated :: Resource > for ProceduralSky { } unsafe impl SubClass < crate :: generated :: Reference > for ProceduralSky { } unsafe impl SubClass < crate :: generated :: Object > for ProceduralSky { } impl Instanciable for ProceduralSky { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ProceduralSky :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ProceduralSkyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_ground_bottom_color : * mut sys :: godot_method_bind , pub get_ground_curve : * mut sys :: godot_method_bind , pub get_ground_energy : * mut sys :: godot_method_bind , pub get_ground_horizon_color : * mut sys :: godot_method_bind , pub get_sky_curve : * mut sys :: godot_method_bind , pub get_sky_energy : * mut sys :: godot_method_bind , pub get_sky_horizon_color : * mut sys :: godot_method_bind , pub get_sky_top_color : * mut sys :: godot_method_bind , pub get_sun_angle_max : * mut sys :: godot_method_bind , pub get_sun_angle_min : * mut sys :: godot_method_bind , pub get_sun_color : * mut sys :: godot_method_bind , pub get_sun_curve : * mut sys :: godot_method_bind , pub get_sun_energy : * mut sys :: godot_method_bind , pub get_sun_latitude : * mut sys :: godot_method_bind , pub get_sun_longitude : * mut sys :: godot_method_bind , pub get_texture_size : * mut sys :: godot_method_bind , pub set_ground_bottom_color : * mut sys :: godot_method_bind , pub set_ground_curve : * mut sys :: godot_method_bind , pub set_ground_energy : * mut sys :: godot_method_bind , pub set_ground_horizon_color : * mut sys :: godot_method_bind , pub set_sky_curve : * mut sys :: godot_method_bind , pub set_sky_energy : * mut sys :: godot_method_bind , pub set_sky_horizon_color : * mut sys :: godot_method_bind , pub set_sky_top_color : * mut sys :: godot_method_bind , pub set_sun_angle_max : * mut sys :: godot_method_bind , pub set_sun_angle_min : * mut sys :: godot_method_bind , pub set_sun_color : * mut sys :: godot_method_bind , pub set_sun_curve : * mut sys :: godot_method_bind , pub set_sun_energy : * mut sys :: godot_method_bind , pub set_sun_latitude : * mut sys :: godot_method_bind , pub set_sun_longitude : * mut sys :: godot_method_bind , pub set_texture_size : * mut sys :: godot_method_bind } impl ProceduralSkyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ProceduralSkyMethodTable = ProceduralSkyMethodTable { class_constructor : None , get_ground_bottom_color : 0 as * mut sys :: godot_method_bind , get_ground_curve : 0 as * mut sys :: godot_method_bind , get_ground_energy : 0 as * mut sys :: godot_method_bind , get_ground_horizon_color : 0 as * mut sys :: godot_method_bind , get_sky_curve : 0 as * mut sys :: godot_method_bind , get_sky_energy : 0 as * mut sys :: godot_method_bind , get_sky_horizon_color : 0 as * mut sys :: godot_method_bind , get_sky_top_color : 0 as * mut sys :: godot_method_bind , get_sun_angle_max : 0 as * mut sys :: godot_method_bind , get_sun_angle_min : 0 as * mut sys :: godot_method_bind , get_sun_color : 0 as * mut sys :: godot_method_bind , get_sun_curve : 0 as * mut sys :: godot_method_bind , get_sun_energy : 0 as * mut sys :: godot_method_bind , get_sun_latitude : 0 as * mut sys :: godot_method_bind , get_sun_longitude : 0 as * mut sys :: godot_method_bind , get_texture_size : 0 as * mut sys :: godot_method_bind , set_ground_bottom_color : 0 as * mut sys :: godot_method_bind , set_ground_curve : 0 as * mut sys :: godot_method_bind , set_ground_energy : 0 as * mut sys :: godot_method_bind , set_ground_horizon_color : 0 as * mut sys :: godot_method_bind , set_sky_curve : 0 as * mut sys :: godot_method_bind , set_sky_energy : 0 as * mut sys :: godot_method_bind , set_sky_horizon_color : 0 as * mut sys :: godot_method_bind , set_sky_top_color : 0 as * mut sys :: godot_method_bind , set_sun_angle_max : 0 as * mut sys :: godot_method_bind , set_sun_angle_min : 0 as * mut sys :: godot_method_bind , set_sun_color : 0 as * mut sys :: godot_method_bind , set_sun_curve : 0 as * mut sys :: godot_method_bind , set_sun_energy : 0 as * mut sys :: godot_method_bind , set_sun_latitude : 0 as * mut sys :: godot_method_bind , set_sun_longitude : 0 as * mut sys :: godot_method_bind , set_texture_size : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ProceduralSkyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ProceduralSky\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_ground_bottom_color = (gd_api . godot_method_bind_get_method) (class_name , "get_ground_bottom_color\0" . as_ptr () as * const c_char) ; table . get_ground_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_ground_curve\0" . as_ptr () as * const c_char) ; table . get_ground_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_ground_energy\0" . as_ptr () as * const c_char) ; table . get_ground_horizon_color = (gd_api . godot_method_bind_get_method) (class_name , "get_ground_horizon_color\0" . as_ptr () as * const c_char) ; table . get_sky_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_curve\0" . as_ptr () as * const c_char) ; table . get_sky_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_energy\0" . as_ptr () as * const c_char) ; table . get_sky_horizon_color = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_horizon_color\0" . as_ptr () as * const c_char) ; table . get_sky_top_color = (gd_api . godot_method_bind_get_method) (class_name , "get_sky_top_color\0" . as_ptr () as * const c_char) ; table . get_sun_angle_max = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_angle_max\0" . as_ptr () as * const c_char) ; table . get_sun_angle_min = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_angle_min\0" . as_ptr () as * const c_char) ; table . get_sun_color = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_color\0" . as_ptr () as * const c_char) ; table . get_sun_curve = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_curve\0" . as_ptr () as * const c_char) ; table . get_sun_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_energy\0" . as_ptr () as * const c_char) ; table . get_sun_latitude = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_latitude\0" . as_ptr () as * const c_char) ; table . get_sun_longitude = (gd_api . godot_method_bind_get_method) (class_name , "get_sun_longitude\0" . as_ptr () as * const c_char) ; table . get_texture_size = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_size\0" . as_ptr () as * const c_char) ; table . set_ground_bottom_color = (gd_api . godot_method_bind_get_method) (class_name , "set_ground_bottom_color\0" . as_ptr () as * const c_char) ; table . set_ground_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_ground_curve\0" . as_ptr () as * const c_char) ; table . set_ground_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_ground_energy\0" . as_ptr () as * const c_char) ; table . set_ground_horizon_color = (gd_api . godot_method_bind_get_method) (class_name , "set_ground_horizon_color\0" . as_ptr () as * const c_char) ; table . set_sky_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_curve\0" . as_ptr () as * const c_char) ; table . set_sky_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_energy\0" . as_ptr () as * const c_char) ; table . set_sky_horizon_color = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_horizon_color\0" . as_ptr () as * const c_char) ; table . set_sky_top_color = (gd_api . godot_method_bind_get_method) (class_name , "set_sky_top_color\0" . as_ptr () as * const c_char) ; table . set_sun_angle_max = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_angle_max\0" . as_ptr () as * const c_char) ; table . set_sun_angle_min = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_angle_min\0" . as_ptr () as * const c_char) ; table . set_sun_color = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_color\0" . as_ptr () as * const c_char) ; table . set_sun_curve = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_curve\0" . as_ptr () as * const c_char) ; table . set_sun_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_energy\0" . as_ptr () as * const c_char) ; table . set_sun_latitude = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_latitude\0" . as_ptr () as * const c_char) ; table . set_sun_longitude = (gd_api . godot_method_bind_get_method) (class_name , "set_sun_longitude\0" . as_ptr () as * const c_char) ; table . set_texture_size = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_size\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::procedural_sky::private::ProceduralSky;
            
            pub(crate) mod progress_bar {
                # ! [doc = "This module contains types related to the API class [`ProgressBar`][super::ProgressBar]."] pub (crate) mod private { # [doc = "`core class ProgressBar` inherits `Range` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_progressbar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ProgressBar` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ProgressBar>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nProgressBar inherits methods from:\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ProgressBar { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ProgressBar ; impl ProgressBar { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ProgressBarMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, the fill percentage is displayed on the bar."] # [doc = ""] # [inline] pub fn is_percent_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ProgressBarMethodTable :: get (get_api ()) . is_percent_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the fill percentage is displayed on the bar."] # [doc = ""] # [inline] pub fn set_percent_visible (& self , visible : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProgressBarMethodTable :: get (get_api ()) . set_percent_visible ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , visible as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ProgressBar { } unsafe impl GodotObject for ProgressBar { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ProgressBar" } } impl QueueFree for ProgressBar { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ProgressBar { type Target = crate :: generated :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ProgressBar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Range > for ProgressBar { } unsafe impl SubClass < crate :: generated :: Control > for ProgressBar { } unsafe impl SubClass < crate :: generated :: CanvasItem > for ProgressBar { } unsafe impl SubClass < crate :: generated :: Node > for ProgressBar { } unsafe impl SubClass < crate :: generated :: Object > for ProgressBar { } impl Instanciable for ProgressBar { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ProgressBar :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ProgressBarMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_percent_visible : * mut sys :: godot_method_bind , pub set_percent_visible : * mut sys :: godot_method_bind } impl ProgressBarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ProgressBarMethodTable = ProgressBarMethodTable { class_constructor : None , is_percent_visible : 0 as * mut sys :: godot_method_bind , set_percent_visible : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ProgressBarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ProgressBar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_percent_visible\0" . as_ptr () as * const c_char) ; table . set_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_percent_visible\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::progress_bar::private::ProgressBar;
            
            pub(crate) mod project_settings {
                # ! [doc = "This module contains types related to the API class [`ProjectSettings`][super::ProjectSettings]."] pub (crate) mod private { # [doc = "`core singleton class ProjectSettings` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_projectsettings.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nProjectSettings inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ProjectSettings { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ProjectSettings ; impl ProjectSettings { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("ProjectSettings\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nAdds a custom property info to a property. The dictionary must contain:\n- `name`: [`String`][GodotString] (the property's name)\n- `type`: [`int`][int] (see [enum Variant.Type])\n- optionally `hint`: [`int`][int] (see [`PropertyHint`][PropertyHint]) and `hint_string`: [`String`][GodotString]\n**Example:**\n```gdscript\nProjectSettings.set(\"category/property_name\", 0)\n\nvar property_info = {\n    \"name\": \"category/property_name\",\n    \"type\": TYPE_INT,\n    \"hint\": PROPERTY_HINT_ENUM,\n    \"hint_string\": \"one,two,three\"\n}\n\nProjectSettings.add_property_info(property_info)\n```"] # [doc = ""] # [inline] pub fn add_property_info (& self , hint : Dictionary) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . add_property_info ; let ret = crate :: icalls :: icallvar__dict (method_bind , self . this . sys () . as_ptr () , hint) ; } } # [doc = "Clears the whole configuration (not recommended, may break things)."] # [doc = ""] # [inline] pub fn clear (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Returns the order of a configuration value (influences when saved to the config file)."] # [doc = ""] # [inline] pub fn get_order (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . get_order ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the value of a setting.\n**Example:**\n```gdscript\nprint(ProjectSettings.get_setting(\"application/config/name\"))\n```"] # [doc = ""] # [inline] pub fn get_setting (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . get_setting ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the absolute, native OS path corresponding to the localized `path` (starting with `res://` or `user://`). The returned path will vary depending on the operating system and user preferences. See [File paths in Godot projects](https://docs.godotengine.org/en/3.5.1/tutorials/io/data_paths.html) to see what those paths convert to. See also [`localize_path`][Self::localize_path].\n**Note:** [`globalize_path`][Self::globalize_path] with `res://` will not work in an exported project. Instead, prepend the executable's base directory to the path when running from an exported project:\n```gdscript\nvar path = \"\"\nif OS.has_feature(\"editor\"):\n    # Running from an editor binary.\n    # `path` will contain the absolute path to `hello.txt` located in the project root.\n    path = ProjectSettings.globalize_path(\"res://hello.txt\")\nelse:\n    # Running from an exported project.\n    # `path` will contain the absolute path to `hello.txt` next to the executable.\n    # This is *not* identical to using `ProjectSettings.globalize_path()` with a `res://` path,\n    # but is close enough in spirit.\n    path = OS.get_executable_path().get_base_dir().plus_file(\"hello.txt\")\n```"] # [doc = ""] # [inline] pub fn globalize_path (& self , path : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . globalize_path ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if a configuration value is present."] # [doc = ""] # [inline] pub fn has_setting (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . has_setting ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Loads the contents of the .pck or .zip file specified by `pack` into the resource filesystem (`res://`). Returns `true` on success.\n**Note:** If a file from `pack` shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from `pack` unless `replace_files` is set to `false`.\n**Note:** The optional `offset` parameter can be used to specify the offset in bytes to the start of the resource pack. This is only supported for .pck files.\n# Default Arguments\n* `replace_files` - `true`\n* `offset` - `0`"] # [doc = ""] # [inline] pub fn load_resource_pack (& self , pack : impl Into < GodotString > , replace_files : bool , offset : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . load_resource_pack ; let ret = crate :: icalls :: icallvar__str_bool_i64 (method_bind , self . this . sys () . as_ptr () , pack . into () , replace_files as _ , offset as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the localized path (starting with `res://`) corresponding to the absolute, native OS `path`. See also [`globalize_path`][Self::globalize_path]."] # [doc = ""] # [inline] pub fn localize_path (& self , path : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . localize_path ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the specified property exists and its initial value differs from the current value."] # [doc = ""] # [inline] pub fn property_can_revert (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . property_can_revert ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the specified property's initial value. Returns `null` if the property does not exist."] # [doc = ""] # [inline] pub fn property_get_revert (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . property_get_revert ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Saves the configuration to the `project.godot` file.\n**Note:** This method is intended to be used by editor plugins, as modified [`ProjectSettings`][ProjectSettings] can't be loaded back in the running app. If you want to change project settings in exported projects, use [`save_custom`][Self::save_custom] to save `override.cfg` file."] # [doc = ""] # [inline] pub fn save (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . save ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Saves the configuration to a custom file. The file extension must be `.godot` (to save in text-based [`ConfigFile`][ConfigFile] format) or `.binary` (to save in binary format). You can also save `override.cfg` file, which is also text, but can be used in exported projects unlike other formats."] # [doc = ""] # [inline] pub fn save_custom (& self , file : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . save_custom ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Sets the specified property's initial value. This is the value the property reverts to."] # [doc = ""] # [inline] pub fn set_initial_value (& self , name : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . set_initial_value ; let ret = crate :: icalls :: icallvar__str_var (method_bind , self . this . sys () . as_ptr () , name . into () , value . owned_to_variant ()) ; } } # [doc = "Sets the order of a configuration value (influences when saved to the config file)."] # [doc = ""] # [inline] pub fn set_order (& self , name : impl Into < GodotString > , position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . set_order ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , position as _) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets the value of a setting.\n**Example:**\n```gdscript\nProjectSettings.set_setting(\"application/config/name\", \"Example\")\n```\nThis can also be used to erase custom project settings. To do this change the setting value to `null`."] # [doc = ""] # [inline] pub fn set_setting (& self , name : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProjectSettingsMethodTable :: get (get_api ()) . set_setting ; let ret = crate :: icalls :: icallvar__str_var (method_bind , self . this . sys () . as_ptr () , name . into () , value . owned_to_variant ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ProjectSettings { } unsafe impl GodotObject for ProjectSettings { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ProjectSettings" } } impl std :: ops :: Deref for ProjectSettings { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ProjectSettings { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for ProjectSettings { } unsafe impl Send for ProjectSettings { } unsafe impl Sync for ProjectSettings { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ProjectSettingsMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_property_info : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub get_order : * mut sys :: godot_method_bind , pub get_setting : * mut sys :: godot_method_bind , pub globalize_path : * mut sys :: godot_method_bind , pub has_setting : * mut sys :: godot_method_bind , pub load_resource_pack : * mut sys :: godot_method_bind , pub localize_path : * mut sys :: godot_method_bind , pub property_can_revert : * mut sys :: godot_method_bind , pub property_get_revert : * mut sys :: godot_method_bind , pub save : * mut sys :: godot_method_bind , pub save_custom : * mut sys :: godot_method_bind , pub set_initial_value : * mut sys :: godot_method_bind , pub set_order : * mut sys :: godot_method_bind , pub set_setting : * mut sys :: godot_method_bind } impl ProjectSettingsMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ProjectSettingsMethodTable = ProjectSettingsMethodTable { class_constructor : None , add_property_info : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , get_order : 0 as * mut sys :: godot_method_bind , get_setting : 0 as * mut sys :: godot_method_bind , globalize_path : 0 as * mut sys :: godot_method_bind , has_setting : 0 as * mut sys :: godot_method_bind , load_resource_pack : 0 as * mut sys :: godot_method_bind , localize_path : 0 as * mut sys :: godot_method_bind , property_can_revert : 0 as * mut sys :: godot_method_bind , property_get_revert : 0 as * mut sys :: godot_method_bind , save : 0 as * mut sys :: godot_method_bind , save_custom : 0 as * mut sys :: godot_method_bind , set_initial_value : 0 as * mut sys :: godot_method_bind , set_order : 0 as * mut sys :: godot_method_bind , set_setting : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ProjectSettingsMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ProjectSettings\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_property_info = (gd_api . godot_method_bind_get_method) (class_name , "add_property_info\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_order = (gd_api . godot_method_bind_get_method) (class_name , "get_order\0" . as_ptr () as * const c_char) ; table . get_setting = (gd_api . godot_method_bind_get_method) (class_name , "get_setting\0" . as_ptr () as * const c_char) ; table . globalize_path = (gd_api . godot_method_bind_get_method) (class_name , "globalize_path\0" . as_ptr () as * const c_char) ; table . has_setting = (gd_api . godot_method_bind_get_method) (class_name , "has_setting\0" . as_ptr () as * const c_char) ; table . load_resource_pack = (gd_api . godot_method_bind_get_method) (class_name , "load_resource_pack\0" . as_ptr () as * const c_char) ; table . localize_path = (gd_api . godot_method_bind_get_method) (class_name , "localize_path\0" . as_ptr () as * const c_char) ; table . property_can_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_can_revert\0" . as_ptr () as * const c_char) ; table . property_get_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_get_revert\0" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\0" . as_ptr () as * const c_char) ; table . save_custom = (gd_api . godot_method_bind_get_method) (class_name , "save_custom\0" . as_ptr () as * const c_char) ; table . set_initial_value = (gd_api . godot_method_bind_get_method) (class_name , "set_initial_value\0" . as_ptr () as * const c_char) ; table . set_order = (gd_api . godot_method_bind_get_method) (class_name , "set_order\0" . as_ptr () as * const c_char) ; table . set_setting = (gd_api . godot_method_bind_get_method) (class_name , "set_setting\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::project_settings::private::ProjectSettings;
            
            pub(crate) mod property_tweener {
                # ! [doc = "This module contains types related to the API class [`PropertyTweener`][super::PropertyTweener]."] pub (crate) mod private { # [doc = "`core class PropertyTweener` inherits `Tweener` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_propertytweener.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nPropertyTweener inherits methods from:\n - [Tweener](struct.Tweener.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct PropertyTweener { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: PropertyTweener ; impl PropertyTweener { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = PropertyTweenerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nWhen called, the final value will be used as a relative value instead. Example:\n```gdscript\nvar tween = get_tree().create_tween()\ntween.tween_property(self, \"position\", Vector2.RIGHT * 100, 1).as_relative() #the node will move by 100 pixels to the right\n```"] # [doc = ""] # [inline] pub fn as_relative (& self) -> Option < Ref < crate :: generated :: PropertyTweener , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PropertyTweenerMethodTable :: get (get_api ()) . as_relative ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: PropertyTweener , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets a custom initial value to the [`PropertyTweener`][PropertyTweener]. Example:\n```gdscript\nvar tween = get_tree().create_tween()\ntween.tween_property(self, \"position\", Vector2(200, 100), 1).from(Vector2(100, 100) #this will move the node from position (100, 100) to (200, 100)\n```"] # [doc = ""] # [inline] pub fn from (& self , value : impl OwnedToVariant) -> Option < Ref < crate :: generated :: PropertyTweener , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PropertyTweenerMethodTable :: get (get_api ()) . from ; let ret = crate :: icalls :: icallvar__var (method_bind , self . this . sys () . as_ptr () , value . owned_to_variant ()) ; < Option < Ref < crate :: generated :: PropertyTweener , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nMakes the [`PropertyTweener`][PropertyTweener] use the current property value (i.e. at the time of creating this [`PropertyTweener`][PropertyTweener]) as a starting point. This is equivalent of using [`from`][Self::from] with the current value. These two calls will do the same:\n```gdscript\ntween.tween_property(self, \"position\", Vector2(200, 100), 1).from(position)\ntween.tween_property(self, \"position\", Vector2(200, 100), 1).from_current()\n```"] # [doc = ""] # [inline] pub fn from_current (& self) -> Option < Ref < crate :: generated :: PropertyTweener , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PropertyTweenerMethodTable :: get (get_api ()) . from_current ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: PropertyTweener , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the time in seconds after which the [`PropertyTweener`][PropertyTweener] will start interpolating. By default there's no delay."] # [doc = ""] # [inline] pub fn set_delay (& self , delay : f64) -> Option < Ref < crate :: generated :: PropertyTweener , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PropertyTweenerMethodTable :: get (get_api ()) . set_delay ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , delay as _) ; < Option < Ref < crate :: generated :: PropertyTweener , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [`SceneTreeTween`][SceneTreeTween] that contains this Tweener."] # [doc = ""] # [inline] pub fn set_ease (& self , ease : i64) -> Option < Ref < crate :: generated :: PropertyTweener , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PropertyTweenerMethodTable :: get (get_api ()) . set_ease ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , ease as _) ; < Option < Ref < crate :: generated :: PropertyTweener , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [`SceneTreeTween`][SceneTreeTween] that contains this Tweener."] # [doc = ""] # [inline] pub fn set_trans (& self , trans : i64) -> Option < Ref < crate :: generated :: PropertyTweener , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = PropertyTweenerMethodTable :: get (get_api ()) . set_trans ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , trans as _) ; < Option < Ref < crate :: generated :: PropertyTweener , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for PropertyTweener { } unsafe impl GodotObject for PropertyTweener { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "PropertyTweener" } } impl std :: ops :: Deref for PropertyTweener { type Target = crate :: generated :: Tweener ; # [inline] fn deref (& self) -> & crate :: generated :: Tweener { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for PropertyTweener { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Tweener { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Tweener > for PropertyTweener { } unsafe impl SubClass < crate :: generated :: Reference > for PropertyTweener { } unsafe impl SubClass < crate :: generated :: Object > for PropertyTweener { } impl Instanciable for PropertyTweener { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { PropertyTweener :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct PropertyTweenerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub as_relative : * mut sys :: godot_method_bind , pub from : * mut sys :: godot_method_bind , pub from_current : * mut sys :: godot_method_bind , pub set_delay : * mut sys :: godot_method_bind , pub set_ease : * mut sys :: godot_method_bind , pub set_trans : * mut sys :: godot_method_bind } impl PropertyTweenerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : PropertyTweenerMethodTable = PropertyTweenerMethodTable { class_constructor : None , as_relative : 0 as * mut sys :: godot_method_bind , from : 0 as * mut sys :: godot_method_bind , from_current : 0 as * mut sys :: godot_method_bind , set_delay : 0 as * mut sys :: godot_method_bind , set_ease : 0 as * mut sys :: godot_method_bind , set_trans : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { PropertyTweenerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "PropertyTweener\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . as_relative = (gd_api . godot_method_bind_get_method) (class_name , "as_relative\0" . as_ptr () as * const c_char) ; table . from = (gd_api . godot_method_bind_get_method) (class_name , "from\0" . as_ptr () as * const c_char) ; table . from_current = (gd_api . godot_method_bind_get_method) (class_name , "from_current\0" . as_ptr () as * const c_char) ; table . set_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_delay\0" . as_ptr () as * const c_char) ; table . set_ease = (gd_api . godot_method_bind_get_method) (class_name , "set_ease\0" . as_ptr () as * const c_char) ; table . set_trans = (gd_api . godot_method_bind_get_method) (class_name , "set_trans\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::property_tweener::private::PropertyTweener;
            
            pub mod proximity_group {
                # ! [doc = "This module contains types related to the API class [`ProximityGroup`][super::ProximityGroup]."] pub (crate) mod private { # [doc = "`core class ProximityGroup` inherits `Spatial` (manually managed).\n\nThis class has related types in the [`proximity_group`][super::proximity_group] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_proximitygroup.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ProximityGroup` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ProximityGroup>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nProximityGroup inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ProximityGroup { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ProximityGroup ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DispatchMode (pub i64) ; impl DispatchMode { pub const PROXY : DispatchMode = DispatchMode (0i64) ; pub const SIGNAL : DispatchMode = DispatchMode (1i64) ; } impl From < i64 > for DispatchMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DispatchMode > for i64 { # [inline] fn from (v : DispatchMode) -> Self { v . 0 } } impl FromVariant for DispatchMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ProximityGroup { pub const MODE_PROXY : i64 = 0i64 ; pub const MODE_SIGNAL : i64 = 1i64 ; } impl ProximityGroup { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ProximityGroupMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Calls on all intersecting [`ProximityGroup`][ProximityGroup] the given method and parameters.\nIf the [`dispatch_mode`][Self::dispatch_mode] is set to [`MODE_PROXY`][Self::MODE_PROXY] (the default), all calls are delegated to their respective parent [`Node`][Node]."] # [doc = ""] # [inline] pub fn broadcast (& self , method : impl Into < GodotString > , parameters : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProximityGroupMethodTable :: get (get_api ()) . broadcast ; let ret = crate :: icalls :: icallvar__str_var (method_bind , self . this . sys () . as_ptr () , method . into () , parameters . owned_to_variant ()) ; } } # [doc = "Specifies which node gets contacted on a call of method [`broadcast`][Self::broadcast]."] # [doc = ""] # [inline] pub fn dispatch_mode (& self) -> crate :: generated :: proximity_group :: DispatchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ProximityGroupMethodTable :: get (get_api ()) . get_dispatch_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: proximity_group :: DispatchMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The size of the space in 3D units. This also sets the amount of coordinates required to calculate whether two [`ProximityGroup`][ProximityGroup] nodes are intersecting or not. Smaller [`grid_radius`][Self::grid_radius] values can be used for more precise proximity checks at the cost of performance, since more groups will be created."] # [doc = ""] # [inline] pub fn grid_radius (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = ProximityGroupMethodTable :: get (get_api ()) . get_grid_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Specify the common group name, to let other [`ProximityGroup`][ProximityGroup] nodes know, if they should be auto-grouped with this node in case they intersect with each other.\nFor example, if you have a [`ProximityGroup`][ProximityGroup] node named `\"Earth\"` and another called `\"Mars\"`, with both nodes having `\"planet\"` as their [`group_name`][Self::group_name]. Give both planets a significantly larger [`grid_radius`][Self::grid_radius] than their actual radius, position them close enough and they'll be automatically grouped."] # [doc = ""] # [inline] pub fn group_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ProximityGroupMethodTable :: get (get_api ()) . get_group_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Specifies which node gets contacted on a call of method [`broadcast`][Self::broadcast]."] # [doc = ""] # [inline] pub fn set_dispatch_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProximityGroupMethodTable :: get (get_api ()) . set_dispatch_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The size of the space in 3D units. This also sets the amount of coordinates required to calculate whether two [`ProximityGroup`][ProximityGroup] nodes are intersecting or not. Smaller [`grid_radius`][Self::grid_radius] values can be used for more precise proximity checks at the cost of performance, since more groups will be created."] # [doc = ""] # [inline] pub fn set_grid_radius (& self , radius : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProximityGroupMethodTable :: get (get_api ()) . set_grid_radius ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , radius) ; } } # [doc = "Specify the common group name, to let other [`ProximityGroup`][ProximityGroup] nodes know, if they should be auto-grouped with this node in case they intersect with each other.\nFor example, if you have a [`ProximityGroup`][ProximityGroup] node named `\"Earth\"` and another called `\"Mars\"`, with both nodes having `\"planet\"` as their [`group_name`][Self::group_name]. Give both planets a significantly larger [`grid_radius`][Self::grid_radius] than their actual radius, position them close enough and they'll be automatically grouped."] # [doc = ""] # [inline] pub fn set_group_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProximityGroupMethodTable :: get (get_api ()) . set_group_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ProximityGroup { } unsafe impl GodotObject for ProximityGroup { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ProximityGroup" } } impl QueueFree for ProximityGroup { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ProximityGroup { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ProximityGroup { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for ProximityGroup { } unsafe impl SubClass < crate :: generated :: Node > for ProximityGroup { } unsafe impl SubClass < crate :: generated :: Object > for ProximityGroup { } impl Instanciable for ProximityGroup { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ProximityGroup :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ProximityGroupMethodTable { pub class_constructor : sys :: godot_class_constructor , pub broadcast : * mut sys :: godot_method_bind , pub get_dispatch_mode : * mut sys :: godot_method_bind , pub get_grid_radius : * mut sys :: godot_method_bind , pub get_group_name : * mut sys :: godot_method_bind , pub set_dispatch_mode : * mut sys :: godot_method_bind , pub set_grid_radius : * mut sys :: godot_method_bind , pub set_group_name : * mut sys :: godot_method_bind } impl ProximityGroupMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ProximityGroupMethodTable = ProximityGroupMethodTable { class_constructor : None , broadcast : 0 as * mut sys :: godot_method_bind , get_dispatch_mode : 0 as * mut sys :: godot_method_bind , get_grid_radius : 0 as * mut sys :: godot_method_bind , get_group_name : 0 as * mut sys :: godot_method_bind , set_dispatch_mode : 0 as * mut sys :: godot_method_bind , set_grid_radius : 0 as * mut sys :: godot_method_bind , set_group_name : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ProximityGroupMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ProximityGroup\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . broadcast = (gd_api . godot_method_bind_get_method) (class_name , "broadcast\0" . as_ptr () as * const c_char) ; table . get_dispatch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_dispatch_mode\0" . as_ptr () as * const c_char) ; table . get_grid_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_grid_radius\0" . as_ptr () as * const c_char) ; table . get_group_name = (gd_api . godot_method_bind_get_method) (class_name , "get_group_name\0" . as_ptr () as * const c_char) ; table . set_dispatch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_dispatch_mode\0" . as_ptr () as * const c_char) ; table . set_grid_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_grid_radius\0" . as_ptr () as * const c_char) ; table . set_group_name = (gd_api . godot_method_bind_get_method) (class_name , "set_group_name\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::proximity_group::private::ProximityGroup;
            
            pub(crate) mod proxy_texture {
                # ! [doc = "This module contains types related to the API class [`ProxyTexture`][super::ProxyTexture]."] pub (crate) mod private { # [doc = "`core class ProxyTexture` inherits `Texture` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_proxytexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nProxyTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ProxyTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ProxyTexture ; impl ProxyTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ProxyTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn base (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ProxyTextureMethodTable :: get (get_api ()) . get_base ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base (& self , base : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ProxyTextureMethodTable :: get (get_api ()) . set_base ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , base . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ProxyTexture { } unsafe impl GodotObject for ProxyTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ProxyTexture" } } impl std :: ops :: Deref for ProxyTexture { type Target = crate :: generated :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ProxyTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Texture > for ProxyTexture { } unsafe impl SubClass < crate :: generated :: Resource > for ProxyTexture { } unsafe impl SubClass < crate :: generated :: Reference > for ProxyTexture { } unsafe impl SubClass < crate :: generated :: Object > for ProxyTexture { } impl Instanciable for ProxyTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ProxyTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ProxyTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_base : * mut sys :: godot_method_bind , pub set_base : * mut sys :: godot_method_bind } impl ProxyTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ProxyTextureMethodTable = ProxyTextureMethodTable { class_constructor : None , get_base : 0 as * mut sys :: godot_method_bind , set_base : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ProxyTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ProxyTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_base = (gd_api . godot_method_bind_get_method) (class_name , "get_base\0" . as_ptr () as * const c_char) ; table . set_base = (gd_api . godot_method_bind_get_method) (class_name , "set_base\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::proxy_texture::private::ProxyTexture;
            
            pub(crate) mod quad_mesh {
                # ! [doc = "This module contains types related to the API class [`QuadMesh`][super::QuadMesh]."] pub (crate) mod private { # [doc = "`core class QuadMesh` inherits `PrimitiveMesh` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_quadmesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nQuadMesh inherits methods from:\n - [PrimitiveMesh](struct.PrimitiveMesh.html)\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct QuadMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: QuadMesh ; impl QuadMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = QuadMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Offset of the generated Quad. Useful for particles."] # [doc = ""] # [inline] pub fn center_offset (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = QuadMeshMethodTable :: get (get_api ()) . get_center_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Size on the X and Y axes."] # [doc = ""] # [inline] pub fn size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = QuadMeshMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Offset of the generated Quad. Useful for particles."] # [doc = ""] # [inline] pub fn set_center_offset (& self , center_offset : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = QuadMeshMethodTable :: get (get_api ()) . set_center_offset ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , center_offset) ; } } # [doc = "Size on the X and Y axes."] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = QuadMeshMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for QuadMesh { } unsafe impl GodotObject for QuadMesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "QuadMesh" } } impl std :: ops :: Deref for QuadMesh { type Target = crate :: generated :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for QuadMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PrimitiveMesh > for QuadMesh { } unsafe impl SubClass < crate :: generated :: Mesh > for QuadMesh { } unsafe impl SubClass < crate :: generated :: Resource > for QuadMesh { } unsafe impl SubClass < crate :: generated :: Reference > for QuadMesh { } unsafe impl SubClass < crate :: generated :: Object > for QuadMesh { } impl Instanciable for QuadMesh { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { QuadMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct QuadMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_center_offset : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub set_center_offset : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind } impl QuadMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : QuadMeshMethodTable = QuadMeshMethodTable { class_constructor : None , get_center_offset : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , set_center_offset : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { QuadMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "QuadMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_center_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_center_offset\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . set_center_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_center_offset\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::quad_mesh::private::QuadMesh;
            
            pub(crate) mod random_number_generator {
                # ! [doc = "This module contains types related to the API class [`RandomNumberGenerator`][super::RandomNumberGenerator]."] pub (crate) mod private { # [doc = "`core class RandomNumberGenerator` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_randomnumbergenerator.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nRandomNumberGenerator inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RandomNumberGenerator { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RandomNumberGenerator ; impl RandomNumberGenerator { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RandomNumberGeneratorMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nInitializes the random number generator state based on the given seed value. A given seed will give a reproducible sequence of pseudo-random numbers.\n**Note:** The RNG does not have an avalanche effect, and can output similar random streams given similar seeds. Consider using a hash function to improve your seed quality if they're sourced externally.\n**Note:** Setting this property produces a side effect of changing the internal [`state`][Self::state], so make sure to initialize the seed _before_ modifying the [`state`][Self::state]:\n```gdscript\nvar rng = RandomNumberGenerator.new()\nrng.seed = hash(\"Godot\")\nrng.state = 100 # Restore to some previously saved state.\n```\n**Warning:** the getter of this property returns the previous [`state`][Self::state], and not the initial seed value, which is going to be fixed in Godot 4.0."] # [doc = ""] # [inline] pub fn seed (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . get_seed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nThe current state of the random number generator. Save and restore this property to restore the generator to a previous state:\n```gdscript\nvar rng = RandomNumberGenerator.new()\nprint(rng.randf())\nvar saved_state = rng.state # Store current state.\nprint(rng.randf()) # Advance internal state.\nrng.state = saved_state # Restore the state.\nprint(rng.randf()) # Prints the same value as in previous.\n```\n**Note:** Do not set state to arbitrary values, since the random number generator requires the state to have certain qualities to behave properly. It should only be set to values that came from the state property itself. To initialize the random number generator with arbitrary input, use [`seed`][Self::seed] instead."] # [doc = ""] # [inline] pub fn state (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . get_state ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Generates a pseudo-random float between `0.0` and `1.0` (inclusive)."] # [doc = ""] # [inline] pub fn randf (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . randf ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Generates a pseudo-random float between `from` and `to` (inclusive)."] # [doc = ""] # [inline] pub fn randf_range (& self , from : f64 , to : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . randf_range ; let ret = crate :: icalls :: icallvar__f64_f64 (method_bind , self . this . sys () . as_ptr () , from as _ , to as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Generates a [normally-distributed](https://en.wikipedia.org/wiki/Normal_distribution) pseudo-random number, using Box-Muller transform with the specified `mean` and a standard `deviation`. This is also called Gaussian distribution.\n# Default Arguments\n* `mean` - `0.0`\n* `deviation` - `1.0`"] # [doc = ""] # [inline] pub fn randfn (& self , mean : f64 , deviation : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . randfn ; let ret = crate :: icalls :: icallvar__f64_f64 (method_bind , self . this . sys () . as_ptr () , mean as _ , deviation as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Generates a pseudo-random 32-bit unsigned integer between `0` and `4294967295` (inclusive)."] # [doc = ""] # [inline] pub fn randi (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . randi ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Generates a pseudo-random 32-bit signed integer between `from` and `to` (inclusive)."] # [doc = ""] # [inline] pub fn randi_range (& self , from : i64 , to : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . randi_range ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , from as _ , to as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Setups a time-based seed to generator."] # [doc = ""] # [inline] pub fn randomize (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . randomize ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nInitializes the random number generator state based on the given seed value. A given seed will give a reproducible sequence of pseudo-random numbers.\n**Note:** The RNG does not have an avalanche effect, and can output similar random streams given similar seeds. Consider using a hash function to improve your seed quality if they're sourced externally.\n**Note:** Setting this property produces a side effect of changing the internal [`state`][Self::state], so make sure to initialize the seed _before_ modifying the [`state`][Self::state]:\n```gdscript\nvar rng = RandomNumberGenerator.new()\nrng.seed = hash(\"Godot\")\nrng.state = 100 # Restore to some previously saved state.\n```\n**Warning:** the getter of this property returns the previous [`state`][Self::state], and not the initial seed value, which is going to be fixed in Godot 4.0."] # [doc = ""] # [inline] pub fn set_seed (& self , seed : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . set_seed ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , seed as _) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nThe current state of the random number generator. Save and restore this property to restore the generator to a previous state:\n```gdscript\nvar rng = RandomNumberGenerator.new()\nprint(rng.randf())\nvar saved_state = rng.state # Store current state.\nprint(rng.randf()) # Advance internal state.\nrng.state = saved_state # Restore the state.\nprint(rng.randf()) # Prints the same value as in previous.\n```\n**Note:** Do not set state to arbitrary values, since the random number generator requires the state to have certain qualities to behave properly. It should only be set to values that came from the state property itself. To initialize the random number generator with arbitrary input, use [`seed`][Self::seed] instead."] # [doc = ""] # [inline] pub fn set_state (& self , state : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RandomNumberGeneratorMethodTable :: get (get_api ()) . set_state ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , state as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RandomNumberGenerator { } unsafe impl GodotObject for RandomNumberGenerator { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RandomNumberGenerator" } } impl std :: ops :: Deref for RandomNumberGenerator { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RandomNumberGenerator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for RandomNumberGenerator { } unsafe impl SubClass < crate :: generated :: Object > for RandomNumberGenerator { } impl Instanciable for RandomNumberGenerator { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RandomNumberGenerator :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RandomNumberGeneratorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_seed : * mut sys :: godot_method_bind , pub get_state : * mut sys :: godot_method_bind , pub randf : * mut sys :: godot_method_bind , pub randf_range : * mut sys :: godot_method_bind , pub randfn : * mut sys :: godot_method_bind , pub randi : * mut sys :: godot_method_bind , pub randi_range : * mut sys :: godot_method_bind , pub randomize : * mut sys :: godot_method_bind , pub set_seed : * mut sys :: godot_method_bind , pub set_state : * mut sys :: godot_method_bind } impl RandomNumberGeneratorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RandomNumberGeneratorMethodTable = RandomNumberGeneratorMethodTable { class_constructor : None , get_seed : 0 as * mut sys :: godot_method_bind , get_state : 0 as * mut sys :: godot_method_bind , randf : 0 as * mut sys :: godot_method_bind , randf_range : 0 as * mut sys :: godot_method_bind , randfn : 0 as * mut sys :: godot_method_bind , randi : 0 as * mut sys :: godot_method_bind , randi_range : 0 as * mut sys :: godot_method_bind , randomize : 0 as * mut sys :: godot_method_bind , set_seed : 0 as * mut sys :: godot_method_bind , set_state : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RandomNumberGeneratorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RandomNumberGenerator\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_seed = (gd_api . godot_method_bind_get_method) (class_name , "get_seed\0" . as_ptr () as * const c_char) ; table . get_state = (gd_api . godot_method_bind_get_method) (class_name , "get_state\0" . as_ptr () as * const c_char) ; table . randf = (gd_api . godot_method_bind_get_method) (class_name , "randf\0" . as_ptr () as * const c_char) ; table . randf_range = (gd_api . godot_method_bind_get_method) (class_name , "randf_range\0" . as_ptr () as * const c_char) ; table . randfn = (gd_api . godot_method_bind_get_method) (class_name , "randfn\0" . as_ptr () as * const c_char) ; table . randi = (gd_api . godot_method_bind_get_method) (class_name , "randi\0" . as_ptr () as * const c_char) ; table . randi_range = (gd_api . godot_method_bind_get_method) (class_name , "randi_range\0" . as_ptr () as * const c_char) ; table . randomize = (gd_api . godot_method_bind_get_method) (class_name , "randomize\0" . as_ptr () as * const c_char) ; table . set_seed = (gd_api . godot_method_bind_get_method) (class_name , "set_seed\0" . as_ptr () as * const c_char) ; table . set_state = (gd_api . godot_method_bind_get_method) (class_name , "set_state\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::random_number_generator::private::RandomNumberGenerator;
            
            pub(crate) mod range {
                # ! [doc = "This module contains types related to the API class [`Range`][super::Range]."] pub (crate) mod private { # [doc = "`core class Range` inherits `Control` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_range.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nRange inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Range { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Range ; impl Range { # [doc = "The value mapped between 0 and 1."] # [doc = ""] # [inline] pub fn as_ratio (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . get_as_ratio ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Maximum value. Range is clamped if `value` is greater than `max_value`."] # [doc = ""] # [inline] pub fn max (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . get_max ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Minimum value. Range is clamped if `value` is less than `min_value`."] # [doc = ""] # [inline] pub fn min (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . get_min ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Page size. Used mainly for [`ScrollBar`][ScrollBar]. ScrollBar's length is its size multiplied by `page` over the difference between `min_value` and `max_value`."] # [doc = ""] # [inline] pub fn page (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . get_page ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If greater than 0, `value` will always be rounded to a multiple of `step`. If `rounded` is also `true`, `value` will first be rounded to a multiple of `step` then rounded to the nearest integer."] # [doc = ""] # [inline] pub fn step (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . get_step ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Range's current value."] # [doc = ""] # [inline] pub fn value (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . get_value ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, [`value`][Self::value] may be greater than [`max_value`][Self::max_value]."] # [doc = ""] # [inline] pub fn is_greater_allowed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . is_greater_allowed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, [`value`][Self::value] may be less than [`min_value`][Self::min_value]."] # [doc = ""] # [inline] pub fn is_lesser_allowed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . is_lesser_allowed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, and `min_value` is greater than 0, `value` will be represented exponentially rather than linearly."] # [doc = ""] # [inline] pub fn is_ratio_exp (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . is_ratio_exp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, `value` will always be rounded to the nearest integer."] # [doc = ""] # [inline] pub fn is_using_rounded_values (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . is_using_rounded_values ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, [`value`][Self::value] may be greater than [`max_value`][Self::max_value]."] # [doc = ""] # [inline] pub fn set_allow_greater (& self , allow : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . set_allow_greater ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , allow as _) ; } } # [doc = "If `true`, [`value`][Self::value] may be less than [`min_value`][Self::min_value]."] # [doc = ""] # [inline] pub fn set_allow_lesser (& self , allow : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . set_allow_lesser ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , allow as _) ; } } # [doc = "The value mapped between 0 and 1."] # [doc = ""] # [inline] pub fn set_as_ratio (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . set_as_ratio ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "If `true`, and `min_value` is greater than 0, `value` will be represented exponentially rather than linearly."] # [doc = ""] # [inline] pub fn set_exp_ratio (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . set_exp_ratio ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Maximum value. Range is clamped if `value` is greater than `max_value`."] # [doc = ""] # [inline] pub fn set_max (& self , maximum : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . set_max ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , maximum as _) ; } } # [doc = "Minimum value. Range is clamped if `value` is less than `min_value`."] # [doc = ""] # [inline] pub fn set_min (& self , minimum : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . set_min ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , minimum as _) ; } } # [doc = "Page size. Used mainly for [`ScrollBar`][ScrollBar]. ScrollBar's length is its size multiplied by `page` over the difference between `min_value` and `max_value`."] # [doc = ""] # [inline] pub fn set_page (& self , pagesize : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . set_page ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , pagesize as _) ; } } # [doc = "If greater than 0, `value` will always be rounded to a multiple of `step`. If `rounded` is also `true`, `value` will first be rounded to a multiple of `step` then rounded to the nearest integer."] # [doc = ""] # [inline] pub fn set_step (& self , step : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . set_step ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , step as _) ; } } # [doc = "If `true`, `value` will always be rounded to the nearest integer."] # [doc = ""] # [inline] pub fn set_use_rounded_values (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . set_use_rounded_values ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Range's current value."] # [doc = ""] # [inline] pub fn set_value (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . set_value ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Binds two [`Range`][Range]s together along with any ranges previously grouped with either of them. When any of range's member variables change, it will share the new value with all other ranges in its group."] # [doc = ""] # [inline] pub fn share (& self , with : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . share ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , with . as_arg_ptr ()) ; } } # [doc = "Stops the [`Range`][Range] from sharing its member variables with any other."] # [doc = ""] # [inline] pub fn unshare (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RangeMethodTable :: get (get_api ()) . unshare ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Range { } unsafe impl GodotObject for Range { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Range" } } impl QueueFree for Range { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Range { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Range { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for Range { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Range { } unsafe impl SubClass < crate :: generated :: Node > for Range { } unsafe impl SubClass < crate :: generated :: Object > for Range { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RangeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_as_ratio : * mut sys :: godot_method_bind , pub get_max : * mut sys :: godot_method_bind , pub get_min : * mut sys :: godot_method_bind , pub get_page : * mut sys :: godot_method_bind , pub get_step : * mut sys :: godot_method_bind , pub get_value : * mut sys :: godot_method_bind , pub is_greater_allowed : * mut sys :: godot_method_bind , pub is_lesser_allowed : * mut sys :: godot_method_bind , pub is_ratio_exp : * mut sys :: godot_method_bind , pub is_using_rounded_values : * mut sys :: godot_method_bind , pub set_allow_greater : * mut sys :: godot_method_bind , pub set_allow_lesser : * mut sys :: godot_method_bind , pub set_as_ratio : * mut sys :: godot_method_bind , pub set_exp_ratio : * mut sys :: godot_method_bind , pub set_max : * mut sys :: godot_method_bind , pub set_min : * mut sys :: godot_method_bind , pub set_page : * mut sys :: godot_method_bind , pub set_step : * mut sys :: godot_method_bind , pub set_use_rounded_values : * mut sys :: godot_method_bind , pub set_value : * mut sys :: godot_method_bind , pub share : * mut sys :: godot_method_bind , pub unshare : * mut sys :: godot_method_bind } impl RangeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RangeMethodTable = RangeMethodTable { class_constructor : None , get_as_ratio : 0 as * mut sys :: godot_method_bind , get_max : 0 as * mut sys :: godot_method_bind , get_min : 0 as * mut sys :: godot_method_bind , get_page : 0 as * mut sys :: godot_method_bind , get_step : 0 as * mut sys :: godot_method_bind , get_value : 0 as * mut sys :: godot_method_bind , is_greater_allowed : 0 as * mut sys :: godot_method_bind , is_lesser_allowed : 0 as * mut sys :: godot_method_bind , is_ratio_exp : 0 as * mut sys :: godot_method_bind , is_using_rounded_values : 0 as * mut sys :: godot_method_bind , set_allow_greater : 0 as * mut sys :: godot_method_bind , set_allow_lesser : 0 as * mut sys :: godot_method_bind , set_as_ratio : 0 as * mut sys :: godot_method_bind , set_exp_ratio : 0 as * mut sys :: godot_method_bind , set_max : 0 as * mut sys :: godot_method_bind , set_min : 0 as * mut sys :: godot_method_bind , set_page : 0 as * mut sys :: godot_method_bind , set_step : 0 as * mut sys :: godot_method_bind , set_use_rounded_values : 0 as * mut sys :: godot_method_bind , set_value : 0 as * mut sys :: godot_method_bind , share : 0 as * mut sys :: godot_method_bind , unshare : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RangeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Range\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_as_ratio = (gd_api . godot_method_bind_get_method) (class_name , "get_as_ratio\0" . as_ptr () as * const c_char) ; table . get_max = (gd_api . godot_method_bind_get_method) (class_name , "get_max\0" . as_ptr () as * const c_char) ; table . get_min = (gd_api . godot_method_bind_get_method) (class_name , "get_min\0" . as_ptr () as * const c_char) ; table . get_page = (gd_api . godot_method_bind_get_method) (class_name , "get_page\0" . as_ptr () as * const c_char) ; table . get_step = (gd_api . godot_method_bind_get_method) (class_name , "get_step\0" . as_ptr () as * const c_char) ; table . get_value = (gd_api . godot_method_bind_get_method) (class_name , "get_value\0" . as_ptr () as * const c_char) ; table . is_greater_allowed = (gd_api . godot_method_bind_get_method) (class_name , "is_greater_allowed\0" . as_ptr () as * const c_char) ; table . is_lesser_allowed = (gd_api . godot_method_bind_get_method) (class_name , "is_lesser_allowed\0" . as_ptr () as * const c_char) ; table . is_ratio_exp = (gd_api . godot_method_bind_get_method) (class_name , "is_ratio_exp\0" . as_ptr () as * const c_char) ; table . is_using_rounded_values = (gd_api . godot_method_bind_get_method) (class_name , "is_using_rounded_values\0" . as_ptr () as * const c_char) ; table . set_allow_greater = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_greater\0" . as_ptr () as * const c_char) ; table . set_allow_lesser = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_lesser\0" . as_ptr () as * const c_char) ; table . set_as_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_as_ratio\0" . as_ptr () as * const c_char) ; table . set_exp_ratio = (gd_api . godot_method_bind_get_method) (class_name , "set_exp_ratio\0" . as_ptr () as * const c_char) ; table . set_max = (gd_api . godot_method_bind_get_method) (class_name , "set_max\0" . as_ptr () as * const c_char) ; table . set_min = (gd_api . godot_method_bind_get_method) (class_name , "set_min\0" . as_ptr () as * const c_char) ; table . set_page = (gd_api . godot_method_bind_get_method) (class_name , "set_page\0" . as_ptr () as * const c_char) ; table . set_step = (gd_api . godot_method_bind_get_method) (class_name , "set_step\0" . as_ptr () as * const c_char) ; table . set_use_rounded_values = (gd_api . godot_method_bind_get_method) (class_name , "set_use_rounded_values\0" . as_ptr () as * const c_char) ; table . set_value = (gd_api . godot_method_bind_get_method) (class_name , "set_value\0" . as_ptr () as * const c_char) ; table . share = (gd_api . godot_method_bind_get_method) (class_name , "share\0" . as_ptr () as * const c_char) ; table . unshare = (gd_api . godot_method_bind_get_method) (class_name , "unshare\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::range::private::Range;
            
            pub(crate) mod ray_cast {
                # ! [doc = "This module contains types related to the API class [`RayCast`][super::RayCast]."] pub (crate) mod private { # [doc = "`core class RayCast` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_raycast.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`RayCast` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<RayCast>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRayCast inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RayCast { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RayCast ; impl RayCast { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RayCastMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a collision exception so the ray does not report collisions with the specified node."] # [doc = ""] # [inline] pub fn add_exception (& self , node : impl AsArg < crate :: generated :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . add_exception ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Adds a collision exception so the ray does not report collisions with the specified [`RID`][Rid]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn add_exception_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . add_exception_rid ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Removes all collision exceptions for this ray."] # [doc = ""] # [inline] pub fn clear_exceptions (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . clear_exceptions ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next `_physics_process` call, for example if the ray or its parent has changed state.\n**Note:** `enabled` is not required for this to work."] # [doc = ""] # [inline] pub fn force_raycast_update (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . force_raycast_update ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The ray's destination point, relative to the RayCast's `position`."] # [doc = ""] # [inline] pub fn cast_to (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_cast_to ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the first object that the ray intersects, or `null` if no object is intersecting the ray (i.e. [`is_colliding`][Self::is_colliding] returns `false`)."] # [doc = ""] # [inline] pub fn get_collider (& self) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_collider ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the shape ID of the first object that the ray intersects, or `0` if no object is intersecting the ray (i.e. [`is_colliding`][Self::is_colliding] returns `false`)."] # [doc = ""] # [inline] pub fn get_collider_shape (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_collider_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the bit index passed is turned on.\n**Note:** Bit indices range from 0-19."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the normal of the intersecting object's shape at the collision point."] # [doc = ""] # [inline] pub fn get_collision_normal (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_collision_normal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the collision point at which the ray intersects the closest object.\n**Note:** This point is in the **global** coordinate system."] # [doc = ""] # [inline] pub fn get_collision_point (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_collision_point ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The custom color to use to draw the shape in the editor and at run-time if **Visible Collision Shapes** is enabled in the **Debug** menu. This color will be highlighted at run-time if the [`RayCast`][RayCast] is colliding with something.\nIf set to `Color(0.0, 0.0, 0.0)` (by default), the color set in [member ProjectSettings.debug/shapes/collision/shape_color] is used."] # [doc = ""] # [inline] pub fn debug_shape_custom_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_debug_shape_custom_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If set to `1`, a line is used as the debug shape. Otherwise, a truncated pyramid is drawn to represent the [`RayCast`][RayCast]. Requires **Visible Collision Shapes** to be enabled in the **Debug** menu for the debug shape to be visible at run-time."] # [doc = ""] # [inline] pub fn debug_shape_thickness (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_debug_shape_thickness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, collisions will be ignored for this RayCast's immediate parent."] # [doc = ""] # [inline] pub fn exclude_parent_body (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . get_exclude_parent_body ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, collision with [`Area`][Area]s will be reported."] # [doc = ""] # [inline] pub fn is_collide_with_areas_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . is_collide_with_areas_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, collision with [`PhysicsBody`][PhysicsBody]s will be reported."] # [doc = ""] # [inline] pub fn is_collide_with_bodies_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . is_collide_with_bodies_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether any object is intersecting with the ray's vector (considering the vector length)."] # [doc = ""] # [inline] pub fn is_colliding (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . is_colliding ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, collisions will be reported."] # [doc = ""] # [inline] pub fn is_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . is_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes a collision exception so the ray does report collisions with the specified node."] # [doc = ""] # [inline] pub fn remove_exception (& self , node : impl AsArg < crate :: generated :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . remove_exception ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Removes a collision exception so the ray does report collisions with the specified [`RID`][Rid]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn remove_exception_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . remove_exception_rid ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "The ray's destination point, relative to the RayCast's `position`."] # [doc = ""] # [inline] pub fn set_cast_to (& self , local_point : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_cast_to ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , local_point) ; } } # [doc = "If `true`, collision with [`Area`][Area]s will be reported."] # [doc = ""] # [inline] pub fn set_collide_with_areas (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_collide_with_areas ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, collision with [`PhysicsBody`][PhysicsBody]s will be reported."] # [doc = ""] # [inline] pub fn set_collide_with_bodies (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_collide_with_bodies ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "Sets the bit index passed to the `value` passed.\n**Note:** Bit indexes range from 0-19."] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = "The custom color to use to draw the shape in the editor and at run-time if **Visible Collision Shapes** is enabled in the **Debug** menu. This color will be highlighted at run-time if the [`RayCast`][RayCast] is colliding with something.\nIf set to `Color(0.0, 0.0, 0.0)` (by default), the color set in [member ProjectSettings.debug/shapes/collision/shape_color] is used."] # [doc = ""] # [inline] pub fn set_debug_shape_custom_color (& self , debug_shape_custom_color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_debug_shape_custom_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , debug_shape_custom_color) ; } } # [doc = "If set to `1`, a line is used as the debug shape. Otherwise, a truncated pyramid is drawn to represent the [`RayCast`][RayCast]. Requires **Visible Collision Shapes** to be enabled in the **Debug** menu for the debug shape to be visible at run-time."] # [doc = ""] # [inline] pub fn set_debug_shape_thickness (& self , debug_shape_thickness : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_debug_shape_thickness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , debug_shape_thickness as _) ; } } # [doc = "If `true`, collisions will be reported."] # [doc = ""] # [inline] pub fn set_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, collisions will be ignored for this RayCast's immediate parent."] # [doc = ""] # [inline] pub fn set_exclude_parent_body (& self , mask : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCastMethodTable :: get (get_api ()) . set_exclude_parent_body ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RayCast { } unsafe impl GodotObject for RayCast { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RayCast" } } impl QueueFree for RayCast { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for RayCast { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RayCast { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for RayCast { } unsafe impl SubClass < crate :: generated :: Node > for RayCast { } unsafe impl SubClass < crate :: generated :: Object > for RayCast { } impl Instanciable for RayCast { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RayCast :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RayCastMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_exception : * mut sys :: godot_method_bind , pub add_exception_rid : * mut sys :: godot_method_bind , pub clear_exceptions : * mut sys :: godot_method_bind , pub force_raycast_update : * mut sys :: godot_method_bind , pub get_cast_to : * mut sys :: godot_method_bind , pub get_collider : * mut sys :: godot_method_bind , pub get_collider_shape : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_collision_normal : * mut sys :: godot_method_bind , pub get_collision_point : * mut sys :: godot_method_bind , pub get_debug_shape_custom_color : * mut sys :: godot_method_bind , pub get_debug_shape_thickness : * mut sys :: godot_method_bind , pub get_exclude_parent_body : * mut sys :: godot_method_bind , pub is_collide_with_areas_enabled : * mut sys :: godot_method_bind , pub is_collide_with_bodies_enabled : * mut sys :: godot_method_bind , pub is_colliding : * mut sys :: godot_method_bind , pub is_enabled : * mut sys :: godot_method_bind , pub remove_exception : * mut sys :: godot_method_bind , pub remove_exception_rid : * mut sys :: godot_method_bind , pub set_cast_to : * mut sys :: godot_method_bind , pub set_collide_with_areas : * mut sys :: godot_method_bind , pub set_collide_with_bodies : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_debug_shape_custom_color : * mut sys :: godot_method_bind , pub set_debug_shape_thickness : * mut sys :: godot_method_bind , pub set_enabled : * mut sys :: godot_method_bind , pub set_exclude_parent_body : * mut sys :: godot_method_bind } impl RayCastMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RayCastMethodTable = RayCastMethodTable { class_constructor : None , add_exception : 0 as * mut sys :: godot_method_bind , add_exception_rid : 0 as * mut sys :: godot_method_bind , clear_exceptions : 0 as * mut sys :: godot_method_bind , force_raycast_update : 0 as * mut sys :: godot_method_bind , get_cast_to : 0 as * mut sys :: godot_method_bind , get_collider : 0 as * mut sys :: godot_method_bind , get_collider_shape : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_collision_normal : 0 as * mut sys :: godot_method_bind , get_collision_point : 0 as * mut sys :: godot_method_bind , get_debug_shape_custom_color : 0 as * mut sys :: godot_method_bind , get_debug_shape_thickness : 0 as * mut sys :: godot_method_bind , get_exclude_parent_body : 0 as * mut sys :: godot_method_bind , is_collide_with_areas_enabled : 0 as * mut sys :: godot_method_bind , is_collide_with_bodies_enabled : 0 as * mut sys :: godot_method_bind , is_colliding : 0 as * mut sys :: godot_method_bind , is_enabled : 0 as * mut sys :: godot_method_bind , remove_exception : 0 as * mut sys :: godot_method_bind , remove_exception_rid : 0 as * mut sys :: godot_method_bind , set_cast_to : 0 as * mut sys :: godot_method_bind , set_collide_with_areas : 0 as * mut sys :: godot_method_bind , set_collide_with_bodies : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_debug_shape_custom_color : 0 as * mut sys :: godot_method_bind , set_debug_shape_thickness : 0 as * mut sys :: godot_method_bind , set_enabled : 0 as * mut sys :: godot_method_bind , set_exclude_parent_body : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RayCastMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RayCast\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_exception = (gd_api . godot_method_bind_get_method) (class_name , "add_exception\0" . as_ptr () as * const c_char) ; table . add_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "add_exception_rid\0" . as_ptr () as * const c_char) ; table . clear_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "clear_exceptions\0" . as_ptr () as * const c_char) ; table . force_raycast_update = (gd_api . godot_method_bind_get_method) (class_name , "force_raycast_update\0" . as_ptr () as * const c_char) ; table . get_cast_to = (gd_api . godot_method_bind_get_method) (class_name , "get_cast_to\0" . as_ptr () as * const c_char) ; table . get_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_collider\0" . as_ptr () as * const c_char) ; table . get_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_collision_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_normal\0" . as_ptr () as * const c_char) ; table . get_collision_point = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_point\0" . as_ptr () as * const c_char) ; table . get_debug_shape_custom_color = (gd_api . godot_method_bind_get_method) (class_name , "get_debug_shape_custom_color\0" . as_ptr () as * const c_char) ; table . get_debug_shape_thickness = (gd_api . godot_method_bind_get_method) (class_name , "get_debug_shape_thickness\0" . as_ptr () as * const c_char) ; table . get_exclude_parent_body = (gd_api . godot_method_bind_get_method) (class_name , "get_exclude_parent_body\0" . as_ptr () as * const c_char) ; table . is_collide_with_areas_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_collide_with_areas_enabled\0" . as_ptr () as * const c_char) ; table . is_collide_with_bodies_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_collide_with_bodies_enabled\0" . as_ptr () as * const c_char) ; table . is_colliding = (gd_api . godot_method_bind_get_method) (class_name , "is_colliding\0" . as_ptr () as * const c_char) ; table . is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabled\0" . as_ptr () as * const c_char) ; table . remove_exception = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception\0" . as_ptr () as * const c_char) ; table . remove_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception_rid\0" . as_ptr () as * const c_char) ; table . set_cast_to = (gd_api . godot_method_bind_get_method) (class_name , "set_cast_to\0" . as_ptr () as * const c_char) ; table . set_collide_with_areas = (gd_api . godot_method_bind_get_method) (class_name , "set_collide_with_areas\0" . as_ptr () as * const c_char) ; table . set_collide_with_bodies = (gd_api . godot_method_bind_get_method) (class_name , "set_collide_with_bodies\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_debug_shape_custom_color = (gd_api . godot_method_bind_get_method) (class_name , "set_debug_shape_custom_color\0" . as_ptr () as * const c_char) ; table . set_debug_shape_thickness = (gd_api . godot_method_bind_get_method) (class_name , "set_debug_shape_thickness\0" . as_ptr () as * const c_char) ; table . set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled\0" . as_ptr () as * const c_char) ; table . set_exclude_parent_body = (gd_api . godot_method_bind_get_method) (class_name , "set_exclude_parent_body\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::ray_cast::private::RayCast;
            
            pub(crate) mod ray_cast_2d {
                # ! [doc = "This module contains types related to the API class [`RayCast2D`][super::RayCast2D]."] pub (crate) mod private { # [doc = "`core class RayCast2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_raycast2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`RayCast2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<RayCast2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRayCast2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RayCast2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RayCast2D ; impl RayCast2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RayCast2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a collision exception so the ray does not report collisions with the specified node."] # [doc = ""] # [inline] pub fn add_exception (& self , node : impl AsArg < crate :: generated :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . add_exception ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Adds a collision exception so the ray does not report collisions with the specified [`RID`][Rid]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn add_exception_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . add_exception_rid ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Removes all collision exceptions for this ray."] # [doc = ""] # [inline] pub fn clear_exceptions (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . clear_exceptions ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next `_physics_process` call, for example if the ray or its parent has changed state.\n**Note:** `enabled` is not required for this to work."] # [doc = ""] # [inline] pub fn force_raycast_update (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . force_raycast_update ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The ray's destination point, relative to the RayCast's `position`."] # [doc = ""] # [inline] pub fn cast_to (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . get_cast_to ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the first object that the ray intersects, or `null` if no object is intersecting the ray (i.e. [`is_colliding`][Self::is_colliding] returns `false`)."] # [doc = ""] # [inline] pub fn get_collider (& self) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . get_collider ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the shape ID of the first object that the ray intersects, or `0` if no object is intersecting the ray (i.e. [`is_colliding`][Self::is_colliding] returns `false`)."] # [doc = ""] # [inline] pub fn get_collider_shape (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . get_collider_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an individual bit on the collision mask."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the normal of the intersecting object's shape at the collision point."] # [doc = ""] # [inline] pub fn get_collision_normal (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . get_collision_normal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the collision point at which the ray intersects the closest object.\n**Note:** This point is in the **global** coordinate system."] # [doc = ""] # [inline] pub fn get_collision_point (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . get_collision_point ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the parent node will be excluded from collision detection."] # [doc = ""] # [inline] pub fn exclude_parent_body (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . get_exclude_parent_body ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, collision with [`Area2D`][Area2D]s will be reported."] # [doc = ""] # [inline] pub fn is_collide_with_areas_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . is_collide_with_areas_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, collision with [`PhysicsBody2D`][PhysicsBody2D]s will be reported."] # [doc = ""] # [inline] pub fn is_collide_with_bodies_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . is_collide_with_bodies_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether any object is intersecting with the ray's vector (considering the vector length)."] # [doc = ""] # [inline] pub fn is_colliding (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . is_colliding ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, collisions will be reported."] # [doc = ""] # [inline] pub fn is_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . is_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes a collision exception so the ray does report collisions with the specified node."] # [doc = ""] # [inline] pub fn remove_exception (& self , node : impl AsArg < crate :: generated :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . remove_exception ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; } } # [doc = "Removes a collision exception so the ray does report collisions with the specified [`RID`][Rid]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn remove_exception_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . remove_exception_rid ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "The ray's destination point, relative to the RayCast's `position`."] # [doc = ""] # [inline] pub fn set_cast_to (& self , local_point : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . set_cast_to ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , local_point) ; } } # [doc = "If `true`, collision with [`Area2D`][Area2D]s will be reported."] # [doc = ""] # [inline] pub fn set_collide_with_areas (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . set_collide_with_areas ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, collision with [`PhysicsBody2D`][PhysicsBody2D]s will be reported."] # [doc = ""] # [inline] pub fn set_collide_with_bodies (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . set_collide_with_bodies ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "Sets or clears individual bits on the collision mask. This makes selecting the areas scanned easier."] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = "If `true`, collisions will be reported."] # [doc = ""] # [inline] pub fn set_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . set_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, the parent node will be excluded from collision detection."] # [doc = ""] # [inline] pub fn set_exclude_parent_body (& self , mask : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayCast2DMethodTable :: get (get_api ()) . set_exclude_parent_body ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RayCast2D { } unsafe impl GodotObject for RayCast2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RayCast2D" } } impl QueueFree for RayCast2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for RayCast2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RayCast2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for RayCast2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for RayCast2D { } unsafe impl SubClass < crate :: generated :: Node > for RayCast2D { } unsafe impl SubClass < crate :: generated :: Object > for RayCast2D { } impl Instanciable for RayCast2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RayCast2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RayCast2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_exception : * mut sys :: godot_method_bind , pub add_exception_rid : * mut sys :: godot_method_bind , pub clear_exceptions : * mut sys :: godot_method_bind , pub force_raycast_update : * mut sys :: godot_method_bind , pub get_cast_to : * mut sys :: godot_method_bind , pub get_collider : * mut sys :: godot_method_bind , pub get_collider_shape : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_collision_normal : * mut sys :: godot_method_bind , pub get_collision_point : * mut sys :: godot_method_bind , pub get_exclude_parent_body : * mut sys :: godot_method_bind , pub is_collide_with_areas_enabled : * mut sys :: godot_method_bind , pub is_collide_with_bodies_enabled : * mut sys :: godot_method_bind , pub is_colliding : * mut sys :: godot_method_bind , pub is_enabled : * mut sys :: godot_method_bind , pub remove_exception : * mut sys :: godot_method_bind , pub remove_exception_rid : * mut sys :: godot_method_bind , pub set_cast_to : * mut sys :: godot_method_bind , pub set_collide_with_areas : * mut sys :: godot_method_bind , pub set_collide_with_bodies : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_enabled : * mut sys :: godot_method_bind , pub set_exclude_parent_body : * mut sys :: godot_method_bind } impl RayCast2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RayCast2DMethodTable = RayCast2DMethodTable { class_constructor : None , add_exception : 0 as * mut sys :: godot_method_bind , add_exception_rid : 0 as * mut sys :: godot_method_bind , clear_exceptions : 0 as * mut sys :: godot_method_bind , force_raycast_update : 0 as * mut sys :: godot_method_bind , get_cast_to : 0 as * mut sys :: godot_method_bind , get_collider : 0 as * mut sys :: godot_method_bind , get_collider_shape : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_collision_normal : 0 as * mut sys :: godot_method_bind , get_collision_point : 0 as * mut sys :: godot_method_bind , get_exclude_parent_body : 0 as * mut sys :: godot_method_bind , is_collide_with_areas_enabled : 0 as * mut sys :: godot_method_bind , is_collide_with_bodies_enabled : 0 as * mut sys :: godot_method_bind , is_colliding : 0 as * mut sys :: godot_method_bind , is_enabled : 0 as * mut sys :: godot_method_bind , remove_exception : 0 as * mut sys :: godot_method_bind , remove_exception_rid : 0 as * mut sys :: godot_method_bind , set_cast_to : 0 as * mut sys :: godot_method_bind , set_collide_with_areas : 0 as * mut sys :: godot_method_bind , set_collide_with_bodies : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_enabled : 0 as * mut sys :: godot_method_bind , set_exclude_parent_body : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RayCast2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RayCast2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_exception = (gd_api . godot_method_bind_get_method) (class_name , "add_exception\0" . as_ptr () as * const c_char) ; table . add_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "add_exception_rid\0" . as_ptr () as * const c_char) ; table . clear_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "clear_exceptions\0" . as_ptr () as * const c_char) ; table . force_raycast_update = (gd_api . godot_method_bind_get_method) (class_name , "force_raycast_update\0" . as_ptr () as * const c_char) ; table . get_cast_to = (gd_api . godot_method_bind_get_method) (class_name , "get_cast_to\0" . as_ptr () as * const c_char) ; table . get_collider = (gd_api . godot_method_bind_get_method) (class_name , "get_collider\0" . as_ptr () as * const c_char) ; table . get_collider_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_collider_shape\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_collision_normal = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_normal\0" . as_ptr () as * const c_char) ; table . get_collision_point = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_point\0" . as_ptr () as * const c_char) ; table . get_exclude_parent_body = (gd_api . godot_method_bind_get_method) (class_name , "get_exclude_parent_body\0" . as_ptr () as * const c_char) ; table . is_collide_with_areas_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_collide_with_areas_enabled\0" . as_ptr () as * const c_char) ; table . is_collide_with_bodies_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_collide_with_bodies_enabled\0" . as_ptr () as * const c_char) ; table . is_colliding = (gd_api . godot_method_bind_get_method) (class_name , "is_colliding\0" . as_ptr () as * const c_char) ; table . is_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabled\0" . as_ptr () as * const c_char) ; table . remove_exception = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception\0" . as_ptr () as * const c_char) ; table . remove_exception_rid = (gd_api . godot_method_bind_get_method) (class_name , "remove_exception_rid\0" . as_ptr () as * const c_char) ; table . set_cast_to = (gd_api . godot_method_bind_get_method) (class_name , "set_cast_to\0" . as_ptr () as * const c_char) ; table . set_collide_with_areas = (gd_api . godot_method_bind_get_method) (class_name , "set_collide_with_areas\0" . as_ptr () as * const c_char) ; table . set_collide_with_bodies = (gd_api . godot_method_bind_get_method) (class_name , "set_collide_with_bodies\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_enabled\0" . as_ptr () as * const c_char) ; table . set_exclude_parent_body = (gd_api . godot_method_bind_get_method) (class_name , "set_exclude_parent_body\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::ray_cast_2d::private::RayCast2D;
            
            pub(crate) mod ray_shape {
                # ! [doc = "This module contains types related to the API class [`RayShape`][super::RayShape]."] pub (crate) mod private { # [doc = "`core class RayShape` inherits `Shape` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_rayshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nRayShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RayShape { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RayShape ; impl RayShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RayShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The ray's length."] # [doc = ""] # [inline] pub fn length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayShapeMethodTable :: get (get_api ()) . get_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, allow the shape to return the correct normal."] # [doc = ""] # [inline] pub fn slips_on_slope (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayShapeMethodTable :: get (get_api ()) . get_slips_on_slope ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The ray's length."] # [doc = ""] # [inline] pub fn set_length (& self , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayShapeMethodTable :: get (get_api ()) . set_length ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , length as _) ; } } # [doc = "If `true`, allow the shape to return the correct normal."] # [doc = ""] # [inline] pub fn set_slips_on_slope (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayShapeMethodTable :: get (get_api ()) . set_slips_on_slope ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , active as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RayShape { } unsafe impl GodotObject for RayShape { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RayShape" } } impl std :: ops :: Deref for RayShape { type Target = crate :: generated :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RayShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape > for RayShape { } unsafe impl SubClass < crate :: generated :: Resource > for RayShape { } unsafe impl SubClass < crate :: generated :: Reference > for RayShape { } unsafe impl SubClass < crate :: generated :: Object > for RayShape { } impl Instanciable for RayShape { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RayShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RayShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_length : * mut sys :: godot_method_bind , pub get_slips_on_slope : * mut sys :: godot_method_bind , pub set_length : * mut sys :: godot_method_bind , pub set_slips_on_slope : * mut sys :: godot_method_bind } impl RayShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RayShapeMethodTable = RayShapeMethodTable { class_constructor : None , get_length : 0 as * mut sys :: godot_method_bind , get_slips_on_slope : 0 as * mut sys :: godot_method_bind , set_length : 0 as * mut sys :: godot_method_bind , set_slips_on_slope : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RayShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RayShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_length = (gd_api . godot_method_bind_get_method) (class_name , "get_length\0" . as_ptr () as * const c_char) ; table . get_slips_on_slope = (gd_api . godot_method_bind_get_method) (class_name , "get_slips_on_slope\0" . as_ptr () as * const c_char) ; table . set_length = (gd_api . godot_method_bind_get_method) (class_name , "set_length\0" . as_ptr () as * const c_char) ; table . set_slips_on_slope = (gd_api . godot_method_bind_get_method) (class_name , "set_slips_on_slope\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::ray_shape::private::RayShape;
            
            pub(crate) mod ray_shape_2d {
                # ! [doc = "This module contains types related to the API class [`RayShape2D`][super::RayShape2D]."] pub (crate) mod private { # [doc = "`core class RayShape2D` inherits `Shape2D` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_rayshape2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nRayShape2D inherits methods from:\n - [Shape2D](struct.Shape2D.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RayShape2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RayShape2D ; impl RayShape2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RayShape2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The ray's length."] # [doc = ""] # [inline] pub fn length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RayShape2DMethodTable :: get (get_api ()) . get_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, allow the shape to return the correct normal."] # [doc = ""] # [inline] pub fn slips_on_slope (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RayShape2DMethodTable :: get (get_api ()) . get_slips_on_slope ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The ray's length."] # [doc = ""] # [inline] pub fn set_length (& self , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayShape2DMethodTable :: get (get_api ()) . set_length ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , length as _) ; } } # [doc = "If `true`, allow the shape to return the correct normal."] # [doc = ""] # [inline] pub fn set_slips_on_slope (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RayShape2DMethodTable :: get (get_api ()) . set_slips_on_slope ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , active as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RayShape2D { } unsafe impl GodotObject for RayShape2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RayShape2D" } } impl std :: ops :: Deref for RayShape2D { type Target = crate :: generated :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RayShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape2D > for RayShape2D { } unsafe impl SubClass < crate :: generated :: Resource > for RayShape2D { } unsafe impl SubClass < crate :: generated :: Reference > for RayShape2D { } unsafe impl SubClass < crate :: generated :: Object > for RayShape2D { } impl Instanciable for RayShape2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RayShape2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RayShape2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_length : * mut sys :: godot_method_bind , pub get_slips_on_slope : * mut sys :: godot_method_bind , pub set_length : * mut sys :: godot_method_bind , pub set_slips_on_slope : * mut sys :: godot_method_bind } impl RayShape2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RayShape2DMethodTable = RayShape2DMethodTable { class_constructor : None , get_length : 0 as * mut sys :: godot_method_bind , get_slips_on_slope : 0 as * mut sys :: godot_method_bind , set_length : 0 as * mut sys :: godot_method_bind , set_slips_on_slope : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RayShape2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RayShape2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_length = (gd_api . godot_method_bind_get_method) (class_name , "get_length\0" . as_ptr () as * const c_char) ; table . get_slips_on_slope = (gd_api . godot_method_bind_get_method) (class_name , "get_slips_on_slope\0" . as_ptr () as * const c_char) ; table . set_length = (gd_api . godot_method_bind_get_method) (class_name , "set_length\0" . as_ptr () as * const c_char) ; table . set_slips_on_slope = (gd_api . godot_method_bind_get_method) (class_name , "set_slips_on_slope\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::ray_shape_2d::private::RayShape2D;
            
            pub(crate) mod rectangle_shape_2d {
                # ! [doc = "This module contains types related to the API class [`RectangleShape2D`][super::RectangleShape2D]."] pub (crate) mod private { # [doc = "`core class RectangleShape2D` inherits `Shape2D` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_rectangleshape2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nRectangleShape2D inherits methods from:\n - [Shape2D](struct.Shape2D.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RectangleShape2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RectangleShape2D ; impl RectangleShape2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RectangleShape2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The rectangle's half extents. The width and height of this shape is twice the half extents."] # [doc = ""] # [inline] pub fn extents (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = RectangleShape2DMethodTable :: get (get_api ()) . get_extents ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The rectangle's half extents. The width and height of this shape is twice the half extents."] # [doc = ""] # [inline] pub fn set_extents (& self , extents : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RectangleShape2DMethodTable :: get (get_api ()) . set_extents ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , extents) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RectangleShape2D { } unsafe impl GodotObject for RectangleShape2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RectangleShape2D" } } impl std :: ops :: Deref for RectangleShape2D { type Target = crate :: generated :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RectangleShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape2D > for RectangleShape2D { } unsafe impl SubClass < crate :: generated :: Resource > for RectangleShape2D { } unsafe impl SubClass < crate :: generated :: Reference > for RectangleShape2D { } unsafe impl SubClass < crate :: generated :: Object > for RectangleShape2D { } impl Instanciable for RectangleShape2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RectangleShape2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RectangleShape2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_extents : * mut sys :: godot_method_bind , pub set_extents : * mut sys :: godot_method_bind } impl RectangleShape2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RectangleShape2DMethodTable = RectangleShape2DMethodTable { class_constructor : None , get_extents : 0 as * mut sys :: godot_method_bind , set_extents : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RectangleShape2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RectangleShape2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_extents\0" . as_ptr () as * const c_char) ; table . set_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_extents\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::rectangle_shape_2d::private::RectangleShape2D;
            
            pub(crate) mod reference {
                # ! [doc = "This module contains types related to the API class [`Reference`][super::Reference]."] pub (crate) mod private { # [doc = "Base class of all reference-counted types. Inherits `Object`."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_reference.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nReference inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Reference { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Reference ; impl Reference { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ReferenceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for Reference { } unsafe impl GodotObject for Reference { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Reference" } } impl std :: ops :: Deref for Reference { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Reference { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for Reference { } impl Instanciable for Reference { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Reference :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ReferenceMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl ReferenceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ReferenceMethodTable = ReferenceMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ReferenceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Reference\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::reference::private::Reference;
            
            pub(crate) mod reference_rect {
                # ! [doc = "This module contains types related to the API class [`ReferenceRect`][super::ReferenceRect]."] pub (crate) mod private { # [doc = "`core class ReferenceRect` inherits `Control` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_referencerect.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ReferenceRect` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ReferenceRect>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nReferenceRect inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ReferenceRect { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ReferenceRect ; impl ReferenceRect { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ReferenceRectMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Sets the border [`Color`][Color] of the [`ReferenceRect`][ReferenceRect]."] # [doc = ""] # [inline] pub fn border_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ReferenceRectMethodTable :: get (get_api ()) . get_border_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the border width of the [`ReferenceRect`][ReferenceRect]. The border grows both inwards and outwards with respect to the rectangle box."] # [doc = ""] # [inline] pub fn border_width (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ReferenceRectMethodTable :: get (get_api ()) . get_border_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If set to `true`, the [`ReferenceRect`][ReferenceRect] will only be visible while in editor. Otherwise, [`ReferenceRect`][ReferenceRect] will be visible in game."] # [doc = ""] # [inline] pub fn editor_only (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ReferenceRectMethodTable :: get (get_api ()) . get_editor_only ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets the border [`Color`][Color] of the [`ReferenceRect`][ReferenceRect]."] # [doc = ""] # [inline] pub fn set_border_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReferenceRectMethodTable :: get (get_api ()) . set_border_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Sets the border width of the [`ReferenceRect`][ReferenceRect]. The border grows both inwards and outwards with respect to the rectangle box."] # [doc = ""] # [inline] pub fn set_border_width (& self , width : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReferenceRectMethodTable :: get (get_api ()) . set_border_width ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , width as _) ; } } # [doc = "If set to `true`, the [`ReferenceRect`][ReferenceRect] will only be visible while in editor. Otherwise, [`ReferenceRect`][ReferenceRect] will be visible in game."] # [doc = ""] # [inline] pub fn set_editor_only (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReferenceRectMethodTable :: get (get_api ()) . set_editor_only ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ReferenceRect { } unsafe impl GodotObject for ReferenceRect { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ReferenceRect" } } impl QueueFree for ReferenceRect { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ReferenceRect { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ReferenceRect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for ReferenceRect { } unsafe impl SubClass < crate :: generated :: CanvasItem > for ReferenceRect { } unsafe impl SubClass < crate :: generated :: Node > for ReferenceRect { } unsafe impl SubClass < crate :: generated :: Object > for ReferenceRect { } impl Instanciable for ReferenceRect { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ReferenceRect :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ReferenceRectMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_border_color : * mut sys :: godot_method_bind , pub get_border_width : * mut sys :: godot_method_bind , pub get_editor_only : * mut sys :: godot_method_bind , pub set_border_color : * mut sys :: godot_method_bind , pub set_border_width : * mut sys :: godot_method_bind , pub set_editor_only : * mut sys :: godot_method_bind } impl ReferenceRectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ReferenceRectMethodTable = ReferenceRectMethodTable { class_constructor : None , get_border_color : 0 as * mut sys :: godot_method_bind , get_border_width : 0 as * mut sys :: godot_method_bind , get_editor_only : 0 as * mut sys :: godot_method_bind , set_border_color : 0 as * mut sys :: godot_method_bind , set_border_width : 0 as * mut sys :: godot_method_bind , set_editor_only : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ReferenceRectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ReferenceRect\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_border_color = (gd_api . godot_method_bind_get_method) (class_name , "get_border_color\0" . as_ptr () as * const c_char) ; table . get_border_width = (gd_api . godot_method_bind_get_method) (class_name , "get_border_width\0" . as_ptr () as * const c_char) ; table . get_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "get_editor_only\0" . as_ptr () as * const c_char) ; table . set_border_color = (gd_api . godot_method_bind_get_method) (class_name , "set_border_color\0" . as_ptr () as * const c_char) ; table . set_border_width = (gd_api . godot_method_bind_get_method) (class_name , "set_border_width\0" . as_ptr () as * const c_char) ; table . set_editor_only = (gd_api . godot_method_bind_get_method) (class_name , "set_editor_only\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::reference_rect::private::ReferenceRect;
            
            pub mod reflection_probe {
                # ! [doc = "This module contains types related to the API class [`ReflectionProbe`][super::ReflectionProbe]."] pub (crate) mod private { # [doc = "`core class ReflectionProbe` inherits `VisualInstance` (manually managed).\n\nThis class has related types in the [`reflection_probe`][super::reflection_probe] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_reflectionprobe.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ReflectionProbe` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ReflectionProbe>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nReflectionProbe inherits methods from:\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ReflectionProbe { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ReflectionProbe ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct UpdateMode (pub i64) ; impl UpdateMode { pub const ONCE : UpdateMode = UpdateMode (0i64) ; pub const ALWAYS : UpdateMode = UpdateMode (1i64) ; } impl From < i64 > for UpdateMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < UpdateMode > for i64 { # [inline] fn from (v : UpdateMode) -> Self { v . 0 } } impl FromVariant for UpdateMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ReflectionProbe { pub const UPDATE_ONCE : i64 = 0i64 ; pub const UPDATE_ALWAYS : i64 = 1i64 ; } impl ReflectionProbe { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ReflectionProbeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, computes shadows in the reflection probe. This makes the reflection probe slower to render; you may want to disable this if using the [`UPDATE_ALWAYS`][Self::UPDATE_ALWAYS] [`update_mode`][Self::update_mode]."] # [doc = ""] # [inline] pub fn are_shadows_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . are_shadows_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets the cull mask which determines what objects are drawn by this probe. Every [`VisualInstance`][VisualInstance] with a layer included in this cull mask will be rendered by the probe. To improve performance, it is best to only include large objects which are likely to take up a lot of space in the reflection."] # [doc = ""] # [inline] pub fn cull_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . get_cull_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The size of the reflection probe. The larger the extents the more space covered by the probe which will lower the perceived resolution. It is best to keep the extents only as large as you need them.\n**Note:** To better fit areas that are not aligned to the grid, you can rotate the [`ReflectionProbe`][ReflectionProbe] node."] # [doc = ""] # [inline] pub fn extents (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . get_extents ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Defines the reflection intensity. Intensity modulates the strength of the reflection."] # [doc = ""] # [inline] pub fn intensity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . get_intensity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the ambient light color to be used when this probe is set to [`interior_enable`][Self::interior_enable]."] # [doc = ""] # [inline] pub fn interior_ambient (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . get_interior_ambient ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the energy multiplier for this reflection probe's ambient light contribution when set to [`interior_enable`][Self::interior_enable]."] # [doc = ""] # [inline] pub fn interior_ambient_energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . get_interior_ambient_energy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to [`interior_enable`][Self::interior_enable]. Useful so that ambient light matches the color of the room."] # [doc = ""] # [inline] pub fn interior_ambient_probe_contribution (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . get_interior_ambient_probe_contribution ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum distance away from the [`ReflectionProbe`][ReflectionProbe] an object can be before it is culled. Decrease this to improve performance, especially when using the [`UPDATE_ALWAYS`][Self::UPDATE_ALWAYS] [`update_mode`][Self::update_mode].\n**Note:** The maximum reflection distance is always at least equal to the [`extents`][Self::extents]. This means that decreasing [`max_distance`][Self::max_distance] will not always cull objects from reflections, especially if the reflection probe's [`extents`][Self::extents] are already large."] # [doc = ""] # [inline] pub fn max_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . get_max_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the origin offset to be used when this [`ReflectionProbe`][ReflectionProbe] is in [`box_projection`][Self::box_projection] mode. This can be set to a non-zero value to ensure a reflection fits a rectangle-shaped room, while reducing the amount of objects that \"get in the way\" of the reflection."] # [doc = ""] # [inline] pub fn origin_offset (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . get_origin_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets how frequently the [`ReflectionProbe`][ReflectionProbe] is updated. Can be [`UPDATE_ONCE`][Self::UPDATE_ONCE] or [`UPDATE_ALWAYS`][Self::UPDATE_ALWAYS]."] # [doc = ""] # [inline] pub fn update_mode (& self) -> crate :: generated :: reflection_probe :: UpdateMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . get_update_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: reflection_probe :: UpdateMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, enables box projection. This makes reflections look more correct in rectangle-shaped rooms by offsetting the reflection center depending on the camera's location.\n**Note:** To better fit rectangle-shaped rooms that are not aligned to the grid, you can rotate the [`ReflectionProbe`][ReflectionProbe] node."] # [doc = ""] # [inline] pub fn is_box_projection_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . is_box_projection_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, reflections will ignore sky contribution. Ambient lighting is then controlled by the `interior_ambient_*` properties."] # [doc = ""] # [inline] pub fn is_set_as_interior (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . is_set_as_interior ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, reflections will ignore sky contribution. Ambient lighting is then controlled by the `interior_ambient_*` properties."] # [doc = ""] # [inline] pub fn set_as_interior (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . set_as_interior ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Sets the cull mask which determines what objects are drawn by this probe. Every [`VisualInstance`][VisualInstance] with a layer included in this cull mask will be rendered by the probe. To improve performance, it is best to only include large objects which are likely to take up a lot of space in the reflection."] # [doc = ""] # [inline] pub fn set_cull_mask (& self , layers : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . set_cull_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , layers as _) ; } } # [doc = "If `true`, enables box projection. This makes reflections look more correct in rectangle-shaped rooms by offsetting the reflection center depending on the camera's location.\n**Note:** To better fit rectangle-shaped rooms that are not aligned to the grid, you can rotate the [`ReflectionProbe`][ReflectionProbe] node."] # [doc = ""] # [inline] pub fn set_enable_box_projection (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . set_enable_box_projection ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, computes shadows in the reflection probe. This makes the reflection probe slower to render; you may want to disable this if using the [`UPDATE_ALWAYS`][Self::UPDATE_ALWAYS] [`update_mode`][Self::update_mode]."] # [doc = ""] # [inline] pub fn set_enable_shadows (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . set_enable_shadows ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The size of the reflection probe. The larger the extents the more space covered by the probe which will lower the perceived resolution. It is best to keep the extents only as large as you need them.\n**Note:** To better fit areas that are not aligned to the grid, you can rotate the [`ReflectionProbe`][ReflectionProbe] node."] # [doc = ""] # [inline] pub fn set_extents (& self , extents : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . set_extents ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , extents) ; } } # [doc = "Defines the reflection intensity. Intensity modulates the strength of the reflection."] # [doc = ""] # [inline] pub fn set_intensity (& self , intensity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . set_intensity ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , intensity as _) ; } } # [doc = "Sets the ambient light color to be used when this probe is set to [`interior_enable`][Self::interior_enable]."] # [doc = ""] # [inline] pub fn set_interior_ambient (& self , ambient : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . set_interior_ambient ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , ambient) ; } } # [doc = "Sets the energy multiplier for this reflection probe's ambient light contribution when set to [`interior_enable`][Self::interior_enable]."] # [doc = ""] # [inline] pub fn set_interior_ambient_energy (& self , ambient_energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . set_interior_ambient_energy ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ambient_energy as _) ; } } # [doc = "Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to [`interior_enable`][Self::interior_enable]. Useful so that ambient light matches the color of the room."] # [doc = ""] # [inline] pub fn set_interior_ambient_probe_contribution (& self , ambient_probe_contribution : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . set_interior_ambient_probe_contribution ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , ambient_probe_contribution as _) ; } } # [doc = "The maximum distance away from the [`ReflectionProbe`][ReflectionProbe] an object can be before it is culled. Decrease this to improve performance, especially when using the [`UPDATE_ALWAYS`][Self::UPDATE_ALWAYS] [`update_mode`][Self::update_mode].\n**Note:** The maximum reflection distance is always at least equal to the [`extents`][Self::extents]. This means that decreasing [`max_distance`][Self::max_distance] will not always cull objects from reflections, especially if the reflection probe's [`extents`][Self::extents] are already large."] # [doc = ""] # [inline] pub fn set_max_distance (& self , max_distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . set_max_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , max_distance as _) ; } } # [doc = "Sets the origin offset to be used when this [`ReflectionProbe`][ReflectionProbe] is in [`box_projection`][Self::box_projection] mode. This can be set to a non-zero value to ensure a reflection fits a rectangle-shaped room, while reducing the amount of objects that \"get in the way\" of the reflection."] # [doc = ""] # [inline] pub fn set_origin_offset (& self , origin_offset : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . set_origin_offset ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , origin_offset) ; } } # [doc = "Sets how frequently the [`ReflectionProbe`][ReflectionProbe] is updated. Can be [`UPDATE_ONCE`][Self::UPDATE_ONCE] or [`UPDATE_ALWAYS`][Self::UPDATE_ALWAYS]."] # [doc = ""] # [inline] pub fn set_update_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ReflectionProbeMethodTable :: get (get_api ()) . set_update_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ReflectionProbe { } unsafe impl GodotObject for ReflectionProbe { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ReflectionProbe" } } impl QueueFree for ReflectionProbe { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ReflectionProbe { type Target = crate :: generated :: VisualInstance ; # [inline] fn deref (& self) -> & crate :: generated :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ReflectionProbe { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualInstance > for ReflectionProbe { } unsafe impl SubClass < crate :: generated :: CullInstance > for ReflectionProbe { } unsafe impl SubClass < crate :: generated :: Spatial > for ReflectionProbe { } unsafe impl SubClass < crate :: generated :: Node > for ReflectionProbe { } unsafe impl SubClass < crate :: generated :: Object > for ReflectionProbe { } impl Instanciable for ReflectionProbe { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ReflectionProbe :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ReflectionProbeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub are_shadows_enabled : * mut sys :: godot_method_bind , pub get_cull_mask : * mut sys :: godot_method_bind , pub get_extents : * mut sys :: godot_method_bind , pub get_intensity : * mut sys :: godot_method_bind , pub get_interior_ambient : * mut sys :: godot_method_bind , pub get_interior_ambient_energy : * mut sys :: godot_method_bind , pub get_interior_ambient_probe_contribution : * mut sys :: godot_method_bind , pub get_max_distance : * mut sys :: godot_method_bind , pub get_origin_offset : * mut sys :: godot_method_bind , pub get_update_mode : * mut sys :: godot_method_bind , pub is_box_projection_enabled : * mut sys :: godot_method_bind , pub is_set_as_interior : * mut sys :: godot_method_bind , pub set_as_interior : * mut sys :: godot_method_bind , pub set_cull_mask : * mut sys :: godot_method_bind , pub set_enable_box_projection : * mut sys :: godot_method_bind , pub set_enable_shadows : * mut sys :: godot_method_bind , pub set_extents : * mut sys :: godot_method_bind , pub set_intensity : * mut sys :: godot_method_bind , pub set_interior_ambient : * mut sys :: godot_method_bind , pub set_interior_ambient_energy : * mut sys :: godot_method_bind , pub set_interior_ambient_probe_contribution : * mut sys :: godot_method_bind , pub set_max_distance : * mut sys :: godot_method_bind , pub set_origin_offset : * mut sys :: godot_method_bind , pub set_update_mode : * mut sys :: godot_method_bind } impl ReflectionProbeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ReflectionProbeMethodTable = ReflectionProbeMethodTable { class_constructor : None , are_shadows_enabled : 0 as * mut sys :: godot_method_bind , get_cull_mask : 0 as * mut sys :: godot_method_bind , get_extents : 0 as * mut sys :: godot_method_bind , get_intensity : 0 as * mut sys :: godot_method_bind , get_interior_ambient : 0 as * mut sys :: godot_method_bind , get_interior_ambient_energy : 0 as * mut sys :: godot_method_bind , get_interior_ambient_probe_contribution : 0 as * mut sys :: godot_method_bind , get_max_distance : 0 as * mut sys :: godot_method_bind , get_origin_offset : 0 as * mut sys :: godot_method_bind , get_update_mode : 0 as * mut sys :: godot_method_bind , is_box_projection_enabled : 0 as * mut sys :: godot_method_bind , is_set_as_interior : 0 as * mut sys :: godot_method_bind , set_as_interior : 0 as * mut sys :: godot_method_bind , set_cull_mask : 0 as * mut sys :: godot_method_bind , set_enable_box_projection : 0 as * mut sys :: godot_method_bind , set_enable_shadows : 0 as * mut sys :: godot_method_bind , set_extents : 0 as * mut sys :: godot_method_bind , set_intensity : 0 as * mut sys :: godot_method_bind , set_interior_ambient : 0 as * mut sys :: godot_method_bind , set_interior_ambient_energy : 0 as * mut sys :: godot_method_bind , set_interior_ambient_probe_contribution : 0 as * mut sys :: godot_method_bind , set_max_distance : 0 as * mut sys :: godot_method_bind , set_origin_offset : 0 as * mut sys :: godot_method_bind , set_update_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ReflectionProbeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ReflectionProbe\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . are_shadows_enabled = (gd_api . godot_method_bind_get_method) (class_name , "are_shadows_enabled\0" . as_ptr () as * const c_char) ; table . get_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_cull_mask\0" . as_ptr () as * const c_char) ; table . get_extents = (gd_api . godot_method_bind_get_method) (class_name , "get_extents\0" . as_ptr () as * const c_char) ; table . get_intensity = (gd_api . godot_method_bind_get_method) (class_name , "get_intensity\0" . as_ptr () as * const c_char) ; table . get_interior_ambient = (gd_api . godot_method_bind_get_method) (class_name , "get_interior_ambient\0" . as_ptr () as * const c_char) ; table . get_interior_ambient_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_interior_ambient_energy\0" . as_ptr () as * const c_char) ; table . get_interior_ambient_probe_contribution = (gd_api . godot_method_bind_get_method) (class_name , "get_interior_ambient_probe_contribution\0" . as_ptr () as * const c_char) ; table . get_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_max_distance\0" . as_ptr () as * const c_char) ; table . get_origin_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_origin_offset\0" . as_ptr () as * const c_char) ; table . get_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_update_mode\0" . as_ptr () as * const c_char) ; table . is_box_projection_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_box_projection_enabled\0" . as_ptr () as * const c_char) ; table . is_set_as_interior = (gd_api . godot_method_bind_get_method) (class_name , "is_set_as_interior\0" . as_ptr () as * const c_char) ; table . set_as_interior = (gd_api . godot_method_bind_get_method) (class_name , "set_as_interior\0" . as_ptr () as * const c_char) ; table . set_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mask\0" . as_ptr () as * const c_char) ; table . set_enable_box_projection = (gd_api . godot_method_bind_get_method) (class_name , "set_enable_box_projection\0" . as_ptr () as * const c_char) ; table . set_enable_shadows = (gd_api . godot_method_bind_get_method) (class_name , "set_enable_shadows\0" . as_ptr () as * const c_char) ; table . set_extents = (gd_api . godot_method_bind_get_method) (class_name , "set_extents\0" . as_ptr () as * const c_char) ; table . set_intensity = (gd_api . godot_method_bind_get_method) (class_name , "set_intensity\0" . as_ptr () as * const c_char) ; table . set_interior_ambient = (gd_api . godot_method_bind_get_method) (class_name , "set_interior_ambient\0" . as_ptr () as * const c_char) ; table . set_interior_ambient_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_interior_ambient_energy\0" . as_ptr () as * const c_char) ; table . set_interior_ambient_probe_contribution = (gd_api . godot_method_bind_get_method) (class_name , "set_interior_ambient_probe_contribution\0" . as_ptr () as * const c_char) ; table . set_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_max_distance\0" . as_ptr () as * const c_char) ; table . set_origin_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_origin_offset\0" . as_ptr () as * const c_char) ; table . set_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_update_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::reflection_probe::private::ReflectionProbe;
            
            pub(crate) mod reg_ex {
                # ! [doc = "This module contains types related to the API class [`RegEx`][super::RegEx]."] pub (crate) mod private { # [doc = "`core class RegEx` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_regex.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nRegEx inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RegEx { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RegEx ; impl RegEx { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RegExMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn compile (& self , pattern : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . compile ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , pattern . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_group_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . get_group_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_names (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . get_names ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_pattern (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . get_pattern ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn is_valid (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . is_valid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn search (& self , subject : impl Into < GodotString > , offset : i64 , end : i64) -> Option < Ref < crate :: generated :: RegExMatch , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . search ; let ret = crate :: icalls :: icallvar__str_i64_i64 (method_bind , self . this . sys () . as_ptr () , subject . into () , offset as _ , end as _) ; < Option < Ref < crate :: generated :: RegExMatch , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn search_all (& self , subject : impl Into < GodotString > , offset : i64 , end : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . search_all ; let ret = crate :: icalls :: icallvar__str_i64_i64 (method_bind , self . this . sys () . as_ptr () , subject . into () , offset as _ , end as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn sub (& self , subject : impl Into < GodotString > , replacement : impl Into < GodotString > , all : bool , offset : i64 , end : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMethodTable :: get (get_api ()) . sub ; let ret = crate :: icalls :: icallvar__str_str_bool_i64_i64 (method_bind , self . this . sys () . as_ptr () , subject . into () , replacement . into () , all as _ , offset as _ , end as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for RegEx { } unsafe impl GodotObject for RegEx { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RegEx" } } impl std :: ops :: Deref for RegEx { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RegEx { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for RegEx { } unsafe impl SubClass < crate :: generated :: Object > for RegEx { } impl Instanciable for RegEx { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RegEx :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RegExMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub compile : * mut sys :: godot_method_bind , pub get_group_count : * mut sys :: godot_method_bind , pub get_names : * mut sys :: godot_method_bind , pub get_pattern : * mut sys :: godot_method_bind , pub is_valid : * mut sys :: godot_method_bind , pub search : * mut sys :: godot_method_bind , pub search_all : * mut sys :: godot_method_bind , pub sub : * mut sys :: godot_method_bind } impl RegExMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RegExMethodTable = RegExMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , compile : 0 as * mut sys :: godot_method_bind , get_group_count : 0 as * mut sys :: godot_method_bind , get_names : 0 as * mut sys :: godot_method_bind , get_pattern : 0 as * mut sys :: godot_method_bind , is_valid : 0 as * mut sys :: godot_method_bind , search : 0 as * mut sys :: godot_method_bind , search_all : 0 as * mut sys :: godot_method_bind , sub : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RegExMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RegEx\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . compile = (gd_api . godot_method_bind_get_method) (class_name , "compile\0" . as_ptr () as * const c_char) ; table . get_group_count = (gd_api . godot_method_bind_get_method) (class_name , "get_group_count\0" . as_ptr () as * const c_char) ; table . get_names = (gd_api . godot_method_bind_get_method) (class_name , "get_names\0" . as_ptr () as * const c_char) ; table . get_pattern = (gd_api . godot_method_bind_get_method) (class_name , "get_pattern\0" . as_ptr () as * const c_char) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\0" . as_ptr () as * const c_char) ; table . search = (gd_api . godot_method_bind_get_method) (class_name , "search\0" . as_ptr () as * const c_char) ; table . search_all = (gd_api . godot_method_bind_get_method) (class_name , "search_all\0" . as_ptr () as * const c_char) ; table . sub = (gd_api . godot_method_bind_get_method) (class_name , "sub\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::reg_ex::private::RegEx;
            
            pub(crate) mod reg_ex_match {
                # ! [doc = "This module contains types related to the API class [`RegExMatch`][super::RegExMatch]."] pub (crate) mod private { # [doc = "`core class RegExMatch` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_regexmatch.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nRegExMatch inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RegExMatch { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RegExMatch ; impl RegExMatch { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RegExMatchMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_end (& self , name : impl OwnedToVariant) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_end ; let ret = crate :: icalls :: icallvar__var (method_bind , self . this . sys () . as_ptr () , name . owned_to_variant ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_group_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_group_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn names (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_names ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_start (& self , name : impl OwnedToVariant) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_start ; let ret = crate :: icalls :: icallvar__var (method_bind , self . this . sys () . as_ptr () , name . owned_to_variant ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_string (& self , name : impl OwnedToVariant) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_string ; let ret = crate :: icalls :: icallvar__var (method_bind , self . this . sys () . as_ptr () , name . owned_to_variant ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn strings (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_strings ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn subject (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RegExMatchMethodTable :: get (get_api ()) . get_subject ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for RegExMatch { } unsafe impl GodotObject for RegExMatch { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RegExMatch" } } impl std :: ops :: Deref for RegExMatch { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RegExMatch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for RegExMatch { } unsafe impl SubClass < crate :: generated :: Object > for RegExMatch { } impl Instanciable for RegExMatch { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RegExMatch :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RegExMatchMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_end : * mut sys :: godot_method_bind , pub get_group_count : * mut sys :: godot_method_bind , pub get_names : * mut sys :: godot_method_bind , pub get_start : * mut sys :: godot_method_bind , pub get_string : * mut sys :: godot_method_bind , pub get_strings : * mut sys :: godot_method_bind , pub get_subject : * mut sys :: godot_method_bind } impl RegExMatchMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RegExMatchMethodTable = RegExMatchMethodTable { class_constructor : None , get_end : 0 as * mut sys :: godot_method_bind , get_group_count : 0 as * mut sys :: godot_method_bind , get_names : 0 as * mut sys :: godot_method_bind , get_start : 0 as * mut sys :: godot_method_bind , get_string : 0 as * mut sys :: godot_method_bind , get_strings : 0 as * mut sys :: godot_method_bind , get_subject : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RegExMatchMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RegExMatch\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_end = (gd_api . godot_method_bind_get_method) (class_name , "get_end\0" . as_ptr () as * const c_char) ; table . get_group_count = (gd_api . godot_method_bind_get_method) (class_name , "get_group_count\0" . as_ptr () as * const c_char) ; table . get_names = (gd_api . godot_method_bind_get_method) (class_name , "get_names\0" . as_ptr () as * const c_char) ; table . get_start = (gd_api . godot_method_bind_get_method) (class_name , "get_start\0" . as_ptr () as * const c_char) ; table . get_string = (gd_api . godot_method_bind_get_method) (class_name , "get_string\0" . as_ptr () as * const c_char) ; table . get_strings = (gd_api . godot_method_bind_get_method) (class_name , "get_strings\0" . as_ptr () as * const c_char) ; table . get_subject = (gd_api . godot_method_bind_get_method) (class_name , "get_subject\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::reg_ex_match::private::RegExMatch;
            
            pub(crate) mod remote_transform {
                # ! [doc = "This module contains types related to the API class [`RemoteTransform`][super::RemoteTransform]."] pub (crate) mod private { # [doc = "`core class RemoteTransform` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_remotetransform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`RemoteTransform` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<RemoteTransform>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRemoteTransform inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RemoteTransform { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RemoteTransform ; impl RemoteTransform { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RemoteTransformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "[`RemoteTransform`][RemoteTransform] caches the remote node. It may not notice if the remote node disappears; [`force_update_cache`][Self::force_update_cache] forces it to update the cache again."] # [doc = ""] # [inline] pub fn force_update_cache (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . force_update_cache ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The [`NodePath`][NodePath] to the remote node, relative to the RemoteTransform's position in the scene."] # [doc = ""] # [inline] pub fn remote_node (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . get_remote_node ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the remote node's position is updated."] # [doc = ""] # [inline] pub fn update_position (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . get_update_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the remote node's rotation is updated."] # [doc = ""] # [inline] pub fn update_rotation (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . get_update_rotation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the remote node's scale is updated."] # [doc = ""] # [inline] pub fn update_scale (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . get_update_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, global coordinates are used. If `false`, local coordinates are used."] # [doc = ""] # [inline] pub fn use_global_coordinates (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . get_use_global_coordinates ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The [`NodePath`][NodePath] to the remote node, relative to the RemoteTransform's position in the scene."] # [doc = ""] # [inline] pub fn set_remote_node (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . set_remote_node ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "If `true`, the remote node's position is updated."] # [doc = ""] # [inline] pub fn set_update_position (& self , update_remote_position : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . set_update_position ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , update_remote_position as _) ; } } # [doc = "If `true`, the remote node's rotation is updated."] # [doc = ""] # [inline] pub fn set_update_rotation (& self , update_remote_rotation : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . set_update_rotation ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , update_remote_rotation as _) ; } } # [doc = "If `true`, the remote node's scale is updated."] # [doc = ""] # [inline] pub fn set_update_scale (& self , update_remote_scale : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . set_update_scale ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , update_remote_scale as _) ; } } # [doc = "If `true`, global coordinates are used. If `false`, local coordinates are used."] # [doc = ""] # [inline] pub fn set_use_global_coordinates (& self , use_global_coordinates : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransformMethodTable :: get (get_api ()) . set_use_global_coordinates ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , use_global_coordinates as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RemoteTransform { } unsafe impl GodotObject for RemoteTransform { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RemoteTransform" } } impl QueueFree for RemoteTransform { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for RemoteTransform { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RemoteTransform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for RemoteTransform { } unsafe impl SubClass < crate :: generated :: Node > for RemoteTransform { } unsafe impl SubClass < crate :: generated :: Object > for RemoteTransform { } impl Instanciable for RemoteTransform { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RemoteTransform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RemoteTransformMethodTable { pub class_constructor : sys :: godot_class_constructor , pub force_update_cache : * mut sys :: godot_method_bind , pub get_remote_node : * mut sys :: godot_method_bind , pub get_update_position : * mut sys :: godot_method_bind , pub get_update_rotation : * mut sys :: godot_method_bind , pub get_update_scale : * mut sys :: godot_method_bind , pub get_use_global_coordinates : * mut sys :: godot_method_bind , pub set_remote_node : * mut sys :: godot_method_bind , pub set_update_position : * mut sys :: godot_method_bind , pub set_update_rotation : * mut sys :: godot_method_bind , pub set_update_scale : * mut sys :: godot_method_bind , pub set_use_global_coordinates : * mut sys :: godot_method_bind } impl RemoteTransformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RemoteTransformMethodTable = RemoteTransformMethodTable { class_constructor : None , force_update_cache : 0 as * mut sys :: godot_method_bind , get_remote_node : 0 as * mut sys :: godot_method_bind , get_update_position : 0 as * mut sys :: godot_method_bind , get_update_rotation : 0 as * mut sys :: godot_method_bind , get_update_scale : 0 as * mut sys :: godot_method_bind , get_use_global_coordinates : 0 as * mut sys :: godot_method_bind , set_remote_node : 0 as * mut sys :: godot_method_bind , set_update_position : 0 as * mut sys :: godot_method_bind , set_update_rotation : 0 as * mut sys :: godot_method_bind , set_update_scale : 0 as * mut sys :: godot_method_bind , set_use_global_coordinates : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RemoteTransformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RemoteTransform\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . force_update_cache = (gd_api . godot_method_bind_get_method) (class_name , "force_update_cache\0" . as_ptr () as * const c_char) ; table . get_remote_node = (gd_api . godot_method_bind_get_method) (class_name , "get_remote_node\0" . as_ptr () as * const c_char) ; table . get_update_position = (gd_api . godot_method_bind_get_method) (class_name , "get_update_position\0" . as_ptr () as * const c_char) ; table . get_update_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_update_rotation\0" . as_ptr () as * const c_char) ; table . get_update_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_update_scale\0" . as_ptr () as * const c_char) ; table . get_use_global_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "get_use_global_coordinates\0" . as_ptr () as * const c_char) ; table . set_remote_node = (gd_api . godot_method_bind_get_method) (class_name , "set_remote_node\0" . as_ptr () as * const c_char) ; table . set_update_position = (gd_api . godot_method_bind_get_method) (class_name , "set_update_position\0" . as_ptr () as * const c_char) ; table . set_update_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_update_rotation\0" . as_ptr () as * const c_char) ; table . set_update_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_update_scale\0" . as_ptr () as * const c_char) ; table . set_use_global_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "set_use_global_coordinates\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::remote_transform::private::RemoteTransform;
            
            pub(crate) mod remote_transform_2d {
                # ! [doc = "This module contains types related to the API class [`RemoteTransform2D`][super::RemoteTransform2D]."] pub (crate) mod private { # [doc = "`core class RemoteTransform2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_remotetransform2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`RemoteTransform2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<RemoteTransform2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRemoteTransform2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RemoteTransform2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RemoteTransform2D ; impl RemoteTransform2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RemoteTransform2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "[`RemoteTransform2D`][RemoteTransform2D] caches the remote node. It may not notice if the remote node disappears; [`force_update_cache`][Self::force_update_cache] forces it to update the cache again."] # [doc = ""] # [inline] pub fn force_update_cache (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . force_update_cache ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The [`NodePath`][NodePath] to the remote node, relative to the RemoteTransform2D's position in the scene."] # [doc = ""] # [inline] pub fn remote_node (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . get_remote_node ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the remote node's position is updated."] # [doc = ""] # [inline] pub fn update_position (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . get_update_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the remote node's rotation is updated."] # [doc = ""] # [inline] pub fn update_rotation (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . get_update_rotation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the remote node's scale is updated."] # [doc = ""] # [inline] pub fn update_scale (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . get_update_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, global coordinates are used. If `false`, local coordinates are used."] # [doc = ""] # [inline] pub fn use_global_coordinates (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . get_use_global_coordinates ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The [`NodePath`][NodePath] to the remote node, relative to the RemoteTransform2D's position in the scene."] # [doc = ""] # [inline] pub fn set_remote_node (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . set_remote_node ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "If `true`, the remote node's position is updated."] # [doc = ""] # [inline] pub fn set_update_position (& self , update_remote_position : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . set_update_position ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , update_remote_position as _) ; } } # [doc = "If `true`, the remote node's rotation is updated."] # [doc = ""] # [inline] pub fn set_update_rotation (& self , update_remote_rotation : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . set_update_rotation ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , update_remote_rotation as _) ; } } # [doc = "If `true`, the remote node's scale is updated."] # [doc = ""] # [inline] pub fn set_update_scale (& self , update_remote_scale : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . set_update_scale ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , update_remote_scale as _) ; } } # [doc = "If `true`, global coordinates are used. If `false`, local coordinates are used."] # [doc = ""] # [inline] pub fn set_use_global_coordinates (& self , use_global_coordinates : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RemoteTransform2DMethodTable :: get (get_api ()) . set_use_global_coordinates ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , use_global_coordinates as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RemoteTransform2D { } unsafe impl GodotObject for RemoteTransform2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RemoteTransform2D" } } impl QueueFree for RemoteTransform2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for RemoteTransform2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RemoteTransform2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for RemoteTransform2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for RemoteTransform2D { } unsafe impl SubClass < crate :: generated :: Node > for RemoteTransform2D { } unsafe impl SubClass < crate :: generated :: Object > for RemoteTransform2D { } impl Instanciable for RemoteTransform2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RemoteTransform2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RemoteTransform2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub force_update_cache : * mut sys :: godot_method_bind , pub get_remote_node : * mut sys :: godot_method_bind , pub get_update_position : * mut sys :: godot_method_bind , pub get_update_rotation : * mut sys :: godot_method_bind , pub get_update_scale : * mut sys :: godot_method_bind , pub get_use_global_coordinates : * mut sys :: godot_method_bind , pub set_remote_node : * mut sys :: godot_method_bind , pub set_update_position : * mut sys :: godot_method_bind , pub set_update_rotation : * mut sys :: godot_method_bind , pub set_update_scale : * mut sys :: godot_method_bind , pub set_use_global_coordinates : * mut sys :: godot_method_bind } impl RemoteTransform2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RemoteTransform2DMethodTable = RemoteTransform2DMethodTable { class_constructor : None , force_update_cache : 0 as * mut sys :: godot_method_bind , get_remote_node : 0 as * mut sys :: godot_method_bind , get_update_position : 0 as * mut sys :: godot_method_bind , get_update_rotation : 0 as * mut sys :: godot_method_bind , get_update_scale : 0 as * mut sys :: godot_method_bind , get_use_global_coordinates : 0 as * mut sys :: godot_method_bind , set_remote_node : 0 as * mut sys :: godot_method_bind , set_update_position : 0 as * mut sys :: godot_method_bind , set_update_rotation : 0 as * mut sys :: godot_method_bind , set_update_scale : 0 as * mut sys :: godot_method_bind , set_use_global_coordinates : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RemoteTransform2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RemoteTransform2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . force_update_cache = (gd_api . godot_method_bind_get_method) (class_name , "force_update_cache\0" . as_ptr () as * const c_char) ; table . get_remote_node = (gd_api . godot_method_bind_get_method) (class_name , "get_remote_node\0" . as_ptr () as * const c_char) ; table . get_update_position = (gd_api . godot_method_bind_get_method) (class_name , "get_update_position\0" . as_ptr () as * const c_char) ; table . get_update_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_update_rotation\0" . as_ptr () as * const c_char) ; table . get_update_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_update_scale\0" . as_ptr () as * const c_char) ; table . get_use_global_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "get_use_global_coordinates\0" . as_ptr () as * const c_char) ; table . set_remote_node = (gd_api . godot_method_bind_get_method) (class_name , "set_remote_node\0" . as_ptr () as * const c_char) ; table . set_update_position = (gd_api . godot_method_bind_get_method) (class_name , "set_update_position\0" . as_ptr () as * const c_char) ; table . set_update_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_update_rotation\0" . as_ptr () as * const c_char) ; table . set_update_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_update_scale\0" . as_ptr () as * const c_char) ; table . set_use_global_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "set_use_global_coordinates\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::remote_transform_2d::private::RemoteTransform2D;
            
            pub(crate) mod resource {
                # ! [doc = "This module contains types related to the API class [`Resource`][super::Resource]."] pub (crate) mod private { # [doc = "`core class Resource` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_resource.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nResource inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Resource { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Resource ; impl Resource { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ResourceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Duplicates the resource, returning a new resource with the exported members copied. **Note:** To duplicate the resource the constructor is called without arguments. This method will error when the constructor doesn't have default values.\nBy default, sub-resources are shared between resource copies for efficiency. This can be changed by passing `true` to the `subresources` argument which will copy the subresources.\n**Note:** If `subresources` is `true`, this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.\n**Note:** When duplicating a resource, only `export`ed properties are copied. Other properties will be set to their default value in the new resource.\n# Default Arguments\n* `subresources` - `false`"] # [doc = ""] # [inline] pub fn duplicate (& self , subresources : bool) -> Option < Ref < crate :: generated :: Resource , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . duplicate ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , subresources as _) ; < Option < Ref < crate :: generated :: Resource , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nEmits the `changed` signal.\nIf external objects which depend on this resource should be updated, this method must be called manually whenever the state of this resource has changed (such as modification of properties).\nThe method is equivalent to:\n```gdscript\nemit_signal(\"changed\")\n```\n**Note:** This method is called automatically for built-in resources."] # [doc = ""] # [inline] pub fn emit_changed (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . emit_changed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If [`resource_local_to_scene`][Self::resource_local_to_scene] is enabled and the resource was loaded from a [`PackedScene`][PackedScene] instantiation, returns the local scene where this resource's unique copy is in use. Otherwise, returns `null`."] # [doc = ""] # [inline] pub fn get_local_scene (& self) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . get_local_scene ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The name of the resource. This is an optional identifier. If [`resource_name`][Self::resource_name] is not empty, its value will be displayed to represent the current resource in the editor inspector. For built-in scripts, the [`resource_name`][Self::resource_name] will be displayed as the tab name in the script editor."] # [doc = ""] # [inline] pub fn name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . get_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index."] # [doc = ""] # [inline] pub fn path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . get_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the RID of the resource (or an empty RID). Many resources (such as [`Texture`][Texture], [`Mesh`][Mesh], etc) are high-level abstractions of resources stored in a server, so this function will return the original RID."] # [doc = ""] # [inline] pub fn get_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . get_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene."] # [doc = ""] # [inline] pub fn is_local_to_scene (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . is_local_to_scene ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene."] # [doc = ""] # [inline] pub fn set_local_to_scene (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . set_local_to_scene ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The name of the resource. This is an optional identifier. If [`resource_name`][Self::resource_name] is not empty, its value will be displayed to represent the current resource in the editor inspector. For built-in scripts, the [`resource_name`][Self::resource_name] will be displayed as the tab name in the script editor."] # [doc = ""] # [inline] pub fn set_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . set_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index."] # [doc = ""] # [inline] pub fn set_path (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . set_path ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = "This method is called when a resource with [`resource_local_to_scene`][Self::resource_local_to_scene] enabled is loaded from a [`PackedScene`][PackedScene] instantiation. Its behavior can be customized by overriding [`_setup_local_to_scene`][Self::_setup_local_to_scene] from script.\nFor most resources, this method performs no base logic. [`ViewportTexture`][ViewportTexture] performs custom logic to properly set the proxy texture and flags in the local viewport."] # [doc = ""] # [inline] pub fn setup_local_to_scene (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . setup_local_to_scene ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets the path of the resource, potentially overriding an existing cache entry for this path. This differs from setting [`resource_path`][Self::resource_path], as the latter would error out if another resource was already cached for the given path."] # [doc = ""] # [inline] pub fn take_over_path (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceMethodTable :: get (get_api ()) . take_over_path ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Resource { } unsafe impl GodotObject for Resource { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Resource" } } impl std :: ops :: Deref for Resource { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Resource { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for Resource { } unsafe impl SubClass < crate :: generated :: Object > for Resource { } impl Instanciable for Resource { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Resource :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ResourceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub duplicate : * mut sys :: godot_method_bind , pub emit_changed : * mut sys :: godot_method_bind , pub get_local_scene : * mut sys :: godot_method_bind , pub get_name : * mut sys :: godot_method_bind , pub get_path : * mut sys :: godot_method_bind , pub get_rid : * mut sys :: godot_method_bind , pub is_local_to_scene : * mut sys :: godot_method_bind , pub set_local_to_scene : * mut sys :: godot_method_bind , pub set_name : * mut sys :: godot_method_bind , pub set_path : * mut sys :: godot_method_bind , pub setup_local_to_scene : * mut sys :: godot_method_bind , pub take_over_path : * mut sys :: godot_method_bind } impl ResourceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ResourceMethodTable = ResourceMethodTable { class_constructor : None , duplicate : 0 as * mut sys :: godot_method_bind , emit_changed : 0 as * mut sys :: godot_method_bind , get_local_scene : 0 as * mut sys :: godot_method_bind , get_name : 0 as * mut sys :: godot_method_bind , get_path : 0 as * mut sys :: godot_method_bind , get_rid : 0 as * mut sys :: godot_method_bind , is_local_to_scene : 0 as * mut sys :: godot_method_bind , set_local_to_scene : 0 as * mut sys :: godot_method_bind , set_name : 0 as * mut sys :: godot_method_bind , set_path : 0 as * mut sys :: godot_method_bind , setup_local_to_scene : 0 as * mut sys :: godot_method_bind , take_over_path : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ResourceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Resource\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . duplicate = (gd_api . godot_method_bind_get_method) (class_name , "duplicate\0" . as_ptr () as * const c_char) ; table . emit_changed = (gd_api . godot_method_bind_get_method) (class_name , "emit_changed\0" . as_ptr () as * const c_char) ; table . get_local_scene = (gd_api . godot_method_bind_get_method) (class_name , "get_local_scene\0" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\0" . as_ptr () as * const c_char) ; table . get_path = (gd_api . godot_method_bind_get_method) (class_name , "get_path\0" . as_ptr () as * const c_char) ; table . get_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_rid\0" . as_ptr () as * const c_char) ; table . is_local_to_scene = (gd_api . godot_method_bind_get_method) (class_name , "is_local_to_scene\0" . as_ptr () as * const c_char) ; table . set_local_to_scene = (gd_api . godot_method_bind_get_method) (class_name , "set_local_to_scene\0" . as_ptr () as * const c_char) ; table . set_name = (gd_api . godot_method_bind_get_method) (class_name , "set_name\0" . as_ptr () as * const c_char) ; table . set_path = (gd_api . godot_method_bind_get_method) (class_name , "set_path\0" . as_ptr () as * const c_char) ; table . setup_local_to_scene = (gd_api . godot_method_bind_get_method) (class_name , "setup_local_to_scene\0" . as_ptr () as * const c_char) ; table . take_over_path = (gd_api . godot_method_bind_get_method) (class_name , "take_over_path\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::resource::private::Resource;
            
            pub(crate) mod resource_format_loader {
                # ! [doc = "This module contains types related to the API class [`ResourceFormatLoader`][super::ResourceFormatLoader]."] pub (crate) mod private { # [doc = "`core class ResourceFormatLoader` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_resourceformatloader.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nResourceFormatLoader inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ResourceFormatLoader { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ResourceFormatLoader ; impl ResourceFormatLoader { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ResourceFormatLoaderMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for ResourceFormatLoader { } unsafe impl GodotObject for ResourceFormatLoader { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ResourceFormatLoader" } } impl std :: ops :: Deref for ResourceFormatLoader { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourceFormatLoader { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for ResourceFormatLoader { } unsafe impl SubClass < crate :: generated :: Object > for ResourceFormatLoader { } impl Instanciable for ResourceFormatLoader { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ResourceFormatLoader :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ResourceFormatLoaderMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl ResourceFormatLoaderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ResourceFormatLoaderMethodTable = ResourceFormatLoaderMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ResourceFormatLoaderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ResourceFormatLoader\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::resource_format_loader::private::ResourceFormatLoader;
            
            pub(crate) mod resource_format_saver {
                # ! [doc = "This module contains types related to the API class [`ResourceFormatSaver`][super::ResourceFormatSaver]."] pub (crate) mod private { # [doc = "`core class ResourceFormatSaver` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_resourceformatsaver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nResourceFormatSaver inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ResourceFormatSaver { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ResourceFormatSaver ; impl ResourceFormatSaver { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ResourceFormatSaverMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for ResourceFormatSaver { } unsafe impl GodotObject for ResourceFormatSaver { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ResourceFormatSaver" } } impl std :: ops :: Deref for ResourceFormatSaver { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourceFormatSaver { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for ResourceFormatSaver { } unsafe impl SubClass < crate :: generated :: Object > for ResourceFormatSaver { } impl Instanciable for ResourceFormatSaver { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ResourceFormatSaver :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ResourceFormatSaverMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl ResourceFormatSaverMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ResourceFormatSaverMethodTable = ResourceFormatSaverMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ResourceFormatSaverMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ResourceFormatSaver\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::resource_format_saver::private::ResourceFormatSaver;
            
            pub mod resource_importer {
                # ! [doc = "This module contains types related to the API class [`ResourceImporter`][super::ResourceImporter]."] pub (crate) mod private { # [doc = "`core class ResourceImporter` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`resource_importer`][super::resource_importer] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_resourceimporter.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nResourceImporter inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ResourceImporter { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ResourceImporter ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ImportOrder (pub i64) ; impl ImportOrder { pub const DEFAULT : ImportOrder = ImportOrder (0i64) ; pub const SCENE : ImportOrder = ImportOrder (100i64) ; } impl From < i64 > for ImportOrder { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ImportOrder > for i64 { # [inline] fn from (v : ImportOrder) -> Self { v . 0 } } impl FromVariant for ImportOrder { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ResourceImporter { pub const IMPORT_ORDER_DEFAULT : i64 = 0i64 ; pub const IMPORT_ORDER_SCENE : i64 = 100i64 ; } impl ResourceImporter { } impl gdnative_core :: private :: godot_object :: Sealed for ResourceImporter { } unsafe impl GodotObject for ResourceImporter { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ResourceImporter" } } impl std :: ops :: Deref for ResourceImporter { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourceImporter { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for ResourceImporter { } unsafe impl SubClass < crate :: generated :: Object > for ResourceImporter { }
                use super::*;
            }
            pub use crate::generated::resource_importer::private::ResourceImporter;
            
            pub(crate) mod resource_interactive_loader {
                # ! [doc = "This module contains types related to the API class [`ResourceInteractiveLoader`][super::ResourceInteractiveLoader]."] pub (crate) mod private { # [doc = "`core class ResourceInteractiveLoader` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_resourceinteractiveloader.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nResourceInteractiveLoader inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ResourceInteractiveLoader { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ResourceInteractiveLoader ; impl ResourceInteractiveLoader { # [doc = "Returns the loaded resource if the load operation completed successfully, `null` otherwise."] # [doc = ""] # [inline] pub fn get_resource (& self) -> Option < Ref < crate :: generated :: Resource , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceInteractiveLoaderMethodTable :: get (get_api ()) . get_resource ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Resource , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the load stage. The total amount of stages can be queried with [`get_stage_count`][Self::get_stage_count]."] # [doc = ""] # [inline] pub fn get_stage (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceInteractiveLoaderMethodTable :: get (get_api ()) . get_stage ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the total amount of stages (calls to [`poll`][Self::poll]) needed to completely load this resource."] # [doc = ""] # [inline] pub fn get_stage_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceInteractiveLoaderMethodTable :: get (get_api ()) . get_stage_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Polls the loading operation, i.e. loads a data chunk up to the next stage.\nReturns [`OK`][Self::OK] if the poll is successful but the load operation has not finished yet (intermediate stage). This means [`poll`][Self::poll] will have to be called again until the last stage is completed.\nReturns [`ERR_FILE_EOF`][Self::ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [`get_resource`][Self::get_resource].\nReturns another [`Error`][GodotError] code if the poll has failed."] # [doc = ""] # [inline] pub fn poll (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceInteractiveLoaderMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Polls the loading operation successively until the resource is completely loaded or a [`poll`][Self::poll] fails.\nReturns [`ERR_FILE_EOF`][Self::ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [`get_resource`][Self::get_resource].\nReturns another [`Error`][GodotError] code if a poll has failed, aborting the operation."] # [doc = ""] # [inline] pub fn wait (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceInteractiveLoaderMethodTable :: get (get_api ()) . wait ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } } impl gdnative_core :: private :: godot_object :: Sealed for ResourceInteractiveLoader { } unsafe impl GodotObject for ResourceInteractiveLoader { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ResourceInteractiveLoader" } } impl std :: ops :: Deref for ResourceInteractiveLoader { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourceInteractiveLoader { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for ResourceInteractiveLoader { } unsafe impl SubClass < crate :: generated :: Object > for ResourceInteractiveLoader { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ResourceInteractiveLoaderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_resource : * mut sys :: godot_method_bind , pub get_stage : * mut sys :: godot_method_bind , pub get_stage_count : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind , pub wait : * mut sys :: godot_method_bind } impl ResourceInteractiveLoaderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ResourceInteractiveLoaderMethodTable = ResourceInteractiveLoaderMethodTable { class_constructor : None , get_resource : 0 as * mut sys :: godot_method_bind , get_stage : 0 as * mut sys :: godot_method_bind , get_stage_count : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind , wait : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ResourceInteractiveLoaderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ResourceInteractiveLoader\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_resource = (gd_api . godot_method_bind_get_method) (class_name , "get_resource\0" . as_ptr () as * const c_char) ; table . get_stage = (gd_api . godot_method_bind_get_method) (class_name , "get_stage\0" . as_ptr () as * const c_char) ; table . get_stage_count = (gd_api . godot_method_bind_get_method) (class_name , "get_stage_count\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . wait = (gd_api . godot_method_bind_get_method) (class_name , "wait\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::resource_interactive_loader::private::ResourceInteractiveLoader;
            
            pub(crate) mod resource_preloader {
                # ! [doc = "This module contains types related to the API class [`ResourcePreloader`][super::ResourcePreloader]."] pub (crate) mod private { # [doc = "`core class ResourcePreloader` inherits `Node` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_resourcepreloader.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ResourcePreloader` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ResourcePreloader>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nResourcePreloader inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ResourcePreloader { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ResourcePreloader ; impl ResourcePreloader { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ResourcePreloaderMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a resource to the preloader with the given `name`. If a resource with the given `name` already exists, the new resource will be renamed to \"`name` N\" where N is an incrementing number starting from 2."] # [doc = ""] # [inline] pub fn add_resource (& self , name : impl Into < GodotString > , resource : impl AsArg < crate :: generated :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourcePreloaderMethodTable :: get (get_api ()) . add_resource ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , resource . as_arg_ptr ()) ; } } # [doc = "Returns the resource associated to `name`."] # [doc = ""] # [inline] pub fn get_resource (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: Resource , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourcePreloaderMethodTable :: get (get_api ()) . get_resource ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Option < Ref < crate :: generated :: Resource , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the list of resources inside the preloader."] # [doc = ""] # [inline] pub fn get_resource_list (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourcePreloaderMethodTable :: get (get_api ()) . get_resource_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the preloader contains a resource associated to `name`."] # [doc = ""] # [inline] pub fn has_resource (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourcePreloaderMethodTable :: get (get_api ()) . has_resource ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes the resource associated to `name` from the preloader."] # [doc = ""] # [inline] pub fn remove_resource (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourcePreloaderMethodTable :: get (get_api ()) . remove_resource ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "Renames a resource inside the preloader from `name` to `newname`."] # [doc = ""] # [inline] pub fn rename_resource (& self , name : impl Into < GodotString > , newname : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourcePreloaderMethodTable :: get (get_api ()) . rename_resource ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , newname . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ResourcePreloader { } unsafe impl GodotObject for ResourcePreloader { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ResourcePreloader" } } impl QueueFree for ResourcePreloader { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ResourcePreloader { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourcePreloader { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for ResourcePreloader { } unsafe impl SubClass < crate :: generated :: Object > for ResourcePreloader { } impl Instanciable for ResourcePreloader { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ResourcePreloader :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ResourcePreloaderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_resource : * mut sys :: godot_method_bind , pub get_resource : * mut sys :: godot_method_bind , pub get_resource_list : * mut sys :: godot_method_bind , pub has_resource : * mut sys :: godot_method_bind , pub remove_resource : * mut sys :: godot_method_bind , pub rename_resource : * mut sys :: godot_method_bind } impl ResourcePreloaderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ResourcePreloaderMethodTable = ResourcePreloaderMethodTable { class_constructor : None , add_resource : 0 as * mut sys :: godot_method_bind , get_resource : 0 as * mut sys :: godot_method_bind , get_resource_list : 0 as * mut sys :: godot_method_bind , has_resource : 0 as * mut sys :: godot_method_bind , remove_resource : 0 as * mut sys :: godot_method_bind , rename_resource : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ResourcePreloaderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ResourcePreloader\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_resource = (gd_api . godot_method_bind_get_method) (class_name , "add_resource\0" . as_ptr () as * const c_char) ; table . get_resource = (gd_api . godot_method_bind_get_method) (class_name , "get_resource\0" . as_ptr () as * const c_char) ; table . get_resource_list = (gd_api . godot_method_bind_get_method) (class_name , "get_resource_list\0" . as_ptr () as * const c_char) ; table . has_resource = (gd_api . godot_method_bind_get_method) (class_name , "has_resource\0" . as_ptr () as * const c_char) ; table . remove_resource = (gd_api . godot_method_bind_get_method) (class_name , "remove_resource\0" . as_ptr () as * const c_char) ; table . rename_resource = (gd_api . godot_method_bind_get_method) (class_name , "rename_resource\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::resource_preloader::private::ResourcePreloader;
            
            pub(crate) mod rich_text_effect {
                # ! [doc = "This module contains types related to the API class [`RichTextEffect`][super::RichTextEffect]."] pub (crate) mod private { # [doc = "`core class RichTextEffect` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_richtexteffect.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nRichTextEffect inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RichTextEffect { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RichTextEffect ; impl RichTextEffect { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RichTextEffectMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for RichTextEffect { } unsafe impl GodotObject for RichTextEffect { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "RichTextEffect" } } impl std :: ops :: Deref for RichTextEffect { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RichTextEffect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for RichTextEffect { } unsafe impl SubClass < crate :: generated :: Reference > for RichTextEffect { } unsafe impl SubClass < crate :: generated :: Object > for RichTextEffect { } impl Instanciable for RichTextEffect { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RichTextEffect :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RichTextEffectMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl RichTextEffectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RichTextEffectMethodTable = RichTextEffectMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RichTextEffectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RichTextEffect\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::rich_text_effect::private::RichTextEffect;
            
            pub mod rich_text_label {
                # ! [doc = "This module contains types related to the API class [`RichTextLabel`][super::RichTextLabel]."] pub (crate) mod private { # [doc = "`core class RichTextLabel` inherits `Control` (manually managed).\n\nThis class has related types in the [`rich_text_label`][super::rich_text_label] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_richtextlabel.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`RichTextLabel` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<RichTextLabel>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRichTextLabel inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RichTextLabel { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RichTextLabel ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Align (pub i64) ; impl Align { pub const LEFT : Align = Align (0i64) ; pub const CENTER : Align = Align (1i64) ; pub const RIGHT : Align = Align (2i64) ; pub const FILL : Align = Align (3i64) ; } impl From < i64 > for Align { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Align > for i64 { # [inline] fn from (v : Align) -> Self { v . 0 } } impl FromVariant for Align { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct InlineAlign (pub i64) ; impl InlineAlign { pub const TOP : InlineAlign = InlineAlign (0i64) ; pub const CENTER : InlineAlign = InlineAlign (1i64) ; pub const BASELINE : InlineAlign = InlineAlign (2i64) ; pub const BOTTOM : InlineAlign = InlineAlign (3i64) ; } impl From < i64 > for InlineAlign { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < InlineAlign > for i64 { # [inline] fn from (v : InlineAlign) -> Self { v . 0 } } impl FromVariant for InlineAlign { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ItemType (pub i64) ; impl ItemType { pub const FRAME : ItemType = ItemType (0i64) ; pub const TEXT : ItemType = ItemType (1i64) ; pub const IMAGE : ItemType = ItemType (2i64) ; pub const NEWLINE : ItemType = ItemType (3i64) ; pub const FONT : ItemType = ItemType (4i64) ; pub const COLOR : ItemType = ItemType (5i64) ; pub const UNDERLINE : ItemType = ItemType (6i64) ; pub const STRIKETHROUGH : ItemType = ItemType (7i64) ; pub const ALIGN : ItemType = ItemType (8i64) ; pub const INDENT : ItemType = ItemType (9i64) ; pub const LIST : ItemType = ItemType (10i64) ; pub const TABLE : ItemType = ItemType (11i64) ; pub const FADE : ItemType = ItemType (12i64) ; pub const SHAKE : ItemType = ItemType (13i64) ; pub const WAVE : ItemType = ItemType (14i64) ; pub const TORNADO : ItemType = ItemType (15i64) ; pub const RAINBOW : ItemType = ItemType (16i64) ; pub const META : ItemType = ItemType (17i64) ; pub const CUSTOMFX : ItemType = ItemType (18i64) ; } impl From < i64 > for ItemType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ItemType > for i64 { # [inline] fn from (v : ItemType) -> Self { v . 0 } } impl FromVariant for ItemType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ListType (pub i64) ; impl ListType { pub const NUMBERS : ListType = ListType (0i64) ; pub const LETTERS : ListType = ListType (1i64) ; pub const DOTS : ListType = ListType (2i64) ; } impl From < i64 > for ListType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ListType > for i64 { # [inline] fn from (v : ListType) -> Self { v . 0 } } impl FromVariant for ListType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl RichTextLabel { pub const ALIGN_LEFT : i64 = 0i64 ; pub const INLINE_ALIGN_TOP : i64 = 0i64 ; pub const ITEM_FRAME : i64 = 0i64 ; pub const LIST_NUMBERS : i64 = 0i64 ; pub const ALIGN_CENTER : i64 = 1i64 ; pub const INLINE_ALIGN_CENTER : i64 = 1i64 ; pub const ITEM_TEXT : i64 = 1i64 ; pub const LIST_LETTERS : i64 = 1i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const INLINE_ALIGN_BASELINE : i64 = 2i64 ; pub const ITEM_IMAGE : i64 = 2i64 ; pub const LIST_DOTS : i64 = 2i64 ; pub const ALIGN_FILL : i64 = 3i64 ; pub const INLINE_ALIGN_BOTTOM : i64 = 3i64 ; pub const ITEM_NEWLINE : i64 = 3i64 ; pub const ITEM_FONT : i64 = 4i64 ; pub const ITEM_COLOR : i64 = 5i64 ; pub const ITEM_UNDERLINE : i64 = 6i64 ; pub const ITEM_STRIKETHROUGH : i64 = 7i64 ; pub const ITEM_ALIGN : i64 = 8i64 ; pub const ITEM_INDENT : i64 = 9i64 ; pub const ITEM_LIST : i64 = 10i64 ; pub const ITEM_TABLE : i64 = 11i64 ; pub const ITEM_FADE : i64 = 12i64 ; pub const ITEM_SHAKE : i64 = 13i64 ; pub const ITEM_WAVE : i64 = 14i64 ; pub const ITEM_TORNADO : i64 = 15i64 ; pub const ITEM_RAINBOW : i64 = 16i64 ; pub const ITEM_META : i64 = 17i64 ; pub const ITEM_CUSTOMFX : i64 = 18i64 ; } impl RichTextLabel { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RichTextLabelMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds an image's opening and closing tags to the tag stack, optionally providing a `width` and `height` to resize the image.\nIf `width` or `height` is set to 0, the image size will be adjusted in order to keep the original aspect ratio.\n# Default Arguments\n* `width` - `0`\n* `height` - `0`\n* `align` - `2`"] # [doc = ""] # [inline] pub fn add_image (& self , image : impl AsArg < crate :: generated :: Texture > , width : i64 , height : i64 , align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . add_image ; let ret = crate :: icalls :: icallvar__obj_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , width as _ , height as _ , align as _) ; } } # [doc = "Adds raw non-BBCode-parsed text to the tag stack."] # [doc = ""] # [inline] pub fn add_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . add_text ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "Parses `bbcode` and adds tags to the tag stack as needed.\n**Note:** Using this method, you can't close a tag that was opened in a previous [`append_bbcode`][Self::append_bbcode] call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the [`bbcode_text`][Self::bbcode_text] instead of using [`append_bbcode`][Self::append_bbcode].\n**Note:** This method internals' can't possibly fail, but an error code is returned for backwards compatibility, which will always be [`OK`][Self::OK]."] # [doc = ""] # [inline] pub fn append_bbcode (& self , bbcode : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . append_bbcode ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , bbcode . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Clears the tag stack and sets [`bbcode_text`][Self::bbcode_text] to an empty string."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Clears the current selection."] # [doc = ""] # [inline] pub fn deselect (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . deselect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited.\n**Note:** It is unadvised to use the `+=` operator with `bbcode_text` (e.g. `bbcode_text += \"some string\"`) as it replaces the whole text and can cause slowdowns. It will also erase all BBCode that was added to stack using `push_*` methods. Use [`append_bbcode`][Self::append_bbcode] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call."] # [doc = ""] # [inline] pub fn bbcode (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_bbcode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the height of the content."] # [doc = ""] # [inline] pub fn get_content_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_content_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The currently installed custom effects. This is an array of [`RichTextEffect`][RichTextEffect]s.\nTo add a custom effect, it's more convenient to use [`install_effect`][Self::install_effect]."] # [doc = ""] # [inline] pub fn effects (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_effects ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the total number of newlines in the tag stack's text tags. Considers wrapped text as one line."] # [doc = ""] # [inline] pub fn get_line_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_line_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The range of characters to display, as a [`float`][float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0.\n**Note:** Setting this property updates [`visible_characters`][Self::visible_characters] based on current [`get_total_character_count`][Self::get_total_character_count]."] # [doc = ""] # [inline] pub fn percent_visible (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_percent_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the current selection text. Does not include BBCodes."] # [doc = ""] # [inline] pub fn get_selected_text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_selected_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The number of spaces associated with a single tab length. Does not affect `\\t` in text tags, only indent tags."] # [doc = ""] # [inline] pub fn tab_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_tab_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The raw text of the label.\nWhen set, clears the tag stack and adds a raw text tag to the top of it. Does not parse BBCodes. Does not modify [`bbcode_text`][Self::bbcode_text]."] # [doc = ""] # [inline] pub fn text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the total number of characters from text tags. Does not include BBCodes."] # [doc = ""] # [inline] pub fn get_total_character_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_total_character_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the vertical scrollbar.\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_v_scroll (& self) -> Option < Ref < crate :: generated :: VScrollBar , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_v_scroll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: VScrollBar , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The restricted number of characters to display in the label. If `-1`, all characters will be displayed.\n**Note:** Setting this property updates [`percent_visible`][Self::percent_visible] based on current [`get_total_character_count`][Self::get_total_character_count]."] # [doc = ""] # [inline] pub fn visible_characters (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_visible_characters ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of visible lines."] # [doc = ""] # [inline] pub fn get_visible_line_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . get_visible_line_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Installs a custom effect. `effect` should be a valid [`RichTextEffect`][RichTextEffect]."] # [doc = ""] # [inline] pub fn install_effect (& self , effect : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . install_effect ; let ret = crate :: icalls :: icallvar__var (method_bind , self . this . sys () . as_ptr () , effect . owned_to_variant ()) ; } } # [doc = "If `true`, the selected text will be deselected when focus is lost."] # [doc = ""] # [inline] pub fn is_deselect_on_focus_loss_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_deselect_on_focus_loss_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the label's height will be automatically updated to fit its content.\n**Note:** This property is used as a workaround to fix issues with [`RichTextLabel`][RichTextLabel] in [`Container`][Container]s, but it's unreliable in some cases and will be removed in future versions."] # [doc = ""] # [inline] pub fn is_fit_content_height_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_fit_content_height_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the label underlines meta tags such as `[`url`][url]{text}[/url]`."] # [doc = ""] # [inline] pub fn is_meta_underlined (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_meta_underlined ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the label uses the custom font color."] # [doc = ""] # [inline] pub fn is_overriding_selected_font_color (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_overriding_selected_font_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the scrollbar is visible. Setting this to `false` does not block scrolling completely. See [`scroll_to_line`][Self::scroll_to_line]."] # [doc = ""] # [inline] pub fn is_scroll_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_scroll_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the window scrolls down to display new content automatically."] # [doc = ""] # [inline] pub fn is_scroll_following (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_scroll_following ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the label allows text selection."] # [doc = ""] # [inline] pub fn is_selection_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_selection_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the label uses BBCode formatting.\n**Note:** Trying to alter the [`RichTextLabel`][RichTextLabel]'s text with [`add_text`][Self::add_text] will reset this to `false`. Use instead [`append_bbcode`][Self::append_bbcode] to preserve BBCode formatting."] # [doc = ""] # [inline] pub fn is_using_bbcode (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . is_using_bbcode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Adds a newline tag to the tag stack."] # [doc = ""] # [inline] pub fn newline (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . newline ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The assignment version of [`append_bbcode`][Self::append_bbcode]. Clears the tag stack and inserts the new content.\n**Note:** This method internals' can't possibly fail, but an error code is returned for backwards compatibility, which will always be [`OK`][Self::OK]."] # [doc = ""] # [inline] pub fn parse_bbcode (& self , bbcode : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . parse_bbcode ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , bbcode . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Parses BBCode parameter `expressions` into a dictionary."] # [doc = ""] # [inline] pub fn parse_expressions_for_values (& self , expressions : PoolArray < GodotString >) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . parse_expressions_for_values ; let ret = crate :: icalls :: icallvar__strarr (method_bind , self . this . sys () . as_ptr () , expressions) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Terminates the current tag. Use after `push_*` methods to close BBCodes manually. Does not need to follow `add_*` methods."] # [doc = ""] # [inline] pub fn pop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . pop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds an `[`align`][align]` tag based on the given `align` value. See [`Align`][Align] for possible values."] # [doc = ""] # [inline] pub fn push_align (& self , align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_align ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , align as _) ; } } # [doc = "Adds a `[`font`][font]` tag with a bold font to the tag stack. This is the same as adding a `**` tag if not currently in a `_` tag."] # [doc = ""] # [inline] pub fn push_bold (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_bold ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[`font`][font]` tag with a bold italics font to the tag stack."] # [doc = ""] # [inline] pub fn push_bold_italics (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_bold_italics ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[`cell`][cell]` tag to the tag stack. Must be inside a `[`table`][table]` tag. See [`push_table`][Self::push_table] for details."] # [doc = ""] # [inline] pub fn push_cell (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_cell ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[`color`][color]` tag to the tag stack."] # [doc = ""] # [inline] pub fn push_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Adds a `[`font`][font]` tag to the tag stack. Overrides default fonts for its duration."] # [doc = ""] # [inline] pub fn push_font (& self , font : impl AsArg < crate :: generated :: Font >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_font ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , font . as_arg_ptr ()) ; } } # [doc = "Adds an `[`indent`][indent]` tag to the tag stack. Multiplies `level` by current [`tab_size`][Self::tab_size] to determine new margin length."] # [doc = ""] # [inline] pub fn push_indent (& self , level : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_indent ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , level as _) ; } } # [doc = "Adds a `[`font`][font]` tag with a italics font to the tag stack. This is the same as adding a `_` tag if not currently in a `**` tag."] # [doc = ""] # [inline] pub fn push_italics (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_italics ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[`list`][list]` tag to the tag stack. Similar to the BBCodes `[`ol`][ol]` or `[`ul`][ul]`, but supports more list types. Not fully implemented!"] # [doc = ""] # [inline] pub fn push_list (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_list ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } # [doc = "Adds a `[`meta`][meta]` tag to the tag stack. Similar to the BBCode `[{text}](something)`, but supports non-[`String`][GodotString] metadata types."] # [doc = ""] # [inline] pub fn push_meta (& self , data : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_meta ; let ret = crate :: icalls :: icallvar__var (method_bind , self . this . sys () . as_ptr () , data . owned_to_variant ()) ; } } # [doc = "Adds a `[`font`][font]` tag with a monospace font to the tag stack."] # [doc = ""] # [inline] pub fn push_mono (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_mono ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[`font`][font]` tag with a normal font to the tag stack."] # [doc = ""] # [inline] pub fn push_normal (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_normal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[`s`][s]` tag to the tag stack."] # [doc = ""] # [inline] pub fn push_strikethrough (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_strikethrough ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Adds a `[table=columns]` tag to the tag stack."] # [doc = ""] # [inline] pub fn push_table (& self , columns : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_table ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , columns as _) ; } } # [doc = "Adds a `[`u`][u]` tag to the tag stack."] # [doc = ""] # [inline] pub fn push_underline (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . push_underline ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes a line of content from the label. Returns `true` if the line exists.\nThe `line` argument is the index of the line to remove, it can take values in the interval `[0, get_line_count() - 1]`."] # [doc = ""] # [inline] pub fn remove_line (& self , line : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . remove_line ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Scrolls the window's top line to match `line`."] # [doc = ""] # [inline] pub fn scroll_to_line (& self , line : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . scroll_to_line ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line as _) ; } } # [doc = "The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited.\n**Note:** It is unadvised to use the `+=` operator with `bbcode_text` (e.g. `bbcode_text += \"some string\"`) as it replaces the whole text and can cause slowdowns. It will also erase all BBCode that was added to stack using `push_*` methods. Use [`append_bbcode`][Self::append_bbcode] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call."] # [doc = ""] # [inline] pub fn set_bbcode (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_bbcode ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "If `true`, the selected text will be deselected when focus is lost."] # [doc = ""] # [inline] pub fn set_deselect_on_focus_loss_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_deselect_on_focus_loss_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The currently installed custom effects. This is an array of [`RichTextEffect`][RichTextEffect]s.\nTo add a custom effect, it's more convenient to use [`install_effect`][Self::install_effect]."] # [doc = ""] # [inline] pub fn set_effects (& self , effects : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_effects ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , effects) ; } } # [doc = "If `true`, the label's height will be automatically updated to fit its content.\n**Note:** This property is used as a workaround to fix issues with [`RichTextLabel`][RichTextLabel] in [`Container`][Container]s, but it's unreliable in some cases and will be removed in future versions."] # [doc = ""] # [inline] pub fn set_fit_content_height (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_fit_content_height ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, the label underlines meta tags such as `[`url`][url]{text}[/url]`."] # [doc = ""] # [inline] pub fn set_meta_underline (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_meta_underline ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the label uses the custom font color."] # [doc = ""] # [inline] pub fn set_override_selected_font_color (& self , override_ : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_override_selected_font_color ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , override_ as _) ; } } # [doc = "The range of characters to display, as a [`float`][float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0.\n**Note:** Setting this property updates [`visible_characters`][Self::visible_characters] based on current [`get_total_character_count`][Self::get_total_character_count]."] # [doc = ""] # [inline] pub fn set_percent_visible (& self , percent_visible : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_percent_visible ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , percent_visible as _) ; } } # [doc = "If `true`, the scrollbar is visible. Setting this to `false` does not block scrolling completely. See [`scroll_to_line`][Self::scroll_to_line]."] # [doc = ""] # [inline] pub fn set_scroll_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_scroll_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , active as _) ; } } # [doc = "If `true`, the window scrolls down to display new content automatically."] # [doc = ""] # [inline] pub fn set_scroll_follow (& self , follow : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_scroll_follow ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , follow as _) ; } } # [doc = "If `true`, the label allows text selection."] # [doc = ""] # [inline] pub fn set_selection_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_selection_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The number of spaces associated with a single tab length. Does not affect `\\t` in text tags, only indent tags."] # [doc = ""] # [inline] pub fn set_tab_size (& self , spaces : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_tab_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , spaces as _) ; } } # [doc = "Edits the selected column's expansion options. If `expand` is `true`, the column expands in proportion to its expansion ratio versus the other columns' ratios.\nFor example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively.\nIf `expand` is `false`, the column will not contribute to the total ratio."] # [doc = ""] # [inline] pub fn set_table_column_expand (& self , column : i64 , expand : bool , ratio : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_table_column_expand ; let ret = crate :: icalls :: icallvar__i64_bool_i64 (method_bind , self . this . sys () . as_ptr () , column as _ , expand as _ , ratio as _) ; } } # [doc = "The raw text of the label.\nWhen set, clears the tag stack and adds a raw text tag to the top of it. Does not parse BBCodes. Does not modify [`bbcode_text`][Self::bbcode_text]."] # [doc = ""] # [inline] pub fn set_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_text ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "If `true`, the label uses BBCode formatting.\n**Note:** Trying to alter the [`RichTextLabel`][RichTextLabel]'s text with [`add_text`][Self::add_text] will reset this to `false`. Use instead [`append_bbcode`][Self::append_bbcode] to preserve BBCode formatting."] # [doc = ""] # [inline] pub fn set_use_bbcode (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_use_bbcode ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The restricted number of characters to display in the label. If `-1`, all characters will be displayed.\n**Note:** Setting this property updates [`percent_visible`][Self::percent_visible] based on current [`get_total_character_count`][Self::get_total_character_count]."] # [doc = ""] # [inline] pub fn set_visible_characters (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RichTextLabelMethodTable :: get (get_api ()) . set_visible_characters ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RichTextLabel { } unsafe impl GodotObject for RichTextLabel { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RichTextLabel" } } impl QueueFree for RichTextLabel { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for RichTextLabel { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RichTextLabel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for RichTextLabel { } unsafe impl SubClass < crate :: generated :: CanvasItem > for RichTextLabel { } unsafe impl SubClass < crate :: generated :: Node > for RichTextLabel { } unsafe impl SubClass < crate :: generated :: Object > for RichTextLabel { } impl Instanciable for RichTextLabel { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RichTextLabel :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RichTextLabelMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_image : * mut sys :: godot_method_bind , pub add_text : * mut sys :: godot_method_bind , pub append_bbcode : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub deselect : * mut sys :: godot_method_bind , pub get_bbcode : * mut sys :: godot_method_bind , pub get_content_height : * mut sys :: godot_method_bind , pub get_effects : * mut sys :: godot_method_bind , pub get_line_count : * mut sys :: godot_method_bind , pub get_percent_visible : * mut sys :: godot_method_bind , pub get_selected_text : * mut sys :: godot_method_bind , pub get_tab_size : * mut sys :: godot_method_bind , pub get_text : * mut sys :: godot_method_bind , pub get_total_character_count : * mut sys :: godot_method_bind , pub get_v_scroll : * mut sys :: godot_method_bind , pub get_visible_characters : * mut sys :: godot_method_bind , pub get_visible_line_count : * mut sys :: godot_method_bind , pub install_effect : * mut sys :: godot_method_bind , pub is_deselect_on_focus_loss_enabled : * mut sys :: godot_method_bind , pub is_fit_content_height_enabled : * mut sys :: godot_method_bind , pub is_meta_underlined : * mut sys :: godot_method_bind , pub is_overriding_selected_font_color : * mut sys :: godot_method_bind , pub is_scroll_active : * mut sys :: godot_method_bind , pub is_scroll_following : * mut sys :: godot_method_bind , pub is_selection_enabled : * mut sys :: godot_method_bind , pub is_using_bbcode : * mut sys :: godot_method_bind , pub newline : * mut sys :: godot_method_bind , pub parse_bbcode : * mut sys :: godot_method_bind , pub parse_expressions_for_values : * mut sys :: godot_method_bind , pub pop : * mut sys :: godot_method_bind , pub push_align : * mut sys :: godot_method_bind , pub push_bold : * mut sys :: godot_method_bind , pub push_bold_italics : * mut sys :: godot_method_bind , pub push_cell : * mut sys :: godot_method_bind , pub push_color : * mut sys :: godot_method_bind , pub push_font : * mut sys :: godot_method_bind , pub push_indent : * mut sys :: godot_method_bind , pub push_italics : * mut sys :: godot_method_bind , pub push_list : * mut sys :: godot_method_bind , pub push_meta : * mut sys :: godot_method_bind , pub push_mono : * mut sys :: godot_method_bind , pub push_normal : * mut sys :: godot_method_bind , pub push_strikethrough : * mut sys :: godot_method_bind , pub push_table : * mut sys :: godot_method_bind , pub push_underline : * mut sys :: godot_method_bind , pub remove_line : * mut sys :: godot_method_bind , pub scroll_to_line : * mut sys :: godot_method_bind , pub set_bbcode : * mut sys :: godot_method_bind , pub set_deselect_on_focus_loss_enabled : * mut sys :: godot_method_bind , pub set_effects : * mut sys :: godot_method_bind , pub set_fit_content_height : * mut sys :: godot_method_bind , pub set_meta_underline : * mut sys :: godot_method_bind , pub set_override_selected_font_color : * mut sys :: godot_method_bind , pub set_percent_visible : * mut sys :: godot_method_bind , pub set_scroll_active : * mut sys :: godot_method_bind , pub set_scroll_follow : * mut sys :: godot_method_bind , pub set_selection_enabled : * mut sys :: godot_method_bind , pub set_tab_size : * mut sys :: godot_method_bind , pub set_table_column_expand : * mut sys :: godot_method_bind , pub set_text : * mut sys :: godot_method_bind , pub set_use_bbcode : * mut sys :: godot_method_bind , pub set_visible_characters : * mut sys :: godot_method_bind } impl RichTextLabelMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RichTextLabelMethodTable = RichTextLabelMethodTable { class_constructor : None , add_image : 0 as * mut sys :: godot_method_bind , add_text : 0 as * mut sys :: godot_method_bind , append_bbcode : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , deselect : 0 as * mut sys :: godot_method_bind , get_bbcode : 0 as * mut sys :: godot_method_bind , get_content_height : 0 as * mut sys :: godot_method_bind , get_effects : 0 as * mut sys :: godot_method_bind , get_line_count : 0 as * mut sys :: godot_method_bind , get_percent_visible : 0 as * mut sys :: godot_method_bind , get_selected_text : 0 as * mut sys :: godot_method_bind , get_tab_size : 0 as * mut sys :: godot_method_bind , get_text : 0 as * mut sys :: godot_method_bind , get_total_character_count : 0 as * mut sys :: godot_method_bind , get_v_scroll : 0 as * mut sys :: godot_method_bind , get_visible_characters : 0 as * mut sys :: godot_method_bind , get_visible_line_count : 0 as * mut sys :: godot_method_bind , install_effect : 0 as * mut sys :: godot_method_bind , is_deselect_on_focus_loss_enabled : 0 as * mut sys :: godot_method_bind , is_fit_content_height_enabled : 0 as * mut sys :: godot_method_bind , is_meta_underlined : 0 as * mut sys :: godot_method_bind , is_overriding_selected_font_color : 0 as * mut sys :: godot_method_bind , is_scroll_active : 0 as * mut sys :: godot_method_bind , is_scroll_following : 0 as * mut sys :: godot_method_bind , is_selection_enabled : 0 as * mut sys :: godot_method_bind , is_using_bbcode : 0 as * mut sys :: godot_method_bind , newline : 0 as * mut sys :: godot_method_bind , parse_bbcode : 0 as * mut sys :: godot_method_bind , parse_expressions_for_values : 0 as * mut sys :: godot_method_bind , pop : 0 as * mut sys :: godot_method_bind , push_align : 0 as * mut sys :: godot_method_bind , push_bold : 0 as * mut sys :: godot_method_bind , push_bold_italics : 0 as * mut sys :: godot_method_bind , push_cell : 0 as * mut sys :: godot_method_bind , push_color : 0 as * mut sys :: godot_method_bind , push_font : 0 as * mut sys :: godot_method_bind , push_indent : 0 as * mut sys :: godot_method_bind , push_italics : 0 as * mut sys :: godot_method_bind , push_list : 0 as * mut sys :: godot_method_bind , push_meta : 0 as * mut sys :: godot_method_bind , push_mono : 0 as * mut sys :: godot_method_bind , push_normal : 0 as * mut sys :: godot_method_bind , push_strikethrough : 0 as * mut sys :: godot_method_bind , push_table : 0 as * mut sys :: godot_method_bind , push_underline : 0 as * mut sys :: godot_method_bind , remove_line : 0 as * mut sys :: godot_method_bind , scroll_to_line : 0 as * mut sys :: godot_method_bind , set_bbcode : 0 as * mut sys :: godot_method_bind , set_deselect_on_focus_loss_enabled : 0 as * mut sys :: godot_method_bind , set_effects : 0 as * mut sys :: godot_method_bind , set_fit_content_height : 0 as * mut sys :: godot_method_bind , set_meta_underline : 0 as * mut sys :: godot_method_bind , set_override_selected_font_color : 0 as * mut sys :: godot_method_bind , set_percent_visible : 0 as * mut sys :: godot_method_bind , set_scroll_active : 0 as * mut sys :: godot_method_bind , set_scroll_follow : 0 as * mut sys :: godot_method_bind , set_selection_enabled : 0 as * mut sys :: godot_method_bind , set_tab_size : 0 as * mut sys :: godot_method_bind , set_table_column_expand : 0 as * mut sys :: godot_method_bind , set_text : 0 as * mut sys :: godot_method_bind , set_use_bbcode : 0 as * mut sys :: godot_method_bind , set_visible_characters : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RichTextLabelMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RichTextLabel\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_image = (gd_api . godot_method_bind_get_method) (class_name , "add_image\0" . as_ptr () as * const c_char) ; table . add_text = (gd_api . godot_method_bind_get_method) (class_name , "add_text\0" . as_ptr () as * const c_char) ; table . append_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "append_bbcode\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . deselect = (gd_api . godot_method_bind_get_method) (class_name , "deselect\0" . as_ptr () as * const c_char) ; table . get_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "get_bbcode\0" . as_ptr () as * const c_char) ; table . get_content_height = (gd_api . godot_method_bind_get_method) (class_name , "get_content_height\0" . as_ptr () as * const c_char) ; table . get_effects = (gd_api . godot_method_bind_get_method) (class_name , "get_effects\0" . as_ptr () as * const c_char) ; table . get_line_count = (gd_api . godot_method_bind_get_method) (class_name , "get_line_count\0" . as_ptr () as * const c_char) ; table . get_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "get_percent_visible\0" . as_ptr () as * const c_char) ; table . get_selected_text = (gd_api . godot_method_bind_get_method) (class_name , "get_selected_text\0" . as_ptr () as * const c_char) ; table . get_tab_size = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_size\0" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . get_total_character_count = (gd_api . godot_method_bind_get_method) (class_name , "get_total_character_count\0" . as_ptr () as * const c_char) ; table . get_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scroll\0" . as_ptr () as * const c_char) ; table . get_visible_characters = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_characters\0" . as_ptr () as * const c_char) ; table . get_visible_line_count = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_line_count\0" . as_ptr () as * const c_char) ; table . install_effect = (gd_api . godot_method_bind_get_method) (class_name , "install_effect\0" . as_ptr () as * const c_char) ; table . is_deselect_on_focus_loss_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_deselect_on_focus_loss_enabled\0" . as_ptr () as * const c_char) ; table . is_fit_content_height_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_fit_content_height_enabled\0" . as_ptr () as * const c_char) ; table . is_meta_underlined = (gd_api . godot_method_bind_get_method) (class_name , "is_meta_underlined\0" . as_ptr () as * const c_char) ; table . is_overriding_selected_font_color = (gd_api . godot_method_bind_get_method) (class_name , "is_overriding_selected_font_color\0" . as_ptr () as * const c_char) ; table . is_scroll_active = (gd_api . godot_method_bind_get_method) (class_name , "is_scroll_active\0" . as_ptr () as * const c_char) ; table . is_scroll_following = (gd_api . godot_method_bind_get_method) (class_name , "is_scroll_following\0" . as_ptr () as * const c_char) ; table . is_selection_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_selection_enabled\0" . as_ptr () as * const c_char) ; table . is_using_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "is_using_bbcode\0" . as_ptr () as * const c_char) ; table . newline = (gd_api . godot_method_bind_get_method) (class_name , "newline\0" . as_ptr () as * const c_char) ; table . parse_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "parse_bbcode\0" . as_ptr () as * const c_char) ; table . parse_expressions_for_values = (gd_api . godot_method_bind_get_method) (class_name , "parse_expressions_for_values\0" . as_ptr () as * const c_char) ; table . pop = (gd_api . godot_method_bind_get_method) (class_name , "pop\0" . as_ptr () as * const c_char) ; table . push_align = (gd_api . godot_method_bind_get_method) (class_name , "push_align\0" . as_ptr () as * const c_char) ; table . push_bold = (gd_api . godot_method_bind_get_method) (class_name , "push_bold\0" . as_ptr () as * const c_char) ; table . push_bold_italics = (gd_api . godot_method_bind_get_method) (class_name , "push_bold_italics\0" . as_ptr () as * const c_char) ; table . push_cell = (gd_api . godot_method_bind_get_method) (class_name , "push_cell\0" . as_ptr () as * const c_char) ; table . push_color = (gd_api . godot_method_bind_get_method) (class_name , "push_color\0" . as_ptr () as * const c_char) ; table . push_font = (gd_api . godot_method_bind_get_method) (class_name , "push_font\0" . as_ptr () as * const c_char) ; table . push_indent = (gd_api . godot_method_bind_get_method) (class_name , "push_indent\0" . as_ptr () as * const c_char) ; table . push_italics = (gd_api . godot_method_bind_get_method) (class_name , "push_italics\0" . as_ptr () as * const c_char) ; table . push_list = (gd_api . godot_method_bind_get_method) (class_name , "push_list\0" . as_ptr () as * const c_char) ; table . push_meta = (gd_api . godot_method_bind_get_method) (class_name , "push_meta\0" . as_ptr () as * const c_char) ; table . push_mono = (gd_api . godot_method_bind_get_method) (class_name , "push_mono\0" . as_ptr () as * const c_char) ; table . push_normal = (gd_api . godot_method_bind_get_method) (class_name , "push_normal\0" . as_ptr () as * const c_char) ; table . push_strikethrough = (gd_api . godot_method_bind_get_method) (class_name , "push_strikethrough\0" . as_ptr () as * const c_char) ; table . push_table = (gd_api . godot_method_bind_get_method) (class_name , "push_table\0" . as_ptr () as * const c_char) ; table . push_underline = (gd_api . godot_method_bind_get_method) (class_name , "push_underline\0" . as_ptr () as * const c_char) ; table . remove_line = (gd_api . godot_method_bind_get_method) (class_name , "remove_line\0" . as_ptr () as * const c_char) ; table . scroll_to_line = (gd_api . godot_method_bind_get_method) (class_name , "scroll_to_line\0" . as_ptr () as * const c_char) ; table . set_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "set_bbcode\0" . as_ptr () as * const c_char) ; table . set_deselect_on_focus_loss_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_deselect_on_focus_loss_enabled\0" . as_ptr () as * const c_char) ; table . set_effects = (gd_api . godot_method_bind_get_method) (class_name , "set_effects\0" . as_ptr () as * const c_char) ; table . set_fit_content_height = (gd_api . godot_method_bind_get_method) (class_name , "set_fit_content_height\0" . as_ptr () as * const c_char) ; table . set_meta_underline = (gd_api . godot_method_bind_get_method) (class_name , "set_meta_underline\0" . as_ptr () as * const c_char) ; table . set_override_selected_font_color = (gd_api . godot_method_bind_get_method) (class_name , "set_override_selected_font_color\0" . as_ptr () as * const c_char) ; table . set_percent_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_percent_visible\0" . as_ptr () as * const c_char) ; table . set_scroll_active = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_active\0" . as_ptr () as * const c_char) ; table . set_scroll_follow = (gd_api . godot_method_bind_get_method) (class_name , "set_scroll_follow\0" . as_ptr () as * const c_char) ; table . set_selection_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_selection_enabled\0" . as_ptr () as * const c_char) ; table . set_tab_size = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_size\0" . as_ptr () as * const c_char) ; table . set_table_column_expand = (gd_api . godot_method_bind_get_method) (class_name , "set_table_column_expand\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; table . set_use_bbcode = (gd_api . godot_method_bind_get_method) (class_name , "set_use_bbcode\0" . as_ptr () as * const c_char) ; table . set_visible_characters = (gd_api . godot_method_bind_get_method) (class_name , "set_visible_characters\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::rich_text_label::private::RichTextLabel;
            
            pub mod rigid_body {
                # ! [doc = "This module contains types related to the API class [`RigidBody`][super::RigidBody]."] pub (crate) mod private { # [doc = "`core class RigidBody` inherits `PhysicsBody` (manually managed).\n\nThis class has related types in the [`rigid_body`][super::rigid_body] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_rigidbody.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`RigidBody` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<RigidBody>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRigidBody inherits methods from:\n - [PhysicsBody](struct.PhysicsBody.html)\n - [CollisionObject](struct.CollisionObject.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RigidBody { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RigidBody ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const RIGID : Mode = Mode (0i64) ; pub const STATIC : Mode = Mode (1i64) ; pub const CHARACTER : Mode = Mode (2i64) ; pub const KINEMATIC : Mode = Mode (3i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } impl FromVariant for Mode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl RigidBody { pub const MODE_RIGID : i64 = 0i64 ; pub const MODE_STATIC : i64 = 1i64 ; pub const MODE_CHARACTER : i64 = 2i64 ; pub const MODE_KINEMATIC : i64 = 3i64 ; } impl RigidBody { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RigidBodyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a constant directional force (i.e. acceleration) without affecting rotation.\nThis is equivalent to `add_force(force, Vector3(0,0,0))`."] # [doc = ""] # [inline] pub fn add_central_force (& self , force : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . add_central_force ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , force) ; } } # [doc = "Adds a constant directional force (i.e. acceleration).\nThe position uses the rotation of the global coordinate system, but is centered at the object's origin."] # [doc = ""] # [inline] pub fn add_force (& self , force : Vector3 , position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . add_force ; let ret = crate :: icalls :: icallvar__vec3_vec3 (method_bind , self . this . sys () . as_ptr () , force , position) ; } } # [doc = "Adds a constant rotational force (i.e. a motor) without affecting position."] # [doc = ""] # [inline] pub fn add_torque (& self , torque : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . add_torque ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , torque) ; } } # [doc = "Applies a directional impulse without affecting rotation.\nThis is equivalent to `apply_impulse(Vector3(0,0,0), impulse)`."] # [doc = ""] # [inline] pub fn apply_central_impulse (& self , impulse : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . apply_central_impulse ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , impulse) ; } } # [doc = "Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin."] # [doc = ""] # [inline] pub fn apply_impulse (& self , position : Vector3 , impulse : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . apply_impulse ; let ret = crate :: icalls :: icallvar__vec3_vec3 (method_bind , self . this . sys () . as_ptr () , position , impulse) ; } } # [doc = "Applies a torque impulse which will be affected by the body mass and shape. This will rotate the body around the `impulse` vector passed."] # [doc = ""] # [inline] pub fn apply_torque_impulse (& self , impulse : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . apply_torque_impulse ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , impulse) ; } } # [doc = "Damps the body's rotational forces. If this value is different from -1.0 it will be added to any angular damp derived from the world or areas.\nSee [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping."] # [doc = ""] # [inline] pub fn angular_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_angular_damp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body's rotational velocity in axis-angle format. The magnitude of the vector is the rotation rate in _radians_ per second."] # [doc = ""] # [inline] pub fn angular_velocity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_angular_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the specified linear or rotational axis is locked."] # [doc = ""] # [inline] pub fn axis_lock (& self , axis : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_axis_lock ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , axis as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [`PhysicsMaterial.bounce`][PhysicsMaterial::bounce] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn bounce (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_bounce ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a list of the bodies colliding with this one. Requires [`contact_monitor`][Self::contact_monitor] to be set to `true` and [`contacts_reported`][Self::contacts_reported] to be set high enough to detect all the collisions.\n**Note:** The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead."] # [doc = ""] # [inline] pub fn get_colliding_bodies (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_colliding_bodies ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The body's friction, from 0 (frictionless) to 1 (max friction).\nDeprecated, use [`PhysicsMaterial.friction`][PhysicsMaterial::friction] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn friction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_friction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "This is multiplied by the global 3D gravity setting found in **Project > Project Settings > Physics > 3d** to produce RigidBody's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object."] # [doc = ""] # [inline] pub fn gravity_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_gravity_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the RigidBody."] # [doc = ""] # [inline] pub fn get_inverse_inertia_tensor (& self) -> Basis { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_inverse_inertia_tensor ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Basis > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The body's linear damp. Cannot be less than -1.0. If this value is different from -1.0 it will be added to any linear damp derived from the world or areas.\nSee [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping."] # [doc = ""] # [inline] pub fn linear_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_linear_damp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use [`_integrate_forces`][Self::_integrate_forces] as your process loop for precise control of the body state."] # [doc = ""] # [inline] pub fn linear_velocity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_linear_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The body's mass."] # [doc = ""] # [inline] pub fn mass (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_mass ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum number of contacts that will be recorded. Requires [`contact_monitor`][Self::contact_monitor] to be set to `true`.\n**Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner)."] # [doc = ""] # [inline] pub fn max_contacts_reported (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_max_contacts_reported ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The body mode. See [`Mode`][Mode] for possible values."] # [doc = ""] # [inline] pub fn mode (& self) -> crate :: generated :: rigid_body :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: rigid_body :: Mode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The physics material override for the body.\nIf a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one."] # [doc = ""] # [inline] pub fn physics_material_override (& self) -> Option < Ref < crate :: generated :: PhysicsMaterial , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_physics_material_override ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: PhysicsMaterial , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The body's weight based on its mass and the global 3D gravity. Global values are set in **Project > Project Settings > Physics > 3d**."] # [doc = ""] # [inline] pub fn weight (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_weight ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the body can enter sleep mode when there is no movement. See [`sleeping`][Self::sleeping].\n**Note:** A RigidBody3D will never enter sleep mode automatically if its [`mode`][Self::mode] is [`MODE_CHARACTER`][Self::MODE_CHARACTER]. It can still be put to sleep manually by setting its [`sleeping`][Self::sleeping] property to `true`."] # [doc = ""] # [inline] pub fn is_able_to_sleep (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . is_able_to_sleep ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the RigidBody will emit signals when it collides with another RigidBody. See also [`contacts_reported`][Self::contacts_reported]."] # [doc = ""] # [inline] pub fn is_contact_monitor_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . is_contact_monitor_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [`apply_impulse`][Self::apply_impulse] or [`add_force`][Self::add_force] methods."] # [doc = ""] # [inline] pub fn is_sleeping (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . is_sleeping ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, continuous collision detection is used.\nContinuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses fewer impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects."] # [doc = ""] # [inline] pub fn is_using_continuous_collision_detection (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . is_using_continuous_collision_detection ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [`_integrate_forces`][Self::_integrate_forces] function, if defined."] # [doc = ""] # [inline] pub fn is_using_custom_integrator (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . is_using_custom_integrator ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Damps the body's rotational forces. If this value is different from -1.0 it will be added to any angular damp derived from the world or areas.\nSee [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping."] # [doc = ""] # [inline] pub fn set_angular_damp (& self , angular_damp : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_angular_damp ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , angular_damp as _) ; } } # [doc = "The body's rotational velocity in axis-angle format. The magnitude of the vector is the rotation rate in _radians_ per second."] # [doc = ""] # [inline] pub fn set_angular_velocity (& self , angular_velocity : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_angular_velocity ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , angular_velocity) ; } } # [doc = "Locks the specified linear or rotational axis."] # [doc = ""] # [inline] pub fn set_axis_lock (& self , axis : i64 , lock : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_axis_lock ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , axis as _ , lock as _) ; } } # [doc = "Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior."] # [doc = ""] # [inline] pub fn set_axis_velocity (& self , axis_velocity : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_axis_velocity ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , axis_velocity) ; } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [`PhysicsMaterial.bounce`][PhysicsMaterial::bounce] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn set_bounce (& self , bounce : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_bounce ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , bounce as _) ; } } # [doc = "If `true`, the body can enter sleep mode when there is no movement. See [`sleeping`][Self::sleeping].\n**Note:** A RigidBody3D will never enter sleep mode automatically if its [`mode`][Self::mode] is [`MODE_CHARACTER`][Self::MODE_CHARACTER]. It can still be put to sleep manually by setting its [`sleeping`][Self::sleeping] property to `true`."] # [doc = ""] # [inline] pub fn set_can_sleep (& self , able_to_sleep : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_can_sleep ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , able_to_sleep as _) ; } } # [doc = "If `true`, the RigidBody will emit signals when it collides with another RigidBody. See also [`contacts_reported`][Self::contacts_reported]."] # [doc = ""] # [inline] pub fn set_contact_monitor (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_contact_monitor ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The body's friction, from 0 (frictionless) to 1 (max friction).\nDeprecated, use [`PhysicsMaterial.friction`][PhysicsMaterial::friction] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn set_friction (& self , friction : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_friction ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , friction as _) ; } } # [doc = "This is multiplied by the global 3D gravity setting found in **Project > Project Settings > Physics > 3d** to produce RigidBody's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object."] # [doc = ""] # [inline] pub fn set_gravity_scale (& self , gravity_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_gravity_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , gravity_scale as _) ; } } # [doc = "The body's linear damp. Cannot be less than -1.0. If this value is different from -1.0 it will be added to any linear damp derived from the world or areas.\nSee [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping."] # [doc = ""] # [inline] pub fn set_linear_damp (& self , linear_damp : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_linear_damp ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , linear_damp as _) ; } } # [doc = "The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use [`_integrate_forces`][Self::_integrate_forces] as your process loop for precise control of the body state."] # [doc = ""] # [inline] pub fn set_linear_velocity (& self , linear_velocity : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_linear_velocity ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , linear_velocity) ; } } # [doc = "The body's mass."] # [doc = ""] # [inline] pub fn set_mass (& self , mass : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_mass ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , mass as _) ; } } # [doc = "The maximum number of contacts that will be recorded. Requires [`contact_monitor`][Self::contact_monitor] to be set to `true`.\n**Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner)."] # [doc = ""] # [inline] pub fn set_max_contacts_reported (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_max_contacts_reported ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "The body mode. See [`Mode`][Mode] for possible values."] # [doc = ""] # [inline] pub fn set_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The physics material override for the body.\nIf a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one."] # [doc = ""] # [inline] pub fn set_physics_material_override (& self , physics_material_override : impl AsArg < crate :: generated :: PhysicsMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_physics_material_override ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , physics_material_override . as_arg_ptr ()) ; } } # [doc = "If `true`, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [`apply_impulse`][Self::apply_impulse] or [`add_force`][Self::add_force] methods."] # [doc = ""] # [inline] pub fn set_sleeping (& self , sleeping : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_sleeping ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , sleeping as _) ; } } # [doc = "If `true`, continuous collision detection is used.\nContinuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses fewer impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects."] # [doc = ""] # [inline] pub fn set_use_continuous_collision_detection (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_use_continuous_collision_detection ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [`_integrate_forces`][Self::_integrate_forces] function, if defined."] # [doc = ""] # [inline] pub fn set_use_custom_integrator (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_use_custom_integrator ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The body's weight based on its mass and the global 3D gravity. Global values are set in **Project > Project Settings > Physics > 3d**."] # [doc = ""] # [inline] pub fn set_weight (& self , weight : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_weight ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , weight as _) ; } } # [doc = "Lock the body's rotation in the X axis."] # [doc = ""] # [inline] pub fn axis_lock_angular_x (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_axis_lock ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 8i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Lock the body's rotation in the X axis."] # [doc = ""] # [inline] pub fn set_axis_lock_angular_x (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_axis_lock ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 8i64 , value as _) ; } } # [doc = "Lock the body's rotation in the Y axis."] # [doc = ""] # [inline] pub fn axis_lock_angular_y (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_axis_lock ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 16i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Lock the body's rotation in the Y axis."] # [doc = ""] # [inline] pub fn set_axis_lock_angular_y (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_axis_lock ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 16i64 , value as _) ; } } # [doc = "Lock the body's rotation in the Z axis."] # [doc = ""] # [inline] pub fn axis_lock_angular_z (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_axis_lock ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 32i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Lock the body's rotation in the Z axis."] # [doc = ""] # [inline] pub fn set_axis_lock_angular_z (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_axis_lock ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 32i64 , value as _) ; } } # [doc = "Lock the body's movement in the X axis."] # [doc = ""] # [inline] pub fn axis_lock_linear_x (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_axis_lock ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Lock the body's movement in the X axis."] # [doc = ""] # [inline] pub fn set_axis_lock_linear_x (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_axis_lock ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Lock the body's movement in the Y axis."] # [doc = ""] # [inline] pub fn axis_lock_linear_y (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_axis_lock ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Lock the body's movement in the Y axis."] # [doc = ""] # [inline] pub fn set_axis_lock_linear_y (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_axis_lock ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Lock the body's movement in the Z axis."] # [doc = ""] # [inline] pub fn axis_lock_linear_z (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . get_axis_lock ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Lock the body's movement in the Z axis."] # [doc = ""] # [inline] pub fn set_axis_lock_linear_z (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBodyMethodTable :: get (get_api ()) . set_axis_lock ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 4i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RigidBody { } unsafe impl GodotObject for RigidBody { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RigidBody" } } impl QueueFree for RigidBody { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for RigidBody { type Target = crate :: generated :: PhysicsBody ; # [inline] fn deref (& self) -> & crate :: generated :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RigidBody { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PhysicsBody > for RigidBody { } unsafe impl SubClass < crate :: generated :: CollisionObject > for RigidBody { } unsafe impl SubClass < crate :: generated :: Spatial > for RigidBody { } unsafe impl SubClass < crate :: generated :: Node > for RigidBody { } unsafe impl SubClass < crate :: generated :: Object > for RigidBody { } impl Instanciable for RigidBody { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RigidBody :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RigidBodyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_central_force : * mut sys :: godot_method_bind , pub add_force : * mut sys :: godot_method_bind , pub add_torque : * mut sys :: godot_method_bind , pub apply_central_impulse : * mut sys :: godot_method_bind , pub apply_impulse : * mut sys :: godot_method_bind , pub apply_torque_impulse : * mut sys :: godot_method_bind , pub get_angular_damp : * mut sys :: godot_method_bind , pub get_angular_velocity : * mut sys :: godot_method_bind , pub get_axis_lock : * mut sys :: godot_method_bind , pub get_bounce : * mut sys :: godot_method_bind , pub get_colliding_bodies : * mut sys :: godot_method_bind , pub get_friction : * mut sys :: godot_method_bind , pub get_gravity_scale : * mut sys :: godot_method_bind , pub get_inverse_inertia_tensor : * mut sys :: godot_method_bind , pub get_linear_damp : * mut sys :: godot_method_bind , pub get_linear_velocity : * mut sys :: godot_method_bind , pub get_mass : * mut sys :: godot_method_bind , pub get_max_contacts_reported : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub get_physics_material_override : * mut sys :: godot_method_bind , pub get_weight : * mut sys :: godot_method_bind , pub is_able_to_sleep : * mut sys :: godot_method_bind , pub is_contact_monitor_enabled : * mut sys :: godot_method_bind , pub is_sleeping : * mut sys :: godot_method_bind , pub is_using_continuous_collision_detection : * mut sys :: godot_method_bind , pub is_using_custom_integrator : * mut sys :: godot_method_bind , pub set_angular_damp : * mut sys :: godot_method_bind , pub set_angular_velocity : * mut sys :: godot_method_bind , pub set_axis_lock : * mut sys :: godot_method_bind , pub set_axis_velocity : * mut sys :: godot_method_bind , pub set_bounce : * mut sys :: godot_method_bind , pub set_can_sleep : * mut sys :: godot_method_bind , pub set_contact_monitor : * mut sys :: godot_method_bind , pub set_friction : * mut sys :: godot_method_bind , pub set_gravity_scale : * mut sys :: godot_method_bind , pub set_linear_damp : * mut sys :: godot_method_bind , pub set_linear_velocity : * mut sys :: godot_method_bind , pub set_mass : * mut sys :: godot_method_bind , pub set_max_contacts_reported : * mut sys :: godot_method_bind , pub set_mode : * mut sys :: godot_method_bind , pub set_physics_material_override : * mut sys :: godot_method_bind , pub set_sleeping : * mut sys :: godot_method_bind , pub set_use_continuous_collision_detection : * mut sys :: godot_method_bind , pub set_use_custom_integrator : * mut sys :: godot_method_bind , pub set_weight : * mut sys :: godot_method_bind } impl RigidBodyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RigidBodyMethodTable = RigidBodyMethodTable { class_constructor : None , add_central_force : 0 as * mut sys :: godot_method_bind , add_force : 0 as * mut sys :: godot_method_bind , add_torque : 0 as * mut sys :: godot_method_bind , apply_central_impulse : 0 as * mut sys :: godot_method_bind , apply_impulse : 0 as * mut sys :: godot_method_bind , apply_torque_impulse : 0 as * mut sys :: godot_method_bind , get_angular_damp : 0 as * mut sys :: godot_method_bind , get_angular_velocity : 0 as * mut sys :: godot_method_bind , get_axis_lock : 0 as * mut sys :: godot_method_bind , get_bounce : 0 as * mut sys :: godot_method_bind , get_colliding_bodies : 0 as * mut sys :: godot_method_bind , get_friction : 0 as * mut sys :: godot_method_bind , get_gravity_scale : 0 as * mut sys :: godot_method_bind , get_inverse_inertia_tensor : 0 as * mut sys :: godot_method_bind , get_linear_damp : 0 as * mut sys :: godot_method_bind , get_linear_velocity : 0 as * mut sys :: godot_method_bind , get_mass : 0 as * mut sys :: godot_method_bind , get_max_contacts_reported : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , get_physics_material_override : 0 as * mut sys :: godot_method_bind , get_weight : 0 as * mut sys :: godot_method_bind , is_able_to_sleep : 0 as * mut sys :: godot_method_bind , is_contact_monitor_enabled : 0 as * mut sys :: godot_method_bind , is_sleeping : 0 as * mut sys :: godot_method_bind , is_using_continuous_collision_detection : 0 as * mut sys :: godot_method_bind , is_using_custom_integrator : 0 as * mut sys :: godot_method_bind , set_angular_damp : 0 as * mut sys :: godot_method_bind , set_angular_velocity : 0 as * mut sys :: godot_method_bind , set_axis_lock : 0 as * mut sys :: godot_method_bind , set_axis_velocity : 0 as * mut sys :: godot_method_bind , set_bounce : 0 as * mut sys :: godot_method_bind , set_can_sleep : 0 as * mut sys :: godot_method_bind , set_contact_monitor : 0 as * mut sys :: godot_method_bind , set_friction : 0 as * mut sys :: godot_method_bind , set_gravity_scale : 0 as * mut sys :: godot_method_bind , set_linear_damp : 0 as * mut sys :: godot_method_bind , set_linear_velocity : 0 as * mut sys :: godot_method_bind , set_mass : 0 as * mut sys :: godot_method_bind , set_max_contacts_reported : 0 as * mut sys :: godot_method_bind , set_mode : 0 as * mut sys :: godot_method_bind , set_physics_material_override : 0 as * mut sys :: godot_method_bind , set_sleeping : 0 as * mut sys :: godot_method_bind , set_use_continuous_collision_detection : 0 as * mut sys :: godot_method_bind , set_use_custom_integrator : 0 as * mut sys :: godot_method_bind , set_weight : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RigidBodyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RigidBody\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_central_force = (gd_api . godot_method_bind_get_method) (class_name , "add_central_force\0" . as_ptr () as * const c_char) ; table . add_force = (gd_api . godot_method_bind_get_method) (class_name , "add_force\0" . as_ptr () as * const c_char) ; table . add_torque = (gd_api . godot_method_bind_get_method) (class_name , "add_torque\0" . as_ptr () as * const c_char) ; table . apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_central_impulse\0" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\0" . as_ptr () as * const c_char) ; table . apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_torque_impulse\0" . as_ptr () as * const c_char) ; table . get_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_damp\0" . as_ptr () as * const c_char) ; table . get_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_velocity\0" . as_ptr () as * const c_char) ; table . get_axis_lock = (gd_api . godot_method_bind_get_method) (class_name , "get_axis_lock\0" . as_ptr () as * const c_char) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\0" . as_ptr () as * const c_char) ; table . get_colliding_bodies = (gd_api . godot_method_bind_get_method) (class_name , "get_colliding_bodies\0" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\0" . as_ptr () as * const c_char) ; table . get_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_scale\0" . as_ptr () as * const c_char) ; table . get_inverse_inertia_tensor = (gd_api . godot_method_bind_get_method) (class_name , "get_inverse_inertia_tensor\0" . as_ptr () as * const c_char) ; table . get_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_damp\0" . as_ptr () as * const c_char) ; table . get_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_velocity\0" . as_ptr () as * const c_char) ; table . get_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_mass\0" . as_ptr () as * const c_char) ; table . get_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "get_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_material_override\0" . as_ptr () as * const c_char) ; table . get_weight = (gd_api . godot_method_bind_get_method) (class_name , "get_weight\0" . as_ptr () as * const c_char) ; table . is_able_to_sleep = (gd_api . godot_method_bind_get_method) (class_name , "is_able_to_sleep\0" . as_ptr () as * const c_char) ; table . is_contact_monitor_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_contact_monitor_enabled\0" . as_ptr () as * const c_char) ; table . is_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "is_sleeping\0" . as_ptr () as * const c_char) ; table . is_using_continuous_collision_detection = (gd_api . godot_method_bind_get_method) (class_name , "is_using_continuous_collision_detection\0" . as_ptr () as * const c_char) ; table . is_using_custom_integrator = (gd_api . godot_method_bind_get_method) (class_name , "is_using_custom_integrator\0" . as_ptr () as * const c_char) ; table . set_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_damp\0" . as_ptr () as * const c_char) ; table . set_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_velocity\0" . as_ptr () as * const c_char) ; table . set_axis_lock = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_lock\0" . as_ptr () as * const c_char) ; table . set_axis_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_velocity\0" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\0" . as_ptr () as * const c_char) ; table . set_can_sleep = (gd_api . godot_method_bind_get_method) (class_name , "set_can_sleep\0" . as_ptr () as * const c_char) ; table . set_contact_monitor = (gd_api . godot_method_bind_get_method) (class_name , "set_contact_monitor\0" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\0" . as_ptr () as * const c_char) ; table . set_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_scale\0" . as_ptr () as * const c_char) ; table . set_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_damp\0" . as_ptr () as * const c_char) ; table . set_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_velocity\0" . as_ptr () as * const c_char) ; table . set_mass = (gd_api . godot_method_bind_get_method) (class_name , "set_mass\0" . as_ptr () as * const c_char) ; table . set_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "set_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_material_override\0" . as_ptr () as * const c_char) ; table . set_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "set_sleeping\0" . as_ptr () as * const c_char) ; table . set_use_continuous_collision_detection = (gd_api . godot_method_bind_get_method) (class_name , "set_use_continuous_collision_detection\0" . as_ptr () as * const c_char) ; table . set_use_custom_integrator = (gd_api . godot_method_bind_get_method) (class_name , "set_use_custom_integrator\0" . as_ptr () as * const c_char) ; table . set_weight = (gd_api . godot_method_bind_get_method) (class_name , "set_weight\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::rigid_body::private::RigidBody;
            
            pub mod rigid_body_2d {
                # ! [doc = "This module contains types related to the API class [`RigidBody2D`][super::RigidBody2D]."] pub (crate) mod private { # [doc = "`core class RigidBody2D` inherits `PhysicsBody2D` (manually managed).\n\nThis class has related types in the [`rigid_body_2d`][super::rigid_body_2d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_rigidbody2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`RigidBody2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<RigidBody2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRigidBody2D inherits methods from:\n - [PhysicsBody2D](struct.PhysicsBody2D.html)\n - [CollisionObject2D](struct.CollisionObject2D.html)\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RigidBody2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RigidBody2D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CcdMode (pub i64) ; impl CcdMode { pub const DISABLED : CcdMode = CcdMode (0i64) ; pub const CAST_RAY : CcdMode = CcdMode (1i64) ; pub const CAST_SHAPE : CcdMode = CcdMode (2i64) ; } impl From < i64 > for CcdMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CcdMode > for i64 { # [inline] fn from (v : CcdMode) -> Self { v . 0 } } impl FromVariant for CcdMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const RIGID : Mode = Mode (0i64) ; pub const STATIC : Mode = Mode (1i64) ; pub const CHARACTER : Mode = Mode (2i64) ; pub const KINEMATIC : Mode = Mode (3i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } impl FromVariant for Mode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl RigidBody2D { pub const CCD_MODE_DISABLED : i64 = 0i64 ; pub const MODE_RIGID : i64 = 0i64 ; pub const CCD_MODE_CAST_RAY : i64 = 1i64 ; pub const MODE_STATIC : i64 = 1i64 ; pub const CCD_MODE_CAST_SHAPE : i64 = 2i64 ; pub const MODE_CHARACTER : i64 = 2i64 ; pub const MODE_KINEMATIC : i64 = 3i64 ; } impl RigidBody2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RigidBody2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a constant directional force without affecting rotation."] # [doc = ""] # [inline] pub fn add_central_force (& self , force : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . add_central_force ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , force) ; } } # [doc = "Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates."] # [doc = ""] # [inline] pub fn add_force (& self , offset : Vector2 , force : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . add_force ; let ret = crate :: icalls :: icallvar__vec2_vec2 (method_bind , self . this . sys () . as_ptr () , offset , force) ; } } # [doc = "Adds a constant rotational force."] # [doc = ""] # [inline] pub fn add_torque (& self , torque : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . add_torque ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , torque as _) ; } } # [doc = "Applies a directional impulse without affecting rotation."] # [doc = ""] # [inline] pub fn apply_central_impulse (& self , impulse : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . apply_central_impulse ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , impulse) ; } } # [doc = "Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts (use the \"_force\" functions otherwise). The position uses the rotation of the global coordinate system, but is centered at the object's origin."] # [doc = ""] # [inline] pub fn apply_impulse (& self , offset : Vector2 , impulse : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . apply_impulse ; let ret = crate :: icalls :: icallvar__vec2_vec2 (method_bind , self . this . sys () . as_ptr () , offset , impulse) ; } } # [doc = "Applies a rotational impulse to the body."] # [doc = ""] # [inline] pub fn apply_torque_impulse (& self , torque : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . apply_torque_impulse ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , torque as _) ; } } # [doc = "Damps the body's [`angular_velocity`][Self::angular_velocity]. If `-1`, the body will use the **Default Angular Damp** defined in **Project > Project Settings > Physics > 2d**. If greater than `-1` it will be added to the default project value.\nSee [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping."] # [doc = ""] # [inline] pub fn angular_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_angular_damp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body's rotational velocity in _radians_ per second."] # [doc = ""] # [inline] pub fn angular_velocity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_angular_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body's total applied force."] # [doc = ""] # [inline] pub fn applied_force (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_applied_force ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The body's total applied torque."] # [doc = ""] # [inline] pub fn applied_torque (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_applied_torque ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [`PhysicsMaterial.bounce`][PhysicsMaterial::bounce] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn bounce (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_bounce ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a list of the bodies colliding with this one. Requires [`contact_monitor`][Self::contact_monitor] to be set to `true` and [`contacts_reported`][Self::contacts_reported] to be set high enough to detect all the collisions.\n**Note:** The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead."] # [doc = ""] # [inline] pub fn get_colliding_bodies (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_colliding_bodies ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Continuous collision detection mode.\nContinuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See [`CCDMode`][CCDMode] for details."] # [doc = ""] # [inline] pub fn continuous_collision_detection_mode (& self) -> crate :: generated :: rigid_body_2d :: CcdMode { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_continuous_collision_detection_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: rigid_body_2d :: CcdMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The body's friction. Values range from `0` (frictionless) to `1` (maximum friction).\nDeprecated, use [`PhysicsMaterial.friction`][PhysicsMaterial::friction] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn friction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_friction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Multiplies the gravity applied to the body. The body's gravity is calculated from the **Default Gravity** value in **Project > Project Settings > Physics > 2d** and/or any additional gravity vector applied by [`Area2D`][Area2D]s."] # [doc = ""] # [inline] pub fn gravity_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_gravity_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 inertia to return to automatically computing it."] # [doc = ""] # [inline] pub fn inertia (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_inertia ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Damps the body's [`linear_velocity`][Self::linear_velocity]. If `-1`, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 2d**. If greater than `-1` it will be added to the default project value.\nSee [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping."] # [doc = ""] # [inline] pub fn linear_damp (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_linear_damp ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body's linear velocity in pixels per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use [`_integrate_forces`][Self::_integrate_forces] as your process loop for precise control of the body state."] # [doc = ""] # [inline] pub fn linear_velocity (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_linear_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The body's mass."] # [doc = ""] # [inline] pub fn mass (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_mass ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum number of contacts that will be recorded. Requires [`contact_monitor`][Self::contact_monitor] to be set to `true`.\n**Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end)."] # [doc = ""] # [inline] pub fn max_contacts_reported (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_max_contacts_reported ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The body's mode. See [`Mode`][Mode] for possible values."] # [doc = ""] # [inline] pub fn mode (& self) -> crate :: generated :: rigid_body_2d :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: rigid_body_2d :: Mode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The physics material override for the body.\nIf a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one."] # [doc = ""] # [inline] pub fn physics_material_override (& self) -> Option < Ref < crate :: generated :: PhysicsMaterial , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_physics_material_override ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: PhysicsMaterial , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The body's weight based on its mass and the **Default Gravity** value in **Project > Project Settings > Physics > 2d**."] # [doc = ""] # [inline] pub fn weight (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . get_weight ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the body can enter sleep mode when there is no movement. See [`sleeping`][Self::sleeping].\n**Note:** A RigidBody2D will never enter sleep mode automatically if its [`mode`][Self::mode] is [`MODE_CHARACTER`][Self::MODE_CHARACTER]. It can still be put to sleep manually by setting its [`sleeping`][Self::sleeping] property to `true`."] # [doc = ""] # [inline] pub fn is_able_to_sleep (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . is_able_to_sleep ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the body will emit signals when it collides with another RigidBody2D. See also [`contacts_reported`][Self::contacts_reported]."] # [doc = ""] # [inline] pub fn is_contact_monitor_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . is_contact_monitor_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [`apply_impulse`][Self::apply_impulse] or [`add_force`][Self::add_force] methods."] # [doc = ""] # [inline] pub fn is_sleeping (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . is_sleeping ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the [`_integrate_forces`][Self::_integrate_forces] function."] # [doc = ""] # [inline] pub fn is_using_custom_integrator (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . is_using_custom_integrator ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Damps the body's [`angular_velocity`][Self::angular_velocity]. If `-1`, the body will use the **Default Angular Damp** defined in **Project > Project Settings > Physics > 2d**. If greater than `-1` it will be added to the default project value.\nSee [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping."] # [doc = ""] # [inline] pub fn set_angular_damp (& self , angular_damp : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_angular_damp ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , angular_damp as _) ; } } # [doc = "The body's rotational velocity in _radians_ per second."] # [doc = ""] # [inline] pub fn set_angular_velocity (& self , angular_velocity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_angular_velocity ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , angular_velocity as _) ; } } # [doc = "The body's total applied force."] # [doc = ""] # [inline] pub fn set_applied_force (& self , force : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_applied_force ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , force) ; } } # [doc = "The body's total applied torque."] # [doc = ""] # [inline] pub fn set_applied_torque (& self , torque : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_applied_torque ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , torque as _) ; } } # [doc = "Sets the body's velocity on the given axis. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior."] # [doc = ""] # [inline] pub fn set_axis_velocity (& self , axis_velocity : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_axis_velocity ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , axis_velocity) ; } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [`PhysicsMaterial.bounce`][PhysicsMaterial::bounce] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn set_bounce (& self , bounce : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_bounce ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , bounce as _) ; } } # [doc = "If `true`, the body can enter sleep mode when there is no movement. See [`sleeping`][Self::sleeping].\n**Note:** A RigidBody2D will never enter sleep mode automatically if its [`mode`][Self::mode] is [`MODE_CHARACTER`][Self::MODE_CHARACTER]. It can still be put to sleep manually by setting its [`sleeping`][Self::sleeping] property to `true`."] # [doc = ""] # [inline] pub fn set_can_sleep (& self , able_to_sleep : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_can_sleep ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , able_to_sleep as _) ; } } # [doc = "If `true`, the body will emit signals when it collides with another RigidBody2D. See also [`contacts_reported`][Self::contacts_reported]."] # [doc = ""] # [inline] pub fn set_contact_monitor (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_contact_monitor ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Continuous collision detection mode.\nContinuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See [`CCDMode`][CCDMode] for details."] # [doc = ""] # [inline] pub fn set_continuous_collision_detection_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_continuous_collision_detection_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The body's friction. Values range from `0` (frictionless) to `1` (maximum friction).\nDeprecated, use [`PhysicsMaterial.friction`][PhysicsMaterial::friction] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn set_friction (& self , friction : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_friction ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , friction as _) ; } } # [doc = "Multiplies the gravity applied to the body. The body's gravity is calculated from the **Default Gravity** value in **Project > Project Settings > Physics > 2d** and/or any additional gravity vector applied by [`Area2D`][Area2D]s."] # [doc = ""] # [inline] pub fn set_gravity_scale (& self , gravity_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_gravity_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , gravity_scale as _) ; } } # [doc = "The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 inertia to return to automatically computing it."] # [doc = ""] # [inline] pub fn set_inertia (& self , inertia : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_inertia ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , inertia as _) ; } } # [doc = "Damps the body's [`linear_velocity`][Self::linear_velocity]. If `-1`, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 2d**. If greater than `-1` it will be added to the default project value.\nSee [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping."] # [doc = ""] # [inline] pub fn set_linear_damp (& self , linear_damp : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_linear_damp ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , linear_damp as _) ; } } # [doc = "The body's linear velocity in pixels per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use [`_integrate_forces`][Self::_integrate_forces] as your process loop for precise control of the body state."] # [doc = ""] # [inline] pub fn set_linear_velocity (& self , linear_velocity : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_linear_velocity ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , linear_velocity) ; } } # [doc = "The body's mass."] # [doc = ""] # [inline] pub fn set_mass (& self , mass : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_mass ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , mass as _) ; } } # [doc = "The maximum number of contacts that will be recorded. Requires [`contact_monitor`][Self::contact_monitor] to be set to `true`.\n**Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end)."] # [doc = ""] # [inline] pub fn set_max_contacts_reported (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_max_contacts_reported ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "The body's mode. See [`Mode`][Mode] for possible values."] # [doc = ""] # [inline] pub fn set_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The physics material override for the body.\nIf a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one."] # [doc = ""] # [inline] pub fn set_physics_material_override (& self , physics_material_override : impl AsArg < crate :: generated :: PhysicsMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_physics_material_override ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , physics_material_override . as_arg_ptr ()) ; } } # [doc = "If `true`, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [`apply_impulse`][Self::apply_impulse] or [`add_force`][Self::add_force] methods."] # [doc = ""] # [inline] pub fn set_sleeping (& self , sleeping : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_sleeping ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , sleeping as _) ; } } # [doc = "If `true`, internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the [`_integrate_forces`][Self::_integrate_forces] function."] # [doc = ""] # [inline] pub fn set_use_custom_integrator (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_use_custom_integrator ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The body's weight based on its mass and the **Default Gravity** value in **Project > Project Settings > Physics > 2d**."] # [doc = ""] # [inline] pub fn set_weight (& self , weight : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . set_weight ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , weight as _) ; } } # [doc = "Returns `true` if a collision would result from moving in the given vector. `margin` increases the size of the shapes involved in the collision detection, and `result` is an object of type [`Physics2DTestMotionResult`][Physics2DTestMotionResult], which contains additional information about the collision (should there be one).\n# Default Arguments\n* `infinite_inertia` - `true`\n* `margin` - `0.08`\n* `result` - `null`"] # [doc = ""] # [inline] pub fn test_motion (& self , motion : Vector2 , infinite_inertia : bool , margin : f64 , result : impl AsArg < crate :: generated :: Physics2DTestMotionResult >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RigidBody2DMethodTable :: get (get_api ()) . test_motion ; let ret = crate :: icalls :: icallvar__vec2_bool_f64_obj (method_bind , self . this . sys () . as_ptr () , motion , infinite_inertia as _ , margin as _ , result . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for RigidBody2D { } unsafe impl GodotObject for RigidBody2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RigidBody2D" } } impl QueueFree for RigidBody2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for RigidBody2D { type Target = crate :: generated :: PhysicsBody2D ; # [inline] fn deref (& self) -> & crate :: generated :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RigidBody2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PhysicsBody2D > for RigidBody2D { } unsafe impl SubClass < crate :: generated :: CollisionObject2D > for RigidBody2D { } unsafe impl SubClass < crate :: generated :: Node2D > for RigidBody2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for RigidBody2D { } unsafe impl SubClass < crate :: generated :: Node > for RigidBody2D { } unsafe impl SubClass < crate :: generated :: Object > for RigidBody2D { } impl Instanciable for RigidBody2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RigidBody2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RigidBody2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_central_force : * mut sys :: godot_method_bind , pub add_force : * mut sys :: godot_method_bind , pub add_torque : * mut sys :: godot_method_bind , pub apply_central_impulse : * mut sys :: godot_method_bind , pub apply_impulse : * mut sys :: godot_method_bind , pub apply_torque_impulse : * mut sys :: godot_method_bind , pub get_angular_damp : * mut sys :: godot_method_bind , pub get_angular_velocity : * mut sys :: godot_method_bind , pub get_applied_force : * mut sys :: godot_method_bind , pub get_applied_torque : * mut sys :: godot_method_bind , pub get_bounce : * mut sys :: godot_method_bind , pub get_colliding_bodies : * mut sys :: godot_method_bind , pub get_continuous_collision_detection_mode : * mut sys :: godot_method_bind , pub get_friction : * mut sys :: godot_method_bind , pub get_gravity_scale : * mut sys :: godot_method_bind , pub get_inertia : * mut sys :: godot_method_bind , pub get_linear_damp : * mut sys :: godot_method_bind , pub get_linear_velocity : * mut sys :: godot_method_bind , pub get_mass : * mut sys :: godot_method_bind , pub get_max_contacts_reported : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub get_physics_material_override : * mut sys :: godot_method_bind , pub get_weight : * mut sys :: godot_method_bind , pub is_able_to_sleep : * mut sys :: godot_method_bind , pub is_contact_monitor_enabled : * mut sys :: godot_method_bind , pub is_sleeping : * mut sys :: godot_method_bind , pub is_using_custom_integrator : * mut sys :: godot_method_bind , pub set_angular_damp : * mut sys :: godot_method_bind , pub set_angular_velocity : * mut sys :: godot_method_bind , pub set_applied_force : * mut sys :: godot_method_bind , pub set_applied_torque : * mut sys :: godot_method_bind , pub set_axis_velocity : * mut sys :: godot_method_bind , pub set_bounce : * mut sys :: godot_method_bind , pub set_can_sleep : * mut sys :: godot_method_bind , pub set_contact_monitor : * mut sys :: godot_method_bind , pub set_continuous_collision_detection_mode : * mut sys :: godot_method_bind , pub set_friction : * mut sys :: godot_method_bind , pub set_gravity_scale : * mut sys :: godot_method_bind , pub set_inertia : * mut sys :: godot_method_bind , pub set_linear_damp : * mut sys :: godot_method_bind , pub set_linear_velocity : * mut sys :: godot_method_bind , pub set_mass : * mut sys :: godot_method_bind , pub set_max_contacts_reported : * mut sys :: godot_method_bind , pub set_mode : * mut sys :: godot_method_bind , pub set_physics_material_override : * mut sys :: godot_method_bind , pub set_sleeping : * mut sys :: godot_method_bind , pub set_use_custom_integrator : * mut sys :: godot_method_bind , pub set_weight : * mut sys :: godot_method_bind , pub test_motion : * mut sys :: godot_method_bind } impl RigidBody2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RigidBody2DMethodTable = RigidBody2DMethodTable { class_constructor : None , add_central_force : 0 as * mut sys :: godot_method_bind , add_force : 0 as * mut sys :: godot_method_bind , add_torque : 0 as * mut sys :: godot_method_bind , apply_central_impulse : 0 as * mut sys :: godot_method_bind , apply_impulse : 0 as * mut sys :: godot_method_bind , apply_torque_impulse : 0 as * mut sys :: godot_method_bind , get_angular_damp : 0 as * mut sys :: godot_method_bind , get_angular_velocity : 0 as * mut sys :: godot_method_bind , get_applied_force : 0 as * mut sys :: godot_method_bind , get_applied_torque : 0 as * mut sys :: godot_method_bind , get_bounce : 0 as * mut sys :: godot_method_bind , get_colliding_bodies : 0 as * mut sys :: godot_method_bind , get_continuous_collision_detection_mode : 0 as * mut sys :: godot_method_bind , get_friction : 0 as * mut sys :: godot_method_bind , get_gravity_scale : 0 as * mut sys :: godot_method_bind , get_inertia : 0 as * mut sys :: godot_method_bind , get_linear_damp : 0 as * mut sys :: godot_method_bind , get_linear_velocity : 0 as * mut sys :: godot_method_bind , get_mass : 0 as * mut sys :: godot_method_bind , get_max_contacts_reported : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , get_physics_material_override : 0 as * mut sys :: godot_method_bind , get_weight : 0 as * mut sys :: godot_method_bind , is_able_to_sleep : 0 as * mut sys :: godot_method_bind , is_contact_monitor_enabled : 0 as * mut sys :: godot_method_bind , is_sleeping : 0 as * mut sys :: godot_method_bind , is_using_custom_integrator : 0 as * mut sys :: godot_method_bind , set_angular_damp : 0 as * mut sys :: godot_method_bind , set_angular_velocity : 0 as * mut sys :: godot_method_bind , set_applied_force : 0 as * mut sys :: godot_method_bind , set_applied_torque : 0 as * mut sys :: godot_method_bind , set_axis_velocity : 0 as * mut sys :: godot_method_bind , set_bounce : 0 as * mut sys :: godot_method_bind , set_can_sleep : 0 as * mut sys :: godot_method_bind , set_contact_monitor : 0 as * mut sys :: godot_method_bind , set_continuous_collision_detection_mode : 0 as * mut sys :: godot_method_bind , set_friction : 0 as * mut sys :: godot_method_bind , set_gravity_scale : 0 as * mut sys :: godot_method_bind , set_inertia : 0 as * mut sys :: godot_method_bind , set_linear_damp : 0 as * mut sys :: godot_method_bind , set_linear_velocity : 0 as * mut sys :: godot_method_bind , set_mass : 0 as * mut sys :: godot_method_bind , set_max_contacts_reported : 0 as * mut sys :: godot_method_bind , set_mode : 0 as * mut sys :: godot_method_bind , set_physics_material_override : 0 as * mut sys :: godot_method_bind , set_sleeping : 0 as * mut sys :: godot_method_bind , set_use_custom_integrator : 0 as * mut sys :: godot_method_bind , set_weight : 0 as * mut sys :: godot_method_bind , test_motion : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RigidBody2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RigidBody2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_central_force = (gd_api . godot_method_bind_get_method) (class_name , "add_central_force\0" . as_ptr () as * const c_char) ; table . add_force = (gd_api . godot_method_bind_get_method) (class_name , "add_force\0" . as_ptr () as * const c_char) ; table . add_torque = (gd_api . godot_method_bind_get_method) (class_name , "add_torque\0" . as_ptr () as * const c_char) ; table . apply_central_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_central_impulse\0" . as_ptr () as * const c_char) ; table . apply_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_impulse\0" . as_ptr () as * const c_char) ; table . apply_torque_impulse = (gd_api . godot_method_bind_get_method) (class_name , "apply_torque_impulse\0" . as_ptr () as * const c_char) ; table . get_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_damp\0" . as_ptr () as * const c_char) ; table . get_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_angular_velocity\0" . as_ptr () as * const c_char) ; table . get_applied_force = (gd_api . godot_method_bind_get_method) (class_name , "get_applied_force\0" . as_ptr () as * const c_char) ; table . get_applied_torque = (gd_api . godot_method_bind_get_method) (class_name , "get_applied_torque\0" . as_ptr () as * const c_char) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\0" . as_ptr () as * const c_char) ; table . get_colliding_bodies = (gd_api . godot_method_bind_get_method) (class_name , "get_colliding_bodies\0" . as_ptr () as * const c_char) ; table . get_continuous_collision_detection_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_continuous_collision_detection_mode\0" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\0" . as_ptr () as * const c_char) ; table . get_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_gravity_scale\0" . as_ptr () as * const c_char) ; table . get_inertia = (gd_api . godot_method_bind_get_method) (class_name , "get_inertia\0" . as_ptr () as * const c_char) ; table . get_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_damp\0" . as_ptr () as * const c_char) ; table . get_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_velocity\0" . as_ptr () as * const c_char) ; table . get_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_mass\0" . as_ptr () as * const c_char) ; table . get_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "get_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_material_override\0" . as_ptr () as * const c_char) ; table . get_weight = (gd_api . godot_method_bind_get_method) (class_name , "get_weight\0" . as_ptr () as * const c_char) ; table . is_able_to_sleep = (gd_api . godot_method_bind_get_method) (class_name , "is_able_to_sleep\0" . as_ptr () as * const c_char) ; table . is_contact_monitor_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_contact_monitor_enabled\0" . as_ptr () as * const c_char) ; table . is_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "is_sleeping\0" . as_ptr () as * const c_char) ; table . is_using_custom_integrator = (gd_api . godot_method_bind_get_method) (class_name , "is_using_custom_integrator\0" . as_ptr () as * const c_char) ; table . set_angular_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_damp\0" . as_ptr () as * const c_char) ; table . set_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_angular_velocity\0" . as_ptr () as * const c_char) ; table . set_applied_force = (gd_api . godot_method_bind_get_method) (class_name , "set_applied_force\0" . as_ptr () as * const c_char) ; table . set_applied_torque = (gd_api . godot_method_bind_get_method) (class_name , "set_applied_torque\0" . as_ptr () as * const c_char) ; table . set_axis_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_axis_velocity\0" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\0" . as_ptr () as * const c_char) ; table . set_can_sleep = (gd_api . godot_method_bind_get_method) (class_name , "set_can_sleep\0" . as_ptr () as * const c_char) ; table . set_contact_monitor = (gd_api . godot_method_bind_get_method) (class_name , "set_contact_monitor\0" . as_ptr () as * const c_char) ; table . set_continuous_collision_detection_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_continuous_collision_detection_mode\0" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\0" . as_ptr () as * const c_char) ; table . set_gravity_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_gravity_scale\0" . as_ptr () as * const c_char) ; table . set_inertia = (gd_api . godot_method_bind_get_method) (class_name , "set_inertia\0" . as_ptr () as * const c_char) ; table . set_linear_damp = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_damp\0" . as_ptr () as * const c_char) ; table . set_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_velocity\0" . as_ptr () as * const c_char) ; table . set_mass = (gd_api . godot_method_bind_get_method) (class_name , "set_mass\0" . as_ptr () as * const c_char) ; table . set_max_contacts_reported = (gd_api . godot_method_bind_get_method) (class_name , "set_max_contacts_reported\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_material_override\0" . as_ptr () as * const c_char) ; table . set_sleeping = (gd_api . godot_method_bind_get_method) (class_name , "set_sleeping\0" . as_ptr () as * const c_char) ; table . set_use_custom_integrator = (gd_api . godot_method_bind_get_method) (class_name , "set_use_custom_integrator\0" . as_ptr () as * const c_char) ; table . set_weight = (gd_api . godot_method_bind_get_method) (class_name , "set_weight\0" . as_ptr () as * const c_char) ; table . test_motion = (gd_api . godot_method_bind_get_method) (class_name , "test_motion\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::rigid_body_2d::private::RigidBody2D;
            
            pub(crate) mod room {
                # ! [doc = "This module contains types related to the API class [`Room`][super::Room]."] pub (crate) mod private { # [doc = "`core class Room` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_room.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Room` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Room>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRoom inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Room { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Room ; impl Room { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RoomMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `points` are set, the [`Room`][Room] bounding convex hull will be built from these points. If no points are set, the room bound will either be derived from a manual bound ([`MeshInstance`][MeshInstance] with name prefix `Bound_`), or from the geometry within the room.\nNote that you can use the `Generate Points` editor button to get started. This will use either the geometry or manual bound to generate the room hull, and save the resulting points, allowing you to edit them to further refine the bound."] # [doc = ""] # [inline] pub fn points (& self) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomMethodTable :: get (get_api ()) . get_points ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The `simplify` value determines to what degree room hulls (bounds) are simplified, by removing similar planes. A value of 0 gives no simplification, 1 gives maximum simplification."] # [doc = ""] # [inline] pub fn room_simplify (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomMethodTable :: get (get_api ()) . get_room_simplify ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The room hull simplification can either use the default value set in the [`RoomManager`][RoomManager], or override this and use the per room setting."] # [doc = ""] # [inline] pub fn use_default_simplify (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomMethodTable :: get (get_api ()) . get_use_default_simplify ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets individual points. Primarily for use by the editor."] # [doc = ""] # [inline] pub fn set_point (& self , index : i64 , position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomMethodTable :: get (get_api ()) . set_point ; let ret = crate :: icalls :: icallvar__i64_vec3 (method_bind , self . this . sys () . as_ptr () , index as _ , position) ; } } # [doc = "If `points` are set, the [`Room`][Room] bounding convex hull will be built from these points. If no points are set, the room bound will either be derived from a manual bound ([`MeshInstance`][MeshInstance] with name prefix `Bound_`), or from the geometry within the room.\nNote that you can use the `Generate Points` editor button to get started. This will use either the geometry or manual bound to generate the room hull, and save the resulting points, allowing you to edit them to further refine the bound."] # [doc = ""] # [inline] pub fn set_points (& self , points : PoolArray < Vector3 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomMethodTable :: get (get_api ()) . set_points ; let ret = crate :: icalls :: icallvar__vec3arr (method_bind , self . this . sys () . as_ptr () , points) ; } } # [doc = "The `simplify` value determines to what degree room hulls (bounds) are simplified, by removing similar planes. A value of 0 gives no simplification, 1 gives maximum simplification."] # [doc = ""] # [inline] pub fn set_room_simplify (& self , p_value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomMethodTable :: get (get_api ()) . set_room_simplify ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , p_value as _) ; } } # [doc = "The room hull simplification can either use the default value set in the [`RoomManager`][RoomManager], or override this and use the per room setting."] # [doc = ""] # [inline] pub fn set_use_default_simplify (& self , p_use : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomMethodTable :: get (get_api ()) . set_use_default_simplify ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , p_use as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Room { } unsafe impl GodotObject for Room { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Room" } } impl QueueFree for Room { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Room { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Room { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for Room { } unsafe impl SubClass < crate :: generated :: Node > for Room { } unsafe impl SubClass < crate :: generated :: Object > for Room { } impl Instanciable for Room { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Room :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RoomMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_points : * mut sys :: godot_method_bind , pub get_room_simplify : * mut sys :: godot_method_bind , pub get_use_default_simplify : * mut sys :: godot_method_bind , pub set_point : * mut sys :: godot_method_bind , pub set_points : * mut sys :: godot_method_bind , pub set_room_simplify : * mut sys :: godot_method_bind , pub set_use_default_simplify : * mut sys :: godot_method_bind } impl RoomMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RoomMethodTable = RoomMethodTable { class_constructor : None , get_points : 0 as * mut sys :: godot_method_bind , get_room_simplify : 0 as * mut sys :: godot_method_bind , get_use_default_simplify : 0 as * mut sys :: godot_method_bind , set_point : 0 as * mut sys :: godot_method_bind , set_points : 0 as * mut sys :: godot_method_bind , set_room_simplify : 0 as * mut sys :: godot_method_bind , set_use_default_simplify : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RoomMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Room\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_points = (gd_api . godot_method_bind_get_method) (class_name , "get_points\0" . as_ptr () as * const c_char) ; table . get_room_simplify = (gd_api . godot_method_bind_get_method) (class_name , "get_room_simplify\0" . as_ptr () as * const c_char) ; table . get_use_default_simplify = (gd_api . godot_method_bind_get_method) (class_name , "get_use_default_simplify\0" . as_ptr () as * const c_char) ; table . set_point = (gd_api . godot_method_bind_get_method) (class_name , "set_point\0" . as_ptr () as * const c_char) ; table . set_points = (gd_api . godot_method_bind_get_method) (class_name , "set_points\0" . as_ptr () as * const c_char) ; table . set_room_simplify = (gd_api . godot_method_bind_get_method) (class_name , "set_room_simplify\0" . as_ptr () as * const c_char) ; table . set_use_default_simplify = (gd_api . godot_method_bind_get_method) (class_name , "set_use_default_simplify\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::room::private::Room;
            
            pub(crate) mod room_group {
                # ! [doc = "This module contains types related to the API class [`RoomGroup`][super::RoomGroup]."] pub (crate) mod private { # [doc = "`core class RoomGroup` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_roomgroup.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`RoomGroup` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<RoomGroup>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRoomGroup inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RoomGroup { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RoomGroup ; impl RoomGroup { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RoomGroupMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "This priority will be applied to [`Room`][Room]s within the group. The [`Room`][Room] priority allows the use of **internal rooms**, rooms _within_ another room or rooms.\nWhen the [`Camera`][Camera] is within more than one room (regular and internal), the higher priority room will take precedence. So with for example, a house inside a terrain 'room', you would make the house higher priority, so that when the camera is within the house, the house is used as the source room, but outside the house, the terrain room would be used instead."] # [doc = ""] # [inline] pub fn roomgroup_priority (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomGroupMethodTable :: get (get_api ()) . get_roomgroup_priority ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "This priority will be applied to [`Room`][Room]s within the group. The [`Room`][Room] priority allows the use of **internal rooms**, rooms _within_ another room or rooms.\nWhen the [`Camera`][Camera] is within more than one room (regular and internal), the higher priority room will take precedence. So with for example, a house inside a terrain 'room', you would make the house higher priority, so that when the camera is within the house, the house is used as the source room, but outside the house, the terrain room would be used instead."] # [doc = ""] # [inline] pub fn set_roomgroup_priority (& self , p_priority : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomGroupMethodTable :: get (get_api ()) . set_roomgroup_priority ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , p_priority as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RoomGroup { } unsafe impl GodotObject for RoomGroup { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RoomGroup" } } impl QueueFree for RoomGroup { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for RoomGroup { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RoomGroup { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for RoomGroup { } unsafe impl SubClass < crate :: generated :: Node > for RoomGroup { } unsafe impl SubClass < crate :: generated :: Object > for RoomGroup { } impl Instanciable for RoomGroup { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RoomGroup :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RoomGroupMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_roomgroup_priority : * mut sys :: godot_method_bind , pub set_roomgroup_priority : * mut sys :: godot_method_bind } impl RoomGroupMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RoomGroupMethodTable = RoomGroupMethodTable { class_constructor : None , get_roomgroup_priority : 0 as * mut sys :: godot_method_bind , set_roomgroup_priority : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RoomGroupMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RoomGroup\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_roomgroup_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_roomgroup_priority\0" . as_ptr () as * const c_char) ; table . set_roomgroup_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_roomgroup_priority\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::room_group::private::RoomGroup;
            
            pub mod room_manager {
                # ! [doc = "This module contains types related to the API class [`RoomManager`][super::RoomManager]."] pub (crate) mod private { # [doc = "`core class RoomManager` inherits `Spatial` (manually managed).\n\nThis class has related types in the [`room_manager`][super::room_manager] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_roommanager.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`RoomManager` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<RoomManager>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nRoomManager inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RoomManager { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RoomManager ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PvsMode (pub i64) ; impl PvsMode { pub const DISABLED : PvsMode = PvsMode (0i64) ; pub const PARTIAL : PvsMode = PvsMode (1i64) ; pub const FULL : PvsMode = PvsMode (2i64) ; } impl From < i64 > for PvsMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PvsMode > for i64 { # [inline] fn from (v : PvsMode) -> Self { v . 0 } } impl FromVariant for PvsMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl RoomManager { pub const PVS_MODE_DISABLED : i64 = 0i64 ; pub const PVS_MODE_PARTIAL : i64 = 1i64 ; pub const PVS_MODE_FULL : i64 = 2i64 ; } impl RoomManager { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = RoomManagerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Large objects can 'sprawl' over (be present in) more than one room. It can be useful to visualize which objects are sprawling outside the current room.\nToggling this setting turns this debug view on and off."] # [doc = ""] # [inline] pub fn debug_sprawl (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . get_debug_sprawl ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Usually we don't want objects that only **just** cross a boundary into an adjacent [`Room`][Room] to sprawl into that room. To prevent this, each [`Portal`][Portal] has an extra margin, or tolerance zone where objects can enter without sprawling to a neighbouring room.\nIn most cases you can set this here for all portals. It is possible to override the margin for each portal."] # [doc = ""] # [inline] pub fn default_portal_margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . get_default_portal_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "When using a partial or full PVS, the gameplay monitor allows you to receive callbacks when roaming objects or rooms enter or exit the **gameplay area**. The gameplay area is defined as either the primary, or secondary PVS.\nThese callbacks allow you to, for example, reduce processing for objects that are far from the player, or turn on and off AI.\nYou can either choose to receive callbacks as notifications through the `_notification` function, or as signals.\n`NOTIFICATION_ENTER_GAMEPLAY`\n`NOTIFICATION_EXIT_GAMEPLAY`\nSignals: `\"gameplay_entered\"`, `\"gameplay_exited\"`"] # [doc = ""] # [inline] pub fn gameplay_monitor_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . get_gameplay_monitor_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If enabled, the system will attempt to merge similar meshes (particularly in terms of materials) within [`Room`][Room]s during conversion. This can significantly reduce the number of drawcalls and state changes required during rendering, albeit at a cost of reduced culling granularity.\n**Note:** This operates at runtime during the conversion process, and will only operate on exported or running projects, in order to prevent accidental alteration to the scene and loss of data."] # [doc = ""] # [inline] pub fn merge_meshes (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . get_merge_meshes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "When converting rooms, the editor will warn you if overlap is detected between rooms. Overlap can interfere with determining the room that cameras and objects are within. A small amount can be acceptable, depending on your level. Here you can alter the threshold at which the editor warning appears. There are no other side effects."] # [doc = ""] # [inline] pub fn overlap_warning_threshold (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . get_overlap_warning_threshold ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Portal rendering is recursive - each time a portal is seen through an earlier portal there is some cost. For this reason, and to prevent the possibility of infinite loops, this setting provides a hard limit on the recursion depth.\n**Note:** This value is unused when using `Full` PVS mode."] # [doc = ""] # [inline] pub fn portal_depth_limit (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . get_portal_depth_limit ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Portal culling normally operates using the current [`Camera`][Camera] / [`Camera`][Camera]s, however for debugging purposes within the editor, you can use this setting to override this behavior and force it to use a particular camera to get a better idea of what the occlusion culling is doing."] # [doc = ""] # [inline] pub fn preview_camera_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . get_preview_camera_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Optionally during conversion the potentially visible set (PVS) of rooms that are potentially visible from each room can be calculated. This can be used either to aid in dynamic portal culling, or to totally replace portal culling.\nIn `Full` PVS Mode, all objects within the potentially visible rooms will be frustum culled, and rendered if they are within the view frustum."] # [doc = ""] # [inline] pub fn pvs_mode (& self) -> crate :: generated :: room_manager :: PvsMode { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . get_pvs_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: room_manager :: PvsMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "In order to reduce processing for roaming objects, an expansion is applied to their AABB as they move. This expanded volume is used to calculate which rooms the roaming object is within. If the object's exact AABB is still within this expanded volume on the next move, there is no need to reprocess the object, which can save considerable CPU.\nThe downside is that if the expansion is too much, the object may end up unexpectedly sprawling into neighbouring rooms and showing up where it might otherwise be culled.\nIn order to balance roaming performance against culling accuracy, this expansion margin can be customized by the user. It will typically depend on your room and object sizes, and movement speeds. The default value should work reasonably in most circumstances."] # [doc = ""] # [inline] pub fn roaming_expansion_margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . get_roaming_expansion_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "During the conversion process, the geometry of objects within [`Room`][Room]s, or a custom specified manual bound, are used to generate a **convex hull bound**.\nThis convex hull is **required** in the visibility system, and is used for many purposes. Most importantly, it is used to decide whether the [`Camera`][Camera] (or an object) is within a [`Room`][Room]. The convex hull generating algorithm is good, but occasionally it can create too many (or too few) planes to give a good representation of the room volume.\nThe `room_simplify` value can be used to gain fine control over this process. It determines how similar planes can be for them to be considered the same (and duplicates removed). The value can be set between 0 (no simplification) and 1 (maximum simplification).\nThe value set here is the default for all rooms, but individual rooms can override this value if desired.\nThe room convex hulls are shown as a wireframe in the editor."] # [doc = ""] # [inline] pub fn room_simplify (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . get_room_simplify ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "For the [`Room`][Room] conversion process to succeed, you must point the [`RoomManager`][RoomManager] to the parent [`Node`][Node] of your [`Room`][Room]s and [`RoomGroup`][RoomGroup]s, which we refer to as the `roomlist` (the roomlist is not a special node type, it is normally just a [`Spatial`][Spatial])."] # [doc = ""] # [inline] pub fn roomlist_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . get_roomlist_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Shows the [`Portal`][Portal] margins when the portal gizmo is used in the editor."] # [doc = ""] # [inline] pub fn show_margins (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . get_show_margins ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "When receiving gameplay callbacks when objects enter and exit gameplay, the **gameplay area** can be defined by either the primary PVS (potentially visible set) of [`Room`][Room]s, or the secondary PVS (the primary PVS and their neighbouring [`Room`][Room]s).\nSometimes using the larger gameplay area of the secondary PVS may be preferable."] # [doc = ""] # [inline] pub fn use_secondary_pvs (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . get_use_secondary_pvs ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "This function clears all converted data from the **room graph**. Use this before unloading a level, when transitioning from level to level, or returning to a main menu."] # [doc = ""] # [inline] pub fn rooms_clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . rooms_clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "This is the most important function in the whole portal culling system. Without it, the system cannot function.\nFirst it goes through every [`Room`][Room] that is a child of the `room list` node (and [`RoomGroup`][RoomGroup]s within) and converts and adds it to the `room graph`.\nThis works for both [`Room`][Room] nodes, and [`Spatial`][Spatial] nodes that follow a special naming convention. They should begin with the prefix _'Room_'_, followed by the name you wish to give the room, e.g. _'Room_lounge'_. This will automatically convert such [`Spatial`][Spatial]s to [`Room`][Room] nodes for you. This is useful if you want to build you entire room system in e.g. Blender, and reimport multiple times as you work on the level.\nThe conversion will try to assign [`VisualInstance`][VisualInstance]s that are children and grandchildren of the [`Room`][Room] to the room. These should be given a suitable `portal mode` (see the [`CullInstance`][CullInstance] documentation). The default `portal mode` is `STATIC` - objects which are not expected to move while the level is played, which will typically be most objects.\nThe conversion will usually use the geometry of these [`VisualInstance`][VisualInstance]s (and the [`Portal`][Portal]s) to calculate a convex hull bound for the room. These bounds will be shown in the editor with a wireframe. Alternatively you can specify a manual custom bound for any room, see the [`Room`][Room] documentation.\nBy definition, [`Camera`][Camera]s within a room can see everything else within the room (that is one advantage to using convex hulls). However, in order to see from one room into adjacent rooms, you must place [`Portal`][Portal]s, which represent openings that the camera can see through, like windows and doors.\n[`Portal`][Portal]s are really just specialized [`MeshInstance`][MeshInstance]s. In fact you will usually first create a portal by creating a [`MeshInstance`][MeshInstance], especially a `plane` mesh instance. You would move the plane in the editor to cover a window or doorway, with the front face pointing outward from the room. To let the conversion process know you want this mesh to be a portal, again we use a special naming convention. [`MeshInstance`][MeshInstance]s to be converted to a [`Portal`][Portal] should start with the prefix _'Portal_'_.\nYou now have a choice - you can leave the name as _'Portal_'_ and allow the system to automatically detect the nearest [`Room`][Room] to link. In most cases this will work fine.\nAn alternative method is to specify the [`Room`][Room] to link to manually, appending a suffix to the portal name, which should be the name of the room you intend to link to. For example _'Portal_lounge'_ will attempt to link to the room named _'Room_lounge'_.\nThere is a special case here - Godot does not allow two nodes to share the same name. What if you want to manually have more than one portal leading into the same room? Surely they will need to both be called, e.g. _'Portal_lounge'_?\nThe solution is a wildcard character. After the room name, if you use the character _'*'_, this character and anything following it will be ignored. So you can use for example _'Portal_lounge*0'_, _'Portal_lounge*1'_ etc.\nNote that [`Portal`][Portal]s that have already been converted to [`Portal`][Portal] nodes (rather than [`MeshInstance`][MeshInstance]s) still need to follow the same naming convention, as they will be relinked each time during conversion.\nIt is recommended that you only place objects in rooms that are desired to stay within those rooms - i.e. `portal mode`s `STATIC` or `DYNAMIC` (not crossing portals). `GLOBAL` and `ROAMING` objects are best placed in another part of the scene tree, to avoid confusion. See [`CullInstance`][CullInstance] for a full description of portal modes."] # [doc = ""] # [inline] pub fn rooms_convert (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . rooms_convert ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Switches the portal culling system on and off.\nIt is important to note that when portal culling is active, it is responsible for **all** the 3d culling. Some editor visual debugging helpers may not be available when active, so switching the active flag is intended to be used to ensure your [`Room`][Room] / [`Portal`][Portal] layout works within the editor.\nSwitching to `active` will have no effect when the `room graph` is unloaded (the rooms have not yet been converted).\n**Note:** For efficiency, the portal system is designed to work with only the core visual object types. In particular, only nodes derived from [`VisualInstance`][VisualInstance] are expected to show when the system is active."] # [doc = ""] # [inline] pub fn rooms_get_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . rooms_get_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Switches the portal culling system on and off.\nIt is important to note that when portal culling is active, it is responsible for **all** the 3d culling. Some editor visual debugging helpers may not be available when active, so switching the active flag is intended to be used to ensure your [`Room`][Room] / [`Portal`][Portal] layout works within the editor.\nSwitching to `active` will have no effect when the `room graph` is unloaded (the rooms have not yet been converted).\n**Note:** For efficiency, the portal system is designed to work with only the core visual object types. In particular, only nodes derived from [`VisualInstance`][VisualInstance] are expected to show when the system is active."] # [doc = ""] # [inline] pub fn rooms_set_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . rooms_set_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , active as _) ; } } # [doc = "Large objects can 'sprawl' over (be present in) more than one room. It can be useful to visualize which objects are sprawling outside the current room.\nToggling this setting turns this debug view on and off."] # [doc = ""] # [inline] pub fn set_debug_sprawl (& self , debug_sprawl : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . set_debug_sprawl ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , debug_sprawl as _) ; } } # [doc = "Usually we don't want objects that only **just** cross a boundary into an adjacent [`Room`][Room] to sprawl into that room. To prevent this, each [`Portal`][Portal] has an extra margin, or tolerance zone where objects can enter without sprawling to a neighbouring room.\nIn most cases you can set this here for all portals. It is possible to override the margin for each portal."] # [doc = ""] # [inline] pub fn set_default_portal_margin (& self , default_portal_margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . set_default_portal_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , default_portal_margin as _) ; } } # [doc = "When using a partial or full PVS, the gameplay monitor allows you to receive callbacks when roaming objects or rooms enter or exit the **gameplay area**. The gameplay area is defined as either the primary, or secondary PVS.\nThese callbacks allow you to, for example, reduce processing for objects that are far from the player, or turn on and off AI.\nYou can either choose to receive callbacks as notifications through the `_notification` function, or as signals.\n`NOTIFICATION_ENTER_GAMEPLAY`\n`NOTIFICATION_EXIT_GAMEPLAY`\nSignals: `\"gameplay_entered\"`, `\"gameplay_exited\"`"] # [doc = ""] # [inline] pub fn set_gameplay_monitor_enabled (& self , gameplay_monitor : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . set_gameplay_monitor_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , gameplay_monitor as _) ; } } # [doc = "If enabled, the system will attempt to merge similar meshes (particularly in terms of materials) within [`Room`][Room]s during conversion. This can significantly reduce the number of drawcalls and state changes required during rendering, albeit at a cost of reduced culling granularity.\n**Note:** This operates at runtime during the conversion process, and will only operate on exported or running projects, in order to prevent accidental alteration to the scene and loss of data."] # [doc = ""] # [inline] pub fn set_merge_meshes (& self , merge_meshes : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . set_merge_meshes ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , merge_meshes as _) ; } } # [doc = "When converting rooms, the editor will warn you if overlap is detected between rooms. Overlap can interfere with determining the room that cameras and objects are within. A small amount can be acceptable, depending on your level. Here you can alter the threshold at which the editor warning appears. There are no other side effects."] # [doc = ""] # [inline] pub fn set_overlap_warning_threshold (& self , overlap_warning_threshold : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . set_overlap_warning_threshold ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , overlap_warning_threshold as _) ; } } # [doc = "Portal rendering is recursive - each time a portal is seen through an earlier portal there is some cost. For this reason, and to prevent the possibility of infinite loops, this setting provides a hard limit on the recursion depth.\n**Note:** This value is unused when using `Full` PVS mode."] # [doc = ""] # [inline] pub fn set_portal_depth_limit (& self , portal_depth_limit : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . set_portal_depth_limit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , portal_depth_limit as _) ; } } # [doc = "Portal culling normally operates using the current [`Camera`][Camera] / [`Camera`][Camera]s, however for debugging purposes within the editor, you can use this setting to override this behavior and force it to use a particular camera to get a better idea of what the occlusion culling is doing."] # [doc = ""] # [inline] pub fn set_preview_camera_path (& self , preview_camera : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . set_preview_camera_path ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , preview_camera . into ()) ; } } # [doc = "Optionally during conversion the potentially visible set (PVS) of rooms that are potentially visible from each room can be calculated. This can be used either to aid in dynamic portal culling, or to totally replace portal culling.\nIn `Full` PVS Mode, all objects within the potentially visible rooms will be frustum culled, and rendered if they are within the view frustum."] # [doc = ""] # [inline] pub fn set_pvs_mode (& self , pvs_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . set_pvs_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , pvs_mode as _) ; } } # [doc = "In order to reduce processing for roaming objects, an expansion is applied to their AABB as they move. This expanded volume is used to calculate which rooms the roaming object is within. If the object's exact AABB is still within this expanded volume on the next move, there is no need to reprocess the object, which can save considerable CPU.\nThe downside is that if the expansion is too much, the object may end up unexpectedly sprawling into neighbouring rooms and showing up where it might otherwise be culled.\nIn order to balance roaming performance against culling accuracy, this expansion margin can be customized by the user. It will typically depend on your room and object sizes, and movement speeds. The default value should work reasonably in most circumstances."] # [doc = ""] # [inline] pub fn set_roaming_expansion_margin (& self , roaming_expansion_margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . set_roaming_expansion_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , roaming_expansion_margin as _) ; } } # [doc = "During the conversion process, the geometry of objects within [`Room`][Room]s, or a custom specified manual bound, are used to generate a **convex hull bound**.\nThis convex hull is **required** in the visibility system, and is used for many purposes. Most importantly, it is used to decide whether the [`Camera`][Camera] (or an object) is within a [`Room`][Room]. The convex hull generating algorithm is good, but occasionally it can create too many (or too few) planes to give a good representation of the room volume.\nThe `room_simplify` value can be used to gain fine control over this process. It determines how similar planes can be for them to be considered the same (and duplicates removed). The value can be set between 0 (no simplification) and 1 (maximum simplification).\nThe value set here is the default for all rooms, but individual rooms can override this value if desired.\nThe room convex hulls are shown as a wireframe in the editor."] # [doc = ""] # [inline] pub fn set_room_simplify (& self , room_simplify : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . set_room_simplify ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , room_simplify as _) ; } } # [doc = "For the [`Room`][Room] conversion process to succeed, you must point the [`RoomManager`][RoomManager] to the parent [`Node`][Node] of your [`Room`][Room]s and [`RoomGroup`][RoomGroup]s, which we refer to as the `roomlist` (the roomlist is not a special node type, it is normally just a [`Spatial`][Spatial])."] # [doc = ""] # [inline] pub fn set_roomlist_path (& self , p_path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . set_roomlist_path ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , p_path . into ()) ; } } # [doc = "Shows the [`Portal`][Portal] margins when the portal gizmo is used in the editor."] # [doc = ""] # [inline] pub fn set_show_margins (& self , show_margins : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . set_show_margins ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , show_margins as _) ; } } # [doc = "When receiving gameplay callbacks when objects enter and exit gameplay, the **gameplay area** can be defined by either the primary PVS (potentially visible set) of [`Room`][Room]s, or the secondary PVS (the primary PVS and their neighbouring [`Room`][Room]s).\nSometimes using the larger gameplay area of the secondary PVS may be preferable."] # [doc = ""] # [inline] pub fn set_use_secondary_pvs (& self , use_secondary_pvs : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = RoomManagerMethodTable :: get (get_api ()) . set_use_secondary_pvs ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , use_secondary_pvs as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for RoomManager { } unsafe impl GodotObject for RoomManager { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RoomManager" } } impl QueueFree for RoomManager { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for RoomManager { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RoomManager { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for RoomManager { } unsafe impl SubClass < crate :: generated :: Node > for RoomManager { } unsafe impl SubClass < crate :: generated :: Object > for RoomManager { } impl Instanciable for RoomManager { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { RoomManager :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct RoomManagerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_debug_sprawl : * mut sys :: godot_method_bind , pub get_default_portal_margin : * mut sys :: godot_method_bind , pub get_gameplay_monitor_enabled : * mut sys :: godot_method_bind , pub get_merge_meshes : * mut sys :: godot_method_bind , pub get_overlap_warning_threshold : * mut sys :: godot_method_bind , pub get_portal_depth_limit : * mut sys :: godot_method_bind , pub get_preview_camera_path : * mut sys :: godot_method_bind , pub get_pvs_mode : * mut sys :: godot_method_bind , pub get_roaming_expansion_margin : * mut sys :: godot_method_bind , pub get_room_simplify : * mut sys :: godot_method_bind , pub get_roomlist_path : * mut sys :: godot_method_bind , pub get_show_margins : * mut sys :: godot_method_bind , pub get_use_secondary_pvs : * mut sys :: godot_method_bind , pub rooms_clear : * mut sys :: godot_method_bind , pub rooms_convert : * mut sys :: godot_method_bind , pub rooms_get_active : * mut sys :: godot_method_bind , pub rooms_set_active : * mut sys :: godot_method_bind , pub set_debug_sprawl : * mut sys :: godot_method_bind , pub set_default_portal_margin : * mut sys :: godot_method_bind , pub set_gameplay_monitor_enabled : * mut sys :: godot_method_bind , pub set_merge_meshes : * mut sys :: godot_method_bind , pub set_overlap_warning_threshold : * mut sys :: godot_method_bind , pub set_portal_depth_limit : * mut sys :: godot_method_bind , pub set_preview_camera_path : * mut sys :: godot_method_bind , pub set_pvs_mode : * mut sys :: godot_method_bind , pub set_roaming_expansion_margin : * mut sys :: godot_method_bind , pub set_room_simplify : * mut sys :: godot_method_bind , pub set_roomlist_path : * mut sys :: godot_method_bind , pub set_show_margins : * mut sys :: godot_method_bind , pub set_use_secondary_pvs : * mut sys :: godot_method_bind } impl RoomManagerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : RoomManagerMethodTable = RoomManagerMethodTable { class_constructor : None , get_debug_sprawl : 0 as * mut sys :: godot_method_bind , get_default_portal_margin : 0 as * mut sys :: godot_method_bind , get_gameplay_monitor_enabled : 0 as * mut sys :: godot_method_bind , get_merge_meshes : 0 as * mut sys :: godot_method_bind , get_overlap_warning_threshold : 0 as * mut sys :: godot_method_bind , get_portal_depth_limit : 0 as * mut sys :: godot_method_bind , get_preview_camera_path : 0 as * mut sys :: godot_method_bind , get_pvs_mode : 0 as * mut sys :: godot_method_bind , get_roaming_expansion_margin : 0 as * mut sys :: godot_method_bind , get_room_simplify : 0 as * mut sys :: godot_method_bind , get_roomlist_path : 0 as * mut sys :: godot_method_bind , get_show_margins : 0 as * mut sys :: godot_method_bind , get_use_secondary_pvs : 0 as * mut sys :: godot_method_bind , rooms_clear : 0 as * mut sys :: godot_method_bind , rooms_convert : 0 as * mut sys :: godot_method_bind , rooms_get_active : 0 as * mut sys :: godot_method_bind , rooms_set_active : 0 as * mut sys :: godot_method_bind , set_debug_sprawl : 0 as * mut sys :: godot_method_bind , set_default_portal_margin : 0 as * mut sys :: godot_method_bind , set_gameplay_monitor_enabled : 0 as * mut sys :: godot_method_bind , set_merge_meshes : 0 as * mut sys :: godot_method_bind , set_overlap_warning_threshold : 0 as * mut sys :: godot_method_bind , set_portal_depth_limit : 0 as * mut sys :: godot_method_bind , set_preview_camera_path : 0 as * mut sys :: godot_method_bind , set_pvs_mode : 0 as * mut sys :: godot_method_bind , set_roaming_expansion_margin : 0 as * mut sys :: godot_method_bind , set_room_simplify : 0 as * mut sys :: godot_method_bind , set_roomlist_path : 0 as * mut sys :: godot_method_bind , set_show_margins : 0 as * mut sys :: godot_method_bind , set_use_secondary_pvs : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { RoomManagerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "RoomManager\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_debug_sprawl = (gd_api . godot_method_bind_get_method) (class_name , "get_debug_sprawl\0" . as_ptr () as * const c_char) ; table . get_default_portal_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_default_portal_margin\0" . as_ptr () as * const c_char) ; table . get_gameplay_monitor_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_gameplay_monitor_enabled\0" . as_ptr () as * const c_char) ; table . get_merge_meshes = (gd_api . godot_method_bind_get_method) (class_name , "get_merge_meshes\0" . as_ptr () as * const c_char) ; table . get_overlap_warning_threshold = (gd_api . godot_method_bind_get_method) (class_name , "get_overlap_warning_threshold\0" . as_ptr () as * const c_char) ; table . get_portal_depth_limit = (gd_api . godot_method_bind_get_method) (class_name , "get_portal_depth_limit\0" . as_ptr () as * const c_char) ; table . get_preview_camera_path = (gd_api . godot_method_bind_get_method) (class_name , "get_preview_camera_path\0" . as_ptr () as * const c_char) ; table . get_pvs_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_pvs_mode\0" . as_ptr () as * const c_char) ; table . get_roaming_expansion_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_roaming_expansion_margin\0" . as_ptr () as * const c_char) ; table . get_room_simplify = (gd_api . godot_method_bind_get_method) (class_name , "get_room_simplify\0" . as_ptr () as * const c_char) ; table . get_roomlist_path = (gd_api . godot_method_bind_get_method) (class_name , "get_roomlist_path\0" . as_ptr () as * const c_char) ; table . get_show_margins = (gd_api . godot_method_bind_get_method) (class_name , "get_show_margins\0" . as_ptr () as * const c_char) ; table . get_use_secondary_pvs = (gd_api . godot_method_bind_get_method) (class_name , "get_use_secondary_pvs\0" . as_ptr () as * const c_char) ; table . rooms_clear = (gd_api . godot_method_bind_get_method) (class_name , "rooms_clear\0" . as_ptr () as * const c_char) ; table . rooms_convert = (gd_api . godot_method_bind_get_method) (class_name , "rooms_convert\0" . as_ptr () as * const c_char) ; table . rooms_get_active = (gd_api . godot_method_bind_get_method) (class_name , "rooms_get_active\0" . as_ptr () as * const c_char) ; table . rooms_set_active = (gd_api . godot_method_bind_get_method) (class_name , "rooms_set_active\0" . as_ptr () as * const c_char) ; table . set_debug_sprawl = (gd_api . godot_method_bind_get_method) (class_name , "set_debug_sprawl\0" . as_ptr () as * const c_char) ; table . set_default_portal_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_default_portal_margin\0" . as_ptr () as * const c_char) ; table . set_gameplay_monitor_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_gameplay_monitor_enabled\0" . as_ptr () as * const c_char) ; table . set_merge_meshes = (gd_api . godot_method_bind_get_method) (class_name , "set_merge_meshes\0" . as_ptr () as * const c_char) ; table . set_overlap_warning_threshold = (gd_api . godot_method_bind_get_method) (class_name , "set_overlap_warning_threshold\0" . as_ptr () as * const c_char) ; table . set_portal_depth_limit = (gd_api . godot_method_bind_get_method) (class_name , "set_portal_depth_limit\0" . as_ptr () as * const c_char) ; table . set_preview_camera_path = (gd_api . godot_method_bind_get_method) (class_name , "set_preview_camera_path\0" . as_ptr () as * const c_char) ; table . set_pvs_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_pvs_mode\0" . as_ptr () as * const c_char) ; table . set_roaming_expansion_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_roaming_expansion_margin\0" . as_ptr () as * const c_char) ; table . set_room_simplify = (gd_api . godot_method_bind_get_method) (class_name , "set_room_simplify\0" . as_ptr () as * const c_char) ; table . set_roomlist_path = (gd_api . godot_method_bind_get_method) (class_name , "set_roomlist_path\0" . as_ptr () as * const c_char) ; table . set_show_margins = (gd_api . godot_method_bind_get_method) (class_name , "set_show_margins\0" . as_ptr () as * const c_char) ; table . set_use_secondary_pvs = (gd_api . godot_method_bind_get_method) (class_name , "set_use_secondary_pvs\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::room_manager::private::RoomManager;
            
            pub(crate) mod root_motion_view {
                # ! [doc = "This module contains types related to the API class [`RootMotionView`][super::RootMotionView]."] pub (crate) mod private { # [doc = "`core class RootMotionView` inherits `VisualInstance` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_rootmotionview.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nRootMotionView inherits methods from:\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct RootMotionView { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: RootMotionView ; impl RootMotionView { } impl gdnative_core :: private :: godot_object :: Sealed for RootMotionView { } unsafe impl GodotObject for RootMotionView { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "RootMotionView" } } impl QueueFree for RootMotionView { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for RootMotionView { type Target = crate :: generated :: VisualInstance ; # [inline] fn deref (& self) -> & crate :: generated :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for RootMotionView { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualInstance > for RootMotionView { } unsafe impl SubClass < crate :: generated :: CullInstance > for RootMotionView { } unsafe impl SubClass < crate :: generated :: Spatial > for RootMotionView { } unsafe impl SubClass < crate :: generated :: Node > for RootMotionView { } unsafe impl SubClass < crate :: generated :: Object > for RootMotionView { }
                use super::*;
            }
            pub use crate::generated::root_motion_view::private::RootMotionView;
            
            pub mod scene_state {
                # ! [doc = "This module contains types related to the API class [`SceneState`][super::SceneState]."] pub (crate) mod private { # [doc = "`core class SceneState` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`scene_state`][super::scene_state] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_scenestate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSceneState inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SceneState { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SceneState ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct GenEditState (pub i64) ; impl GenEditState { pub const DISABLED : GenEditState = GenEditState (0i64) ; pub const INSTANCE : GenEditState = GenEditState (1i64) ; pub const MAIN : GenEditState = GenEditState (2i64) ; pub const MAIN_INHERITED : GenEditState = GenEditState (3i64) ; } impl From < i64 > for GenEditState { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < GenEditState > for i64 { # [inline] fn from (v : GenEditState) -> Self { v . 0 } } impl FromVariant for GenEditState { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SceneState { pub const GEN_EDIT_STATE_DISABLED : i64 = 0i64 ; pub const GEN_EDIT_STATE_INSTANCE : i64 = 1i64 ; pub const GEN_EDIT_STATE_MAIN : i64 = 2i64 ; pub const GEN_EDIT_STATE_MAIN_INHERITED : i64 = 3i64 ; } impl SceneState { # [doc = "Returns the list of bound parameters for the signal at `idx`."] # [doc = ""] # [inline] pub fn get_connection_binds (& self , idx : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_binds ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of signal connections in the scene.\nThe `idx` argument used to query connection metadata in other `get_connection_*` methods in the interval `[0, get_connection_count() - 1]`."] # [doc = ""] # [inline] pub fn get_connection_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the connection flags for the signal at `idx`. See [enum Object.ConnectFlags] constants."] # [doc = ""] # [inline] pub fn get_connection_flags (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_flags ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the method connected to the signal at `idx`."] # [doc = ""] # [inline] pub fn get_connection_method (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_method ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the name of the signal at `idx`."] # [doc = ""] # [inline] pub fn get_connection_signal (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_signal ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the path to the node that owns the signal at `idx`, relative to the root node."] # [doc = ""] # [inline] pub fn get_connection_source (& self , idx : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_source ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the path to the node that owns the method connected to the signal at `idx`, relative to the root node."] # [doc = ""] # [inline] pub fn get_connection_target (& self , idx : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_connection_target ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of nodes in the scene.\nThe `idx` argument used to query node data in other `get_node_*` methods in the interval `[0, get_node_count() - 1]`."] # [doc = ""] # [inline] pub fn get_node_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the list of group names associated with the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_groups (& self , idx : i64) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_groups ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instanced or inherited scene among siblings from the base scene. Despite the name, this index is not related to the `idx` argument used here and in other methods."] # [doc = ""] # [inline] pub fn get_node_index (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_index ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a [`PackedScene`][PackedScene] for the node at `idx` (i.e. the whole branch starting at this node, with its child nodes and resources), or `null` if the node is not an instance."] # [doc = ""] # [inline] pub fn get_node_instance (& self , idx : i64) -> Option < Ref < crate :: generated :: PackedScene , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_instance ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: PackedScene , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the path to the represented scene file if the node at `idx` is an [`InstancePlaceholder`][InstancePlaceholder]."] # [doc = ""] # [inline] pub fn get_node_instance_placeholder (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_instance_placeholder ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the name of the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_name (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the path to the owner of the node at `idx`, relative to the root node."] # [doc = ""] # [inline] pub fn get_node_owner_path (& self , idx : i64) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_owner_path ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the path to the node at `idx`.\nIf `for_parent` is `true`, returns the path of the `idx` node's parent instead.\n# Default Arguments\n* `for_parent` - `false`"] # [doc = ""] # [inline] pub fn get_node_path (& self , idx : i64 , for_parent : bool) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_path ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , idx as _ , for_parent as _) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of exported or overridden properties for the node at `idx`.\nThe `prop_idx` argument used to query node property data in other `get_node_property_*` methods in the interval `[0, get_node_property_count() - 1]`."] # [doc = ""] # [inline] pub fn get_node_property_count (& self , idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_property_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the name of the property at `prop_idx` for the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_property_name (& self , idx : i64 , prop_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_property_name ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , idx as _ , prop_idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the value of the property at `prop_idx` for the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_property_value (& self , idx : i64 , prop_idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_property_value ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , idx as _ , prop_idx as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the type of the node at `idx`."] # [doc = ""] # [inline] pub fn get_node_type (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . get_node_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the node at `idx` is an [`InstancePlaceholder`][InstancePlaceholder]."] # [doc = ""] # [inline] pub fn is_node_instance_placeholder (& self , idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneStateMethodTable :: get (get_api ()) . is_node_instance_placeholder ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < bool > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for SceneState { } unsafe impl GodotObject for SceneState { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SceneState" } } impl std :: ops :: Deref for SceneState { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SceneState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for SceneState { } unsafe impl SubClass < crate :: generated :: Object > for SceneState { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SceneStateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_connection_binds : * mut sys :: godot_method_bind , pub get_connection_count : * mut sys :: godot_method_bind , pub get_connection_flags : * mut sys :: godot_method_bind , pub get_connection_method : * mut sys :: godot_method_bind , pub get_connection_signal : * mut sys :: godot_method_bind , pub get_connection_source : * mut sys :: godot_method_bind , pub get_connection_target : * mut sys :: godot_method_bind , pub get_node_count : * mut sys :: godot_method_bind , pub get_node_groups : * mut sys :: godot_method_bind , pub get_node_index : * mut sys :: godot_method_bind , pub get_node_instance : * mut sys :: godot_method_bind , pub get_node_instance_placeholder : * mut sys :: godot_method_bind , pub get_node_name : * mut sys :: godot_method_bind , pub get_node_owner_path : * mut sys :: godot_method_bind , pub get_node_path : * mut sys :: godot_method_bind , pub get_node_property_count : * mut sys :: godot_method_bind , pub get_node_property_name : * mut sys :: godot_method_bind , pub get_node_property_value : * mut sys :: godot_method_bind , pub get_node_type : * mut sys :: godot_method_bind , pub is_node_instance_placeholder : * mut sys :: godot_method_bind } impl SceneStateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SceneStateMethodTable = SceneStateMethodTable { class_constructor : None , get_connection_binds : 0 as * mut sys :: godot_method_bind , get_connection_count : 0 as * mut sys :: godot_method_bind , get_connection_flags : 0 as * mut sys :: godot_method_bind , get_connection_method : 0 as * mut sys :: godot_method_bind , get_connection_signal : 0 as * mut sys :: godot_method_bind , get_connection_source : 0 as * mut sys :: godot_method_bind , get_connection_target : 0 as * mut sys :: godot_method_bind , get_node_count : 0 as * mut sys :: godot_method_bind , get_node_groups : 0 as * mut sys :: godot_method_bind , get_node_index : 0 as * mut sys :: godot_method_bind , get_node_instance : 0 as * mut sys :: godot_method_bind , get_node_instance_placeholder : 0 as * mut sys :: godot_method_bind , get_node_name : 0 as * mut sys :: godot_method_bind , get_node_owner_path : 0 as * mut sys :: godot_method_bind , get_node_path : 0 as * mut sys :: godot_method_bind , get_node_property_count : 0 as * mut sys :: godot_method_bind , get_node_property_name : 0 as * mut sys :: godot_method_bind , get_node_property_value : 0 as * mut sys :: godot_method_bind , get_node_type : 0 as * mut sys :: godot_method_bind , is_node_instance_placeholder : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SceneStateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SceneState\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_connection_binds = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_binds\0" . as_ptr () as * const c_char) ; table . get_connection_count = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_count\0" . as_ptr () as * const c_char) ; table . get_connection_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_flags\0" . as_ptr () as * const c_char) ; table . get_connection_method = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_method\0" . as_ptr () as * const c_char) ; table . get_connection_signal = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_signal\0" . as_ptr () as * const c_char) ; table . get_connection_source = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_source\0" . as_ptr () as * const c_char) ; table . get_connection_target = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_target\0" . as_ptr () as * const c_char) ; table . get_node_count = (gd_api . godot_method_bind_get_method) (class_name , "get_node_count\0" . as_ptr () as * const c_char) ; table . get_node_groups = (gd_api . godot_method_bind_get_method) (class_name , "get_node_groups\0" . as_ptr () as * const c_char) ; table . get_node_index = (gd_api . godot_method_bind_get_method) (class_name , "get_node_index\0" . as_ptr () as * const c_char) ; table . get_node_instance = (gd_api . godot_method_bind_get_method) (class_name , "get_node_instance\0" . as_ptr () as * const c_char) ; table . get_node_instance_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "get_node_instance_placeholder\0" . as_ptr () as * const c_char) ; table . get_node_name = (gd_api . godot_method_bind_get_method) (class_name , "get_node_name\0" . as_ptr () as * const c_char) ; table . get_node_owner_path = (gd_api . godot_method_bind_get_method) (class_name , "get_node_owner_path\0" . as_ptr () as * const c_char) ; table . get_node_path = (gd_api . godot_method_bind_get_method) (class_name , "get_node_path\0" . as_ptr () as * const c_char) ; table . get_node_property_count = (gd_api . godot_method_bind_get_method) (class_name , "get_node_property_count\0" . as_ptr () as * const c_char) ; table . get_node_property_name = (gd_api . godot_method_bind_get_method) (class_name , "get_node_property_name\0" . as_ptr () as * const c_char) ; table . get_node_property_value = (gd_api . godot_method_bind_get_method) (class_name , "get_node_property_value\0" . as_ptr () as * const c_char) ; table . get_node_type = (gd_api . godot_method_bind_get_method) (class_name , "get_node_type\0" . as_ptr () as * const c_char) ; table . is_node_instance_placeholder = (gd_api . godot_method_bind_get_method) (class_name , "is_node_instance_placeholder\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::scene_state::private::SceneState;
            
            pub mod scene_tree {
                # ! [doc = "This module contains types related to the API class [`SceneTree`][super::SceneTree]."] pub (crate) mod private { # [doc = "`core class SceneTree` inherits `MainLoop` (manually managed).\n\nThis class has related types in the [`scene_tree`][super::scene_tree] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_scenetree.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`SceneTree` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<SceneTree>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSceneTree inherits methods from:\n - [MainLoop](struct.MainLoop.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SceneTree { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SceneTree ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct GroupCallFlags (pub i64) ; impl GroupCallFlags { pub const DEFAULT : GroupCallFlags = GroupCallFlags (0i64) ; pub const REVERSE : GroupCallFlags = GroupCallFlags (1i64) ; pub const REALTIME : GroupCallFlags = GroupCallFlags (2i64) ; pub const UNIQUE : GroupCallFlags = GroupCallFlags (4i64) ; } impl From < i64 > for GroupCallFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < GroupCallFlags > for i64 { # [inline] fn from (v : GroupCallFlags) -> Self { v . 0 } } impl FromVariant for GroupCallFlags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct StretchAspect (pub i64) ; impl StretchAspect { pub const IGNORE : StretchAspect = StretchAspect (0i64) ; pub const KEEP : StretchAspect = StretchAspect (1i64) ; pub const KEEP_WIDTH : StretchAspect = StretchAspect (2i64) ; pub const KEEP_HEIGHT : StretchAspect = StretchAspect (3i64) ; pub const EXPAND : StretchAspect = StretchAspect (4i64) ; } impl From < i64 > for StretchAspect { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < StretchAspect > for i64 { # [inline] fn from (v : StretchAspect) -> Self { v . 0 } } impl FromVariant for StretchAspect { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct StretchMode (pub i64) ; impl StretchMode { pub const DISABLED : StretchMode = StretchMode (0i64) ; pub const _2D : StretchMode = StretchMode (1i64) ; pub const VIEWPORT : StretchMode = StretchMode (2i64) ; } impl From < i64 > for StretchMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < StretchMode > for i64 { # [inline] fn from (v : StretchMode) -> Self { v . 0 } } impl FromVariant for StretchMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SceneTree { pub const GROUP_CALL_DEFAULT : i64 = 0i64 ; pub const STRETCH_ASPECT_IGNORE : i64 = 0i64 ; pub const STRETCH_MODE_DISABLED : i64 = 0i64 ; pub const GROUP_CALL_REVERSE : i64 = 1i64 ; pub const STRETCH_ASPECT_KEEP : i64 = 1i64 ; pub const STRETCH_MODE_2D : i64 = 1i64 ; pub const GROUP_CALL_REALTIME : i64 = 2i64 ; pub const STRETCH_ASPECT_KEEP_WIDTH : i64 = 2i64 ; pub const STRETCH_MODE_VIEWPORT : i64 = 2i64 ; pub const STRETCH_ASPECT_KEEP_HEIGHT : i64 = 3i64 ; pub const GROUP_CALL_UNIQUE : i64 = 4i64 ; pub const STRETCH_ASPECT_EXPAND : i64 = 4i64 ; } impl SceneTree { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SceneTreeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Calls `method` on each member of the given group. You can pass arguments to `method` by specifying them at the end of the method call. This method is equivalent of calling [`call_group_flags`][Self::call_group_flags] with [`GROUP_CALL_DEFAULT`][Self::GROUP_CALL_DEFAULT] flag.\n**Note:** `method` may only have 5 arguments at most (7 arguments passed to this method in total).\n**Note:** Due to design limitations, [`call_group`][Self::call_group] will fail silently if one of the arguments is `null`.\n**Note:** [`call_group`][Self::call_group] will always call methods with an one-frame delay, in a way similar to [`Object.call_deferred`][Object::call_deferred]. To call methods immediately, use [`call_group_flags`][Self::call_group_flags] with the [`GROUP_CALL_REALTIME`][Self::GROUP_CALL_REALTIME] flag."] # [doc = ""] # [inline] pub fn call_group (& self , group : impl Into < GodotString > , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . call_group ; let ret = crate :: icalls :: icallvarargs__str_str (method_bind , self . this . sys () . as_ptr () , group . into () , method . into () , varargs) ; ret } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCalls `method` on each member of the given group, respecting the given [`GroupCallFlags`][GroupCallFlags]. You can pass arguments to `method` by specifying them at the end of the method call.\n**Note:** `method` may only have 5 arguments at most (8 arguments passed to this method in total).\n**Note:** Due to design limitations, [`call_group_flags`][Self::call_group_flags] will fail silently if one of the arguments is `null`.\n```gdscript\n# Call the method immediately and in reverse order.\nget_tree().call_group_flags(SceneTree.GROUP_CALL_REALTIME | SceneTree.GROUP_CALL_REVERSE, \"bases\", \"destroy\")\n```"] # [doc = ""] # [inline] pub fn call_group_flags (& self , flags : i64 , group : impl Into < GodotString > , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . call_group_flags ; let ret = crate :: icalls :: icallvarargs__i64_str_str (method_bind , self . this . sys () . as_ptr () , flags as _ , group . into () , method . into () , varargs) ; ret } } # [doc = "Changes the running scene to the one at the given `path`, after loading it into a [`PackedScene`][PackedScene] and creating a new instance.\nReturns [`OK`][Self::OK] on success, [`ERR_CANT_OPEN`][Self::ERR_CANT_OPEN] if the `path` cannot be loaded into a [`PackedScene`][PackedScene], or [`ERR_CANT_CREATE`][Self::ERR_CANT_CREATE] if that scene cannot be instantiated.\n**Note:** The scene change is deferred, which means that the new scene node is added on the next idle frame. You won't be able to access it immediately after the [`change_scene`][Self::change_scene] call."] # [doc = ""] # [inline] pub fn change_scene (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . change_scene ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Changes the running scene to a new instance of the given [`PackedScene`][PackedScene].\nReturns [`OK`][Self::OK] on success or [`ERR_CANT_CREATE`][Self::ERR_CANT_CREATE] if the scene cannot be instantiated.\n**Note:** The scene change is deferred, which means that the new scene node is added on the next idle frame. You won't be able to access it immediately after the [`change_scene_to`][Self::change_scene_to] call.\n**Note:** Passing a value of `null` into the method will unload the current scene without loading a new one."] # [doc = ""] # [inline] pub fn change_scene_to (& self , packed_scene : impl AsArg < crate :: generated :: PackedScene >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . change_scene_to ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , packed_scene . as_arg_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns a [`SceneTreeTimer`][SceneTreeTimer] which will [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in this [`SceneTree`][SceneTree]. If `pause_mode_process` is set to `false`, pausing the [`SceneTree`][SceneTree] will also pause the timer.\nCommonly used to create a one-shot delay timer as in the following example:\n```gdscript\nfunc some_function():\n    print(\"start\")\n    yield(get_tree().create_timer(1.0), \"timeout\")\n    print(\"end\")\n```\nThe timer will be automatically freed after its time elapses.\n# Default Arguments\n* `pause_mode_process` - `true`"] # [doc = ""] # [inline] pub fn create_timer (& self , time_sec : f64 , pause_mode_process : bool) -> Option < Ref < crate :: generated :: SceneTreeTimer , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . create_timer ; let ret = crate :: icalls :: icallvar__f64_bool (method_bind , self . this . sys () . as_ptr () , time_sec as _ , pause_mode_process as _) ; < Option < Ref < crate :: generated :: SceneTreeTimer , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates and returns a new [`SceneTreeTween`][SceneTreeTween]."] # [doc = ""] # [inline] pub fn create_tween (& self) -> Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . create_tween ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The current scene."] # [doc = ""] # [inline] pub fn current_scene (& self) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_current_scene ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The root of the edited scene."] # [doc = ""] # [inline] pub fn edited_scene_root (& self) -> Option < Ref < crate :: generated :: Node , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_edited_scene_root ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Node , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current frame number, i.e. the total frame count since the application started."] # [doc = ""] # [inline] pub fn get_frame (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_frame ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The default [`MultiplayerAPI`][MultiplayerAPI] instance for this [`SceneTree`][SceneTree]."] # [doc = ""] # [inline] pub fn multiplayer (& self) -> Option < Ref < crate :: generated :: MultiplayerAPI , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_multiplayer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: MultiplayerAPI , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the peer IDs of all connected peers of this [`SceneTree`][SceneTree]'s [`network_peer`][Self::network_peer]."] # [doc = ""] # [inline] pub fn get_network_connected_peers (& self) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_network_connected_peers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [`SceneTree`][SceneTree] will become a network server (check with [`is_network_server`][Self::is_network_server]) and will set the root node's network mode to master, or it will become a regular peer with the root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to [`SceneTree`][SceneTree]'s signals."] # [doc = ""] # [inline] pub fn network_peer (& self) -> Option < Ref < crate :: generated :: NetworkedMultiplayerPeer , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_network_peer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: NetworkedMultiplayerPeer , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the unique peer ID of this [`SceneTree`][SceneTree]'s [`network_peer`][Self::network_peer]."] # [doc = ""] # [inline] pub fn get_network_unique_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_network_unique_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of nodes in this [`SceneTree`][SceneTree]."] # [doc = ""] # [inline] pub fn get_node_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_node_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a list of all nodes assigned to the given group."] # [doc = ""] # [inline] pub fn get_nodes_in_group (& self , group : impl Into < GodotString >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_nodes_in_group ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , group . into ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array of currently existing [`SceneTreeTween`][SceneTreeTween]s in the [`SceneTree`][SceneTree] (both running and paused)."] # [doc = ""] # [inline] pub fn get_processed_tweens (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_processed_tweens ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`SceneTree`][SceneTree]'s root [`Viewport`][Viewport]."] # [doc = ""] # [inline] pub fn root (& self) -> Option < Ref < crate :: generated :: Viewport , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_root ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Viewport , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the sender's peer ID for the most recently received RPC call."] # [doc = ""] # [inline] pub fn get_rpc_sender_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . get_rpc_sender_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given group exists."] # [doc = ""] # [inline] pub fn has_group (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . has_group ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if there is a [`network_peer`][Self::network_peer] set."] # [doc = ""] # [inline] pub fn has_network_peer (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . has_network_peer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the application automatically accepts quitting.\nFor mobile platforms, see [`quit_on_go_back`][Self::quit_on_go_back]."] # [doc = ""] # [inline] pub fn is_auto_accept_quit (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . is_auto_accept_quit ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, collision shapes will be visible when running the game from the editor for debugging purposes.\n**Note:** This property is not designed to be changed at run-time. Changing the value of [`debug_collisions_hint`][Self::debug_collisions_hint] while the project is running will not have the desired effect."] # [doc = ""] # [inline] pub fn is_debugging_collisions_hint (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . is_debugging_collisions_hint ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, navigation polygons will be visible when running the game from the editor for debugging purposes.\n**Note:** This property is not designed to be changed at run-time. Changing the value of [`debug_navigation_hint`][Self::debug_navigation_hint] while the project is running will not have the desired effect."] # [doc = ""] # [inline] pub fn is_debugging_navigation_hint (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . is_debugging_navigation_hint ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the most recent [`InputEvent`][InputEvent] was marked as handled with [`set_input_as_handled`][Self::set_input_as_handled]."] # [doc = ""] # [inline] pub fn is_input_handled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . is_input_handled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true` (default value), enables automatic polling of the [`MultiplayerAPI`][MultiplayerAPI] for this SceneTree during `idle_frame`.\nIf `false`, you need to manually call [`MultiplayerAPI.poll`][MultiplayerAPI::poll] to process network packets and deliver RPCs/RSETs. This allows running RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [`Mutex`][Mutex] protection when accessing the [`MultiplayerAPI`][MultiplayerAPI] from threads."] # [doc = ""] # [inline] pub fn is_multiplayer_poll_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . is_multiplayer_poll_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this [`SceneTree`][SceneTree]'s [`network_peer`][Self::network_peer] is in server mode (listening for connections)."] # [doc = ""] # [inline] pub fn is_network_server (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . is_network_server ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the [`SceneTree`][SceneTree] is paused. Doing so will have the following behavior:\n- 2D and 3D physics will be stopped. This includes signals and collision detection.\n- [`Node._process`][Node::_process], [`Node._physics_process`][Node::_physics_process] and [`Node._input`][Node::_input] will not be called anymore in nodes."] # [doc = ""] # [inline] pub fn is_paused (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . is_paused ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Although physics interpolation would normally be globally turned on and off using [member ProjectSettings.physics/common/physics_interpolation], this property allows control over interpolation at runtime."] # [doc = ""] # [inline] pub fn is_physics_interpolation_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . is_physics_interpolation_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the application quits automatically on going back (e.g. on Android).\nTo handle 'Go Back' button when this option is disabled, use [`MainLoop.NOTIFICATION_WM_GO_BACK_REQUEST`][MainLoop::NOTIFICATION_WM_GO_BACK_REQUEST]."] # [doc = ""] # [inline] pub fn is_quit_on_go_back (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . is_quit_on_go_back ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the [`SceneTree`][SceneTree]'s [`network_peer`][Self::network_peer] refuses new incoming connections."] # [doc = ""] # [inline] pub fn is_refusing_new_network_connections (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . is_refusing_new_network_connections ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, font oversampling is enabled. This means that [`DynamicFont`][DynamicFont]s will be rendered at higher or lower size than configured based on the viewport's scaling ratio. For example, in a viewport scaled with a factor 1.5, a font configured with size 14 would be rendered with size 21 (`14 * 1.5`).\n**Note:** Font oversampling is only used if the viewport stretch mode is [`STRETCH_MODE_VIEWPORT`][Self::STRETCH_MODE_VIEWPORT], and if the stretch aspect mode is different from [`STRETCH_ASPECT_IGNORE`][Self::STRETCH_ASPECT_IGNORE].\n**Note:** This property is set automatically for the active [`SceneTree`][SceneTree] when the project starts based on the configuration of `rendering/quality/dynamic_fonts/use_oversampling` in [`ProjectSettings`][ProjectSettings]. The property can however be overridden at runtime as needed."] # [doc = ""] # [inline] pub fn is_using_font_oversampling (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . is_using_font_oversampling ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sends the given notification to all members of the `group`."] # [doc = ""] # [inline] pub fn notify_group (& self , group : impl Into < GodotString > , notification : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . notify_group ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , group . into () , notification as _) ; } } # [doc = "Sends the given notification to all members of the `group`, respecting the given [`GroupCallFlags`][GroupCallFlags]."] # [doc = ""] # [inline] pub fn notify_group_flags (& self , call_flags : i64 , group : impl Into < GodotString > , notification : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . notify_group_flags ; let ret = crate :: icalls :: icallvar__i64_str_i64 (method_bind , self . this . sys () . as_ptr () , call_flags as _ , group . into () , notification as _) ; } } # [doc = "Queues the given object for deletion, delaying the call to [`Object.free`][Object::free] to after the current frame."] # [doc = ""] # [inline] pub fn queue_delete (& self , obj : impl AsArg < crate :: generated :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . queue_delete ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , obj . as_arg_ptr ()) ; } } # [doc = "Quits the application at the end of the current iteration. A process `exit_code` can optionally be passed as an argument. If this argument is `0` or greater, it will override the [`OS.exit_code`][OS::exit_code] defined before quitting the application.\n**Note:** On iOS this method doesn't work. Instead, as recommended by the iOS Human Interface Guidelines, the user is expected to close apps via the Home button.\n# Default Arguments\n* `exit_code` - `-1`"] # [doc = ""] # [inline] pub fn quit (& self , exit_code : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . quit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , exit_code as _) ; } } # [doc = "Reloads the currently active scene.\nReturns [`OK`][Self::OK] on success, [`ERR_UNCONFIGURED`][Self::ERR_UNCONFIGURED] if no [`current_scene`][Self::current_scene] was defined yet, [`ERR_CANT_OPEN`][Self::ERR_CANT_OPEN] if [`current_scene`][Self::current_scene] cannot be loaded into a [`PackedScene`][PackedScene], or [`ERR_CANT_CREATE`][Self::ERR_CANT_CREATE] if the scene cannot be instantiated."] # [doc = ""] # [inline] pub fn reload_current_scene (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . reload_current_scene ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "If `true`, the application automatically accepts quitting.\nFor mobile platforms, see [`quit_on_go_back`][Self::quit_on_go_back]."] # [doc = ""] # [inline] pub fn set_auto_accept_quit (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_auto_accept_quit ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The current scene."] # [doc = ""] # [inline] pub fn set_current_scene (& self , child_node : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_current_scene ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , child_node . as_arg_ptr ()) ; } } # [doc = "If `true`, collision shapes will be visible when running the game from the editor for debugging purposes.\n**Note:** This property is not designed to be changed at run-time. Changing the value of [`debug_collisions_hint`][Self::debug_collisions_hint] while the project is running will not have the desired effect."] # [doc = ""] # [inline] pub fn set_debug_collisions_hint (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_debug_collisions_hint ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, navigation polygons will be visible when running the game from the editor for debugging purposes.\n**Note:** This property is not designed to be changed at run-time. Changing the value of [`debug_navigation_hint`][Self::debug_navigation_hint] while the project is running will not have the desired effect."] # [doc = ""] # [inline] pub fn set_debug_navigation_hint (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_debug_navigation_hint ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The root of the edited scene."] # [doc = ""] # [inline] pub fn set_edited_scene_root (& self , scene : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_edited_scene_root ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , scene . as_arg_ptr ()) ; } } # [doc = "Sets the given `property` to `value` on all members of the given group."] # [doc = ""] # [inline] pub fn set_group (& self , group : impl Into < GodotString > , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_group ; let ret = crate :: icalls :: icallvar__str_str_var (method_bind , self . this . sys () . as_ptr () , group . into () , property . into () , value . owned_to_variant ()) ; } } # [doc = "Sets the given `property` to `value` on all members of the given group, respecting the given [`GroupCallFlags`][GroupCallFlags]."] # [doc = ""] # [inline] pub fn set_group_flags (& self , call_flags : i64 , group : impl Into < GodotString > , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_group_flags ; let ret = crate :: icalls :: icallvar__i64_str_str_var (method_bind , self . this . sys () . as_ptr () , call_flags as _ , group . into () , property . into () , value . owned_to_variant ()) ; } } # [doc = "Marks the most recent [`InputEvent`][InputEvent] as handled."] # [doc = ""] # [inline] pub fn set_input_as_handled (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_input_as_handled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The default [`MultiplayerAPI`][MultiplayerAPI] instance for this [`SceneTree`][SceneTree]."] # [doc = ""] # [inline] pub fn set_multiplayer (& self , multiplayer : impl AsArg < crate :: generated :: MultiplayerAPI >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_multiplayer ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , multiplayer . as_arg_ptr ()) ; } } # [doc = "If `true` (default value), enables automatic polling of the [`MultiplayerAPI`][MultiplayerAPI] for this SceneTree during `idle_frame`.\nIf `false`, you need to manually call [`MultiplayerAPI.poll`][MultiplayerAPI::poll] to process network packets and deliver RPCs/RSETs. This allows running RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [`Mutex`][Mutex] protection when accessing the [`MultiplayerAPI`][MultiplayerAPI] from threads."] # [doc = ""] # [inline] pub fn set_multiplayer_poll_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_multiplayer_poll_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [`SceneTree`][SceneTree] will become a network server (check with [`is_network_server`][Self::is_network_server]) and will set the root node's network mode to master, or it will become a regular peer with the root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to [`SceneTree`][SceneTree]'s signals."] # [doc = ""] # [inline] pub fn set_network_peer (& self , peer : impl AsArg < crate :: generated :: NetworkedMultiplayerPeer >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_network_peer ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , peer . as_arg_ptr ()) ; } } # [doc = "If `true`, the [`SceneTree`][SceneTree] is paused. Doing so will have the following behavior:\n- 2D and 3D physics will be stopped. This includes signals and collision detection.\n- [`Node._process`][Node::_process], [`Node._physics_process`][Node::_physics_process] and [`Node._input`][Node::_input] will not be called anymore in nodes."] # [doc = ""] # [inline] pub fn set_pause (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_pause ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Although physics interpolation would normally be globally turned on and off using [member ProjectSettings.physics/common/physics_interpolation], this property allows control over interpolation at runtime."] # [doc = ""] # [inline] pub fn set_physics_interpolation_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_physics_interpolation_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, the application quits automatically on going back (e.g. on Android).\nTo handle 'Go Back' button when this option is disabled, use [`MainLoop.NOTIFICATION_WM_GO_BACK_REQUEST`][MainLoop::NOTIFICATION_WM_GO_BACK_REQUEST]."] # [doc = ""] # [inline] pub fn set_quit_on_go_back (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_quit_on_go_back ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, the [`SceneTree`][SceneTree]'s [`network_peer`][Self::network_peer] refuses new incoming connections."] # [doc = ""] # [inline] pub fn set_refuse_new_network_connections (& self , refuse : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_refuse_new_network_connections ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , refuse as _) ; } } # [doc = "Configures screen stretching to the given [`StretchMode`][StretchMode], [`StretchAspect`][StretchAspect], minimum size and `scale`.\n# Default Arguments\n* `scale` - `1`"] # [doc = ""] # [inline] pub fn set_screen_stretch (& self , mode : i64 , aspect : i64 , minsize : Vector2 , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_screen_stretch ; let ret = crate :: icalls :: icallvar__i64_i64_vec2_f64 (method_bind , self . this . sys () . as_ptr () , mode as _ , aspect as _ , minsize , scale as _) ; } } # [doc = "If `true`, font oversampling is enabled. This means that [`DynamicFont`][DynamicFont]s will be rendered at higher or lower size than configured based on the viewport's scaling ratio. For example, in a viewport scaled with a factor 1.5, a font configured with size 14 would be rendered with size 21 (`14 * 1.5`).\n**Note:** Font oversampling is only used if the viewport stretch mode is [`STRETCH_MODE_VIEWPORT`][Self::STRETCH_MODE_VIEWPORT], and if the stretch aspect mode is different from [`STRETCH_ASPECT_IGNORE`][Self::STRETCH_ASPECT_IGNORE].\n**Note:** This property is set automatically for the active [`SceneTree`][SceneTree] when the project starts based on the configuration of `rendering/quality/dynamic_fonts/use_oversampling` in [`ProjectSettings`][ProjectSettings]. The property can however be overridden at runtime as needed."] # [doc = ""] # [inline] pub fn set_use_font_oversampling (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeMethodTable :: get (get_api ()) . set_use_font_oversampling ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SceneTree { } unsafe impl GodotObject for SceneTree { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SceneTree" } } impl std :: ops :: Deref for SceneTree { type Target = crate :: generated :: MainLoop ; # [inline] fn deref (& self) -> & crate :: generated :: MainLoop { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SceneTree { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: MainLoop { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: MainLoop > for SceneTree { } unsafe impl SubClass < crate :: generated :: Object > for SceneTree { } impl Instanciable for SceneTree { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { SceneTree :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SceneTreeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub call_group : * mut sys :: godot_method_bind , pub call_group_flags : * mut sys :: godot_method_bind , pub change_scene : * mut sys :: godot_method_bind , pub change_scene_to : * mut sys :: godot_method_bind , pub create_timer : * mut sys :: godot_method_bind , pub create_tween : * mut sys :: godot_method_bind , pub get_current_scene : * mut sys :: godot_method_bind , pub get_edited_scene_root : * mut sys :: godot_method_bind , pub get_frame : * mut sys :: godot_method_bind , pub get_multiplayer : * mut sys :: godot_method_bind , pub get_network_connected_peers : * mut sys :: godot_method_bind , pub get_network_peer : * mut sys :: godot_method_bind , pub get_network_unique_id : * mut sys :: godot_method_bind , pub get_node_count : * mut sys :: godot_method_bind , pub get_nodes_in_group : * mut sys :: godot_method_bind , pub get_processed_tweens : * mut sys :: godot_method_bind , pub get_root : * mut sys :: godot_method_bind , pub get_rpc_sender_id : * mut sys :: godot_method_bind , pub has_group : * mut sys :: godot_method_bind , pub has_network_peer : * mut sys :: godot_method_bind , pub is_auto_accept_quit : * mut sys :: godot_method_bind , pub is_debugging_collisions_hint : * mut sys :: godot_method_bind , pub is_debugging_navigation_hint : * mut sys :: godot_method_bind , pub is_input_handled : * mut sys :: godot_method_bind , pub is_multiplayer_poll_enabled : * mut sys :: godot_method_bind , pub is_network_server : * mut sys :: godot_method_bind , pub is_paused : * mut sys :: godot_method_bind , pub is_physics_interpolation_enabled : * mut sys :: godot_method_bind , pub is_quit_on_go_back : * mut sys :: godot_method_bind , pub is_refusing_new_network_connections : * mut sys :: godot_method_bind , pub is_using_font_oversampling : * mut sys :: godot_method_bind , pub notify_group : * mut sys :: godot_method_bind , pub notify_group_flags : * mut sys :: godot_method_bind , pub queue_delete : * mut sys :: godot_method_bind , pub quit : * mut sys :: godot_method_bind , pub reload_current_scene : * mut sys :: godot_method_bind , pub set_auto_accept_quit : * mut sys :: godot_method_bind , pub set_current_scene : * mut sys :: godot_method_bind , pub set_debug_collisions_hint : * mut sys :: godot_method_bind , pub set_debug_navigation_hint : * mut sys :: godot_method_bind , pub set_edited_scene_root : * mut sys :: godot_method_bind , pub set_group : * mut sys :: godot_method_bind , pub set_group_flags : * mut sys :: godot_method_bind , pub set_input_as_handled : * mut sys :: godot_method_bind , pub set_multiplayer : * mut sys :: godot_method_bind , pub set_multiplayer_poll_enabled : * mut sys :: godot_method_bind , pub set_network_peer : * mut sys :: godot_method_bind , pub set_pause : * mut sys :: godot_method_bind , pub set_physics_interpolation_enabled : * mut sys :: godot_method_bind , pub set_quit_on_go_back : * mut sys :: godot_method_bind , pub set_refuse_new_network_connections : * mut sys :: godot_method_bind , pub set_screen_stretch : * mut sys :: godot_method_bind , pub set_use_font_oversampling : * mut sys :: godot_method_bind } impl SceneTreeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SceneTreeMethodTable = SceneTreeMethodTable { class_constructor : None , call_group : 0 as * mut sys :: godot_method_bind , call_group_flags : 0 as * mut sys :: godot_method_bind , change_scene : 0 as * mut sys :: godot_method_bind , change_scene_to : 0 as * mut sys :: godot_method_bind , create_timer : 0 as * mut sys :: godot_method_bind , create_tween : 0 as * mut sys :: godot_method_bind , get_current_scene : 0 as * mut sys :: godot_method_bind , get_edited_scene_root : 0 as * mut sys :: godot_method_bind , get_frame : 0 as * mut sys :: godot_method_bind , get_multiplayer : 0 as * mut sys :: godot_method_bind , get_network_connected_peers : 0 as * mut sys :: godot_method_bind , get_network_peer : 0 as * mut sys :: godot_method_bind , get_network_unique_id : 0 as * mut sys :: godot_method_bind , get_node_count : 0 as * mut sys :: godot_method_bind , get_nodes_in_group : 0 as * mut sys :: godot_method_bind , get_processed_tweens : 0 as * mut sys :: godot_method_bind , get_root : 0 as * mut sys :: godot_method_bind , get_rpc_sender_id : 0 as * mut sys :: godot_method_bind , has_group : 0 as * mut sys :: godot_method_bind , has_network_peer : 0 as * mut sys :: godot_method_bind , is_auto_accept_quit : 0 as * mut sys :: godot_method_bind , is_debugging_collisions_hint : 0 as * mut sys :: godot_method_bind , is_debugging_navigation_hint : 0 as * mut sys :: godot_method_bind , is_input_handled : 0 as * mut sys :: godot_method_bind , is_multiplayer_poll_enabled : 0 as * mut sys :: godot_method_bind , is_network_server : 0 as * mut sys :: godot_method_bind , is_paused : 0 as * mut sys :: godot_method_bind , is_physics_interpolation_enabled : 0 as * mut sys :: godot_method_bind , is_quit_on_go_back : 0 as * mut sys :: godot_method_bind , is_refusing_new_network_connections : 0 as * mut sys :: godot_method_bind , is_using_font_oversampling : 0 as * mut sys :: godot_method_bind , notify_group : 0 as * mut sys :: godot_method_bind , notify_group_flags : 0 as * mut sys :: godot_method_bind , queue_delete : 0 as * mut sys :: godot_method_bind , quit : 0 as * mut sys :: godot_method_bind , reload_current_scene : 0 as * mut sys :: godot_method_bind , set_auto_accept_quit : 0 as * mut sys :: godot_method_bind , set_current_scene : 0 as * mut sys :: godot_method_bind , set_debug_collisions_hint : 0 as * mut sys :: godot_method_bind , set_debug_navigation_hint : 0 as * mut sys :: godot_method_bind , set_edited_scene_root : 0 as * mut sys :: godot_method_bind , set_group : 0 as * mut sys :: godot_method_bind , set_group_flags : 0 as * mut sys :: godot_method_bind , set_input_as_handled : 0 as * mut sys :: godot_method_bind , set_multiplayer : 0 as * mut sys :: godot_method_bind , set_multiplayer_poll_enabled : 0 as * mut sys :: godot_method_bind , set_network_peer : 0 as * mut sys :: godot_method_bind , set_pause : 0 as * mut sys :: godot_method_bind , set_physics_interpolation_enabled : 0 as * mut sys :: godot_method_bind , set_quit_on_go_back : 0 as * mut sys :: godot_method_bind , set_refuse_new_network_connections : 0 as * mut sys :: godot_method_bind , set_screen_stretch : 0 as * mut sys :: godot_method_bind , set_use_font_oversampling : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SceneTreeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SceneTree\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . call_group = (gd_api . godot_method_bind_get_method) (class_name , "call_group\0" . as_ptr () as * const c_char) ; table . call_group_flags = (gd_api . godot_method_bind_get_method) (class_name , "call_group_flags\0" . as_ptr () as * const c_char) ; table . change_scene = (gd_api . godot_method_bind_get_method) (class_name , "change_scene\0" . as_ptr () as * const c_char) ; table . change_scene_to = (gd_api . godot_method_bind_get_method) (class_name , "change_scene_to\0" . as_ptr () as * const c_char) ; table . create_timer = (gd_api . godot_method_bind_get_method) (class_name , "create_timer\0" . as_ptr () as * const c_char) ; table . create_tween = (gd_api . godot_method_bind_get_method) (class_name , "create_tween\0" . as_ptr () as * const c_char) ; table . get_current_scene = (gd_api . godot_method_bind_get_method) (class_name , "get_current_scene\0" . as_ptr () as * const c_char) ; table . get_edited_scene_root = (gd_api . godot_method_bind_get_method) (class_name , "get_edited_scene_root\0" . as_ptr () as * const c_char) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\0" . as_ptr () as * const c_char) ; table . get_multiplayer = (gd_api . godot_method_bind_get_method) (class_name , "get_multiplayer\0" . as_ptr () as * const c_char) ; table . get_network_connected_peers = (gd_api . godot_method_bind_get_method) (class_name , "get_network_connected_peers\0" . as_ptr () as * const c_char) ; table . get_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_network_peer\0" . as_ptr () as * const c_char) ; table . get_network_unique_id = (gd_api . godot_method_bind_get_method) (class_name , "get_network_unique_id\0" . as_ptr () as * const c_char) ; table . get_node_count = (gd_api . godot_method_bind_get_method) (class_name , "get_node_count\0" . as_ptr () as * const c_char) ; table . get_nodes_in_group = (gd_api . godot_method_bind_get_method) (class_name , "get_nodes_in_group\0" . as_ptr () as * const c_char) ; table . get_processed_tweens = (gd_api . godot_method_bind_get_method) (class_name , "get_processed_tweens\0" . as_ptr () as * const c_char) ; table . get_root = (gd_api . godot_method_bind_get_method) (class_name , "get_root\0" . as_ptr () as * const c_char) ; table . get_rpc_sender_id = (gd_api . godot_method_bind_get_method) (class_name , "get_rpc_sender_id\0" . as_ptr () as * const c_char) ; table . has_group = (gd_api . godot_method_bind_get_method) (class_name , "has_group\0" . as_ptr () as * const c_char) ; table . has_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "has_network_peer\0" . as_ptr () as * const c_char) ; table . is_auto_accept_quit = (gd_api . godot_method_bind_get_method) (class_name , "is_auto_accept_quit\0" . as_ptr () as * const c_char) ; table . is_debugging_collisions_hint = (gd_api . godot_method_bind_get_method) (class_name , "is_debugging_collisions_hint\0" . as_ptr () as * const c_char) ; table . is_debugging_navigation_hint = (gd_api . godot_method_bind_get_method) (class_name , "is_debugging_navigation_hint\0" . as_ptr () as * const c_char) ; table . is_input_handled = (gd_api . godot_method_bind_get_method) (class_name , "is_input_handled\0" . as_ptr () as * const c_char) ; table . is_multiplayer_poll_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_multiplayer_poll_enabled\0" . as_ptr () as * const c_char) ; table . is_network_server = (gd_api . godot_method_bind_get_method) (class_name , "is_network_server\0" . as_ptr () as * const c_char) ; table . is_paused = (gd_api . godot_method_bind_get_method) (class_name , "is_paused\0" . as_ptr () as * const c_char) ; table . is_physics_interpolation_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_physics_interpolation_enabled\0" . as_ptr () as * const c_char) ; table . is_quit_on_go_back = (gd_api . godot_method_bind_get_method) (class_name , "is_quit_on_go_back\0" . as_ptr () as * const c_char) ; table . is_refusing_new_network_connections = (gd_api . godot_method_bind_get_method) (class_name , "is_refusing_new_network_connections\0" . as_ptr () as * const c_char) ; table . is_using_font_oversampling = (gd_api . godot_method_bind_get_method) (class_name , "is_using_font_oversampling\0" . as_ptr () as * const c_char) ; table . notify_group = (gd_api . godot_method_bind_get_method) (class_name , "notify_group\0" . as_ptr () as * const c_char) ; table . notify_group_flags = (gd_api . godot_method_bind_get_method) (class_name , "notify_group_flags\0" . as_ptr () as * const c_char) ; table . queue_delete = (gd_api . godot_method_bind_get_method) (class_name , "queue_delete\0" . as_ptr () as * const c_char) ; table . quit = (gd_api . godot_method_bind_get_method) (class_name , "quit\0" . as_ptr () as * const c_char) ; table . reload_current_scene = (gd_api . godot_method_bind_get_method) (class_name , "reload_current_scene\0" . as_ptr () as * const c_char) ; table . set_auto_accept_quit = (gd_api . godot_method_bind_get_method) (class_name , "set_auto_accept_quit\0" . as_ptr () as * const c_char) ; table . set_current_scene = (gd_api . godot_method_bind_get_method) (class_name , "set_current_scene\0" . as_ptr () as * const c_char) ; table . set_debug_collisions_hint = (gd_api . godot_method_bind_get_method) (class_name , "set_debug_collisions_hint\0" . as_ptr () as * const c_char) ; table . set_debug_navigation_hint = (gd_api . godot_method_bind_get_method) (class_name , "set_debug_navigation_hint\0" . as_ptr () as * const c_char) ; table . set_edited_scene_root = (gd_api . godot_method_bind_get_method) (class_name , "set_edited_scene_root\0" . as_ptr () as * const c_char) ; table . set_group = (gd_api . godot_method_bind_get_method) (class_name , "set_group\0" . as_ptr () as * const c_char) ; table . set_group_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_group_flags\0" . as_ptr () as * const c_char) ; table . set_input_as_handled = (gd_api . godot_method_bind_get_method) (class_name , "set_input_as_handled\0" . as_ptr () as * const c_char) ; table . set_multiplayer = (gd_api . godot_method_bind_get_method) (class_name , "set_multiplayer\0" . as_ptr () as * const c_char) ; table . set_multiplayer_poll_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_multiplayer_poll_enabled\0" . as_ptr () as * const c_char) ; table . set_network_peer = (gd_api . godot_method_bind_get_method) (class_name , "set_network_peer\0" . as_ptr () as * const c_char) ; table . set_pause = (gd_api . godot_method_bind_get_method) (class_name , "set_pause\0" . as_ptr () as * const c_char) ; table . set_physics_interpolation_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_interpolation_enabled\0" . as_ptr () as * const c_char) ; table . set_quit_on_go_back = (gd_api . godot_method_bind_get_method) (class_name , "set_quit_on_go_back\0" . as_ptr () as * const c_char) ; table . set_refuse_new_network_connections = (gd_api . godot_method_bind_get_method) (class_name , "set_refuse_new_network_connections\0" . as_ptr () as * const c_char) ; table . set_screen_stretch = (gd_api . godot_method_bind_get_method) (class_name , "set_screen_stretch\0" . as_ptr () as * const c_char) ; table . set_use_font_oversampling = (gd_api . godot_method_bind_get_method) (class_name , "set_use_font_oversampling\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::scene_tree::private::SceneTree;
            
            pub(crate) mod scene_tree_timer {
                # ! [doc = "This module contains types related to the API class [`SceneTreeTimer`][super::SceneTreeTimer]."] pub (crate) mod private { # [doc = "`core class SceneTreeTimer` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_scenetreetimer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSceneTreeTimer inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SceneTreeTimer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SceneTreeTimer ; impl SceneTreeTimer { # [doc = "The time remaining (in seconds)."] # [doc = ""] # [inline] pub fn time_left (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTimerMethodTable :: get (get_api ()) . get_time_left ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The time remaining (in seconds)."] # [doc = ""] # [inline] pub fn set_time_left (& self , time : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTimerMethodTable :: get (get_api ()) . set_time_left ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , time as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SceneTreeTimer { } unsafe impl GodotObject for SceneTreeTimer { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SceneTreeTimer" } } impl std :: ops :: Deref for SceneTreeTimer { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SceneTreeTimer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for SceneTreeTimer { } unsafe impl SubClass < crate :: generated :: Object > for SceneTreeTimer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SceneTreeTimerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_time_left : * mut sys :: godot_method_bind , pub set_time_left : * mut sys :: godot_method_bind } impl SceneTreeTimerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SceneTreeTimerMethodTable = SceneTreeTimerMethodTable { class_constructor : None , get_time_left : 0 as * mut sys :: godot_method_bind , set_time_left : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SceneTreeTimerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SceneTreeTimer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_time_left = (gd_api . godot_method_bind_get_method) (class_name , "get_time_left\0" . as_ptr () as * const c_char) ; table . set_time_left = (gd_api . godot_method_bind_get_method) (class_name , "set_time_left\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::scene_tree_timer::private::SceneTreeTimer;
            
            pub mod scene_tree_tween {
                # ! [doc = "This module contains types related to the API class [`SceneTreeTween`][super::SceneTreeTween]."] pub (crate) mod private { # [doc = "`core class SceneTreeTween` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`scene_tree_tween`][super::scene_tree_tween] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_scenetreetween.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSceneTreeTween inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SceneTreeTween { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SceneTreeTween ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TweenPauseMode (pub i64) ; impl TweenPauseMode { pub const BOUND : TweenPauseMode = TweenPauseMode (0i64) ; pub const STOP : TweenPauseMode = TweenPauseMode (1i64) ; pub const PROCESS : TweenPauseMode = TweenPauseMode (2i64) ; } impl From < i64 > for TweenPauseMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TweenPauseMode > for i64 { # [inline] fn from (v : TweenPauseMode) -> Self { v . 0 } } impl FromVariant for TweenPauseMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SceneTreeTween { pub const TWEEN_PAUSE_BOUND : i64 = 0i64 ; pub const TWEEN_PAUSE_STOP : i64 = 1i64 ; pub const TWEEN_PAUSE_PROCESS : i64 = 2i64 ; } impl SceneTreeTween { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SceneTreeTweenMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Binds this [`SceneTreeTween`][SceneTreeTween] with the given `node`. [`SceneTreeTween`][SceneTreeTween]s are processed directly by the [`SceneTree`][SceneTree], so they run independently of the animated nodes. When you bind a [`Node`][Node] with the [`SceneTreeTween`][SceneTreeTween], the [`SceneTreeTween`][SceneTreeTween] will halt the animation when the object is not inside tree and the [`SceneTreeTween`][SceneTreeTween] will be automatically killed when the bound object is freed. Also [`TWEEN_PAUSE_BOUND`][Self::TWEEN_PAUSE_BOUND] will make the pausing behavior dependent on the bound node.\nFor a shorter way to create and bind a [`SceneTreeTween`][SceneTreeTween], you can use [`Node.create_tween`][Node::create_tween]."] # [doc = ""] # [inline] pub fn bind_node (& self , node : impl AsArg < crate :: generated :: Node >) -> Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . bind_node ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , node . as_arg_ptr ()) ; < Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nUsed to chain two [`Tweener`][Tweener]s after [`set_parallel`][Self::set_parallel] is called with `true`.\n```gdscript\nvar tween = create_tween().set_parallel(true)\ntween.tween_property(...)\ntween.tween_property(...) # Will run parallelly with above.\ntween.chain().tween_property(...) # Will run after two above are finished.\n```"] # [doc = ""] # [inline] pub fn chain (& self) -> Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . chain ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Processes the [`SceneTreeTween`][SceneTreeTween] by the given `delta` value, in seconds. This is mostly useful for manual control when the [`SceneTreeTween`][SceneTreeTween] is paused. It can also be used to end the [`SceneTreeTween`][SceneTreeTween] animation immediately, by setting `delta` longer than the whole duration of the [`SceneTreeTween`][SceneTreeTween] animation.\nReturns `true` if the [`SceneTreeTween`][SceneTreeTween] still has [`Tweener`][Tweener]s that haven't finished.\n**Note:** The [`SceneTreeTween`][SceneTreeTween] will become invalid in the next processing frame after its animation finishes. Calling [`stop`][Self::stop] after performing [`custom_step`][Self::custom_step] instead keeps and resets the [`SceneTreeTween`][SceneTreeTween]."] # [doc = ""] # [inline] pub fn custom_step (& self , delta : f64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . custom_step ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , delta as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the total time in seconds the [`SceneTreeTween`][SceneTreeTween] has been animating (i.e. the time since it started, not counting pauses etc.). The time is affected by [`set_speed_scale`][Self::set_speed_scale], and [`stop`][Self::stop] will reset it to `0`.\n**Note:** As it results from accumulating frame deltas, the time returned after the [`SceneTreeTween`][SceneTreeTween] has finished animating will be slightly greater than the actual [`SceneTreeTween`][SceneTreeTween] duration."] # [doc = ""] # [inline] pub fn get_total_elapsed_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . get_total_elapsed_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "This method can be used for manual interpolation of a value, when you don't want [`SceneTreeTween`][SceneTreeTween] to do animating for you. It's similar to [method @GDScript.lerp], but with support for custom transition and easing.\n`initial_value` is the starting value of the interpolation.\n`delta_value` is the change of the value in the interpolation, i.e. it's equal to `final_value - initial_value`.\n`elapsed_time` is the time in seconds that passed after the interpolation started and it's used to control the position of the interpolation. E.g. when it's equal to half of the `duration`, the interpolated value will be halfway between initial and final values. This value can also be greater than `duration` or lower than 0, which will extrapolate the value.\n`duration` is the total time of the interpolation.\n**Note:** If `duration` is equal to `0`, the method will always return the final value, regardless of `elapsed_time` provided."] # [doc = ""] # [inline] pub fn interpolate_value (& self , initial_value : impl OwnedToVariant , delta_value : impl OwnedToVariant , elapsed_time : f64 , duration : f64 , trans_type : i64 , ease_type : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . interpolate_value ; let ret = crate :: icalls :: icallvar__var_var_f64_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , initial_value . owned_to_variant () , delta_value . owned_to_variant () , elapsed_time as _ , duration as _ , trans_type as _ , ease_type as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns whether the [`SceneTreeTween`][SceneTreeTween] is currently running, i.e. it wasn't paused and it's not finished."] # [doc = ""] # [inline] pub fn is_running (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . is_running ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether the [`SceneTreeTween`][SceneTreeTween] is valid. A valid [`SceneTreeTween`][SceneTreeTween] is a [`SceneTreeTween`][SceneTreeTween] contained by the scene tree (i.e. the array from [`SceneTree.get_processed_tweens`][SceneTree::get_processed_tweens] will contain this [`SceneTreeTween`][SceneTreeTween]). A [`SceneTreeTween`][SceneTreeTween] might become invalid when it has finished tweening, is killed, or when created with `SceneTreeTween.new()`. Invalid [`SceneTreeTween`][SceneTreeTween]s can't have [`Tweener`][Tweener]s appended. You can however still use [`interpolate_value`][Self::interpolate_value]."] # [doc = ""] # [inline] pub fn is_valid (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . is_valid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Aborts all tweening operations and invalidates the [`SceneTreeTween`][SceneTreeTween]."] # [doc = ""] # [inline] pub fn kill (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . kill ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nMakes the next [`Tweener`][Tweener] run parallelly to the previous one. Example:\n```gdscript\nvar tween = create_tween()\ntween.tween_property(...)\ntween.parallel().tween_property(...)\ntween.parallel().tween_property(...)\n```\nAll [`Tweener`][Tweener]s in the example will run at the same time.\nYou can make the [`SceneTreeTween`][SceneTreeTween] parallel by default by using [`set_parallel`][Self::set_parallel]."] # [doc = ""] # [inline] pub fn parallel (& self) -> Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . parallel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Pauses the tweening. The animation can be resumed by using [`play`][Self::play]."] # [doc = ""] # [inline] pub fn pause (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . pause ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Resumes a paused or stopped [`SceneTreeTween`][SceneTreeTween]."] # [doc = ""] # [inline] pub fn play (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . play ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets the default ease type for [`PropertyTweener`][PropertyTweener]s and [`MethodTweener`][MethodTweener]s animated by this [`SceneTreeTween`][SceneTreeTween]."] # [doc = ""] # [inline] pub fn set_ease (& self , ease : i64) -> Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . set_ease ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , ease as _) ; < Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the number of times the tweening sequence will be repeated, i.e. `set_loops(2)` will run the animation twice.\nCalling this method without arguments will make the [`SceneTreeTween`][SceneTreeTween] run infinitely, until either it is killed with [`kill`][Self::kill], the [`SceneTreeTween`][SceneTreeTween]'s bound node is freed, or all the animated objects have been freed (which makes further animation impossible).\n**Warning:** Make sure to always add some duration/delay when using infinite loops. To prevent the game freezing, 0-duration looped animations (e.g. a single [`CallbackTweener`][CallbackTweener] with no delay) are stopped after a small number of loops, which may produce unexpected results. If a [`SceneTreeTween`][SceneTreeTween]'s lifetime depends on some node, always use [`bind_node`][Self::bind_node].\n# Default Arguments\n* `loops` - `0`"] # [doc = ""] # [inline] pub fn set_loops (& self , loops : i64) -> Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . set_loops ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , loops as _) ; < Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `parallel` is `true`, the [`Tweener`][Tweener]s appended after this method will by default run simultaneously, as opposed to sequentially.\n# Default Arguments\n* `parallel` - `true`"] # [doc = ""] # [inline] pub fn set_parallel (& self , parallel : bool) -> Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . set_parallel ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , parallel as _) ; < Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Determines the behavior of the [`SceneTreeTween`][SceneTreeTween] when the [`SceneTree`][SceneTree] is paused. Check [`TweenPauseMode`][TweenPauseMode] for options.\nDefault value is [`TWEEN_PAUSE_BOUND`][Self::TWEEN_PAUSE_BOUND]."] # [doc = ""] # [inline] pub fn set_pause_mode (& self , mode : i64) -> Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . set_pause_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; < Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Determines whether the [`SceneTreeTween`][SceneTreeTween] should run during idle frame (see [`Node._process`][Node::_process]) or physics frame (see [`Node._physics_process`][Node::_physics_process].\nDefault value is [`Tween.TWEEN_PROCESS_IDLE`][Tween::TWEEN_PROCESS_IDLE]."] # [doc = ""] # [inline] pub fn set_process_mode (& self , mode : i64) -> Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . set_process_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; < Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Scales the speed of tweening. This affects all [`Tweener`][Tweener]s and their delays."] # [doc = ""] # [inline] pub fn set_speed_scale (& self , speed : f64) -> Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . set_speed_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , speed as _) ; < Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the default transition type for [`PropertyTweener`][PropertyTweener]s and [`MethodTweener`][MethodTweener]s animated by this [`SceneTreeTween`][SceneTreeTween]."] # [doc = ""] # [inline] pub fn set_trans (& self , trans : i64) -> Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . set_trans ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , trans as _) ; < Option < Ref < crate :: generated :: SceneTreeTween , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Stops the tweening and resets the [`SceneTreeTween`][SceneTreeTween] to its initial state. This will not remove any appended [`Tweener`][Tweener]s."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCreates and appends a [`CallbackTweener`][CallbackTweener]. This method can be used to call an arbitrary method in any object. Use `binds` to bind additional arguments for the call.\nExample: object that keeps shooting every 1 second.\n```gdscript\nvar tween = get_tree().create_tween().set_loops()\ntween.tween_callback(self, \"shoot\").set_delay(1)\n```\nExample: turning a sprite red and then blue, with 2 second delay.\n```gdscript\nvar tween = get_tree().create_tween()\ntween.tween_callback($Sprite, \"set_modulate\", [Color.red]).set_delay(2)\ntween.tween_callback($Sprite, \"set_modulate\", [Color.blue]).set_delay(2)\n```\n# Default Arguments\n* `binds` - `[  ]`"] # [doc = ""] # [inline] pub fn tween_callback (& self , object : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString > , binds : VariantArray) -> Option < Ref < crate :: generated :: CallbackTweener , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . tween_callback ; let ret = crate :: icalls :: icallvar__obj_str_arr (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , method . into () , binds) ; < Option < Ref < crate :: generated :: CallbackTweener , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCreates and appends an [`IntervalTweener`][IntervalTweener]. This method can be used to create delays in the tween animation, as an alternative to using the delay in other [`Tweener`][Tweener]s, or when there's no animation (in which case the [`SceneTreeTween`][SceneTreeTween] acts as a timer). `time` is the length of the interval, in seconds.\nExample: creating an interval in code execution.\n```gdscript\n# ... some code\nyield(create_tween().tween_interval(2), \"finished\")\n# ... more code\n```\nExample: creating an object that moves back and forth and jumps every few seconds.\n```gdscript\nvar tween = create_tween().set_loops()\ntween.tween_property($Sprite, \"position:x\", 200.0, 1).as_relative()\ntween.tween_callback(self, \"jump\")\ntween.tween_interval(2)\ntween.tween_property($Sprite, \"position:x\", -200.0, 1).as_relative()\ntween.tween_callback(self, \"jump\")\ntween.tween_interval(2)\n```"] # [doc = ""] # [inline] pub fn tween_interval (& self , time : f64) -> Option < Ref < crate :: generated :: IntervalTweener , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . tween_interval ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , time as _) ; < Option < Ref < crate :: generated :: IntervalTweener , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCreates and appends a [`MethodTweener`][MethodTweener]. This method is similar to a combination of [`tween_callback`][Self::tween_callback] and [`tween_property`][Self::tween_property]. It calls a method over time with a tweened value provided as an argument. The value is tweened between `from` and `to` over the time specified by `duration`, in seconds. Use `binds` to bind additional arguments for the call. You can use [`MethodTweener.set_ease`][MethodTweener::set_ease] and [`MethodTweener.set_trans`][MethodTweener::set_trans] to tweak the easing and transition of the value or [`MethodTweener.set_delay`][MethodTweener::set_delay] to delay the tweening.\nExample: making a 3D object look from one point to another point.\n```gdscript\nvar tween = create_tween()\ntween.tween_method(self, \"look_at\", Vector3(-1, 0, -1), Vector3(1, 0, -1), 1, [Vector3.UP]) # The look_at() method takes up vector as second argument.\n```\nExample: setting a text of a [`Label`][Label], using an intermediate method and after a delay.\n```gdscript\nfunc _ready():\n    var tween = create_tween()\n    tween.tween_method(self, \"set_label_text\", 0, 10, 1).set_delay(1)\n\nfunc set_label_text(value: int):\n    $Label.text = \"Counting \" + str(value)\n```\n# Default Arguments\n* `binds` - `[  ]`"] # [doc = ""] # [inline] pub fn tween_method (& self , object : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString > , from : impl OwnedToVariant , to : impl OwnedToVariant , duration : f64 , binds : VariantArray) -> Option < Ref < crate :: generated :: MethodTweener , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . tween_method ; let ret = crate :: icalls :: icallvar__obj_str_var_var_f64_arr (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , method . into () , from . owned_to_variant () , to . owned_to_variant () , duration as _ , binds) ; < Option < Ref < crate :: generated :: MethodTweener , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCreates and appends a [`PropertyTweener`][PropertyTweener]. This method tweens a `property` of an `object` between an initial value and `final_val` in a span of time equal to `duration`, in seconds. The initial value by default is the property's value at the time the tweening of the [`PropertyTweener`][PropertyTweener] starts. For example:\n```gdscript\nvar tween = create_tween()\ntween.tween_property($Sprite, \"position\", Vector2(100, 200), 1)\ntween.tween_property($Sprite, \"position\", Vector2(200, 300), 1)\n```\nwill move the sprite to position (100, 200) and then to (200, 300). If you use [`PropertyTweener.from`][PropertyTweener::from] or [`PropertyTweener.from_current`][PropertyTweener::from_current], the starting position will be overwritten by the given value instead. See other methods in [`PropertyTweener`][PropertyTweener] to see how the tweening can be tweaked further.\n**Note:** You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using `\"property:component\"` (eg. `position:x`), where it would only apply to that particular component.\nExample: moving object twice from the same position, with different transition types.\n```gdscript\nvar tween = create_tween()\ntween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1).as_relative().set_trans(Tween.TRANS_SINE)\ntween.tween_property($Sprite, \"position\", Vector2.RIGHT * 300, 1).as_relative().from_current().set_trans(Tween.TRANS_EXPO)\n```"] # [doc = ""] # [inline] pub fn tween_property (& self , object : impl AsArg < crate :: generated :: Object > , property : impl Into < NodePath > , final_val : impl OwnedToVariant , duration : f64) -> Option < Ref < crate :: generated :: PropertyTweener , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SceneTreeTweenMethodTable :: get (get_api ()) . tween_property ; let ret = crate :: icalls :: icallvar__obj_nodepath_var_f64 (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into () , final_val . owned_to_variant () , duration as _) ; < Option < Ref < crate :: generated :: PropertyTweener , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for SceneTreeTween { } unsafe impl GodotObject for SceneTreeTween { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SceneTreeTween" } } impl std :: ops :: Deref for SceneTreeTween { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SceneTreeTween { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for SceneTreeTween { } unsafe impl SubClass < crate :: generated :: Object > for SceneTreeTween { } impl Instanciable for SceneTreeTween { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { SceneTreeTween :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SceneTreeTweenMethodTable { pub class_constructor : sys :: godot_class_constructor , pub bind_node : * mut sys :: godot_method_bind , pub chain : * mut sys :: godot_method_bind , pub custom_step : * mut sys :: godot_method_bind , pub get_total_elapsed_time : * mut sys :: godot_method_bind , pub interpolate_value : * mut sys :: godot_method_bind , pub is_running : * mut sys :: godot_method_bind , pub is_valid : * mut sys :: godot_method_bind , pub kill : * mut sys :: godot_method_bind , pub parallel : * mut sys :: godot_method_bind , pub pause : * mut sys :: godot_method_bind , pub play : * mut sys :: godot_method_bind , pub set_ease : * mut sys :: godot_method_bind , pub set_loops : * mut sys :: godot_method_bind , pub set_parallel : * mut sys :: godot_method_bind , pub set_pause_mode : * mut sys :: godot_method_bind , pub set_process_mode : * mut sys :: godot_method_bind , pub set_speed_scale : * mut sys :: godot_method_bind , pub set_trans : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind , pub tween_callback : * mut sys :: godot_method_bind , pub tween_interval : * mut sys :: godot_method_bind , pub tween_method : * mut sys :: godot_method_bind , pub tween_property : * mut sys :: godot_method_bind } impl SceneTreeTweenMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SceneTreeTweenMethodTable = SceneTreeTweenMethodTable { class_constructor : None , bind_node : 0 as * mut sys :: godot_method_bind , chain : 0 as * mut sys :: godot_method_bind , custom_step : 0 as * mut sys :: godot_method_bind , get_total_elapsed_time : 0 as * mut sys :: godot_method_bind , interpolate_value : 0 as * mut sys :: godot_method_bind , is_running : 0 as * mut sys :: godot_method_bind , is_valid : 0 as * mut sys :: godot_method_bind , kill : 0 as * mut sys :: godot_method_bind , parallel : 0 as * mut sys :: godot_method_bind , pause : 0 as * mut sys :: godot_method_bind , play : 0 as * mut sys :: godot_method_bind , set_ease : 0 as * mut sys :: godot_method_bind , set_loops : 0 as * mut sys :: godot_method_bind , set_parallel : 0 as * mut sys :: godot_method_bind , set_pause_mode : 0 as * mut sys :: godot_method_bind , set_process_mode : 0 as * mut sys :: godot_method_bind , set_speed_scale : 0 as * mut sys :: godot_method_bind , set_trans : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind , tween_callback : 0 as * mut sys :: godot_method_bind , tween_interval : 0 as * mut sys :: godot_method_bind , tween_method : 0 as * mut sys :: godot_method_bind , tween_property : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SceneTreeTweenMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SceneTreeTween\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . bind_node = (gd_api . godot_method_bind_get_method) (class_name , "bind_node\0" . as_ptr () as * const c_char) ; table . chain = (gd_api . godot_method_bind_get_method) (class_name , "chain\0" . as_ptr () as * const c_char) ; table . custom_step = (gd_api . godot_method_bind_get_method) (class_name , "custom_step\0" . as_ptr () as * const c_char) ; table . get_total_elapsed_time = (gd_api . godot_method_bind_get_method) (class_name , "get_total_elapsed_time\0" . as_ptr () as * const c_char) ; table . interpolate_value = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_value\0" . as_ptr () as * const c_char) ; table . is_running = (gd_api . godot_method_bind_get_method) (class_name , "is_running\0" . as_ptr () as * const c_char) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\0" . as_ptr () as * const c_char) ; table . kill = (gd_api . godot_method_bind_get_method) (class_name , "kill\0" . as_ptr () as * const c_char) ; table . parallel = (gd_api . godot_method_bind_get_method) (class_name , "parallel\0" . as_ptr () as * const c_char) ; table . pause = (gd_api . godot_method_bind_get_method) (class_name , "pause\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . set_ease = (gd_api . godot_method_bind_get_method) (class_name , "set_ease\0" . as_ptr () as * const c_char) ; table . set_loops = (gd_api . godot_method_bind_get_method) (class_name , "set_loops\0" . as_ptr () as * const c_char) ; table . set_parallel = (gd_api . godot_method_bind_get_method) (class_name , "set_parallel\0" . as_ptr () as * const c_char) ; table . set_pause_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_pause_mode\0" . as_ptr () as * const c_char) ; table . set_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_process_mode\0" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\0" . as_ptr () as * const c_char) ; table . set_trans = (gd_api . godot_method_bind_get_method) (class_name , "set_trans\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; table . tween_callback = (gd_api . godot_method_bind_get_method) (class_name , "tween_callback\0" . as_ptr () as * const c_char) ; table . tween_interval = (gd_api . godot_method_bind_get_method) (class_name , "tween_interval\0" . as_ptr () as * const c_char) ; table . tween_method = (gd_api . godot_method_bind_get_method) (class_name , "tween_method\0" . as_ptr () as * const c_char) ; table . tween_property = (gd_api . godot_method_bind_get_method) (class_name , "tween_property\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::scene_tree_tween::private::SceneTreeTween;
            
            pub(crate) mod script {
                # ! [doc = "This module contains types related to the API class [`Script`][super::Script]."] pub (crate) mod private { # [doc = "`core class Script` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_script.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nScript inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Script { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Script ; impl Script { # [doc = "Returns `true` if the script can be instanced."] # [doc = ""] # [inline] pub fn can_instance (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . can_instance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the script directly inherited by this script."] # [doc = ""] # [inline] pub fn get_base_script (& self) -> Option < Ref < crate :: generated :: Script , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . get_base_script ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Script , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the script's base type."] # [doc = ""] # [inline] pub fn get_instance_base_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . get_instance_base_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the default value of the specified property."] # [doc = ""] # [inline] pub fn get_property_default_value (& self , property : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . get_property_default_value ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , property . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a dictionary containing constant names and their values."] # [doc = ""] # [inline] pub fn get_script_constant_map (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . get_script_constant_map ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the list of methods in this [`Script`][Script]."] # [doc = ""] # [inline] pub fn get_script_method_list (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . get_script_method_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the list of properties in this [`Script`][Script]."] # [doc = ""] # [inline] pub fn get_script_property_list (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . get_script_property_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the list of user signals defined in this [`Script`][Script]."] # [doc = ""] # [inline] pub fn get_script_signal_list (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . get_script_signal_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The script source code or an empty string if source code is not available. When set, does not reload the class implementation automatically."] # [doc = ""] # [inline] pub fn source_code (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . get_source_code ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the script, or a base class, defines a signal with the given name."] # [doc = ""] # [inline] pub fn has_script_signal (& self , signal_name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . has_script_signal ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , signal_name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the script contains non-empty source code."] # [doc = ""] # [inline] pub fn has_source_code (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . has_source_code ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if `base_object` is an instance of this script."] # [doc = ""] # [inline] pub fn instance_has (& self , base_object : impl AsArg < crate :: generated :: Object >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . instance_has ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , base_object . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the script is a tool script. A tool script can run in the editor."] # [doc = ""] # [inline] pub fn is_tool (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . is_tool ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Reloads the script's class implementation. Returns an error code.\n# Default Arguments\n* `keep_state` - `false`"] # [doc = ""] # [inline] pub fn reload (& self , keep_state : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . reload ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , keep_state as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "The script source code or an empty string if source code is not available. When set, does not reload the class implementation automatically."] # [doc = ""] # [inline] pub fn set_source_code (& self , source : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptMethodTable :: get (get_api ()) . set_source_code ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , source . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Script { } unsafe impl GodotObject for Script { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Script" } } impl std :: ops :: Deref for Script { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Script { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Script { } unsafe impl SubClass < crate :: generated :: Reference > for Script { } unsafe impl SubClass < crate :: generated :: Object > for Script { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ScriptMethodTable { pub class_constructor : sys :: godot_class_constructor , pub can_instance : * mut sys :: godot_method_bind , pub get_base_script : * mut sys :: godot_method_bind , pub get_instance_base_type : * mut sys :: godot_method_bind , pub get_property_default_value : * mut sys :: godot_method_bind , pub get_script_constant_map : * mut sys :: godot_method_bind , pub get_script_method_list : * mut sys :: godot_method_bind , pub get_script_property_list : * mut sys :: godot_method_bind , pub get_script_signal_list : * mut sys :: godot_method_bind , pub get_source_code : * mut sys :: godot_method_bind , pub has_script_signal : * mut sys :: godot_method_bind , pub has_source_code : * mut sys :: godot_method_bind , pub instance_has : * mut sys :: godot_method_bind , pub is_tool : * mut sys :: godot_method_bind , pub reload : * mut sys :: godot_method_bind , pub set_source_code : * mut sys :: godot_method_bind } impl ScriptMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ScriptMethodTable = ScriptMethodTable { class_constructor : None , can_instance : 0 as * mut sys :: godot_method_bind , get_base_script : 0 as * mut sys :: godot_method_bind , get_instance_base_type : 0 as * mut sys :: godot_method_bind , get_property_default_value : 0 as * mut sys :: godot_method_bind , get_script_constant_map : 0 as * mut sys :: godot_method_bind , get_script_method_list : 0 as * mut sys :: godot_method_bind , get_script_property_list : 0 as * mut sys :: godot_method_bind , get_script_signal_list : 0 as * mut sys :: godot_method_bind , get_source_code : 0 as * mut sys :: godot_method_bind , has_script_signal : 0 as * mut sys :: godot_method_bind , has_source_code : 0 as * mut sys :: godot_method_bind , instance_has : 0 as * mut sys :: godot_method_bind , is_tool : 0 as * mut sys :: godot_method_bind , reload : 0 as * mut sys :: godot_method_bind , set_source_code : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ScriptMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Script\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . can_instance = (gd_api . godot_method_bind_get_method) (class_name , "can_instance\0" . as_ptr () as * const c_char) ; table . get_base_script = (gd_api . godot_method_bind_get_method) (class_name , "get_base_script\0" . as_ptr () as * const c_char) ; table . get_instance_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_instance_base_type\0" . as_ptr () as * const c_char) ; table . get_property_default_value = (gd_api . godot_method_bind_get_method) (class_name , "get_property_default_value\0" . as_ptr () as * const c_char) ; table . get_script_constant_map = (gd_api . godot_method_bind_get_method) (class_name , "get_script_constant_map\0" . as_ptr () as * const c_char) ; table . get_script_method_list = (gd_api . godot_method_bind_get_method) (class_name , "get_script_method_list\0" . as_ptr () as * const c_char) ; table . get_script_property_list = (gd_api . godot_method_bind_get_method) (class_name , "get_script_property_list\0" . as_ptr () as * const c_char) ; table . get_script_signal_list = (gd_api . godot_method_bind_get_method) (class_name , "get_script_signal_list\0" . as_ptr () as * const c_char) ; table . get_source_code = (gd_api . godot_method_bind_get_method) (class_name , "get_source_code\0" . as_ptr () as * const c_char) ; table . has_script_signal = (gd_api . godot_method_bind_get_method) (class_name , "has_script_signal\0" . as_ptr () as * const c_char) ; table . has_source_code = (gd_api . godot_method_bind_get_method) (class_name , "has_source_code\0" . as_ptr () as * const c_char) ; table . instance_has = (gd_api . godot_method_bind_get_method) (class_name , "instance_has\0" . as_ptr () as * const c_char) ; table . is_tool = (gd_api . godot_method_bind_get_method) (class_name , "is_tool\0" . as_ptr () as * const c_char) ; table . reload = (gd_api . godot_method_bind_get_method) (class_name , "reload\0" . as_ptr () as * const c_char) ; table . set_source_code = (gd_api . godot_method_bind_get_method) (class_name , "set_source_code\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::script::private::Script;
            
            pub(crate) mod script_create_dialog {
                # ! [doc = "This module contains types related to the API class [`ScriptCreateDialog`][super::ScriptCreateDialog]."] pub (crate) mod private { # [doc = "`tools class ScriptCreateDialog` inherits `ConfirmationDialog` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_scriptcreatedialog.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nScriptCreateDialog inherits methods from:\n - [ConfirmationDialog](struct.ConfirmationDialog.html)\n - [AcceptDialog](struct.AcceptDialog.html)\n - [WindowDialog](struct.WindowDialog.html)\n - [Popup](struct.Popup.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ScriptCreateDialog { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ScriptCreateDialog ; impl ScriptCreateDialog { # [doc = "Prefills required fields to configure the ScriptCreateDialog for use.\n# Default Arguments\n* `built_in_enabled` - `true`\n* `load_enabled` - `true`"] # [doc = ""] # [inline] pub fn config (& self , inherits : impl Into < GodotString > , path : impl Into < GodotString > , built_in_enabled : bool , load_enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptCreateDialogMethodTable :: get (get_api ()) . config ; let ret = crate :: icalls :: icallvar__str_str_bool_bool (method_bind , self . this . sys () . as_ptr () , inherits . into () , path . into () , built_in_enabled as _ , load_enabled as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ScriptCreateDialog { } unsafe impl GodotObject for ScriptCreateDialog { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ScriptCreateDialog" } } impl QueueFree for ScriptCreateDialog { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ScriptCreateDialog { type Target = crate :: generated :: ConfirmationDialog ; # [inline] fn deref (& self) -> & crate :: generated :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ScriptCreateDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: ConfirmationDialog { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: ConfirmationDialog > for ScriptCreateDialog { } unsafe impl SubClass < crate :: generated :: AcceptDialog > for ScriptCreateDialog { } unsafe impl SubClass < crate :: generated :: WindowDialog > for ScriptCreateDialog { } unsafe impl SubClass < crate :: generated :: Popup > for ScriptCreateDialog { } unsafe impl SubClass < crate :: generated :: Control > for ScriptCreateDialog { } unsafe impl SubClass < crate :: generated :: CanvasItem > for ScriptCreateDialog { } unsafe impl SubClass < crate :: generated :: Node > for ScriptCreateDialog { } unsafe impl SubClass < crate :: generated :: Object > for ScriptCreateDialog { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ScriptCreateDialogMethodTable { pub class_constructor : sys :: godot_class_constructor , pub config : * mut sys :: godot_method_bind } impl ScriptCreateDialogMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ScriptCreateDialogMethodTable = ScriptCreateDialogMethodTable { class_constructor : None , config : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ScriptCreateDialogMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ScriptCreateDialog\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . config = (gd_api . godot_method_bind_get_method) (class_name , "config\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::script_create_dialog::private::ScriptCreateDialog;
            
            pub(crate) mod script_editor {
                # ! [doc = "This module contains types related to the API class [`ScriptEditor`][super::ScriptEditor]."] pub (crate) mod private { # [doc = "`tools class ScriptEditor` inherits `PanelContainer` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_scripteditor.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nScriptEditor inherits methods from:\n - [PanelContainer](struct.PanelContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ScriptEditor { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ScriptEditor ; impl ScriptEditor { # [doc = ""] # [doc = ""] # [inline] pub fn can_drop_data_fw (& self , point : Vector2 , data : impl OwnedToVariant , from : impl AsArg < crate :: generated :: Control >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . can_drop_data_fw ; let ret = crate :: icalls :: icallvar__vec2_var_obj (method_bind , self . this . sys () . as_ptr () , point , data . owned_to_variant () , from . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn drop_data_fw (& self , point : Vector2 , data : impl OwnedToVariant , from : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . drop_data_fw ; let ret = crate :: icalls :: icallvar__vec2_var_obj (method_bind , self . this . sys () . as_ptr () , point , data . owned_to_variant () , from . as_arg_ptr ()) ; } } # [doc = "Returns a [`Script`][Script] that is currently active in editor."] # [doc = ""] # [inline] pub fn get_current_script (& self) -> Option < Ref < crate :: generated :: Script , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . get_current_script ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Script , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_drag_data_fw (& self , point : Vector2 , from : impl AsArg < crate :: generated :: Control >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . get_drag_data_fw ; let ret = crate :: icalls :: icallvar__vec2_obj (method_bind , self . this . sys () . as_ptr () , point , from . as_arg_ptr ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array with all [`Script`][Script] objects which are currently open in editor."] # [doc = ""] # [inline] pub fn get_open_scripts (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . get_open_scripts ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Goes to the specified line in the current script."] # [doc = ""] # [inline] pub fn goto_line (& self , line_number : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . goto_line ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line_number as _) ; } } # [doc = "Opens the script create dialog. The script will extend `base_name`. The file extension can be omitted from `base_path`. It will be added based on the selected scripting language."] # [doc = ""] # [inline] pub fn open_script_create_dialog (& self , base_name : impl Into < GodotString > , base_path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . open_script_create_dialog ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , base_name . into () , base_path . into ()) ; } } # [doc = "Reload all currently opened scripts from disk in case the file contents are newer."] # [doc = ""] # [inline] pub fn reload_scripts (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScriptEditorMethodTable :: get (get_api ()) . reload_scripts ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ScriptEditor { } unsafe impl GodotObject for ScriptEditor { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ScriptEditor" } } impl QueueFree for ScriptEditor { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ScriptEditor { type Target = crate :: generated :: PanelContainer ; # [inline] fn deref (& self) -> & crate :: generated :: PanelContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ScriptEditor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PanelContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PanelContainer > for ScriptEditor { } unsafe impl SubClass < crate :: generated :: Container > for ScriptEditor { } unsafe impl SubClass < crate :: generated :: Control > for ScriptEditor { } unsafe impl SubClass < crate :: generated :: CanvasItem > for ScriptEditor { } unsafe impl SubClass < crate :: generated :: Node > for ScriptEditor { } unsafe impl SubClass < crate :: generated :: Object > for ScriptEditor { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ScriptEditorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub can_drop_data_fw : * mut sys :: godot_method_bind , pub drop_data_fw : * mut sys :: godot_method_bind , pub get_current_script : * mut sys :: godot_method_bind , pub get_drag_data_fw : * mut sys :: godot_method_bind , pub get_open_scripts : * mut sys :: godot_method_bind , pub goto_line : * mut sys :: godot_method_bind , pub open_script_create_dialog : * mut sys :: godot_method_bind , pub reload_scripts : * mut sys :: godot_method_bind } impl ScriptEditorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ScriptEditorMethodTable = ScriptEditorMethodTable { class_constructor : None , can_drop_data_fw : 0 as * mut sys :: godot_method_bind , drop_data_fw : 0 as * mut sys :: godot_method_bind , get_current_script : 0 as * mut sys :: godot_method_bind , get_drag_data_fw : 0 as * mut sys :: godot_method_bind , get_open_scripts : 0 as * mut sys :: godot_method_bind , goto_line : 0 as * mut sys :: godot_method_bind , open_script_create_dialog : 0 as * mut sys :: godot_method_bind , reload_scripts : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ScriptEditorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ScriptEditor\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . can_drop_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "can_drop_data_fw\0" . as_ptr () as * const c_char) ; table . drop_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "drop_data_fw\0" . as_ptr () as * const c_char) ; table . get_current_script = (gd_api . godot_method_bind_get_method) (class_name , "get_current_script\0" . as_ptr () as * const c_char) ; table . get_drag_data_fw = (gd_api . godot_method_bind_get_method) (class_name , "get_drag_data_fw\0" . as_ptr () as * const c_char) ; table . get_open_scripts = (gd_api . godot_method_bind_get_method) (class_name , "get_open_scripts\0" . as_ptr () as * const c_char) ; table . goto_line = (gd_api . godot_method_bind_get_method) (class_name , "goto_line\0" . as_ptr () as * const c_char) ; table . open_script_create_dialog = (gd_api . godot_method_bind_get_method) (class_name , "open_script_create_dialog\0" . as_ptr () as * const c_char) ; table . reload_scripts = (gd_api . godot_method_bind_get_method) (class_name , "reload_scripts\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::script_editor::private::ScriptEditor;
            
            pub(crate) mod scroll_bar {
                # ! [doc = "This module contains types related to the API class [`ScrollBar`][super::ScrollBar]."] pub (crate) mod private { # [doc = "`core class ScrollBar` inherits `Range` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_scrollbar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nScrollBar inherits methods from:\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ScrollBar { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ScrollBar ; impl ScrollBar { # [doc = "Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [`ScrollBar`][ScrollBar] is focused."] # [doc = ""] # [inline] pub fn custom_step (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollBarMethodTable :: get (get_api ()) . get_custom_step ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Overrides the step used when clicking increment and decrement buttons or when using arrow keys when the [`ScrollBar`][ScrollBar] is focused."] # [doc = ""] # [inline] pub fn set_custom_step (& self , step : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollBarMethodTable :: get (get_api ()) . set_custom_step ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , step as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ScrollBar { } unsafe impl GodotObject for ScrollBar { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ScrollBar" } } impl QueueFree for ScrollBar { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ScrollBar { type Target = crate :: generated :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ScrollBar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Range > for ScrollBar { } unsafe impl SubClass < crate :: generated :: Control > for ScrollBar { } unsafe impl SubClass < crate :: generated :: CanvasItem > for ScrollBar { } unsafe impl SubClass < crate :: generated :: Node > for ScrollBar { } unsafe impl SubClass < crate :: generated :: Object > for ScrollBar { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ScrollBarMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_custom_step : * mut sys :: godot_method_bind , pub set_custom_step : * mut sys :: godot_method_bind } impl ScrollBarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ScrollBarMethodTable = ScrollBarMethodTable { class_constructor : None , get_custom_step : 0 as * mut sys :: godot_method_bind , set_custom_step : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ScrollBarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ScrollBar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_custom_step = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_step\0" . as_ptr () as * const c_char) ; table . set_custom_step = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_step\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::scroll_bar::private::ScrollBar;
            
            pub(crate) mod scroll_container {
                # ! [doc = "This module contains types related to the API class [`ScrollContainer`][super::ScrollContainer]."] pub (crate) mod private { # [doc = "`core class ScrollContainer` inherits `Container` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_scrollcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ScrollContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ScrollContainer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nScrollContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ScrollContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ScrollContainer ; impl ScrollContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ScrollContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nEnsures the given `control` is visible (must be a direct or indirect child of the ScrollContainer). Used by [`follow_focus`][Self::follow_focus].\n**Note:** This will not work on a node that was just added during the same frame. If you want to scroll to a newly added child, you must wait until the next frame using [signal SceneTree.idle_frame]:\n```gdscript\nadd_child(child_node)\nyield(get_tree(), \"idle_frame\")\nensure_control_visible(child_node)\n```"] # [doc = ""] # [inline] pub fn ensure_control_visible (& self , control : impl AsArg < crate :: generated :: Control >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . ensure_control_visible ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , control . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn deadzone (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . get_deadzone ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The current horizontal scroll value."] # [doc = ""] # [inline] pub fn h_scroll (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . get_h_scroll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the horizontal scrollbar [`HScrollBar`][HScrollBar] of this [`ScrollContainer`][ScrollContainer].\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to disable the horizontal scrollbar, use [`scroll_horizontal_enabled`][Self::scroll_horizontal_enabled]. If you want to only hide it instead, use its [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_h_scrollbar (& self) -> Option < Ref < crate :: generated :: HScrollBar , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . get_h_scrollbar ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: HScrollBar , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The current vertical scroll value."] # [doc = ""] # [inline] pub fn v_scroll (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . get_v_scroll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the vertical scrollbar [`VScrollBar`][VScrollBar] of this [`ScrollContainer`][ScrollContainer].\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to disable the vertical scrollbar, use [`scroll_vertical_enabled`][Self::scroll_vertical_enabled]. If you want to only hide it instead, use its [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_v_scrollbar (& self) -> Option < Ref < crate :: generated :: VScrollBar , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . get_v_scrollbar ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: VScrollBar , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the ScrollContainer will automatically scroll to focused children (including indirect children) to make sure they are fully visible."] # [doc = ""] # [inline] pub fn is_following_focus (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . is_following_focus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, enables horizontal scrolling."] # [doc = ""] # [inline] pub fn is_h_scroll_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . is_h_scroll_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, enables vertical scrolling."] # [doc = ""] # [inline] pub fn is_v_scroll_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . is_v_scroll_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_deadzone (& self , deadzone : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . set_deadzone ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , deadzone as _) ; } } # [doc = "If `true`, enables horizontal scrolling."] # [doc = ""] # [inline] pub fn set_enable_h_scroll (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . set_enable_h_scroll ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, enables vertical scrolling."] # [doc = ""] # [inline] pub fn set_enable_v_scroll (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . set_enable_v_scroll ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the ScrollContainer will automatically scroll to focused children (including indirect children) to make sure they are fully visible."] # [doc = ""] # [inline] pub fn set_follow_focus (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . set_follow_focus ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The current horizontal scroll value."] # [doc = ""] # [inline] pub fn set_h_scroll (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . set_h_scroll ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "The current vertical scroll value."] # [doc = ""] # [inline] pub fn set_v_scroll (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ScrollContainerMethodTable :: get (get_api ()) . set_v_scroll ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ScrollContainer { } unsafe impl GodotObject for ScrollContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ScrollContainer" } } impl QueueFree for ScrollContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ScrollContainer { type Target = crate :: generated :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ScrollContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Container > for ScrollContainer { } unsafe impl SubClass < crate :: generated :: Control > for ScrollContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for ScrollContainer { } unsafe impl SubClass < crate :: generated :: Node > for ScrollContainer { } unsafe impl SubClass < crate :: generated :: Object > for ScrollContainer { } impl Instanciable for ScrollContainer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ScrollContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ScrollContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub ensure_control_visible : * mut sys :: godot_method_bind , pub get_deadzone : * mut sys :: godot_method_bind , pub get_h_scroll : * mut sys :: godot_method_bind , pub get_h_scrollbar : * mut sys :: godot_method_bind , pub get_v_scroll : * mut sys :: godot_method_bind , pub get_v_scrollbar : * mut sys :: godot_method_bind , pub is_following_focus : * mut sys :: godot_method_bind , pub is_h_scroll_enabled : * mut sys :: godot_method_bind , pub is_v_scroll_enabled : * mut sys :: godot_method_bind , pub set_deadzone : * mut sys :: godot_method_bind , pub set_enable_h_scroll : * mut sys :: godot_method_bind , pub set_enable_v_scroll : * mut sys :: godot_method_bind , pub set_follow_focus : * mut sys :: godot_method_bind , pub set_h_scroll : * mut sys :: godot_method_bind , pub set_v_scroll : * mut sys :: godot_method_bind } impl ScrollContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ScrollContainerMethodTable = ScrollContainerMethodTable { class_constructor : None , ensure_control_visible : 0 as * mut sys :: godot_method_bind , get_deadzone : 0 as * mut sys :: godot_method_bind , get_h_scroll : 0 as * mut sys :: godot_method_bind , get_h_scrollbar : 0 as * mut sys :: godot_method_bind , get_v_scroll : 0 as * mut sys :: godot_method_bind , get_v_scrollbar : 0 as * mut sys :: godot_method_bind , is_following_focus : 0 as * mut sys :: godot_method_bind , is_h_scroll_enabled : 0 as * mut sys :: godot_method_bind , is_v_scroll_enabled : 0 as * mut sys :: godot_method_bind , set_deadzone : 0 as * mut sys :: godot_method_bind , set_enable_h_scroll : 0 as * mut sys :: godot_method_bind , set_enable_v_scroll : 0 as * mut sys :: godot_method_bind , set_follow_focus : 0 as * mut sys :: godot_method_bind , set_h_scroll : 0 as * mut sys :: godot_method_bind , set_v_scroll : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ScrollContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ScrollContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . ensure_control_visible = (gd_api . godot_method_bind_get_method) (class_name , "ensure_control_visible\0" . as_ptr () as * const c_char) ; table . get_deadzone = (gd_api . godot_method_bind_get_method) (class_name , "get_deadzone\0" . as_ptr () as * const c_char) ; table . get_h_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_h_scroll\0" . as_ptr () as * const c_char) ; table . get_h_scrollbar = (gd_api . godot_method_bind_get_method) (class_name , "get_h_scrollbar\0" . as_ptr () as * const c_char) ; table . get_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scroll\0" . as_ptr () as * const c_char) ; table . get_v_scrollbar = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scrollbar\0" . as_ptr () as * const c_char) ; table . is_following_focus = (gd_api . godot_method_bind_get_method) (class_name , "is_following_focus\0" . as_ptr () as * const c_char) ; table . is_h_scroll_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_h_scroll_enabled\0" . as_ptr () as * const c_char) ; table . is_v_scroll_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_v_scroll_enabled\0" . as_ptr () as * const c_char) ; table . set_deadzone = (gd_api . godot_method_bind_get_method) (class_name , "set_deadzone\0" . as_ptr () as * const c_char) ; table . set_enable_h_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_enable_h_scroll\0" . as_ptr () as * const c_char) ; table . set_enable_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_enable_v_scroll\0" . as_ptr () as * const c_char) ; table . set_follow_focus = (gd_api . godot_method_bind_get_method) (class_name , "set_follow_focus\0" . as_ptr () as * const c_char) ; table . set_h_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_h_scroll\0" . as_ptr () as * const c_char) ; table . set_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_v_scroll\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::scroll_container::private::ScrollContainer;
            
            pub(crate) mod segment_shape_2d {
                # ! [doc = "This module contains types related to the API class [`SegmentShape2D`][super::SegmentShape2D]."] pub (crate) mod private { # [doc = "`core class SegmentShape2D` inherits `Shape2D` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_segmentshape2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSegmentShape2D inherits methods from:\n - [Shape2D](struct.Shape2D.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SegmentShape2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SegmentShape2D ; impl SegmentShape2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SegmentShape2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The segment's first point position."] # [doc = ""] # [inline] pub fn a (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = SegmentShape2DMethodTable :: get (get_api ()) . get_a ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The segment's second point position."] # [doc = ""] # [inline] pub fn b (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = SegmentShape2DMethodTable :: get (get_api ()) . get_b ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The segment's first point position."] # [doc = ""] # [inline] pub fn set_a (& self , a : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SegmentShape2DMethodTable :: get (get_api ()) . set_a ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , a) ; } } # [doc = "The segment's second point position."] # [doc = ""] # [inline] pub fn set_b (& self , b : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SegmentShape2DMethodTable :: get (get_api ()) . set_b ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , b) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SegmentShape2D { } unsafe impl GodotObject for SegmentShape2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SegmentShape2D" } } impl std :: ops :: Deref for SegmentShape2D { type Target = crate :: generated :: Shape2D ; # [inline] fn deref (& self) -> & crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SegmentShape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape2D > for SegmentShape2D { } unsafe impl SubClass < crate :: generated :: Resource > for SegmentShape2D { } unsafe impl SubClass < crate :: generated :: Reference > for SegmentShape2D { } unsafe impl SubClass < crate :: generated :: Object > for SegmentShape2D { } impl Instanciable for SegmentShape2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { SegmentShape2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SegmentShape2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_a : * mut sys :: godot_method_bind , pub get_b : * mut sys :: godot_method_bind , pub set_a : * mut sys :: godot_method_bind , pub set_b : * mut sys :: godot_method_bind } impl SegmentShape2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SegmentShape2DMethodTable = SegmentShape2DMethodTable { class_constructor : None , get_a : 0 as * mut sys :: godot_method_bind , get_b : 0 as * mut sys :: godot_method_bind , set_a : 0 as * mut sys :: godot_method_bind , set_b : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SegmentShape2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SegmentShape2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_a = (gd_api . godot_method_bind_get_method) (class_name , "get_a\0" . as_ptr () as * const c_char) ; table . get_b = (gd_api . godot_method_bind_get_method) (class_name , "get_b\0" . as_ptr () as * const c_char) ; table . set_a = (gd_api . godot_method_bind_get_method) (class_name , "set_a\0" . as_ptr () as * const c_char) ; table . set_b = (gd_api . godot_method_bind_get_method) (class_name , "set_b\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::segment_shape_2d::private::SegmentShape2D;
            
            pub(crate) mod separator {
                # ! [doc = "This module contains types related to the API class [`Separator`][super::Separator]."] pub (crate) mod private { # [doc = "`core class Separator` inherits `Control` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_separator.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nSeparator inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Separator { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Separator ; impl Separator { } impl gdnative_core :: private :: godot_object :: Sealed for Separator { } unsafe impl GodotObject for Separator { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Separator" } } impl QueueFree for Separator { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Separator { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Separator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for Separator { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Separator { } unsafe impl SubClass < crate :: generated :: Node > for Separator { } unsafe impl SubClass < crate :: generated :: Object > for Separator { }
                use super::*;
            }
            pub use crate::generated::separator::private::Separator;
            
            pub mod shader {
                # ! [doc = "This module contains types related to the API class [`Shader`][super::Shader]."] pub (crate) mod private { # [doc = "`core class Shader` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`shader`][super::shader] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_shader.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nShader inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Shader { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Shader ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const SPATIAL : Mode = Mode (0i64) ; pub const CANVAS_ITEM : Mode = Mode (1i64) ; pub const PARTICLES : Mode = Mode (2i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } impl FromVariant for Mode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Shader { pub const MODE_SPATIAL : i64 = 0i64 ; pub const MODE_CANVAS_ITEM : i64 = 1i64 ; pub const MODE_PARTICLES : i64 = 2i64 ; } impl Shader { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ShaderMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the shader's code as the user has written it, not the full generated code used internally."] # [doc = ""] # [inline] pub fn code (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . get_code ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the shader's custom defines. Custom defines can be used in Godot to add GLSL preprocessor directives (e.g: extensions) required for the shader logic.\n**Note:** Custom defines are not validated by the Godot shader parser, so care should be taken when using them."] # [doc = ""] # [inline] pub fn custom_defines (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . get_custom_defines ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the texture that is set as default for the specified parameter.\n**Note:** `param` must match the name of the uniform in the code exactly."] # [doc = ""] # [inline] pub fn get_default_texture_param (& self , param : impl Into < GodotString >) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . get_default_texture_param ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , param . into ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the shader mode for the shader, either [`MODE_CANVAS_ITEM`][Self::MODE_CANVAS_ITEM], [`MODE_SPATIAL`][Self::MODE_SPATIAL] or [`MODE_PARTICLES`][Self::MODE_PARTICLES]."] # [doc = ""] # [inline] pub fn get_mode (& self) -> crate :: generated :: shader :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: shader :: Mode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the shader has this param defined as a uniform in its code.\n**Note:** `param` must match the name of the uniform in the code exactly."] # [doc = ""] # [inline] pub fn has_param (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . has_param ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the shader's code as the user has written it, not the full generated code used internally."] # [doc = ""] # [inline] pub fn set_code (& self , code : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . set_code ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , code . into ()) ; } } # [doc = "Returns the shader's custom defines. Custom defines can be used in Godot to add GLSL preprocessor directives (e.g: extensions) required for the shader logic.\n**Note:** Custom defines are not validated by the Godot shader parser, so care should be taken when using them."] # [doc = ""] # [inline] pub fn set_custom_defines (& self , custom_defines : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . set_custom_defines ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , custom_defines . into ()) ; } } # [doc = "Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the [`ShaderMaterial`][ShaderMaterial].\n**Note:** `param` must match the name of the uniform in the code exactly."] # [doc = ""] # [inline] pub fn set_default_texture_param (& self , param : impl Into < GodotString > , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMethodTable :: get (get_api ()) . set_default_texture_param ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , param . into () , texture . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Shader { } unsafe impl GodotObject for Shader { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Shader" } } impl std :: ops :: Deref for Shader { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Shader { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Shader { } unsafe impl SubClass < crate :: generated :: Reference > for Shader { } unsafe impl SubClass < crate :: generated :: Object > for Shader { } impl Instanciable for Shader { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Shader :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ShaderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_code : * mut sys :: godot_method_bind , pub get_custom_defines : * mut sys :: godot_method_bind , pub get_default_texture_param : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub has_param : * mut sys :: godot_method_bind , pub set_code : * mut sys :: godot_method_bind , pub set_custom_defines : * mut sys :: godot_method_bind , pub set_default_texture_param : * mut sys :: godot_method_bind } impl ShaderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ShaderMethodTable = ShaderMethodTable { class_constructor : None , get_code : 0 as * mut sys :: godot_method_bind , get_custom_defines : 0 as * mut sys :: godot_method_bind , get_default_texture_param : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , has_param : 0 as * mut sys :: godot_method_bind , set_code : 0 as * mut sys :: godot_method_bind , set_custom_defines : 0 as * mut sys :: godot_method_bind , set_default_texture_param : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ShaderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Shader\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_code = (gd_api . godot_method_bind_get_method) (class_name , "get_code\0" . as_ptr () as * const c_char) ; table . get_custom_defines = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_defines\0" . as_ptr () as * const c_char) ; table . get_default_texture_param = (gd_api . godot_method_bind_get_method) (class_name , "get_default_texture_param\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . has_param = (gd_api . godot_method_bind_get_method) (class_name , "has_param\0" . as_ptr () as * const c_char) ; table . set_code = (gd_api . godot_method_bind_get_method) (class_name , "set_code\0" . as_ptr () as * const c_char) ; table . set_custom_defines = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_defines\0" . as_ptr () as * const c_char) ; table . set_default_texture_param = (gd_api . godot_method_bind_get_method) (class_name , "set_default_texture_param\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::shader::private::Shader;
            
            pub(crate) mod shader_material {
                # ! [doc = "This module contains types related to the API class [`ShaderMaterial`][super::ShaderMaterial]."] pub (crate) mod private { # [doc = "`core class ShaderMaterial` inherits `Material` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_shadermaterial.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nShaderMaterial inherits methods from:\n - [Material](struct.Material.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ShaderMaterial { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ShaderMaterial ; impl ShaderMaterial { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ShaderMaterialMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [`Shader`][Shader] program used to render this material."] # [doc = ""] # [inline] pub fn shader (& self) -> Option < Ref < crate :: generated :: Shader , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMaterialMethodTable :: get (get_api ()) . get_shader ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Shader , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current value set for this material of a uniform in the shader."] # [doc = ""] # [inline] pub fn get_shader_param (& self , param : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMaterialMethodTable :: get (get_api ()) . get_shader_param ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , param . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the property identified by `name` can be reverted to a default value."] # [doc = ""] # [inline] pub fn property_can_revert (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMaterialMethodTable :: get (get_api ()) . property_can_revert ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the default value of the material property with given `name`."] # [doc = ""] # [inline] pub fn property_get_revert (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMaterialMethodTable :: get (get_api ()) . property_get_revert ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Shader`][Shader] program used to render this material."] # [doc = ""] # [inline] pub fn set_shader (& self , shader : impl AsArg < crate :: generated :: Shader >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMaterialMethodTable :: get (get_api ()) . set_shader ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , shader . as_arg_ptr ()) ; } } # [doc = "Changes the value set for this material of a uniform in the shader.\n**Note:** `param` must match the name of the uniform in the code exactly."] # [doc = ""] # [inline] pub fn set_shader_param (& self , param : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShaderMaterialMethodTable :: get (get_api ()) . set_shader_param ; let ret = crate :: icalls :: icallvar__str_var (method_bind , self . this . sys () . as_ptr () , param . into () , value . owned_to_variant ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ShaderMaterial { } unsafe impl GodotObject for ShaderMaterial { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ShaderMaterial" } } impl std :: ops :: Deref for ShaderMaterial { type Target = crate :: generated :: Material ; # [inline] fn deref (& self) -> & crate :: generated :: Material { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ShaderMaterial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Material { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Material > for ShaderMaterial { } unsafe impl SubClass < crate :: generated :: Resource > for ShaderMaterial { } unsafe impl SubClass < crate :: generated :: Reference > for ShaderMaterial { } unsafe impl SubClass < crate :: generated :: Object > for ShaderMaterial { } impl Instanciable for ShaderMaterial { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ShaderMaterial :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ShaderMaterialMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_shader : * mut sys :: godot_method_bind , pub get_shader_param : * mut sys :: godot_method_bind , pub property_can_revert : * mut sys :: godot_method_bind , pub property_get_revert : * mut sys :: godot_method_bind , pub set_shader : * mut sys :: godot_method_bind , pub set_shader_param : * mut sys :: godot_method_bind } impl ShaderMaterialMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ShaderMaterialMethodTable = ShaderMaterialMethodTable { class_constructor : None , get_shader : 0 as * mut sys :: godot_method_bind , get_shader_param : 0 as * mut sys :: godot_method_bind , property_can_revert : 0 as * mut sys :: godot_method_bind , property_get_revert : 0 as * mut sys :: godot_method_bind , set_shader : 0 as * mut sys :: godot_method_bind , set_shader_param : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ShaderMaterialMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ShaderMaterial\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_shader = (gd_api . godot_method_bind_get_method) (class_name , "get_shader\0" . as_ptr () as * const c_char) ; table . get_shader_param = (gd_api . godot_method_bind_get_method) (class_name , "get_shader_param\0" . as_ptr () as * const c_char) ; table . property_can_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_can_revert\0" . as_ptr () as * const c_char) ; table . property_get_revert = (gd_api . godot_method_bind_get_method) (class_name , "property_get_revert\0" . as_ptr () as * const c_char) ; table . set_shader = (gd_api . godot_method_bind_get_method) (class_name , "set_shader\0" . as_ptr () as * const c_char) ; table . set_shader_param = (gd_api . godot_method_bind_get_method) (class_name , "set_shader_param\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::shader_material::private::ShaderMaterial;
            
            pub(crate) mod shape {
                # ! [doc = "This module contains types related to the API class [`Shape`][super::Shape]."] pub (crate) mod private { # [doc = "`core class Shape` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_shape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nShape inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Shape { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Shape ; impl Shape { # [doc = "Returns the [`ArrayMesh`][ArrayMesh] used to draw the debug collision for this [`Shape`][Shape]."] # [doc = ""] # [inline] pub fn get_debug_mesh (& self) -> Option < Ref < crate :: generated :: ArrayMesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ShapeMethodTable :: get (get_api ()) . get_debug_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: ArrayMesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The collision margin for the shape. Used in Bullet Physics only.\nCollision margins allow collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp."] # [doc = ""] # [inline] pub fn margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ShapeMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The collision margin for the shape. Used in Bullet Physics only.\nCollision margins allow collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp."] # [doc = ""] # [inline] pub fn set_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShapeMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Shape { } unsafe impl GodotObject for Shape { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Shape" } } impl std :: ops :: Deref for Shape { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Shape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Shape { } unsafe impl SubClass < crate :: generated :: Reference > for Shape { } unsafe impl SubClass < crate :: generated :: Object > for Shape { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_debug_mesh : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub set_margin : * mut sys :: godot_method_bind } impl ShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ShapeMethodTable = ShapeMethodTable { class_constructor : None , get_debug_mesh : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , set_margin : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Shape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_debug_mesh = (gd_api . godot_method_bind_get_method) (class_name , "get_debug_mesh\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::shape::private::Shape;
            
            pub(crate) mod shape_2d {
                # ! [doc = "This module contains types related to the API class [`Shape2D`][super::Shape2D]."] pub (crate) mod private { # [doc = "`core class Shape2D` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_shape2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nShape2D inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Shape2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Shape2D ; impl Shape2D { # [doc = "Returns `true` if this shape is colliding with another.\nThis method needs the transformation matrix for this shape (`local_xform`), the shape to check collisions with (`with_shape`), and the transformation matrix of that shape (`shape_xform`)."] # [doc = ""] # [inline] pub fn collide (& self , local_xform : Transform2D , with_shape : impl AsArg < crate :: generated :: Shape2D > , shape_xform : Transform2D) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Shape2DMethodTable :: get (get_api ()) . collide ; let ret = crate :: icalls :: icallvar__trans2D_obj_trans2D (method_bind , self . this . sys () . as_ptr () , local_xform , with_shape . as_arg_ptr () , shape_xform) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns a list of contact point pairs where this shape touches another.\nIf there are no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of `with_shape`.\nA collision pair A, B can be used to calculate the collision normal with `(B - A).normalized()`, and the collision depth with `(B - A).length()`. This information is typically used to separate shapes, particularly in collision solvers.\nThis method needs the transformation matrix for this shape (`local_xform`), the shape to check collisions with (`with_shape`), and the transformation matrix of that shape (`shape_xform`)."] # [doc = ""] # [inline] pub fn collide_and_get_contacts (& self , local_xform : Transform2D , with_shape : impl AsArg < crate :: generated :: Shape2D > , shape_xform : Transform2D) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Shape2DMethodTable :: get (get_api ()) . collide_and_get_contacts ; let ret = crate :: icalls :: icallvar__trans2D_obj_trans2D (method_bind , self . this . sys () . as_ptr () , local_xform , with_shape . as_arg_ptr () , shape_xform) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns whether this shape would collide with another, if a given movement was applied.\nThis method needs the transformation matrix for this shape (`local_xform`), the movement to test on this shape (`local_motion`), the shape to check collisions with (`with_shape`), the transformation matrix of that shape (`shape_xform`), and the movement to test onto the other object (`shape_motion`)."] # [doc = ""] # [inline] pub fn collide_with_motion (& self , local_xform : Transform2D , local_motion : Vector2 , with_shape : impl AsArg < crate :: generated :: Shape2D > , shape_xform : Transform2D , shape_motion : Vector2) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Shape2DMethodTable :: get (get_api ()) . collide_with_motion ; let ret = crate :: icalls :: icallvar__trans2D_vec2_obj_trans2D_vec2 (method_bind , self . this . sys () . as_ptr () , local_xform , local_motion , with_shape . as_arg_ptr () , shape_xform , shape_motion) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns a list of contact point pairs where this shape would touch another, if a given movement was applied.\nIf there would be no collisions, the returned list is empty. Otherwise, the returned list contains contact points arranged in pairs, with entries alternating between points on the boundary of this shape and points on the boundary of `with_shape`.\nA collision pair A, B can be used to calculate the collision normal with `(B - A).normalized()`, and the collision depth with `(B - A).length()`. This information is typically used to separate shapes, particularly in collision solvers.\nThis method needs the transformation matrix for this shape (`local_xform`), the movement to test on this shape (`local_motion`), the shape to check collisions with (`with_shape`), the transformation matrix of that shape (`shape_xform`), and the movement to test onto the other object (`shape_motion`)."] # [doc = ""] # [inline] pub fn collide_with_motion_and_get_contacts (& self , local_xform : Transform2D , local_motion : Vector2 , with_shape : impl AsArg < crate :: generated :: Shape2D > , shape_xform : Transform2D , shape_motion : Vector2) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = Shape2DMethodTable :: get (get_api ()) . collide_with_motion_and_get_contacts ; let ret = crate :: icalls :: icallvar__trans2D_vec2_obj_trans2D_vec2 (method_bind , self . this . sys () . as_ptr () , local_xform , local_motion , with_shape . as_arg_ptr () , shape_xform , shape_motion) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Draws a solid shape onto a [`CanvasItem`][CanvasItem] with the [`VisualServer`][VisualServer] API filled with the specified `color`. The exact drawing method is specific for each shape and cannot be configured."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn draw (& self , canvas_item : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Shape2DMethodTable :: get (get_api ()) . draw ; let ret = crate :: icalls :: icallvar__rid_color (method_bind , self . this . sys () . as_ptr () , canvas_item , color) ; } } # [doc = "The shape's custom solver bias. Defines how much bodies react to enforce contact separation when this shape is involved.\nWhen set to `0.0`, the default value of `0.3` is used."] # [doc = ""] # [inline] pub fn custom_solver_bias (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Shape2DMethodTable :: get (get_api ()) . get_custom_solver_bias ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The shape's custom solver bias. Defines how much bodies react to enforce contact separation when this shape is involved.\nWhen set to `0.0`, the default value of `0.3` is used."] # [doc = ""] # [inline] pub fn set_custom_solver_bias (& self , bias : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Shape2DMethodTable :: get (get_api ()) . set_custom_solver_bias ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , bias as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Shape2D { } unsafe impl GodotObject for Shape2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Shape2D" } } impl std :: ops :: Deref for Shape2D { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Shape2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Shape2D { } unsafe impl SubClass < crate :: generated :: Reference > for Shape2D { } unsafe impl SubClass < crate :: generated :: Object > for Shape2D { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Shape2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub collide : * mut sys :: godot_method_bind , pub collide_and_get_contacts : * mut sys :: godot_method_bind , pub collide_with_motion : * mut sys :: godot_method_bind , pub collide_with_motion_and_get_contacts : * mut sys :: godot_method_bind , pub draw : * mut sys :: godot_method_bind , pub get_custom_solver_bias : * mut sys :: godot_method_bind , pub set_custom_solver_bias : * mut sys :: godot_method_bind } impl Shape2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Shape2DMethodTable = Shape2DMethodTable { class_constructor : None , collide : 0 as * mut sys :: godot_method_bind , collide_and_get_contacts : 0 as * mut sys :: godot_method_bind , collide_with_motion : 0 as * mut sys :: godot_method_bind , collide_with_motion_and_get_contacts : 0 as * mut sys :: godot_method_bind , draw : 0 as * mut sys :: godot_method_bind , get_custom_solver_bias : 0 as * mut sys :: godot_method_bind , set_custom_solver_bias : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Shape2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Shape2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . collide = (gd_api . godot_method_bind_get_method) (class_name , "collide\0" . as_ptr () as * const c_char) ; table . collide_and_get_contacts = (gd_api . godot_method_bind_get_method) (class_name , "collide_and_get_contacts\0" . as_ptr () as * const c_char) ; table . collide_with_motion = (gd_api . godot_method_bind_get_method) (class_name , "collide_with_motion\0" . as_ptr () as * const c_char) ; table . collide_with_motion_and_get_contacts = (gd_api . godot_method_bind_get_method) (class_name , "collide_with_motion_and_get_contacts\0" . as_ptr () as * const c_char) ; table . draw = (gd_api . godot_method_bind_get_method) (class_name , "draw\0" . as_ptr () as * const c_char) ; table . get_custom_solver_bias = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_solver_bias\0" . as_ptr () as * const c_char) ; table . set_custom_solver_bias = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_solver_bias\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::shape_2d::private::Shape2D;
            
            pub(crate) mod short_cut {
                # ! [doc = "This module contains types related to the API class [`ShortCut`][super::ShortCut]."] pub (crate) mod private { # [doc = "`core class ShortCut` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_shortcut.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nShortCut inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ShortCut { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ShortCut ; impl ShortCut { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ShortCutMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the shortcut's [`InputEvent`][InputEvent] as a [`String`][GodotString]."] # [doc = ""] # [inline] pub fn get_as_text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ShortCutMethodTable :: get (get_api ()) . get_as_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The shortcut's [`InputEvent`][InputEvent].\nGenerally the [`InputEvent`][InputEvent] is a keyboard key, though it can be any [`InputEvent`][InputEvent]."] # [doc = ""] # [inline] pub fn shortcut (& self) -> Option < Ref < crate :: generated :: InputEvent , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ShortCutMethodTable :: get (get_api ()) . get_shortcut ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: InputEvent , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the shortcut's [`InputEvent`][InputEvent] equals `event`."] # [doc = ""] # [inline] pub fn is_shortcut (& self , event : impl AsArg < crate :: generated :: InputEvent >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ShortCutMethodTable :: get (get_api ()) . is_shortcut ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, this shortcut is valid."] # [doc = ""] # [inline] pub fn is_valid (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ShortCutMethodTable :: get (get_api ()) . is_valid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The shortcut's [`InputEvent`][InputEvent].\nGenerally the [`InputEvent`][InputEvent] is a keyboard key, though it can be any [`InputEvent`][InputEvent]."] # [doc = ""] # [inline] pub fn set_shortcut (& self , event : impl AsArg < crate :: generated :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ShortCutMethodTable :: get (get_api ()) . set_shortcut ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , event . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ShortCut { } unsafe impl GodotObject for ShortCut { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ShortCut" } } impl std :: ops :: Deref for ShortCut { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ShortCut { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for ShortCut { } unsafe impl SubClass < crate :: generated :: Reference > for ShortCut { } unsafe impl SubClass < crate :: generated :: Object > for ShortCut { } impl Instanciable for ShortCut { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ShortCut :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ShortCutMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_as_text : * mut sys :: godot_method_bind , pub get_shortcut : * mut sys :: godot_method_bind , pub is_shortcut : * mut sys :: godot_method_bind , pub is_valid : * mut sys :: godot_method_bind , pub set_shortcut : * mut sys :: godot_method_bind } impl ShortCutMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ShortCutMethodTable = ShortCutMethodTable { class_constructor : None , get_as_text : 0 as * mut sys :: godot_method_bind , get_shortcut : 0 as * mut sys :: godot_method_bind , is_shortcut : 0 as * mut sys :: godot_method_bind , is_valid : 0 as * mut sys :: godot_method_bind , set_shortcut : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ShortCutMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ShortCut\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_as_text = (gd_api . godot_method_bind_get_method) (class_name , "get_as_text\0" . as_ptr () as * const c_char) ; table . get_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "get_shortcut\0" . as_ptr () as * const c_char) ; table . is_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "is_shortcut\0" . as_ptr () as * const c_char) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\0" . as_ptr () as * const c_char) ; table . set_shortcut = (gd_api . godot_method_bind_get_method) (class_name , "set_shortcut\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::short_cut::private::ShortCut;
            
            pub(crate) mod skeleton {
                # ! [doc = "This module contains types related to the API class [`Skeleton`][super::Skeleton]."] pub (crate) mod private { # [doc = "`core class Skeleton` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_skeleton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Skeleton` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Skeleton>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSkeleton inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Skeleton { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Skeleton ; # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Skeleton { pub const NOTIFICATION_UPDATE_SKELETON : i64 = 50i64 ; } impl Skeleton { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SkeletonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a bone, with name `name`. [`get_bone_count`][Self::get_bone_count] will become the bone index."] # [doc = ""] # [inline] pub fn add_bone (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . add_bone ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "_Deprecated soon._"] # [doc = ""] # [inline] pub fn bind_child_node_to_bone (& self , bone_idx : i64 , node : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . bind_child_node_to_bone ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , bone_idx as _ , node . as_arg_ptr ()) ; } } # [doc = "Clear all the bones in this skeleton."] # [doc = ""] # [inline] pub fn clear_bones (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . clear_bones ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn clear_bones_global_pose_override (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . clear_bones_global_pose_override ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the bone index that matches `name` as its name."] # [doc = ""] # [inline] pub fn find_bone (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . find_bone ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the amount of bones in the skeleton."] # [doc = ""] # [inline] pub fn get_bone_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the custom pose of the specified bone. Custom pose is applied on top of the rest pose."] # [doc = ""] # [inline] pub fn get_bone_custom_pose (& self , bone_idx : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_custom_pose ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bone_idx as _) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual \"global\" transform of the bone."] # [doc = ""] # [inline] pub fn get_bone_global_pose (& self , bone_idx : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_global_pose ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bone_idx as _) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the overall transform of the specified bone, with respect to the skeleton, but without any global pose overrides. Being relative to the skeleton frame, this is not the actual \"global\" transform of the bone."] # [doc = ""] # [inline] pub fn get_bone_global_pose_no_override (& self , bone_idx : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_global_pose_no_override ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bone_idx as _) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the name of the bone at index `index`."] # [doc = ""] # [inline] pub fn get_bone_name (& self , bone_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bone_idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the bone index which is the parent of the bone at `bone_idx`. If -1, then bone has no parent.\n**Note:** The parent bone returned will always be less than `bone_idx`."] # [doc = ""] # [inline] pub fn get_bone_parent (& self , bone_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_parent ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bone_idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the pose transform of the specified bone. Pose is applied on top of the custom pose, which is applied on top the rest pose."] # [doc = ""] # [inline] pub fn get_bone_pose (& self , bone_idx : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_pose ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bone_idx as _) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the rest transform for a bone `bone_idx`."] # [doc = ""] # [inline] pub fn get_bone_rest (& self , bone_idx : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bone_rest ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bone_idx as _) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Deprecated soon._"] # [doc = ""] # [inline] pub fn get_bound_child_nodes_to_bone (& self , bone_idx : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . get_bound_child_nodes_to_bone ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bone_idx as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn is_bone_rest_disabled (& self , bone_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . is_bone_rest_disabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bone_idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn localize_rests (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . localize_rests ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn physical_bones_add_collision_exception (& self , exception : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . physical_bones_add_collision_exception ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , exception) ; } } # [doc = ""] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn physical_bones_remove_collision_exception (& self , exception : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . physical_bones_remove_collision_exception ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , exception) ; } } # [doc = "\n# Default Arguments\n* `bones` - `[  ]`"] # [doc = ""] # [inline] pub fn physical_bones_start_simulation (& self , bones : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . physical_bones_start_simulation ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , bones) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn physical_bones_stop_simulation (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . physical_bones_stop_simulation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn register_skin (& self , skin : impl AsArg < crate :: generated :: Skin >) -> Option < Ref < crate :: generated :: SkinReference , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . register_skin ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , skin . as_arg_ptr ()) ; < Option < Ref < crate :: generated :: SkinReference , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bone_custom_pose (& self , bone_idx : i64 , custom_pose : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . set_bone_custom_pose ; let ret = crate :: icalls :: icallvar__i64_trans (method_bind , self . this . sys () . as_ptr () , bone_idx as _ , custom_pose) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bone_disable_rest (& self , bone_idx : i64 , disable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . set_bone_disable_rest ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bone_idx as _ , disable as _) ; } } # [doc = "\n# Default Arguments\n* `persistent` - `false`"] # [doc = ""] # [inline] pub fn set_bone_global_pose_override (& self , bone_idx : i64 , pose : Transform , amount : f64 , persistent : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . set_bone_global_pose_override ; let ret = crate :: icalls :: icallvar__i64_trans_f64_bool (method_bind , self . this . sys () . as_ptr () , bone_idx as _ , pose , amount as _ , persistent as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bone_name (& self , bone_idx : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . set_bone_name ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , bone_idx as _ , name . into ()) ; } } # [doc = "Sets the bone index `parent_idx` as the parent of the bone at `bone_idx`. If -1, then bone has no parent.\n**Note:** `parent_idx` must be less than `bone_idx`."] # [doc = ""] # [inline] pub fn set_bone_parent (& self , bone_idx : i64 , parent_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . set_bone_parent ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , bone_idx as _ , parent_idx as _) ; } } # [doc = "Sets the pose transform for bone `bone_idx`."] # [doc = ""] # [inline] pub fn set_bone_pose (& self , bone_idx : i64 , pose : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . set_bone_pose ; let ret = crate :: icalls :: icallvar__i64_trans (method_bind , self . this . sys () . as_ptr () , bone_idx as _ , pose) ; } } # [doc = "Sets the rest transform for bone `bone_idx`."] # [doc = ""] # [inline] pub fn set_bone_rest (& self , bone_idx : i64 , rest : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . set_bone_rest ; let ret = crate :: icalls :: icallvar__i64_trans (method_bind , self . this . sys () . as_ptr () , bone_idx as _ , rest) ; } } # [doc = "_Deprecated soon._"] # [doc = ""] # [inline] pub fn unbind_child_node_from_bone (& self , bone_idx : i64 , node : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . unbind_child_node_from_bone ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , bone_idx as _ , node . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn unparent_bone_and_rest (& self , bone_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonMethodTable :: get (get_api ()) . unparent_bone_and_rest ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bone_idx as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Skeleton { } unsafe impl GodotObject for Skeleton { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Skeleton" } } impl QueueFree for Skeleton { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Skeleton { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Skeleton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for Skeleton { } unsafe impl SubClass < crate :: generated :: Node > for Skeleton { } unsafe impl SubClass < crate :: generated :: Object > for Skeleton { } impl Instanciable for Skeleton { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Skeleton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SkeletonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_bone : * mut sys :: godot_method_bind , pub bind_child_node_to_bone : * mut sys :: godot_method_bind , pub clear_bones : * mut sys :: godot_method_bind , pub clear_bones_global_pose_override : * mut sys :: godot_method_bind , pub find_bone : * mut sys :: godot_method_bind , pub get_bone_count : * mut sys :: godot_method_bind , pub get_bone_custom_pose : * mut sys :: godot_method_bind , pub get_bone_global_pose : * mut sys :: godot_method_bind , pub get_bone_global_pose_no_override : * mut sys :: godot_method_bind , pub get_bone_name : * mut sys :: godot_method_bind , pub get_bone_parent : * mut sys :: godot_method_bind , pub get_bone_pose : * mut sys :: godot_method_bind , pub get_bone_rest : * mut sys :: godot_method_bind , pub get_bound_child_nodes_to_bone : * mut sys :: godot_method_bind , pub is_bone_rest_disabled : * mut sys :: godot_method_bind , pub localize_rests : * mut sys :: godot_method_bind , pub physical_bones_add_collision_exception : * mut sys :: godot_method_bind , pub physical_bones_remove_collision_exception : * mut sys :: godot_method_bind , pub physical_bones_start_simulation : * mut sys :: godot_method_bind , pub physical_bones_stop_simulation : * mut sys :: godot_method_bind , pub register_skin : * mut sys :: godot_method_bind , pub set_bone_custom_pose : * mut sys :: godot_method_bind , pub set_bone_disable_rest : * mut sys :: godot_method_bind , pub set_bone_global_pose_override : * mut sys :: godot_method_bind , pub set_bone_name : * mut sys :: godot_method_bind , pub set_bone_parent : * mut sys :: godot_method_bind , pub set_bone_pose : * mut sys :: godot_method_bind , pub set_bone_rest : * mut sys :: godot_method_bind , pub unbind_child_node_from_bone : * mut sys :: godot_method_bind , pub unparent_bone_and_rest : * mut sys :: godot_method_bind } impl SkeletonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SkeletonMethodTable = SkeletonMethodTable { class_constructor : None , add_bone : 0 as * mut sys :: godot_method_bind , bind_child_node_to_bone : 0 as * mut sys :: godot_method_bind , clear_bones : 0 as * mut sys :: godot_method_bind , clear_bones_global_pose_override : 0 as * mut sys :: godot_method_bind , find_bone : 0 as * mut sys :: godot_method_bind , get_bone_count : 0 as * mut sys :: godot_method_bind , get_bone_custom_pose : 0 as * mut sys :: godot_method_bind , get_bone_global_pose : 0 as * mut sys :: godot_method_bind , get_bone_global_pose_no_override : 0 as * mut sys :: godot_method_bind , get_bone_name : 0 as * mut sys :: godot_method_bind , get_bone_parent : 0 as * mut sys :: godot_method_bind , get_bone_pose : 0 as * mut sys :: godot_method_bind , get_bone_rest : 0 as * mut sys :: godot_method_bind , get_bound_child_nodes_to_bone : 0 as * mut sys :: godot_method_bind , is_bone_rest_disabled : 0 as * mut sys :: godot_method_bind , localize_rests : 0 as * mut sys :: godot_method_bind , physical_bones_add_collision_exception : 0 as * mut sys :: godot_method_bind , physical_bones_remove_collision_exception : 0 as * mut sys :: godot_method_bind , physical_bones_start_simulation : 0 as * mut sys :: godot_method_bind , physical_bones_stop_simulation : 0 as * mut sys :: godot_method_bind , register_skin : 0 as * mut sys :: godot_method_bind , set_bone_custom_pose : 0 as * mut sys :: godot_method_bind , set_bone_disable_rest : 0 as * mut sys :: godot_method_bind , set_bone_global_pose_override : 0 as * mut sys :: godot_method_bind , set_bone_name : 0 as * mut sys :: godot_method_bind , set_bone_parent : 0 as * mut sys :: godot_method_bind , set_bone_pose : 0 as * mut sys :: godot_method_bind , set_bone_rest : 0 as * mut sys :: godot_method_bind , unbind_child_node_from_bone : 0 as * mut sys :: godot_method_bind , unparent_bone_and_rest : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SkeletonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Skeleton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_bone = (gd_api . godot_method_bind_get_method) (class_name , "add_bone\0" . as_ptr () as * const c_char) ; table . bind_child_node_to_bone = (gd_api . godot_method_bind_get_method) (class_name , "bind_child_node_to_bone\0" . as_ptr () as * const c_char) ; table . clear_bones = (gd_api . godot_method_bind_get_method) (class_name , "clear_bones\0" . as_ptr () as * const c_char) ; table . clear_bones_global_pose_override = (gd_api . godot_method_bind_get_method) (class_name , "clear_bones_global_pose_override\0" . as_ptr () as * const c_char) ; table . find_bone = (gd_api . godot_method_bind_get_method) (class_name , "find_bone\0" . as_ptr () as * const c_char) ; table . get_bone_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_count\0" . as_ptr () as * const c_char) ; table . get_bone_custom_pose = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_custom_pose\0" . as_ptr () as * const c_char) ; table . get_bone_global_pose = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_global_pose\0" . as_ptr () as * const c_char) ; table . get_bone_global_pose_no_override = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_global_pose_no_override\0" . as_ptr () as * const c_char) ; table . get_bone_name = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_name\0" . as_ptr () as * const c_char) ; table . get_bone_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_parent\0" . as_ptr () as * const c_char) ; table . get_bone_pose = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_pose\0" . as_ptr () as * const c_char) ; table . get_bone_rest = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_rest\0" . as_ptr () as * const c_char) ; table . get_bound_child_nodes_to_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_bound_child_nodes_to_bone\0" . as_ptr () as * const c_char) ; table . is_bone_rest_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_bone_rest_disabled\0" . as_ptr () as * const c_char) ; table . localize_rests = (gd_api . godot_method_bind_get_method) (class_name , "localize_rests\0" . as_ptr () as * const c_char) ; table . physical_bones_add_collision_exception = (gd_api . godot_method_bind_get_method) (class_name , "physical_bones_add_collision_exception\0" . as_ptr () as * const c_char) ; table . physical_bones_remove_collision_exception = (gd_api . godot_method_bind_get_method) (class_name , "physical_bones_remove_collision_exception\0" . as_ptr () as * const c_char) ; table . physical_bones_start_simulation = (gd_api . godot_method_bind_get_method) (class_name , "physical_bones_start_simulation\0" . as_ptr () as * const c_char) ; table . physical_bones_stop_simulation = (gd_api . godot_method_bind_get_method) (class_name , "physical_bones_stop_simulation\0" . as_ptr () as * const c_char) ; table . register_skin = (gd_api . godot_method_bind_get_method) (class_name , "register_skin\0" . as_ptr () as * const c_char) ; table . set_bone_custom_pose = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_custom_pose\0" . as_ptr () as * const c_char) ; table . set_bone_disable_rest = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_disable_rest\0" . as_ptr () as * const c_char) ; table . set_bone_global_pose_override = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_global_pose_override\0" . as_ptr () as * const c_char) ; table . set_bone_name = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_name\0" . as_ptr () as * const c_char) ; table . set_bone_parent = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_parent\0" . as_ptr () as * const c_char) ; table . set_bone_pose = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_pose\0" . as_ptr () as * const c_char) ; table . set_bone_rest = (gd_api . godot_method_bind_get_method) (class_name , "set_bone_rest\0" . as_ptr () as * const c_char) ; table . unbind_child_node_from_bone = (gd_api . godot_method_bind_get_method) (class_name , "unbind_child_node_from_bone\0" . as_ptr () as * const c_char) ; table . unparent_bone_and_rest = (gd_api . godot_method_bind_get_method) (class_name , "unparent_bone_and_rest\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::skeleton::private::Skeleton;
            
            pub(crate) mod skeleton_2d {
                # ! [doc = "This module contains types related to the API class [`Skeleton2D`][super::Skeleton2D]."] pub (crate) mod private { # [doc = "`core class Skeleton2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_skeleton2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Skeleton2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Skeleton2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSkeleton2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Skeleton2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Skeleton2D ; impl Skeleton2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Skeleton2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns a [`Bone2D`][Bone2D] from the node hierarchy parented by Skeleton2D. The object to return is identified by the parameter `idx`. Bones are indexed by descending the node hierarchy from top to bottom, adding the children of each branch before moving to the next sibling."] # [doc = ""] # [inline] pub fn get_bone (& self , idx : i64) -> Option < Ref < crate :: generated :: Bone2D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Skeleton2DMethodTable :: get (get_api ()) . get_bone ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < Option < Ref < crate :: generated :: Bone2D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of [`Bone2D`][Bone2D] nodes in the node hierarchy parented by Skeleton2D."] # [doc = ""] # [inline] pub fn get_bone_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Skeleton2DMethodTable :: get (get_api ()) . get_bone_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`RID`][Rid] of a Skeleton2D instance."] # [doc = ""] # [inline] pub fn get_skeleton (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = Skeleton2DMethodTable :: get (get_api ()) . get_skeleton ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for Skeleton2D { } unsafe impl GodotObject for Skeleton2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Skeleton2D" } } impl QueueFree for Skeleton2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Skeleton2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Skeleton2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for Skeleton2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Skeleton2D { } unsafe impl SubClass < crate :: generated :: Node > for Skeleton2D { } unsafe impl SubClass < crate :: generated :: Object > for Skeleton2D { } impl Instanciable for Skeleton2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Skeleton2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Skeleton2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bone : * mut sys :: godot_method_bind , pub get_bone_count : * mut sys :: godot_method_bind , pub get_skeleton : * mut sys :: godot_method_bind } impl Skeleton2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Skeleton2DMethodTable = Skeleton2DMethodTable { class_constructor : None , get_bone : 0 as * mut sys :: godot_method_bind , get_bone_count : 0 as * mut sys :: godot_method_bind , get_skeleton : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Skeleton2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Skeleton2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_bone\0" . as_ptr () as * const c_char) ; table . get_bone_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bone_count\0" . as_ptr () as * const c_char) ; table . get_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::skeleton_2d::private::Skeleton2D;
            
            pub(crate) mod skeleton_ik {
                # ! [doc = "This module contains types related to the API class [`SkeletonIK`][super::SkeletonIK]."] pub (crate) mod private { # [doc = "`core class SkeletonIK` inherits `Node` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_skeletonik.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`SkeletonIK` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<SkeletonIK>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSkeletonIK inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SkeletonIK { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SkeletonIK ; impl SkeletonIK { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SkeletonIKMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Interpolation value for how much the IK results are applied to the current skeleton bone chain. A value of `1.0` will overwrite all skeleton bone transforms completely while a value of `0.0` will visually disable the SkeletonIK. A value at or below `0.01` also calls [`Skeleton.clear_bones_global_pose_override`][Skeleton::clear_bones_global_pose_override]."] # [doc = ""] # [inline] pub fn interpolation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_interpolation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Secondary target position (first is [`target`][Self::target] property or [`target_node`][Self::target_node]) for the IK chain. Use magnet position (pole target) to control the bending of the IK chain. Only works if the bone chain has more than 2 bones. The middle chain bone position will be linearly interpolated with the magnet position."] # [doc = ""] # [inline] pub fn magnet_position (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_magnet_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Number of iteration loops used by the IK solver to produce more accurate (and elegant) bone chain results."] # [doc = ""] # [inline] pub fn max_iterations (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_max_iterations ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The minimum distance between bone and goal target. If the distance is below this value, the IK solver stops further iterations."] # [doc = ""] # [inline] pub fn min_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_min_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the parent [`Skeleton`][Skeleton] Node that was present when SkeletonIK entered the [`SceneTree`][SceneTree]. Returns null if the parent node was not a [`Skeleton`][Skeleton] Node when SkeletonIK entered the [`SceneTree`][SceneTree]."] # [doc = ""] # [inline] pub fn get_parent_skeleton (& self) -> Option < Ref < crate :: generated :: Skeleton , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_parent_skeleton ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Skeleton , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The name of the current root bone, the first bone in the IK chain."] # [doc = ""] # [inline] pub fn root_bone (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_root_bone ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Target node [`NodePath`][NodePath] for the IK chain. If available, the node's current [`Transform`][Transform] is used instead of the [`target`][Self::target] property."] # [doc = ""] # [inline] pub fn target_node (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_target_node ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "First target of the IK chain where the tip bone is placed and, if [`override_tip_basis`][Self::override_tip_basis] is `true`, how the tip bone is rotated. If a [`target_node`][Self::target_node] path is available the nodes transform is used instead and this property is ignored."] # [doc = ""] # [inline] pub fn target_transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_target_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The name of the current tip bone, the last bone in the IK chain placed at the [`target`][Self::target] transform (or [`target_node`][Self::target_node] if defined)."] # [doc = ""] # [inline] pub fn tip_bone (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . get_tip_bone ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true` overwrites the rotation of the tip bone with the rotation of the [`target`][Self::target] (or [`target_node`][Self::target_node] if defined)."] # [doc = ""] # [inline] pub fn is_override_tip_basis (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . is_override_tip_basis ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if SkeletonIK is applying IK effects on continues frames to the [`Skeleton`][Skeleton] bones. Returns `false` if SkeletonIK is stopped or [`start`][Self::start] was used with the `one_time` parameter set to `true`."] # [doc = ""] # [inline] pub fn is_running (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . is_running ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, instructs the IK solver to consider the secondary magnet target (pole target) when calculating the bone chain. Use the magnet position (pole target) to control the bending of the IK chain."] # [doc = ""] # [inline] pub fn is_using_magnet (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . is_using_magnet ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Interpolation value for how much the IK results are applied to the current skeleton bone chain. A value of `1.0` will overwrite all skeleton bone transforms completely while a value of `0.0` will visually disable the SkeletonIK. A value at or below `0.01` also calls [`Skeleton.clear_bones_global_pose_override`][Skeleton::clear_bones_global_pose_override]."] # [doc = ""] # [inline] pub fn set_interpolation (& self , interpolation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_interpolation ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , interpolation as _) ; } } # [doc = "Secondary target position (first is [`target`][Self::target] property or [`target_node`][Self::target_node]) for the IK chain. Use magnet position (pole target) to control the bending of the IK chain. Only works if the bone chain has more than 2 bones. The middle chain bone position will be linearly interpolated with the magnet position."] # [doc = ""] # [inline] pub fn set_magnet_position (& self , local_position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_magnet_position ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , local_position) ; } } # [doc = "Number of iteration loops used by the IK solver to produce more accurate (and elegant) bone chain results."] # [doc = ""] # [inline] pub fn set_max_iterations (& self , iterations : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_max_iterations ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , iterations as _) ; } } # [doc = "The minimum distance between bone and goal target. If the distance is below this value, the IK solver stops further iterations."] # [doc = ""] # [inline] pub fn set_min_distance (& self , min_distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_min_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , min_distance as _) ; } } # [doc = "If `true` overwrites the rotation of the tip bone with the rotation of the [`target`][Self::target] (or [`target_node`][Self::target_node] if defined)."] # [doc = ""] # [inline] pub fn set_override_tip_basis (& self , override_ : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_override_tip_basis ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , override_ as _) ; } } # [doc = "The name of the current root bone, the first bone in the IK chain."] # [doc = ""] # [inline] pub fn set_root_bone (& self , root_bone : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_root_bone ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , root_bone . into ()) ; } } # [doc = "Target node [`NodePath`][NodePath] for the IK chain. If available, the node's current [`Transform`][Transform] is used instead of the [`target`][Self::target] property."] # [doc = ""] # [inline] pub fn set_target_node (& self , node : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_target_node ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , node . into ()) ; } } # [doc = "First target of the IK chain where the tip bone is placed and, if [`override_tip_basis`][Self::override_tip_basis] is `true`, how the tip bone is rotated. If a [`target_node`][Self::target_node] path is available the nodes transform is used instead and this property is ignored."] # [doc = ""] # [inline] pub fn set_target_transform (& self , target : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_target_transform ; let ret = crate :: icalls :: icallvar__trans (method_bind , self . this . sys () . as_ptr () , target) ; } } # [doc = "The name of the current tip bone, the last bone in the IK chain placed at the [`target`][Self::target] transform (or [`target_node`][Self::target_node] if defined)."] # [doc = ""] # [inline] pub fn set_tip_bone (& self , tip_bone : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_tip_bone ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , tip_bone . into ()) ; } } # [doc = "If `true`, instructs the IK solver to consider the secondary magnet target (pole target) when calculating the bone chain. Use the magnet position (pole target) to control the bending of the IK chain."] # [doc = ""] # [inline] pub fn set_use_magnet (& self , use_ : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . set_use_magnet ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , use_ as _) ; } } # [doc = "Starts applying IK effects on each frame to the [`Skeleton`][Skeleton] bones but will only take effect starting on the next frame. If `one_time` is `true`, this will take effect immediately but also reset on the next frame.\n# Default Arguments\n* `one_time` - `false`"] # [doc = ""] # [inline] pub fn start (& self , one_time : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . start ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , one_time as _) ; } } # [doc = "Stops applying IK effects on each frame to the [`Skeleton`][Skeleton] bones and also calls [`Skeleton.clear_bones_global_pose_override`][Skeleton::clear_bones_global_pose_override] to remove existing overrides on all bones."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkeletonIKMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SkeletonIK { } unsafe impl GodotObject for SkeletonIK { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SkeletonIK" } } impl QueueFree for SkeletonIK { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for SkeletonIK { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SkeletonIK { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for SkeletonIK { } unsafe impl SubClass < crate :: generated :: Object > for SkeletonIK { } impl Instanciable for SkeletonIK { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { SkeletonIK :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SkeletonIKMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_interpolation : * mut sys :: godot_method_bind , pub get_magnet_position : * mut sys :: godot_method_bind , pub get_max_iterations : * mut sys :: godot_method_bind , pub get_min_distance : * mut sys :: godot_method_bind , pub get_parent_skeleton : * mut sys :: godot_method_bind , pub get_root_bone : * mut sys :: godot_method_bind , pub get_target_node : * mut sys :: godot_method_bind , pub get_target_transform : * mut sys :: godot_method_bind , pub get_tip_bone : * mut sys :: godot_method_bind , pub is_override_tip_basis : * mut sys :: godot_method_bind , pub is_running : * mut sys :: godot_method_bind , pub is_using_magnet : * mut sys :: godot_method_bind , pub set_interpolation : * mut sys :: godot_method_bind , pub set_magnet_position : * mut sys :: godot_method_bind , pub set_max_iterations : * mut sys :: godot_method_bind , pub set_min_distance : * mut sys :: godot_method_bind , pub set_override_tip_basis : * mut sys :: godot_method_bind , pub set_root_bone : * mut sys :: godot_method_bind , pub set_target_node : * mut sys :: godot_method_bind , pub set_target_transform : * mut sys :: godot_method_bind , pub set_tip_bone : * mut sys :: godot_method_bind , pub set_use_magnet : * mut sys :: godot_method_bind , pub start : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl SkeletonIKMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SkeletonIKMethodTable = SkeletonIKMethodTable { class_constructor : None , get_interpolation : 0 as * mut sys :: godot_method_bind , get_magnet_position : 0 as * mut sys :: godot_method_bind , get_max_iterations : 0 as * mut sys :: godot_method_bind , get_min_distance : 0 as * mut sys :: godot_method_bind , get_parent_skeleton : 0 as * mut sys :: godot_method_bind , get_root_bone : 0 as * mut sys :: godot_method_bind , get_target_node : 0 as * mut sys :: godot_method_bind , get_target_transform : 0 as * mut sys :: godot_method_bind , get_tip_bone : 0 as * mut sys :: godot_method_bind , is_override_tip_basis : 0 as * mut sys :: godot_method_bind , is_running : 0 as * mut sys :: godot_method_bind , is_using_magnet : 0 as * mut sys :: godot_method_bind , set_interpolation : 0 as * mut sys :: godot_method_bind , set_magnet_position : 0 as * mut sys :: godot_method_bind , set_max_iterations : 0 as * mut sys :: godot_method_bind , set_min_distance : 0 as * mut sys :: godot_method_bind , set_override_tip_basis : 0 as * mut sys :: godot_method_bind , set_root_bone : 0 as * mut sys :: godot_method_bind , set_target_node : 0 as * mut sys :: godot_method_bind , set_target_transform : 0 as * mut sys :: godot_method_bind , set_tip_bone : 0 as * mut sys :: godot_method_bind , set_use_magnet : 0 as * mut sys :: godot_method_bind , start : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SkeletonIKMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SkeletonIK\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "get_interpolation\0" . as_ptr () as * const c_char) ; table . get_magnet_position = (gd_api . godot_method_bind_get_method) (class_name , "get_magnet_position\0" . as_ptr () as * const c_char) ; table . get_max_iterations = (gd_api . godot_method_bind_get_method) (class_name , "get_max_iterations\0" . as_ptr () as * const c_char) ; table . get_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_min_distance\0" . as_ptr () as * const c_char) ; table . get_parent_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_skeleton\0" . as_ptr () as * const c_char) ; table . get_root_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_root_bone\0" . as_ptr () as * const c_char) ; table . get_target_node = (gd_api . godot_method_bind_get_method) (class_name , "get_target_node\0" . as_ptr () as * const c_char) ; table . get_target_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_target_transform\0" . as_ptr () as * const c_char) ; table . get_tip_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_tip_bone\0" . as_ptr () as * const c_char) ; table . is_override_tip_basis = (gd_api . godot_method_bind_get_method) (class_name , "is_override_tip_basis\0" . as_ptr () as * const c_char) ; table . is_running = (gd_api . godot_method_bind_get_method) (class_name , "is_running\0" . as_ptr () as * const c_char) ; table . is_using_magnet = (gd_api . godot_method_bind_get_method) (class_name , "is_using_magnet\0" . as_ptr () as * const c_char) ; table . set_interpolation = (gd_api . godot_method_bind_get_method) (class_name , "set_interpolation\0" . as_ptr () as * const c_char) ; table . set_magnet_position = (gd_api . godot_method_bind_get_method) (class_name , "set_magnet_position\0" . as_ptr () as * const c_char) ; table . set_max_iterations = (gd_api . godot_method_bind_get_method) (class_name , "set_max_iterations\0" . as_ptr () as * const c_char) ; table . set_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_min_distance\0" . as_ptr () as * const c_char) ; table . set_override_tip_basis = (gd_api . godot_method_bind_get_method) (class_name , "set_override_tip_basis\0" . as_ptr () as * const c_char) ; table . set_root_bone = (gd_api . godot_method_bind_get_method) (class_name , "set_root_bone\0" . as_ptr () as * const c_char) ; table . set_target_node = (gd_api . godot_method_bind_get_method) (class_name , "set_target_node\0" . as_ptr () as * const c_char) ; table . set_target_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_target_transform\0" . as_ptr () as * const c_char) ; table . set_tip_bone = (gd_api . godot_method_bind_get_method) (class_name , "set_tip_bone\0" . as_ptr () as * const c_char) ; table . set_use_magnet = (gd_api . godot_method_bind_get_method) (class_name , "set_use_magnet\0" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::skeleton_ik::private::SkeletonIK;
            
            pub(crate) mod skin {
                # ! [doc = "This module contains types related to the API class [`Skin`][super::Skin]."] pub (crate) mod private { # [doc = "`core class Skin` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_skin.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSkin inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Skin { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Skin ; impl Skin { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SkinMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_bind (& self , bone : i64 , pose : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkinMethodTable :: get (get_api ()) . add_bind ; let ret = crate :: icalls :: icallvar__i64_trans (method_bind , self . this . sys () . as_ptr () , bone as _ , pose) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn clear_binds (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkinMethodTable :: get (get_api ()) . clear_binds ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_bind_bone (& self , bind_index : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkinMethodTable :: get (get_api ()) . get_bind_bone ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bind_index as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_bind_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SkinMethodTable :: get (get_api ()) . get_bind_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_bind_name (& self , bind_index : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SkinMethodTable :: get (get_api ()) . get_bind_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bind_index as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_bind_pose (& self , bind_index : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SkinMethodTable :: get (get_api ()) . get_bind_pose ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bind_index as _) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bind_bone (& self , bind_index : i64 , bone : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkinMethodTable :: get (get_api ()) . set_bind_bone ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , bind_index as _ , bone as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bind_count (& self , bind_count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkinMethodTable :: get (get_api ()) . set_bind_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bind_count as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bind_name (& self , bind_index : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkinMethodTable :: get (get_api ()) . set_bind_name ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , bind_index as _ , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bind_pose (& self , bind_index : i64 , pose : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkinMethodTable :: get (get_api ()) . set_bind_pose ; let ret = crate :: icalls :: icallvar__i64_trans (method_bind , self . this . sys () . as_ptr () , bind_index as _ , pose) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Skin { } unsafe impl GodotObject for Skin { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Skin" } } impl std :: ops :: Deref for Skin { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Skin { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Skin { } unsafe impl SubClass < crate :: generated :: Reference > for Skin { } unsafe impl SubClass < crate :: generated :: Object > for Skin { } impl Instanciable for Skin { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Skin :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SkinMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_bind : * mut sys :: godot_method_bind , pub clear_binds : * mut sys :: godot_method_bind , pub get_bind_bone : * mut sys :: godot_method_bind , pub get_bind_count : * mut sys :: godot_method_bind , pub get_bind_name : * mut sys :: godot_method_bind , pub get_bind_pose : * mut sys :: godot_method_bind , pub set_bind_bone : * mut sys :: godot_method_bind , pub set_bind_count : * mut sys :: godot_method_bind , pub set_bind_name : * mut sys :: godot_method_bind , pub set_bind_pose : * mut sys :: godot_method_bind } impl SkinMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SkinMethodTable = SkinMethodTable { class_constructor : None , add_bind : 0 as * mut sys :: godot_method_bind , clear_binds : 0 as * mut sys :: godot_method_bind , get_bind_bone : 0 as * mut sys :: godot_method_bind , get_bind_count : 0 as * mut sys :: godot_method_bind , get_bind_name : 0 as * mut sys :: godot_method_bind , get_bind_pose : 0 as * mut sys :: godot_method_bind , set_bind_bone : 0 as * mut sys :: godot_method_bind , set_bind_count : 0 as * mut sys :: godot_method_bind , set_bind_name : 0 as * mut sys :: godot_method_bind , set_bind_pose : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SkinMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Skin\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_bind = (gd_api . godot_method_bind_get_method) (class_name , "add_bind\0" . as_ptr () as * const c_char) ; table . clear_binds = (gd_api . godot_method_bind_get_method) (class_name , "clear_binds\0" . as_ptr () as * const c_char) ; table . get_bind_bone = (gd_api . godot_method_bind_get_method) (class_name , "get_bind_bone\0" . as_ptr () as * const c_char) ; table . get_bind_count = (gd_api . godot_method_bind_get_method) (class_name , "get_bind_count\0" . as_ptr () as * const c_char) ; table . get_bind_name = (gd_api . godot_method_bind_get_method) (class_name , "get_bind_name\0" . as_ptr () as * const c_char) ; table . get_bind_pose = (gd_api . godot_method_bind_get_method) (class_name , "get_bind_pose\0" . as_ptr () as * const c_char) ; table . set_bind_bone = (gd_api . godot_method_bind_get_method) (class_name , "set_bind_bone\0" . as_ptr () as * const c_char) ; table . set_bind_count = (gd_api . godot_method_bind_get_method) (class_name , "set_bind_count\0" . as_ptr () as * const c_char) ; table . set_bind_name = (gd_api . godot_method_bind_get_method) (class_name , "set_bind_name\0" . as_ptr () as * const c_char) ; table . set_bind_pose = (gd_api . godot_method_bind_get_method) (class_name , "set_bind_pose\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::skin::private::Skin;
            
            pub(crate) mod skin_reference {
                # ! [doc = "This module contains types related to the API class [`SkinReference`][super::SkinReference]."] pub (crate) mod private { # [doc = "`core class SkinReference` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_skinreference.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSkinReference inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SkinReference { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SkinReference ; impl SkinReference { # [doc = ""] # [doc = ""] # [inline] pub fn get_skeleton (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = SkinReferenceMethodTable :: get (get_api ()) . get_skeleton ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_skin (& self) -> Option < Ref < crate :: generated :: Skin , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SkinReferenceMethodTable :: get (get_api ()) . get_skin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Skin , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for SkinReference { } unsafe impl GodotObject for SkinReference { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SkinReference" } } impl std :: ops :: Deref for SkinReference { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SkinReference { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for SkinReference { } unsafe impl SubClass < crate :: generated :: Object > for SkinReference { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SkinReferenceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_skeleton : * mut sys :: godot_method_bind , pub get_skin : * mut sys :: godot_method_bind } impl SkinReferenceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SkinReferenceMethodTable = SkinReferenceMethodTable { class_constructor : None , get_skeleton : 0 as * mut sys :: godot_method_bind , get_skin : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SkinReferenceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SkinReference\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "get_skeleton\0" . as_ptr () as * const c_char) ; table . get_skin = (gd_api . godot_method_bind_get_method) (class_name , "get_skin\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::skin_reference::private::SkinReference;
            
            pub mod sky {
                # ! [doc = "This module contains types related to the API class [`Sky`][super::Sky]."] pub (crate) mod private { # [doc = "`core class Sky` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`sky`][super::sky] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_sky.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSky inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Sky { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Sky ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct RadianceSize (pub i64) ; impl RadianceSize { pub const _32 : RadianceSize = RadianceSize (0i64) ; pub const _64 : RadianceSize = RadianceSize (1i64) ; pub const _128 : RadianceSize = RadianceSize (2i64) ; pub const _256 : RadianceSize = RadianceSize (3i64) ; pub const _512 : RadianceSize = RadianceSize (4i64) ; pub const _1024 : RadianceSize = RadianceSize (5i64) ; pub const _2048 : RadianceSize = RadianceSize (6i64) ; pub const MAX : RadianceSize = RadianceSize (7i64) ; } impl From < i64 > for RadianceSize { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < RadianceSize > for i64 { # [inline] fn from (v : RadianceSize) -> Self { v . 0 } } impl FromVariant for RadianceSize { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Sky { pub const RADIANCE_SIZE_32 : i64 = 0i64 ; pub const RADIANCE_SIZE_64 : i64 = 1i64 ; pub const RADIANCE_SIZE_128 : i64 = 2i64 ; pub const RADIANCE_SIZE_256 : i64 = 3i64 ; pub const RADIANCE_SIZE_512 : i64 = 4i64 ; pub const RADIANCE_SIZE_1024 : i64 = 5i64 ; pub const RADIANCE_SIZE_2048 : i64 = 6i64 ; pub const RADIANCE_SIZE_MAX : i64 = 7i64 ; } impl Sky { # [doc = "The [`Sky`][Sky]'s radiance map size. The higher the radiance map size, the more detailed the lighting from the [`Sky`][Sky] will be.\nSee [`RadianceSize`][RadianceSize] constants for values.\n**Note:** You will only benefit from high radiance sizes if you have perfectly sharp reflective surfaces in your project and are not using [`ReflectionProbe`][ReflectionProbe]s or [`GIProbe`][GIProbe]s. For most projects, keeping [`radiance_size`][Self::radiance_size] to the default value is the best compromise between visuals and performance. Be careful when using high radiance size values as these can cause crashes on low-end GPUs."] # [doc = ""] # [inline] pub fn radiance_size (& self) -> crate :: generated :: sky :: RadianceSize { unsafe { let method_bind : * mut sys :: godot_method_bind = SkyMethodTable :: get (get_api ()) . get_radiance_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: sky :: RadianceSize > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Sky`][Sky]'s radiance map size. The higher the radiance map size, the more detailed the lighting from the [`Sky`][Sky] will be.\nSee [`RadianceSize`][RadianceSize] constants for values.\n**Note:** You will only benefit from high radiance sizes if you have perfectly sharp reflective surfaces in your project and are not using [`ReflectionProbe`][ReflectionProbe]s or [`GIProbe`][GIProbe]s. For most projects, keeping [`radiance_size`][Self::radiance_size] to the default value is the best compromise between visuals and performance. Be careful when using high radiance size values as these can cause crashes on low-end GPUs."] # [doc = ""] # [inline] pub fn set_radiance_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SkyMethodTable :: get (get_api ()) . set_radiance_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Sky { } unsafe impl GodotObject for Sky { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Sky" } } impl std :: ops :: Deref for Sky { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Sky { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Sky { } unsafe impl SubClass < crate :: generated :: Reference > for Sky { } unsafe impl SubClass < crate :: generated :: Object > for Sky { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SkyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_radiance_size : * mut sys :: godot_method_bind , pub set_radiance_size : * mut sys :: godot_method_bind } impl SkyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SkyMethodTable = SkyMethodTable { class_constructor : None , get_radiance_size : 0 as * mut sys :: godot_method_bind , set_radiance_size : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SkyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Sky\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_radiance_size = (gd_api . godot_method_bind_get_method) (class_name , "get_radiance_size\0" . as_ptr () as * const c_char) ; table . set_radiance_size = (gd_api . godot_method_bind_get_method) (class_name , "set_radiance_size\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::sky::private::Sky;
            
            pub(crate) mod slider {
                # ! [doc = "This module contains types related to the API class [`Slider`][super::Slider]."] pub (crate) mod private { # [doc = "`core class Slider` inherits `Range` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_slider.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nSlider inherits methods from:\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Slider { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Slider ; impl Slider { # [doc = "Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers."] # [doc = ""] # [inline] pub fn ticks (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . get_ticks ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the slider will display ticks for minimum and maximum values."] # [doc = ""] # [inline] pub fn ticks_on_borders (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . get_ticks_on_borders ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the slider can be interacted with. If `false`, the value can be changed only by code."] # [doc = ""] # [inline] pub fn is_editable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . is_editable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the value can be changed using the mouse wheel."] # [doc = ""] # [inline] pub fn is_scrollable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . is_scrollable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the slider can be interacted with. If `false`, the value can be changed only by code."] # [doc = ""] # [inline] pub fn set_editable (& self , editable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . set_editable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , editable as _) ; } } # [doc = "If `true`, the value can be changed using the mouse wheel."] # [doc = ""] # [inline] pub fn set_scrollable (& self , scrollable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . set_scrollable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , scrollable as _) ; } } # [doc = "Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers."] # [doc = ""] # [inline] pub fn set_ticks (& self , count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . set_ticks ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , count as _) ; } } # [doc = "If `true`, the slider will display ticks for minimum and maximum values."] # [doc = ""] # [inline] pub fn set_ticks_on_borders (& self , ticks_on_border : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderMethodTable :: get (get_api ()) . set_ticks_on_borders ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , ticks_on_border as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Slider { } unsafe impl GodotObject for Slider { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Slider" } } impl QueueFree for Slider { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Slider { type Target = crate :: generated :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Slider { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Range > for Slider { } unsafe impl SubClass < crate :: generated :: Control > for Slider { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Slider { } unsafe impl SubClass < crate :: generated :: Node > for Slider { } unsafe impl SubClass < crate :: generated :: Object > for Slider { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SliderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_ticks : * mut sys :: godot_method_bind , pub get_ticks_on_borders : * mut sys :: godot_method_bind , pub is_editable : * mut sys :: godot_method_bind , pub is_scrollable : * mut sys :: godot_method_bind , pub set_editable : * mut sys :: godot_method_bind , pub set_scrollable : * mut sys :: godot_method_bind , pub set_ticks : * mut sys :: godot_method_bind , pub set_ticks_on_borders : * mut sys :: godot_method_bind } impl SliderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SliderMethodTable = SliderMethodTable { class_constructor : None , get_ticks : 0 as * mut sys :: godot_method_bind , get_ticks_on_borders : 0 as * mut sys :: godot_method_bind , is_editable : 0 as * mut sys :: godot_method_bind , is_scrollable : 0 as * mut sys :: godot_method_bind , set_editable : 0 as * mut sys :: godot_method_bind , set_scrollable : 0 as * mut sys :: godot_method_bind , set_ticks : 0 as * mut sys :: godot_method_bind , set_ticks_on_borders : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SliderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Slider\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_ticks = (gd_api . godot_method_bind_get_method) (class_name , "get_ticks\0" . as_ptr () as * const c_char) ; table . get_ticks_on_borders = (gd_api . godot_method_bind_get_method) (class_name , "get_ticks_on_borders\0" . as_ptr () as * const c_char) ; table . is_editable = (gd_api . godot_method_bind_get_method) (class_name , "is_editable\0" . as_ptr () as * const c_char) ; table . is_scrollable = (gd_api . godot_method_bind_get_method) (class_name , "is_scrollable\0" . as_ptr () as * const c_char) ; table . set_editable = (gd_api . godot_method_bind_get_method) (class_name , "set_editable\0" . as_ptr () as * const c_char) ; table . set_scrollable = (gd_api . godot_method_bind_get_method) (class_name , "set_scrollable\0" . as_ptr () as * const c_char) ; table . set_ticks = (gd_api . godot_method_bind_get_method) (class_name , "set_ticks\0" . as_ptr () as * const c_char) ; table . set_ticks_on_borders = (gd_api . godot_method_bind_get_method) (class_name , "set_ticks_on_borders\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::slider::private::Slider;
            
            pub mod slider_joint {
                # ! [doc = "This module contains types related to the API class [`SliderJoint`][super::SliderJoint]."] pub (crate) mod private { # [doc = "`core class SliderJoint` inherits `Joint` (manually managed).\n\nThis class has related types in the [`slider_joint`][super::slider_joint] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_sliderjoint.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`SliderJoint` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<SliderJoint>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSliderJoint inherits methods from:\n - [Joint](struct.Joint.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SliderJoint { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SliderJoint ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Param (pub i64) ; impl Param { pub const LINEAR_LIMIT_UPPER : Param = Param (0i64) ; pub const LINEAR_LIMIT_LOWER : Param = Param (1i64) ; pub const LINEAR_LIMIT_SOFTNESS : Param = Param (2i64) ; pub const LINEAR_LIMIT_RESTITUTION : Param = Param (3i64) ; pub const LINEAR_LIMIT_DAMPING : Param = Param (4i64) ; pub const LINEAR_MOTION_SOFTNESS : Param = Param (5i64) ; pub const LINEAR_MOTION_RESTITUTION : Param = Param (6i64) ; pub const LINEAR_MOTION_DAMPING : Param = Param (7i64) ; pub const LINEAR_ORTHOGONAL_SOFTNESS : Param = Param (8i64) ; pub const LINEAR_ORTHOGONAL_RESTITUTION : Param = Param (9i64) ; pub const LINEAR_ORTHOGONAL_DAMPING : Param = Param (10i64) ; pub const ANGULAR_LIMIT_UPPER : Param = Param (11i64) ; pub const ANGULAR_LIMIT_LOWER : Param = Param (12i64) ; pub const ANGULAR_LIMIT_SOFTNESS : Param = Param (13i64) ; pub const ANGULAR_LIMIT_RESTITUTION : Param = Param (14i64) ; pub const ANGULAR_LIMIT_DAMPING : Param = Param (15i64) ; pub const ANGULAR_MOTION_SOFTNESS : Param = Param (16i64) ; pub const ANGULAR_MOTION_RESTITUTION : Param = Param (17i64) ; pub const ANGULAR_MOTION_DAMPING : Param = Param (18i64) ; pub const ANGULAR_ORTHOGONAL_SOFTNESS : Param = Param (19i64) ; pub const ANGULAR_ORTHOGONAL_RESTITUTION : Param = Param (20i64) ; pub const ANGULAR_ORTHOGONAL_DAMPING : Param = Param (21i64) ; pub const MAX : Param = Param (22i64) ; } impl From < i64 > for Param { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Param > for i64 { # [inline] fn from (v : Param) -> Self { v . 0 } } impl FromVariant for Param { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SliderJoint { pub const PARAM_LINEAR_LIMIT_UPPER : i64 = 0i64 ; pub const PARAM_LINEAR_LIMIT_LOWER : i64 = 1i64 ; pub const PARAM_LINEAR_LIMIT_SOFTNESS : i64 = 2i64 ; pub const PARAM_LINEAR_LIMIT_RESTITUTION : i64 = 3i64 ; pub const PARAM_LINEAR_LIMIT_DAMPING : i64 = 4i64 ; pub const PARAM_LINEAR_MOTION_SOFTNESS : i64 = 5i64 ; pub const PARAM_LINEAR_MOTION_RESTITUTION : i64 = 6i64 ; pub const PARAM_LINEAR_MOTION_DAMPING : i64 = 7i64 ; pub const PARAM_LINEAR_ORTHOGONAL_SOFTNESS : i64 = 8i64 ; pub const PARAM_LINEAR_ORTHOGONAL_RESTITUTION : i64 = 9i64 ; pub const PARAM_LINEAR_ORTHOGONAL_DAMPING : i64 = 10i64 ; pub const PARAM_ANGULAR_LIMIT_UPPER : i64 = 11i64 ; pub const PARAM_ANGULAR_LIMIT_LOWER : i64 = 12i64 ; pub const PARAM_ANGULAR_LIMIT_SOFTNESS : i64 = 13i64 ; pub const PARAM_ANGULAR_LIMIT_RESTITUTION : i64 = 14i64 ; pub const PARAM_ANGULAR_LIMIT_DAMPING : i64 = 15i64 ; pub const PARAM_ANGULAR_MOTION_SOFTNESS : i64 = 16i64 ; pub const PARAM_ANGULAR_MOTION_RESTITUTION : i64 = 17i64 ; pub const PARAM_ANGULAR_MOTION_DAMPING : i64 = 18i64 ; pub const PARAM_ANGULAR_ORTHOGONAL_SOFTNESS : i64 = 19i64 ; pub const PARAM_ANGULAR_ORTHOGONAL_RESTITUTION : i64 = 20i64 ; pub const PARAM_ANGULAR_ORTHOGONAL_DAMPING : i64 = 21i64 ; pub const PARAM_MAX : i64 = 22i64 ; } impl SliderJoint { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SliderJointMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A factor applied to the movement across axes orthogonal to the slider."] # [doc = ""] # [inline] pub fn param (& self , param : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderJointMethodTable :: get (get_api ()) . get_param ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "A factor applied to the movement across axes orthogonal to the slider."] # [doc = ""] # [inline] pub fn set_param (& self , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SliderJointMethodTable :: get (get_api ()) . set_param ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , param as _ , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SliderJoint { } unsafe impl GodotObject for SliderJoint { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SliderJoint" } } impl QueueFree for SliderJoint { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for SliderJoint { type Target = crate :: generated :: Joint ; # [inline] fn deref (& self) -> & crate :: generated :: Joint { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SliderJoint { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Joint { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Joint > for SliderJoint { } unsafe impl SubClass < crate :: generated :: Spatial > for SliderJoint { } unsafe impl SubClass < crate :: generated :: Node > for SliderJoint { } unsafe impl SubClass < crate :: generated :: Object > for SliderJoint { } impl Instanciable for SliderJoint { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { SliderJoint :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SliderJointMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_param : * mut sys :: godot_method_bind , pub set_param : * mut sys :: godot_method_bind } impl SliderJointMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SliderJointMethodTable = SliderJointMethodTable { class_constructor : None , get_param : 0 as * mut sys :: godot_method_bind , set_param : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SliderJointMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SliderJoint\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_param = (gd_api . godot_method_bind_get_method) (class_name , "get_param\0" . as_ptr () as * const c_char) ; table . set_param = (gd_api . godot_method_bind_get_method) (class_name , "set_param\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::slider_joint::private::SliderJoint;
            
            pub(crate) mod soft_body {
                # ! [doc = "This module contains types related to the API class [`SoftBody`][super::SoftBody]."] pub (crate) mod private { # [doc = "`core class SoftBody` inherits `MeshInstance` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_softbody.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`SoftBody` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<SoftBody>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSoftBody inherits methods from:\n - [MeshInstance](struct.MeshInstance.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SoftBody { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SoftBody ; impl SoftBody { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SoftBodyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a body to the list of bodies that this body can't collide with."] # [doc = ""] # [inline] pub fn add_collision_exception_with (& self , body : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . add_collision_exception_with ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn areaAngular_stiffness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_areaAngular_stiffness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an array of nodes that were added as collision exceptions for this body."] # [doc = ""] # [inline] pub fn get_collision_exceptions (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_collision_exceptions ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The physics layers this SoftBody is in.\nCollidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.\nA contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an individual bit on the collision mask."] # [doc = ""] # [inline] pub fn get_collision_layer_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_collision_layer_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The physics layers this SoftBody scans for collisions. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an individual bit on the collision mask."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn damping_coefficient (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_damping_coefficient ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn drag_coefficient (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_drag_coefficient ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn linear_stiffness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_linear_stiffness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "[`NodePath`][NodePath] to a [`CollisionObject`][CollisionObject] this SoftBody should avoid clipping."] # [doc = ""] # [inline] pub fn parent_collision_ignore (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_parent_collision_ignore ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns local translation of a vertex in the surface array."] # [doc = ""] # [inline] pub fn get_point_transform (& self , point_index : i64) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_point_transform ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , point_index as _) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn pose_matching_coefficient (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_pose_matching_coefficient ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn pressure_coefficient (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_pressure_coefficient ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Increasing this value will improve the resulting simulation, but can affect performance. Use with care."] # [doc = ""] # [inline] pub fn simulation_precision (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_simulation_precision ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The SoftBody's mass."] # [doc = ""] # [inline] pub fn total_mass (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_total_mass ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn volume_stiffness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . get_volume_stiffness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the [`SoftBody`][SoftBody] is simulated in physics. Can be set to `false` to pause the physics simulation."] # [doc = ""] # [inline] pub fn is_physics_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . is_physics_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if vertex is set to pinned."] # [doc = ""] # [inline] pub fn is_point_pinned (& self , point_index : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . is_point_pinned ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , point_index as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the [`SoftBody`][SoftBody] will respond to [`RayCast`][RayCast]s."] # [doc = ""] # [inline] pub fn is_ray_pickable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . is_ray_pickable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes a body from the list of bodies that this body can't collide with."] # [doc = ""] # [inline] pub fn remove_collision_exception_with (& self , body : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . remove_collision_exception_with ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , body . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_areaAngular_stiffness (& self , areaAngular_stiffness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_areaAngular_stiffness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , areaAngular_stiffness as _) ; } } # [doc = "The physics layers this SoftBody is in.\nCollidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property.\nA contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_layer (& self , collision_layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , collision_layer as _) ; } } # [doc = "Sets individual bits on the layer mask. Use this if you only need to change one layer's value."] # [doc = ""] # [inline] pub fn set_collision_layer_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_collision_layer_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = "The physics layers this SoftBody scans for collisions. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , collision_mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , collision_mask as _) ; } } # [doc = "Sets individual bits on the collision mask. Use this if you only need to change one layer's value."] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_damping_coefficient (& self , damping_coefficient : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_damping_coefficient ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , damping_coefficient as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_drag_coefficient (& self , drag_coefficient : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_drag_coefficient ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , drag_coefficient as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_linear_stiffness (& self , linear_stiffness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_linear_stiffness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , linear_stiffness as _) ; } } # [doc = "[`NodePath`][NodePath] to a [`CollisionObject`][CollisionObject] this SoftBody should avoid clipping."] # [doc = ""] # [inline] pub fn set_parent_collision_ignore (& self , parent_collision_ignore : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_parent_collision_ignore ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , parent_collision_ignore . into ()) ; } } # [doc = "If `true`, the [`SoftBody`][SoftBody] is simulated in physics. Can be set to `false` to pause the physics simulation."] # [doc = ""] # [inline] pub fn set_physics_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_physics_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Sets the pinned state of a surface vertex. When set to `true`, the optional `attachment_path` can define a [`Spatial`][Spatial] the pinned vertex will be attached to.\n# Default Arguments\n* `attachment_path` - `NodePath(\"\")`"] # [doc = ""] # [inline] pub fn set_point_pinned (& self , point_index : i64 , pinned : bool , attachment_path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_point_pinned ; let ret = crate :: icalls :: icallvar__i64_bool_nodepath (method_bind , self . this . sys () . as_ptr () , point_index as _ , pinned as _ , attachment_path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_pose_matching_coefficient (& self , pose_matching_coefficient : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_pose_matching_coefficient ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , pose_matching_coefficient as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_pressure_coefficient (& self , pressure_coefficient : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_pressure_coefficient ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , pressure_coefficient as _) ; } } # [doc = "If `true`, the [`SoftBody`][SoftBody] will respond to [`RayCast`][RayCast]s."] # [doc = ""] # [inline] pub fn set_ray_pickable (& self , ray_pickable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_ray_pickable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , ray_pickable as _) ; } } # [doc = "Increasing this value will improve the resulting simulation, but can affect performance. Use with care."] # [doc = ""] # [inline] pub fn set_simulation_precision (& self , simulation_precision : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_simulation_precision ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , simulation_precision as _) ; } } # [doc = "The SoftBody's mass."] # [doc = ""] # [inline] pub fn set_total_mass (& self , mass : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_total_mass ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , mass as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_volume_stiffness (& self , volume_stiffness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SoftBodyMethodTable :: get (get_api ()) . set_volume_stiffness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , volume_stiffness as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SoftBody { } unsafe impl GodotObject for SoftBody { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SoftBody" } } impl QueueFree for SoftBody { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for SoftBody { type Target = crate :: generated :: MeshInstance ; # [inline] fn deref (& self) -> & crate :: generated :: MeshInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SoftBody { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: MeshInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: MeshInstance > for SoftBody { } unsafe impl SubClass < crate :: generated :: GeometryInstance > for SoftBody { } unsafe impl SubClass < crate :: generated :: VisualInstance > for SoftBody { } unsafe impl SubClass < crate :: generated :: CullInstance > for SoftBody { } unsafe impl SubClass < crate :: generated :: Spatial > for SoftBody { } unsafe impl SubClass < crate :: generated :: Node > for SoftBody { } unsafe impl SubClass < crate :: generated :: Object > for SoftBody { } impl Instanciable for SoftBody { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { SoftBody :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SoftBodyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_collision_exception_with : * mut sys :: godot_method_bind , pub get_areaAngular_stiffness : * mut sys :: godot_method_bind , pub get_collision_exceptions : * mut sys :: godot_method_bind , pub get_collision_layer : * mut sys :: godot_method_bind , pub get_collision_layer_bit : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_damping_coefficient : * mut sys :: godot_method_bind , pub get_drag_coefficient : * mut sys :: godot_method_bind , pub get_linear_stiffness : * mut sys :: godot_method_bind , pub get_parent_collision_ignore : * mut sys :: godot_method_bind , pub get_point_transform : * mut sys :: godot_method_bind , pub get_pose_matching_coefficient : * mut sys :: godot_method_bind , pub get_pressure_coefficient : * mut sys :: godot_method_bind , pub get_simulation_precision : * mut sys :: godot_method_bind , pub get_total_mass : * mut sys :: godot_method_bind , pub get_volume_stiffness : * mut sys :: godot_method_bind , pub is_physics_enabled : * mut sys :: godot_method_bind , pub is_point_pinned : * mut sys :: godot_method_bind , pub is_ray_pickable : * mut sys :: godot_method_bind , pub remove_collision_exception_with : * mut sys :: godot_method_bind , pub set_areaAngular_stiffness : * mut sys :: godot_method_bind , pub set_collision_layer : * mut sys :: godot_method_bind , pub set_collision_layer_bit : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_damping_coefficient : * mut sys :: godot_method_bind , pub set_drag_coefficient : * mut sys :: godot_method_bind , pub set_linear_stiffness : * mut sys :: godot_method_bind , pub set_parent_collision_ignore : * mut sys :: godot_method_bind , pub set_physics_enabled : * mut sys :: godot_method_bind , pub set_point_pinned : * mut sys :: godot_method_bind , pub set_pose_matching_coefficient : * mut sys :: godot_method_bind , pub set_pressure_coefficient : * mut sys :: godot_method_bind , pub set_ray_pickable : * mut sys :: godot_method_bind , pub set_simulation_precision : * mut sys :: godot_method_bind , pub set_total_mass : * mut sys :: godot_method_bind , pub set_volume_stiffness : * mut sys :: godot_method_bind } impl SoftBodyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SoftBodyMethodTable = SoftBodyMethodTable { class_constructor : None , add_collision_exception_with : 0 as * mut sys :: godot_method_bind , get_areaAngular_stiffness : 0 as * mut sys :: godot_method_bind , get_collision_exceptions : 0 as * mut sys :: godot_method_bind , get_collision_layer : 0 as * mut sys :: godot_method_bind , get_collision_layer_bit : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_damping_coefficient : 0 as * mut sys :: godot_method_bind , get_drag_coefficient : 0 as * mut sys :: godot_method_bind , get_linear_stiffness : 0 as * mut sys :: godot_method_bind , get_parent_collision_ignore : 0 as * mut sys :: godot_method_bind , get_point_transform : 0 as * mut sys :: godot_method_bind , get_pose_matching_coefficient : 0 as * mut sys :: godot_method_bind , get_pressure_coefficient : 0 as * mut sys :: godot_method_bind , get_simulation_precision : 0 as * mut sys :: godot_method_bind , get_total_mass : 0 as * mut sys :: godot_method_bind , get_volume_stiffness : 0 as * mut sys :: godot_method_bind , is_physics_enabled : 0 as * mut sys :: godot_method_bind , is_point_pinned : 0 as * mut sys :: godot_method_bind , is_ray_pickable : 0 as * mut sys :: godot_method_bind , remove_collision_exception_with : 0 as * mut sys :: godot_method_bind , set_areaAngular_stiffness : 0 as * mut sys :: godot_method_bind , set_collision_layer : 0 as * mut sys :: godot_method_bind , set_collision_layer_bit : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_damping_coefficient : 0 as * mut sys :: godot_method_bind , set_drag_coefficient : 0 as * mut sys :: godot_method_bind , set_linear_stiffness : 0 as * mut sys :: godot_method_bind , set_parent_collision_ignore : 0 as * mut sys :: godot_method_bind , set_physics_enabled : 0 as * mut sys :: godot_method_bind , set_point_pinned : 0 as * mut sys :: godot_method_bind , set_pose_matching_coefficient : 0 as * mut sys :: godot_method_bind , set_pressure_coefficient : 0 as * mut sys :: godot_method_bind , set_ray_pickable : 0 as * mut sys :: godot_method_bind , set_simulation_precision : 0 as * mut sys :: godot_method_bind , set_total_mass : 0 as * mut sys :: godot_method_bind , set_volume_stiffness : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SoftBodyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SoftBody\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_collision_exception_with = (gd_api . godot_method_bind_get_method) (class_name , "add_collision_exception_with\0" . as_ptr () as * const c_char) ; table . get_areaAngular_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "get_areaAngular_stiffness\0" . as_ptr () as * const c_char) ; table . get_collision_exceptions = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_exceptions\0" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\0" . as_ptr () as * const c_char) ; table . get_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_damping_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "get_damping_coefficient\0" . as_ptr () as * const c_char) ; table . get_drag_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "get_drag_coefficient\0" . as_ptr () as * const c_char) ; table . get_linear_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "get_linear_stiffness\0" . as_ptr () as * const c_char) ; table . get_parent_collision_ignore = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_collision_ignore\0" . as_ptr () as * const c_char) ; table . get_point_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_point_transform\0" . as_ptr () as * const c_char) ; table . get_pose_matching_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "get_pose_matching_coefficient\0" . as_ptr () as * const c_char) ; table . get_pressure_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "get_pressure_coefficient\0" . as_ptr () as * const c_char) ; table . get_simulation_precision = (gd_api . godot_method_bind_get_method) (class_name , "get_simulation_precision\0" . as_ptr () as * const c_char) ; table . get_total_mass = (gd_api . godot_method_bind_get_method) (class_name , "get_total_mass\0" . as_ptr () as * const c_char) ; table . get_volume_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "get_volume_stiffness\0" . as_ptr () as * const c_char) ; table . is_physics_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_physics_enabled\0" . as_ptr () as * const c_char) ; table . is_point_pinned = (gd_api . godot_method_bind_get_method) (class_name , "is_point_pinned\0" . as_ptr () as * const c_char) ; table . is_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "is_ray_pickable\0" . as_ptr () as * const c_char) ; table . remove_collision_exception_with = (gd_api . godot_method_bind_get_method) (class_name , "remove_collision_exception_with\0" . as_ptr () as * const c_char) ; table . set_areaAngular_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "set_areaAngular_stiffness\0" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\0" . as_ptr () as * const c_char) ; table . set_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_damping_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "set_damping_coefficient\0" . as_ptr () as * const c_char) ; table . set_drag_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_coefficient\0" . as_ptr () as * const c_char) ; table . set_linear_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "set_linear_stiffness\0" . as_ptr () as * const c_char) ; table . set_parent_collision_ignore = (gd_api . godot_method_bind_get_method) (class_name , "set_parent_collision_ignore\0" . as_ptr () as * const c_char) ; table . set_physics_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_enabled\0" . as_ptr () as * const c_char) ; table . set_point_pinned = (gd_api . godot_method_bind_get_method) (class_name , "set_point_pinned\0" . as_ptr () as * const c_char) ; table . set_pose_matching_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "set_pose_matching_coefficient\0" . as_ptr () as * const c_char) ; table . set_pressure_coefficient = (gd_api . godot_method_bind_get_method) (class_name , "set_pressure_coefficient\0" . as_ptr () as * const c_char) ; table . set_ray_pickable = (gd_api . godot_method_bind_get_method) (class_name , "set_ray_pickable\0" . as_ptr () as * const c_char) ; table . set_simulation_precision = (gd_api . godot_method_bind_get_method) (class_name , "set_simulation_precision\0" . as_ptr () as * const c_char) ; table . set_total_mass = (gd_api . godot_method_bind_get_method) (class_name , "set_total_mass\0" . as_ptr () as * const c_char) ; table . set_volume_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_stiffness\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::soft_body::private::SoftBody;
            
            pub(crate) mod spatial {
                # ! [doc = "This module contains types related to the API class [`Spatial`][super::Spatial]."] pub (crate) mod private { # [doc = "`core class Spatial` inherits `Node` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_spatial.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Spatial` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Spatial>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSpatial inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Spatial { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Spatial ; # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Spatial { pub const NOTIFICATION_ENTER_WORLD : i64 = 41i64 ; pub const NOTIFICATION_EXIT_WORLD : i64 = 42i64 ; pub const NOTIFICATION_VISIBILITY_CHANGED : i64 = 43i64 ; pub const NOTIFICATION_ENTER_GAMEPLAY : i64 = 45i64 ; pub const NOTIFICATION_EXIT_GAMEPLAY : i64 = 46i64 ; pub const NOTIFICATION_TRANSFORM_CHANGED : i64 = 2000i64 ; } impl Spatial { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SpatialMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations."] # [doc = ""] # [inline] pub fn force_update_transform (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . force_update_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The [`SpatialGizmo`][SpatialGizmo] for this node. Used for example in [`EditorSpatialGizmo`][EditorSpatialGizmo] as custom visualization and editing handles in Editor."] # [doc = ""] # [inline] pub fn gizmo (& self) -> Option < Ref < crate :: generated :: SpatialGizmo , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_gizmo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: SpatialGizmo , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Rotation part of the global transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).\n**Note:** In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [`Vector3`][Vector3] data structure not because the rotation is a vector, but only because [`Vector3`][Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation \"vector\" is not meaningful."] # [doc = ""] # [inline] pub fn global_rotation (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_global_rotation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "World space (global) [`Transform`][Transform] of this node."] # [doc = ""] # [inline] pub fn global_transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_global_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "When using physics interpolation, there will be circumstances in which you want to know the interpolated (displayed) transform of a node rather than the standard transform (which may only be accurate to the most recent physics tick).\nThis is particularly important for frame-based operations that take place in [`Node._process`][Node::_process], rather than [`Node._physics_process`][Node::_physics_process]. Examples include [`Camera`][Camera]s focusing on a node, or finding where to fire lasers from on a frame rather than physics tick."] # [doc = ""] # [inline] pub fn get_global_transform_interpolated (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_global_transform_interpolated ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Global position of this node. This is equivalent to `global_transform.origin`."] # [doc = ""] # [inline] pub fn global_translation (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_global_translation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the parent [`Spatial`][Spatial], or an empty [`Object`][Object] if no parent exists or parent is not of type [`Spatial`][Spatial]."] # [doc = ""] # [inline] pub fn get_parent_spatial (& self) -> Option < Ref < crate :: generated :: Spatial , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_parent_spatial ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Spatial , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).\n**Note:** In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [`Vector3`][Vector3] data structure not because the rotation is a vector, but only because [`Vector3`][Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation \"vector\" is not meaningful."] # [doc = ""] # [inline] pub fn rotation (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_rotation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Rotation part of the local transformation in degrees, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle)."] # [doc = ""] # [inline] pub fn rotation_degrees (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_rotation_degrees ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Scale part of the local transformation.\n**Note:** Mixed negative scales in 3D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, the scale values will either be all positive or all negative."] # [doc = ""] # [inline] pub fn scale (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Local space [`Transform`][Transform] of this node, with respect to the parent node."] # [doc = ""] # [inline] pub fn transform (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Local translation of this node."] # [doc = ""] # [inline] pub fn translation (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_translation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current [`World`][World] resource this [`Spatial`][Spatial] node is registered to."] # [doc = ""] # [inline] pub fn get_world (& self) -> Option < Ref < crate :: generated :: World , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . get_world ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: World , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Rotates the global (world) transformation around axis, a unit [`Vector3`][Vector3], by specified angle in radians. The rotation axis is in global coordinate system."] # [doc = ""] # [inline] pub fn global_rotate (& self , axis : Vector3 , angle : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . global_rotate ; let ret = crate :: icalls :: icallvar__vec3_f64 (method_bind , self . this . sys () . as_ptr () , axis , angle as _) ; } } # [doc = "Scales the global (world) transformation by the given [`Vector3`][Vector3] scale factors."] # [doc = ""] # [inline] pub fn global_scale (& self , scale : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . global_scale ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Moves the global (world) transformation by [`Vector3`][Vector3] offset. The offset is in global coordinate system."] # [doc = ""] # [inline] pub fn global_translate (& self , offset : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . global_translate ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Disables rendering of this node. Changes [`visible`][Self::visible] to `false`."] # [doc = ""] # [inline] pub fn hide (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . hide ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns whether node notifies about its local transformation changes. [`Spatial`][Spatial] will not propagate this by default."] # [doc = ""] # [inline] pub fn is_local_transform_notification_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . is_local_transform_notification_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether this node uses a scale of `(1, 1, 1)` or its local transformation scale."] # [doc = ""] # [inline] pub fn is_scale_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . is_scale_disabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether this node is set as Toplevel, that is whether it ignores its parent nodes transformations."] # [doc = ""] # [inline] pub fn is_set_as_toplevel (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . is_set_as_toplevel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether the node notifies about its global and local transformation changes. [`Spatial`][Spatial] will not propagate this by default."] # [doc = ""] # [inline] pub fn is_transform_notification_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . is_transform_notification_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [`is_visible_in_tree`][Self::is_visible_in_tree] must return `true`)."] # [doc = ""] # [inline] pub fn is_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . is_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the node is present in the [`SceneTree`][SceneTree], its [`visible`][Self::visible] property is `true` and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree."] # [doc = ""] # [inline] pub fn is_visible_in_tree (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . is_visible_in_tree ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Rotates the node so that the local forward axis (-Z) points toward the `target` position.\nThe local up axis (+Y) points as close to the `up` vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly.\nThe `target` position cannot be the same as the node's position, the `up` vector cannot be zero, and the direction from the node's position to the `target` vector cannot be parallel to the `up` vector.\nOperations take place in global space."] # [doc = ""] # [inline] pub fn look_at (& self , target : Vector3 , up : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . look_at ; let ret = crate :: icalls :: icallvar__vec3_vec3 (method_bind , self . this . sys () . as_ptr () , target , up) ; } } # [doc = "Moves the node to the specified `position`, and then rotates itself to point toward the `target` as per [`look_at`][Self::look_at]. Operations take place in global space."] # [doc = ""] # [inline] pub fn look_at_from_position (& self , position : Vector3 , target : Vector3 , up : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . look_at_from_position ; let ret = crate :: icalls :: icallvar__vec3_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , position , target , up) ; } } # [doc = "Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [`Transform`][Transform]."] # [doc = ""] # [inline] pub fn orthonormalize (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . orthonormalize ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Rotates the local transformation around axis, a unit [`Vector3`][Vector3], by specified angle in radians."] # [doc = ""] # [inline] pub fn rotate (& self , axis : Vector3 , angle : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . rotate ; let ret = crate :: icalls :: icallvar__vec3_f64 (method_bind , self . this . sys () . as_ptr () , axis , angle as _) ; } } # [doc = "Rotates the local transformation around axis, a unit [`Vector3`][Vector3], by specified angle in radians. The rotation axis is in object-local coordinate system."] # [doc = ""] # [inline] pub fn rotate_object_local (& self , axis : Vector3 , angle : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . rotate_object_local ; let ret = crate :: icalls :: icallvar__vec3_f64 (method_bind , self . this . sys () . as_ptr () , axis , angle as _) ; } } # [doc = "Rotates the local transformation around the X axis by angle in radians."] # [doc = ""] # [inline] pub fn rotate_x (& self , angle : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . rotate_x ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , angle as _) ; } } # [doc = "Rotates the local transformation around the Y axis by angle in radians."] # [doc = ""] # [inline] pub fn rotate_y (& self , angle : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . rotate_y ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , angle as _) ; } } # [doc = "Rotates the local transformation around the Z axis by angle in radians."] # [doc = ""] # [inline] pub fn rotate_z (& self , angle : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . rotate_z ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , angle as _) ; } } # [doc = "Scales the local transformation by given 3D scale factors in object-local coordinate system."] # [doc = ""] # [inline] pub fn scale_object_local (& self , scale : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . scale_object_local ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Makes the node ignore its parents transformations. Node transformations are only in global space."] # [doc = ""] # [inline] pub fn set_as_toplevel (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_as_toplevel ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Sets whether the node uses a scale of `(1, 1, 1)` or its local transformation scale. Changes to the local transformation scale are preserved."] # [doc = ""] # [inline] pub fn set_disable_scale (& self , disable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_disable_scale ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , disable as _) ; } } # [doc = "The [`SpatialGizmo`][SpatialGizmo] for this node. Used for example in [`EditorSpatialGizmo`][EditorSpatialGizmo] as custom visualization and editing handles in Editor."] # [doc = ""] # [inline] pub fn set_gizmo (& self , gizmo : impl AsArg < crate :: generated :: SpatialGizmo >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_gizmo ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , gizmo . as_arg_ptr ()) ; } } # [doc = "Rotation part of the global transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).\n**Note:** In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [`Vector3`][Vector3] data structure not because the rotation is a vector, but only because [`Vector3`][Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation \"vector\" is not meaningful."] # [doc = ""] # [inline] pub fn set_global_rotation (& self , radians : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_global_rotation ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , radians) ; } } # [doc = "World space (global) [`Transform`][Transform] of this node."] # [doc = ""] # [inline] pub fn set_global_transform (& self , global : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_global_transform ; let ret = crate :: icalls :: icallvar__trans (method_bind , self . this . sys () . as_ptr () , global) ; } } # [doc = "Global position of this node. This is equivalent to `global_transform.origin`."] # [doc = ""] # [inline] pub fn set_global_translation (& self , translation : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_global_translation ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , translation) ; } } # [doc = "Reset all transformations for this node (sets its [`Transform`][Transform] to the identity matrix)."] # [doc = ""] # [inline] pub fn set_identity (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_identity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets whether the node ignores notification that its transformation (global or local) changed."] # [doc = ""] # [inline] pub fn set_ignore_transform_notification (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_ignore_transform_notification ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Sets whether the node notifies about its local transformation changes. [`Spatial`][Spatial] will not propagate this by default."] # [doc = ""] # [inline] pub fn set_notify_local_transform (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_notify_local_transform ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Sets whether the node notifies about its global and local transformation changes. [`Spatial`][Spatial] will not propagate this by default, unless it is in the editor context and it has a valid gizmo."] # [doc = ""] # [inline] pub fn set_notify_transform (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_notify_transform ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle).\n**Note:** In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [`Vector3`][Vector3] data structure not because the rotation is a vector, but only because [`Vector3`][Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation \"vector\" is not meaningful."] # [doc = ""] # [inline] pub fn set_rotation (& self , euler : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_rotation ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , euler) ; } } # [doc = "Rotation part of the local transformation in degrees, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle)."] # [doc = ""] # [inline] pub fn set_rotation_degrees (& self , euler_degrees : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_rotation_degrees ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , euler_degrees) ; } } # [doc = "Scale part of the local transformation.\n**Note:** Mixed negative scales in 3D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, the scale values will either be all positive or all negative."] # [doc = ""] # [inline] pub fn set_scale (& self , scale : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_scale ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "Local space [`Transform`][Transform] of this node, with respect to the parent node."] # [doc = ""] # [inline] pub fn set_transform (& self , local : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_transform ; let ret = crate :: icalls :: icallvar__trans (method_bind , self . this . sys () . as_ptr () , local) ; } } # [doc = "Local translation of this node."] # [doc = ""] # [inline] pub fn set_translation (& self , translation : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_translation ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , translation) ; } } # [doc = "If `true`, this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [`is_visible_in_tree`][Self::is_visible_in_tree] must return `true`)."] # [doc = ""] # [inline] pub fn set_visible (& self , visible : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . set_visible ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , visible as _) ; } } # [doc = "Enables rendering of this node. Changes [`visible`][Self::visible] to `true`."] # [doc = ""] # [inline] pub fn show (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . show ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Transforms `local_point` from this node's local space to world space."] # [doc = ""] # [inline] pub fn to_global (& self , local_point : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . to_global ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , local_point) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Transforms `global_point` from world space to this node's local space."] # [doc = ""] # [inline] pub fn to_local (& self , global_point : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . to_local ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , global_point) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Changes the node's position by the given offset [`Vector3`][Vector3].\nNote that the translation `offset` is affected by the node's scale, so if scaled by e.g. `(10, 1, 1)`, a translation by an offset of `(2, 0, 0)` would actually add 20 (`2 * 10`) to the X coordinate."] # [doc = ""] # [inline] pub fn translate (& self , offset : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . translate ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Changes the node's position by the given offset [`Vector3`][Vector3] in local space."] # [doc = ""] # [inline] pub fn translate_object_local (& self , offset : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . translate_object_local ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Updates the [`SpatialGizmo`][SpatialGizmo] of this node."] # [doc = ""] # [inline] pub fn update_gizmo (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMethodTable :: get (get_api ()) . update_gizmo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Spatial { } unsafe impl GodotObject for Spatial { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Spatial" } } impl QueueFree for Spatial { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Spatial { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Spatial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for Spatial { } unsafe impl SubClass < crate :: generated :: Object > for Spatial { } impl Instanciable for Spatial { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Spatial :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SpatialMethodTable { pub class_constructor : sys :: godot_class_constructor , pub force_update_transform : * mut sys :: godot_method_bind , pub get_gizmo : * mut sys :: godot_method_bind , pub get_global_rotation : * mut sys :: godot_method_bind , pub get_global_transform : * mut sys :: godot_method_bind , pub get_global_transform_interpolated : * mut sys :: godot_method_bind , pub get_global_translation : * mut sys :: godot_method_bind , pub get_parent_spatial : * mut sys :: godot_method_bind , pub get_rotation : * mut sys :: godot_method_bind , pub get_rotation_degrees : * mut sys :: godot_method_bind , pub get_scale : * mut sys :: godot_method_bind , pub get_transform : * mut sys :: godot_method_bind , pub get_translation : * mut sys :: godot_method_bind , pub get_world : * mut sys :: godot_method_bind , pub global_rotate : * mut sys :: godot_method_bind , pub global_scale : * mut sys :: godot_method_bind , pub global_translate : * mut sys :: godot_method_bind , pub hide : * mut sys :: godot_method_bind , pub is_local_transform_notification_enabled : * mut sys :: godot_method_bind , pub is_scale_disabled : * mut sys :: godot_method_bind , pub is_set_as_toplevel : * mut sys :: godot_method_bind , pub is_transform_notification_enabled : * mut sys :: godot_method_bind , pub is_visible : * mut sys :: godot_method_bind , pub is_visible_in_tree : * mut sys :: godot_method_bind , pub look_at : * mut sys :: godot_method_bind , pub look_at_from_position : * mut sys :: godot_method_bind , pub orthonormalize : * mut sys :: godot_method_bind , pub rotate : * mut sys :: godot_method_bind , pub rotate_object_local : * mut sys :: godot_method_bind , pub rotate_x : * mut sys :: godot_method_bind , pub rotate_y : * mut sys :: godot_method_bind , pub rotate_z : * mut sys :: godot_method_bind , pub scale_object_local : * mut sys :: godot_method_bind , pub set_as_toplevel : * mut sys :: godot_method_bind , pub set_disable_scale : * mut sys :: godot_method_bind , pub set_gizmo : * mut sys :: godot_method_bind , pub set_global_rotation : * mut sys :: godot_method_bind , pub set_global_transform : * mut sys :: godot_method_bind , pub set_global_translation : * mut sys :: godot_method_bind , pub set_identity : * mut sys :: godot_method_bind , pub set_ignore_transform_notification : * mut sys :: godot_method_bind , pub set_notify_local_transform : * mut sys :: godot_method_bind , pub set_notify_transform : * mut sys :: godot_method_bind , pub set_rotation : * mut sys :: godot_method_bind , pub set_rotation_degrees : * mut sys :: godot_method_bind , pub set_scale : * mut sys :: godot_method_bind , pub set_transform : * mut sys :: godot_method_bind , pub set_translation : * mut sys :: godot_method_bind , pub set_visible : * mut sys :: godot_method_bind , pub show : * mut sys :: godot_method_bind , pub to_global : * mut sys :: godot_method_bind , pub to_local : * mut sys :: godot_method_bind , pub translate : * mut sys :: godot_method_bind , pub translate_object_local : * mut sys :: godot_method_bind , pub update_gizmo : * mut sys :: godot_method_bind } impl SpatialMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SpatialMethodTable = SpatialMethodTable { class_constructor : None , force_update_transform : 0 as * mut sys :: godot_method_bind , get_gizmo : 0 as * mut sys :: godot_method_bind , get_global_rotation : 0 as * mut sys :: godot_method_bind , get_global_transform : 0 as * mut sys :: godot_method_bind , get_global_transform_interpolated : 0 as * mut sys :: godot_method_bind , get_global_translation : 0 as * mut sys :: godot_method_bind , get_parent_spatial : 0 as * mut sys :: godot_method_bind , get_rotation : 0 as * mut sys :: godot_method_bind , get_rotation_degrees : 0 as * mut sys :: godot_method_bind , get_scale : 0 as * mut sys :: godot_method_bind , get_transform : 0 as * mut sys :: godot_method_bind , get_translation : 0 as * mut sys :: godot_method_bind , get_world : 0 as * mut sys :: godot_method_bind , global_rotate : 0 as * mut sys :: godot_method_bind , global_scale : 0 as * mut sys :: godot_method_bind , global_translate : 0 as * mut sys :: godot_method_bind , hide : 0 as * mut sys :: godot_method_bind , is_local_transform_notification_enabled : 0 as * mut sys :: godot_method_bind , is_scale_disabled : 0 as * mut sys :: godot_method_bind , is_set_as_toplevel : 0 as * mut sys :: godot_method_bind , is_transform_notification_enabled : 0 as * mut sys :: godot_method_bind , is_visible : 0 as * mut sys :: godot_method_bind , is_visible_in_tree : 0 as * mut sys :: godot_method_bind , look_at : 0 as * mut sys :: godot_method_bind , look_at_from_position : 0 as * mut sys :: godot_method_bind , orthonormalize : 0 as * mut sys :: godot_method_bind , rotate : 0 as * mut sys :: godot_method_bind , rotate_object_local : 0 as * mut sys :: godot_method_bind , rotate_x : 0 as * mut sys :: godot_method_bind , rotate_y : 0 as * mut sys :: godot_method_bind , rotate_z : 0 as * mut sys :: godot_method_bind , scale_object_local : 0 as * mut sys :: godot_method_bind , set_as_toplevel : 0 as * mut sys :: godot_method_bind , set_disable_scale : 0 as * mut sys :: godot_method_bind , set_gizmo : 0 as * mut sys :: godot_method_bind , set_global_rotation : 0 as * mut sys :: godot_method_bind , set_global_transform : 0 as * mut sys :: godot_method_bind , set_global_translation : 0 as * mut sys :: godot_method_bind , set_identity : 0 as * mut sys :: godot_method_bind , set_ignore_transform_notification : 0 as * mut sys :: godot_method_bind , set_notify_local_transform : 0 as * mut sys :: godot_method_bind , set_notify_transform : 0 as * mut sys :: godot_method_bind , set_rotation : 0 as * mut sys :: godot_method_bind , set_rotation_degrees : 0 as * mut sys :: godot_method_bind , set_scale : 0 as * mut sys :: godot_method_bind , set_transform : 0 as * mut sys :: godot_method_bind , set_translation : 0 as * mut sys :: godot_method_bind , set_visible : 0 as * mut sys :: godot_method_bind , show : 0 as * mut sys :: godot_method_bind , to_global : 0 as * mut sys :: godot_method_bind , to_local : 0 as * mut sys :: godot_method_bind , translate : 0 as * mut sys :: godot_method_bind , translate_object_local : 0 as * mut sys :: godot_method_bind , update_gizmo : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SpatialMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Spatial\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . force_update_transform = (gd_api . godot_method_bind_get_method) (class_name , "force_update_transform\0" . as_ptr () as * const c_char) ; table . get_gizmo = (gd_api . godot_method_bind_get_method) (class_name , "get_gizmo\0" . as_ptr () as * const c_char) ; table . get_global_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_global_rotation\0" . as_ptr () as * const c_char) ; table . get_global_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_global_transform\0" . as_ptr () as * const c_char) ; table . get_global_transform_interpolated = (gd_api . godot_method_bind_get_method) (class_name , "get_global_transform_interpolated\0" . as_ptr () as * const c_char) ; table . get_global_translation = (gd_api . godot_method_bind_get_method) (class_name , "get_global_translation\0" . as_ptr () as * const c_char) ; table . get_parent_spatial = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_spatial\0" . as_ptr () as * const c_char) ; table . get_rotation = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation\0" . as_ptr () as * const c_char) ; table . get_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_rotation_degrees\0" . as_ptr () as * const c_char) ; table . get_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_scale\0" . as_ptr () as * const c_char) ; table . get_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_transform\0" . as_ptr () as * const c_char) ; table . get_translation = (gd_api . godot_method_bind_get_method) (class_name , "get_translation\0" . as_ptr () as * const c_char) ; table . get_world = (gd_api . godot_method_bind_get_method) (class_name , "get_world\0" . as_ptr () as * const c_char) ; table . global_rotate = (gd_api . godot_method_bind_get_method) (class_name , "global_rotate\0" . as_ptr () as * const c_char) ; table . global_scale = (gd_api . godot_method_bind_get_method) (class_name , "global_scale\0" . as_ptr () as * const c_char) ; table . global_translate = (gd_api . godot_method_bind_get_method) (class_name , "global_translate\0" . as_ptr () as * const c_char) ; table . hide = (gd_api . godot_method_bind_get_method) (class_name , "hide\0" . as_ptr () as * const c_char) ; table . is_local_transform_notification_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_local_transform_notification_enabled\0" . as_ptr () as * const c_char) ; table . is_scale_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_scale_disabled\0" . as_ptr () as * const c_char) ; table . is_set_as_toplevel = (gd_api . godot_method_bind_get_method) (class_name , "is_set_as_toplevel\0" . as_ptr () as * const c_char) ; table . is_transform_notification_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_transform_notification_enabled\0" . as_ptr () as * const c_char) ; table . is_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_visible\0" . as_ptr () as * const c_char) ; table . is_visible_in_tree = (gd_api . godot_method_bind_get_method) (class_name , "is_visible_in_tree\0" . as_ptr () as * const c_char) ; table . look_at = (gd_api . godot_method_bind_get_method) (class_name , "look_at\0" . as_ptr () as * const c_char) ; table . look_at_from_position = (gd_api . godot_method_bind_get_method) (class_name , "look_at_from_position\0" . as_ptr () as * const c_char) ; table . orthonormalize = (gd_api . godot_method_bind_get_method) (class_name , "orthonormalize\0" . as_ptr () as * const c_char) ; table . rotate = (gd_api . godot_method_bind_get_method) (class_name , "rotate\0" . as_ptr () as * const c_char) ; table . rotate_object_local = (gd_api . godot_method_bind_get_method) (class_name , "rotate_object_local\0" . as_ptr () as * const c_char) ; table . rotate_x = (gd_api . godot_method_bind_get_method) (class_name , "rotate_x\0" . as_ptr () as * const c_char) ; table . rotate_y = (gd_api . godot_method_bind_get_method) (class_name , "rotate_y\0" . as_ptr () as * const c_char) ; table . rotate_z = (gd_api . godot_method_bind_get_method) (class_name , "rotate_z\0" . as_ptr () as * const c_char) ; table . scale_object_local = (gd_api . godot_method_bind_get_method) (class_name , "scale_object_local\0" . as_ptr () as * const c_char) ; table . set_as_toplevel = (gd_api . godot_method_bind_get_method) (class_name , "set_as_toplevel\0" . as_ptr () as * const c_char) ; table . set_disable_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_scale\0" . as_ptr () as * const c_char) ; table . set_gizmo = (gd_api . godot_method_bind_get_method) (class_name , "set_gizmo\0" . as_ptr () as * const c_char) ; table . set_global_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_global_rotation\0" . as_ptr () as * const c_char) ; table . set_global_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_global_transform\0" . as_ptr () as * const c_char) ; table . set_global_translation = (gd_api . godot_method_bind_get_method) (class_name , "set_global_translation\0" . as_ptr () as * const c_char) ; table . set_identity = (gd_api . godot_method_bind_get_method) (class_name , "set_identity\0" . as_ptr () as * const c_char) ; table . set_ignore_transform_notification = (gd_api . godot_method_bind_get_method) (class_name , "set_ignore_transform_notification\0" . as_ptr () as * const c_char) ; table . set_notify_local_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_notify_local_transform\0" . as_ptr () as * const c_char) ; table . set_notify_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_notify_transform\0" . as_ptr () as * const c_char) ; table . set_rotation = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation\0" . as_ptr () as * const c_char) ; table . set_rotation_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_rotation_degrees\0" . as_ptr () as * const c_char) ; table . set_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_scale\0" . as_ptr () as * const c_char) ; table . set_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_transform\0" . as_ptr () as * const c_char) ; table . set_translation = (gd_api . godot_method_bind_get_method) (class_name , "set_translation\0" . as_ptr () as * const c_char) ; table . set_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_visible\0" . as_ptr () as * const c_char) ; table . show = (gd_api . godot_method_bind_get_method) (class_name , "show\0" . as_ptr () as * const c_char) ; table . to_global = (gd_api . godot_method_bind_get_method) (class_name , "to_global\0" . as_ptr () as * const c_char) ; table . to_local = (gd_api . godot_method_bind_get_method) (class_name , "to_local\0" . as_ptr () as * const c_char) ; table . translate = (gd_api . godot_method_bind_get_method) (class_name , "translate\0" . as_ptr () as * const c_char) ; table . translate_object_local = (gd_api . godot_method_bind_get_method) (class_name , "translate_object_local\0" . as_ptr () as * const c_char) ; table . update_gizmo = (gd_api . godot_method_bind_get_method) (class_name , "update_gizmo\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::spatial::private::Spatial;
            
            pub(crate) mod spatial_gizmo {
                # ! [doc = "This module contains types related to the API class [`SpatialGizmo`][super::SpatialGizmo]."] pub (crate) mod private { # [doc = "`core class SpatialGizmo` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_spatialgizmo.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSpatialGizmo inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SpatialGizmo { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SpatialGizmo ; impl SpatialGizmo { } impl gdnative_core :: private :: godot_object :: Sealed for SpatialGizmo { } unsafe impl GodotObject for SpatialGizmo { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SpatialGizmo" } } impl std :: ops :: Deref for SpatialGizmo { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpatialGizmo { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for SpatialGizmo { } unsafe impl SubClass < crate :: generated :: Object > for SpatialGizmo { }
                use super::*;
            }
            pub use crate::generated::spatial_gizmo::private::SpatialGizmo;
            
            pub mod spatial_material {
                # ! [doc = "This module contains types related to the API class [`SpatialMaterial`][super::SpatialMaterial]."] pub (crate) mod private { # [doc = "`core class SpatialMaterial` inherits `Material` (reference-counted).\n\nThis class has related types in the [`spatial_material`][super::spatial_material] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_spatialmaterial.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSpatialMaterial inherits methods from:\n - [Material](struct.Material.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SpatialMaterial { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SpatialMaterial ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AsyncMode (pub i64) ; impl AsyncMode { pub const VISIBLE : AsyncMode = AsyncMode (0i64) ; pub const HIDDEN : AsyncMode = AsyncMode (1i64) ; } impl From < i64 > for AsyncMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AsyncMode > for i64 { # [inline] fn from (v : AsyncMode) -> Self { v . 0 } } impl FromVariant for AsyncMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BillboardMode (pub i64) ; impl BillboardMode { pub const DISABLED : BillboardMode = BillboardMode (0i64) ; pub const ENABLED : BillboardMode = BillboardMode (1i64) ; pub const FIXED_Y : BillboardMode = BillboardMode (2i64) ; pub const PARTICLES : BillboardMode = BillboardMode (3i64) ; } impl From < i64 > for BillboardMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BillboardMode > for i64 { # [inline] fn from (v : BillboardMode) -> Self { v . 0 } } impl FromVariant for BillboardMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BlendMode (pub i64) ; impl BlendMode { pub const MIX : BlendMode = BlendMode (0i64) ; pub const ADD : BlendMode = BlendMode (1i64) ; pub const SUB : BlendMode = BlendMode (2i64) ; pub const MUL : BlendMode = BlendMode (3i64) ; } impl From < i64 > for BlendMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BlendMode > for i64 { # [inline] fn from (v : BlendMode) -> Self { v . 0 } } impl FromVariant for BlendMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CullMode (pub i64) ; impl CullMode { pub const BACK : CullMode = CullMode (0i64) ; pub const FRONT : CullMode = CullMode (1i64) ; pub const DISABLED : CullMode = CullMode (2i64) ; } impl From < i64 > for CullMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CullMode > for i64 { # [inline] fn from (v : CullMode) -> Self { v . 0 } } impl FromVariant for CullMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DepthDrawMode (pub i64) ; impl DepthDrawMode { pub const OPAQUE_ONLY : DepthDrawMode = DepthDrawMode (0i64) ; pub const ALWAYS : DepthDrawMode = DepthDrawMode (1i64) ; pub const DISABLED : DepthDrawMode = DepthDrawMode (2i64) ; pub const ALPHA_OPAQUE_PREPASS : DepthDrawMode = DepthDrawMode (3i64) ; } impl From < i64 > for DepthDrawMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DepthDrawMode > for i64 { # [inline] fn from (v : DepthDrawMode) -> Self { v . 0 } } impl FromVariant for DepthDrawMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DetailUv (pub i64) ; impl DetailUv { pub const _1 : DetailUv = DetailUv (0i64) ; pub const _2 : DetailUv = DetailUv (1i64) ; } impl From < i64 > for DetailUv { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DetailUv > for i64 { # [inline] fn from (v : DetailUv) -> Self { v . 0 } } impl FromVariant for DetailUv { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DiffuseMode (pub i64) ; impl DiffuseMode { pub const BURLEY : DiffuseMode = DiffuseMode (0i64) ; pub const LAMBERT : DiffuseMode = DiffuseMode (1i64) ; pub const LAMBERT_WRAP : DiffuseMode = DiffuseMode (2i64) ; pub const OREN_NAYAR : DiffuseMode = DiffuseMode (3i64) ; pub const TOON : DiffuseMode = DiffuseMode (4i64) ; } impl From < i64 > for DiffuseMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DiffuseMode > for i64 { # [inline] fn from (v : DiffuseMode) -> Self { v . 0 } } impl FromVariant for DiffuseMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DistanceFadeMode (pub i64) ; impl DistanceFadeMode { pub const DISABLED : DistanceFadeMode = DistanceFadeMode (0i64) ; pub const PIXEL_ALPHA : DistanceFadeMode = DistanceFadeMode (1i64) ; pub const PIXEL_DITHER : DistanceFadeMode = DistanceFadeMode (2i64) ; pub const OBJECT_DITHER : DistanceFadeMode = DistanceFadeMode (3i64) ; } impl From < i64 > for DistanceFadeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DistanceFadeMode > for i64 { # [inline] fn from (v : DistanceFadeMode) -> Self { v . 0 } } impl FromVariant for DistanceFadeMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EmissionOperator (pub i64) ; impl EmissionOperator { pub const ADD : EmissionOperator = EmissionOperator (0i64) ; pub const MULTIPLY : EmissionOperator = EmissionOperator (1i64) ; } impl From < i64 > for EmissionOperator { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EmissionOperator > for i64 { # [inline] fn from (v : EmissionOperator) -> Self { v . 0 } } impl FromVariant for EmissionOperator { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Feature (pub i64) ; impl Feature { pub const TRANSPARENT : Feature = Feature (0i64) ; pub const EMISSION : Feature = Feature (1i64) ; pub const NORMAL_MAPPING : Feature = Feature (2i64) ; pub const RIM : Feature = Feature (3i64) ; pub const CLEARCOAT : Feature = Feature (4i64) ; pub const ANISOTROPY : Feature = Feature (5i64) ; pub const AMBIENT_OCCLUSION : Feature = Feature (6i64) ; pub const DEPTH_MAPPING : Feature = Feature (7i64) ; pub const SUBSURACE_SCATTERING : Feature = Feature (8i64) ; pub const TRANSMISSION : Feature = Feature (9i64) ; pub const REFRACTION : Feature = Feature (10i64) ; pub const DETAIL : Feature = Feature (11i64) ; pub const MAX : Feature = Feature (12i64) ; } impl From < i64 > for Feature { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Feature > for i64 { # [inline] fn from (v : Feature) -> Self { v . 0 } } impl FromVariant for Feature { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flags (pub i64) ; impl Flags { pub const UNSHADED : Flags = Flags (0i64) ; pub const USE_VERTEX_LIGHTING : Flags = Flags (1i64) ; pub const DISABLE_DEPTH_TEST : Flags = Flags (2i64) ; pub const ALBEDO_FROM_VERTEX_COLOR : Flags = Flags (3i64) ; pub const SRGB_VERTEX_COLOR : Flags = Flags (4i64) ; pub const USE_POINT_SIZE : Flags = Flags (5i64) ; pub const FIXED_SIZE : Flags = Flags (6i64) ; pub const BILLBOARD_KEEP_SCALE : Flags = Flags (7i64) ; pub const UV1_USE_TRIPLANAR : Flags = Flags (8i64) ; pub const UV2_USE_TRIPLANAR : Flags = Flags (9i64) ; pub const TRIPLANAR_USE_WORLD : Flags = Flags (10i64) ; pub const AO_ON_UV2 : Flags = Flags (11i64) ; pub const EMISSION_ON_UV2 : Flags = Flags (12i64) ; pub const USE_ALPHA_SCISSOR : Flags = Flags (13i64) ; pub const ALBEDO_TEXTURE_FORCE_SRGB : Flags = Flags (14i64) ; pub const DONT_RECEIVE_SHADOWS : Flags = Flags (15i64) ; pub const ENSURE_CORRECT_NORMALS : Flags = Flags (16i64) ; pub const DISABLE_AMBIENT_LIGHT : Flags = Flags (17i64) ; pub const USE_SHADOW_TO_OPACITY : Flags = Flags (18i64) ; pub const ALBEDO_TEXTURE_SDF : Flags = Flags (19i64) ; pub const MAX : Flags = Flags (20i64) ; } impl From < i64 > for Flags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flags > for i64 { # [inline] fn from (v : Flags) -> Self { v . 0 } } impl FromVariant for Flags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SpecularMode (pub i64) ; impl SpecularMode { pub const SCHLICK_GGX : SpecularMode = SpecularMode (0i64) ; pub const BLINN : SpecularMode = SpecularMode (1i64) ; pub const PHONG : SpecularMode = SpecularMode (2i64) ; pub const TOON : SpecularMode = SpecularMode (3i64) ; pub const DISABLED : SpecularMode = SpecularMode (4i64) ; } impl From < i64 > for SpecularMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SpecularMode > for i64 { # [inline] fn from (v : SpecularMode) -> Self { v . 0 } } impl FromVariant for SpecularMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TextureChannel (pub i64) ; impl TextureChannel { pub const RED : TextureChannel = TextureChannel (0i64) ; pub const GREEN : TextureChannel = TextureChannel (1i64) ; pub const BLUE : TextureChannel = TextureChannel (2i64) ; pub const ALPHA : TextureChannel = TextureChannel (3i64) ; pub const GRAYSCALE : TextureChannel = TextureChannel (4i64) ; } impl From < i64 > for TextureChannel { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TextureChannel > for i64 { # [inline] fn from (v : TextureChannel) -> Self { v . 0 } } impl FromVariant for TextureChannel { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TextureParam (pub i64) ; impl TextureParam { pub const ALBEDO : TextureParam = TextureParam (0i64) ; pub const METALLIC : TextureParam = TextureParam (1i64) ; pub const ROUGHNESS : TextureParam = TextureParam (2i64) ; pub const EMISSION : TextureParam = TextureParam (3i64) ; pub const NORMAL : TextureParam = TextureParam (4i64) ; pub const RIM : TextureParam = TextureParam (5i64) ; pub const CLEARCOAT : TextureParam = TextureParam (6i64) ; pub const FLOWMAP : TextureParam = TextureParam (7i64) ; pub const AMBIENT_OCCLUSION : TextureParam = TextureParam (8i64) ; pub const DEPTH : TextureParam = TextureParam (9i64) ; pub const SUBSURFACE_SCATTERING : TextureParam = TextureParam (10i64) ; pub const TRANSMISSION : TextureParam = TextureParam (11i64) ; pub const REFRACTION : TextureParam = TextureParam (12i64) ; pub const DETAIL_MASK : TextureParam = TextureParam (13i64) ; pub const DETAIL_ALBEDO : TextureParam = TextureParam (14i64) ; pub const DETAIL_NORMAL : TextureParam = TextureParam (15i64) ; pub const MAX : TextureParam = TextureParam (16i64) ; } impl From < i64 > for TextureParam { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TextureParam > for i64 { # [inline] fn from (v : TextureParam) -> Self { v . 0 } } impl FromVariant for TextureParam { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SpatialMaterial { pub const ASYNC_MODE_VISIBLE : i64 = 0i64 ; pub const BILLBOARD_DISABLED : i64 = 0i64 ; pub const BLEND_MODE_MIX : i64 = 0i64 ; pub const CULL_BACK : i64 = 0i64 ; pub const DEPTH_DRAW_OPAQUE_ONLY : i64 = 0i64 ; pub const DETAIL_UV_1 : i64 = 0i64 ; pub const DIFFUSE_BURLEY : i64 = 0i64 ; pub const DISTANCE_FADE_DISABLED : i64 = 0i64 ; pub const EMISSION_OP_ADD : i64 = 0i64 ; pub const FEATURE_TRANSPARENT : i64 = 0i64 ; pub const FLAG_UNSHADED : i64 = 0i64 ; pub const SPECULAR_SCHLICK_GGX : i64 = 0i64 ; pub const TEXTURE_ALBEDO : i64 = 0i64 ; pub const TEXTURE_CHANNEL_RED : i64 = 0i64 ; pub const ASYNC_MODE_HIDDEN : i64 = 1i64 ; pub const BILLBOARD_ENABLED : i64 = 1i64 ; pub const BLEND_MODE_ADD : i64 = 1i64 ; pub const CULL_FRONT : i64 = 1i64 ; pub const DEPTH_DRAW_ALWAYS : i64 = 1i64 ; pub const DETAIL_UV_2 : i64 = 1i64 ; pub const DIFFUSE_LAMBERT : i64 = 1i64 ; pub const DISTANCE_FADE_PIXEL_ALPHA : i64 = 1i64 ; pub const EMISSION_OP_MULTIPLY : i64 = 1i64 ; pub const FEATURE_EMISSION : i64 = 1i64 ; pub const FLAG_USE_VERTEX_LIGHTING : i64 = 1i64 ; pub const SPECULAR_BLINN : i64 = 1i64 ; pub const TEXTURE_CHANNEL_GREEN : i64 = 1i64 ; pub const TEXTURE_METALLIC : i64 = 1i64 ; pub const BILLBOARD_FIXED_Y : i64 = 2i64 ; pub const BLEND_MODE_SUB : i64 = 2i64 ; pub const CULL_DISABLED : i64 = 2i64 ; pub const DEPTH_DRAW_DISABLED : i64 = 2i64 ; pub const DIFFUSE_LAMBERT_WRAP : i64 = 2i64 ; pub const DISTANCE_FADE_PIXEL_DITHER : i64 = 2i64 ; pub const FEATURE_NORMAL_MAPPING : i64 = 2i64 ; pub const FLAG_DISABLE_DEPTH_TEST : i64 = 2i64 ; pub const SPECULAR_PHONG : i64 = 2i64 ; pub const TEXTURE_CHANNEL_BLUE : i64 = 2i64 ; pub const TEXTURE_ROUGHNESS : i64 = 2i64 ; pub const BILLBOARD_PARTICLES : i64 = 3i64 ; pub const BLEND_MODE_MUL : i64 = 3i64 ; pub const DEPTH_DRAW_ALPHA_OPAQUE_PREPASS : i64 = 3i64 ; pub const DIFFUSE_OREN_NAYAR : i64 = 3i64 ; pub const DISTANCE_FADE_OBJECT_DITHER : i64 = 3i64 ; pub const FEATURE_RIM : i64 = 3i64 ; pub const FLAG_ALBEDO_FROM_VERTEX_COLOR : i64 = 3i64 ; pub const SPECULAR_TOON : i64 = 3i64 ; pub const TEXTURE_CHANNEL_ALPHA : i64 = 3i64 ; pub const TEXTURE_EMISSION : i64 = 3i64 ; pub const DIFFUSE_TOON : i64 = 4i64 ; pub const FEATURE_CLEARCOAT : i64 = 4i64 ; pub const FLAG_SRGB_VERTEX_COLOR : i64 = 4i64 ; pub const SPECULAR_DISABLED : i64 = 4i64 ; pub const TEXTURE_CHANNEL_GRAYSCALE : i64 = 4i64 ; pub const TEXTURE_NORMAL : i64 = 4i64 ; pub const FEATURE_ANISOTROPY : i64 = 5i64 ; pub const FLAG_USE_POINT_SIZE : i64 = 5i64 ; pub const TEXTURE_RIM : i64 = 5i64 ; pub const FEATURE_AMBIENT_OCCLUSION : i64 = 6i64 ; pub const FLAG_FIXED_SIZE : i64 = 6i64 ; pub const TEXTURE_CLEARCOAT : i64 = 6i64 ; pub const FEATURE_DEPTH_MAPPING : i64 = 7i64 ; pub const FLAG_BILLBOARD_KEEP_SCALE : i64 = 7i64 ; pub const TEXTURE_FLOWMAP : i64 = 7i64 ; pub const FEATURE_SUBSURACE_SCATTERING : i64 = 8i64 ; pub const FLAG_UV1_USE_TRIPLANAR : i64 = 8i64 ; pub const TEXTURE_AMBIENT_OCCLUSION : i64 = 8i64 ; pub const FEATURE_TRANSMISSION : i64 = 9i64 ; pub const FLAG_UV2_USE_TRIPLANAR : i64 = 9i64 ; pub const TEXTURE_DEPTH : i64 = 9i64 ; pub const FEATURE_REFRACTION : i64 = 10i64 ; pub const FLAG_TRIPLANAR_USE_WORLD : i64 = 10i64 ; pub const TEXTURE_SUBSURFACE_SCATTERING : i64 = 10i64 ; pub const FEATURE_DETAIL : i64 = 11i64 ; pub const FLAG_AO_ON_UV2 : i64 = 11i64 ; pub const TEXTURE_TRANSMISSION : i64 = 11i64 ; pub const FEATURE_MAX : i64 = 12i64 ; pub const FLAG_EMISSION_ON_UV2 : i64 = 12i64 ; pub const TEXTURE_REFRACTION : i64 = 12i64 ; pub const FLAG_USE_ALPHA_SCISSOR : i64 = 13i64 ; pub const TEXTURE_DETAIL_MASK : i64 = 13i64 ; pub const FLAG_ALBEDO_TEXTURE_FORCE_SRGB : i64 = 14i64 ; pub const TEXTURE_DETAIL_ALBEDO : i64 = 14i64 ; pub const FLAG_DONT_RECEIVE_SHADOWS : i64 = 15i64 ; pub const TEXTURE_DETAIL_NORMAL : i64 = 15i64 ; pub const FLAG_ENSURE_CORRECT_NORMALS : i64 = 16i64 ; pub const TEXTURE_MAX : i64 = 16i64 ; pub const FLAG_DISABLE_AMBIENT_LIGHT : i64 = 17i64 ; pub const FLAG_USE_SHADOW_TO_OPACITY : i64 = 18i64 ; pub const FLAG_ALBEDO_TEXTURE_SDF : i64 = 19i64 ; pub const FLAG_MAX : i64 = 20i64 ; } impl SpatialMaterial { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SpatialMaterialMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The material's base color."] # [doc = ""] # [inline] pub fn albedo (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_albedo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Threshold at which the alpha scissor will discard values."] # [doc = ""] # [inline] pub fn alpha_scissor_threshold (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_alpha_scissor_threshold ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The strength of the anisotropy effect. This is multiplied by [`anisotropy_flowmap`][Self::anisotropy_flowmap]'s alpha channel if a texture is defined there and the texture contains an alpha channel."] # [doc = ""] # [inline] pub fn anisotropy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_anisotropy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Amount that ambient occlusion affects lighting from lights. If `0`, ambient occlusion only affects ambient light. If `1`, ambient occlusion affects lights just as much as it affects ambient light. This can be used to impact the strength of the ambient occlusion effect, but typically looks unrealistic."] # [doc = ""] # [inline] pub fn ao_light_affect (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_ao_light_affect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Specifies the channel of the [`ao_texture`][Self::ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use."] # [doc = ""] # [inline] pub fn ao_texture_channel (& self) -> crate :: generated :: spatial_material :: TextureChannel { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_ao_texture_channel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: TextureChannel > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If [member ProjectSettings.rendering/gles3/shaders/shader_compilation_mode] is `Synchronous` (with or without cache), this determines how this material must behave in regards to asynchronous shader compilation.\n[`ASYNC_MODE_VISIBLE`][Self::ASYNC_MODE_VISIBLE] is the default and the best for most cases."] # [doc = ""] # [inline] pub fn async_mode (& self) -> crate :: generated :: spatial_material :: AsyncMode { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_async_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: AsyncMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Controls how the object faces the camera. See [`BillboardMode`][BillboardMode].\n**Note:** Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See [GitHub issue #41567](https://github.com/godotengine/godot/issues/41567) for details."] # [doc = ""] # [inline] pub fn billboard_mode (& self) -> crate :: generated :: spatial_material :: BillboardMode { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_billboard_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: BillboardMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The material's blend mode.\n**Note:** Values other than `Mix` force the object into the transparent pipeline. See [`BlendMode`][BlendMode]."] # [doc = ""] # [inline] pub fn blend_mode (& self) -> crate :: generated :: spatial_material :: BlendMode { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_blend_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: BlendMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the strength of the clearcoat effect. Setting to `0` looks the same as disabling the clearcoat effect."] # [doc = ""] # [inline] pub fn clearcoat (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_clearcoat ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the roughness of the clearcoat pass. A higher value results in a smoother clearcoat while a lower value results in a rougher clearcoat."] # [doc = ""] # [inline] pub fn clearcoat_gloss (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_clearcoat_gloss ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Which side of the object is not drawn when backfaces are rendered. See [`CullMode`][CullMode]."] # [doc = ""] # [inline] pub fn cull_mode (& self) -> crate :: generated :: spatial_material :: CullMode { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_cull_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: CullMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, direction of the binormal is flipped before using in the depth effect. This may be necessary if you have encoded your binormals in a way that is conflicting with the depth effect."] # [doc = ""] # [inline] pub fn depth_deep_parallax_flip_binormal (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_depth_deep_parallax_flip_binormal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, direction of the tangent is flipped before using in the depth effect. This may be necessary if you have encoded your tangents in a way that is conflicting with the depth effect."] # [doc = ""] # [inline] pub fn depth_deep_parallax_flip_tangent (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_depth_deep_parallax_flip_tangent ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Number of layers to use when using [`depth_deep_parallax`][Self::depth_deep_parallax] and the view direction is perpendicular to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp."] # [doc = ""] # [inline] pub fn depth_deep_parallax_max_layers (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_depth_deep_parallax_max_layers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Number of layers to use when using [`depth_deep_parallax`][Self::depth_deep_parallax] and the view direction is parallel to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp."] # [doc = ""] # [inline] pub fn depth_deep_parallax_min_layers (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_depth_deep_parallax_min_layers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Determines when depth rendering takes place. See [`DepthDrawMode`][DepthDrawMode]. See also [`flags_transparent`][Self::flags_transparent]."] # [doc = ""] # [inline] pub fn depth_draw_mode (& self) -> crate :: generated :: spatial_material :: DepthDrawMode { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_depth_draw_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: DepthDrawMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Scales the depth offset effect. A higher number will create a larger depth."] # [doc = ""] # [inline] pub fn depth_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_depth_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Specifies how the [`detail_albedo`][Self::detail_albedo] should blend with the current `ALBEDO`. See [`BlendMode`][BlendMode] for options."] # [doc = ""] # [inline] pub fn detail_blend_mode (& self) -> crate :: generated :: spatial_material :: BlendMode { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_detail_blend_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: BlendMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Specifies whether to use `UV` or `UV2` for the detail layer. See [`DetailUV`][DetailUV] for options."] # [doc = ""] # [inline] pub fn detail_uv (& self) -> crate :: generated :: spatial_material :: DetailUv { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_detail_uv ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: DetailUv > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The algorithm used for diffuse light scattering. See [`DiffuseMode`][DiffuseMode]."] # [doc = ""] # [inline] pub fn diffuse_mode (& self) -> crate :: generated :: spatial_material :: DiffuseMode { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_diffuse_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: DiffuseMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Specifies which type of fade to use. Can be any of the [`DistanceFadeMode`][DistanceFadeMode]s."] # [doc = ""] # [inline] pub fn distance_fade (& self) -> crate :: generated :: spatial_material :: DistanceFadeMode { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_distance_fade ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: DistanceFadeMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Distance at which the object appears fully opaque.\n**Note:** If `distance_fade_max_distance` is less than `distance_fade_min_distance`, the behavior will be reversed. The object will start to fade away at `distance_fade_max_distance` and will fully disappear once it reaches `distance_fade_min_distance`."] # [doc = ""] # [inline] pub fn distance_fade_max_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_distance_fade_max_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible.\n**Note:** If `distance_fade_min_distance` is greater than `distance_fade_max_distance`, the behavior will be reversed. The object will start to fade away at `distance_fade_max_distance` and will fully disappear once it reaches `distance_fade_min_distance`."] # [doc = ""] # [inline] pub fn distance_fade_min_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_distance_fade_min_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The emitted light's color. See [`emission_enabled`][Self::emission_enabled]."] # [doc = ""] # [inline] pub fn emission (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_emission ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The emitted light's strength. See [`emission_enabled`][Self::emission_enabled]."] # [doc = ""] # [inline] pub fn emission_energy (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_emission_energy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets how [`emission`][Self::emission] interacts with [`emission_texture`][Self::emission_texture]. Can either add or multiply. See [`EmissionOperator`][EmissionOperator] for options."] # [doc = ""] # [inline] pub fn emission_operator (& self) -> crate :: generated :: spatial_material :: EmissionOperator { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_emission_operator ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: EmissionOperator > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true`, if the specified [`Feature`][Feature] is enabled."] # [doc = ""] # [inline] pub fn feature (& self , feature : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_feature ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , feature as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true`, if the specified flag is enabled. See [`Flags`][Flags] enumerator for options."] # [doc = ""] # [inline] pub fn flag (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flag as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Grows object vertices in the direction of their normals."] # [doc = ""] # [inline] pub fn grow (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_grow ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Currently unimplemented in Godot."] # [doc = ""] # [inline] pub fn line_width (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_line_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "A high value makes the material appear more like a metal. Non-metals use their albedo as the diffuse color and add diffuse to the specular reflection. With non-metals, the reflection appears on top of the albedo color. Metals use their albedo as a multiplier to the specular reflection and set the diffuse color to black resulting in a tinted reflection. Materials work better when fully metal or fully non-metal, values between `0` and `1` should only be used for blending between metal and non-metal sections. To alter the amount of reflection use [`roughness`][Self::roughness]."] # [doc = ""] # [inline] pub fn metallic (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_metallic ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Specifies the channel of the [`metallic_texture`][Self::metallic_texture] in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use."] # [doc = ""] # [inline] pub fn metallic_texture_channel (& self) -> crate :: generated :: spatial_material :: TextureChannel { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_metallic_texture_channel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: TextureChannel > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The strength of the normal map's effect."] # [doc = ""] # [inline] pub fn normal_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_normal_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The number of horizontal frames in the particle sprite sheet. Only enabled when using [`BILLBOARD_PARTICLES`][Self::BILLBOARD_PARTICLES]. See [`params_billboard_mode`][Self::params_billboard_mode]."] # [doc = ""] # [inline] pub fn particles_anim_h_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_particles_anim_h_frames ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, particle animations are looped. Only enabled when using [`BILLBOARD_PARTICLES`][Self::BILLBOARD_PARTICLES]. See [`params_billboard_mode`][Self::params_billboard_mode]."] # [doc = ""] # [inline] pub fn particles_anim_loop (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_particles_anim_loop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The number of vertical frames in the particle sprite sheet. Only enabled when using [`BILLBOARD_PARTICLES`][Self::BILLBOARD_PARTICLES]. See [`params_billboard_mode`][Self::params_billboard_mode]."] # [doc = ""] # [inline] pub fn particles_anim_v_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_particles_anim_v_frames ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The point size in pixels. See [`flags_use_point_size`][Self::flags_use_point_size]."] # [doc = ""] # [inline] pub fn point_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_point_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade."] # [doc = ""] # [inline] pub fn proximity_fade_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_proximity_fade_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The strength of the refraction effect. Higher values result in a more distorted appearance for the refraction."] # [doc = ""] # [inline] pub fn refraction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_refraction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Specifies the channel of the [`refraction_texture`][Self::refraction_texture] in which the refraction information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use."] # [doc = ""] # [inline] pub fn refraction_texture_channel (& self) -> crate :: generated :: spatial_material :: TextureChannel { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_refraction_texture_channel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: TextureChannel > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the strength of the rim lighting effect."] # [doc = ""] # [inline] pub fn rim (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_rim ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The amount of to blend light and albedo color when rendering rim effect. If `0` the light color is used, while `1` means albedo color is used. An intermediate value generally works best."] # [doc = ""] # [inline] pub fn rim_tint (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_rim_tint ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Surface reflection. A value of `0` represents a perfect mirror while a value of `1` completely blurs the reflection. See also [`metallic`][Self::metallic]."] # [doc = ""] # [inline] pub fn roughness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_roughness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Specifies the channel of the [`ao_texture`][Self::ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use."] # [doc = ""] # [inline] pub fn roughness_texture_channel (& self) -> crate :: generated :: spatial_material :: TextureChannel { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_roughness_texture_channel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: TextureChannel > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources.\n**Note:** Unlike [`metallic`][Self::metallic], this is not energy-conserving, so it should be left at `0.5` in most cases. See also [`roughness`][Self::roughness]."] # [doc = ""] # [inline] pub fn specular (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_specular ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The method for rendering the specular blob. See [`SpecularMode`][SpecularMode]."] # [doc = ""] # [inline] pub fn specular_mode (& self) -> crate :: generated :: spatial_material :: SpecularMode { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_specular_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: SpecularMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The strength of the subsurface scattering effect."] # [doc = ""] # [inline] pub fn subsurface_scattering_strength (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_subsurface_scattering_strength ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`Texture`][Texture] associated with the specified [`TextureParam`][TextureParam]."] # [doc = ""] # [inline] pub fn texture (& self , param : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , param as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The color used by the transmission effect. Represents the light passing through an object."] # [doc = ""] # [inline] pub fn transmission (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_transmission ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "How much to offset the `UV` coordinates. This amount will be added to `UV` in the vertex function. This can be used to offset a texture."] # [doc = ""] # [inline] pub fn uv1_offset (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_uv1_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "How much to scale the `UV` coordinates. This is multiplied by `UV` in the vertex function."] # [doc = ""] # [inline] pub fn uv1_scale (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_uv1_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A lower number blends the texture more softly while a higher number blends the texture more sharply."] # [doc = ""] # [inline] pub fn uv1_triplanar_blend_sharpness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_uv1_triplanar_blend_sharpness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "How much to offset the `UV2` coordinates. This amount will be added to `UV2` in the vertex function. This can be used to offset a texture."] # [doc = ""] # [inline] pub fn uv2_offset (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_uv2_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "How much to scale the `UV2` coordinates. This is multiplied by `UV2` in the vertex function."] # [doc = ""] # [inline] pub fn uv2_scale (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_uv2_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A lower number blends the texture more softly while a higher number blends the texture more sharply."] # [doc = ""] # [inline] pub fn uv2_triplanar_blend_sharpness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_uv2_triplanar_blend_sharpness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the shader will read depth texture at multiple points along the view ray to determine occlusion and parrallax. This can be very performance demanding, but results in more realistic looking depth mapping."] # [doc = ""] # [inline] pub fn is_depth_deep_parallax_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . is_depth_deep_parallax_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, enables the vertex grow setting. See [`params_grow_amount`][Self::params_grow_amount]."] # [doc = ""] # [inline] pub fn is_grow_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . is_grow_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object."] # [doc = ""] # [inline] pub fn is_proximity_fade_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . is_proximity_fade_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The material's base color."] # [doc = ""] # [inline] pub fn set_albedo (& self , albedo : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_albedo ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , albedo) ; } } # [doc = "Threshold at which the alpha scissor will discard values."] # [doc = ""] # [inline] pub fn set_alpha_scissor_threshold (& self , threshold : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_alpha_scissor_threshold ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , threshold as _) ; } } # [doc = "The strength of the anisotropy effect. This is multiplied by [`anisotropy_flowmap`][Self::anisotropy_flowmap]'s alpha channel if a texture is defined there and the texture contains an alpha channel."] # [doc = ""] # [inline] pub fn set_anisotropy (& self , anisotropy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_anisotropy ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , anisotropy as _) ; } } # [doc = "Amount that ambient occlusion affects lighting from lights. If `0`, ambient occlusion only affects ambient light. If `1`, ambient occlusion affects lights just as much as it affects ambient light. This can be used to impact the strength of the ambient occlusion effect, but typically looks unrealistic."] # [doc = ""] # [inline] pub fn set_ao_light_affect (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_ao_light_affect ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "Specifies the channel of the [`ao_texture`][Self::ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use."] # [doc = ""] # [inline] pub fn set_ao_texture_channel (& self , channel : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_ao_texture_channel ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , channel as _) ; } } # [doc = "If [member ProjectSettings.rendering/gles3/shaders/shader_compilation_mode] is `Synchronous` (with or without cache), this determines how this material must behave in regards to asynchronous shader compilation.\n[`ASYNC_MODE_VISIBLE`][Self::ASYNC_MODE_VISIBLE] is the default and the best for most cases."] # [doc = ""] # [inline] pub fn set_async_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_async_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Controls how the object faces the camera. See [`BillboardMode`][BillboardMode].\n**Note:** Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See [GitHub issue #41567](https://github.com/godotengine/godot/issues/41567) for details."] # [doc = ""] # [inline] pub fn set_billboard_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_billboard_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The material's blend mode.\n**Note:** Values other than `Mix` force the object into the transparent pipeline. See [`BlendMode`][BlendMode]."] # [doc = ""] # [inline] pub fn set_blend_mode (& self , blend_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_blend_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , blend_mode as _) ; } } # [doc = "Sets the strength of the clearcoat effect. Setting to `0` looks the same as disabling the clearcoat effect."] # [doc = ""] # [inline] pub fn set_clearcoat (& self , clearcoat : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_clearcoat ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , clearcoat as _) ; } } # [doc = "Sets the roughness of the clearcoat pass. A higher value results in a smoother clearcoat while a lower value results in a rougher clearcoat."] # [doc = ""] # [inline] pub fn set_clearcoat_gloss (& self , clearcoat_gloss : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_clearcoat_gloss ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , clearcoat_gloss as _) ; } } # [doc = "Which side of the object is not drawn when backfaces are rendered. See [`CullMode`][CullMode]."] # [doc = ""] # [inline] pub fn set_cull_mode (& self , cull_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_cull_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , cull_mode as _) ; } } # [doc = "If `true`, the shader will read depth texture at multiple points along the view ray to determine occlusion and parrallax. This can be very performance demanding, but results in more realistic looking depth mapping."] # [doc = ""] # [inline] pub fn set_depth_deep_parallax (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_depth_deep_parallax ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, direction of the binormal is flipped before using in the depth effect. This may be necessary if you have encoded your binormals in a way that is conflicting with the depth effect."] # [doc = ""] # [inline] pub fn set_depth_deep_parallax_flip_binormal (& self , flip : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_depth_deep_parallax_flip_binormal ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , flip as _) ; } } # [doc = "If `true`, direction of the tangent is flipped before using in the depth effect. This may be necessary if you have encoded your tangents in a way that is conflicting with the depth effect."] # [doc = ""] # [inline] pub fn set_depth_deep_parallax_flip_tangent (& self , flip : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_depth_deep_parallax_flip_tangent ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , flip as _) ; } } # [doc = "Number of layers to use when using [`depth_deep_parallax`][Self::depth_deep_parallax] and the view direction is perpendicular to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp."] # [doc = ""] # [inline] pub fn set_depth_deep_parallax_max_layers (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_depth_deep_parallax_max_layers ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , layer as _) ; } } # [doc = "Number of layers to use when using [`depth_deep_parallax`][Self::depth_deep_parallax] and the view direction is parallel to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp."] # [doc = ""] # [inline] pub fn set_depth_deep_parallax_min_layers (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_depth_deep_parallax_min_layers ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , layer as _) ; } } # [doc = "Determines when depth rendering takes place. See [`DepthDrawMode`][DepthDrawMode]. See also [`flags_transparent`][Self::flags_transparent]."] # [doc = ""] # [inline] pub fn set_depth_draw_mode (& self , depth_draw_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_depth_draw_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , depth_draw_mode as _) ; } } # [doc = "Scales the depth offset effect. A higher number will create a larger depth."] # [doc = ""] # [inline] pub fn set_depth_scale (& self , depth_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_depth_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , depth_scale as _) ; } } # [doc = "Specifies how the [`detail_albedo`][Self::detail_albedo] should blend with the current `ALBEDO`. See [`BlendMode`][BlendMode] for options."] # [doc = ""] # [inline] pub fn set_detail_blend_mode (& self , detail_blend_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_detail_blend_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , detail_blend_mode as _) ; } } # [doc = "Specifies whether to use `UV` or `UV2` for the detail layer. See [`DetailUV`][DetailUV] for options."] # [doc = ""] # [inline] pub fn set_detail_uv (& self , detail_uv : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_detail_uv ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , detail_uv as _) ; } } # [doc = "The algorithm used for diffuse light scattering. See [`DiffuseMode`][DiffuseMode]."] # [doc = ""] # [inline] pub fn set_diffuse_mode (& self , diffuse_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_diffuse_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , diffuse_mode as _) ; } } # [doc = "Specifies which type of fade to use. Can be any of the [`DistanceFadeMode`][DistanceFadeMode]s."] # [doc = ""] # [inline] pub fn set_distance_fade (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_distance_fade ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Distance at which the object appears fully opaque.\n**Note:** If `distance_fade_max_distance` is less than `distance_fade_min_distance`, the behavior will be reversed. The object will start to fade away at `distance_fade_max_distance` and will fully disappear once it reaches `distance_fade_min_distance`."] # [doc = ""] # [inline] pub fn set_distance_fade_max_distance (& self , distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_distance_fade_max_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , distance as _) ; } } # [doc = "Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible.\n**Note:** If `distance_fade_min_distance` is greater than `distance_fade_max_distance`, the behavior will be reversed. The object will start to fade away at `distance_fade_max_distance` and will fully disappear once it reaches `distance_fade_min_distance`."] # [doc = ""] # [inline] pub fn set_distance_fade_min_distance (& self , distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_distance_fade_min_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , distance as _) ; } } # [doc = "The emitted light's color. See [`emission_enabled`][Self::emission_enabled]."] # [doc = ""] # [inline] pub fn set_emission (& self , emission : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_emission ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , emission) ; } } # [doc = "The emitted light's strength. See [`emission_enabled`][Self::emission_enabled]."] # [doc = ""] # [inline] pub fn set_emission_energy (& self , emission_energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_emission_energy ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , emission_energy as _) ; } } # [doc = "Sets how [`emission`][Self::emission] interacts with [`emission_texture`][Self::emission_texture]. Can either add or multiply. See [`EmissionOperator`][EmissionOperator] for options."] # [doc = ""] # [inline] pub fn set_emission_operator (& self , operator : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_emission_operator ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , operator as _) ; } } # [doc = "If `true`, enables the specified [`Feature`][Feature]. Many features that are available in [`SpatialMaterial`][SpatialMaterial]s need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to `true`."] # [doc = ""] # [inline] pub fn set_feature (& self , feature : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_feature ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , feature as _ , enable as _) ; } } # [doc = "If `true`, enables the specified flag. Flags are optional behavior that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to `true`. See [`Flags`][Flags] enumerator for options."] # [doc = ""] # [inline] pub fn set_flag (& self , flag : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , flag as _ , enable as _) ; } } # [doc = "Grows object vertices in the direction of their normals."] # [doc = ""] # [inline] pub fn set_grow (& self , amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_grow ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "If `true`, enables the vertex grow setting. See [`params_grow_amount`][Self::params_grow_amount]."] # [doc = ""] # [inline] pub fn set_grow_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_grow_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Currently unimplemented in Godot."] # [doc = ""] # [inline] pub fn set_line_width (& self , line_width : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_line_width ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , line_width as _) ; } } # [doc = "A high value makes the material appear more like a metal. Non-metals use their albedo as the diffuse color and add diffuse to the specular reflection. With non-metals, the reflection appears on top of the albedo color. Metals use their albedo as a multiplier to the specular reflection and set the diffuse color to black resulting in a tinted reflection. Materials work better when fully metal or fully non-metal, values between `0` and `1` should only be used for blending between metal and non-metal sections. To alter the amount of reflection use [`roughness`][Self::roughness]."] # [doc = ""] # [inline] pub fn set_metallic (& self , metallic : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_metallic ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , metallic as _) ; } } # [doc = "Specifies the channel of the [`metallic_texture`][Self::metallic_texture] in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use."] # [doc = ""] # [inline] pub fn set_metallic_texture_channel (& self , channel : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_metallic_texture_channel ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , channel as _) ; } } # [doc = "The strength of the normal map's effect."] # [doc = ""] # [inline] pub fn set_normal_scale (& self , normal_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_normal_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , normal_scale as _) ; } } # [doc = "The number of horizontal frames in the particle sprite sheet. Only enabled when using [`BILLBOARD_PARTICLES`][Self::BILLBOARD_PARTICLES]. See [`params_billboard_mode`][Self::params_billboard_mode]."] # [doc = ""] # [inline] pub fn set_particles_anim_h_frames (& self , frames : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_particles_anim_h_frames ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , frames as _) ; } } # [doc = "If `true`, particle animations are looped. Only enabled when using [`BILLBOARD_PARTICLES`][Self::BILLBOARD_PARTICLES]. See [`params_billboard_mode`][Self::params_billboard_mode]."] # [doc = ""] # [inline] pub fn set_particles_anim_loop (& self , loop_ : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_particles_anim_loop ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , loop_ as _) ; } } # [doc = "The number of vertical frames in the particle sprite sheet. Only enabled when using [`BILLBOARD_PARTICLES`][Self::BILLBOARD_PARTICLES]. See [`params_billboard_mode`][Self::params_billboard_mode]."] # [doc = ""] # [inline] pub fn set_particles_anim_v_frames (& self , frames : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_particles_anim_v_frames ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , frames as _) ; } } # [doc = "The point size in pixels. See [`flags_use_point_size`][Self::flags_use_point_size]."] # [doc = ""] # [inline] pub fn set_point_size (& self , point_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_point_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , point_size as _) ; } } # [doc = "If `true`, the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object."] # [doc = ""] # [inline] pub fn set_proximity_fade (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_proximity_fade ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade."] # [doc = ""] # [inline] pub fn set_proximity_fade_distance (& self , distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_proximity_fade_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , distance as _) ; } } # [doc = "The strength of the refraction effect. Higher values result in a more distorted appearance for the refraction."] # [doc = ""] # [inline] pub fn set_refraction (& self , refraction : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_refraction ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , refraction as _) ; } } # [doc = "Specifies the channel of the [`refraction_texture`][Self::refraction_texture] in which the refraction information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use."] # [doc = ""] # [inline] pub fn set_refraction_texture_channel (& self , channel : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_refraction_texture_channel ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , channel as _) ; } } # [doc = "Sets the strength of the rim lighting effect."] # [doc = ""] # [inline] pub fn set_rim (& self , rim : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_rim ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , rim as _) ; } } # [doc = "The amount of to blend light and albedo color when rendering rim effect. If `0` the light color is used, while `1` means albedo color is used. An intermediate value generally works best."] # [doc = ""] # [inline] pub fn set_rim_tint (& self , rim_tint : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_rim_tint ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , rim_tint as _) ; } } # [doc = "Surface reflection. A value of `0` represents a perfect mirror while a value of `1` completely blurs the reflection. See also [`metallic`][Self::metallic]."] # [doc = ""] # [inline] pub fn set_roughness (& self , roughness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_roughness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , roughness as _) ; } } # [doc = "Specifies the channel of the [`ao_texture`][Self::ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use."] # [doc = ""] # [inline] pub fn set_roughness_texture_channel (& self , channel : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_roughness_texture_channel ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , channel as _) ; } } # [doc = "Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources.\n**Note:** Unlike [`metallic`][Self::metallic], this is not energy-conserving, so it should be left at `0.5` in most cases. See also [`roughness`][Self::roughness]."] # [doc = ""] # [inline] pub fn set_specular (& self , specular : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_specular ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , specular as _) ; } } # [doc = "The method for rendering the specular blob. See [`SpecularMode`][SpecularMode]."] # [doc = ""] # [inline] pub fn set_specular_mode (& self , specular_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_specular_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , specular_mode as _) ; } } # [doc = "The strength of the subsurface scattering effect."] # [doc = ""] # [inline] pub fn set_subsurface_scattering_strength (& self , strength : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_subsurface_scattering_strength ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , strength as _) ; } } # [doc = "Sets the [`Texture`][Texture] to be used by the specified [`TextureParam`][TextureParam]. This function is called when setting members ending in `*_texture`."] # [doc = ""] # [inline] pub fn set_texture (& self , param : i64 , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , param as _ , texture . as_arg_ptr ()) ; } } # [doc = "The color used by the transmission effect. Represents the light passing through an object."] # [doc = ""] # [inline] pub fn set_transmission (& self , transmission : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_transmission ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , transmission) ; } } # [doc = "How much to offset the `UV` coordinates. This amount will be added to `UV` in the vertex function. This can be used to offset a texture."] # [doc = ""] # [inline] pub fn set_uv1_offset (& self , offset : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_uv1_offset ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "How much to scale the `UV` coordinates. This is multiplied by `UV` in the vertex function."] # [doc = ""] # [inline] pub fn set_uv1_scale (& self , scale : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_uv1_scale ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "A lower number blends the texture more softly while a higher number blends the texture more sharply."] # [doc = ""] # [inline] pub fn set_uv1_triplanar_blend_sharpness (& self , sharpness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_uv1_triplanar_blend_sharpness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , sharpness as _) ; } } # [doc = "How much to offset the `UV2` coordinates. This amount will be added to `UV2` in the vertex function. This can be used to offset a texture."] # [doc = ""] # [inline] pub fn set_uv2_offset (& self , offset : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_uv2_offset ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "How much to scale the `UV2` coordinates. This is multiplied by `UV2` in the vertex function."] # [doc = ""] # [inline] pub fn set_uv2_scale (& self , scale : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_uv2_scale ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , scale) ; } } # [doc = "A lower number blends the texture more softly while a higher number blends the texture more sharply."] # [doc = ""] # [inline] pub fn set_uv2_triplanar_blend_sharpness (& self , sharpness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_uv2_triplanar_blend_sharpness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , sharpness as _) ; } } # [doc = "Texture to multiply by [`albedo_color`][Self::albedo_color]. Used for basic texturing of objects."] # [doc = ""] # [inline] pub fn albedo_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture to multiply by [`albedo_color`][Self::albedo_color]. Used for basic texturing of objects."] # [doc = ""] # [inline] pub fn set_albedo_texture (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 0i64 , value . as_arg_ptr ()) ; } } # [doc = "If `true`, anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminium and hair reflections.\n**Note:** Mesh tangents are needed for anisotropy to work. If the mesh does not contain tangents, the anisotropy effect will appear broken.\n**Note:** Material anisotropy should not to be confused with anisotropic texture filtering. Anisotropic texture filtering can be enabled by selecting a texture in the FileSystem dock, going to the Import dock, checking the **Anisotropic** checkbox then clicking **Reimport**. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/quality/filters/anisotropic_filter_level]."] # [doc = ""] # [inline] pub fn anisotropy_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_feature ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 5i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminium and hair reflections.\n**Note:** Mesh tangents are needed for anisotropy to work. If the mesh does not contain tangents, the anisotropy effect will appear broken.\n**Note:** Material anisotropy should not to be confused with anisotropic texture filtering. Anisotropic texture filtering can be enabled by selecting a texture in the FileSystem dock, going to the Import dock, checking the **Anisotropic** checkbox then clicking **Reimport**. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/quality/filters/anisotropic_filter_level]."] # [doc = ""] # [inline] pub fn set_anisotropy_enabled (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_feature ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 5i64 , value as _) ; } } # [doc = "Texture that offsets the tangent map for anisotropy calculations and optionally controls the anisotropy effect (if an alpha channel is present). The flowmap texture is expected to be a derivative map, with the red channel representing distortion on the X axis and green channel representing distortion on the Y axis. Values below 0.5 will result in negative distortion, whereas values above 0.5 will result in positive distortion.\nIf present, the texture's alpha channel will be used to multiply the strength of the [`anisotropy`][Self::anisotropy] effect. Fully opaque pixels will keep the anisotropy effect's original strength while fully transparent pixels will disable the anisotropy effect entirely. The flowmap texture's blue channel is ignored."] # [doc = ""] # [inline] pub fn anisotropy_flowmap (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 7i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture that offsets the tangent map for anisotropy calculations and optionally controls the anisotropy effect (if an alpha channel is present). The flowmap texture is expected to be a derivative map, with the red channel representing distortion on the X axis and green channel representing distortion on the Y axis. Values below 0.5 will result in negative distortion, whereas values above 0.5 will result in positive distortion.\nIf present, the texture's alpha channel will be used to multiply the strength of the [`anisotropy`][Self::anisotropy] effect. Fully opaque pixels will keep the anisotropy effect's original strength while fully transparent pixels will disable the anisotropy effect entirely. The flowmap texture's blue channel is ignored."] # [doc = ""] # [inline] pub fn set_anisotropy_flowmap (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 7i64 , value . as_arg_ptr ()) ; } } # [doc = "If `true`, ambient occlusion is enabled. Ambient occlusion darkens areas based on the [`ao_texture`][Self::ao_texture]."] # [doc = ""] # [inline] pub fn ao_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_feature ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 6i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, ambient occlusion is enabled. Ambient occlusion darkens areas based on the [`ao_texture`][Self::ao_texture]."] # [doc = ""] # [inline] pub fn set_ao_enabled (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_feature ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 6i64 , value as _) ; } } # [doc = "If `true`, use `UV2` coordinates to look up from the [`ao_texture`][Self::ao_texture]."] # [doc = ""] # [inline] pub fn ao_on_uv2 (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 11i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, use `UV2` coordinates to look up from the [`ao_texture`][Self::ao_texture]."] # [doc = ""] # [inline] pub fn set_ao_on_uv2 (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 11i64 , value as _) ; } } # [doc = "Texture that defines the amount of ambient occlusion for a given point on the object."] # [doc = ""] # [inline] pub fn ao_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 8i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture that defines the amount of ambient occlusion for a given point on the object."] # [doc = ""] # [inline] pub fn set_ao_texture (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 8i64 , value . as_arg_ptr ()) ; } } # [doc = "If `true`, clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can be either glossy or rough.\n**Note:** Clearcoat rendering is not visible if the material has [`flags_unshaded`][Self::flags_unshaded] set to `true`."] # [doc = ""] # [inline] pub fn clearcoat_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_feature ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can be either glossy or rough.\n**Note:** Clearcoat rendering is not visible if the material has [`flags_unshaded`][Self::flags_unshaded] set to `true`."] # [doc = ""] # [inline] pub fn set_clearcoat_enabled (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_feature ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 4i64 , value as _) ; } } # [doc = "Texture that defines the strength of the clearcoat effect and the glossiness of the clearcoat. Strength is specified in the red channel while glossiness is specified in the green channel."] # [doc = ""] # [inline] pub fn clearcoat_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 6i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture that defines the strength of the clearcoat effect and the glossiness of the clearcoat. Strength is specified in the red channel while glossiness is specified in the green channel."] # [doc = ""] # [inline] pub fn set_clearcoat_texture (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 6i64 , value . as_arg_ptr ()) ; } } # [doc = "If `true`, depth mapping is enabled (also called \"parallax mapping\" or \"height mapping\"). See also [`normal_enabled`][Self::normal_enabled].\n**Note:** Depth mapping is not supported if triplanar mapping is used on the same material. The value of [`depth_enabled`][Self::depth_enabled] will be ignored if [`uv1_triplanar`][Self::uv1_triplanar] is enabled."] # [doc = ""] # [inline] pub fn depth_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_feature ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 7i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, depth mapping is enabled (also called \"parallax mapping\" or \"height mapping\"). See also [`normal_enabled`][Self::normal_enabled].\n**Note:** Depth mapping is not supported if triplanar mapping is used on the same material. The value of [`depth_enabled`][Self::depth_enabled] will be ignored if [`uv1_triplanar`][Self::uv1_triplanar] is enabled."] # [doc = ""] # [inline] pub fn set_depth_enabled (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_feature ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 7i64 , value as _) ; } } # [doc = "Texture used to determine depth at a given pixel. Depth is always stored in the red channel."] # [doc = ""] # [inline] pub fn depth_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 9i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture used to determine depth at a given pixel. Depth is always stored in the red channel."] # [doc = ""] # [inline] pub fn set_depth_texture (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 9i64 , value . as_arg_ptr ()) ; } } # [doc = "Texture that specifies the color of the detail overlay."] # [doc = ""] # [inline] pub fn detail_albedo (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 14i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture that specifies the color of the detail overlay."] # [doc = ""] # [inline] pub fn set_detail_albedo (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 14i64 , value . as_arg_ptr ()) ; } } # [doc = "If `true`, enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on [`detail_mask`][Self::detail_mask]. This can be used to add variation to objects, or to blend between two different albedo/normal textures."] # [doc = ""] # [inline] pub fn detail_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_feature ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 11i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on [`detail_mask`][Self::detail_mask]. This can be used to add variation to objects, or to blend between two different albedo/normal textures."] # [doc = ""] # [inline] pub fn set_detail_enabled (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_feature ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 11i64 , value as _) ; } } # [doc = "Texture used to specify how the detail textures get blended with the base textures."] # [doc = ""] # [inline] pub fn detail_mask (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 13i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture used to specify how the detail textures get blended with the base textures."] # [doc = ""] # [inline] pub fn set_detail_mask (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 13i64 , value . as_arg_ptr ()) ; } } # [doc = "Texture that specifies the per-pixel normal of the detail overlay.\n**Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn detail_normal (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 15i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture that specifies the per-pixel normal of the detail overlay.\n**Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn set_detail_normal (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 15i64 , value . as_arg_ptr ()) ; } } # [doc = "If `true`, the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [`GIProbe`][GIProbe] or [`BakedLightmap`][BakedLightmap] is used and this object is used in baked lighting."] # [doc = ""] # [inline] pub fn emission_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_feature ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [`GIProbe`][GIProbe] or [`BakedLightmap`][BakedLightmap] is used and this object is used in baked lighting."] # [doc = ""] # [inline] pub fn set_emission_enabled (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_feature ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Use `UV2` to read from the [`emission_texture`][Self::emission_texture]."] # [doc = ""] # [inline] pub fn emission_on_uv2 (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 12i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Use `UV2` to read from the [`emission_texture`][Self::emission_texture]."] # [doc = ""] # [inline] pub fn set_emission_on_uv2 (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 12i64 , value as _) ; } } # [doc = "Texture that specifies how much surface emits light at a given point."] # [doc = ""] # [inline] pub fn emission_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture that specifies how much surface emits light at a given point."] # [doc = ""] # [inline] pub fn set_emission_texture (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 3i64 , value . as_arg_ptr ()) ; } } # [doc = "Forces a conversion of the [`albedo_texture`][Self::albedo_texture] from sRGB space to linear space."] # [doc = ""] # [inline] pub fn flags_albedo_tex_force_srgb (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 14i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Forces a conversion of the [`albedo_texture`][Self::albedo_texture] from sRGB space to linear space."] # [doc = ""] # [inline] pub fn set_flags_albedo_tex_force_srgb (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 14i64 , value as _) ; } } # [doc = "Enables signed distance field rendering shader."] # [doc = ""] # [inline] pub fn flags_albedo_tex_msdf (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 19i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Enables signed distance field rendering shader."] # [doc = ""] # [inline] pub fn set_flags_albedo_tex_msdf (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 19i64 , value as _) ; } } # [doc = "If `true`, the object receives no ambient light."] # [doc = ""] # [inline] pub fn flags_disable_ambient_light (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 17i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the object receives no ambient light."] # [doc = ""] # [inline] pub fn set_flags_disable_ambient_light (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 17i64 , value as _) ; } } # [doc = "If `true`, the object receives no shadow that would otherwise be cast onto it."] # [doc = ""] # [inline] pub fn flags_do_not_receive_shadows (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 15i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the object receives no shadow that would otherwise be cast onto it."] # [doc = ""] # [inline] pub fn set_flags_do_not_receive_shadows (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 15i64 , value as _) ; } } # [doc = "If `true`, the shader will compute extra operations to make sure the normal stays correct when using a non-uniform scale. Only enable if using non-uniform scaling."] # [doc = ""] # [inline] pub fn flags_ensure_correct_normals (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 16i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the shader will compute extra operations to make sure the normal stays correct when using a non-uniform scale. Only enable if using non-uniform scaling."] # [doc = ""] # [inline] pub fn set_flags_ensure_correct_normals (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 16i64 , value as _) ; } } # [doc = "If `true`, the object is rendered at the same size regardless of distance."] # [doc = ""] # [inline] pub fn flags_fixed_size (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 6i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the object is rendered at the same size regardless of distance."] # [doc = ""] # [inline] pub fn set_flags_fixed_size (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 6i64 , value as _) ; } } # [doc = "If `true`, depth testing is disabled and the object will be drawn in render order."] # [doc = ""] # [inline] pub fn flags_no_depth_test (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, depth testing is disabled and the object will be drawn in render order."] # [doc = ""] # [inline] pub fn set_flags_no_depth_test (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "If `true`, transparency is enabled on the body. See also [`params_blend_mode`][Self::params_blend_mode]."] # [doc = ""] # [inline] pub fn flags_transparent (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_feature ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, transparency is enabled on the body. See also [`params_blend_mode`][Self::params_blend_mode]."] # [doc = ""] # [inline] pub fn set_flags_transparent (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_feature ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "If `true`, the object is unaffected by lighting."] # [doc = ""] # [inline] pub fn flags_unshaded (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the object is unaffected by lighting."] # [doc = ""] # [inline] pub fn set_flags_unshaded (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "If `true`, render point size can be changed.\n**Note:** This is only effective for objects whose geometry is point-based rather than triangle-based. See also [`params_point_size`][Self::params_point_size]."] # [doc = ""] # [inline] pub fn flags_use_point_size (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 5i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, render point size can be changed.\n**Note:** This is only effective for objects whose geometry is point-based rather than triangle-based. See also [`params_point_size`][Self::params_point_size]."] # [doc = ""] # [inline] pub fn set_flags_use_point_size (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 5i64 , value as _) ; } } # [doc = "If `true`, enables the \"shadow to opacity\" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR."] # [doc = ""] # [inline] pub fn flags_use_shadow_to_opacity (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 18i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, enables the \"shadow to opacity\" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR."] # [doc = ""] # [inline] pub fn set_flags_use_shadow_to_opacity (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 18i64 , value as _) ; } } # [doc = "If `true`, lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices, especially for meshes with a lower polygon count. The downside is that shading becomes much less accurate, with visible linear interpolation between vertices that are joined together. This can be compensated by ensuring meshes have a sufficient level of subdivision (but not too much, to avoid reducing performance). Some material features are also not supported when vertex shading is enabled.\nSee also [member ProjectSettings.rendering/quality/shading/force_vertex_shading] which can globally enable vertex shading on all materials.\n**Note:** By default, vertex shading is enforced on mobile platforms by [member ProjectSettings.rendering/quality/shading/force_vertex_shading]'s `mobile` override.\n**Note:** [`flags_vertex_lighting`][Self::flags_vertex_lighting] has no effect if [`flags_unshaded`][Self::flags_unshaded] is `true`."] # [doc = ""] # [inline] pub fn flags_vertex_lighting (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices, especially for meshes with a lower polygon count. The downside is that shading becomes much less accurate, with visible linear interpolation between vertices that are joined together. This can be compensated by ensuring meshes have a sufficient level of subdivision (but not too much, to avoid reducing performance). Some material features are also not supported when vertex shading is enabled.\nSee also [member ProjectSettings.rendering/quality/shading/force_vertex_shading] which can globally enable vertex shading on all materials.\n**Note:** By default, vertex shading is enforced on mobile platforms by [member ProjectSettings.rendering/quality/shading/force_vertex_shading]'s `mobile` override.\n**Note:** [`flags_vertex_lighting`][Self::flags_vertex_lighting] has no effect if [`flags_unshaded`][Self::flags_unshaded] is `true`."] # [doc = ""] # [inline] pub fn set_flags_vertex_lighting (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "If `true`, triplanar mapping is calculated in world space rather than object local space. See also [`uv1_triplanar`][Self::uv1_triplanar]."] # [doc = ""] # [inline] pub fn flags_world_triplanar (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 10i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, triplanar mapping is calculated in world space rather than object local space. See also [`uv1_triplanar`][Self::uv1_triplanar]."] # [doc = ""] # [inline] pub fn set_flags_world_triplanar (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 10i64 , value as _) ; } } # [doc = "Texture used to specify metallic for an object. This is multiplied by [`metallic`][Self::metallic]."] # [doc = ""] # [inline] pub fn metallic_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture used to specify metallic for an object. This is multiplied by [`metallic`][Self::metallic]."] # [doc = ""] # [inline] pub fn set_metallic_texture (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 1i64 , value . as_arg_ptr ()) ; } } # [doc = "If `true`, normal mapping is enabled."] # [doc = ""] # [inline] pub fn normal_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_feature ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, normal mapping is enabled."] # [doc = ""] # [inline] pub fn set_normal_enabled (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_feature ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Texture used to specify the normal at a given pixel. The `normal_texture` only uses the red and green channels; the blue and alpha channels are ignored. The normal read from `normal_texture` is oriented around the surface normal provided by the [`Mesh`][Mesh].\n**Note:** The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with [`SurfaceTool`][SurfaceTool], you can use [`SurfaceTool.generate_normals`][SurfaceTool::generate_normals] and [`SurfaceTool.generate_tangents`][SurfaceTool::generate_tangents] to automatically generate normals and tangents respectively.\n**Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normal_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture used to specify the normal at a given pixel. The `normal_texture` only uses the red and green channels; the blue and alpha channels are ignored. The normal read from `normal_texture` is oriented around the surface normal provided by the [`Mesh`][Mesh].\n**Note:** The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with [`SurfaceTool`][SurfaceTool], you can use [`SurfaceTool.generate_normals`][SurfaceTool::generate_normals] and [`SurfaceTool.generate_tangents`][SurfaceTool::generate_tangents] to automatically generate normals and tangents respectively.\n**Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn set_normal_texture (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 4i64 , value . as_arg_ptr ()) ; } } # [doc = "If `true`, the shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [`params_billboard_mode`][Self::params_billboard_mode] is [`BILLBOARD_ENABLED`][Self::BILLBOARD_ENABLED]."] # [doc = ""] # [inline] pub fn params_billboard_keep_scale (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 7i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [`params_billboard_mode`][Self::params_billboard_mode] is [`BILLBOARD_ENABLED`][Self::BILLBOARD_ENABLED]."] # [doc = ""] # [inline] pub fn set_params_billboard_keep_scale (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 7i64 , value as _) ; } } # [doc = "If `true`, the shader will discard all pixels that have an alpha value less than [`params_alpha_scissor_threshold`][Self::params_alpha_scissor_threshold]."] # [doc = ""] # [inline] pub fn params_use_alpha_scissor (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 13i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the shader will discard all pixels that have an alpha value less than [`params_alpha_scissor_threshold`][Self::params_alpha_scissor_threshold]."] # [doc = ""] # [inline] pub fn set_params_use_alpha_scissor (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 13i64 , value as _) ; } } # [doc = "If `true`, the refraction effect is enabled. Refraction distorts transparency based on light from behind the object. When using the GLES3 backend, the material's roughness value will affect the blurriness of the refraction. Higher roughness values will make the refraction look blurrier."] # [doc = ""] # [inline] pub fn refraction_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_feature ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 10i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the refraction effect is enabled. Refraction distorts transparency based on light from behind the object. When using the GLES3 backend, the material's roughness value will affect the blurriness of the refraction. Higher roughness values will make the refraction look blurrier."] # [doc = ""] # [inline] pub fn set_refraction_enabled (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_feature ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 10i64 , value as _) ; } } # [doc = "Texture that controls the strength of the refraction per-pixel. Multiplied by [`refraction_scale`][Self::refraction_scale]."] # [doc = ""] # [inline] pub fn refraction_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 12i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture that controls the strength of the refraction per-pixel. Multiplied by [`refraction_scale`][Self::refraction_scale]."] # [doc = ""] # [inline] pub fn set_refraction_texture (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 12i64 , value . as_arg_ptr ()) ; } } # [doc = "If `true`, rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object.\n**Note:** Rim lighting is not visible if the material has [`flags_unshaded`][Self::flags_unshaded] set to `true`."] # [doc = ""] # [inline] pub fn rim_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_feature ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object.\n**Note:** Rim lighting is not visible if the material has [`flags_unshaded`][Self::flags_unshaded] set to `true`."] # [doc = ""] # [inline] pub fn set_rim_enabled (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_feature ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by [`rim`][Self::rim]."] # [doc = ""] # [inline] pub fn rim_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 5i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by [`rim`][Self::rim]."] # [doc = ""] # [inline] pub fn set_rim_texture (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 5i64 , value . as_arg_ptr ()) ; } } # [doc = "Texture used to control the roughness per-pixel. Multiplied by [`roughness`][Self::roughness]."] # [doc = ""] # [inline] pub fn roughness_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture used to control the roughness per-pixel. Multiplied by [`roughness`][Self::roughness]."] # [doc = ""] # [inline] pub fn set_roughness_texture (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 2i64 , value . as_arg_ptr ()) ; } } # [doc = "If `true`, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges."] # [doc = ""] # [inline] pub fn subsurf_scatter_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_feature ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 8i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges."] # [doc = ""] # [inline] pub fn set_subsurf_scatter_enabled (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_feature ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 8i64 , value as _) ; } } # [doc = "Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by [`subsurf_scatter_strength`][Self::subsurf_scatter_strength]."] # [doc = ""] # [inline] pub fn subsurf_scatter_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 10i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by [`subsurf_scatter_strength`][Self::subsurf_scatter_strength]."] # [doc = ""] # [inline] pub fn set_subsurf_scatter_texture (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 10i64 , value . as_arg_ptr ()) ; } } # [doc = "If `true`, the transmission effect is enabled."] # [doc = ""] # [inline] pub fn transmission_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_feature ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 9i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the transmission effect is enabled."] # [doc = ""] # [inline] pub fn set_transmission_enabled (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_feature ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 9i64 , value as _) ; } } # [doc = "Texture used to control the transmission effect per-pixel. Added to [`transmission`][Self::transmission]."] # [doc = ""] # [inline] pub fn transmission_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 11i64) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture used to control the transmission effect per-pixel. Added to [`transmission`][Self::transmission]."] # [doc = ""] # [inline] pub fn set_transmission_texture (& self , value : impl AsArg < crate :: generated :: Texture >) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , 11i64 , value . as_arg_ptr ()) ; } } # [doc = "If `true`, instead of using `UV` textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing."] # [doc = ""] # [inline] pub fn uv1_triplanar (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 8i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, instead of using `UV` textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing."] # [doc = ""] # [inline] pub fn set_uv1_triplanar (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 8i64 , value as _) ; } } # [doc = "If `true`, instead of using `UV2` textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing."] # [doc = ""] # [inline] pub fn uv2_triplanar (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 9i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, instead of using `UV2` textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing."] # [doc = ""] # [inline] pub fn set_uv2_triplanar (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 9i64 , value as _) ; } } # [doc = "If `true`, the model's vertex colors are processed as sRGB mode."] # [doc = ""] # [inline] pub fn vertex_color_is_srgb (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the model's vertex colors are processed as sRGB mode."] # [doc = ""] # [inline] pub fn set_vertex_color_is_srgb (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 4i64 , value as _) ; } } # [doc = "If `true`, the vertex color is used as albedo color."] # [doc = ""] # [inline] pub fn vertex_color_use_as_albedo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . get_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the vertex color is used as albedo color."] # [doc = ""] # [inline] pub fn set_vertex_color_use_as_albedo (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialMaterialMethodTable :: get (get_api ()) . set_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SpatialMaterial { } unsafe impl GodotObject for SpatialMaterial { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SpatialMaterial" } } impl std :: ops :: Deref for SpatialMaterial { type Target = crate :: generated :: Material ; # [inline] fn deref (& self) -> & crate :: generated :: Material { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpatialMaterial { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Material { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Material > for SpatialMaterial { } unsafe impl SubClass < crate :: generated :: Resource > for SpatialMaterial { } unsafe impl SubClass < crate :: generated :: Reference > for SpatialMaterial { } unsafe impl SubClass < crate :: generated :: Object > for SpatialMaterial { } impl Instanciable for SpatialMaterial { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { SpatialMaterial :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SpatialMaterialMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_albedo : * mut sys :: godot_method_bind , pub get_alpha_scissor_threshold : * mut sys :: godot_method_bind , pub get_anisotropy : * mut sys :: godot_method_bind , pub get_ao_light_affect : * mut sys :: godot_method_bind , pub get_ao_texture_channel : * mut sys :: godot_method_bind , pub get_async_mode : * mut sys :: godot_method_bind , pub get_billboard_mode : * mut sys :: godot_method_bind , pub get_blend_mode : * mut sys :: godot_method_bind , pub get_clearcoat : * mut sys :: godot_method_bind , pub get_clearcoat_gloss : * mut sys :: godot_method_bind , pub get_cull_mode : * mut sys :: godot_method_bind , pub get_depth_deep_parallax_flip_binormal : * mut sys :: godot_method_bind , pub get_depth_deep_parallax_flip_tangent : * mut sys :: godot_method_bind , pub get_depth_deep_parallax_max_layers : * mut sys :: godot_method_bind , pub get_depth_deep_parallax_min_layers : * mut sys :: godot_method_bind , pub get_depth_draw_mode : * mut sys :: godot_method_bind , pub get_depth_scale : * mut sys :: godot_method_bind , pub get_detail_blend_mode : * mut sys :: godot_method_bind , pub get_detail_uv : * mut sys :: godot_method_bind , pub get_diffuse_mode : * mut sys :: godot_method_bind , pub get_distance_fade : * mut sys :: godot_method_bind , pub get_distance_fade_max_distance : * mut sys :: godot_method_bind , pub get_distance_fade_min_distance : * mut sys :: godot_method_bind , pub get_emission : * mut sys :: godot_method_bind , pub get_emission_energy : * mut sys :: godot_method_bind , pub get_emission_operator : * mut sys :: godot_method_bind , pub get_feature : * mut sys :: godot_method_bind , pub get_flag : * mut sys :: godot_method_bind , pub get_grow : * mut sys :: godot_method_bind , pub get_line_width : * mut sys :: godot_method_bind , pub get_metallic : * mut sys :: godot_method_bind , pub get_metallic_texture_channel : * mut sys :: godot_method_bind , pub get_normal_scale : * mut sys :: godot_method_bind , pub get_particles_anim_h_frames : * mut sys :: godot_method_bind , pub get_particles_anim_loop : * mut sys :: godot_method_bind , pub get_particles_anim_v_frames : * mut sys :: godot_method_bind , pub get_point_size : * mut sys :: godot_method_bind , pub get_proximity_fade_distance : * mut sys :: godot_method_bind , pub get_refraction : * mut sys :: godot_method_bind , pub get_refraction_texture_channel : * mut sys :: godot_method_bind , pub get_rim : * mut sys :: godot_method_bind , pub get_rim_tint : * mut sys :: godot_method_bind , pub get_roughness : * mut sys :: godot_method_bind , pub get_roughness_texture_channel : * mut sys :: godot_method_bind , pub get_specular : * mut sys :: godot_method_bind , pub get_specular_mode : * mut sys :: godot_method_bind , pub get_subsurface_scattering_strength : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_transmission : * mut sys :: godot_method_bind , pub get_uv1_offset : * mut sys :: godot_method_bind , pub get_uv1_scale : * mut sys :: godot_method_bind , pub get_uv1_triplanar_blend_sharpness : * mut sys :: godot_method_bind , pub get_uv2_offset : * mut sys :: godot_method_bind , pub get_uv2_scale : * mut sys :: godot_method_bind , pub get_uv2_triplanar_blend_sharpness : * mut sys :: godot_method_bind , pub is_depth_deep_parallax_enabled : * mut sys :: godot_method_bind , pub is_grow_enabled : * mut sys :: godot_method_bind , pub is_proximity_fade_enabled : * mut sys :: godot_method_bind , pub set_albedo : * mut sys :: godot_method_bind , pub set_alpha_scissor_threshold : * mut sys :: godot_method_bind , pub set_anisotropy : * mut sys :: godot_method_bind , pub set_ao_light_affect : * mut sys :: godot_method_bind , pub set_ao_texture_channel : * mut sys :: godot_method_bind , pub set_async_mode : * mut sys :: godot_method_bind , pub set_billboard_mode : * mut sys :: godot_method_bind , pub set_blend_mode : * mut sys :: godot_method_bind , pub set_clearcoat : * mut sys :: godot_method_bind , pub set_clearcoat_gloss : * mut sys :: godot_method_bind , pub set_cull_mode : * mut sys :: godot_method_bind , pub set_depth_deep_parallax : * mut sys :: godot_method_bind , pub set_depth_deep_parallax_flip_binormal : * mut sys :: godot_method_bind , pub set_depth_deep_parallax_flip_tangent : * mut sys :: godot_method_bind , pub set_depth_deep_parallax_max_layers : * mut sys :: godot_method_bind , pub set_depth_deep_parallax_min_layers : * mut sys :: godot_method_bind , pub set_depth_draw_mode : * mut sys :: godot_method_bind , pub set_depth_scale : * mut sys :: godot_method_bind , pub set_detail_blend_mode : * mut sys :: godot_method_bind , pub set_detail_uv : * mut sys :: godot_method_bind , pub set_diffuse_mode : * mut sys :: godot_method_bind , pub set_distance_fade : * mut sys :: godot_method_bind , pub set_distance_fade_max_distance : * mut sys :: godot_method_bind , pub set_distance_fade_min_distance : * mut sys :: godot_method_bind , pub set_emission : * mut sys :: godot_method_bind , pub set_emission_energy : * mut sys :: godot_method_bind , pub set_emission_operator : * mut sys :: godot_method_bind , pub set_feature : * mut sys :: godot_method_bind , pub set_flag : * mut sys :: godot_method_bind , pub set_grow : * mut sys :: godot_method_bind , pub set_grow_enabled : * mut sys :: godot_method_bind , pub set_line_width : * mut sys :: godot_method_bind , pub set_metallic : * mut sys :: godot_method_bind , pub set_metallic_texture_channel : * mut sys :: godot_method_bind , pub set_normal_scale : * mut sys :: godot_method_bind , pub set_particles_anim_h_frames : * mut sys :: godot_method_bind , pub set_particles_anim_loop : * mut sys :: godot_method_bind , pub set_particles_anim_v_frames : * mut sys :: godot_method_bind , pub set_point_size : * mut sys :: godot_method_bind , pub set_proximity_fade : * mut sys :: godot_method_bind , pub set_proximity_fade_distance : * mut sys :: godot_method_bind , pub set_refraction : * mut sys :: godot_method_bind , pub set_refraction_texture_channel : * mut sys :: godot_method_bind , pub set_rim : * mut sys :: godot_method_bind , pub set_rim_tint : * mut sys :: godot_method_bind , pub set_roughness : * mut sys :: godot_method_bind , pub set_roughness_texture_channel : * mut sys :: godot_method_bind , pub set_specular : * mut sys :: godot_method_bind , pub set_specular_mode : * mut sys :: godot_method_bind , pub set_subsurface_scattering_strength : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_transmission : * mut sys :: godot_method_bind , pub set_uv1_offset : * mut sys :: godot_method_bind , pub set_uv1_scale : * mut sys :: godot_method_bind , pub set_uv1_triplanar_blend_sharpness : * mut sys :: godot_method_bind , pub set_uv2_offset : * mut sys :: godot_method_bind , pub set_uv2_scale : * mut sys :: godot_method_bind , pub set_uv2_triplanar_blend_sharpness : * mut sys :: godot_method_bind } impl SpatialMaterialMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SpatialMaterialMethodTable = SpatialMaterialMethodTable { class_constructor : None , get_albedo : 0 as * mut sys :: godot_method_bind , get_alpha_scissor_threshold : 0 as * mut sys :: godot_method_bind , get_anisotropy : 0 as * mut sys :: godot_method_bind , get_ao_light_affect : 0 as * mut sys :: godot_method_bind , get_ao_texture_channel : 0 as * mut sys :: godot_method_bind , get_async_mode : 0 as * mut sys :: godot_method_bind , get_billboard_mode : 0 as * mut sys :: godot_method_bind , get_blend_mode : 0 as * mut sys :: godot_method_bind , get_clearcoat : 0 as * mut sys :: godot_method_bind , get_clearcoat_gloss : 0 as * mut sys :: godot_method_bind , get_cull_mode : 0 as * mut sys :: godot_method_bind , get_depth_deep_parallax_flip_binormal : 0 as * mut sys :: godot_method_bind , get_depth_deep_parallax_flip_tangent : 0 as * mut sys :: godot_method_bind , get_depth_deep_parallax_max_layers : 0 as * mut sys :: godot_method_bind , get_depth_deep_parallax_min_layers : 0 as * mut sys :: godot_method_bind , get_depth_draw_mode : 0 as * mut sys :: godot_method_bind , get_depth_scale : 0 as * mut sys :: godot_method_bind , get_detail_blend_mode : 0 as * mut sys :: godot_method_bind , get_detail_uv : 0 as * mut sys :: godot_method_bind , get_diffuse_mode : 0 as * mut sys :: godot_method_bind , get_distance_fade : 0 as * mut sys :: godot_method_bind , get_distance_fade_max_distance : 0 as * mut sys :: godot_method_bind , get_distance_fade_min_distance : 0 as * mut sys :: godot_method_bind , get_emission : 0 as * mut sys :: godot_method_bind , get_emission_energy : 0 as * mut sys :: godot_method_bind , get_emission_operator : 0 as * mut sys :: godot_method_bind , get_feature : 0 as * mut sys :: godot_method_bind , get_flag : 0 as * mut sys :: godot_method_bind , get_grow : 0 as * mut sys :: godot_method_bind , get_line_width : 0 as * mut sys :: godot_method_bind , get_metallic : 0 as * mut sys :: godot_method_bind , get_metallic_texture_channel : 0 as * mut sys :: godot_method_bind , get_normal_scale : 0 as * mut sys :: godot_method_bind , get_particles_anim_h_frames : 0 as * mut sys :: godot_method_bind , get_particles_anim_loop : 0 as * mut sys :: godot_method_bind , get_particles_anim_v_frames : 0 as * mut sys :: godot_method_bind , get_point_size : 0 as * mut sys :: godot_method_bind , get_proximity_fade_distance : 0 as * mut sys :: godot_method_bind , get_refraction : 0 as * mut sys :: godot_method_bind , get_refraction_texture_channel : 0 as * mut sys :: godot_method_bind , get_rim : 0 as * mut sys :: godot_method_bind , get_rim_tint : 0 as * mut sys :: godot_method_bind , get_roughness : 0 as * mut sys :: godot_method_bind , get_roughness_texture_channel : 0 as * mut sys :: godot_method_bind , get_specular : 0 as * mut sys :: godot_method_bind , get_specular_mode : 0 as * mut sys :: godot_method_bind , get_subsurface_scattering_strength : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_transmission : 0 as * mut sys :: godot_method_bind , get_uv1_offset : 0 as * mut sys :: godot_method_bind , get_uv1_scale : 0 as * mut sys :: godot_method_bind , get_uv1_triplanar_blend_sharpness : 0 as * mut sys :: godot_method_bind , get_uv2_offset : 0 as * mut sys :: godot_method_bind , get_uv2_scale : 0 as * mut sys :: godot_method_bind , get_uv2_triplanar_blend_sharpness : 0 as * mut sys :: godot_method_bind , is_depth_deep_parallax_enabled : 0 as * mut sys :: godot_method_bind , is_grow_enabled : 0 as * mut sys :: godot_method_bind , is_proximity_fade_enabled : 0 as * mut sys :: godot_method_bind , set_albedo : 0 as * mut sys :: godot_method_bind , set_alpha_scissor_threshold : 0 as * mut sys :: godot_method_bind , set_anisotropy : 0 as * mut sys :: godot_method_bind , set_ao_light_affect : 0 as * mut sys :: godot_method_bind , set_ao_texture_channel : 0 as * mut sys :: godot_method_bind , set_async_mode : 0 as * mut sys :: godot_method_bind , set_billboard_mode : 0 as * mut sys :: godot_method_bind , set_blend_mode : 0 as * mut sys :: godot_method_bind , set_clearcoat : 0 as * mut sys :: godot_method_bind , set_clearcoat_gloss : 0 as * mut sys :: godot_method_bind , set_cull_mode : 0 as * mut sys :: godot_method_bind , set_depth_deep_parallax : 0 as * mut sys :: godot_method_bind , set_depth_deep_parallax_flip_binormal : 0 as * mut sys :: godot_method_bind , set_depth_deep_parallax_flip_tangent : 0 as * mut sys :: godot_method_bind , set_depth_deep_parallax_max_layers : 0 as * mut sys :: godot_method_bind , set_depth_deep_parallax_min_layers : 0 as * mut sys :: godot_method_bind , set_depth_draw_mode : 0 as * mut sys :: godot_method_bind , set_depth_scale : 0 as * mut sys :: godot_method_bind , set_detail_blend_mode : 0 as * mut sys :: godot_method_bind , set_detail_uv : 0 as * mut sys :: godot_method_bind , set_diffuse_mode : 0 as * mut sys :: godot_method_bind , set_distance_fade : 0 as * mut sys :: godot_method_bind , set_distance_fade_max_distance : 0 as * mut sys :: godot_method_bind , set_distance_fade_min_distance : 0 as * mut sys :: godot_method_bind , set_emission : 0 as * mut sys :: godot_method_bind , set_emission_energy : 0 as * mut sys :: godot_method_bind , set_emission_operator : 0 as * mut sys :: godot_method_bind , set_feature : 0 as * mut sys :: godot_method_bind , set_flag : 0 as * mut sys :: godot_method_bind , set_grow : 0 as * mut sys :: godot_method_bind , set_grow_enabled : 0 as * mut sys :: godot_method_bind , set_line_width : 0 as * mut sys :: godot_method_bind , set_metallic : 0 as * mut sys :: godot_method_bind , set_metallic_texture_channel : 0 as * mut sys :: godot_method_bind , set_normal_scale : 0 as * mut sys :: godot_method_bind , set_particles_anim_h_frames : 0 as * mut sys :: godot_method_bind , set_particles_anim_loop : 0 as * mut sys :: godot_method_bind , set_particles_anim_v_frames : 0 as * mut sys :: godot_method_bind , set_point_size : 0 as * mut sys :: godot_method_bind , set_proximity_fade : 0 as * mut sys :: godot_method_bind , set_proximity_fade_distance : 0 as * mut sys :: godot_method_bind , set_refraction : 0 as * mut sys :: godot_method_bind , set_refraction_texture_channel : 0 as * mut sys :: godot_method_bind , set_rim : 0 as * mut sys :: godot_method_bind , set_rim_tint : 0 as * mut sys :: godot_method_bind , set_roughness : 0 as * mut sys :: godot_method_bind , set_roughness_texture_channel : 0 as * mut sys :: godot_method_bind , set_specular : 0 as * mut sys :: godot_method_bind , set_specular_mode : 0 as * mut sys :: godot_method_bind , set_subsurface_scattering_strength : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_transmission : 0 as * mut sys :: godot_method_bind , set_uv1_offset : 0 as * mut sys :: godot_method_bind , set_uv1_scale : 0 as * mut sys :: godot_method_bind , set_uv1_triplanar_blend_sharpness : 0 as * mut sys :: godot_method_bind , set_uv2_offset : 0 as * mut sys :: godot_method_bind , set_uv2_scale : 0 as * mut sys :: godot_method_bind , set_uv2_triplanar_blend_sharpness : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SpatialMaterialMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SpatialMaterial\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_albedo = (gd_api . godot_method_bind_get_method) (class_name , "get_albedo\0" . as_ptr () as * const c_char) ; table . get_alpha_scissor_threshold = (gd_api . godot_method_bind_get_method) (class_name , "get_alpha_scissor_threshold\0" . as_ptr () as * const c_char) ; table . get_anisotropy = (gd_api . godot_method_bind_get_method) (class_name , "get_anisotropy\0" . as_ptr () as * const c_char) ; table . get_ao_light_affect = (gd_api . godot_method_bind_get_method) (class_name , "get_ao_light_affect\0" . as_ptr () as * const c_char) ; table . get_ao_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_ao_texture_channel\0" . as_ptr () as * const c_char) ; table . get_async_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_async_mode\0" . as_ptr () as * const c_char) ; table . get_billboard_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_billboard_mode\0" . as_ptr () as * const c_char) ; table . get_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_blend_mode\0" . as_ptr () as * const c_char) ; table . get_clearcoat = (gd_api . godot_method_bind_get_method) (class_name , "get_clearcoat\0" . as_ptr () as * const c_char) ; table . get_clearcoat_gloss = (gd_api . godot_method_bind_get_method) (class_name , "get_clearcoat_gloss\0" . as_ptr () as * const c_char) ; table . get_cull_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_cull_mode\0" . as_ptr () as * const c_char) ; table . get_depth_deep_parallax_flip_binormal = (gd_api . godot_method_bind_get_method) (class_name , "get_depth_deep_parallax_flip_binormal\0" . as_ptr () as * const c_char) ; table . get_depth_deep_parallax_flip_tangent = (gd_api . godot_method_bind_get_method) (class_name , "get_depth_deep_parallax_flip_tangent\0" . as_ptr () as * const c_char) ; table . get_depth_deep_parallax_max_layers = (gd_api . godot_method_bind_get_method) (class_name , "get_depth_deep_parallax_max_layers\0" . as_ptr () as * const c_char) ; table . get_depth_deep_parallax_min_layers = (gd_api . godot_method_bind_get_method) (class_name , "get_depth_deep_parallax_min_layers\0" . as_ptr () as * const c_char) ; table . get_depth_draw_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_depth_draw_mode\0" . as_ptr () as * const c_char) ; table . get_depth_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_depth_scale\0" . as_ptr () as * const c_char) ; table . get_detail_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_detail_blend_mode\0" . as_ptr () as * const c_char) ; table . get_detail_uv = (gd_api . godot_method_bind_get_method) (class_name , "get_detail_uv\0" . as_ptr () as * const c_char) ; table . get_diffuse_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_diffuse_mode\0" . as_ptr () as * const c_char) ; table . get_distance_fade = (gd_api . godot_method_bind_get_method) (class_name , "get_distance_fade\0" . as_ptr () as * const c_char) ; table . get_distance_fade_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_distance_fade_max_distance\0" . as_ptr () as * const c_char) ; table . get_distance_fade_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_distance_fade_min_distance\0" . as_ptr () as * const c_char) ; table . get_emission = (gd_api . godot_method_bind_get_method) (class_name , "get_emission\0" . as_ptr () as * const c_char) ; table . get_emission_energy = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_energy\0" . as_ptr () as * const c_char) ; table . get_emission_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_emission_operator\0" . as_ptr () as * const c_char) ; table . get_feature = (gd_api . godot_method_bind_get_method) (class_name , "get_feature\0" . as_ptr () as * const c_char) ; table . get_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_flag\0" . as_ptr () as * const c_char) ; table . get_grow = (gd_api . godot_method_bind_get_method) (class_name , "get_grow\0" . as_ptr () as * const c_char) ; table . get_line_width = (gd_api . godot_method_bind_get_method) (class_name , "get_line_width\0" . as_ptr () as * const c_char) ; table . get_metallic = (gd_api . godot_method_bind_get_method) (class_name , "get_metallic\0" . as_ptr () as * const c_char) ; table . get_metallic_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_metallic_texture_channel\0" . as_ptr () as * const c_char) ; table . get_normal_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_scale\0" . as_ptr () as * const c_char) ; table . get_particles_anim_h_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_anim_h_frames\0" . as_ptr () as * const c_char) ; table . get_particles_anim_loop = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_anim_loop\0" . as_ptr () as * const c_char) ; table . get_particles_anim_v_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_particles_anim_v_frames\0" . as_ptr () as * const c_char) ; table . get_point_size = (gd_api . godot_method_bind_get_method) (class_name , "get_point_size\0" . as_ptr () as * const c_char) ; table . get_proximity_fade_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_proximity_fade_distance\0" . as_ptr () as * const c_char) ; table . get_refraction = (gd_api . godot_method_bind_get_method) (class_name , "get_refraction\0" . as_ptr () as * const c_char) ; table . get_refraction_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_refraction_texture_channel\0" . as_ptr () as * const c_char) ; table . get_rim = (gd_api . godot_method_bind_get_method) (class_name , "get_rim\0" . as_ptr () as * const c_char) ; table . get_rim_tint = (gd_api . godot_method_bind_get_method) (class_name , "get_rim_tint\0" . as_ptr () as * const c_char) ; table . get_roughness = (gd_api . godot_method_bind_get_method) (class_name , "get_roughness\0" . as_ptr () as * const c_char) ; table . get_roughness_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "get_roughness_texture_channel\0" . as_ptr () as * const c_char) ; table . get_specular = (gd_api . godot_method_bind_get_method) (class_name , "get_specular\0" . as_ptr () as * const c_char) ; table . get_specular_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_specular_mode\0" . as_ptr () as * const c_char) ; table . get_subsurface_scattering_strength = (gd_api . godot_method_bind_get_method) (class_name , "get_subsurface_scattering_strength\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_transmission = (gd_api . godot_method_bind_get_method) (class_name , "get_transmission\0" . as_ptr () as * const c_char) ; table . get_uv1_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_uv1_offset\0" . as_ptr () as * const c_char) ; table . get_uv1_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_uv1_scale\0" . as_ptr () as * const c_char) ; table . get_uv1_triplanar_blend_sharpness = (gd_api . godot_method_bind_get_method) (class_name , "get_uv1_triplanar_blend_sharpness\0" . as_ptr () as * const c_char) ; table . get_uv2_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_uv2_offset\0" . as_ptr () as * const c_char) ; table . get_uv2_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_uv2_scale\0" . as_ptr () as * const c_char) ; table . get_uv2_triplanar_blend_sharpness = (gd_api . godot_method_bind_get_method) (class_name , "get_uv2_triplanar_blend_sharpness\0" . as_ptr () as * const c_char) ; table . is_depth_deep_parallax_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_depth_deep_parallax_enabled\0" . as_ptr () as * const c_char) ; table . is_grow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_grow_enabled\0" . as_ptr () as * const c_char) ; table . is_proximity_fade_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_proximity_fade_enabled\0" . as_ptr () as * const c_char) ; table . set_albedo = (gd_api . godot_method_bind_get_method) (class_name , "set_albedo\0" . as_ptr () as * const c_char) ; table . set_alpha_scissor_threshold = (gd_api . godot_method_bind_get_method) (class_name , "set_alpha_scissor_threshold\0" . as_ptr () as * const c_char) ; table . set_anisotropy = (gd_api . godot_method_bind_get_method) (class_name , "set_anisotropy\0" . as_ptr () as * const c_char) ; table . set_ao_light_affect = (gd_api . godot_method_bind_get_method) (class_name , "set_ao_light_affect\0" . as_ptr () as * const c_char) ; table . set_ao_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "set_ao_texture_channel\0" . as_ptr () as * const c_char) ; table . set_async_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_async_mode\0" . as_ptr () as * const c_char) ; table . set_billboard_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_billboard_mode\0" . as_ptr () as * const c_char) ; table . set_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_blend_mode\0" . as_ptr () as * const c_char) ; table . set_clearcoat = (gd_api . godot_method_bind_get_method) (class_name , "set_clearcoat\0" . as_ptr () as * const c_char) ; table . set_clearcoat_gloss = (gd_api . godot_method_bind_get_method) (class_name , "set_clearcoat_gloss\0" . as_ptr () as * const c_char) ; table . set_cull_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_cull_mode\0" . as_ptr () as * const c_char) ; table . set_depth_deep_parallax = (gd_api . godot_method_bind_get_method) (class_name , "set_depth_deep_parallax\0" . as_ptr () as * const c_char) ; table . set_depth_deep_parallax_flip_binormal = (gd_api . godot_method_bind_get_method) (class_name , "set_depth_deep_parallax_flip_binormal\0" . as_ptr () as * const c_char) ; table . set_depth_deep_parallax_flip_tangent = (gd_api . godot_method_bind_get_method) (class_name , "set_depth_deep_parallax_flip_tangent\0" . as_ptr () as * const c_char) ; table . set_depth_deep_parallax_max_layers = (gd_api . godot_method_bind_get_method) (class_name , "set_depth_deep_parallax_max_layers\0" . as_ptr () as * const c_char) ; table . set_depth_deep_parallax_min_layers = (gd_api . godot_method_bind_get_method) (class_name , "set_depth_deep_parallax_min_layers\0" . as_ptr () as * const c_char) ; table . set_depth_draw_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_depth_draw_mode\0" . as_ptr () as * const c_char) ; table . set_depth_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_depth_scale\0" . as_ptr () as * const c_char) ; table . set_detail_blend_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_detail_blend_mode\0" . as_ptr () as * const c_char) ; table . set_detail_uv = (gd_api . godot_method_bind_get_method) (class_name , "set_detail_uv\0" . as_ptr () as * const c_char) ; table . set_diffuse_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_diffuse_mode\0" . as_ptr () as * const c_char) ; table . set_distance_fade = (gd_api . godot_method_bind_get_method) (class_name , "set_distance_fade\0" . as_ptr () as * const c_char) ; table . set_distance_fade_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_distance_fade_max_distance\0" . as_ptr () as * const c_char) ; table . set_distance_fade_min_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_distance_fade_min_distance\0" . as_ptr () as * const c_char) ; table . set_emission = (gd_api . godot_method_bind_get_method) (class_name , "set_emission\0" . as_ptr () as * const c_char) ; table . set_emission_energy = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_energy\0" . as_ptr () as * const c_char) ; table . set_emission_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_emission_operator\0" . as_ptr () as * const c_char) ; table . set_feature = (gd_api . godot_method_bind_get_method) (class_name , "set_feature\0" . as_ptr () as * const c_char) ; table . set_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_flag\0" . as_ptr () as * const c_char) ; table . set_grow = (gd_api . godot_method_bind_get_method) (class_name , "set_grow\0" . as_ptr () as * const c_char) ; table . set_grow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_grow_enabled\0" . as_ptr () as * const c_char) ; table . set_line_width = (gd_api . godot_method_bind_get_method) (class_name , "set_line_width\0" . as_ptr () as * const c_char) ; table . set_metallic = (gd_api . godot_method_bind_get_method) (class_name , "set_metallic\0" . as_ptr () as * const c_char) ; table . set_metallic_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "set_metallic_texture_channel\0" . as_ptr () as * const c_char) ; table . set_normal_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_scale\0" . as_ptr () as * const c_char) ; table . set_particles_anim_h_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_anim_h_frames\0" . as_ptr () as * const c_char) ; table . set_particles_anim_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_anim_loop\0" . as_ptr () as * const c_char) ; table . set_particles_anim_v_frames = (gd_api . godot_method_bind_get_method) (class_name , "set_particles_anim_v_frames\0" . as_ptr () as * const c_char) ; table . set_point_size = (gd_api . godot_method_bind_get_method) (class_name , "set_point_size\0" . as_ptr () as * const c_char) ; table . set_proximity_fade = (gd_api . godot_method_bind_get_method) (class_name , "set_proximity_fade\0" . as_ptr () as * const c_char) ; table . set_proximity_fade_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_proximity_fade_distance\0" . as_ptr () as * const c_char) ; table . set_refraction = (gd_api . godot_method_bind_get_method) (class_name , "set_refraction\0" . as_ptr () as * const c_char) ; table . set_refraction_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "set_refraction_texture_channel\0" . as_ptr () as * const c_char) ; table . set_rim = (gd_api . godot_method_bind_get_method) (class_name , "set_rim\0" . as_ptr () as * const c_char) ; table . set_rim_tint = (gd_api . godot_method_bind_get_method) (class_name , "set_rim_tint\0" . as_ptr () as * const c_char) ; table . set_roughness = (gd_api . godot_method_bind_get_method) (class_name , "set_roughness\0" . as_ptr () as * const c_char) ; table . set_roughness_texture_channel = (gd_api . godot_method_bind_get_method) (class_name , "set_roughness_texture_channel\0" . as_ptr () as * const c_char) ; table . set_specular = (gd_api . godot_method_bind_get_method) (class_name , "set_specular\0" . as_ptr () as * const c_char) ; table . set_specular_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_specular_mode\0" . as_ptr () as * const c_char) ; table . set_subsurface_scattering_strength = (gd_api . godot_method_bind_get_method) (class_name , "set_subsurface_scattering_strength\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_transmission = (gd_api . godot_method_bind_get_method) (class_name , "set_transmission\0" . as_ptr () as * const c_char) ; table . set_uv1_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_uv1_offset\0" . as_ptr () as * const c_char) ; table . set_uv1_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_uv1_scale\0" . as_ptr () as * const c_char) ; table . set_uv1_triplanar_blend_sharpness = (gd_api . godot_method_bind_get_method) (class_name , "set_uv1_triplanar_blend_sharpness\0" . as_ptr () as * const c_char) ; table . set_uv2_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_uv2_offset\0" . as_ptr () as * const c_char) ; table . set_uv2_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_uv2_scale\0" . as_ptr () as * const c_char) ; table . set_uv2_triplanar_blend_sharpness = (gd_api . godot_method_bind_get_method) (class_name , "set_uv2_triplanar_blend_sharpness\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::spatial_material::private::SpatialMaterial;
            
            pub(crate) mod spatial_velocity_tracker {
                # ! [doc = "This module contains types related to the API class [`SpatialVelocityTracker`][super::SpatialVelocityTracker]."] pub (crate) mod private { # [doc = "`core class SpatialVelocityTracker` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_spatialvelocitytracker.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSpatialVelocityTracker inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SpatialVelocityTracker { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SpatialVelocityTracker ; impl SpatialVelocityTracker { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SpatialVelocityTrackerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_tracked_linear_velocity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialVelocityTrackerMethodTable :: get (get_api ()) . get_tracked_linear_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn is_tracking_physics_step (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialVelocityTrackerMethodTable :: get (get_api ()) . is_tracking_physics_step ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn reset (& self , position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialVelocityTrackerMethodTable :: get (get_api ()) . reset ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_track_physics_step (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialVelocityTrackerMethodTable :: get (get_api ()) . set_track_physics_step ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn update_position (& self , position : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpatialVelocityTrackerMethodTable :: get (get_api ()) . update_position ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , position) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SpatialVelocityTracker { } unsafe impl GodotObject for SpatialVelocityTracker { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SpatialVelocityTracker" } } impl std :: ops :: Deref for SpatialVelocityTracker { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpatialVelocityTracker { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for SpatialVelocityTracker { } unsafe impl SubClass < crate :: generated :: Object > for SpatialVelocityTracker { } impl Instanciable for SpatialVelocityTracker { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { SpatialVelocityTracker :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SpatialVelocityTrackerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_tracked_linear_velocity : * mut sys :: godot_method_bind , pub is_tracking_physics_step : * mut sys :: godot_method_bind , pub reset : * mut sys :: godot_method_bind , pub set_track_physics_step : * mut sys :: godot_method_bind , pub update_position : * mut sys :: godot_method_bind } impl SpatialVelocityTrackerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SpatialVelocityTrackerMethodTable = SpatialVelocityTrackerMethodTable { class_constructor : None , get_tracked_linear_velocity : 0 as * mut sys :: godot_method_bind , is_tracking_physics_step : 0 as * mut sys :: godot_method_bind , reset : 0 as * mut sys :: godot_method_bind , set_track_physics_step : 0 as * mut sys :: godot_method_bind , update_position : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SpatialVelocityTrackerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SpatialVelocityTracker\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_tracked_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_tracked_linear_velocity\0" . as_ptr () as * const c_char) ; table . is_tracking_physics_step = (gd_api . godot_method_bind_get_method) (class_name , "is_tracking_physics_step\0" . as_ptr () as * const c_char) ; table . reset = (gd_api . godot_method_bind_get_method) (class_name , "reset\0" . as_ptr () as * const c_char) ; table . set_track_physics_step = (gd_api . godot_method_bind_get_method) (class_name , "set_track_physics_step\0" . as_ptr () as * const c_char) ; table . update_position = (gd_api . godot_method_bind_get_method) (class_name , "update_position\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::spatial_velocity_tracker::private::SpatialVelocityTracker;
            
            pub(crate) mod sphere_mesh {
                # ! [doc = "This module contains types related to the API class [`SphereMesh`][super::SphereMesh]."] pub (crate) mod private { # [doc = "`core class SphereMesh` inherits `PrimitiveMesh` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_spheremesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSphereMesh inherits methods from:\n - [PrimitiveMesh](struct.PrimitiveMesh.html)\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SphereMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SphereMesh ; impl SphereMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SphereMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Full height of the sphere."] # [doc = ""] # [inline] pub fn height (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, a hemisphere is created rather than a full sphere.\n**Note:** To get a regular hemisphere, the height and radius of the sphere must be equal."] # [doc = ""] # [inline] pub fn is_hemisphere (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . get_is_hemisphere ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Number of radial segments on the sphere."] # [doc = ""] # [inline] pub fn radial_segments (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . get_radial_segments ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Radius of sphere."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Number of segments along the height of the sphere."] # [doc = ""] # [inline] pub fn rings (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . get_rings ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Full height of the sphere."] # [doc = ""] # [inline] pub fn set_height (& self , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . set_height ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = "If `true`, a hemisphere is created rather than a full sphere.\n**Note:** To get a regular hemisphere, the height and radius of the sphere must be equal."] # [doc = ""] # [inline] pub fn set_is_hemisphere (& self , is_hemisphere : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . set_is_hemisphere ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , is_hemisphere as _) ; } } # [doc = "Number of radial segments on the sphere."] # [doc = ""] # [inline] pub fn set_radial_segments (& self , radial_segments : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . set_radial_segments ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , radial_segments as _) ; } } # [doc = "Radius of sphere."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = "Number of segments along the height of the sphere."] # [doc = ""] # [inline] pub fn set_rings (& self , rings : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereMeshMethodTable :: get (get_api ()) . set_rings ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , rings as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SphereMesh { } unsafe impl GodotObject for SphereMesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SphereMesh" } } impl std :: ops :: Deref for SphereMesh { type Target = crate :: generated :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SphereMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PrimitiveMesh > for SphereMesh { } unsafe impl SubClass < crate :: generated :: Mesh > for SphereMesh { } unsafe impl SubClass < crate :: generated :: Resource > for SphereMesh { } unsafe impl SubClass < crate :: generated :: Reference > for SphereMesh { } unsafe impl SubClass < crate :: generated :: Object > for SphereMesh { } impl Instanciable for SphereMesh { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { SphereMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SphereMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_height : * mut sys :: godot_method_bind , pub get_is_hemisphere : * mut sys :: godot_method_bind , pub get_radial_segments : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub get_rings : * mut sys :: godot_method_bind , pub set_height : * mut sys :: godot_method_bind , pub set_is_hemisphere : * mut sys :: godot_method_bind , pub set_radial_segments : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind , pub set_rings : * mut sys :: godot_method_bind } impl SphereMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SphereMeshMethodTable = SphereMeshMethodTable { class_constructor : None , get_height : 0 as * mut sys :: godot_method_bind , get_is_hemisphere : 0 as * mut sys :: godot_method_bind , get_radial_segments : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , get_rings : 0 as * mut sys :: godot_method_bind , set_height : 0 as * mut sys :: godot_method_bind , set_is_hemisphere : 0 as * mut sys :: godot_method_bind , set_radial_segments : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind , set_rings : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SphereMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SphereMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_is_hemisphere = (gd_api . godot_method_bind_get_method) (class_name , "get_is_hemisphere\0" . as_ptr () as * const c_char) ; table . get_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_radial_segments\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . get_rings = (gd_api . godot_method_bind_get_method) (class_name , "get_rings\0" . as_ptr () as * const c_char) ; table . set_height = (gd_api . godot_method_bind_get_method) (class_name , "set_height\0" . as_ptr () as * const c_char) ; table . set_is_hemisphere = (gd_api . godot_method_bind_get_method) (class_name , "set_is_hemisphere\0" . as_ptr () as * const c_char) ; table . set_radial_segments = (gd_api . godot_method_bind_get_method) (class_name , "set_radial_segments\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; table . set_rings = (gd_api . godot_method_bind_get_method) (class_name , "set_rings\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::sphere_mesh::private::SphereMesh;
            
            pub(crate) mod sphere_shape {
                # ! [doc = "This module contains types related to the API class [`SphereShape`][super::SphereShape]."] pub (crate) mod private { # [doc = "`core class SphereShape` inherits `Shape` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_sphereshape.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSphereShape inherits methods from:\n - [Shape](struct.Shape.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SphereShape { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SphereShape ; impl SphereShape { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SphereShapeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The sphere's radius. The shape's diameter is double the radius."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereShapeMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The sphere's radius. The shape's diameter is double the radius."] # [doc = ""] # [inline] pub fn set_radius (& self , radius : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SphereShapeMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SphereShape { } unsafe impl GodotObject for SphereShape { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SphereShape" } } impl std :: ops :: Deref for SphereShape { type Target = crate :: generated :: Shape ; # [inline] fn deref (& self) -> & crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SphereShape { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shape { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shape > for SphereShape { } unsafe impl SubClass < crate :: generated :: Resource > for SphereShape { } unsafe impl SubClass < crate :: generated :: Reference > for SphereShape { } unsafe impl SubClass < crate :: generated :: Object > for SphereShape { } impl Instanciable for SphereShape { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { SphereShape :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SphereShapeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_radius : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind } impl SphereShapeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SphereShapeMethodTable = SphereShapeMethodTable { class_constructor : None , get_radius : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SphereShapeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SphereShape\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::sphere_shape::private::SphereShape;
            
            pub(crate) mod spin_box {
                # ! [doc = "This module contains types related to the API class [`SpinBox`][super::SpinBox]."] pub (crate) mod private { # [doc = "`core class SpinBox` inherits `Range` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_spinbox.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`SpinBox` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<SpinBox>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSpinBox inherits methods from:\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SpinBox { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SpinBox ; impl SpinBox { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SpinBoxMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Applies the current value of this [`SpinBox`][SpinBox]."] # [doc = ""] # [inline] pub fn apply (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . apply ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets the text alignment of the [`SpinBox`][SpinBox]."] # [doc = ""] # [inline] pub fn align (& self) -> crate :: generated :: line_edit :: Align { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . get_align ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: line_edit :: Align > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`LineEdit`][LineEdit] instance from this [`SpinBox`][SpinBox]. You can use it to access properties and methods of [`LineEdit`][LineEdit].\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_line_edit (& self) -> Option < Ref < crate :: generated :: LineEdit , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . get_line_edit ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: LineEdit , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Adds the specified `prefix` string before the numerical value of the [`SpinBox`][SpinBox]."] # [doc = ""] # [inline] pub fn prefix (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . get_prefix ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Adds the specified `suffix` string after the numerical value of the [`SpinBox`][SpinBox]."] # [doc = ""] # [inline] pub fn suffix (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . get_suffix ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the [`SpinBox`][SpinBox] will be editable. Otherwise, it will be read only."] # [doc = ""] # [inline] pub fn is_editable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . is_editable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets the text alignment of the [`SpinBox`][SpinBox]."] # [doc = ""] # [inline] pub fn set_align (& self , align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . set_align ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , align as _) ; } } # [doc = "If `true`, the [`SpinBox`][SpinBox] will be editable. Otherwise, it will be read only."] # [doc = ""] # [inline] pub fn set_editable (& self , editable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . set_editable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , editable as _) ; } } # [doc = "Adds the specified `prefix` string before the numerical value of the [`SpinBox`][SpinBox]."] # [doc = ""] # [inline] pub fn set_prefix (& self , prefix : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . set_prefix ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , prefix . into ()) ; } } # [doc = "Adds the specified `suffix` string after the numerical value of the [`SpinBox`][SpinBox]."] # [doc = ""] # [inline] pub fn set_suffix (& self , suffix : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpinBoxMethodTable :: get (get_api ()) . set_suffix ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , suffix . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SpinBox { } unsafe impl GodotObject for SpinBox { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SpinBox" } } impl QueueFree for SpinBox { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for SpinBox { type Target = crate :: generated :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpinBox { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Range > for SpinBox { } unsafe impl SubClass < crate :: generated :: Control > for SpinBox { } unsafe impl SubClass < crate :: generated :: CanvasItem > for SpinBox { } unsafe impl SubClass < crate :: generated :: Node > for SpinBox { } unsafe impl SubClass < crate :: generated :: Object > for SpinBox { } impl Instanciable for SpinBox { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { SpinBox :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SpinBoxMethodTable { pub class_constructor : sys :: godot_class_constructor , pub apply : * mut sys :: godot_method_bind , pub get_align : * mut sys :: godot_method_bind , pub get_line_edit : * mut sys :: godot_method_bind , pub get_prefix : * mut sys :: godot_method_bind , pub get_suffix : * mut sys :: godot_method_bind , pub is_editable : * mut sys :: godot_method_bind , pub set_align : * mut sys :: godot_method_bind , pub set_editable : * mut sys :: godot_method_bind , pub set_prefix : * mut sys :: godot_method_bind , pub set_suffix : * mut sys :: godot_method_bind } impl SpinBoxMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SpinBoxMethodTable = SpinBoxMethodTable { class_constructor : None , apply : 0 as * mut sys :: godot_method_bind , get_align : 0 as * mut sys :: godot_method_bind , get_line_edit : 0 as * mut sys :: godot_method_bind , get_prefix : 0 as * mut sys :: godot_method_bind , get_suffix : 0 as * mut sys :: godot_method_bind , is_editable : 0 as * mut sys :: godot_method_bind , set_align : 0 as * mut sys :: godot_method_bind , set_editable : 0 as * mut sys :: godot_method_bind , set_prefix : 0 as * mut sys :: godot_method_bind , set_suffix : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SpinBoxMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SpinBox\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . apply = (gd_api . godot_method_bind_get_method) (class_name , "apply\0" . as_ptr () as * const c_char) ; table . get_align = (gd_api . godot_method_bind_get_method) (class_name , "get_align\0" . as_ptr () as * const c_char) ; table . get_line_edit = (gd_api . godot_method_bind_get_method) (class_name , "get_line_edit\0" . as_ptr () as * const c_char) ; table . get_prefix = (gd_api . godot_method_bind_get_method) (class_name , "get_prefix\0" . as_ptr () as * const c_char) ; table . get_suffix = (gd_api . godot_method_bind_get_method) (class_name , "get_suffix\0" . as_ptr () as * const c_char) ; table . is_editable = (gd_api . godot_method_bind_get_method) (class_name , "is_editable\0" . as_ptr () as * const c_char) ; table . set_align = (gd_api . godot_method_bind_get_method) (class_name , "set_align\0" . as_ptr () as * const c_char) ; table . set_editable = (gd_api . godot_method_bind_get_method) (class_name , "set_editable\0" . as_ptr () as * const c_char) ; table . set_prefix = (gd_api . godot_method_bind_get_method) (class_name , "set_prefix\0" . as_ptr () as * const c_char) ; table . set_suffix = (gd_api . godot_method_bind_get_method) (class_name , "set_suffix\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::spin_box::private::SpinBox;
            
            pub mod split_container {
                # ! [doc = "This module contains types related to the API class [`SplitContainer`][super::SplitContainer]."] pub (crate) mod private { # [doc = "`core class SplitContainer` inherits `Container` (manually managed).\n\nThis class has related types in the [`split_container`][super::split_container] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_splitcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nSplitContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SplitContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SplitContainer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DraggerVisibility (pub i64) ; impl DraggerVisibility { pub const VISIBLE : DraggerVisibility = DraggerVisibility (0i64) ; pub const HIDDEN : DraggerVisibility = DraggerVisibility (1i64) ; pub const HIDDEN_COLLAPSED : DraggerVisibility = DraggerVisibility (2i64) ; } impl From < i64 > for DraggerVisibility { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DraggerVisibility > for i64 { # [inline] fn from (v : DraggerVisibility) -> Self { v . 0 } } impl FromVariant for DraggerVisibility { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SplitContainer { pub const DRAGGER_VISIBLE : i64 = 0i64 ; pub const DRAGGER_HIDDEN : i64 = 1i64 ; pub const DRAGGER_HIDDEN_COLLAPSED : i64 = 2i64 ; } impl SplitContainer { # [doc = "Clamps the [`split_offset`][Self::split_offset] value to not go outside the currently possible minimal and maximum values."] # [doc = ""] # [inline] pub fn clamp_split_offset (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SplitContainerMethodTable :: get (get_api ()) . clamp_split_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Determines the dragger's visibility. See [`DraggerVisibility`][DraggerVisibility] for details."] # [doc = ""] # [inline] pub fn dragger_visibility (& self) -> crate :: generated :: split_container :: DraggerVisibility { unsafe { let method_bind : * mut sys :: godot_method_bind = SplitContainerMethodTable :: get (get_api ()) . get_dragger_visibility ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: split_container :: DraggerVisibility > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The initial offset of the splitting between the two [`Control`][Control]s, with `0` being at the end of the first [`Control`][Control]."] # [doc = ""] # [inline] pub fn split_offset (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SplitContainerMethodTable :: get (get_api ()) . get_split_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the area of the first [`Control`][Control] will be collapsed and the dragger will be disabled."] # [doc = ""] # [inline] pub fn is_collapsed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SplitContainerMethodTable :: get (get_api ()) . is_collapsed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the area of the first [`Control`][Control] will be collapsed and the dragger will be disabled."] # [doc = ""] # [inline] pub fn set_collapsed (& self , collapsed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SplitContainerMethodTable :: get (get_api ()) . set_collapsed ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , collapsed as _) ; } } # [doc = "Determines the dragger's visibility. See [`DraggerVisibility`][DraggerVisibility] for details."] # [doc = ""] # [inline] pub fn set_dragger_visibility (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SplitContainerMethodTable :: get (get_api ()) . set_dragger_visibility ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The initial offset of the splitting between the two [`Control`][Control]s, with `0` being at the end of the first [`Control`][Control]."] # [doc = ""] # [inline] pub fn set_split_offset (& self , offset : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SplitContainerMethodTable :: get (get_api ()) . set_split_offset ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , offset as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SplitContainer { } unsafe impl GodotObject for SplitContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SplitContainer" } } impl QueueFree for SplitContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for SplitContainer { type Target = crate :: generated :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SplitContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Container > for SplitContainer { } unsafe impl SubClass < crate :: generated :: Control > for SplitContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for SplitContainer { } unsafe impl SubClass < crate :: generated :: Node > for SplitContainer { } unsafe impl SubClass < crate :: generated :: Object > for SplitContainer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SplitContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clamp_split_offset : * mut sys :: godot_method_bind , pub get_dragger_visibility : * mut sys :: godot_method_bind , pub get_split_offset : * mut sys :: godot_method_bind , pub is_collapsed : * mut sys :: godot_method_bind , pub set_collapsed : * mut sys :: godot_method_bind , pub set_dragger_visibility : * mut sys :: godot_method_bind , pub set_split_offset : * mut sys :: godot_method_bind } impl SplitContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SplitContainerMethodTable = SplitContainerMethodTable { class_constructor : None , clamp_split_offset : 0 as * mut sys :: godot_method_bind , get_dragger_visibility : 0 as * mut sys :: godot_method_bind , get_split_offset : 0 as * mut sys :: godot_method_bind , is_collapsed : 0 as * mut sys :: godot_method_bind , set_collapsed : 0 as * mut sys :: godot_method_bind , set_dragger_visibility : 0 as * mut sys :: godot_method_bind , set_split_offset : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SplitContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SplitContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clamp_split_offset = (gd_api . godot_method_bind_get_method) (class_name , "clamp_split_offset\0" . as_ptr () as * const c_char) ; table . get_dragger_visibility = (gd_api . godot_method_bind_get_method) (class_name , "get_dragger_visibility\0" . as_ptr () as * const c_char) ; table . get_split_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_split_offset\0" . as_ptr () as * const c_char) ; table . is_collapsed = (gd_api . godot_method_bind_get_method) (class_name , "is_collapsed\0" . as_ptr () as * const c_char) ; table . set_collapsed = (gd_api . godot_method_bind_get_method) (class_name , "set_collapsed\0" . as_ptr () as * const c_char) ; table . set_dragger_visibility = (gd_api . godot_method_bind_get_method) (class_name , "set_dragger_visibility\0" . as_ptr () as * const c_char) ; table . set_split_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_split_offset\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::split_container::private::SplitContainer;
            
            pub(crate) mod spot_light {
                # ! [doc = "This module contains types related to the API class [`SpotLight`][super::SpotLight]."] pub (crate) mod private { # [doc = "`core class SpotLight` inherits `Light` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_spotlight.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`SpotLight` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<SpotLight>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSpotLight inherits methods from:\n - [Light](struct.Light.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SpotLight { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SpotLight ; impl SpotLight { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SpotLightMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for SpotLight { } unsafe impl GodotObject for SpotLight { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SpotLight" } } impl QueueFree for SpotLight { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for SpotLight { type Target = crate :: generated :: Light ; # [inline] fn deref (& self) -> & crate :: generated :: Light { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpotLight { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Light { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Light > for SpotLight { } unsafe impl SubClass < crate :: generated :: VisualInstance > for SpotLight { } unsafe impl SubClass < crate :: generated :: CullInstance > for SpotLight { } unsafe impl SubClass < crate :: generated :: Spatial > for SpotLight { } unsafe impl SubClass < crate :: generated :: Node > for SpotLight { } unsafe impl SubClass < crate :: generated :: Object > for SpotLight { } impl Instanciable for SpotLight { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { SpotLight :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SpotLightMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl SpotLightMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SpotLightMethodTable = SpotLightMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SpotLightMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SpotLight\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::spot_light::private::SpotLight;
            
            pub(crate) mod spring_arm {
                # ! [doc = "This module contains types related to the API class [`SpringArm`][super::SpringArm]."] pub (crate) mod private { # [doc = "`core class SpringArm` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_springarm.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`SpringArm` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<SpringArm>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSpringArm inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SpringArm { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SpringArm ; impl SpringArm { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SpringArmMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds the [`PhysicsBody`][PhysicsBody] object with the given [`RID`][Rid] to the list of [`PhysicsBody`][PhysicsBody] objects excluded from the collision check."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn add_excluded_object (& self , RID : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . add_excluded_object ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , RID) ; } } # [doc = "Clears the list of [`PhysicsBody`][PhysicsBody] objects excluded from the collision check."] # [doc = ""] # [inline] pub fn clear_excluded_objects (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . clear_excluded_objects ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The layers against which the collision check shall be done. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the spring arm's current length."] # [doc = ""] # [inline] pub fn get_hit_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . get_hit_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum extent of the SpringArm. This is used as a length for both the ray and the shape cast used internally to calculate the desired position of the SpringArm's child nodes.\nTo know more about how to perform a shape cast or a ray cast, please consult the [`PhysicsDirectSpaceState`][PhysicsDirectSpaceState] documentation."] # [doc = ""] # [inline] pub fn length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . get_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "When the collision check is made, a candidate length for the SpringArm is given.\nThe margin is then subtracted to this length and the translation is applied to the child objects of the SpringArm.\nThis margin is useful for when the SpringArm has a [`Camera`][Camera] as a child node: without the margin, the [`Camera`][Camera] would be placed on the exact point of collision, while with the margin the [`Camera`][Camera] would be placed close to the point of collision."] # [doc = ""] # [inline] pub fn margin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The [`Shape`][Shape] to use for the SpringArm.\nWhen the shape is set, the SpringArm will cast the [`Shape`][Shape] on its z axis instead of performing a ray cast."] # [doc = ""] # [inline] pub fn shape (& self) -> Option < Ref < crate :: generated :: Shape , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . get_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Shape , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Removes the given [`RID`][Rid] from the list of [`PhysicsBody`][PhysicsBody] objects excluded from the collision check."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn remove_excluded_object (& self , RID : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . remove_excluded_object ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , RID) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The layers against which the collision check shall be done. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "The maximum extent of the SpringArm. This is used as a length for both the ray and the shape cast used internally to calculate the desired position of the SpringArm's child nodes.\nTo know more about how to perform a shape cast or a ray cast, please consult the [`PhysicsDirectSpaceState`][PhysicsDirectSpaceState] documentation."] # [doc = ""] # [inline] pub fn set_length (& self , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . set_length ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , length as _) ; } } # [doc = "When the collision check is made, a candidate length for the SpringArm is given.\nThe margin is then subtracted to this length and the translation is applied to the child objects of the SpringArm.\nThis margin is useful for when the SpringArm has a [`Camera`][Camera] as a child node: without the margin, the [`Camera`][Camera] would be placed on the exact point of collision, while with the margin the [`Camera`][Camera] would be placed close to the point of collision."] # [doc = ""] # [inline] pub fn set_margin (& self , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . set_margin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; } } # [doc = "The [`Shape`][Shape] to use for the SpringArm.\nWhen the shape is set, the SpringArm will cast the [`Shape`][Shape] on its z axis instead of performing a ray cast."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: Shape >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpringArmMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SpringArm { } unsafe impl GodotObject for SpringArm { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SpringArm" } } impl QueueFree for SpringArm { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for SpringArm { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpringArm { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for SpringArm { } unsafe impl SubClass < crate :: generated :: Node > for SpringArm { } unsafe impl SubClass < crate :: generated :: Object > for SpringArm { } impl Instanciable for SpringArm { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { SpringArm :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SpringArmMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_excluded_object : * mut sys :: godot_method_bind , pub clear_excluded_objects : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_hit_length : * mut sys :: godot_method_bind , pub get_length : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub get_shape : * mut sys :: godot_method_bind , pub remove_excluded_object : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_length : * mut sys :: godot_method_bind , pub set_margin : * mut sys :: godot_method_bind , pub set_shape : * mut sys :: godot_method_bind } impl SpringArmMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SpringArmMethodTable = SpringArmMethodTable { class_constructor : None , add_excluded_object : 0 as * mut sys :: godot_method_bind , clear_excluded_objects : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_hit_length : 0 as * mut sys :: godot_method_bind , get_length : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , get_shape : 0 as * mut sys :: godot_method_bind , remove_excluded_object : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_length : 0 as * mut sys :: godot_method_bind , set_margin : 0 as * mut sys :: godot_method_bind , set_shape : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SpringArmMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SpringArm\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_excluded_object = (gd_api . godot_method_bind_get_method) (class_name , "add_excluded_object\0" . as_ptr () as * const c_char) ; table . clear_excluded_objects = (gd_api . godot_method_bind_get_method) (class_name , "clear_excluded_objects\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_hit_length = (gd_api . godot_method_bind_get_method) (class_name , "get_hit_length\0" . as_ptr () as * const c_char) ; table . get_length = (gd_api . godot_method_bind_get_method) (class_name , "get_length\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . get_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_shape\0" . as_ptr () as * const c_char) ; table . remove_excluded_object = (gd_api . godot_method_bind_get_method) (class_name , "remove_excluded_object\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_length = (gd_api . godot_method_bind_get_method) (class_name , "set_length\0" . as_ptr () as * const c_char) ; table . set_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_margin\0" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::spring_arm::private::SpringArm;
            
            pub(crate) mod sprite {
                # ! [doc = "This module contains types related to the API class [`Sprite`][super::Sprite]."] pub (crate) mod private { # [doc = "`core class Sprite` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_sprite.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Sprite` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Sprite>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSprite inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Sprite { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Sprite ; impl Sprite { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SpriteMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Current frame to display from sprite sheet. [`hframes`][Self::hframes] or [`vframes`][Self::vframes] must be greater than 1."] # [doc = ""] # [inline] pub fn frame (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . get_frame ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Coordinates of the frame to display from sprite sheet. This is as an alias for the [`frame`][Self::frame] property. [`hframes`][Self::hframes] or [`vframes`][Self::vframes] must be greater than 1."] # [doc = ""] # [inline] pub fn frame_coords (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . get_frame_coords ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The number of columns in the sprite sheet."] # [doc = ""] # [inline] pub fn hframes (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . get_hframes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The normal map gives depth to the Sprite.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normal_map (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . get_normal_map ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The texture's drawing offset."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns a [`Rect2`][Rect2] representing the Sprite's boundary in local coordinates. Can be used to detect if the Sprite was clicked. Example:\n```gdscript\nfunc _input(event):\n    if event is InputEventMouseButton and event.pressed and event.button_index == BUTTON_LEFT:\n        if get_rect().has_point(to_local(event.position)):\n            print(\"A click!\")\n```"] # [doc = ""] # [inline] pub fn get_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . get_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The region of the atlas texture to display. [`region_enabled`][Self::region_enabled] must be `true`."] # [doc = ""] # [inline] pub fn region_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . get_region_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "[`Texture`][Texture] object to draw."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The number of rows in the sprite sheet."] # [doc = ""] # [inline] pub fn vframes (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . get_vframes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, texture is centered."] # [doc = ""] # [inline] pub fn is_centered (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . is_centered ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn is_flipped_h (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . is_flipped_h ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn is_flipped_v (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . is_flipped_v ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true`, if the pixel at the given position is opaque and `false` in other case.\n**Note:** It also returns `false`, if the sprite's texture is `null` or if the given position is invalid."] # [doc = ""] # [inline] pub fn is_pixel_opaque (& self , pos : Vector2) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . is_pixel_opaque ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , pos) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, texture is cut from a larger atlas texture. See [`region_rect`][Self::region_rect]."] # [doc = ""] # [inline] pub fn is_region (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . is_region ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the outermost pixels get blurred out."] # [doc = ""] # [inline] pub fn is_region_filter_clip_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . is_region_filter_clip_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, texture is centered."] # [doc = ""] # [inline] pub fn set_centered (& self , centered : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . set_centered ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , centered as _) ; } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn set_flip_h (& self , flip_h : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . set_flip_h ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , flip_h as _) ; } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn set_flip_v (& self , flip_v : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . set_flip_v ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , flip_v as _) ; } } # [doc = "Current frame to display from sprite sheet. [`hframes`][Self::hframes] or [`vframes`][Self::vframes] must be greater than 1."] # [doc = ""] # [inline] pub fn set_frame (& self , frame : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . set_frame ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , frame as _) ; } } # [doc = "Coordinates of the frame to display from sprite sheet. This is as an alias for the [`frame`][Self::frame] property. [`hframes`][Self::hframes] or [`vframes`][Self::vframes] must be greater than 1."] # [doc = ""] # [inline] pub fn set_frame_coords (& self , coords : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . set_frame_coords ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , coords) ; } } # [doc = "The number of columns in the sprite sheet."] # [doc = ""] # [inline] pub fn set_hframes (& self , hframes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . set_hframes ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , hframes as _) ; } } # [doc = "The normal map gives depth to the Sprite.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn set_normal_map (& self , normal_map : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . set_normal_map ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , normal_map . as_arg_ptr ()) ; } } # [doc = "The texture's drawing offset."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "If `true`, texture is cut from a larger atlas texture. See [`region_rect`][Self::region_rect]."] # [doc = ""] # [inline] pub fn set_region (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . set_region ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, the outermost pixels get blurred out."] # [doc = ""] # [inline] pub fn set_region_filter_clip (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . set_region_filter_clip ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The region of the atlas texture to display. [`region_enabled`][Self::region_enabled] must be `true`."] # [doc = ""] # [inline] pub fn set_region_rect (& self , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . set_region_rect ; let ret = crate :: icalls :: icallvar__rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; } } # [doc = "[`Texture`][Texture] object to draw."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "The number of rows in the sprite sheet."] # [doc = ""] # [inline] pub fn set_vframes (& self , vframes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteMethodTable :: get (get_api ()) . set_vframes ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , vframes as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Sprite { } unsafe impl GodotObject for Sprite { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Sprite" } } impl QueueFree for Sprite { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Sprite { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Sprite { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for Sprite { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Sprite { } unsafe impl SubClass < crate :: generated :: Node > for Sprite { } unsafe impl SubClass < crate :: generated :: Object > for Sprite { } impl Instanciable for Sprite { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Sprite :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SpriteMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_frame : * mut sys :: godot_method_bind , pub get_frame_coords : * mut sys :: godot_method_bind , pub get_hframes : * mut sys :: godot_method_bind , pub get_normal_map : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_rect : * mut sys :: godot_method_bind , pub get_region_rect : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_vframes : * mut sys :: godot_method_bind , pub is_centered : * mut sys :: godot_method_bind , pub is_flipped_h : * mut sys :: godot_method_bind , pub is_flipped_v : * mut sys :: godot_method_bind , pub is_pixel_opaque : * mut sys :: godot_method_bind , pub is_region : * mut sys :: godot_method_bind , pub is_region_filter_clip_enabled : * mut sys :: godot_method_bind , pub set_centered : * mut sys :: godot_method_bind , pub set_flip_h : * mut sys :: godot_method_bind , pub set_flip_v : * mut sys :: godot_method_bind , pub set_frame : * mut sys :: godot_method_bind , pub set_frame_coords : * mut sys :: godot_method_bind , pub set_hframes : * mut sys :: godot_method_bind , pub set_normal_map : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_region : * mut sys :: godot_method_bind , pub set_region_filter_clip : * mut sys :: godot_method_bind , pub set_region_rect : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_vframes : * mut sys :: godot_method_bind } impl SpriteMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SpriteMethodTable = SpriteMethodTable { class_constructor : None , get_frame : 0 as * mut sys :: godot_method_bind , get_frame_coords : 0 as * mut sys :: godot_method_bind , get_hframes : 0 as * mut sys :: godot_method_bind , get_normal_map : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_rect : 0 as * mut sys :: godot_method_bind , get_region_rect : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_vframes : 0 as * mut sys :: godot_method_bind , is_centered : 0 as * mut sys :: godot_method_bind , is_flipped_h : 0 as * mut sys :: godot_method_bind , is_flipped_v : 0 as * mut sys :: godot_method_bind , is_pixel_opaque : 0 as * mut sys :: godot_method_bind , is_region : 0 as * mut sys :: godot_method_bind , is_region_filter_clip_enabled : 0 as * mut sys :: godot_method_bind , set_centered : 0 as * mut sys :: godot_method_bind , set_flip_h : 0 as * mut sys :: godot_method_bind , set_flip_v : 0 as * mut sys :: godot_method_bind , set_frame : 0 as * mut sys :: godot_method_bind , set_frame_coords : 0 as * mut sys :: godot_method_bind , set_hframes : 0 as * mut sys :: godot_method_bind , set_normal_map : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_region : 0 as * mut sys :: godot_method_bind , set_region_filter_clip : 0 as * mut sys :: godot_method_bind , set_region_rect : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_vframes : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SpriteMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Sprite\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\0" . as_ptr () as * const c_char) ; table . get_frame_coords = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_coords\0" . as_ptr () as * const c_char) ; table . get_hframes = (gd_api . godot_method_bind_get_method) (class_name , "get_hframes\0" . as_ptr () as * const c_char) ; table . get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_map\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_rect\0" . as_ptr () as * const c_char) ; table . get_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_region_rect\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_vframes = (gd_api . godot_method_bind_get_method) (class_name , "get_vframes\0" . as_ptr () as * const c_char) ; table . is_centered = (gd_api . godot_method_bind_get_method) (class_name , "is_centered\0" . as_ptr () as * const c_char) ; table . is_flipped_h = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_h\0" . as_ptr () as * const c_char) ; table . is_flipped_v = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_v\0" . as_ptr () as * const c_char) ; table . is_pixel_opaque = (gd_api . godot_method_bind_get_method) (class_name , "is_pixel_opaque\0" . as_ptr () as * const c_char) ; table . is_region = (gd_api . godot_method_bind_get_method) (class_name , "is_region\0" . as_ptr () as * const c_char) ; table . is_region_filter_clip_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_region_filter_clip_enabled\0" . as_ptr () as * const c_char) ; table . set_centered = (gd_api . godot_method_bind_get_method) (class_name , "set_centered\0" . as_ptr () as * const c_char) ; table . set_flip_h = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_h\0" . as_ptr () as * const c_char) ; table . set_flip_v = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_v\0" . as_ptr () as * const c_char) ; table . set_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_frame\0" . as_ptr () as * const c_char) ; table . set_frame_coords = (gd_api . godot_method_bind_get_method) (class_name , "set_frame_coords\0" . as_ptr () as * const c_char) ; table . set_hframes = (gd_api . godot_method_bind_get_method) (class_name , "set_hframes\0" . as_ptr () as * const c_char) ; table . set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_map\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_region = (gd_api . godot_method_bind_get_method) (class_name , "set_region\0" . as_ptr () as * const c_char) ; table . set_region_filter_clip = (gd_api . godot_method_bind_get_method) (class_name , "set_region_filter_clip\0" . as_ptr () as * const c_char) ; table . set_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_region_rect\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_vframes = (gd_api . godot_method_bind_get_method) (class_name , "set_vframes\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::sprite::private::Sprite;
            
            pub(crate) mod sprite_3d {
                # ! [doc = "This module contains types related to the API class [`Sprite3D`][super::Sprite3D]."] pub (crate) mod private { # [doc = "`core class Sprite3D` inherits `SpriteBase3D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_sprite3d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Sprite3D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Sprite3D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nSprite3D inherits methods from:\n - [SpriteBase3D](struct.SpriteBase3D.html)\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Sprite3D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Sprite3D ; impl Sprite3D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Sprite3DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Current frame to display from sprite sheet. [`hframes`][Self::hframes] or [`vframes`][Self::vframes] must be greater than 1."] # [doc = ""] # [inline] pub fn frame (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . get_frame ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Coordinates of the frame to display from sprite sheet. This is as an alias for the [`frame`][Self::frame] property. [`hframes`][Self::hframes] or [`vframes`][Self::vframes] must be greater than 1."] # [doc = ""] # [inline] pub fn frame_coords (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . get_frame_coords ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The number of columns in the sprite sheet."] # [doc = ""] # [inline] pub fn hframes (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . get_hframes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The region of the atlas texture to display. [`region_enabled`][Self::region_enabled] must be `true`."] # [doc = ""] # [inline] pub fn region_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . get_region_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "[`Texture`][Texture] object to draw. If [`GeometryInstance.material_override`][GeometryInstance::material_override] is used, this will be overridden. The size information is still used."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The number of rows in the sprite sheet."] # [doc = ""] # [inline] pub fn vframes (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . get_vframes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, texture will be cut from a larger atlas texture. See [`region_rect`][Self::region_rect]."] # [doc = ""] # [inline] pub fn is_region (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . is_region ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Current frame to display from sprite sheet. [`hframes`][Self::hframes] or [`vframes`][Self::vframes] must be greater than 1."] # [doc = ""] # [inline] pub fn set_frame (& self , frame : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . set_frame ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , frame as _) ; } } # [doc = "Coordinates of the frame to display from sprite sheet. This is as an alias for the [`frame`][Self::frame] property. [`hframes`][Self::hframes] or [`vframes`][Self::vframes] must be greater than 1."] # [doc = ""] # [inline] pub fn set_frame_coords (& self , coords : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . set_frame_coords ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , coords) ; } } # [doc = "The number of columns in the sprite sheet."] # [doc = ""] # [inline] pub fn set_hframes (& self , hframes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . set_hframes ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , hframes as _) ; } } # [doc = "If `true`, texture will be cut from a larger atlas texture. See [`region_rect`][Self::region_rect]."] # [doc = ""] # [inline] pub fn set_region (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . set_region ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The region of the atlas texture to display. [`region_enabled`][Self::region_enabled] must be `true`."] # [doc = ""] # [inline] pub fn set_region_rect (& self , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . set_region_rect ; let ret = crate :: icalls :: icallvar__rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; } } # [doc = "[`Texture`][Texture] object to draw. If [`GeometryInstance.material_override`][GeometryInstance::material_override] is used, this will be overridden. The size information is still used."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "The number of rows in the sprite sheet."] # [doc = ""] # [inline] pub fn set_vframes (& self , vframes : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Sprite3DMethodTable :: get (get_api ()) . set_vframes ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , vframes as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Sprite3D { } unsafe impl GodotObject for Sprite3D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Sprite3D" } } impl QueueFree for Sprite3D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Sprite3D { type Target = crate :: generated :: SpriteBase3D ; # [inline] fn deref (& self) -> & crate :: generated :: SpriteBase3D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Sprite3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: SpriteBase3D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: SpriteBase3D > for Sprite3D { } unsafe impl SubClass < crate :: generated :: GeometryInstance > for Sprite3D { } unsafe impl SubClass < crate :: generated :: VisualInstance > for Sprite3D { } unsafe impl SubClass < crate :: generated :: CullInstance > for Sprite3D { } unsafe impl SubClass < crate :: generated :: Spatial > for Sprite3D { } unsafe impl SubClass < crate :: generated :: Node > for Sprite3D { } unsafe impl SubClass < crate :: generated :: Object > for Sprite3D { } impl Instanciable for Sprite3D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Sprite3D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Sprite3DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_frame : * mut sys :: godot_method_bind , pub get_frame_coords : * mut sys :: godot_method_bind , pub get_hframes : * mut sys :: godot_method_bind , pub get_region_rect : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_vframes : * mut sys :: godot_method_bind , pub is_region : * mut sys :: godot_method_bind , pub set_frame : * mut sys :: godot_method_bind , pub set_frame_coords : * mut sys :: godot_method_bind , pub set_hframes : * mut sys :: godot_method_bind , pub set_region : * mut sys :: godot_method_bind , pub set_region_rect : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_vframes : * mut sys :: godot_method_bind } impl Sprite3DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Sprite3DMethodTable = Sprite3DMethodTable { class_constructor : None , get_frame : 0 as * mut sys :: godot_method_bind , get_frame_coords : 0 as * mut sys :: godot_method_bind , get_hframes : 0 as * mut sys :: godot_method_bind , get_region_rect : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_vframes : 0 as * mut sys :: godot_method_bind , is_region : 0 as * mut sys :: godot_method_bind , set_frame : 0 as * mut sys :: godot_method_bind , set_frame_coords : 0 as * mut sys :: godot_method_bind , set_hframes : 0 as * mut sys :: godot_method_bind , set_region : 0 as * mut sys :: godot_method_bind , set_region_rect : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_vframes : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Sprite3DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Sprite3D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\0" . as_ptr () as * const c_char) ; table . get_frame_coords = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_coords\0" . as_ptr () as * const c_char) ; table . get_hframes = (gd_api . godot_method_bind_get_method) (class_name , "get_hframes\0" . as_ptr () as * const c_char) ; table . get_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_region_rect\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_vframes = (gd_api . godot_method_bind_get_method) (class_name , "get_vframes\0" . as_ptr () as * const c_char) ; table . is_region = (gd_api . godot_method_bind_get_method) (class_name , "is_region\0" . as_ptr () as * const c_char) ; table . set_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_frame\0" . as_ptr () as * const c_char) ; table . set_frame_coords = (gd_api . godot_method_bind_get_method) (class_name , "set_frame_coords\0" . as_ptr () as * const c_char) ; table . set_hframes = (gd_api . godot_method_bind_get_method) (class_name , "set_hframes\0" . as_ptr () as * const c_char) ; table . set_region = (gd_api . godot_method_bind_get_method) (class_name , "set_region\0" . as_ptr () as * const c_char) ; table . set_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_region_rect\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_vframes = (gd_api . godot_method_bind_get_method) (class_name , "set_vframes\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::sprite_3d::private::Sprite3D;
            
            pub mod sprite_base_3d {
                # ! [doc = "This module contains types related to the API class [`SpriteBase3D`][super::SpriteBase3D]."] pub (crate) mod private { # [doc = "`core class SpriteBase3D` inherits `GeometryInstance` (manually managed).\n\nThis class has related types in the [`sprite_base_3d`][super::sprite_base_3d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_spritebase3d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nSpriteBase3D inherits methods from:\n - [GeometryInstance](struct.GeometryInstance.html)\n - [VisualInstance](struct.VisualInstance.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SpriteBase3D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SpriteBase3D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AlphaCutMode (pub i64) ; impl AlphaCutMode { pub const DISABLED : AlphaCutMode = AlphaCutMode (0i64) ; pub const DISCARD : AlphaCutMode = AlphaCutMode (1i64) ; pub const OPAQUE_PREPASS : AlphaCutMode = AlphaCutMode (2i64) ; } impl From < i64 > for AlphaCutMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AlphaCutMode > for i64 { # [inline] fn from (v : AlphaCutMode) -> Self { v . 0 } } impl FromVariant for AlphaCutMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DrawFlags (pub i64) ; impl DrawFlags { pub const TRANSPARENT : DrawFlags = DrawFlags (0i64) ; pub const SHADED : DrawFlags = DrawFlags (1i64) ; pub const DOUBLE_SIDED : DrawFlags = DrawFlags (2i64) ; pub const DISABLE_DEPTH_TEST : DrawFlags = DrawFlags (3i64) ; pub const FIXED_SIZE : DrawFlags = DrawFlags (4i64) ; pub const MAX : DrawFlags = DrawFlags (5i64) ; } impl From < i64 > for DrawFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DrawFlags > for i64 { # [inline] fn from (v : DrawFlags) -> Self { v . 0 } } impl FromVariant for DrawFlags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl SpriteBase3D { pub const ALPHA_CUT_DISABLED : i64 = 0i64 ; pub const FLAG_TRANSPARENT : i64 = 0i64 ; pub const ALPHA_CUT_DISCARD : i64 = 1i64 ; pub const FLAG_SHADED : i64 = 1i64 ; pub const ALPHA_CUT_OPAQUE_PREPASS : i64 = 2i64 ; pub const FLAG_DOUBLE_SIDED : i64 = 2i64 ; pub const FLAG_DISABLE_DEPTH_TEST : i64 = 3i64 ; pub const FLAG_FIXED_SIZE : i64 = 4i64 ; pub const FLAG_MAX : i64 = 5i64 ; } impl SpriteBase3D { # [doc = ""] # [doc = ""] # [inline] pub fn generate_triangle_mesh (& self) -> Option < Ref < crate :: generated :: TriangleMesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . generate_triangle_mesh ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: TriangleMesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn alpha_cut_mode (& self) -> crate :: generated :: sprite_base_3d :: AlphaCutMode { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_alpha_cut_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: sprite_base_3d :: AlphaCutMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The direction in which the front of the texture faces."] # [doc = ""] # [inline] pub fn axis (& self) -> Axis { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_axis ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; unsafe { mem :: transmute :: < u32 , Axis > (u32 :: from_variant (& ret) . expect ("Unexpected variant type") as _) } } } # [doc = ""] # [doc = ""] # [inline] pub fn billboard_mode (& self) -> crate :: generated :: spatial_material :: BillboardMode { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_billboard_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: spatial_material :: BillboardMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the value of the specified flag."] # [doc = ""] # [inline] pub fn draw_flag (& self , flag : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_draw_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flag as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the rectangle representing this sprite."] # [doc = ""] # [inline] pub fn get_item_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_item_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A color value used to _multiply_ the texture's colors. Can be used for mood-coloring or to simulate the color of light.\n**Note:** If a [`GeometryInstance.material_override`][GeometryInstance::material_override] is defined on the [`SpriteBase3D`][SpriteBase3D], the material override must be configured to take vertex colors into account for albedo. Otherwise, the color defined in [`modulate`][Self::modulate] will be ignored. For a [`SpatialMaterial`][SpatialMaterial], [`SpatialMaterial.vertex_color_use_as_albedo`][SpatialMaterial::vertex_color_use_as_albedo] must be `true`. For a [`ShaderMaterial`][ShaderMaterial], `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function."] # [doc = ""] # [inline] pub fn modulate (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_modulate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The texture's drawing offset."] # [doc = ""] # [inline] pub fn offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The texture's visibility on a scale from `0` (fully invisible) to `1` (fully visible). [`opacity`][Self::opacity] is a multiplier for the [`modulate`][Self::modulate] color's alpha channel.\n**Note:** If a [`GeometryInstance.material_override`][GeometryInstance::material_override] is defined on the [`SpriteBase3D`][SpriteBase3D], the material override must be configured to take vertex colors into account for albedo. Otherwise, the opacity defined in [`opacity`][Self::opacity] will be ignored. For a [`SpatialMaterial`][SpatialMaterial], [`SpatialMaterial.vertex_color_use_as_albedo`][SpatialMaterial::vertex_color_use_as_albedo] must be `true`. For a [`ShaderMaterial`][ShaderMaterial], `ALPHA *= COLOR.a;` must be inserted in the shader's `fragment()` function."] # [doc = ""] # [inline] pub fn opacity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_opacity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The size of one pixel's width on the sprite to scale it in 3D."] # [doc = ""] # [inline] pub fn pixel_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_pixel_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the render priority for the sprite. Higher priority objects will be sorted in front of lower priority objects.\n**Note:** This only applies if [`alpha_cut`][Self::alpha_cut] is set to [`ALPHA_CUT_DISABLED`][Self::ALPHA_CUT_DISABLED] (default value).\n**Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority)."] # [doc = ""] # [inline] pub fn render_priority (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_render_priority ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, texture will be centered."] # [doc = ""] # [inline] pub fn is_centered (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . is_centered ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn is_flipped_h (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . is_flipped_h ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn is_flipped_v (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . is_flipped_v ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_alpha_cut_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_alpha_cut_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The direction in which the front of the texture faces."] # [doc = ""] # [inline] pub fn set_axis (& self , axis : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_axis ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , axis as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_billboard_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_billboard_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "If `true`, texture will be centered."] # [doc = ""] # [inline] pub fn set_centered (& self , centered : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_centered ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , centered as _) ; } } # [doc = "If `true`, the specified flag will be enabled."] # [doc = ""] # [inline] pub fn set_draw_flag (& self , flag : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_draw_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , flag as _ , enabled as _) ; } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn set_flip_h (& self , flip_h : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_flip_h ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , flip_h as _) ; } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn set_flip_v (& self , flip_v : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_flip_v ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , flip_v as _) ; } } # [doc = "A color value used to _multiply_ the texture's colors. Can be used for mood-coloring or to simulate the color of light.\n**Note:** If a [`GeometryInstance.material_override`][GeometryInstance::material_override] is defined on the [`SpriteBase3D`][SpriteBase3D], the material override must be configured to take vertex colors into account for albedo. Otherwise, the color defined in [`modulate`][Self::modulate] will be ignored. For a [`SpatialMaterial`][SpatialMaterial], [`SpatialMaterial.vertex_color_use_as_albedo`][SpatialMaterial::vertex_color_use_as_albedo] must be `true`. For a [`ShaderMaterial`][ShaderMaterial], `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function."] # [doc = ""] # [inline] pub fn set_modulate (& self , modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_modulate ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , modulate) ; } } # [doc = "The texture's drawing offset."] # [doc = ""] # [inline] pub fn set_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The texture's visibility on a scale from `0` (fully invisible) to `1` (fully visible). [`opacity`][Self::opacity] is a multiplier for the [`modulate`][Self::modulate] color's alpha channel.\n**Note:** If a [`GeometryInstance.material_override`][GeometryInstance::material_override] is defined on the [`SpriteBase3D`][SpriteBase3D], the material override must be configured to take vertex colors into account for albedo. Otherwise, the opacity defined in [`opacity`][Self::opacity] will be ignored. For a [`SpatialMaterial`][SpatialMaterial], [`SpatialMaterial.vertex_color_use_as_albedo`][SpatialMaterial::vertex_color_use_as_albedo] must be `true`. For a [`ShaderMaterial`][ShaderMaterial], `ALPHA *= COLOR.a;` must be inserted in the shader's `fragment()` function."] # [doc = ""] # [inline] pub fn set_opacity (& self , opacity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_opacity ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , opacity as _) ; } } # [doc = "The size of one pixel's width on the sprite to scale it in 3D."] # [doc = ""] # [inline] pub fn set_pixel_size (& self , pixel_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_pixel_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , pixel_size as _) ; } } # [doc = "Sets the render priority for the sprite. Higher priority objects will be sorted in front of lower priority objects.\n**Note:** This only applies if [`alpha_cut`][Self::alpha_cut] is set to [`ALPHA_CUT_DISABLED`][Self::ALPHA_CUT_DISABLED] (default value).\n**Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority)."] # [doc = ""] # [inline] pub fn set_render_priority (& self , priority : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_render_priority ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , priority as _) ; } } # [doc = "If `true`, texture can be seen from the back as well, if `false`, it is invisible when looking at it from behind."] # [doc = ""] # [inline] pub fn double_sided (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_draw_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, texture can be seen from the back as well, if `false`, it is invisible when looking at it from behind."] # [doc = ""] # [inline] pub fn set_double_sided (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_draw_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "If `true`, the label is rendered at the same size regardless of distance."] # [doc = ""] # [inline] pub fn fixed_size (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_draw_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the label is rendered at the same size regardless of distance."] # [doc = ""] # [inline] pub fn set_fixed_size (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_draw_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 4i64 , value as _) ; } } # [doc = "If `true`, depth testing is disabled and the object will be drawn in render order."] # [doc = ""] # [inline] pub fn no_depth_test (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_draw_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, depth testing is disabled and the object will be drawn in render order."] # [doc = ""] # [inline] pub fn set_no_depth_test (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_draw_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "If `true`, the [`Light`][Light] in the [`Environment`][Environment] has effects on the sprite."] # [doc = ""] # [inline] pub fn shaded (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_draw_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the [`Light`][Light] in the [`Environment`][Environment] has effects on the sprite."] # [doc = ""] # [inline] pub fn set_shaded (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_draw_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "If `true`, the texture's transparency and the opacity are used to make those parts of the sprite invisible."] # [doc = ""] # [inline] pub fn transparent (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . get_draw_flag ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the texture's transparency and the opacity are used to make those parts of the sprite invisible."] # [doc = ""] # [inline] pub fn set_transparent (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteBase3DMethodTable :: get (get_api ()) . set_draw_flag ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SpriteBase3D { } unsafe impl GodotObject for SpriteBase3D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "SpriteBase3D" } } impl QueueFree for SpriteBase3D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for SpriteBase3D { type Target = crate :: generated :: GeometryInstance ; # [inline] fn deref (& self) -> & crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpriteBase3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: GeometryInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: GeometryInstance > for SpriteBase3D { } unsafe impl SubClass < crate :: generated :: VisualInstance > for SpriteBase3D { } unsafe impl SubClass < crate :: generated :: CullInstance > for SpriteBase3D { } unsafe impl SubClass < crate :: generated :: Spatial > for SpriteBase3D { } unsafe impl SubClass < crate :: generated :: Node > for SpriteBase3D { } unsafe impl SubClass < crate :: generated :: Object > for SpriteBase3D { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SpriteBase3DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub generate_triangle_mesh : * mut sys :: godot_method_bind , pub get_alpha_cut_mode : * mut sys :: godot_method_bind , pub get_axis : * mut sys :: godot_method_bind , pub get_billboard_mode : * mut sys :: godot_method_bind , pub get_draw_flag : * mut sys :: godot_method_bind , pub get_item_rect : * mut sys :: godot_method_bind , pub get_modulate : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub get_opacity : * mut sys :: godot_method_bind , pub get_pixel_size : * mut sys :: godot_method_bind , pub get_render_priority : * mut sys :: godot_method_bind , pub is_centered : * mut sys :: godot_method_bind , pub is_flipped_h : * mut sys :: godot_method_bind , pub is_flipped_v : * mut sys :: godot_method_bind , pub set_alpha_cut_mode : * mut sys :: godot_method_bind , pub set_axis : * mut sys :: godot_method_bind , pub set_billboard_mode : * mut sys :: godot_method_bind , pub set_centered : * mut sys :: godot_method_bind , pub set_draw_flag : * mut sys :: godot_method_bind , pub set_flip_h : * mut sys :: godot_method_bind , pub set_flip_v : * mut sys :: godot_method_bind , pub set_modulate : * mut sys :: godot_method_bind , pub set_offset : * mut sys :: godot_method_bind , pub set_opacity : * mut sys :: godot_method_bind , pub set_pixel_size : * mut sys :: godot_method_bind , pub set_render_priority : * mut sys :: godot_method_bind } impl SpriteBase3DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SpriteBase3DMethodTable = SpriteBase3DMethodTable { class_constructor : None , generate_triangle_mesh : 0 as * mut sys :: godot_method_bind , get_alpha_cut_mode : 0 as * mut sys :: godot_method_bind , get_axis : 0 as * mut sys :: godot_method_bind , get_billboard_mode : 0 as * mut sys :: godot_method_bind , get_draw_flag : 0 as * mut sys :: godot_method_bind , get_item_rect : 0 as * mut sys :: godot_method_bind , get_modulate : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , get_opacity : 0 as * mut sys :: godot_method_bind , get_pixel_size : 0 as * mut sys :: godot_method_bind , get_render_priority : 0 as * mut sys :: godot_method_bind , is_centered : 0 as * mut sys :: godot_method_bind , is_flipped_h : 0 as * mut sys :: godot_method_bind , is_flipped_v : 0 as * mut sys :: godot_method_bind , set_alpha_cut_mode : 0 as * mut sys :: godot_method_bind , set_axis : 0 as * mut sys :: godot_method_bind , set_billboard_mode : 0 as * mut sys :: godot_method_bind , set_centered : 0 as * mut sys :: godot_method_bind , set_draw_flag : 0 as * mut sys :: godot_method_bind , set_flip_h : 0 as * mut sys :: godot_method_bind , set_flip_v : 0 as * mut sys :: godot_method_bind , set_modulate : 0 as * mut sys :: godot_method_bind , set_offset : 0 as * mut sys :: godot_method_bind , set_opacity : 0 as * mut sys :: godot_method_bind , set_pixel_size : 0 as * mut sys :: godot_method_bind , set_render_priority : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SpriteBase3DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SpriteBase3D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . generate_triangle_mesh = (gd_api . godot_method_bind_get_method) (class_name , "generate_triangle_mesh\0" . as_ptr () as * const c_char) ; table . get_alpha_cut_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_alpha_cut_mode\0" . as_ptr () as * const c_char) ; table . get_axis = (gd_api . godot_method_bind_get_method) (class_name , "get_axis\0" . as_ptr () as * const c_char) ; table . get_billboard_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_billboard_mode\0" . as_ptr () as * const c_char) ; table . get_draw_flag = (gd_api . godot_method_bind_get_method) (class_name , "get_draw_flag\0" . as_ptr () as * const c_char) ; table . get_item_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_item_rect\0" . as_ptr () as * const c_char) ; table . get_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_modulate\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . get_opacity = (gd_api . godot_method_bind_get_method) (class_name , "get_opacity\0" . as_ptr () as * const c_char) ; table . get_pixel_size = (gd_api . godot_method_bind_get_method) (class_name , "get_pixel_size\0" . as_ptr () as * const c_char) ; table . get_render_priority = (gd_api . godot_method_bind_get_method) (class_name , "get_render_priority\0" . as_ptr () as * const c_char) ; table . is_centered = (gd_api . godot_method_bind_get_method) (class_name , "is_centered\0" . as_ptr () as * const c_char) ; table . is_flipped_h = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_h\0" . as_ptr () as * const c_char) ; table . is_flipped_v = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_v\0" . as_ptr () as * const c_char) ; table . set_alpha_cut_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_alpha_cut_mode\0" . as_ptr () as * const c_char) ; table . set_axis = (gd_api . godot_method_bind_get_method) (class_name , "set_axis\0" . as_ptr () as * const c_char) ; table . set_billboard_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_billboard_mode\0" . as_ptr () as * const c_char) ; table . set_centered = (gd_api . godot_method_bind_get_method) (class_name , "set_centered\0" . as_ptr () as * const c_char) ; table . set_draw_flag = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_flag\0" . as_ptr () as * const c_char) ; table . set_flip_h = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_h\0" . as_ptr () as * const c_char) ; table . set_flip_v = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_v\0" . as_ptr () as * const c_char) ; table . set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_modulate\0" . as_ptr () as * const c_char) ; table . set_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_offset\0" . as_ptr () as * const c_char) ; table . set_opacity = (gd_api . godot_method_bind_get_method) (class_name , "set_opacity\0" . as_ptr () as * const c_char) ; table . set_pixel_size = (gd_api . godot_method_bind_get_method) (class_name , "set_pixel_size\0" . as_ptr () as * const c_char) ; table . set_render_priority = (gd_api . godot_method_bind_get_method) (class_name , "set_render_priority\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::sprite_base_3d::private::SpriteBase3D;
            
            pub(crate) mod sprite_frames {
                # ! [doc = "This module contains types related to the API class [`SpriteFrames`][super::SpriteFrames]."] pub (crate) mod private { # [doc = "`core class SpriteFrames` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_spriteframes.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSpriteFrames inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SpriteFrames { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SpriteFrames ; impl SpriteFrames { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SpriteFramesMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a new animation to the library."] # [doc = ""] # [inline] pub fn add_animation (& self , anim : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . add_animation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; } } # [doc = "Adds a frame to the given animation.\n# Default Arguments\n* `at_position` - `-1`"] # [doc = ""] # [inline] pub fn add_frame (& self , anim : impl Into < GodotString > , frame : impl AsArg < crate :: generated :: Texture > , at_position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . add_frame ; let ret = crate :: icalls :: icallvar__str_obj_i64 (method_bind , self . this . sys () . as_ptr () , anim . into () , frame . as_arg_ptr () , at_position as _) ; } } # [doc = "Removes all frames from the given animation."] # [doc = ""] # [inline] pub fn clear (& self , anim : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; } } # [doc = "Removes all animations. A \"default\" animation will be created."] # [doc = ""] # [inline] pub fn clear_all (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . clear_all ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns `true` if the given animation is configured to loop when it finishes playing. Otherwise, returns `false`."] # [doc = ""] # [inline] pub fn get_animation_loop (& self , anim : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . get_animation_loop ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns an array containing the names associated to each animation. Values are placed in alphabetical order."] # [doc = ""] # [inline] pub fn get_animation_names (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . get_animation_names ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The animation's speed in frames per second."] # [doc = ""] # [inline] pub fn get_animation_speed (& self , anim : impl Into < GodotString >) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . get_animation_speed ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the animation's selected frame."] # [doc = ""] # [inline] pub fn get_frame (& self , anim : impl Into < GodotString > , idx : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . get_frame ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , anim . into () , idx as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of frames in the animation."] # [doc = ""] # [inline] pub fn get_frame_count (& self , anim : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . get_frame_count ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the named animation exists."] # [doc = ""] # [inline] pub fn has_animation (& self , anim : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . has_animation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes the given animation."] # [doc = ""] # [inline] pub fn remove_animation (& self , anim : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . remove_animation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , anim . into ()) ; } } # [doc = "Removes the animation's selected frame."] # [doc = ""] # [inline] pub fn remove_frame (& self , anim : impl Into < GodotString > , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . remove_frame ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , anim . into () , idx as _) ; } } # [doc = "Changes the animation's name to `newname`."] # [doc = ""] # [inline] pub fn rename_animation (& self , anim : impl Into < GodotString > , newname : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . rename_animation ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , anim . into () , newname . into ()) ; } } # [doc = "If `true`, the animation will loop."] # [doc = ""] # [inline] pub fn set_animation_loop (& self , anim : impl Into < GodotString > , loop_ : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . set_animation_loop ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , anim . into () , loop_ as _) ; } } # [doc = "The animation's speed in frames per second."] # [doc = ""] # [inline] pub fn set_animation_speed (& self , anim : impl Into < GodotString > , speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . set_animation_speed ; let ret = crate :: icalls :: icallvar__str_f64 (method_bind , self . this . sys () . as_ptr () , anim . into () , speed as _) ; } } # [doc = "Sets the texture of the given frame."] # [doc = ""] # [inline] pub fn set_frame (& self , anim : impl Into < GodotString > , idx : i64 , txt : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SpriteFramesMethodTable :: get (get_api ()) . set_frame ; let ret = crate :: icalls :: icallvar__str_i64_obj (method_bind , self . this . sys () . as_ptr () , anim . into () , idx as _ , txt . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SpriteFrames { } unsafe impl GodotObject for SpriteFrames { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SpriteFrames" } } impl std :: ops :: Deref for SpriteFrames { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SpriteFrames { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for SpriteFrames { } unsafe impl SubClass < crate :: generated :: Reference > for SpriteFrames { } unsafe impl SubClass < crate :: generated :: Object > for SpriteFrames { } impl Instanciable for SpriteFrames { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { SpriteFrames :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SpriteFramesMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_animation : * mut sys :: godot_method_bind , pub add_frame : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub clear_all : * mut sys :: godot_method_bind , pub get_animation_loop : * mut sys :: godot_method_bind , pub get_animation_names : * mut sys :: godot_method_bind , pub get_animation_speed : * mut sys :: godot_method_bind , pub get_frame : * mut sys :: godot_method_bind , pub get_frame_count : * mut sys :: godot_method_bind , pub has_animation : * mut sys :: godot_method_bind , pub remove_animation : * mut sys :: godot_method_bind , pub remove_frame : * mut sys :: godot_method_bind , pub rename_animation : * mut sys :: godot_method_bind , pub set_animation_loop : * mut sys :: godot_method_bind , pub set_animation_speed : * mut sys :: godot_method_bind , pub set_frame : * mut sys :: godot_method_bind } impl SpriteFramesMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SpriteFramesMethodTable = SpriteFramesMethodTable { class_constructor : None , add_animation : 0 as * mut sys :: godot_method_bind , add_frame : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , clear_all : 0 as * mut sys :: godot_method_bind , get_animation_loop : 0 as * mut sys :: godot_method_bind , get_animation_names : 0 as * mut sys :: godot_method_bind , get_animation_speed : 0 as * mut sys :: godot_method_bind , get_frame : 0 as * mut sys :: godot_method_bind , get_frame_count : 0 as * mut sys :: godot_method_bind , has_animation : 0 as * mut sys :: godot_method_bind , remove_animation : 0 as * mut sys :: godot_method_bind , remove_frame : 0 as * mut sys :: godot_method_bind , rename_animation : 0 as * mut sys :: godot_method_bind , set_animation_loop : 0 as * mut sys :: godot_method_bind , set_animation_speed : 0 as * mut sys :: godot_method_bind , set_frame : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SpriteFramesMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SpriteFrames\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_animation = (gd_api . godot_method_bind_get_method) (class_name , "add_animation\0" . as_ptr () as * const c_char) ; table . add_frame = (gd_api . godot_method_bind_get_method) (class_name , "add_frame\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . clear_all = (gd_api . godot_method_bind_get_method) (class_name , "clear_all\0" . as_ptr () as * const c_char) ; table . get_animation_loop = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_loop\0" . as_ptr () as * const c_char) ; table . get_animation_names = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_names\0" . as_ptr () as * const c_char) ; table . get_animation_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_animation_speed\0" . as_ptr () as * const c_char) ; table . get_frame = (gd_api . godot_method_bind_get_method) (class_name , "get_frame\0" . as_ptr () as * const c_char) ; table . get_frame_count = (gd_api . godot_method_bind_get_method) (class_name , "get_frame_count\0" . as_ptr () as * const c_char) ; table . has_animation = (gd_api . godot_method_bind_get_method) (class_name , "has_animation\0" . as_ptr () as * const c_char) ; table . remove_animation = (gd_api . godot_method_bind_get_method) (class_name , "remove_animation\0" . as_ptr () as * const c_char) ; table . remove_frame = (gd_api . godot_method_bind_get_method) (class_name , "remove_frame\0" . as_ptr () as * const c_char) ; table . rename_animation = (gd_api . godot_method_bind_get_method) (class_name , "rename_animation\0" . as_ptr () as * const c_char) ; table . set_animation_loop = (gd_api . godot_method_bind_get_method) (class_name , "set_animation_loop\0" . as_ptr () as * const c_char) ; table . set_animation_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_animation_speed\0" . as_ptr () as * const c_char) ; table . set_frame = (gd_api . godot_method_bind_get_method) (class_name , "set_frame\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::sprite_frames::private::SpriteFrames;
            
            pub(crate) mod static_body {
                # ! [doc = "This module contains types related to the API class [`StaticBody`][super::StaticBody]."] pub (crate) mod private { # [doc = "`core class StaticBody` inherits `PhysicsBody` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_staticbody.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`StaticBody` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<StaticBody>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nStaticBody inherits methods from:\n - [PhysicsBody](struct.PhysicsBody.html)\n - [CollisionObject](struct.CollisionObject.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StaticBody { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: StaticBody ; impl StaticBody { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StaticBodyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [`PhysicsMaterial.bounce`][PhysicsMaterial::bounce] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn bounce (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBodyMethodTable :: get (get_api ()) . get_bounce ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body's constant angular velocity. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation."] # [doc = ""] # [inline] pub fn constant_angular_velocity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBodyMethodTable :: get (get_api ()) . get_constant_angular_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The body's constant linear velocity. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement."] # [doc = ""] # [inline] pub fn constant_linear_velocity (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBodyMethodTable :: get (get_api ()) . get_constant_linear_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The body's friction, from 0 (frictionless) to 1 (full friction).\nDeprecated, use [`PhysicsMaterial.friction`][PhysicsMaterial::friction] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn friction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBodyMethodTable :: get (get_api ()) . get_friction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The physics material override for the body.\nIf a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one."] # [doc = ""] # [inline] pub fn physics_material_override (& self) -> Option < Ref < crate :: generated :: PhysicsMaterial , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBodyMethodTable :: get (get_api ()) . get_physics_material_override ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: PhysicsMaterial , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [`PhysicsMaterial.bounce`][PhysicsMaterial::bounce] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn set_bounce (& self , bounce : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBodyMethodTable :: get (get_api ()) . set_bounce ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , bounce as _) ; } } # [doc = "The body's constant angular velocity. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation."] # [doc = ""] # [inline] pub fn set_constant_angular_velocity (& self , vel : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBodyMethodTable :: get (get_api ()) . set_constant_angular_velocity ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , vel) ; } } # [doc = "The body's constant linear velocity. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement."] # [doc = ""] # [inline] pub fn set_constant_linear_velocity (& self , vel : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBodyMethodTable :: get (get_api ()) . set_constant_linear_velocity ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , vel) ; } } # [doc = "The body's friction, from 0 (frictionless) to 1 (full friction).\nDeprecated, use [`PhysicsMaterial.friction`][PhysicsMaterial::friction] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn set_friction (& self , friction : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBodyMethodTable :: get (get_api ()) . set_friction ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , friction as _) ; } } # [doc = "The physics material override for the body.\nIf a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one."] # [doc = ""] # [inline] pub fn set_physics_material_override (& self , physics_material_override : impl AsArg < crate :: generated :: PhysicsMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBodyMethodTable :: get (get_api ()) . set_physics_material_override ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , physics_material_override . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StaticBody { } unsafe impl GodotObject for StaticBody { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "StaticBody" } } impl QueueFree for StaticBody { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for StaticBody { type Target = crate :: generated :: PhysicsBody ; # [inline] fn deref (& self) -> & crate :: generated :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StaticBody { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PhysicsBody { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PhysicsBody > for StaticBody { } unsafe impl SubClass < crate :: generated :: CollisionObject > for StaticBody { } unsafe impl SubClass < crate :: generated :: Spatial > for StaticBody { } unsafe impl SubClass < crate :: generated :: Node > for StaticBody { } unsafe impl SubClass < crate :: generated :: Object > for StaticBody { } impl Instanciable for StaticBody { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { StaticBody :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StaticBodyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bounce : * mut sys :: godot_method_bind , pub get_constant_angular_velocity : * mut sys :: godot_method_bind , pub get_constant_linear_velocity : * mut sys :: godot_method_bind , pub get_friction : * mut sys :: godot_method_bind , pub get_physics_material_override : * mut sys :: godot_method_bind , pub set_bounce : * mut sys :: godot_method_bind , pub set_constant_angular_velocity : * mut sys :: godot_method_bind , pub set_constant_linear_velocity : * mut sys :: godot_method_bind , pub set_friction : * mut sys :: godot_method_bind , pub set_physics_material_override : * mut sys :: godot_method_bind } impl StaticBodyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StaticBodyMethodTable = StaticBodyMethodTable { class_constructor : None , get_bounce : 0 as * mut sys :: godot_method_bind , get_constant_angular_velocity : 0 as * mut sys :: godot_method_bind , get_constant_linear_velocity : 0 as * mut sys :: godot_method_bind , get_friction : 0 as * mut sys :: godot_method_bind , get_physics_material_override : 0 as * mut sys :: godot_method_bind , set_bounce : 0 as * mut sys :: godot_method_bind , set_constant_angular_velocity : 0 as * mut sys :: godot_method_bind , set_constant_linear_velocity : 0 as * mut sys :: godot_method_bind , set_friction : 0 as * mut sys :: godot_method_bind , set_physics_material_override : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { StaticBodyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StaticBody\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\0" . as_ptr () as * const c_char) ; table . get_constant_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_angular_velocity\0" . as_ptr () as * const c_char) ; table . get_constant_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_linear_velocity\0" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\0" . as_ptr () as * const c_char) ; table . get_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_material_override\0" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\0" . as_ptr () as * const c_char) ; table . set_constant_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_constant_angular_velocity\0" . as_ptr () as * const c_char) ; table . set_constant_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_constant_linear_velocity\0" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\0" . as_ptr () as * const c_char) ; table . set_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_material_override\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::static_body::private::StaticBody;
            
            pub(crate) mod static_body_2d {
                # ! [doc = "This module contains types related to the API class [`StaticBody2D`][super::StaticBody2D]."] pub (crate) mod private { # [doc = "`core class StaticBody2D` inherits `PhysicsBody2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_staticbody2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`StaticBody2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<StaticBody2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nStaticBody2D inherits methods from:\n - [PhysicsBody2D](struct.PhysicsBody2D.html)\n - [CollisionObject2D](struct.CollisionObject2D.html)\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StaticBody2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: StaticBody2D ; impl StaticBody2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StaticBody2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [`PhysicsMaterial.bounce`][PhysicsMaterial::bounce] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn bounce (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . get_bounce ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body's constant angular velocity. This does not rotate the body, but affects colliding bodies, as if it were rotating."] # [doc = ""] # [inline] pub fn constant_angular_velocity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . get_constant_angular_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The body's constant linear velocity. This does not move the body, but affects colliding bodies, as if it were moving."] # [doc = ""] # [inline] pub fn constant_linear_velocity (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . get_constant_linear_velocity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The body's friction. Values range from `0` (no friction) to `1` (full friction).\nDeprecated, use [`PhysicsMaterial.friction`][PhysicsMaterial::friction] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn friction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . get_friction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The physics material override for the body.\nIf a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one."] # [doc = ""] # [inline] pub fn physics_material_override (& self) -> Option < Ref < crate :: generated :: PhysicsMaterial , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . get_physics_material_override ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: PhysicsMaterial , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness).\nDeprecated, use [`PhysicsMaterial.bounce`][PhysicsMaterial::bounce] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn set_bounce (& self , bounce : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . set_bounce ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , bounce as _) ; } } # [doc = "The body's constant angular velocity. This does not rotate the body, but affects colliding bodies, as if it were rotating."] # [doc = ""] # [inline] pub fn set_constant_angular_velocity (& self , vel : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . set_constant_angular_velocity ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , vel as _) ; } } # [doc = "The body's constant linear velocity. This does not move the body, but affects colliding bodies, as if it were moving."] # [doc = ""] # [inline] pub fn set_constant_linear_velocity (& self , vel : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . set_constant_linear_velocity ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , vel) ; } } # [doc = "The body's friction. Values range from `0` (no friction) to `1` (full friction).\nDeprecated, use [`PhysicsMaterial.friction`][PhysicsMaterial::friction] instead via [`physics_material_override`][Self::physics_material_override]."] # [doc = ""] # [inline] pub fn set_friction (& self , friction : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . set_friction ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , friction as _) ; } } # [doc = "The physics material override for the body.\nIf a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one."] # [doc = ""] # [inline] pub fn set_physics_material_override (& self , physics_material_override : impl AsArg < crate :: generated :: PhysicsMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StaticBody2DMethodTable :: get (get_api ()) . set_physics_material_override ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , physics_material_override . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StaticBody2D { } unsafe impl GodotObject for StaticBody2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "StaticBody2D" } } impl QueueFree for StaticBody2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for StaticBody2D { type Target = crate :: generated :: PhysicsBody2D ; # [inline] fn deref (& self) -> & crate :: generated :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StaticBody2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PhysicsBody2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PhysicsBody2D > for StaticBody2D { } unsafe impl SubClass < crate :: generated :: CollisionObject2D > for StaticBody2D { } unsafe impl SubClass < crate :: generated :: Node2D > for StaticBody2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for StaticBody2D { } unsafe impl SubClass < crate :: generated :: Node > for StaticBody2D { } unsafe impl SubClass < crate :: generated :: Object > for StaticBody2D { } impl Instanciable for StaticBody2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { StaticBody2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StaticBody2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bounce : * mut sys :: godot_method_bind , pub get_constant_angular_velocity : * mut sys :: godot_method_bind , pub get_constant_linear_velocity : * mut sys :: godot_method_bind , pub get_friction : * mut sys :: godot_method_bind , pub get_physics_material_override : * mut sys :: godot_method_bind , pub set_bounce : * mut sys :: godot_method_bind , pub set_constant_angular_velocity : * mut sys :: godot_method_bind , pub set_constant_linear_velocity : * mut sys :: godot_method_bind , pub set_friction : * mut sys :: godot_method_bind , pub set_physics_material_override : * mut sys :: godot_method_bind } impl StaticBody2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StaticBody2DMethodTable = StaticBody2DMethodTable { class_constructor : None , get_bounce : 0 as * mut sys :: godot_method_bind , get_constant_angular_velocity : 0 as * mut sys :: godot_method_bind , get_constant_linear_velocity : 0 as * mut sys :: godot_method_bind , get_friction : 0 as * mut sys :: godot_method_bind , get_physics_material_override : 0 as * mut sys :: godot_method_bind , set_bounce : 0 as * mut sys :: godot_method_bind , set_constant_angular_velocity : 0 as * mut sys :: godot_method_bind , set_constant_linear_velocity : 0 as * mut sys :: godot_method_bind , set_friction : 0 as * mut sys :: godot_method_bind , set_physics_material_override : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { StaticBody2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StaticBody2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_bounce\0" . as_ptr () as * const c_char) ; table . get_constant_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_angular_velocity\0" . as_ptr () as * const c_char) ; table . get_constant_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_linear_velocity\0" . as_ptr () as * const c_char) ; table . get_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_friction\0" . as_ptr () as * const c_char) ; table . get_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_material_override\0" . as_ptr () as * const c_char) ; table . set_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_bounce\0" . as_ptr () as * const c_char) ; table . set_constant_angular_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_constant_angular_velocity\0" . as_ptr () as * const c_char) ; table . set_constant_linear_velocity = (gd_api . godot_method_bind_get_method) (class_name , "set_constant_linear_velocity\0" . as_ptr () as * const c_char) ; table . set_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_friction\0" . as_ptr () as * const c_char) ; table . set_physics_material_override = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_material_override\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::static_body_2d::private::StaticBody2D;
            
            pub(crate) mod stream_peer {
                # ! [doc = "This module contains types related to the API class [`StreamPeer`][super::StreamPeer]."] pub (crate) mod private { # [doc = "`core class StreamPeer` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_streampeer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStreamPeer inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StreamPeer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: StreamPeer ; impl StreamPeer { # [doc = "Gets a signed 16-bit value from the stream."] # [doc = ""] # [inline] pub fn get_16 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_16 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets a signed 32-bit value from the stream."] # [doc = ""] # [inline] pub fn get_32 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_32 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets a signed 64-bit value from the stream."] # [doc = ""] # [inline] pub fn get_64 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_64 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets a signed byte from the stream."] # [doc = ""] # [inline] pub fn get_8 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_8 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the amount of bytes this [`StreamPeer`][StreamPeer] has available."] # [doc = ""] # [inline] pub fn get_available_bytes (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_available_bytes ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the `bytes` argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an [enum @GlobalScope.Error] code and a data array."] # [doc = ""] # [inline] pub fn get_data (& self , bytes : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bytes as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets a double-precision float from the stream."] # [doc = ""] # [inline] pub fn get_double (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_double ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Gets a single-precision float from the stream."] # [doc = ""] # [inline] pub fn get_float (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_float ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the \"bytes\" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an [enum @GlobalScope.Error] code, and a data array."] # [doc = ""] # [inline] pub fn get_partial_data (& self , bytes : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_partial_data ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bytes as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets an ASCII string with byte-length `bytes` from the stream. If `bytes` is negative (default) the length will be read from the stream using the reverse process of [`put_string`][Self::put_string].\n# Default Arguments\n* `bytes` - `-1`"] # [doc = ""] # [inline] pub fn get_string (& self , bytes : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_string ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bytes as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets an unsigned 16-bit value from the stream."] # [doc = ""] # [inline] pub fn get_u16 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_u16 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets an unsigned 32-bit value from the stream."] # [doc = ""] # [inline] pub fn get_u32 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_u32 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets an unsigned 64-bit value from the stream."] # [doc = ""] # [inline] pub fn get_u64 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_u64 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets an unsigned byte from the stream."] # [doc = ""] # [inline] pub fn get_u8 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_u8 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets an UTF-8 string with byte-length `bytes` from the stream (this decodes the string sent as UTF-8). If `bytes` is negative (default) the length will be read from the stream using the reverse process of [`put_utf8_string`][Self::put_utf8_string].\n# Default Arguments\n* `bytes` - `-1`"] # [doc = ""] # [inline] pub fn get_utf8_string (& self , bytes : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_utf8_string ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bytes as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets a Variant from the stream. If `allow_objects` is `true`, decoding objects is allowed.\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.\n# Default Arguments\n* `allow_objects` - `false`"] # [doc = ""] # [inline] pub fn get_var (& self , allow_objects : bool) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . get_var ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , allow_objects as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, this [`StreamPeer`][StreamPeer] will using big-endian format for encoding and decoding."] # [doc = ""] # [inline] pub fn is_big_endian_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . is_big_endian_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Puts a signed 16-bit value into the stream."] # [doc = ""] # [inline] pub fn put_16 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_16 ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Puts a signed 32-bit value into the stream."] # [doc = ""] # [inline] pub fn put_32 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_32 ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Puts a signed 64-bit value into the stream."] # [doc = ""] # [inline] pub fn put_64 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_64 ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Puts a signed byte into the stream."] # [doc = ""] # [inline] pub fn put_8 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_8 ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an [enum @GlobalScope.Error] code."] # [doc = ""] # [inline] pub fn put_data (& self , data : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_data ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , data) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Puts a double-precision float into the stream."] # [doc = ""] # [inline] pub fn put_double (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_double ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Puts a single-precision float into the stream."] # [doc = ""] # [inline] pub fn put_float (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_float ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an [enum @GlobalScope.Error] code and an integer, describing how much data was actually sent."] # [doc = ""] # [inline] pub fn put_partial_data (& self , data : PoolArray < u8 >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_partial_data ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , data) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nPuts a zero-terminated ASCII string into the stream prepended by a 32-bit unsigned integer representing its size.\n**Note:** To put an ASCII string without prepending its size, you can use [`put_data`][Self::put_data]:\n```gdscript\nput_data(\"Hello world\".to_ascii())\n```"] # [doc = ""] # [inline] pub fn put_string (& self , value : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_string ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , value . into ()) ; } } # [doc = "Puts an unsigned 16-bit value into the stream."] # [doc = ""] # [inline] pub fn put_u16 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_u16 ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Puts an unsigned 32-bit value into the stream."] # [doc = ""] # [inline] pub fn put_u32 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_u32 ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Puts an unsigned 64-bit value into the stream."] # [doc = ""] # [inline] pub fn put_u64 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_u64 ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Puts an unsigned byte into the stream."] # [doc = ""] # [inline] pub fn put_u8 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_u8 ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nPuts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size.\n**Note:** To put an UTF-8 string without prepending its size, you can use [`put_data`][Self::put_data]:\n```gdscript\nput_data(\"Hello world\".to_utf8())\n```"] # [doc = ""] # [inline] pub fn put_utf8_string (& self , value : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_utf8_string ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , value . into ()) ; } } # [doc = "Puts a Variant into the stream. If `full_objects` is `true` encoding objects is allowed (and can potentially include code).\n# Default Arguments\n* `full_objects` - `false`"] # [doc = ""] # [inline] pub fn put_var (& self , value : impl OwnedToVariant , full_objects : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . put_var ; let ret = crate :: icalls :: icallvar__var_bool (method_bind , self . this . sys () . as_ptr () , value . owned_to_variant () , full_objects as _) ; } } # [doc = "If `true`, this [`StreamPeer`][StreamPeer] will using big-endian format for encoding and decoding."] # [doc = ""] # [inline] pub fn set_big_endian (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerMethodTable :: get (get_api ()) . set_big_endian ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StreamPeer { } unsafe impl GodotObject for StreamPeer { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamPeer" } } impl std :: ops :: Deref for StreamPeer { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamPeer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for StreamPeer { } unsafe impl SubClass < crate :: generated :: Object > for StreamPeer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StreamPeerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_16 : * mut sys :: godot_method_bind , pub get_32 : * mut sys :: godot_method_bind , pub get_64 : * mut sys :: godot_method_bind , pub get_8 : * mut sys :: godot_method_bind , pub get_available_bytes : * mut sys :: godot_method_bind , pub get_data : * mut sys :: godot_method_bind , pub get_double : * mut sys :: godot_method_bind , pub get_float : * mut sys :: godot_method_bind , pub get_partial_data : * mut sys :: godot_method_bind , pub get_string : * mut sys :: godot_method_bind , pub get_u16 : * mut sys :: godot_method_bind , pub get_u32 : * mut sys :: godot_method_bind , pub get_u64 : * mut sys :: godot_method_bind , pub get_u8 : * mut sys :: godot_method_bind , pub get_utf8_string : * mut sys :: godot_method_bind , pub get_var : * mut sys :: godot_method_bind , pub is_big_endian_enabled : * mut sys :: godot_method_bind , pub put_16 : * mut sys :: godot_method_bind , pub put_32 : * mut sys :: godot_method_bind , pub put_64 : * mut sys :: godot_method_bind , pub put_8 : * mut sys :: godot_method_bind , pub put_data : * mut sys :: godot_method_bind , pub put_double : * mut sys :: godot_method_bind , pub put_float : * mut sys :: godot_method_bind , pub put_partial_data : * mut sys :: godot_method_bind , pub put_string : * mut sys :: godot_method_bind , pub put_u16 : * mut sys :: godot_method_bind , pub put_u32 : * mut sys :: godot_method_bind , pub put_u64 : * mut sys :: godot_method_bind , pub put_u8 : * mut sys :: godot_method_bind , pub put_utf8_string : * mut sys :: godot_method_bind , pub put_var : * mut sys :: godot_method_bind , pub set_big_endian : * mut sys :: godot_method_bind } impl StreamPeerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StreamPeerMethodTable = StreamPeerMethodTable { class_constructor : None , get_16 : 0 as * mut sys :: godot_method_bind , get_32 : 0 as * mut sys :: godot_method_bind , get_64 : 0 as * mut sys :: godot_method_bind , get_8 : 0 as * mut sys :: godot_method_bind , get_available_bytes : 0 as * mut sys :: godot_method_bind , get_data : 0 as * mut sys :: godot_method_bind , get_double : 0 as * mut sys :: godot_method_bind , get_float : 0 as * mut sys :: godot_method_bind , get_partial_data : 0 as * mut sys :: godot_method_bind , get_string : 0 as * mut sys :: godot_method_bind , get_u16 : 0 as * mut sys :: godot_method_bind , get_u32 : 0 as * mut sys :: godot_method_bind , get_u64 : 0 as * mut sys :: godot_method_bind , get_u8 : 0 as * mut sys :: godot_method_bind , get_utf8_string : 0 as * mut sys :: godot_method_bind , get_var : 0 as * mut sys :: godot_method_bind , is_big_endian_enabled : 0 as * mut sys :: godot_method_bind , put_16 : 0 as * mut sys :: godot_method_bind , put_32 : 0 as * mut sys :: godot_method_bind , put_64 : 0 as * mut sys :: godot_method_bind , put_8 : 0 as * mut sys :: godot_method_bind , put_data : 0 as * mut sys :: godot_method_bind , put_double : 0 as * mut sys :: godot_method_bind , put_float : 0 as * mut sys :: godot_method_bind , put_partial_data : 0 as * mut sys :: godot_method_bind , put_string : 0 as * mut sys :: godot_method_bind , put_u16 : 0 as * mut sys :: godot_method_bind , put_u32 : 0 as * mut sys :: godot_method_bind , put_u64 : 0 as * mut sys :: godot_method_bind , put_u8 : 0 as * mut sys :: godot_method_bind , put_utf8_string : 0 as * mut sys :: godot_method_bind , put_var : 0 as * mut sys :: godot_method_bind , set_big_endian : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { StreamPeerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StreamPeer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_16 = (gd_api . godot_method_bind_get_method) (class_name , "get_16\0" . as_ptr () as * const c_char) ; table . get_32 = (gd_api . godot_method_bind_get_method) (class_name , "get_32\0" . as_ptr () as * const c_char) ; table . get_64 = (gd_api . godot_method_bind_get_method) (class_name , "get_64\0" . as_ptr () as * const c_char) ; table . get_8 = (gd_api . godot_method_bind_get_method) (class_name , "get_8\0" . as_ptr () as * const c_char) ; table . get_available_bytes = (gd_api . godot_method_bind_get_method) (class_name , "get_available_bytes\0" . as_ptr () as * const c_char) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_double = (gd_api . godot_method_bind_get_method) (class_name , "get_double\0" . as_ptr () as * const c_char) ; table . get_float = (gd_api . godot_method_bind_get_method) (class_name , "get_float\0" . as_ptr () as * const c_char) ; table . get_partial_data = (gd_api . godot_method_bind_get_method) (class_name , "get_partial_data\0" . as_ptr () as * const c_char) ; table . get_string = (gd_api . godot_method_bind_get_method) (class_name , "get_string\0" . as_ptr () as * const c_char) ; table . get_u16 = (gd_api . godot_method_bind_get_method) (class_name , "get_u16\0" . as_ptr () as * const c_char) ; table . get_u32 = (gd_api . godot_method_bind_get_method) (class_name , "get_u32\0" . as_ptr () as * const c_char) ; table . get_u64 = (gd_api . godot_method_bind_get_method) (class_name , "get_u64\0" . as_ptr () as * const c_char) ; table . get_u8 = (gd_api . godot_method_bind_get_method) (class_name , "get_u8\0" . as_ptr () as * const c_char) ; table . get_utf8_string = (gd_api . godot_method_bind_get_method) (class_name , "get_utf8_string\0" . as_ptr () as * const c_char) ; table . get_var = (gd_api . godot_method_bind_get_method) (class_name , "get_var\0" . as_ptr () as * const c_char) ; table . is_big_endian_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_big_endian_enabled\0" . as_ptr () as * const c_char) ; table . put_16 = (gd_api . godot_method_bind_get_method) (class_name , "put_16\0" . as_ptr () as * const c_char) ; table . put_32 = (gd_api . godot_method_bind_get_method) (class_name , "put_32\0" . as_ptr () as * const c_char) ; table . put_64 = (gd_api . godot_method_bind_get_method) (class_name , "put_64\0" . as_ptr () as * const c_char) ; table . put_8 = (gd_api . godot_method_bind_get_method) (class_name , "put_8\0" . as_ptr () as * const c_char) ; table . put_data = (gd_api . godot_method_bind_get_method) (class_name , "put_data\0" . as_ptr () as * const c_char) ; table . put_double = (gd_api . godot_method_bind_get_method) (class_name , "put_double\0" . as_ptr () as * const c_char) ; table . put_float = (gd_api . godot_method_bind_get_method) (class_name , "put_float\0" . as_ptr () as * const c_char) ; table . put_partial_data = (gd_api . godot_method_bind_get_method) (class_name , "put_partial_data\0" . as_ptr () as * const c_char) ; table . put_string = (gd_api . godot_method_bind_get_method) (class_name , "put_string\0" . as_ptr () as * const c_char) ; table . put_u16 = (gd_api . godot_method_bind_get_method) (class_name , "put_u16\0" . as_ptr () as * const c_char) ; table . put_u32 = (gd_api . godot_method_bind_get_method) (class_name , "put_u32\0" . as_ptr () as * const c_char) ; table . put_u64 = (gd_api . godot_method_bind_get_method) (class_name , "put_u64\0" . as_ptr () as * const c_char) ; table . put_u8 = (gd_api . godot_method_bind_get_method) (class_name , "put_u8\0" . as_ptr () as * const c_char) ; table . put_utf8_string = (gd_api . godot_method_bind_get_method) (class_name , "put_utf8_string\0" . as_ptr () as * const c_char) ; table . put_var = (gd_api . godot_method_bind_get_method) (class_name , "put_var\0" . as_ptr () as * const c_char) ; table . set_big_endian = (gd_api . godot_method_bind_get_method) (class_name , "set_big_endian\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::stream_peer::private::StreamPeer;
            
            pub(crate) mod stream_peer_buffer {
                # ! [doc = "This module contains types related to the API class [`StreamPeerBuffer`][super::StreamPeerBuffer]."] pub (crate) mod private { # [doc = "`core class StreamPeerBuffer` inherits `StreamPeer` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_streampeerbuffer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStreamPeerBuffer inherits methods from:\n - [StreamPeer](struct.StreamPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StreamPeerBuffer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: StreamPeerBuffer ; impl StreamPeerBuffer { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StreamPeerBufferMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Clears the [`data_array`][Self::data_array] and resets the cursor."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns a new [`StreamPeerBuffer`][StreamPeerBuffer] with the same [`data_array`][Self::data_array] content."] # [doc = ""] # [inline] pub fn duplicate (& self) -> Option < Ref < crate :: generated :: StreamPeerBuffer , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . duplicate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: StreamPeerBuffer , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The underlying data buffer. Setting this value resets the cursor."] # [doc = ""] # [inline] pub fn data_array (& self) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . get_data_array ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current cursor position."] # [doc = ""] # [inline] pub fn get_position (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the size of [`data_array`][Self::data_array]."] # [doc = ""] # [inline] pub fn get_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Resizes the [`data_array`][Self::data_array]. This _doesn't_ update the cursor."] # [doc = ""] # [inline] pub fn resize (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . resize ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } # [doc = "Moves the cursor to the specified position. `position` must be a valid index of [`data_array`][Self::data_array]."] # [doc = ""] # [inline] pub fn seek (& self , position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . seek ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , position as _) ; } } # [doc = "The underlying data buffer. Setting this value resets the cursor."] # [doc = ""] # [inline] pub fn set_data_array (& self , data : PoolArray < u8 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerBufferMethodTable :: get (get_api ()) . set_data_array ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , data) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StreamPeerBuffer { } unsafe impl GodotObject for StreamPeerBuffer { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamPeerBuffer" } } impl std :: ops :: Deref for StreamPeerBuffer { type Target = crate :: generated :: StreamPeer ; # [inline] fn deref (& self) -> & crate :: generated :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamPeerBuffer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: StreamPeer > for StreamPeerBuffer { } unsafe impl SubClass < crate :: generated :: Reference > for StreamPeerBuffer { } unsafe impl SubClass < crate :: generated :: Object > for StreamPeerBuffer { } impl Instanciable for StreamPeerBuffer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { StreamPeerBuffer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StreamPeerBufferMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub duplicate : * mut sys :: godot_method_bind , pub get_data_array : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub resize : * mut sys :: godot_method_bind , pub seek : * mut sys :: godot_method_bind , pub set_data_array : * mut sys :: godot_method_bind } impl StreamPeerBufferMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StreamPeerBufferMethodTable = StreamPeerBufferMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , duplicate : 0 as * mut sys :: godot_method_bind , get_data_array : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , resize : 0 as * mut sys :: godot_method_bind , seek : 0 as * mut sys :: godot_method_bind , set_data_array : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { StreamPeerBufferMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StreamPeerBuffer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . duplicate = (gd_api . godot_method_bind_get_method) (class_name , "duplicate\0" . as_ptr () as * const c_char) ; table . get_data_array = (gd_api . godot_method_bind_get_method) (class_name , "get_data_array\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . resize = (gd_api . godot_method_bind_get_method) (class_name , "resize\0" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\0" . as_ptr () as * const c_char) ; table . set_data_array = (gd_api . godot_method_bind_get_method) (class_name , "set_data_array\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::stream_peer_buffer::private::StreamPeerBuffer;
            
            pub(crate) mod stream_peer_gdnative {
                # ! [doc = "This module contains types related to the API class [`StreamPeerGDNative`][super::StreamPeerGDNative]."] pub (crate) mod private { # [doc = "`core class StreamPeerGDNative` inherits `StreamPeer` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_streampeergdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStreamPeerGDNative inherits methods from:\n - [StreamPeer](struct.StreamPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StreamPeerGDNative { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: StreamPeerGDNative ; impl StreamPeerGDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StreamPeerGDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for StreamPeerGDNative { } unsafe impl GodotObject for StreamPeerGDNative { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamPeerGDNative" } } impl std :: ops :: Deref for StreamPeerGDNative { type Target = crate :: generated :: StreamPeer ; # [inline] fn deref (& self) -> & crate :: generated :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamPeerGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: StreamPeer > for StreamPeerGDNative { } unsafe impl SubClass < crate :: generated :: Reference > for StreamPeerGDNative { } unsafe impl SubClass < crate :: generated :: Object > for StreamPeerGDNative { } impl Instanciable for StreamPeerGDNative { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { StreamPeerGDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StreamPeerGDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl StreamPeerGDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StreamPeerGDNativeMethodTable = StreamPeerGDNativeMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { StreamPeerGDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StreamPeerGDNative\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::stream_peer_gdnative::private::StreamPeerGDNative;
            
            pub mod stream_peer_ssl {
                # ! [doc = "This module contains types related to the API class [`StreamPeerSSL`][super::StreamPeerSSL]."] pub (crate) mod private { # [doc = "`core class StreamPeerSSL` inherits `StreamPeer` (reference-counted).\n\nThis class has related types in the [`stream_peer_ssl`][super::stream_peer_ssl] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_streampeerssl.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStreamPeerSSL inherits methods from:\n - [StreamPeer](struct.StreamPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StreamPeerSSL { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: StreamPeerSSL ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Status (pub i64) ; impl Status { pub const DISCONNECTED : Status = Status (0i64) ; pub const HANDSHAKING : Status = Status (1i64) ; pub const CONNECTED : Status = Status (2i64) ; pub const ERROR : Status = Status (3i64) ; pub const ERROR_HOSTNAME_MISMATCH : Status = Status (4i64) ; } impl From < i64 > for Status { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Status > for i64 { # [inline] fn from (v : Status) -> Self { v . 0 } } impl FromVariant for Status { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl StreamPeerSSL { pub const STATUS_DISCONNECTED : i64 = 0i64 ; pub const STATUS_HANDSHAKING : i64 = 1i64 ; pub const STATUS_CONNECTED : i64 = 2i64 ; pub const STATUS_ERROR : i64 = 3i64 ; pub const STATUS_ERROR_HOSTNAME_MISMATCH : i64 = 4i64 ; } impl StreamPeerSSL { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StreamPeerSSLMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Accepts a peer connection as a server using the given `private_key` and providing the given `certificate` to the client. You can pass the optional `chain` parameter to provide additional CA chain information along with the certificate.\n# Default Arguments\n* `chain` - `null`"] # [doc = ""] # [inline] pub fn accept_stream (& self , stream : impl AsArg < crate :: generated :: StreamPeer > , private_key : impl AsArg < crate :: generated :: CryptoKey > , certificate : impl AsArg < crate :: generated :: X509Certificate > , chain : impl AsArg < crate :: generated :: X509Certificate >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . accept_stream ; let ret = crate :: icalls :: icallvar__obj_obj_obj_obj (method_bind , self . this . sys () . as_ptr () , stream . as_arg_ptr () , private_key . as_arg_ptr () , certificate . as_arg_ptr () , chain . as_arg_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Connects to a peer using an underlying [`StreamPeer`][StreamPeer] `stream`. If `validate_certs` is `true`, [`StreamPeerSSL`][StreamPeerSSL] will validate that the certificate presented by the peer matches the `for_hostname`.\n**Note:** Specifying a custom `valid_certificate` is not supported in HTML5 exports due to browsers restrictions.\n# Default Arguments\n* `validate_certs` - `false`\n* `for_hostname` - `\"\"`\n* `valid_certificate` - `null`"] # [doc = ""] # [inline] pub fn connect_to_stream (& self , stream : impl AsArg < crate :: generated :: StreamPeer > , validate_certs : bool , for_hostname : impl Into < GodotString > , valid_certificate : impl AsArg < crate :: generated :: X509Certificate >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . connect_to_stream ; let ret = crate :: icalls :: icallvar__obj_bool_str_obj (method_bind , self . this . sys () . as_ptr () , stream . as_arg_ptr () , validate_certs as _ , for_hostname . into () , valid_certificate . as_arg_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Disconnects from host."] # [doc = ""] # [inline] pub fn disconnect_from_stream (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . disconnect_from_stream ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the status of the connection. See [`Status`][Status] for values."] # [doc = ""] # [inline] pub fn get_status (& self) -> crate :: generated :: stream_peer_ssl :: Status { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . get_status ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: stream_peer_ssl :: Status > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn is_blocking_handshake_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . is_blocking_handshake_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Poll the connection to check for incoming bytes. Call this right before [`StreamPeer.get_available_bytes`][StreamPeer::get_available_bytes] for it to work properly."] # [doc = ""] # [inline] pub fn poll (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_blocking_handshake_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerSSLMethodTable :: get (get_api ()) . set_blocking_handshake_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StreamPeerSSL { } unsafe impl GodotObject for StreamPeerSSL { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamPeerSSL" } } impl std :: ops :: Deref for StreamPeerSSL { type Target = crate :: generated :: StreamPeer ; # [inline] fn deref (& self) -> & crate :: generated :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamPeerSSL { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: StreamPeer > for StreamPeerSSL { } unsafe impl SubClass < crate :: generated :: Reference > for StreamPeerSSL { } unsafe impl SubClass < crate :: generated :: Object > for StreamPeerSSL { } impl Instanciable for StreamPeerSSL { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { StreamPeerSSL :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StreamPeerSSLMethodTable { pub class_constructor : sys :: godot_class_constructor , pub accept_stream : * mut sys :: godot_method_bind , pub connect_to_stream : * mut sys :: godot_method_bind , pub disconnect_from_stream : * mut sys :: godot_method_bind , pub get_status : * mut sys :: godot_method_bind , pub is_blocking_handshake_enabled : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind , pub set_blocking_handshake_enabled : * mut sys :: godot_method_bind } impl StreamPeerSSLMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StreamPeerSSLMethodTable = StreamPeerSSLMethodTable { class_constructor : None , accept_stream : 0 as * mut sys :: godot_method_bind , connect_to_stream : 0 as * mut sys :: godot_method_bind , disconnect_from_stream : 0 as * mut sys :: godot_method_bind , get_status : 0 as * mut sys :: godot_method_bind , is_blocking_handshake_enabled : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind , set_blocking_handshake_enabled : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { StreamPeerSSLMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StreamPeerSSL\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . accept_stream = (gd_api . godot_method_bind_get_method) (class_name , "accept_stream\0" . as_ptr () as * const c_char) ; table . connect_to_stream = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_stream\0" . as_ptr () as * const c_char) ; table . disconnect_from_stream = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_from_stream\0" . as_ptr () as * const c_char) ; table . get_status = (gd_api . godot_method_bind_get_method) (class_name , "get_status\0" . as_ptr () as * const c_char) ; table . is_blocking_handshake_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_blocking_handshake_enabled\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . set_blocking_handshake_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_blocking_handshake_enabled\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::stream_peer_ssl::private::StreamPeerSSL;
            
            pub mod stream_peer_tcp {
                # ! [doc = "This module contains types related to the API class [`StreamPeerTCP`][super::StreamPeerTCP]."] pub (crate) mod private { # [doc = "`core class StreamPeerTCP` inherits `StreamPeer` (reference-counted).\n\nThis class has related types in the [`stream_peer_tcp`][super::stream_peer_tcp] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_streampeertcp.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStreamPeerTCP inherits methods from:\n - [StreamPeer](struct.StreamPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StreamPeerTCP { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: StreamPeerTCP ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Status (pub i64) ; impl Status { pub const NONE : Status = Status (0i64) ; pub const CONNECTING : Status = Status (1i64) ; pub const CONNECTED : Status = Status (2i64) ; pub const ERROR : Status = Status (3i64) ; } impl From < i64 > for Status { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Status > for i64 { # [inline] fn from (v : Status) -> Self { v . 0 } } impl FromVariant for Status { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl StreamPeerTCP { pub const STATUS_NONE : i64 = 0i64 ; pub const STATUS_CONNECTING : i64 = 1i64 ; pub const STATUS_CONNECTED : i64 = 2i64 ; pub const STATUS_ERROR : i64 = 3i64 ; } impl StreamPeerTCP { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StreamPeerTCPMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Connects to the specified `host:port` pair. A hostname will be resolved if valid. Returns [`OK`][Self::OK] on success or [`FAILED`][Self::FAILED] on failure."] # [doc = ""] # [inline] pub fn connect_to_host (& self , host : impl Into < GodotString > , port : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerTCPMethodTable :: get (get_api ()) . connect_to_host ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , host . into () , port as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Disconnects from host."] # [doc = ""] # [inline] pub fn disconnect_from_host (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerTCPMethodTable :: get (get_api ()) . disconnect_from_host ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the IP of this peer."] # [doc = ""] # [inline] pub fn get_connected_host (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerTCPMethodTable :: get (get_api ()) . get_connected_host ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the port of this peer."] # [doc = ""] # [inline] pub fn get_connected_port (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerTCPMethodTable :: get (get_api ()) . get_connected_port ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the status of the connection, see [`Status`][Status]."] # [doc = ""] # [inline] pub fn get_status (& self) -> crate :: generated :: stream_peer_tcp :: Status { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerTCPMethodTable :: get (get_api ()) . get_status ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: stream_peer_tcp :: Status > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if this peer is currently connected or is connecting to a host, `false` otherwise."] # [doc = ""] # [inline] pub fn is_connected_to_host (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerTCPMethodTable :: get (get_api ()) . is_connected_to_host ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `enabled` is `true`, packets will be sent immediately. If `enabled` is `false` (the default), packet transfers will be delayed and combined using [Nagle's algorithm](https://en.wikipedia.org/wiki/Nagle%27s_algorithm).\n**Note:** It's recommended to leave this disabled for applications that send large packets or need to transfer a lot of data, as enabling this can decrease the total available bandwidth."] # [doc = ""] # [inline] pub fn set_no_delay (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamPeerTCPMethodTable :: get (get_api ()) . set_no_delay ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StreamPeerTCP { } unsafe impl GodotObject for StreamPeerTCP { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamPeerTCP" } } impl std :: ops :: Deref for StreamPeerTCP { type Target = crate :: generated :: StreamPeer ; # [inline] fn deref (& self) -> & crate :: generated :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamPeerTCP { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: StreamPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: StreamPeer > for StreamPeerTCP { } unsafe impl SubClass < crate :: generated :: Reference > for StreamPeerTCP { } unsafe impl SubClass < crate :: generated :: Object > for StreamPeerTCP { } impl Instanciable for StreamPeerTCP { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { StreamPeerTCP :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StreamPeerTCPMethodTable { pub class_constructor : sys :: godot_class_constructor , pub connect_to_host : * mut sys :: godot_method_bind , pub disconnect_from_host : * mut sys :: godot_method_bind , pub get_connected_host : * mut sys :: godot_method_bind , pub get_connected_port : * mut sys :: godot_method_bind , pub get_status : * mut sys :: godot_method_bind , pub is_connected_to_host : * mut sys :: godot_method_bind , pub set_no_delay : * mut sys :: godot_method_bind } impl StreamPeerTCPMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StreamPeerTCPMethodTable = StreamPeerTCPMethodTable { class_constructor : None , connect_to_host : 0 as * mut sys :: godot_method_bind , disconnect_from_host : 0 as * mut sys :: godot_method_bind , get_connected_host : 0 as * mut sys :: godot_method_bind , get_connected_port : 0 as * mut sys :: godot_method_bind , get_status : 0 as * mut sys :: godot_method_bind , is_connected_to_host : 0 as * mut sys :: godot_method_bind , set_no_delay : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { StreamPeerTCPMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StreamPeerTCP\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . connect_to_host = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_host\0" . as_ptr () as * const c_char) ; table . disconnect_from_host = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_from_host\0" . as_ptr () as * const c_char) ; table . get_connected_host = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_host\0" . as_ptr () as * const c_char) ; table . get_connected_port = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_port\0" . as_ptr () as * const c_char) ; table . get_status = (gd_api . godot_method_bind_get_method) (class_name , "get_status\0" . as_ptr () as * const c_char) ; table . is_connected_to_host = (gd_api . godot_method_bind_get_method) (class_name , "is_connected_to_host\0" . as_ptr () as * const c_char) ; table . set_no_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_no_delay\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::stream_peer_tcp::private::StreamPeerTCP;
            
            pub(crate) mod stream_texture {
                # ! [doc = "This module contains types related to the API class [`StreamTexture`][super::StreamTexture]."] pub (crate) mod private { # [doc = "`core class StreamTexture` inherits `Texture` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_streamtexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStreamTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StreamTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: StreamTexture ; impl StreamTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StreamTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The StreamTexture's file path to a `.stex` file."] # [doc = ""] # [inline] pub fn load_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamTextureMethodTable :: get (get_api ()) . get_load_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Loads the texture from the given path."] # [doc = ""] # [inline] pub fn load (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = StreamTextureMethodTable :: get (get_api ()) . load ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } } impl gdnative_core :: private :: godot_object :: Sealed for StreamTexture { } unsafe impl GodotObject for StreamTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StreamTexture" } } impl std :: ops :: Deref for StreamTexture { type Target = crate :: generated :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StreamTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Texture > for StreamTexture { } unsafe impl SubClass < crate :: generated :: Resource > for StreamTexture { } unsafe impl SubClass < crate :: generated :: Reference > for StreamTexture { } unsafe impl SubClass < crate :: generated :: Object > for StreamTexture { } impl Instanciable for StreamTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { StreamTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StreamTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_load_path : * mut sys :: godot_method_bind , pub load : * mut sys :: godot_method_bind } impl StreamTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StreamTextureMethodTable = StreamTextureMethodTable { class_constructor : None , get_load_path : 0 as * mut sys :: godot_method_bind , load : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { StreamTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StreamTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_load_path = (gd_api . godot_method_bind_get_method) (class_name , "get_load_path\0" . as_ptr () as * const c_char) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::stream_texture::private::StreamTexture;
            
            pub(crate) mod style_box {
                # ! [doc = "This module contains types related to the API class [`StyleBox`][super::StyleBox]."] pub (crate) mod private { # [doc = "`core class StyleBox` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_stylebox.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStyleBox inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StyleBox { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: StyleBox ; impl StyleBox { # [doc = "Draws this stylebox using a canvas item identified by the given [`RID`][Rid].\nThe [`RID`][Rid] value can either be the result of [`CanvasItem.get_canvas_item`][CanvasItem::get_canvas_item] called on an existing [`CanvasItem`][CanvasItem]-derived node, or directly from creating a canvas item in the [`VisualServer`][VisualServer] with [`VisualServer.canvas_item_create`][VisualServer::canvas_item_create]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn draw (& self , canvas_item : Rid , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . draw ; let ret = crate :: icalls :: icallvar__rid_rect2 (method_bind , self . this . sys () . as_ptr () , canvas_item , rect) ; } } # [doc = "Returns the size of this [`StyleBox`][StyleBox] without the margins."] # [doc = ""] # [inline] pub fn get_center_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_center_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`CanvasItem`][CanvasItem] that handles its [`CanvasItem.NOTIFICATION_DRAW`][CanvasItem::NOTIFICATION_DRAW] or [`CanvasItem._draw`][CanvasItem::_draw] callback at this moment."] # [doc = ""] # [inline] pub fn get_current_item_drawn (& self) -> Option < Ref < crate :: generated :: CanvasItem , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_current_item_drawn ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: CanvasItem , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the default value of the specified [`Margin`][Margin]."] # [doc = ""] # [inline] pub fn default_margin (& self , margin : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_default_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the content margin offset for the specified [`Margin`][Margin].\nPositive values reduce size inwards, unlike [`Control`][Control]'s margin values."] # [doc = ""] # [inline] pub fn get_margin (& self , margin : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the minimum size that this stylebox can be shrunk to."] # [doc = ""] # [inline] pub fn get_minimum_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_minimum_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the \"offset\" of a stylebox. This helper function returns a value equivalent to `Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))`."] # [doc = ""] # [inline] pub fn get_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the default value of the specified [`Margin`][Margin] to given `offset` in pixels."] # [doc = ""] # [inline] pub fn set_default_margin (& self , margin : i64 , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . set_default_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , margin as _ , offset as _) ; } } # [doc = "Test a position in a rectangle, return whether it passes the mask test."] # [doc = ""] # [inline] pub fn test_mask (& self , point : Vector2 , rect : Rect2) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . test_mask ; let ret = crate :: icalls :: icallvar__vec2_rect2 (method_bind , self . this . sys () . as_ptr () , point , rect) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom.\nIf this value is negative, it is ignored and a child-specific margin is used instead. For example for [`StyleBoxFlat`][StyleBoxFlat] the border thickness (if any) is used instead.\nIt is up to the code using this style box to decide what these contents are: for example, a [`Button`][Button] respects this content margin for the textual contents of the button.\n[`get_margin`][Self::get_margin] should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above."] # [doc = ""] # [inline] pub fn content_margin_bottom (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_default_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom.\nIf this value is negative, it is ignored and a child-specific margin is used instead. For example for [`StyleBoxFlat`][StyleBoxFlat] the border thickness (if any) is used instead.\nIt is up to the code using this style box to decide what these contents are: for example, a [`Button`][Button] respects this content margin for the textual contents of the button.\n[`get_margin`][Self::get_margin] should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above."] # [doc = ""] # [inline] pub fn set_content_margin_bottom (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . set_default_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "The left margin for the contents of this style box.\tIncreasing this value reduces the space available to the contents from the left.\nRefer to [`content_margin_bottom`][Self::content_margin_bottom] for extra considerations."] # [doc = ""] # [inline] pub fn content_margin_left (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_default_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The left margin for the contents of this style box.\tIncreasing this value reduces the space available to the contents from the left.\nRefer to [`content_margin_bottom`][Self::content_margin_bottom] for extra considerations."] # [doc = ""] # [inline] pub fn set_content_margin_left (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . set_default_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "The right margin for the contents of this style box. Increasing this value reduces the space available to the contents from the right.\nRefer to [`content_margin_bottom`][Self::content_margin_bottom] for extra considerations."] # [doc = ""] # [inline] pub fn content_margin_right (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_default_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The right margin for the contents of this style box. Increasing this value reduces the space available to the contents from the right.\nRefer to [`content_margin_bottom`][Self::content_margin_bottom] for extra considerations."] # [doc = ""] # [inline] pub fn set_content_margin_right (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . set_default_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top.\nRefer to [`content_margin_bottom`][Self::content_margin_bottom] for extra considerations."] # [doc = ""] # [inline] pub fn content_margin_top (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . get_default_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top.\nRefer to [`content_margin_bottom`][Self::content_margin_bottom] for extra considerations."] # [doc = ""] # [inline] pub fn set_content_margin_top (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxMethodTable :: get (get_api ()) . set_default_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StyleBox { } unsafe impl GodotObject for StyleBox { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StyleBox" } } impl std :: ops :: Deref for StyleBox { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StyleBox { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for StyleBox { } unsafe impl SubClass < crate :: generated :: Reference > for StyleBox { } unsafe impl SubClass < crate :: generated :: Object > for StyleBox { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StyleBoxMethodTable { pub class_constructor : sys :: godot_class_constructor , pub draw : * mut sys :: godot_method_bind , pub get_center_size : * mut sys :: godot_method_bind , pub get_current_item_drawn : * mut sys :: godot_method_bind , pub get_default_margin : * mut sys :: godot_method_bind , pub get_margin : * mut sys :: godot_method_bind , pub get_minimum_size : * mut sys :: godot_method_bind , pub get_offset : * mut sys :: godot_method_bind , pub set_default_margin : * mut sys :: godot_method_bind , pub test_mask : * mut sys :: godot_method_bind } impl StyleBoxMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StyleBoxMethodTable = StyleBoxMethodTable { class_constructor : None , draw : 0 as * mut sys :: godot_method_bind , get_center_size : 0 as * mut sys :: godot_method_bind , get_current_item_drawn : 0 as * mut sys :: godot_method_bind , get_default_margin : 0 as * mut sys :: godot_method_bind , get_margin : 0 as * mut sys :: godot_method_bind , get_minimum_size : 0 as * mut sys :: godot_method_bind , get_offset : 0 as * mut sys :: godot_method_bind , set_default_margin : 0 as * mut sys :: godot_method_bind , test_mask : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { StyleBoxMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StyleBox\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . draw = (gd_api . godot_method_bind_get_method) (class_name , "draw\0" . as_ptr () as * const c_char) ; table . get_center_size = (gd_api . godot_method_bind_get_method) (class_name , "get_center_size\0" . as_ptr () as * const c_char) ; table . get_current_item_drawn = (gd_api . godot_method_bind_get_method) (class_name , "get_current_item_drawn\0" . as_ptr () as * const c_char) ; table . get_default_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_default_margin\0" . as_ptr () as * const c_char) ; table . get_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_margin\0" . as_ptr () as * const c_char) ; table . get_minimum_size = (gd_api . godot_method_bind_get_method) (class_name , "get_minimum_size\0" . as_ptr () as * const c_char) ; table . get_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_offset\0" . as_ptr () as * const c_char) ; table . set_default_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_default_margin\0" . as_ptr () as * const c_char) ; table . test_mask = (gd_api . godot_method_bind_get_method) (class_name , "test_mask\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::style_box::private::StyleBox;
            
            pub(crate) mod style_box_empty {
                # ! [doc = "This module contains types related to the API class [`StyleBoxEmpty`][super::StyleBoxEmpty]."] pub (crate) mod private { # [doc = "`core class StyleBoxEmpty` inherits `StyleBox` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_styleboxempty.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStyleBoxEmpty inherits methods from:\n - [StyleBox](struct.StyleBox.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StyleBoxEmpty { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: StyleBoxEmpty ; impl StyleBoxEmpty { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StyleBoxEmptyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for StyleBoxEmpty { } unsafe impl GodotObject for StyleBoxEmpty { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StyleBoxEmpty" } } impl std :: ops :: Deref for StyleBoxEmpty { type Target = crate :: generated :: StyleBox ; # [inline] fn deref (& self) -> & crate :: generated :: StyleBox { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StyleBoxEmpty { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: StyleBox { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: StyleBox > for StyleBoxEmpty { } unsafe impl SubClass < crate :: generated :: Resource > for StyleBoxEmpty { } unsafe impl SubClass < crate :: generated :: Reference > for StyleBoxEmpty { } unsafe impl SubClass < crate :: generated :: Object > for StyleBoxEmpty { } impl Instanciable for StyleBoxEmpty { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { StyleBoxEmpty :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StyleBoxEmptyMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl StyleBoxEmptyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StyleBoxEmptyMethodTable = StyleBoxEmptyMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { StyleBoxEmptyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StyleBoxEmpty\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::style_box_empty::private::StyleBoxEmpty;
            
            pub(crate) mod style_box_flat {
                # ! [doc = "This module contains types related to the API class [`StyleBoxFlat`][super::StyleBoxFlat]."] pub (crate) mod private { # [doc = "`core class StyleBoxFlat` inherits `StyleBox` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_styleboxflat.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStyleBoxFlat inherits methods from:\n - [StyleBox](struct.StyleBox.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StyleBoxFlat { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: StyleBoxFlat ; impl StyleBoxFlat { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StyleBoxFlatMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "This changes the size of the faded ring. Higher values can be used to achieve a \"blurry\" effect."] # [doc = ""] # [inline] pub fn aa_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_aa_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The background color of the stylebox."] # [doc = ""] # [inline] pub fn bg_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_bg_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the border will fade into the background color."] # [doc = ""] # [inline] pub fn border_blend (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_border_blend ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets the color of the border."] # [doc = ""] # [inline] pub fn border_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_border_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the given `margin`'s border width. See [`Margin`][Margin] for possible values."] # [doc = ""] # [inline] pub fn border_width (& self , margin : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_border_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the smallest border width out of all four borders."] # [doc = ""] # [inline] pub fn get_border_width_min (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_border_width_min ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "This sets the number of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius ([`set_corner_radius_all`][Self::set_corner_radius_all]) into account.\nFor corner radii less than 10, `4` or `5` should be enough. For corner radii less than 30, values between `8` and `12` should be enough.\nA corner detail of `1` will result in chamfered corners instead of rounded corners, which is useful for some artistic effects."] # [doc = ""] # [inline] pub fn corner_detail (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_corner_detail ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the given `corner`'s radius. See [`Corner`][Corner] for possible values."] # [doc = ""] # [inline] pub fn corner_radius (& self , corner : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_corner_radius ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , corner as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the size of the given `margin`'s expand margin. See [`Margin`][Margin] for possible values."] # [doc = ""] # [inline] pub fn expand_margin (& self , margin : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_expand_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The color of the shadow. This has no effect if [`shadow_size`][Self::shadow_size] is lower than 1."] # [doc = ""] # [inline] pub fn shadow_color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_shadow_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The shadow offset in pixels. Adjusts the position of the shadow relatively to the stylebox."] # [doc = ""] # [inline] pub fn shadow_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_shadow_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The shadow size in pixels."] # [doc = ""] # [inline] pub fn shadow_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_shadow_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If set to a non-zero value on either axis, [`skew`][Self::skew] distorts the StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-style UIs. Positive values skew the StyleBox towards the right (X axis) and upwards (Y axis), while negative values skew the StyleBox towards the left (X axis) and downwards (Y axis).\n**Note:** To ensure text does not touch the StyleBox's edges, consider increasing the [`StyleBox`][StyleBox]'s content margin (see [`StyleBox.content_margin_bottom`][StyleBox::content_margin_bottom]). It is preferable to increase the content margin instead of the expand margin (see [`expand_margin_bottom`][Self::expand_margin_bottom]), as increasing the expand margin does not increase the size of the clickable area for [`Control`][Control]s."] # [doc = ""] # [inline] pub fn skew (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_skew ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners or [`skew`][Self::skew].\n**Note:** When using beveled corners with 45-degree angles ([`corner_detail`][Self::corner_detail] = 1), it is recommended to set [`anti_aliasing`][Self::anti_aliasing] to `false` to ensure crisp visuals and avoid possible visual glitches."] # [doc = ""] # [inline] pub fn is_anti_aliased (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . is_anti_aliased ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Toggles drawing of the inner part of the stylebox."] # [doc = ""] # [inline] pub fn is_draw_center_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . is_draw_center_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "This changes the size of the faded ring. Higher values can be used to achieve a \"blurry\" effect."] # [doc = ""] # [inline] pub fn set_aa_size (& self , size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_aa_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } # [doc = "Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners or [`skew`][Self::skew].\n**Note:** When using beveled corners with 45-degree angles ([`corner_detail`][Self::corner_detail] = 1), it is recommended to set [`anti_aliasing`][Self::anti_aliasing] to `false` to ensure crisp visuals and avoid possible visual glitches."] # [doc = ""] # [inline] pub fn set_anti_aliased (& self , anti_aliased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_anti_aliased ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , anti_aliased as _) ; } } # [doc = "The background color of the stylebox."] # [doc = ""] # [inline] pub fn set_bg_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_bg_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "If `true`, the border will fade into the background color."] # [doc = ""] # [inline] pub fn set_border_blend (& self , blend : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_border_blend ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , blend as _) ; } } # [doc = "Sets the color of the border."] # [doc = ""] # [inline] pub fn set_border_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_border_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Sets the border width to `width` pixels for the given `margin`. See [`Margin`][Margin] for possible values."] # [doc = ""] # [inline] pub fn set_border_width (& self , margin : i64 , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_border_width ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , margin as _ , width as _) ; } } # [doc = "Sets the border width to `width` pixels for all margins."] # [doc = ""] # [inline] pub fn set_border_width_all (& self , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_border_width_all ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , width as _) ; } } # [doc = "This sets the number of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius ([`set_corner_radius_all`][Self::set_corner_radius_all]) into account.\nFor corner radii less than 10, `4` or `5` should be enough. For corner radii less than 30, values between `8` and `12` should be enough.\nA corner detail of `1` will result in chamfered corners instead of rounded corners, which is useful for some artistic effects."] # [doc = ""] # [inline] pub fn set_corner_detail (& self , detail : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_corner_detail ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , detail as _) ; } } # [doc = "Sets the corner radius to `radius` pixels for the given `corner`. See [`Corner`][Corner] for possible values."] # [doc = ""] # [inline] pub fn set_corner_radius (& self , corner : i64 , radius : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_corner_radius ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , corner as _ , radius as _) ; } } # [doc = "Sets the corner radius to `radius` pixels for all corners."] # [doc = ""] # [inline] pub fn set_corner_radius_all (& self , radius : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_corner_radius_all ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , radius as _) ; } } # [doc = "Sets the corner radius for each corner to `radius_top_left`, `radius_top_right`, `radius_bottom_right`, and `radius_bottom_left` pixels."] # [doc = ""] # [inline] pub fn set_corner_radius_individual (& self , radius_top_left : i64 , radius_top_right : i64 , radius_bottom_right : i64 , radius_bottom_left : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_corner_radius_individual ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , radius_top_left as _ , radius_top_right as _ , radius_bottom_right as _ , radius_bottom_left as _) ; } } # [doc = "Toggles drawing of the inner part of the stylebox."] # [doc = ""] # [inline] pub fn set_draw_center (& self , draw_center : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_draw_center ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , draw_center as _) ; } } # [doc = "Sets the expand margin to `size` pixels for the given `margin`. See [`Margin`][Margin] for possible values."] # [doc = ""] # [inline] pub fn set_expand_margin (& self , margin : i64 , size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_expand_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , margin as _ , size as _) ; } } # [doc = "Sets the expand margin to `size` pixels for all margins."] # [doc = ""] # [inline] pub fn set_expand_margin_all (& self , size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_expand_margin_all ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } # [doc = "Sets the expand margin for each margin to `size_left`, `size_top`, `size_right`, and `size_bottom` pixels."] # [doc = ""] # [inline] pub fn set_expand_margin_individual (& self , size_left : f64 , size_top : f64 , size_right : f64 , size_bottom : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_expand_margin_individual ; let ret = crate :: icalls :: icallvar__f64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , size_left as _ , size_top as _ , size_right as _ , size_bottom as _) ; } } # [doc = "The color of the shadow. This has no effect if [`shadow_size`][Self::shadow_size] is lower than 1."] # [doc = ""] # [inline] pub fn set_shadow_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_shadow_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The shadow offset in pixels. Adjusts the position of the shadow relatively to the stylebox."] # [doc = ""] # [inline] pub fn set_shadow_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_shadow_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "The shadow size in pixels."] # [doc = ""] # [inline] pub fn set_shadow_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_shadow_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } # [doc = "If set to a non-zero value on either axis, [`skew`][Self::skew] distorts the StyleBox horizontally and/or vertically. This can be used for \"futuristic\"-style UIs. Positive values skew the StyleBox towards the right (X axis) and upwards (Y axis), while negative values skew the StyleBox towards the left (X axis) and downwards (Y axis).\n**Note:** To ensure text does not touch the StyleBox's edges, consider increasing the [`StyleBox`][StyleBox]'s content margin (see [`StyleBox.content_margin_bottom`][StyleBox::content_margin_bottom]). It is preferable to increase the content margin instead of the expand margin (see [`expand_margin_bottom`][Self::expand_margin_bottom]), as increasing the expand margin does not increase the size of the clickable area for [`Control`][Control]s."] # [doc = ""] # [inline] pub fn set_skew (& self , skew : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_skew ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , skew) ; } } # [doc = "Border width for the bottom border."] # [doc = ""] # [inline] pub fn border_width_bottom (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_border_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Border width for the bottom border."] # [doc = ""] # [inline] pub fn set_border_width_bottom (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_border_width ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Border width for the left border."] # [doc = ""] # [inline] pub fn border_width_left (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_border_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Border width for the left border."] # [doc = ""] # [inline] pub fn set_border_width_left (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_border_width ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "Border width for the right border."] # [doc = ""] # [inline] pub fn border_width_right (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_border_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Border width for the right border."] # [doc = ""] # [inline] pub fn set_border_width_right (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_border_width ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Border width for the top border."] # [doc = ""] # [inline] pub fn border_width_top (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_border_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Border width for the top border."] # [doc = ""] # [inline] pub fn set_border_width_top (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_border_width ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "The bottom-left corner's radius. If `0`, the corner is not rounded."] # [doc = ""] # [inline] pub fn corner_radius_bottom_left (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_corner_radius ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The bottom-left corner's radius. If `0`, the corner is not rounded."] # [doc = ""] # [inline] pub fn set_corner_radius_bottom_left (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_corner_radius ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "The bottom-right corner's radius. If `0`, the corner is not rounded."] # [doc = ""] # [inline] pub fn corner_radius_bottom_right (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_corner_radius ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The bottom-right corner's radius. If `0`, the corner is not rounded."] # [doc = ""] # [inline] pub fn set_corner_radius_bottom_right (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_corner_radius ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "The top-left corner's radius. If `0`, the corner is not rounded."] # [doc = ""] # [inline] pub fn corner_radius_top_left (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_corner_radius ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The top-left corner's radius. If `0`, the corner is not rounded."] # [doc = ""] # [inline] pub fn set_corner_radius_top_left (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_corner_radius ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "The top-right corner's radius. If `0`, the corner is not rounded."] # [doc = ""] # [inline] pub fn corner_radius_top_right (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_corner_radius ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The top-right corner's radius. If `0`, the corner is not rounded."] # [doc = ""] # [inline] pub fn set_corner_radius_top_right (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_corner_radius ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with [`border_width_bottom`][Self::border_width_bottom] to draw a border outside the control rect.\n**Note:** Unlike [`StyleBox.content_margin_bottom`][StyleBox::content_margin_bottom], [`expand_margin_bottom`][Self::expand_margin_bottom] does _not_ affect the size of the clickable area for [`Control`][Control]s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks."] # [doc = ""] # [inline] pub fn expand_margin_bottom (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_expand_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with [`border_width_bottom`][Self::border_width_bottom] to draw a border outside the control rect.\n**Note:** Unlike [`StyleBox.content_margin_bottom`][StyleBox::content_margin_bottom], [`expand_margin_bottom`][Self::expand_margin_bottom] does _not_ affect the size of the clickable area for [`Control`][Control]s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks."] # [doc = ""] # [inline] pub fn set_expand_margin_bottom (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_expand_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Expands the stylebox outside of the control rect on the left edge. Useful in combination with [`border_width_left`][Self::border_width_left] to draw a border outside the control rect.\n**Note:** Unlike [`StyleBox.content_margin_left`][StyleBox::content_margin_left], [`expand_margin_left`][Self::expand_margin_left] does _not_ affect the size of the clickable area for [`Control`][Control]s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks."] # [doc = ""] # [inline] pub fn expand_margin_left (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_expand_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Expands the stylebox outside of the control rect on the left edge. Useful in combination with [`border_width_left`][Self::border_width_left] to draw a border outside the control rect.\n**Note:** Unlike [`StyleBox.content_margin_left`][StyleBox::content_margin_left], [`expand_margin_left`][Self::expand_margin_left] does _not_ affect the size of the clickable area for [`Control`][Control]s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks."] # [doc = ""] # [inline] pub fn set_expand_margin_left (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_expand_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "Expands the stylebox outside of the control rect on the right edge. Useful in combination with [`border_width_right`][Self::border_width_right] to draw a border outside the control rect.\n**Note:** Unlike [`StyleBox.content_margin_right`][StyleBox::content_margin_right], [`expand_margin_right`][Self::expand_margin_right] does _not_ affect the size of the clickable area for [`Control`][Control]s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks."] # [doc = ""] # [inline] pub fn expand_margin_right (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_expand_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Expands the stylebox outside of the control rect on the right edge. Useful in combination with [`border_width_right`][Self::border_width_right] to draw a border outside the control rect.\n**Note:** Unlike [`StyleBox.content_margin_right`][StyleBox::content_margin_right], [`expand_margin_right`][Self::expand_margin_right] does _not_ affect the size of the clickable area for [`Control`][Control]s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks."] # [doc = ""] # [inline] pub fn set_expand_margin_right (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_expand_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Expands the stylebox outside of the control rect on the top edge. Useful in combination with [`border_width_top`][Self::border_width_top] to draw a border outside the control rect.\n**Note:** Unlike [`StyleBox.content_margin_top`][StyleBox::content_margin_top], [`expand_margin_top`][Self::expand_margin_top] does _not_ affect the size of the clickable area for [`Control`][Control]s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks."] # [doc = ""] # [inline] pub fn expand_margin_top (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . get_expand_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Expands the stylebox outside of the control rect on the top edge. Useful in combination with [`border_width_top`][Self::border_width_top] to draw a border outside the control rect.\n**Note:** Unlike [`StyleBox.content_margin_top`][StyleBox::content_margin_top], [`expand_margin_top`][Self::expand_margin_top] does _not_ affect the size of the clickable area for [`Control`][Control]s. This can negatively impact usability if used wrong, as the user may try to click an area of the StyleBox that cannot actually receive clicks."] # [doc = ""] # [inline] pub fn set_expand_margin_top (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxFlatMethodTable :: get (get_api ()) . set_expand_margin ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StyleBoxFlat { } unsafe impl GodotObject for StyleBoxFlat { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StyleBoxFlat" } } impl std :: ops :: Deref for StyleBoxFlat { type Target = crate :: generated :: StyleBox ; # [inline] fn deref (& self) -> & crate :: generated :: StyleBox { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StyleBoxFlat { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: StyleBox { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: StyleBox > for StyleBoxFlat { } unsafe impl SubClass < crate :: generated :: Resource > for StyleBoxFlat { } unsafe impl SubClass < crate :: generated :: Reference > for StyleBoxFlat { } unsafe impl SubClass < crate :: generated :: Object > for StyleBoxFlat { } impl Instanciable for StyleBoxFlat { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { StyleBoxFlat :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StyleBoxFlatMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_aa_size : * mut sys :: godot_method_bind , pub get_bg_color : * mut sys :: godot_method_bind , pub get_border_blend : * mut sys :: godot_method_bind , pub get_border_color : * mut sys :: godot_method_bind , pub get_border_width : * mut sys :: godot_method_bind , pub get_border_width_min : * mut sys :: godot_method_bind , pub get_corner_detail : * mut sys :: godot_method_bind , pub get_corner_radius : * mut sys :: godot_method_bind , pub get_expand_margin : * mut sys :: godot_method_bind , pub get_shadow_color : * mut sys :: godot_method_bind , pub get_shadow_offset : * mut sys :: godot_method_bind , pub get_shadow_size : * mut sys :: godot_method_bind , pub get_skew : * mut sys :: godot_method_bind , pub is_anti_aliased : * mut sys :: godot_method_bind , pub is_draw_center_enabled : * mut sys :: godot_method_bind , pub set_aa_size : * mut sys :: godot_method_bind , pub set_anti_aliased : * mut sys :: godot_method_bind , pub set_bg_color : * mut sys :: godot_method_bind , pub set_border_blend : * mut sys :: godot_method_bind , pub set_border_color : * mut sys :: godot_method_bind , pub set_border_width : * mut sys :: godot_method_bind , pub set_border_width_all : * mut sys :: godot_method_bind , pub set_corner_detail : * mut sys :: godot_method_bind , pub set_corner_radius : * mut sys :: godot_method_bind , pub set_corner_radius_all : * mut sys :: godot_method_bind , pub set_corner_radius_individual : * mut sys :: godot_method_bind , pub set_draw_center : * mut sys :: godot_method_bind , pub set_expand_margin : * mut sys :: godot_method_bind , pub set_expand_margin_all : * mut sys :: godot_method_bind , pub set_expand_margin_individual : * mut sys :: godot_method_bind , pub set_shadow_color : * mut sys :: godot_method_bind , pub set_shadow_offset : * mut sys :: godot_method_bind , pub set_shadow_size : * mut sys :: godot_method_bind , pub set_skew : * mut sys :: godot_method_bind } impl StyleBoxFlatMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StyleBoxFlatMethodTable = StyleBoxFlatMethodTable { class_constructor : None , get_aa_size : 0 as * mut sys :: godot_method_bind , get_bg_color : 0 as * mut sys :: godot_method_bind , get_border_blend : 0 as * mut sys :: godot_method_bind , get_border_color : 0 as * mut sys :: godot_method_bind , get_border_width : 0 as * mut sys :: godot_method_bind , get_border_width_min : 0 as * mut sys :: godot_method_bind , get_corner_detail : 0 as * mut sys :: godot_method_bind , get_corner_radius : 0 as * mut sys :: godot_method_bind , get_expand_margin : 0 as * mut sys :: godot_method_bind , get_shadow_color : 0 as * mut sys :: godot_method_bind , get_shadow_offset : 0 as * mut sys :: godot_method_bind , get_shadow_size : 0 as * mut sys :: godot_method_bind , get_skew : 0 as * mut sys :: godot_method_bind , is_anti_aliased : 0 as * mut sys :: godot_method_bind , is_draw_center_enabled : 0 as * mut sys :: godot_method_bind , set_aa_size : 0 as * mut sys :: godot_method_bind , set_anti_aliased : 0 as * mut sys :: godot_method_bind , set_bg_color : 0 as * mut sys :: godot_method_bind , set_border_blend : 0 as * mut sys :: godot_method_bind , set_border_color : 0 as * mut sys :: godot_method_bind , set_border_width : 0 as * mut sys :: godot_method_bind , set_border_width_all : 0 as * mut sys :: godot_method_bind , set_corner_detail : 0 as * mut sys :: godot_method_bind , set_corner_radius : 0 as * mut sys :: godot_method_bind , set_corner_radius_all : 0 as * mut sys :: godot_method_bind , set_corner_radius_individual : 0 as * mut sys :: godot_method_bind , set_draw_center : 0 as * mut sys :: godot_method_bind , set_expand_margin : 0 as * mut sys :: godot_method_bind , set_expand_margin_all : 0 as * mut sys :: godot_method_bind , set_expand_margin_individual : 0 as * mut sys :: godot_method_bind , set_shadow_color : 0 as * mut sys :: godot_method_bind , set_shadow_offset : 0 as * mut sys :: godot_method_bind , set_shadow_size : 0 as * mut sys :: godot_method_bind , set_skew : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { StyleBoxFlatMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StyleBoxFlat\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_aa_size = (gd_api . godot_method_bind_get_method) (class_name , "get_aa_size\0" . as_ptr () as * const c_char) ; table . get_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "get_bg_color\0" . as_ptr () as * const c_char) ; table . get_border_blend = (gd_api . godot_method_bind_get_method) (class_name , "get_border_blend\0" . as_ptr () as * const c_char) ; table . get_border_color = (gd_api . godot_method_bind_get_method) (class_name , "get_border_color\0" . as_ptr () as * const c_char) ; table . get_border_width = (gd_api . godot_method_bind_get_method) (class_name , "get_border_width\0" . as_ptr () as * const c_char) ; table . get_border_width_min = (gd_api . godot_method_bind_get_method) (class_name , "get_border_width_min\0" . as_ptr () as * const c_char) ; table . get_corner_detail = (gd_api . godot_method_bind_get_method) (class_name , "get_corner_detail\0" . as_ptr () as * const c_char) ; table . get_corner_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_corner_radius\0" . as_ptr () as * const c_char) ; table . get_expand_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_expand_margin\0" . as_ptr () as * const c_char) ; table . get_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_color\0" . as_ptr () as * const c_char) ; table . get_shadow_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_offset\0" . as_ptr () as * const c_char) ; table . get_shadow_size = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_size\0" . as_ptr () as * const c_char) ; table . get_skew = (gd_api . godot_method_bind_get_method) (class_name , "get_skew\0" . as_ptr () as * const c_char) ; table . is_anti_aliased = (gd_api . godot_method_bind_get_method) (class_name , "is_anti_aliased\0" . as_ptr () as * const c_char) ; table . is_draw_center_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_draw_center_enabled\0" . as_ptr () as * const c_char) ; table . set_aa_size = (gd_api . godot_method_bind_get_method) (class_name , "set_aa_size\0" . as_ptr () as * const c_char) ; table . set_anti_aliased = (gd_api . godot_method_bind_get_method) (class_name , "set_anti_aliased\0" . as_ptr () as * const c_char) ; table . set_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "set_bg_color\0" . as_ptr () as * const c_char) ; table . set_border_blend = (gd_api . godot_method_bind_get_method) (class_name , "set_border_blend\0" . as_ptr () as * const c_char) ; table . set_border_color = (gd_api . godot_method_bind_get_method) (class_name , "set_border_color\0" . as_ptr () as * const c_char) ; table . set_border_width = (gd_api . godot_method_bind_get_method) (class_name , "set_border_width\0" . as_ptr () as * const c_char) ; table . set_border_width_all = (gd_api . godot_method_bind_get_method) (class_name , "set_border_width_all\0" . as_ptr () as * const c_char) ; table . set_corner_detail = (gd_api . godot_method_bind_get_method) (class_name , "set_corner_detail\0" . as_ptr () as * const c_char) ; table . set_corner_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_corner_radius\0" . as_ptr () as * const c_char) ; table . set_corner_radius_all = (gd_api . godot_method_bind_get_method) (class_name , "set_corner_radius_all\0" . as_ptr () as * const c_char) ; table . set_corner_radius_individual = (gd_api . godot_method_bind_get_method) (class_name , "set_corner_radius_individual\0" . as_ptr () as * const c_char) ; table . set_draw_center = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_center\0" . as_ptr () as * const c_char) ; table . set_expand_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_margin\0" . as_ptr () as * const c_char) ; table . set_expand_margin_all = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_margin_all\0" . as_ptr () as * const c_char) ; table . set_expand_margin_individual = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_margin_individual\0" . as_ptr () as * const c_char) ; table . set_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_color\0" . as_ptr () as * const c_char) ; table . set_shadow_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_offset\0" . as_ptr () as * const c_char) ; table . set_shadow_size = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_size\0" . as_ptr () as * const c_char) ; table . set_skew = (gd_api . godot_method_bind_get_method) (class_name , "set_skew\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::style_box_flat::private::StyleBoxFlat;
            
            pub(crate) mod style_box_line {
                # ! [doc = "This module contains types related to the API class [`StyleBoxLine`][super::StyleBoxLine]."] pub (crate) mod private { # [doc = "`core class StyleBoxLine` inherits `StyleBox` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_styleboxline.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStyleBoxLine inherits methods from:\n - [StyleBox](struct.StyleBox.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StyleBoxLine { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: StyleBoxLine ; impl StyleBoxLine { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StyleBoxLineMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The line's color."] # [doc = ""] # [inline] pub fn color (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxLineMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The number of pixels the line will extend before the [`StyleBoxLine`][StyleBoxLine]'s bounds. If set to a negative value, the line will begin inside the [`StyleBoxLine`][StyleBoxLine]'s bounds."] # [doc = ""] # [inline] pub fn grow_begin (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxLineMethodTable :: get (get_api ()) . get_grow_begin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The number of pixels the line will extend past the [`StyleBoxLine`][StyleBoxLine]'s bounds. If set to a negative value, the line will end inside the [`StyleBoxLine`][StyleBoxLine]'s bounds."] # [doc = ""] # [inline] pub fn grow_end (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxLineMethodTable :: get (get_api ()) . get_grow_end ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The line's thickness in pixels."] # [doc = ""] # [inline] pub fn thickness (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxLineMethodTable :: get (get_api ()) . get_thickness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the line will be vertical. If `false`, the line will be horizontal."] # [doc = ""] # [inline] pub fn is_vertical (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxLineMethodTable :: get (get_api ()) . is_vertical ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The line's color."] # [doc = ""] # [inline] pub fn set_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxLineMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The number of pixels the line will extend before the [`StyleBoxLine`][StyleBoxLine]'s bounds. If set to a negative value, the line will begin inside the [`StyleBoxLine`][StyleBoxLine]'s bounds."] # [doc = ""] # [inline] pub fn set_grow_begin (& self , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxLineMethodTable :: get (get_api ()) . set_grow_begin ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , offset as _) ; } } # [doc = "The number of pixels the line will extend past the [`StyleBoxLine`][StyleBoxLine]'s bounds. If set to a negative value, the line will end inside the [`StyleBoxLine`][StyleBoxLine]'s bounds."] # [doc = ""] # [inline] pub fn set_grow_end (& self , offset : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxLineMethodTable :: get (get_api ()) . set_grow_end ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , offset as _) ; } } # [doc = "The line's thickness in pixels."] # [doc = ""] # [inline] pub fn set_thickness (& self , thickness : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxLineMethodTable :: get (get_api ()) . set_thickness ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , thickness as _) ; } } # [doc = "If `true`, the line will be vertical. If `false`, the line will be horizontal."] # [doc = ""] # [inline] pub fn set_vertical (& self , vertical : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxLineMethodTable :: get (get_api ()) . set_vertical ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , vertical as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StyleBoxLine { } unsafe impl GodotObject for StyleBoxLine { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StyleBoxLine" } } impl std :: ops :: Deref for StyleBoxLine { type Target = crate :: generated :: StyleBox ; # [inline] fn deref (& self) -> & crate :: generated :: StyleBox { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StyleBoxLine { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: StyleBox { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: StyleBox > for StyleBoxLine { } unsafe impl SubClass < crate :: generated :: Resource > for StyleBoxLine { } unsafe impl SubClass < crate :: generated :: Reference > for StyleBoxLine { } unsafe impl SubClass < crate :: generated :: Object > for StyleBoxLine { } impl Instanciable for StyleBoxLine { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { StyleBoxLine :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StyleBoxLineMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_color : * mut sys :: godot_method_bind , pub get_grow_begin : * mut sys :: godot_method_bind , pub get_grow_end : * mut sys :: godot_method_bind , pub get_thickness : * mut sys :: godot_method_bind , pub is_vertical : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_grow_begin : * mut sys :: godot_method_bind , pub set_grow_end : * mut sys :: godot_method_bind , pub set_thickness : * mut sys :: godot_method_bind , pub set_vertical : * mut sys :: godot_method_bind } impl StyleBoxLineMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StyleBoxLineMethodTable = StyleBoxLineMethodTable { class_constructor : None , get_color : 0 as * mut sys :: godot_method_bind , get_grow_begin : 0 as * mut sys :: godot_method_bind , get_grow_end : 0 as * mut sys :: godot_method_bind , get_thickness : 0 as * mut sys :: godot_method_bind , is_vertical : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_grow_begin : 0 as * mut sys :: godot_method_bind , set_grow_end : 0 as * mut sys :: godot_method_bind , set_thickness : 0 as * mut sys :: godot_method_bind , set_vertical : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { StyleBoxLineMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StyleBoxLine\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_grow_begin = (gd_api . godot_method_bind_get_method) (class_name , "get_grow_begin\0" . as_ptr () as * const c_char) ; table . get_grow_end = (gd_api . godot_method_bind_get_method) (class_name , "get_grow_end\0" . as_ptr () as * const c_char) ; table . get_thickness = (gd_api . godot_method_bind_get_method) (class_name , "get_thickness\0" . as_ptr () as * const c_char) ; table . is_vertical = (gd_api . godot_method_bind_get_method) (class_name , "is_vertical\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_grow_begin = (gd_api . godot_method_bind_get_method) (class_name , "set_grow_begin\0" . as_ptr () as * const c_char) ; table . set_grow_end = (gd_api . godot_method_bind_get_method) (class_name , "set_grow_end\0" . as_ptr () as * const c_char) ; table . set_thickness = (gd_api . godot_method_bind_get_method) (class_name , "set_thickness\0" . as_ptr () as * const c_char) ; table . set_vertical = (gd_api . godot_method_bind_get_method) (class_name , "set_vertical\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::style_box_line::private::StyleBoxLine;
            
            pub mod style_box_texture {
                # ! [doc = "This module contains types related to the API class [`StyleBoxTexture`][super::StyleBoxTexture]."] pub (crate) mod private { # [doc = "`core class StyleBoxTexture` inherits `StyleBox` (reference-counted).\n\nThis class has related types in the [`style_box_texture`][super::style_box_texture] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_styleboxtexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nStyleBoxTexture inherits methods from:\n - [StyleBox](struct.StyleBox.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct StyleBoxTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: StyleBoxTexture ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AxisStretchMode (pub i64) ; impl AxisStretchMode { pub const STRETCH : AxisStretchMode = AxisStretchMode (0i64) ; pub const TILE : AxisStretchMode = AxisStretchMode (1i64) ; pub const TILE_FIT : AxisStretchMode = AxisStretchMode (2i64) ; } impl From < i64 > for AxisStretchMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AxisStretchMode > for i64 { # [inline] fn from (v : AxisStretchMode) -> Self { v . 0 } } impl FromVariant for AxisStretchMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl StyleBoxTexture { pub const AXIS_STRETCH_MODE_STRETCH : i64 = 0i64 ; pub const AXIS_STRETCH_MODE_TILE : i64 = 1i64 ; pub const AXIS_STRETCH_MODE_TILE_FIT : i64 = 2i64 ; } impl StyleBoxTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = StyleBoxTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the size of the given `margin`'s expand margin. See [`Margin`][Margin] for possible values."] # [doc = ""] # [inline] pub fn expand_margin_size (& self , margin : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_expand_margin_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Controls how the stylebox's texture will be stretched or tiled horizontally. See [`AxisStretchMode`][AxisStretchMode] for possible values."] # [doc = ""] # [inline] pub fn h_axis_stretch_mode (& self) -> crate :: generated :: style_box_texture :: AxisStretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_h_axis_stretch_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: style_box_texture :: AxisStretchMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the size of the given `margin`. See [`Margin`][Margin] for possible values."] # [doc = ""] # [inline] pub fn margin_size (& self , margin : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_margin_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Modulates the color of the texture when this style box is drawn."] # [doc = ""] # [inline] pub fn modulate (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_modulate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The normal map to use when drawing this style box.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn normal_map (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_normal_map ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Species a sub-region of the texture to use.\nThis is equivalent to first wrapping the texture in an [`AtlasTexture`][AtlasTexture] with the same region."] # [doc = ""] # [inline] pub fn region_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_region_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The texture to use when drawing this style box."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Controls how the stylebox's texture will be stretched or tiled vertically. See [`AxisStretchMode`][AxisStretchMode] for possible values."] # [doc = ""] # [inline] pub fn v_axis_stretch_mode (& self) -> crate :: generated :: style_box_texture :: AxisStretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_v_axis_stretch_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: style_box_texture :: AxisStretchMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the nine-patch texture's center tile will be drawn."] # [doc = ""] # [inline] pub fn is_draw_center_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . is_draw_center_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the nine-patch texture's center tile will be drawn."] # [doc = ""] # [inline] pub fn set_draw_center (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_draw_center ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Sets the expand margin to `size` pixels for all margins."] # [doc = ""] # [inline] pub fn set_expand_margin_all (& self , size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_expand_margin_all ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } # [doc = "Sets the expand margin for each margin to `size_left`, `size_top`, `size_right`, and `size_bottom` pixels."] # [doc = ""] # [inline] pub fn set_expand_margin_individual (& self , size_left : f64 , size_top : f64 , size_right : f64 , size_bottom : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_expand_margin_individual ; let ret = crate :: icalls :: icallvar__f64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , size_left as _ , size_top as _ , size_right as _ , size_bottom as _) ; } } # [doc = "Sets the expand margin to `size` pixels for the given `margin`. See [`Margin`][Margin] for possible values."] # [doc = ""] # [inline] pub fn set_expand_margin_size (& self , margin : i64 , size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_expand_margin_size ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , margin as _ , size as _) ; } } # [doc = "Controls how the stylebox's texture will be stretched or tiled horizontally. See [`AxisStretchMode`][AxisStretchMode] for possible values."] # [doc = ""] # [inline] pub fn set_h_axis_stretch_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_h_axis_stretch_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Sets the margin to `size` pixels for the given `margin`. See [`Margin`][Margin] for possible values."] # [doc = ""] # [inline] pub fn set_margin_size (& self , margin : i64 , size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_margin_size ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , margin as _ , size as _) ; } } # [doc = "Modulates the color of the texture when this style box is drawn."] # [doc = ""] # [inline] pub fn set_modulate (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_modulate ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "The normal map to use when drawing this style box.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn set_normal_map (& self , normal_map : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_normal_map ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , normal_map . as_arg_ptr ()) ; } } # [doc = "Species a sub-region of the texture to use.\nThis is equivalent to first wrapping the texture in an [`AtlasTexture`][AtlasTexture] with the same region."] # [doc = ""] # [inline] pub fn set_region_rect (& self , region : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_region_rect ; let ret = crate :: icalls :: icallvar__rect2 (method_bind , self . this . sys () . as_ptr () , region) ; } } # [doc = "The texture to use when drawing this style box."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Controls how the stylebox's texture will be stretched or tiled vertically. See [`AxisStretchMode`][AxisStretchMode] for possible values."] # [doc = ""] # [inline] pub fn set_v_axis_stretch_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_v_axis_stretch_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested."] # [doc = ""] # [inline] pub fn expand_margin_bottom (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_expand_margin_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested."] # [doc = ""] # [inline] pub fn set_expand_margin_bottom (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_expand_margin_size ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Expands the left margin of this style box when drawing, causing it to be drawn larger than requested."] # [doc = ""] # [inline] pub fn expand_margin_left (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_expand_margin_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Expands the left margin of this style box when drawing, causing it to be drawn larger than requested."] # [doc = ""] # [inline] pub fn set_expand_margin_left (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_expand_margin_size ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "Expands the right margin of this style box when drawing, causing it to be drawn larger than requested."] # [doc = ""] # [inline] pub fn expand_margin_right (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_expand_margin_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Expands the right margin of this style box when drawing, causing it to be drawn larger than requested."] # [doc = ""] # [inline] pub fn set_expand_margin_right (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_expand_margin_size ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Expands the top margin of this style box when drawing, causing it to be drawn larger than requested."] # [doc = ""] # [inline] pub fn expand_margin_top (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_expand_margin_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Expands the top margin of this style box when drawing, causing it to be drawn larger than requested."] # [doc = ""] # [inline] pub fn set_expand_margin_top (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_expand_margin_size ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "Increases the bottom margin of the 3×3 texture box.\nA higher value means more of the source texture is considered to be part of the bottom border of the 3×3 box.\nThis is also the value used as fallback for [`StyleBox.content_margin_bottom`][StyleBox::content_margin_bottom] if it is negative."] # [doc = ""] # [inline] pub fn margin_bottom (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_margin_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Increases the bottom margin of the 3×3 texture box.\nA higher value means more of the source texture is considered to be part of the bottom border of the 3×3 box.\nThis is also the value used as fallback for [`StyleBox.content_margin_bottom`][StyleBox::content_margin_bottom] if it is negative."] # [doc = ""] # [inline] pub fn set_margin_bottom (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_margin_size ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "Increases the left margin of the 3×3 texture box.\nA higher value means more of the source texture is considered to be part of the left border of the 3×3 box.\nThis is also the value used as fallback for [`StyleBox.content_margin_left`][StyleBox::content_margin_left] if it is negative."] # [doc = ""] # [inline] pub fn margin_left (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_margin_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Increases the left margin of the 3×3 texture box.\nA higher value means more of the source texture is considered to be part of the left border of the 3×3 box.\nThis is also the value used as fallback for [`StyleBox.content_margin_left`][StyleBox::content_margin_left] if it is negative."] # [doc = ""] # [inline] pub fn set_margin_left (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_margin_size ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "Increases the right margin of the 3×3 texture box.\nA higher value means more of the source texture is considered to be part of the right border of the 3×3 box.\nThis is also the value used as fallback for [`StyleBox.content_margin_right`][StyleBox::content_margin_right] if it is negative."] # [doc = ""] # [inline] pub fn margin_right (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_margin_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Increases the right margin of the 3×3 texture box.\nA higher value means more of the source texture is considered to be part of the right border of the 3×3 box.\nThis is also the value used as fallback for [`StyleBox.content_margin_right`][StyleBox::content_margin_right] if it is negative."] # [doc = ""] # [inline] pub fn set_margin_right (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_margin_size ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "Increases the top margin of the 3×3 texture box.\nA higher value means more of the source texture is considered to be part of the top border of the 3×3 box.\nThis is also the value used as fallback for [`StyleBox.content_margin_top`][StyleBox::content_margin_top] if it is negative."] # [doc = ""] # [inline] pub fn margin_top (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . get_margin_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Increases the top margin of the 3×3 texture box.\nA higher value means more of the source texture is considered to be part of the top border of the 3×3 box.\nThis is also the value used as fallback for [`StyleBox.content_margin_top`][StyleBox::content_margin_top] if it is negative."] # [doc = ""] # [inline] pub fn set_margin_top (& self , value : f64) { unsafe { let method_bind : * mut sys :: godot_method_bind = StyleBoxTextureMethodTable :: get (get_api ()) . set_margin_size ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for StyleBoxTexture { } unsafe impl GodotObject for StyleBoxTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "StyleBoxTexture" } } impl std :: ops :: Deref for StyleBoxTexture { type Target = crate :: generated :: StyleBox ; # [inline] fn deref (& self) -> & crate :: generated :: StyleBox { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for StyleBoxTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: StyleBox { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: StyleBox > for StyleBoxTexture { } unsafe impl SubClass < crate :: generated :: Resource > for StyleBoxTexture { } unsafe impl SubClass < crate :: generated :: Reference > for StyleBoxTexture { } unsafe impl SubClass < crate :: generated :: Object > for StyleBoxTexture { } impl Instanciable for StyleBoxTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { StyleBoxTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct StyleBoxTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_expand_margin_size : * mut sys :: godot_method_bind , pub get_h_axis_stretch_mode : * mut sys :: godot_method_bind , pub get_margin_size : * mut sys :: godot_method_bind , pub get_modulate : * mut sys :: godot_method_bind , pub get_normal_map : * mut sys :: godot_method_bind , pub get_region_rect : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_v_axis_stretch_mode : * mut sys :: godot_method_bind , pub is_draw_center_enabled : * mut sys :: godot_method_bind , pub set_draw_center : * mut sys :: godot_method_bind , pub set_expand_margin_all : * mut sys :: godot_method_bind , pub set_expand_margin_individual : * mut sys :: godot_method_bind , pub set_expand_margin_size : * mut sys :: godot_method_bind , pub set_h_axis_stretch_mode : * mut sys :: godot_method_bind , pub set_margin_size : * mut sys :: godot_method_bind , pub set_modulate : * mut sys :: godot_method_bind , pub set_normal_map : * mut sys :: godot_method_bind , pub set_region_rect : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_v_axis_stretch_mode : * mut sys :: godot_method_bind } impl StyleBoxTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : StyleBoxTextureMethodTable = StyleBoxTextureMethodTable { class_constructor : None , get_expand_margin_size : 0 as * mut sys :: godot_method_bind , get_h_axis_stretch_mode : 0 as * mut sys :: godot_method_bind , get_margin_size : 0 as * mut sys :: godot_method_bind , get_modulate : 0 as * mut sys :: godot_method_bind , get_normal_map : 0 as * mut sys :: godot_method_bind , get_region_rect : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_v_axis_stretch_mode : 0 as * mut sys :: godot_method_bind , is_draw_center_enabled : 0 as * mut sys :: godot_method_bind , set_draw_center : 0 as * mut sys :: godot_method_bind , set_expand_margin_all : 0 as * mut sys :: godot_method_bind , set_expand_margin_individual : 0 as * mut sys :: godot_method_bind , set_expand_margin_size : 0 as * mut sys :: godot_method_bind , set_h_axis_stretch_mode : 0 as * mut sys :: godot_method_bind , set_margin_size : 0 as * mut sys :: godot_method_bind , set_modulate : 0 as * mut sys :: godot_method_bind , set_normal_map : 0 as * mut sys :: godot_method_bind , set_region_rect : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_v_axis_stretch_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { StyleBoxTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "StyleBoxTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_expand_margin_size = (gd_api . godot_method_bind_get_method) (class_name , "get_expand_margin_size\0" . as_ptr () as * const c_char) ; table . get_h_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_h_axis_stretch_mode\0" . as_ptr () as * const c_char) ; table . get_margin_size = (gd_api . godot_method_bind_get_method) (class_name , "get_margin_size\0" . as_ptr () as * const c_char) ; table . get_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_modulate\0" . as_ptr () as * const c_char) ; table . get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_map\0" . as_ptr () as * const c_char) ; table . get_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_region_rect\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_v_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_v_axis_stretch_mode\0" . as_ptr () as * const c_char) ; table . is_draw_center_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_draw_center_enabled\0" . as_ptr () as * const c_char) ; table . set_draw_center = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_center\0" . as_ptr () as * const c_char) ; table . set_expand_margin_all = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_margin_all\0" . as_ptr () as * const c_char) ; table . set_expand_margin_individual = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_margin_individual\0" . as_ptr () as * const c_char) ; table . set_expand_margin_size = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_margin_size\0" . as_ptr () as * const c_char) ; table . set_h_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_h_axis_stretch_mode\0" . as_ptr () as * const c_char) ; table . set_margin_size = (gd_api . godot_method_bind_get_method) (class_name , "set_margin_size\0" . as_ptr () as * const c_char) ; table . set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_modulate\0" . as_ptr () as * const c_char) ; table . set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_map\0" . as_ptr () as * const c_char) ; table . set_region_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_region_rect\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_v_axis_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_v_axis_stretch_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::style_box_texture::private::StyleBoxTexture;
            
            pub(crate) mod surface_tool {
                # ! [doc = "This module contains types related to the API class [`SurfaceTool`][super::SurfaceTool]."] pub (crate) mod private { # [doc = "`core class SurfaceTool` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_surfacetool.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSurfaceTool inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct SurfaceTool { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: SurfaceTool ; impl SurfaceTool { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SurfaceToolMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Specifies an array of bones to use for the _next_ vertex. `bones` must contain 4 integers."] # [doc = ""] # [inline] pub fn add_bones (& self , bones : PoolArray < i32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_bones ; let ret = crate :: icalls :: icallvar__i32arr (method_bind , self . this . sys () . as_ptr () , bones) ; } } # [doc = "Specifies a [`Color`][Color] to use for the _next_ vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all.\n**Note:** The material must have [`SpatialMaterial.vertex_color_use_as_albedo`][SpatialMaterial::vertex_color_use_as_albedo] enabled for the vertex color to be visible."] # [doc = ""] # [inline] pub fn add_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "Adds an index to index array if you are using indexed vertices. Does not need to be called before adding vertices."] # [doc = ""] # [inline] pub fn add_index (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_index ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } # [doc = "Specifies a normal to use for the _next_ vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all."] # [doc = ""] # [inline] pub fn add_normal (& self , normal : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_normal ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , normal) ; } } # [doc = "Specifies whether the current vertex (if using only vertex arrays) or current index (if also using index arrays) should use smooth normals for normal calculation."] # [doc = ""] # [inline] pub fn add_smooth_group (& self , smooth : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_smooth_group ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , smooth as _) ; } } # [doc = "Specifies a tangent to use for the _next_ vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all."] # [doc = ""] # [inline] pub fn add_tangent (& self , tangent : Plane) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_tangent ; let ret = crate :: icalls :: icallvar__plane (method_bind , self . this . sys () . as_ptr () , tangent) ; } } # [doc = "Inserts a triangle fan made of array data into [`Mesh`][Mesh] being constructed.\nRequires the primitive type be set to [`Mesh.PRIMITIVE_TRIANGLES`][Mesh::PRIMITIVE_TRIANGLES].\n# Default Arguments\n* `uvs` - `PoolVector2Array(  )`\n* `colors` - `PoolColorArray(  )`\n* `uv2s` - `PoolVector2Array(  )`\n* `normals` - `PoolVector3Array(  )`\n* `tangents` - `[  ]`"] # [doc = ""] # [inline] pub fn add_triangle_fan (& self , vertices : PoolArray < Vector3 > , uvs : PoolArray < Vector2 > , colors : PoolArray < Color > , uv2s : PoolArray < Vector2 > , normals : PoolArray < Vector3 > , tangents : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_triangle_fan ; let ret = crate :: icalls :: icallvar__vec3arr_vec2arr_colorarr_vec2arr_vec3arr_arr (method_bind , self . this . sys () . as_ptr () , vertices , uvs , colors , uv2s , normals , tangents) ; } } # [doc = "Specifies a set of UV coordinates to use for the _next_ vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all."] # [doc = ""] # [inline] pub fn add_uv (& self , uv : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_uv ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , uv) ; } } # [doc = "Specifies an optional second set of UV coordinates to use for the _next_ vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all."] # [doc = ""] # [inline] pub fn add_uv2 (& self , uv2 : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_uv2 ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , uv2) ; } } # [doc = "Specifies the position of current vertex. Should be called after specifying other vertex properties (e.g. Color, UV)."] # [doc = ""] # [inline] pub fn add_vertex (& self , vertex : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_vertex ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , vertex) ; } } # [doc = "Specifies weight values to use for the _next_ vertex. `weights` must contain 4 values. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all."] # [doc = ""] # [inline] pub fn add_weights (& self , weights : PoolArray < f32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . add_weights ; let ret = crate :: icalls :: icallvar__f32arr (method_bind , self . this . sys () . as_ptr () , weights) ; } } # [doc = "Append vertices from a given [`Mesh`][Mesh] surface onto the current vertex array with specified [`Transform`][Transform].\n**Note:** Using [`append_from`][Self::append_from] on a [`Thread`][Thread] is much slower as the GPU must communicate data back to the CPU, while also causing the main thread to stall (as OpenGL is not thread-safe). Consider requesting a copy of the mesh, converting it to an [`ArrayMesh`][ArrayMesh] and adding vertices manually instead."] # [doc = ""] # [inline] pub fn append_from (& self , existing : impl AsArg < crate :: generated :: Mesh > , surface : i64 , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . append_from ; let ret = crate :: icalls :: icallvar__obj_i64_trans (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , surface as _ , transform) ; } } # [doc = "Called before adding any vertices. Takes the primitive type as an argument (e.g. [`Mesh.PRIMITIVE_TRIANGLES`][Mesh::PRIMITIVE_TRIANGLES])."] # [doc = ""] # [inline] pub fn begin (& self , primitive : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . begin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , primitive as _) ; } } # [doc = "Clear all information passed into the surface tool so far."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns a constructed [`ArrayMesh`][ArrayMesh] from current information passed in. If an existing [`ArrayMesh`][ArrayMesh] is passed in as an argument, will add an extra surface to the existing [`ArrayMesh`][ArrayMesh].\nDefault flag is [`Mesh.ARRAY_COMPRESS_DEFAULT`][Mesh::ARRAY_COMPRESS_DEFAULT] if compression is enabled. If compression is disabled the default flag is [`Mesh.ARRAY_FLAG_USE_OCTAHEDRAL_COMPRESSION`][Mesh::ARRAY_FLAG_USE_OCTAHEDRAL_COMPRESSION]. See `ARRAY_COMPRESS_*` constants in [enum Mesh.ArrayFormat] for other flags.\n# Default Arguments\n* `existing` - `null`\n* `flags` - `2194432`"] # [doc = ""] # [inline] pub fn commit (& self , existing : impl AsArg < crate :: generated :: ArrayMesh > , flags : i64) -> Option < Ref < crate :: generated :: ArrayMesh , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . commit ; let ret = crate :: icalls :: icallvar__obj_i64 (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , flags as _) ; < Option < Ref < crate :: generated :: ArrayMesh , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Commits the data to the same format used by [`ArrayMesh.add_surface_from_arrays`][ArrayMesh::add_surface_from_arrays]. This way you can further process the mesh data using the [`ArrayMesh`][ArrayMesh] API."] # [doc = ""] # [inline] pub fn commit_to_arrays (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . commit_to_arrays ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a vertex array from an existing [`Mesh`][Mesh]."] # [doc = ""] # [inline] pub fn create_from (& self , existing : impl AsArg < crate :: generated :: Mesh > , surface : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . create_from ; let ret = crate :: icalls :: icallvar__obj_i64 (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , surface as _) ; } } # [doc = "Creates a vertex array from the specified blend shape of an existing [`Mesh`][Mesh]. This can be used to extract a specific pose from a blend shape."] # [doc = ""] # [inline] pub fn create_from_blend_shape (& self , existing : impl AsArg < crate :: generated :: Mesh > , surface : i64 , blend_shape : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . create_from_blend_shape ; let ret = crate :: icalls :: icallvar__obj_i64_str (method_bind , self . this . sys () . as_ptr () , existing . as_arg_ptr () , surface as _ , blend_shape . into ()) ; } } # [doc = "Removes the index array by expanding the vertex array."] # [doc = ""] # [inline] pub fn deindex (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . deindex ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Generates normals from vertices so you do not have to do it manually. If `flip` is `true`, the resulting normals will be inverted. [`generate_normals`][Self::generate_normals] should be called _after_ generating geometry and _before_ committing the mesh using [`commit`][Self::commit] or [`commit_to_arrays`][Self::commit_to_arrays]. For correct display of normal-mapped surfaces, you will also have to generate tangents using [`generate_tangents`][Self::generate_tangents].\n**Note:** [`generate_normals`][Self::generate_normals] only works if the primitive type to be set to [`Mesh.PRIMITIVE_TRIANGLES`][Mesh::PRIMITIVE_TRIANGLES].\n# Default Arguments\n* `flip` - `false`"] # [doc = ""] # [inline] pub fn generate_normals (& self , flip : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . generate_normals ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , flip as _) ; } } # [doc = "Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already (see [`generate_normals`][Self::generate_normals])."] # [doc = ""] # [inline] pub fn generate_tangents (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . generate_tangents ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Shrinks the vertex array by creating an index array. This can improve performance by avoiding vertex reuse."] # [doc = ""] # [inline] pub fn index (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets [`Material`][Material] to be used by the [`Mesh`][Mesh] you are constructing."] # [doc = ""] # [inline] pub fn set_material (& self , material : impl AsArg < crate :: generated :: Material >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = SurfaceToolMethodTable :: get (get_api ()) . set_material ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , material . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for SurfaceTool { } unsafe impl GodotObject for SurfaceTool { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "SurfaceTool" } } impl std :: ops :: Deref for SurfaceTool { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for SurfaceTool { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for SurfaceTool { } unsafe impl SubClass < crate :: generated :: Object > for SurfaceTool { } impl Instanciable for SurfaceTool { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { SurfaceTool :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SurfaceToolMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_bones : * mut sys :: godot_method_bind , pub add_color : * mut sys :: godot_method_bind , pub add_index : * mut sys :: godot_method_bind , pub add_normal : * mut sys :: godot_method_bind , pub add_smooth_group : * mut sys :: godot_method_bind , pub add_tangent : * mut sys :: godot_method_bind , pub add_triangle_fan : * mut sys :: godot_method_bind , pub add_uv : * mut sys :: godot_method_bind , pub add_uv2 : * mut sys :: godot_method_bind , pub add_vertex : * mut sys :: godot_method_bind , pub add_weights : * mut sys :: godot_method_bind , pub append_from : * mut sys :: godot_method_bind , pub begin : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub commit : * mut sys :: godot_method_bind , pub commit_to_arrays : * mut sys :: godot_method_bind , pub create_from : * mut sys :: godot_method_bind , pub create_from_blend_shape : * mut sys :: godot_method_bind , pub deindex : * mut sys :: godot_method_bind , pub generate_normals : * mut sys :: godot_method_bind , pub generate_tangents : * mut sys :: godot_method_bind , pub index : * mut sys :: godot_method_bind , pub set_material : * mut sys :: godot_method_bind } impl SurfaceToolMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SurfaceToolMethodTable = SurfaceToolMethodTable { class_constructor : None , add_bones : 0 as * mut sys :: godot_method_bind , add_color : 0 as * mut sys :: godot_method_bind , add_index : 0 as * mut sys :: godot_method_bind , add_normal : 0 as * mut sys :: godot_method_bind , add_smooth_group : 0 as * mut sys :: godot_method_bind , add_tangent : 0 as * mut sys :: godot_method_bind , add_triangle_fan : 0 as * mut sys :: godot_method_bind , add_uv : 0 as * mut sys :: godot_method_bind , add_uv2 : 0 as * mut sys :: godot_method_bind , add_vertex : 0 as * mut sys :: godot_method_bind , add_weights : 0 as * mut sys :: godot_method_bind , append_from : 0 as * mut sys :: godot_method_bind , begin : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , commit : 0 as * mut sys :: godot_method_bind , commit_to_arrays : 0 as * mut sys :: godot_method_bind , create_from : 0 as * mut sys :: godot_method_bind , create_from_blend_shape : 0 as * mut sys :: godot_method_bind , deindex : 0 as * mut sys :: godot_method_bind , generate_normals : 0 as * mut sys :: godot_method_bind , generate_tangents : 0 as * mut sys :: godot_method_bind , index : 0 as * mut sys :: godot_method_bind , set_material : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SurfaceToolMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "SurfaceTool\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_bones = (gd_api . godot_method_bind_get_method) (class_name , "add_bones\0" . as_ptr () as * const c_char) ; table . add_color = (gd_api . godot_method_bind_get_method) (class_name , "add_color\0" . as_ptr () as * const c_char) ; table . add_index = (gd_api . godot_method_bind_get_method) (class_name , "add_index\0" . as_ptr () as * const c_char) ; table . add_normal = (gd_api . godot_method_bind_get_method) (class_name , "add_normal\0" . as_ptr () as * const c_char) ; table . add_smooth_group = (gd_api . godot_method_bind_get_method) (class_name , "add_smooth_group\0" . as_ptr () as * const c_char) ; table . add_tangent = (gd_api . godot_method_bind_get_method) (class_name , "add_tangent\0" . as_ptr () as * const c_char) ; table . add_triangle_fan = (gd_api . godot_method_bind_get_method) (class_name , "add_triangle_fan\0" . as_ptr () as * const c_char) ; table . add_uv = (gd_api . godot_method_bind_get_method) (class_name , "add_uv\0" . as_ptr () as * const c_char) ; table . add_uv2 = (gd_api . godot_method_bind_get_method) (class_name , "add_uv2\0" . as_ptr () as * const c_char) ; table . add_vertex = (gd_api . godot_method_bind_get_method) (class_name , "add_vertex\0" . as_ptr () as * const c_char) ; table . add_weights = (gd_api . godot_method_bind_get_method) (class_name , "add_weights\0" . as_ptr () as * const c_char) ; table . append_from = (gd_api . godot_method_bind_get_method) (class_name , "append_from\0" . as_ptr () as * const c_char) ; table . begin = (gd_api . godot_method_bind_get_method) (class_name , "begin\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . commit = (gd_api . godot_method_bind_get_method) (class_name , "commit\0" . as_ptr () as * const c_char) ; table . commit_to_arrays = (gd_api . godot_method_bind_get_method) (class_name , "commit_to_arrays\0" . as_ptr () as * const c_char) ; table . create_from = (gd_api . godot_method_bind_get_method) (class_name , "create_from\0" . as_ptr () as * const c_char) ; table . create_from_blend_shape = (gd_api . godot_method_bind_get_method) (class_name , "create_from_blend_shape\0" . as_ptr () as * const c_char) ; table . deindex = (gd_api . godot_method_bind_get_method) (class_name , "deindex\0" . as_ptr () as * const c_char) ; table . generate_normals = (gd_api . godot_method_bind_get_method) (class_name , "generate_normals\0" . as_ptr () as * const c_char) ; table . generate_tangents = (gd_api . godot_method_bind_get_method) (class_name , "generate_tangents\0" . as_ptr () as * const c_char) ; table . index = (gd_api . godot_method_bind_get_method) (class_name , "index\0" . as_ptr () as * const c_char) ; table . set_material = (gd_api . godot_method_bind_get_method) (class_name , "set_material\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::surface_tool::private::SurfaceTool;
            
            pub(crate) mod tcp_server {
                # ! [doc = "This module contains types related to the API class [`TCP_Server`][super::TCP_Server]."] pub (crate) mod private { # [doc = "`core class TCP_Server` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_tcp_server.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTCP_Server inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TCP_Server { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TCP_Server ; impl TCP_Server { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TCP_ServerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns `true` if a connection is available for taking."] # [doc = ""] # [inline] pub fn is_connection_available (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TCP_ServerMethodTable :: get (get_api ()) . is_connection_available ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the server is currently listening for connections."] # [doc = ""] # [inline] pub fn is_listening (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TCP_ServerMethodTable :: get (get_api ()) . is_listening ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Listen on the `port` binding to `bind_address`.\nIf `bind_address` is set as `\"*\"` (default), the server will listen on all available addresses (both IPv4 and IPv6).\nIf `bind_address` is set as `\"0.0.0.0\"` (for IPv4) or `\"::\"` (for IPv6), the server will listen on all available addresses matching that IP type.\nIf `bind_address` is set to any valid address (e.g. `\"192.168.1.101\"`, `\"::1\"`, etc), the server will only listen on the interface with that addresses (or fail if no interface with the given address exists).\n# Default Arguments\n* `bind_address` - `\"*\"`"] # [doc = ""] # [inline] pub fn listen (& self , port : i64 , bind_address : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = TCP_ServerMethodTable :: get (get_api ()) . listen ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , port as _ , bind_address . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Stops listening."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TCP_ServerMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If a connection is available, returns a StreamPeerTCP with the connection."] # [doc = ""] # [inline] pub fn take_connection (& self) -> Option < Ref < crate :: generated :: StreamPeerTCP , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TCP_ServerMethodTable :: get (get_api ()) . take_connection ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: StreamPeerTCP , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for TCP_Server { } unsafe impl GodotObject for TCP_Server { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "TCP_Server" } } impl std :: ops :: Deref for TCP_Server { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TCP_Server { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for TCP_Server { } unsafe impl SubClass < crate :: generated :: Object > for TCP_Server { } impl Instanciable for TCP_Server { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { TCP_Server :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TCP_ServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_connection_available : * mut sys :: godot_method_bind , pub is_listening : * mut sys :: godot_method_bind , pub listen : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind , pub take_connection : * mut sys :: godot_method_bind } impl TCP_ServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TCP_ServerMethodTable = TCP_ServerMethodTable { class_constructor : None , is_connection_available : 0 as * mut sys :: godot_method_bind , is_listening : 0 as * mut sys :: godot_method_bind , listen : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind , take_connection : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TCP_ServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TCP_Server\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_connection_available = (gd_api . godot_method_bind_get_method) (class_name , "is_connection_available\0" . as_ptr () as * const c_char) ; table . is_listening = (gd_api . godot_method_bind_get_method) (class_name , "is_listening\0" . as_ptr () as * const c_char) ; table . listen = (gd_api . godot_method_bind_get_method) (class_name , "listen\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; table . take_connection = (gd_api . godot_method_bind_get_method) (class_name , "take_connection\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::tcp_server::private::TCP_Server;
            
            pub mod tab_container {
                # ! [doc = "This module contains types related to the API class [`TabContainer`][super::TabContainer]."] pub (crate) mod private { # [doc = "`core class TabContainer` inherits `Container` (manually managed).\n\nThis class has related types in the [`tab_container`][super::tab_container] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_tabcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`TabContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<TabContainer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nTabContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TabContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TabContainer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TabAlign (pub i64) ; impl TabAlign { pub const LEFT : TabAlign = TabAlign (0i64) ; pub const CENTER : TabAlign = TabAlign (1i64) ; pub const RIGHT : TabAlign = TabAlign (2i64) ; } impl From < i64 > for TabAlign { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TabAlign > for i64 { # [inline] fn from (v : TabAlign) -> Self { v . 0 } } impl FromVariant for TabAlign { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TabContainer { pub const ALIGN_LEFT : i64 = 0i64 ; pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; } impl TabContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TabContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, tabs are visible. If `false`, tabs' content and titles are hidden."] # [doc = ""] # [inline] pub fn are_tabs_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . are_tabs_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The current tab index. When set, this index's [`Control`][Control] node's `visible` property is set to `true` and all others are set to `false`."] # [doc = ""] # [inline] pub fn current_tab (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_current_tab ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the child [`Control`][Control] node located at the active tab index."] # [doc = ""] # [inline] pub fn get_current_tab_control (& self) -> Option < Ref < crate :: generated :: Control , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_current_tab_control ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Control , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, tabs can be rearranged with mouse drag."] # [doc = ""] # [inline] pub fn drag_to_rearrange_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_drag_to_rearrange_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`Popup`][Popup] node instance if one has been set already with [`set_popup`][Self::set_popup].\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_popup (& self) -> Option < Ref < crate :: generated :: Popup , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_popup ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Popup , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the previously active tab index."] # [doc = ""] # [inline] pub fn get_previous_tab (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_previous_tab ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The alignment of all tabs in the tab container. See the [`TabAlign`][TabAlign] constants for details."] # [doc = ""] # [inline] pub fn tab_align (& self) -> crate :: generated :: tab_container :: TabAlign { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_tab_align ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: tab_container :: TabAlign > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`Control`][Control] node from the tab at index `tab_idx`."] # [doc = ""] # [inline] pub fn get_tab_control (& self , tab_idx : i64) -> Option < Ref < crate :: generated :: Control , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_tab_control ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , tab_idx as _) ; < Option < Ref < crate :: generated :: Control , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of tabs."] # [doc = ""] # [inline] pub fn get_tab_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_tab_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the tab at index `tab_idx` is disabled."] # [doc = ""] # [inline] pub fn get_tab_disabled (& self , tab_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_tab_disabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , tab_idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the tab at index `tab_idx` is hidden."] # [doc = ""] # [inline] pub fn get_tab_hidden (& self , tab_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_tab_hidden ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , tab_idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`Texture`][Texture] for the tab at index `tab_idx` or `null` if the tab has no [`Texture`][Texture]."] # [doc = ""] # [inline] pub fn get_tab_icon (& self , tab_idx : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_tab_icon ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , tab_idx as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the index of the tab at local coordinates `point`. Returns `-1` if the point is outside the control boundaries or if there's no tab at the queried position."] # [doc = ""] # [inline] pub fn get_tab_idx_at_point (& self , point : Vector2) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_tab_idx_at_point ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , point) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the title of the tab at index `tab_idx`. Tab titles default to the name of the indexed child node, but this can be overridden with [`set_tab_title`][Self::set_tab_title]."] # [doc = ""] # [inline] pub fn get_tab_title (& self , tab_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_tab_title ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , tab_idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`TabContainer`][TabContainer] rearrange group id."] # [doc = ""] # [inline] pub fn get_tabs_rearrange_group (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_tabs_rearrange_group ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, children [`Control`][Control] nodes that are hidden have their minimum size take into account in the total, instead of only the currently visible one."] # [doc = ""] # [inline] pub fn use_hidden_tabs_for_min_size (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . get_use_hidden_tabs_for_min_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, all tabs are drawn in front of the panel. If `false`, inactive tabs are drawn behind the panel."] # [doc = ""] # [inline] pub fn is_all_tabs_in_front (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . is_all_tabs_in_front ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, all tabs are drawn in front of the panel. If `false`, inactive tabs are drawn behind the panel."] # [doc = ""] # [inline] pub fn set_all_tabs_in_front (& self , is_front : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . set_all_tabs_in_front ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , is_front as _) ; } } # [doc = "The current tab index. When set, this index's [`Control`][Control] node's `visible` property is set to `true` and all others are set to `false`."] # [doc = ""] # [inline] pub fn set_current_tab (& self , tab_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . set_current_tab ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , tab_idx as _) ; } } # [doc = "If `true`, tabs can be rearranged with mouse drag."] # [doc = ""] # [inline] pub fn set_drag_to_rearrange_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . set_drag_to_rearrange_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If set on a [`Popup`][Popup] node instance, a popup menu icon appears in the top-right corner of the [`TabContainer`][TabContainer]. Clicking it will expand the [`Popup`][Popup] node."] # [doc = ""] # [inline] pub fn set_popup (& self , popup : impl AsArg < crate :: generated :: Node >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . set_popup ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , popup . as_arg_ptr ()) ; } } # [doc = "The alignment of all tabs in the tab container. See the [`TabAlign`][TabAlign] constants for details."] # [doc = ""] # [inline] pub fn set_tab_align (& self , align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . set_tab_align ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , align as _) ; } } # [doc = "If `disabled` is `true`, disables the tab at index `tab_idx`, making it non-interactable."] # [doc = ""] # [inline] pub fn set_tab_disabled (& self , tab_idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . set_tab_disabled ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , tab_idx as _ , disabled as _) ; } } # [doc = "If `hidden` is `true`, hides the tab at index `tab_idx`, making it disappear from the tab area."] # [doc = ""] # [inline] pub fn set_tab_hidden (& self , tab_idx : i64 , hidden : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . set_tab_hidden ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , tab_idx as _ , hidden as _) ; } } # [doc = "Sets an icon for the tab at index `tab_idx`."] # [doc = ""] # [inline] pub fn set_tab_icon (& self , tab_idx : i64 , icon : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . set_tab_icon ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , tab_idx as _ , icon . as_arg_ptr ()) ; } } # [doc = "Sets a title for the tab at index `tab_idx`. Tab titles default to the name of the indexed child node."] # [doc = ""] # [inline] pub fn set_tab_title (& self , tab_idx : i64 , title : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . set_tab_title ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , tab_idx as _ , title . into ()) ; } } # [doc = "Defines rearrange group id, choose for each [`TabContainer`][TabContainer] the same value to enable tab drag between [`TabContainer`][TabContainer]. Enable drag with [`drag_to_rearrange_enabled`][Self::drag_to_rearrange_enabled]."] # [doc = ""] # [inline] pub fn set_tabs_rearrange_group (& self , group_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . set_tabs_rearrange_group ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , group_id as _) ; } } # [doc = "If `true`, tabs are visible. If `false`, tabs' content and titles are hidden."] # [doc = ""] # [inline] pub fn set_tabs_visible (& self , visible : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . set_tabs_visible ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , visible as _) ; } } # [doc = "If `true`, children [`Control`][Control] nodes that are hidden have their minimum size take into account in the total, instead of only the currently visible one."] # [doc = ""] # [inline] pub fn set_use_hidden_tabs_for_min_size (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabContainerMethodTable :: get (get_api ()) . set_use_hidden_tabs_for_min_size ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TabContainer { } unsafe impl GodotObject for TabContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "TabContainer" } } impl QueueFree for TabContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for TabContainer { type Target = crate :: generated :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TabContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Container > for TabContainer { } unsafe impl SubClass < crate :: generated :: Control > for TabContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for TabContainer { } unsafe impl SubClass < crate :: generated :: Node > for TabContainer { } unsafe impl SubClass < crate :: generated :: Object > for TabContainer { } impl Instanciable for TabContainer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { TabContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TabContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub are_tabs_visible : * mut sys :: godot_method_bind , pub get_current_tab : * mut sys :: godot_method_bind , pub get_current_tab_control : * mut sys :: godot_method_bind , pub get_drag_to_rearrange_enabled : * mut sys :: godot_method_bind , pub get_popup : * mut sys :: godot_method_bind , pub get_previous_tab : * mut sys :: godot_method_bind , pub get_tab_align : * mut sys :: godot_method_bind , pub get_tab_control : * mut sys :: godot_method_bind , pub get_tab_count : * mut sys :: godot_method_bind , pub get_tab_disabled : * mut sys :: godot_method_bind , pub get_tab_hidden : * mut sys :: godot_method_bind , pub get_tab_icon : * mut sys :: godot_method_bind , pub get_tab_idx_at_point : * mut sys :: godot_method_bind , pub get_tab_title : * mut sys :: godot_method_bind , pub get_tabs_rearrange_group : * mut sys :: godot_method_bind , pub get_use_hidden_tabs_for_min_size : * mut sys :: godot_method_bind , pub is_all_tabs_in_front : * mut sys :: godot_method_bind , pub set_all_tabs_in_front : * mut sys :: godot_method_bind , pub set_current_tab : * mut sys :: godot_method_bind , pub set_drag_to_rearrange_enabled : * mut sys :: godot_method_bind , pub set_popup : * mut sys :: godot_method_bind , pub set_tab_align : * mut sys :: godot_method_bind , pub set_tab_disabled : * mut sys :: godot_method_bind , pub set_tab_hidden : * mut sys :: godot_method_bind , pub set_tab_icon : * mut sys :: godot_method_bind , pub set_tab_title : * mut sys :: godot_method_bind , pub set_tabs_rearrange_group : * mut sys :: godot_method_bind , pub set_tabs_visible : * mut sys :: godot_method_bind , pub set_use_hidden_tabs_for_min_size : * mut sys :: godot_method_bind } impl TabContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TabContainerMethodTable = TabContainerMethodTable { class_constructor : None , are_tabs_visible : 0 as * mut sys :: godot_method_bind , get_current_tab : 0 as * mut sys :: godot_method_bind , get_current_tab_control : 0 as * mut sys :: godot_method_bind , get_drag_to_rearrange_enabled : 0 as * mut sys :: godot_method_bind , get_popup : 0 as * mut sys :: godot_method_bind , get_previous_tab : 0 as * mut sys :: godot_method_bind , get_tab_align : 0 as * mut sys :: godot_method_bind , get_tab_control : 0 as * mut sys :: godot_method_bind , get_tab_count : 0 as * mut sys :: godot_method_bind , get_tab_disabled : 0 as * mut sys :: godot_method_bind , get_tab_hidden : 0 as * mut sys :: godot_method_bind , get_tab_icon : 0 as * mut sys :: godot_method_bind , get_tab_idx_at_point : 0 as * mut sys :: godot_method_bind , get_tab_title : 0 as * mut sys :: godot_method_bind , get_tabs_rearrange_group : 0 as * mut sys :: godot_method_bind , get_use_hidden_tabs_for_min_size : 0 as * mut sys :: godot_method_bind , is_all_tabs_in_front : 0 as * mut sys :: godot_method_bind , set_all_tabs_in_front : 0 as * mut sys :: godot_method_bind , set_current_tab : 0 as * mut sys :: godot_method_bind , set_drag_to_rearrange_enabled : 0 as * mut sys :: godot_method_bind , set_popup : 0 as * mut sys :: godot_method_bind , set_tab_align : 0 as * mut sys :: godot_method_bind , set_tab_disabled : 0 as * mut sys :: godot_method_bind , set_tab_hidden : 0 as * mut sys :: godot_method_bind , set_tab_icon : 0 as * mut sys :: godot_method_bind , set_tab_title : 0 as * mut sys :: godot_method_bind , set_tabs_rearrange_group : 0 as * mut sys :: godot_method_bind , set_tabs_visible : 0 as * mut sys :: godot_method_bind , set_use_hidden_tabs_for_min_size : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TabContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TabContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . are_tabs_visible = (gd_api . godot_method_bind_get_method) (class_name , "are_tabs_visible\0" . as_ptr () as * const c_char) ; table . get_current_tab = (gd_api . godot_method_bind_get_method) (class_name , "get_current_tab\0" . as_ptr () as * const c_char) ; table . get_current_tab_control = (gd_api . godot_method_bind_get_method) (class_name , "get_current_tab_control\0" . as_ptr () as * const c_char) ; table . get_drag_to_rearrange_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_drag_to_rearrange_enabled\0" . as_ptr () as * const c_char) ; table . get_popup = (gd_api . godot_method_bind_get_method) (class_name , "get_popup\0" . as_ptr () as * const c_char) ; table . get_previous_tab = (gd_api . godot_method_bind_get_method) (class_name , "get_previous_tab\0" . as_ptr () as * const c_char) ; table . get_tab_align = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_align\0" . as_ptr () as * const c_char) ; table . get_tab_control = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_control\0" . as_ptr () as * const c_char) ; table . get_tab_count = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_count\0" . as_ptr () as * const c_char) ; table . get_tab_disabled = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_disabled\0" . as_ptr () as * const c_char) ; table . get_tab_hidden = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_hidden\0" . as_ptr () as * const c_char) ; table . get_tab_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_icon\0" . as_ptr () as * const c_char) ; table . get_tab_idx_at_point = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_idx_at_point\0" . as_ptr () as * const c_char) ; table . get_tab_title = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_title\0" . as_ptr () as * const c_char) ; table . get_tabs_rearrange_group = (gd_api . godot_method_bind_get_method) (class_name , "get_tabs_rearrange_group\0" . as_ptr () as * const c_char) ; table . get_use_hidden_tabs_for_min_size = (gd_api . godot_method_bind_get_method) (class_name , "get_use_hidden_tabs_for_min_size\0" . as_ptr () as * const c_char) ; table . is_all_tabs_in_front = (gd_api . godot_method_bind_get_method) (class_name , "is_all_tabs_in_front\0" . as_ptr () as * const c_char) ; table . set_all_tabs_in_front = (gd_api . godot_method_bind_get_method) (class_name , "set_all_tabs_in_front\0" . as_ptr () as * const c_char) ; table . set_current_tab = (gd_api . godot_method_bind_get_method) (class_name , "set_current_tab\0" . as_ptr () as * const c_char) ; table . set_drag_to_rearrange_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_to_rearrange_enabled\0" . as_ptr () as * const c_char) ; table . set_popup = (gd_api . godot_method_bind_get_method) (class_name , "set_popup\0" . as_ptr () as * const c_char) ; table . set_tab_align = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_align\0" . as_ptr () as * const c_char) ; table . set_tab_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_disabled\0" . as_ptr () as * const c_char) ; table . set_tab_hidden = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_hidden\0" . as_ptr () as * const c_char) ; table . set_tab_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_icon\0" . as_ptr () as * const c_char) ; table . set_tab_title = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_title\0" . as_ptr () as * const c_char) ; table . set_tabs_rearrange_group = (gd_api . godot_method_bind_get_method) (class_name , "set_tabs_rearrange_group\0" . as_ptr () as * const c_char) ; table . set_tabs_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_tabs_visible\0" . as_ptr () as * const c_char) ; table . set_use_hidden_tabs_for_min_size = (gd_api . godot_method_bind_get_method) (class_name , "set_use_hidden_tabs_for_min_size\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::tab_container::private::TabContainer;
            
            pub mod tabs {
                # ! [doc = "This module contains types related to the API class [`Tabs`][super::Tabs]."] pub (crate) mod private { # [doc = "`core class Tabs` inherits `Control` (manually managed).\n\nThis class has related types in the [`tabs`][super::tabs] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_tabs.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Tabs` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Tabs>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nTabs inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Tabs { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Tabs ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CloseButtonDisplayPolicy (pub i64) ; impl CloseButtonDisplayPolicy { pub const SHOW_NEVER : CloseButtonDisplayPolicy = CloseButtonDisplayPolicy (0i64) ; pub const SHOW_ACTIVE_ONLY : CloseButtonDisplayPolicy = CloseButtonDisplayPolicy (1i64) ; pub const SHOW_ALWAYS : CloseButtonDisplayPolicy = CloseButtonDisplayPolicy (2i64) ; pub const MAX : CloseButtonDisplayPolicy = CloseButtonDisplayPolicy (3i64) ; } impl From < i64 > for CloseButtonDisplayPolicy { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CloseButtonDisplayPolicy > for i64 { # [inline] fn from (v : CloseButtonDisplayPolicy) -> Self { v . 0 } } impl FromVariant for CloseButtonDisplayPolicy { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TabAlign (pub i64) ; impl TabAlign { pub const LEFT : TabAlign = TabAlign (0i64) ; pub const CENTER : TabAlign = TabAlign (1i64) ; pub const RIGHT : TabAlign = TabAlign (2i64) ; pub const MAX : TabAlign = TabAlign (3i64) ; } impl From < i64 > for TabAlign { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TabAlign > for i64 { # [inline] fn from (v : TabAlign) -> Self { v . 0 } } impl FromVariant for TabAlign { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Tabs { pub const ALIGN_LEFT : i64 = 0i64 ; pub const CLOSE_BUTTON_SHOW_NEVER : i64 = 0i64 ; pub const ALIGN_CENTER : i64 = 1i64 ; pub const CLOSE_BUTTON_SHOW_ACTIVE_ONLY : i64 = 1i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const CLOSE_BUTTON_SHOW_ALWAYS : i64 = 2i64 ; pub const ALIGN_MAX : i64 = 3i64 ; pub const CLOSE_BUTTON_MAX : i64 = 3i64 ; } impl Tabs { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TabsMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a new tab.\n# Default Arguments\n* `title` - `\"\"`\n* `icon` - `null`"] # [doc = ""] # [inline] pub fn add_tab (& self , title : impl Into < GodotString > , icon : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . add_tab ; let ret = crate :: icalls :: icallvar__str_obj (method_bind , self . this . sys () . as_ptr () , title . into () , icon . as_arg_ptr ()) ; } } # [doc = "Moves the scroll view to make the tab visible."] # [doc = ""] # [inline] pub fn ensure_tab_visible (& self , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . ensure_tab_visible ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; } } # [doc = "Select tab at index `tab_idx`."] # [doc = ""] # [inline] pub fn current_tab (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_current_tab ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, tabs can be rearranged with mouse drag."] # [doc = ""] # [inline] pub fn drag_to_rearrange_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_drag_to_rearrange_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the offset buttons (the ones that appear when there's not enough space for all tabs) are visible."] # [doc = ""] # [inline] pub fn get_offset_buttons_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_offset_buttons_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the previously active tab index."] # [doc = ""] # [inline] pub fn get_previous_tab (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_previous_tab ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "if `true`, the mouse's scroll wheel can be used to navigate the scroll view."] # [doc = ""] # [inline] pub fn scrolling_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_scrolling_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if select with right mouse button is enabled."] # [doc = ""] # [inline] pub fn get_select_with_rmb (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_select_with_rmb ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The alignment of all tabs. See [`TabAlign`][TabAlign] for details."] # [doc = ""] # [inline] pub fn tab_align (& self) -> crate :: generated :: tabs :: TabAlign { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_align ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: tabs :: TabAlign > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the button icon from the tab at index `tab_idx`."] # [doc = ""] # [inline] pub fn get_tab_button_icon (& self , tab_idx : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_button_icon ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , tab_idx as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets when the close button will appear on the tabs. See [`CloseButtonDisplayPolicy`][CloseButtonDisplayPolicy] for details."] # [doc = ""] # [inline] pub fn tab_close_display_policy (& self) -> crate :: generated :: tabs :: CloseButtonDisplayPolicy { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_close_display_policy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: tabs :: CloseButtonDisplayPolicy > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of tabs."] # [doc = ""] # [inline] pub fn get_tab_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the tab at index `tab_idx` is disabled."] # [doc = ""] # [inline] pub fn get_tab_disabled (& self , tab_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_disabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , tab_idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`Texture`][Texture] for the tab at index `tab_idx` or `null` if the tab has no [`Texture`][Texture]."] # [doc = ""] # [inline] pub fn get_tab_icon (& self , tab_idx : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_icon ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , tab_idx as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of hidden tabs offsetted to the left."] # [doc = ""] # [inline] pub fn get_tab_offset (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns tab [`Rect2`][Rect2] with local position and size."] # [doc = ""] # [inline] pub fn get_tab_rect (& self , tab_idx : i64) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_rect ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , tab_idx as _) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the title of the tab at index `tab_idx`."] # [doc = ""] # [inline] pub fn get_tab_title (& self , tab_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tab_title ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , tab_idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`Tabs`][Tabs]' rearrange group ID."] # [doc = ""] # [inline] pub fn get_tabs_rearrange_group (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . get_tabs_rearrange_group ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Moves a tab from `from` to `to`."] # [doc = ""] # [inline] pub fn move_tab (& self , from : i64 , to : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . move_tab ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , from as _ , to as _) ; } } # [doc = "Removes the tab at index `tab_idx`."] # [doc = ""] # [inline] pub fn remove_tab (& self , tab_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . remove_tab ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , tab_idx as _) ; } } # [doc = "Select tab at index `tab_idx`."] # [doc = ""] # [inline] pub fn set_current_tab (& self , tab_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_current_tab ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , tab_idx as _) ; } } # [doc = "If `true`, tabs can be rearranged with mouse drag."] # [doc = ""] # [inline] pub fn set_drag_to_rearrange_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_drag_to_rearrange_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "if `true`, the mouse's scroll wheel can be used to navigate the scroll view."] # [doc = ""] # [inline] pub fn set_scrolling_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_scrolling_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, enables selecting a tab with the right mouse button."] # [doc = ""] # [inline] pub fn set_select_with_rmb (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_select_with_rmb ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The alignment of all tabs. See [`TabAlign`][TabAlign] for details."] # [doc = ""] # [inline] pub fn set_tab_align (& self , align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_tab_align ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , align as _) ; } } # [doc = "Sets the button icon from the tab at index `tab_idx`."] # [doc = ""] # [inline] pub fn set_tab_button_icon (& self , tab_idx : i64 , icon : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_tab_button_icon ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , tab_idx as _ , icon . as_arg_ptr ()) ; } } # [doc = "Sets when the close button will appear on the tabs. See [`CloseButtonDisplayPolicy`][CloseButtonDisplayPolicy] for details."] # [doc = ""] # [inline] pub fn set_tab_close_display_policy (& self , policy : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_tab_close_display_policy ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , policy as _) ; } } # [doc = "If `disabled` is `true`, disables the tab at index `tab_idx`, making it non-interactable."] # [doc = ""] # [inline] pub fn set_tab_disabled (& self , tab_idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_tab_disabled ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , tab_idx as _ , disabled as _) ; } } # [doc = "Sets an `icon` for the tab at index `tab_idx`."] # [doc = ""] # [inline] pub fn set_tab_icon (& self , tab_idx : i64 , icon : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_tab_icon ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , tab_idx as _ , icon . as_arg_ptr ()) ; } } # [doc = "Sets a `title` for the tab at index `tab_idx`."] # [doc = ""] # [inline] pub fn set_tab_title (& self , tab_idx : i64 , title : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_tab_title ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , tab_idx as _ , title . into ()) ; } } # [doc = "Defines the rearrange group ID. Choose for each [`Tabs`][Tabs] the same value to dragging tabs between [`Tabs`][Tabs]. Enable drag with [`drag_to_rearrange_enabled`][Self::drag_to_rearrange_enabled]."] # [doc = ""] # [inline] pub fn set_tabs_rearrange_group (& self , group_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TabsMethodTable :: get (get_api ()) . set_tabs_rearrange_group ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , group_id as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Tabs { } unsafe impl GodotObject for Tabs { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Tabs" } } impl QueueFree for Tabs { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Tabs { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Tabs { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for Tabs { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Tabs { } unsafe impl SubClass < crate :: generated :: Node > for Tabs { } unsafe impl SubClass < crate :: generated :: Object > for Tabs { } impl Instanciable for Tabs { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Tabs :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TabsMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_tab : * mut sys :: godot_method_bind , pub ensure_tab_visible : * mut sys :: godot_method_bind , pub get_current_tab : * mut sys :: godot_method_bind , pub get_drag_to_rearrange_enabled : * mut sys :: godot_method_bind , pub get_offset_buttons_visible : * mut sys :: godot_method_bind , pub get_previous_tab : * mut sys :: godot_method_bind , pub get_scrolling_enabled : * mut sys :: godot_method_bind , pub get_select_with_rmb : * mut sys :: godot_method_bind , pub get_tab_align : * mut sys :: godot_method_bind , pub get_tab_button_icon : * mut sys :: godot_method_bind , pub get_tab_close_display_policy : * mut sys :: godot_method_bind , pub get_tab_count : * mut sys :: godot_method_bind , pub get_tab_disabled : * mut sys :: godot_method_bind , pub get_tab_icon : * mut sys :: godot_method_bind , pub get_tab_offset : * mut sys :: godot_method_bind , pub get_tab_rect : * mut sys :: godot_method_bind , pub get_tab_title : * mut sys :: godot_method_bind , pub get_tabs_rearrange_group : * mut sys :: godot_method_bind , pub move_tab : * mut sys :: godot_method_bind , pub remove_tab : * mut sys :: godot_method_bind , pub set_current_tab : * mut sys :: godot_method_bind , pub set_drag_to_rearrange_enabled : * mut sys :: godot_method_bind , pub set_scrolling_enabled : * mut sys :: godot_method_bind , pub set_select_with_rmb : * mut sys :: godot_method_bind , pub set_tab_align : * mut sys :: godot_method_bind , pub set_tab_button_icon : * mut sys :: godot_method_bind , pub set_tab_close_display_policy : * mut sys :: godot_method_bind , pub set_tab_disabled : * mut sys :: godot_method_bind , pub set_tab_icon : * mut sys :: godot_method_bind , pub set_tab_title : * mut sys :: godot_method_bind , pub set_tabs_rearrange_group : * mut sys :: godot_method_bind } impl TabsMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TabsMethodTable = TabsMethodTable { class_constructor : None , add_tab : 0 as * mut sys :: godot_method_bind , ensure_tab_visible : 0 as * mut sys :: godot_method_bind , get_current_tab : 0 as * mut sys :: godot_method_bind , get_drag_to_rearrange_enabled : 0 as * mut sys :: godot_method_bind , get_offset_buttons_visible : 0 as * mut sys :: godot_method_bind , get_previous_tab : 0 as * mut sys :: godot_method_bind , get_scrolling_enabled : 0 as * mut sys :: godot_method_bind , get_select_with_rmb : 0 as * mut sys :: godot_method_bind , get_tab_align : 0 as * mut sys :: godot_method_bind , get_tab_button_icon : 0 as * mut sys :: godot_method_bind , get_tab_close_display_policy : 0 as * mut sys :: godot_method_bind , get_tab_count : 0 as * mut sys :: godot_method_bind , get_tab_disabled : 0 as * mut sys :: godot_method_bind , get_tab_icon : 0 as * mut sys :: godot_method_bind , get_tab_offset : 0 as * mut sys :: godot_method_bind , get_tab_rect : 0 as * mut sys :: godot_method_bind , get_tab_title : 0 as * mut sys :: godot_method_bind , get_tabs_rearrange_group : 0 as * mut sys :: godot_method_bind , move_tab : 0 as * mut sys :: godot_method_bind , remove_tab : 0 as * mut sys :: godot_method_bind , set_current_tab : 0 as * mut sys :: godot_method_bind , set_drag_to_rearrange_enabled : 0 as * mut sys :: godot_method_bind , set_scrolling_enabled : 0 as * mut sys :: godot_method_bind , set_select_with_rmb : 0 as * mut sys :: godot_method_bind , set_tab_align : 0 as * mut sys :: godot_method_bind , set_tab_button_icon : 0 as * mut sys :: godot_method_bind , set_tab_close_display_policy : 0 as * mut sys :: godot_method_bind , set_tab_disabled : 0 as * mut sys :: godot_method_bind , set_tab_icon : 0 as * mut sys :: godot_method_bind , set_tab_title : 0 as * mut sys :: godot_method_bind , set_tabs_rearrange_group : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TabsMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Tabs\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_tab = (gd_api . godot_method_bind_get_method) (class_name , "add_tab\0" . as_ptr () as * const c_char) ; table . ensure_tab_visible = (gd_api . godot_method_bind_get_method) (class_name , "ensure_tab_visible\0" . as_ptr () as * const c_char) ; table . get_current_tab = (gd_api . godot_method_bind_get_method) (class_name , "get_current_tab\0" . as_ptr () as * const c_char) ; table . get_drag_to_rearrange_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_drag_to_rearrange_enabled\0" . as_ptr () as * const c_char) ; table . get_offset_buttons_visible = (gd_api . godot_method_bind_get_method) (class_name , "get_offset_buttons_visible\0" . as_ptr () as * const c_char) ; table . get_previous_tab = (gd_api . godot_method_bind_get_method) (class_name , "get_previous_tab\0" . as_ptr () as * const c_char) ; table . get_scrolling_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_scrolling_enabled\0" . as_ptr () as * const c_char) ; table . get_select_with_rmb = (gd_api . godot_method_bind_get_method) (class_name , "get_select_with_rmb\0" . as_ptr () as * const c_char) ; table . get_tab_align = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_align\0" . as_ptr () as * const c_char) ; table . get_tab_button_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_button_icon\0" . as_ptr () as * const c_char) ; table . get_tab_close_display_policy = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_close_display_policy\0" . as_ptr () as * const c_char) ; table . get_tab_count = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_count\0" . as_ptr () as * const c_char) ; table . get_tab_disabled = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_disabled\0" . as_ptr () as * const c_char) ; table . get_tab_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_icon\0" . as_ptr () as * const c_char) ; table . get_tab_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_offset\0" . as_ptr () as * const c_char) ; table . get_tab_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_rect\0" . as_ptr () as * const c_char) ; table . get_tab_title = (gd_api . godot_method_bind_get_method) (class_name , "get_tab_title\0" . as_ptr () as * const c_char) ; table . get_tabs_rearrange_group = (gd_api . godot_method_bind_get_method) (class_name , "get_tabs_rearrange_group\0" . as_ptr () as * const c_char) ; table . move_tab = (gd_api . godot_method_bind_get_method) (class_name , "move_tab\0" . as_ptr () as * const c_char) ; table . remove_tab = (gd_api . godot_method_bind_get_method) (class_name , "remove_tab\0" . as_ptr () as * const c_char) ; table . set_current_tab = (gd_api . godot_method_bind_get_method) (class_name , "set_current_tab\0" . as_ptr () as * const c_char) ; table . set_drag_to_rearrange_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_to_rearrange_enabled\0" . as_ptr () as * const c_char) ; table . set_scrolling_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_scrolling_enabled\0" . as_ptr () as * const c_char) ; table . set_select_with_rmb = (gd_api . godot_method_bind_get_method) (class_name , "set_select_with_rmb\0" . as_ptr () as * const c_char) ; table . set_tab_align = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_align\0" . as_ptr () as * const c_char) ; table . set_tab_button_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_button_icon\0" . as_ptr () as * const c_char) ; table . set_tab_close_display_policy = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_close_display_policy\0" . as_ptr () as * const c_char) ; table . set_tab_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_disabled\0" . as_ptr () as * const c_char) ; table . set_tab_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_icon\0" . as_ptr () as * const c_char) ; table . set_tab_title = (gd_api . godot_method_bind_get_method) (class_name , "set_tab_title\0" . as_ptr () as * const c_char) ; table . set_tabs_rearrange_group = (gd_api . godot_method_bind_get_method) (class_name , "set_tabs_rearrange_group\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::tabs::private::Tabs;
            
            pub mod text_edit {
                # ! [doc = "This module contains types related to the API class [`TextEdit`][super::TextEdit]."] pub (crate) mod private { # [doc = "`core class TextEdit` inherits `Control` (manually managed).\n\nThis class has related types in the [`text_edit`][super::text_edit] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_textedit.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`TextEdit` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<TextEdit>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nTextEdit inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TextEdit { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TextEdit ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MenuItems (pub i64) ; impl MenuItems { pub const CUT : MenuItems = MenuItems (0i64) ; pub const COPY : MenuItems = MenuItems (1i64) ; pub const PASTE : MenuItems = MenuItems (2i64) ; pub const CLEAR : MenuItems = MenuItems (3i64) ; pub const SELECT_ALL : MenuItems = MenuItems (4i64) ; pub const UNDO : MenuItems = MenuItems (5i64) ; pub const REDO : MenuItems = MenuItems (6i64) ; pub const MAX : MenuItems = MenuItems (7i64) ; } impl From < i64 > for MenuItems { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MenuItems > for i64 { # [inline] fn from (v : MenuItems) -> Self { v . 0 } } impl FromVariant for MenuItems { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SearchFlags (pub i64) ; impl SearchFlags { pub const MATCH_CASE : SearchFlags = SearchFlags (1i64) ; pub const WHOLE_WORDS : SearchFlags = SearchFlags (2i64) ; pub const BACKWARDS : SearchFlags = SearchFlags (4i64) ; } impl From < i64 > for SearchFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SearchFlags > for i64 { # [inline] fn from (v : SearchFlags) -> Self { v . 0 } } impl FromVariant for SearchFlags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SearchResult (pub i64) ; impl SearchResult { pub const COLUMN : SearchResult = SearchResult (0i64) ; pub const LINE : SearchResult = SearchResult (1i64) ; } impl From < i64 > for SearchResult { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SearchResult > for i64 { # [inline] fn from (v : SearchResult) -> Self { v . 0 } } impl FromVariant for SearchResult { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TextEdit { pub const MENU_CUT : i64 = 0i64 ; pub const SEARCH_RESULT_COLUMN : i64 = 0i64 ; pub const MENU_COPY : i64 = 1i64 ; pub const SEARCH_MATCH_CASE : i64 = 1i64 ; pub const SEARCH_RESULT_LINE : i64 = 1i64 ; pub const MENU_PASTE : i64 = 2i64 ; pub const SEARCH_WHOLE_WORDS : i64 = 2i64 ; pub const MENU_CLEAR : i64 = 3i64 ; pub const MENU_SELECT_ALL : i64 = 4i64 ; pub const SEARCH_BACKWARDS : i64 = 4i64 ; pub const MENU_UNDO : i64 = 5i64 ; pub const MENU_REDO : i64 = 6i64 ; pub const MENU_MAX : i64 = 7i64 ; } impl TextEdit { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TextEditMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds color region (given the delimiters) and its colors.\n# Default Arguments\n* `line_only` - `false`"] # [doc = ""] # [inline] pub fn add_color_region (& self , begin_key : impl Into < GodotString > , end_key : impl Into < GodotString > , color : Color , line_only : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . add_color_region ; let ret = crate :: icalls :: icallvar__str_str_color_bool (method_bind , self . this . sys () . as_ptr () , begin_key . into () , end_key . into () , color , line_only as _) ; } } # [doc = "Adds a `keyword` and its [`Color`][Color]."] # [doc = ""] # [inline] pub fn add_keyword_color (& self , keyword : impl Into < GodotString > , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . add_keyword_color ; let ret = crate :: icalls :: icallvar__str_color (method_bind , self . this . sys () . as_ptr () , keyword . into () , color) ; } } # [doc = "Returns if the given line is foldable, that is, it has indented lines right below it."] # [doc = ""] # [inline] pub fn can_fold (& self , line : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . can_fold ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Centers the viewport on the line the editing cursor is at. This also resets the [`scroll_horizontal`][Self::scroll_horizontal] value to `0`."] # [doc = ""] # [inline] pub fn center_viewport_to_cursor (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . center_viewport_to_cursor ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Clears all custom syntax coloring information previously added with [`add_color_region`][Self::add_color_region] or [`add_keyword_color`][Self::add_keyword_color]."] # [doc = ""] # [inline] pub fn clear_colors (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . clear_colors ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Clears the undo history."] # [doc = ""] # [inline] pub fn clear_undo_history (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . clear_undo_history ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Copy's the current text selection."] # [doc = ""] # [inline] pub fn copy (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . copy ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the caret (visual cursor) blinks."] # [doc = ""] # [inline] pub fn cursor_get_blink_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . cursor_get_blink_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Duration (in seconds) of a caret's blinking cycle."] # [doc = ""] # [inline] pub fn cursor_get_blink_speed (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . cursor_get_blink_speed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the column the editing cursor is at."] # [doc = ""] # [inline] pub fn cursor_get_column (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . cursor_get_column ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the line the editing cursor is at."] # [doc = ""] # [inline] pub fn cursor_get_line (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . cursor_get_line ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the caret displays as a rectangle.\nIf `false`, the caret displays as a bar."] # [doc = ""] # [inline] pub fn cursor_is_block_mode (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . cursor_is_block_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the caret (visual cursor) blinks."] # [doc = ""] # [inline] pub fn cursor_set_blink_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . cursor_set_blink_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Duration (in seconds) of a caret's blinking cycle."] # [doc = ""] # [inline] pub fn cursor_set_blink_speed (& self , blink_speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . cursor_set_blink_speed ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , blink_speed as _) ; } } # [doc = "If `true`, the caret displays as a rectangle.\nIf `false`, the caret displays as a bar."] # [doc = ""] # [inline] pub fn cursor_set_block_mode (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . cursor_set_block_mode ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Moves the cursor at the specified `column` index.\nIf `adjust_viewport` is set to `true`, the viewport will center at the cursor position after the move occurs.\n# Default Arguments\n* `adjust_viewport` - `true`"] # [doc = ""] # [inline] pub fn cursor_set_column (& self , column : i64 , adjust_viewport : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . cursor_set_column ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , column as _ , adjust_viewport as _) ; } } # [doc = "Moves the cursor at the specified `line` index.\nIf `adjust_viewport` is set to `true`, the viewport will center at the cursor position after the move occurs.\nIf `can_be_hidden` is set to `true`, the specified `line` can be hidden using [`set_line_as_hidden`][Self::set_line_as_hidden].\n# Default Arguments\n* `adjust_viewport` - `true`\n* `can_be_hidden` - `true`\n* `wrap_index` - `0`"] # [doc = ""] # [inline] pub fn cursor_set_line (& self , line : i64 , adjust_viewport : bool , can_be_hidden : bool , wrap_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . cursor_set_line ; let ret = crate :: icalls :: icallvar__i64_bool_bool_i64 (method_bind , self . this . sys () . as_ptr () , line as _ , adjust_viewport as _ , can_be_hidden as _ , wrap_index as _) ; } } # [doc = "Cut's the current selection."] # [doc = ""] # [inline] pub fn cut (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . cut ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Deselects the current selection."] # [doc = ""] # [inline] pub fn deselect (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . deselect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, a minimap is shown, providing an outline of your source code."] # [doc = ""] # [inline] pub fn draw_minimap (& self , draw : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . draw_minimap ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , draw as _) ; } } # [doc = "Folds all lines that are possible to be folded (see [`can_fold`][Self::can_fold])."] # [doc = ""] # [inline] pub fn fold_all_lines (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . fold_all_lines ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Folds the given line, if possible (see [`can_fold`][Self::can_fold])."] # [doc = ""] # [inline] pub fn fold_line (& self , line : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . fold_line ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line as _) ; } } # [doc = "Returns an array containing the line number of each breakpoint."] # [doc = ""] # [inline] pub fn get_breakpoints (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_breakpoints ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels."] # [doc = ""] # [inline] pub fn h_scroll (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_h_scroll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`Color`][Color] of the specified `keyword`."] # [doc = ""] # [inline] pub fn get_keyword_color (& self , keyword : impl Into < GodotString >) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_keyword_color ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , keyword . into ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the text of a specific line."] # [doc = ""] # [inline] pub fn get_line (& self , line : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_line ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the line and column at the given position. In the returned vector, `x` is the column, `y` is the line."] # [doc = ""] # [inline] pub fn get_line_column_at_pos (& self , position : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_line_column_at_pos ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the amount of total lines in the text."] # [doc = ""] # [inline] pub fn get_line_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_line_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the height of a largest line."] # [doc = ""] # [inline] pub fn get_line_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_line_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the width in pixels of the `wrap_index` on `line`.\n# Default Arguments\n* `wrap_index` - `-1`"] # [doc = ""] # [inline] pub fn get_line_width (& self , line : i64 , wrap_index : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_line_width ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , line as _ , wrap_index as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of times the given line is wrapped."] # [doc = ""] # [inline] pub fn get_line_wrap_count (& self , line : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_line_wrap_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an array of [`String`][GodotString]s representing each wrapped index."] # [doc = ""] # [inline] pub fn get_line_wrapped_text (& self , line : i64) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_line_wrapped_text ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line as _) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`PopupMenu`][PopupMenu] of this [`TextEdit`][TextEdit]. By default, this menu is displayed when right-clicking on the [`TextEdit`][TextEdit].\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_menu (& self) -> Option < Ref < crate :: generated :: PopupMenu , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_menu ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: PopupMenu , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The width, in pixels, of the minimap."] # [doc = ""] # [inline] pub fn minimap_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_minimap_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the local position for the given `line` and `column`. If `x` or `y` of the returned vector equal `-1`, the position is outside of the viewable area of the control.\n**Note:** The Y position corresponds to the bottom side of the line. Use [`get_rect_at_line_column`][Self::get_rect_at_line_column] to get the top side position."] # [doc = ""] # [inline] pub fn get_pos_at_line_column (& self , line : i64 , column : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_pos_at_line_column ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , line as _ , column as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the local position and size for the grapheme at the given `line` and `column`. If `x` or `y` position of the returned rect equal `-1`, the position is outside of the viewable area of the control.\n**Note:** The Y position of the returned rect corresponds to the top side of the line, unlike [`get_pos_at_line_column`][Self::get_pos_at_line_column] which returns the bottom side."] # [doc = ""] # [inline] pub fn get_rect_at_line_column (& self , line : i64 , column : i64) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_rect_at_line_column ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , line as _ , column as _) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the selection begin column."] # [doc = ""] # [inline] pub fn get_selection_from_column (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_selection_from_column ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the selection begin line."] # [doc = ""] # [inline] pub fn get_selection_from_line (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_selection_from_line ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the text inside the selection."] # [doc = ""] # [inline] pub fn get_selection_text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_selection_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the selection end column."] # [doc = ""] # [inline] pub fn get_selection_to_column (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_selection_to_column ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the selection end line."] # [doc = ""] # [inline] pub fn get_selection_to_line (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_selection_to_line ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "String value of the [`TextEdit`][TextEdit]."] # [doc = ""] # [inline] pub fn text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the total width of all gutters and internal padding."] # [doc = ""] # [inline] pub fn get_total_gutter_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_total_gutter_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the total amount of lines that could be drawn."] # [doc = ""] # [inline] pub fn get_total_visible_rows (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_total_visible_rows ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line."] # [doc = ""] # [inline] pub fn v_scroll (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_v_scroll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Vertical scroll sensitivity."] # [doc = ""] # [inline] pub fn v_scroll_speed (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_v_scroll_speed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of visible lines, including wrapped text."] # [doc = ""] # [inline] pub fn get_visible_rows (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_visible_rows ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a [`String`][GodotString] text with the word under the caret (text cursor) location."] # [doc = ""] # [inline] pub fn get_word_under_cursor (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . get_word_under_cursor ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns whether the specified `keyword` has a color set to it or not."] # [doc = ""] # [inline] pub fn has_keyword_color (& self , keyword : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . has_keyword_color ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , keyword . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if a \"redo\" action is available."] # [doc = ""] # [inline] pub fn has_redo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . has_redo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if an \"undo\" action is available."] # [doc = ""] # [inline] pub fn has_undo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . has_undo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Insert the specified text at the cursor position."] # [doc = ""] # [inline] pub fn insert_text_at_cursor (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . insert_text_at_cursor ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "If `true`, the bookmark gutter is visible."] # [doc = ""] # [inline] pub fn is_bookmark_gutter_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_bookmark_gutter_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the breakpoint gutter is visible."] # [doc = ""] # [inline] pub fn is_breakpoint_gutter_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_breakpoint_gutter_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, a right-click displays the context menu."] # [doc = ""] # [inline] pub fn is_context_menu_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_context_menu_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the selected text will be deselected when focus is lost."] # [doc = ""] # [inline] pub fn is_deselect_on_focus_loss_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_deselect_on_focus_loss_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, allow drag and drop of selected text."] # [doc = ""] # [inline] pub fn is_drag_and_drop_selection_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_drag_and_drop_selection_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the fold gutter is visible. This enables folding groups of indented lines."] # [doc = ""] # [inline] pub fn is_drawing_fold_gutter (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_drawing_fold_gutter ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, a minimap is shown, providing an outline of your source code."] # [doc = ""] # [inline] pub fn is_drawing_minimap (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_drawing_minimap ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the \"space\" character will have a visible representation."] # [doc = ""] # [inline] pub fn is_drawing_spaces (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_drawing_spaces ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the \"tab\" character will have a visible representation."] # [doc = ""] # [inline] pub fn is_drawing_tabs (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_drawing_tabs ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether the line at the specified index is folded or not."] # [doc = ""] # [inline] pub fn is_folded (& self , line : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_folded ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, all lines that have been set to hidden by [`set_line_as_hidden`][Self::set_line_as_hidden], will not be visible."] # [doc = ""] # [inline] pub fn is_hiding_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_hiding_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, all occurrences of the selected text will be highlighted."] # [doc = ""] # [inline] pub fn is_highlight_all_occurrences_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_highlight_all_occurrences_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the line containing the cursor is highlighted."] # [doc = ""] # [inline] pub fn is_highlight_current_line_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_highlight_current_line_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether the line at the specified index is hidden or not."] # [doc = ""] # [inline] pub fn is_line_hidden (& self , line : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_line_hidden ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` when the specified `line` is bookmarked."] # [doc = ""] # [inline] pub fn is_line_set_as_bookmark (& self , line : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_line_set_as_bookmark ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` when the specified `line` has a breakpoint."] # [doc = ""] # [inline] pub fn is_line_set_as_breakpoint (& self , line : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_line_set_as_breakpoint ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` when the specified `line` is marked as safe."] # [doc = ""] # [inline] pub fn is_line_set_as_safe (& self , line : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_line_set_as_safe ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns if the given line is wrapped."] # [doc = ""] # [inline] pub fn is_line_wrapped (& self , line : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_line_wrapped ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `false`, using middle mouse button to paste clipboard will be disabled.\n**Note:** This method is only implemented on Linux."] # [doc = ""] # [inline] pub fn is_middle_mouse_paste_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_middle_mouse_paste_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether the mouse is over selection. If `edges` is `true`, the edges are considered part of the selection."] # [doc = ""] # [inline] pub fn is_mouse_over_selection (& self , edges : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_mouse_over_selection ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , edges as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, custom `font_color_selected` will be used for selected text."] # [doc = ""] # [inline] pub fn is_overriding_selected_font_color (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_overriding_selected_font_color ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, read-only mode is enabled. Existing text cannot be modified and new text cannot be added."] # [doc = ""] # [inline] pub fn is_readonly (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_readonly ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, a right-click moves the cursor at the mouse position before displaying the context menu.\nIf `false`, the context menu disregards mouse location."] # [doc = ""] # [inline] pub fn is_right_click_moving_caret (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_right_click_moving_caret ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, text can be selected.\nIf `false`, text can not be selected by the user or by the [`select`][Self::select] or [`select_all`][Self::select_all] methods."] # [doc = ""] # [inline] pub fn is_selecting_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_selecting_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the selection is active."] # [doc = ""] # [inline] pub fn is_selection_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_selection_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, shortcut keys for context menu items are enabled, even if the context menu is disabled."] # [doc = ""] # [inline] pub fn is_shortcut_keys_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_shortcut_keys_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, line numbers are displayed to the left of the text."] # [doc = ""] # [inline] pub fn is_show_line_numbers_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_show_line_numbers_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, sets the `step` of the scrollbars to `0.25` which results in smoother scrolling."] # [doc = ""] # [inline] pub fn is_smooth_scroll_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_smooth_scroll_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, any custom color properties that have been set for this [`TextEdit`][TextEdit] will be visible."] # [doc = ""] # [inline] pub fn is_syntax_coloring_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_syntax_coloring_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the native virtual keyboard is shown when focused on platforms that support it."] # [doc = ""] # [inline] pub fn is_virtual_keyboard_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_virtual_keyboard_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, enables text wrapping when it goes beyond the edge of what is visible."] # [doc = ""] # [inline] pub fn is_wrap_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . is_wrap_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Triggers a right-click menu action by the specified index. See [`MenuItems`][MenuItems] for a list of available indexes."] # [doc = ""] # [inline] pub fn menu_option (& self , option : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . menu_option ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , option as _) ; } } # [doc = "Paste the current selection."] # [doc = ""] # [inline] pub fn paste (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . paste ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Perform redo operation."] # [doc = ""] # [inline] pub fn redo (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . redo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes all the breakpoints. This will not fire the `breakpoint_toggled` signal."] # [doc = ""] # [inline] pub fn remove_breakpoints (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . remove_breakpoints ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nPerform a search inside the text. Search flags can be specified in the [`SearchFlags`][SearchFlags] enum.\nReturns an empty `PoolIntArray` if no result was found. Otherwise, the result line and column can be accessed at indices specified in the [`SearchResult`][SearchResult] enum, e.g:\n```gdscript\nvar result = search(key, flags, line, column)\nif result.size() > 0:\n    # Result found.\n    var res_line = result[TextEdit.SEARCH_RESULT_LINE]\n    var res_column = result[TextEdit.SEARCH_RESULT_COLUMN]\n```"] # [doc = ""] # [inline] pub fn search (& self , key : impl Into < GodotString > , flags : i64 , from_line : i64 , from_column : i64) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . search ; let ret = crate :: icalls :: icallvar__str_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , key . into () , flags as _ , from_line as _ , from_column as _) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Perform selection, from line/column to line/column.\nIf [`selecting_enabled`][Self::selecting_enabled] is `false`, no selection will occur."] # [doc = ""] # [inline] pub fn select (& self , from_line : i64 , from_column : i64 , to_line : i64 , to_column : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . select ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , from_line as _ , from_column as _ , to_line as _ , to_column as _) ; } } # [doc = "Select all the text.\nIf [`selecting_enabled`][Self::selecting_enabled] is `false`, no selection will occur."] # [doc = ""] # [inline] pub fn select_all (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . select_all ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the bookmark gutter is visible."] # [doc = ""] # [inline] pub fn set_bookmark_gutter_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_bookmark_gutter_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the breakpoint gutter is visible."] # [doc = ""] # [inline] pub fn set_breakpoint_gutter_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_breakpoint_gutter_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, a right-click displays the context menu."] # [doc = ""] # [inline] pub fn set_context_menu_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_context_menu_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the selected text will be deselected when focus is lost."] # [doc = ""] # [inline] pub fn set_deselect_on_focus_loss_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_deselect_on_focus_loss_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, allow drag and drop of selected text."] # [doc = ""] # [inline] pub fn set_drag_and_drop_selection_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_drag_and_drop_selection_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the fold gutter is visible. This enables folding groups of indented lines."] # [doc = ""] # [inline] pub fn set_draw_fold_gutter (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_draw_fold_gutter ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the \"space\" character will have a visible representation."] # [doc = ""] # [inline] pub fn set_draw_spaces (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_draw_spaces ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the \"tab\" character will have a visible representation."] # [doc = ""] # [inline] pub fn set_draw_tabs (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_draw_tabs ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels."] # [doc = ""] # [inline] pub fn set_h_scroll (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_h_scroll ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "If `true`, all lines that have been set to hidden by [`set_line_as_hidden`][Self::set_line_as_hidden], will not be visible."] # [doc = ""] # [inline] pub fn set_hiding_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_hiding_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, all occurrences of the selected text will be highlighted."] # [doc = ""] # [inline] pub fn set_highlight_all_occurrences (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_highlight_all_occurrences ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the line containing the cursor is highlighted."] # [doc = ""] # [inline] pub fn set_highlight_current_line (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_highlight_current_line ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Sets the text for a specific line."] # [doc = ""] # [inline] pub fn set_line (& self , line : i64 , new_text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_line ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , line as _ , new_text . into ()) ; } } # [doc = "Bookmarks the `line` if `bookmark` is `true`. Deletes the bookmark if `bookmark` is `false`.\nBookmarks are shown in the [`breakpoint_gutter`][Self::breakpoint_gutter]."] # [doc = ""] # [inline] pub fn set_line_as_bookmark (& self , line : i64 , bookmark : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_line_as_bookmark ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , line as _ , bookmark as _) ; } } # [doc = "Adds or removes the breakpoint in `line`. Breakpoints are shown in the [`breakpoint_gutter`][Self::breakpoint_gutter]."] # [doc = ""] # [inline] pub fn set_line_as_breakpoint (& self , line : i64 , breakpoint : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_line_as_breakpoint ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , line as _ , breakpoint as _) ; } } # [doc = "If `true`, hides the line of the specified index."] # [doc = ""] # [inline] pub fn set_line_as_hidden (& self , line : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_line_as_hidden ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , line as _ , enable as _) ; } } # [doc = "If `true`, marks the `line` as safe.\nThis will show the line number with the color provided in the `safe_line_number_color` theme property."] # [doc = ""] # [inline] pub fn set_line_as_safe (& self , line : i64 , safe : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_line_as_safe ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , line as _ , safe as _) ; } } # [doc = "If `false`, using middle mouse button to paste clipboard will be disabled.\n**Note:** This method is only implemented on Linux."] # [doc = ""] # [inline] pub fn set_middle_mouse_paste_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_middle_mouse_paste_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The width, in pixels, of the minimap."] # [doc = ""] # [inline] pub fn set_minimap_width (& self , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_minimap_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , width as _) ; } } # [doc = "If `true`, custom `font_color_selected` will be used for selected text."] # [doc = ""] # [inline] pub fn set_override_selected_font_color (& self , override_ : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_override_selected_font_color ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , override_ as _) ; } } # [doc = "If `true`, read-only mode is enabled. Existing text cannot be modified and new text cannot be added."] # [doc = ""] # [inline] pub fn set_readonly (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_readonly ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, a right-click moves the cursor at the mouse position before displaying the context menu.\nIf `false`, the context menu disregards mouse location."] # [doc = ""] # [inline] pub fn set_right_click_moves_caret (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_right_click_moves_caret ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, text can be selected.\nIf `false`, text can not be selected by the user or by the [`select`][Self::select] or [`select_all`][Self::select_all] methods."] # [doc = ""] # [inline] pub fn set_selecting_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_selecting_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, shortcut keys for context menu items are enabled, even if the context menu is disabled."] # [doc = ""] # [inline] pub fn set_shortcut_keys_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_shortcut_keys_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, line numbers are displayed to the left of the text."] # [doc = ""] # [inline] pub fn set_show_line_numbers (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_show_line_numbers ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, sets the `step` of the scrollbars to `0.25` which results in smoother scrolling."] # [doc = ""] # [inline] pub fn set_smooth_scroll_enable (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_smooth_scroll_enable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, any custom color properties that have been set for this [`TextEdit`][TextEdit] will be visible."] # [doc = ""] # [inline] pub fn set_syntax_coloring (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_syntax_coloring ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "String value of the [`TextEdit`][TextEdit]."] # [doc = ""] # [inline] pub fn set_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_text ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line."] # [doc = ""] # [inline] pub fn set_v_scroll (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_v_scroll ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Vertical scroll sensitivity."] # [doc = ""] # [inline] pub fn set_v_scroll_speed (& self , speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_v_scroll_speed ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , speed as _) ; } } # [doc = "If `true`, the native virtual keyboard is shown when focused on platforms that support it."] # [doc = ""] # [inline] pub fn set_virtual_keyboard_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_virtual_keyboard_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, enables text wrapping when it goes beyond the edge of what is visible."] # [doc = ""] # [inline] pub fn set_wrap_enabled (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . set_wrap_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Toggle the folding of the code block at the given line."] # [doc = ""] # [inline] pub fn toggle_fold_line (& self , line : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . toggle_fold_line ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line as _) ; } } # [doc = "Perform undo operation."] # [doc = ""] # [inline] pub fn undo (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . undo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Unfolds the given line, if folded."] # [doc = ""] # [inline] pub fn unfold_line (& self , line : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . unfold_line ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , line as _) ; } } # [doc = "Unhide all lines that were previously set to hidden by [`set_line_as_hidden`][Self::set_line_as_hidden]."] # [doc = ""] # [inline] pub fn unhide_all_lines (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextEditMethodTable :: get (get_api ()) . unhide_all_lines ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TextEdit { } unsafe impl GodotObject for TextEdit { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "TextEdit" } } impl QueueFree for TextEdit { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for TextEdit { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextEdit { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for TextEdit { } unsafe impl SubClass < crate :: generated :: CanvasItem > for TextEdit { } unsafe impl SubClass < crate :: generated :: Node > for TextEdit { } unsafe impl SubClass < crate :: generated :: Object > for TextEdit { } impl Instanciable for TextEdit { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { TextEdit :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextEditMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_color_region : * mut sys :: godot_method_bind , pub add_keyword_color : * mut sys :: godot_method_bind , pub can_fold : * mut sys :: godot_method_bind , pub center_viewport_to_cursor : * mut sys :: godot_method_bind , pub clear_colors : * mut sys :: godot_method_bind , pub clear_undo_history : * mut sys :: godot_method_bind , pub copy : * mut sys :: godot_method_bind , pub cursor_get_blink_enabled : * mut sys :: godot_method_bind , pub cursor_get_blink_speed : * mut sys :: godot_method_bind , pub cursor_get_column : * mut sys :: godot_method_bind , pub cursor_get_line : * mut sys :: godot_method_bind , pub cursor_is_block_mode : * mut sys :: godot_method_bind , pub cursor_set_blink_enabled : * mut sys :: godot_method_bind , pub cursor_set_blink_speed : * mut sys :: godot_method_bind , pub cursor_set_block_mode : * mut sys :: godot_method_bind , pub cursor_set_column : * mut sys :: godot_method_bind , pub cursor_set_line : * mut sys :: godot_method_bind , pub cut : * mut sys :: godot_method_bind , pub deselect : * mut sys :: godot_method_bind , pub draw_minimap : * mut sys :: godot_method_bind , pub fold_all_lines : * mut sys :: godot_method_bind , pub fold_line : * mut sys :: godot_method_bind , pub get_breakpoints : * mut sys :: godot_method_bind , pub get_h_scroll : * mut sys :: godot_method_bind , pub get_keyword_color : * mut sys :: godot_method_bind , pub get_line : * mut sys :: godot_method_bind , pub get_line_column_at_pos : * mut sys :: godot_method_bind , pub get_line_count : * mut sys :: godot_method_bind , pub get_line_height : * mut sys :: godot_method_bind , pub get_line_width : * mut sys :: godot_method_bind , pub get_line_wrap_count : * mut sys :: godot_method_bind , pub get_line_wrapped_text : * mut sys :: godot_method_bind , pub get_menu : * mut sys :: godot_method_bind , pub get_minimap_width : * mut sys :: godot_method_bind , pub get_pos_at_line_column : * mut sys :: godot_method_bind , pub get_rect_at_line_column : * mut sys :: godot_method_bind , pub get_selection_from_column : * mut sys :: godot_method_bind , pub get_selection_from_line : * mut sys :: godot_method_bind , pub get_selection_text : * mut sys :: godot_method_bind , pub get_selection_to_column : * mut sys :: godot_method_bind , pub get_selection_to_line : * mut sys :: godot_method_bind , pub get_text : * mut sys :: godot_method_bind , pub get_total_gutter_width : * mut sys :: godot_method_bind , pub get_total_visible_rows : * mut sys :: godot_method_bind , pub get_v_scroll : * mut sys :: godot_method_bind , pub get_v_scroll_speed : * mut sys :: godot_method_bind , pub get_visible_rows : * mut sys :: godot_method_bind , pub get_word_under_cursor : * mut sys :: godot_method_bind , pub has_keyword_color : * mut sys :: godot_method_bind , pub has_redo : * mut sys :: godot_method_bind , pub has_undo : * mut sys :: godot_method_bind , pub insert_text_at_cursor : * mut sys :: godot_method_bind , pub is_bookmark_gutter_enabled : * mut sys :: godot_method_bind , pub is_breakpoint_gutter_enabled : * mut sys :: godot_method_bind , pub is_context_menu_enabled : * mut sys :: godot_method_bind , pub is_deselect_on_focus_loss_enabled : * mut sys :: godot_method_bind , pub is_drag_and_drop_selection_enabled : * mut sys :: godot_method_bind , pub is_drawing_fold_gutter : * mut sys :: godot_method_bind , pub is_drawing_minimap : * mut sys :: godot_method_bind , pub is_drawing_spaces : * mut sys :: godot_method_bind , pub is_drawing_tabs : * mut sys :: godot_method_bind , pub is_folded : * mut sys :: godot_method_bind , pub is_hiding_enabled : * mut sys :: godot_method_bind , pub is_highlight_all_occurrences_enabled : * mut sys :: godot_method_bind , pub is_highlight_current_line_enabled : * mut sys :: godot_method_bind , pub is_line_hidden : * mut sys :: godot_method_bind , pub is_line_set_as_bookmark : * mut sys :: godot_method_bind , pub is_line_set_as_breakpoint : * mut sys :: godot_method_bind , pub is_line_set_as_safe : * mut sys :: godot_method_bind , pub is_line_wrapped : * mut sys :: godot_method_bind , pub is_middle_mouse_paste_enabled : * mut sys :: godot_method_bind , pub is_mouse_over_selection : * mut sys :: godot_method_bind , pub is_overriding_selected_font_color : * mut sys :: godot_method_bind , pub is_readonly : * mut sys :: godot_method_bind , pub is_right_click_moving_caret : * mut sys :: godot_method_bind , pub is_selecting_enabled : * mut sys :: godot_method_bind , pub is_selection_active : * mut sys :: godot_method_bind , pub is_shortcut_keys_enabled : * mut sys :: godot_method_bind , pub is_show_line_numbers_enabled : * mut sys :: godot_method_bind , pub is_smooth_scroll_enabled : * mut sys :: godot_method_bind , pub is_syntax_coloring_enabled : * mut sys :: godot_method_bind , pub is_virtual_keyboard_enabled : * mut sys :: godot_method_bind , pub is_wrap_enabled : * mut sys :: godot_method_bind , pub menu_option : * mut sys :: godot_method_bind , pub paste : * mut sys :: godot_method_bind , pub redo : * mut sys :: godot_method_bind , pub remove_breakpoints : * mut sys :: godot_method_bind , pub search : * mut sys :: godot_method_bind , pub select : * mut sys :: godot_method_bind , pub select_all : * mut sys :: godot_method_bind , pub set_bookmark_gutter_enabled : * mut sys :: godot_method_bind , pub set_breakpoint_gutter_enabled : * mut sys :: godot_method_bind , pub set_context_menu_enabled : * mut sys :: godot_method_bind , pub set_deselect_on_focus_loss_enabled : * mut sys :: godot_method_bind , pub set_drag_and_drop_selection_enabled : * mut sys :: godot_method_bind , pub set_draw_fold_gutter : * mut sys :: godot_method_bind , pub set_draw_spaces : * mut sys :: godot_method_bind , pub set_draw_tabs : * mut sys :: godot_method_bind , pub set_h_scroll : * mut sys :: godot_method_bind , pub set_hiding_enabled : * mut sys :: godot_method_bind , pub set_highlight_all_occurrences : * mut sys :: godot_method_bind , pub set_highlight_current_line : * mut sys :: godot_method_bind , pub set_line : * mut sys :: godot_method_bind , pub set_line_as_bookmark : * mut sys :: godot_method_bind , pub set_line_as_breakpoint : * mut sys :: godot_method_bind , pub set_line_as_hidden : * mut sys :: godot_method_bind , pub set_line_as_safe : * mut sys :: godot_method_bind , pub set_middle_mouse_paste_enabled : * mut sys :: godot_method_bind , pub set_minimap_width : * mut sys :: godot_method_bind , pub set_override_selected_font_color : * mut sys :: godot_method_bind , pub set_readonly : * mut sys :: godot_method_bind , pub set_right_click_moves_caret : * mut sys :: godot_method_bind , pub set_selecting_enabled : * mut sys :: godot_method_bind , pub set_shortcut_keys_enabled : * mut sys :: godot_method_bind , pub set_show_line_numbers : * mut sys :: godot_method_bind , pub set_smooth_scroll_enable : * mut sys :: godot_method_bind , pub set_syntax_coloring : * mut sys :: godot_method_bind , pub set_text : * mut sys :: godot_method_bind , pub set_v_scroll : * mut sys :: godot_method_bind , pub set_v_scroll_speed : * mut sys :: godot_method_bind , pub set_virtual_keyboard_enabled : * mut sys :: godot_method_bind , pub set_wrap_enabled : * mut sys :: godot_method_bind , pub toggle_fold_line : * mut sys :: godot_method_bind , pub undo : * mut sys :: godot_method_bind , pub unfold_line : * mut sys :: godot_method_bind , pub unhide_all_lines : * mut sys :: godot_method_bind } impl TextEditMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextEditMethodTable = TextEditMethodTable { class_constructor : None , add_color_region : 0 as * mut sys :: godot_method_bind , add_keyword_color : 0 as * mut sys :: godot_method_bind , can_fold : 0 as * mut sys :: godot_method_bind , center_viewport_to_cursor : 0 as * mut sys :: godot_method_bind , clear_colors : 0 as * mut sys :: godot_method_bind , clear_undo_history : 0 as * mut sys :: godot_method_bind , copy : 0 as * mut sys :: godot_method_bind , cursor_get_blink_enabled : 0 as * mut sys :: godot_method_bind , cursor_get_blink_speed : 0 as * mut sys :: godot_method_bind , cursor_get_column : 0 as * mut sys :: godot_method_bind , cursor_get_line : 0 as * mut sys :: godot_method_bind , cursor_is_block_mode : 0 as * mut sys :: godot_method_bind , cursor_set_blink_enabled : 0 as * mut sys :: godot_method_bind , cursor_set_blink_speed : 0 as * mut sys :: godot_method_bind , cursor_set_block_mode : 0 as * mut sys :: godot_method_bind , cursor_set_column : 0 as * mut sys :: godot_method_bind , cursor_set_line : 0 as * mut sys :: godot_method_bind , cut : 0 as * mut sys :: godot_method_bind , deselect : 0 as * mut sys :: godot_method_bind , draw_minimap : 0 as * mut sys :: godot_method_bind , fold_all_lines : 0 as * mut sys :: godot_method_bind , fold_line : 0 as * mut sys :: godot_method_bind , get_breakpoints : 0 as * mut sys :: godot_method_bind , get_h_scroll : 0 as * mut sys :: godot_method_bind , get_keyword_color : 0 as * mut sys :: godot_method_bind , get_line : 0 as * mut sys :: godot_method_bind , get_line_column_at_pos : 0 as * mut sys :: godot_method_bind , get_line_count : 0 as * mut sys :: godot_method_bind , get_line_height : 0 as * mut sys :: godot_method_bind , get_line_width : 0 as * mut sys :: godot_method_bind , get_line_wrap_count : 0 as * mut sys :: godot_method_bind , get_line_wrapped_text : 0 as * mut sys :: godot_method_bind , get_menu : 0 as * mut sys :: godot_method_bind , get_minimap_width : 0 as * mut sys :: godot_method_bind , get_pos_at_line_column : 0 as * mut sys :: godot_method_bind , get_rect_at_line_column : 0 as * mut sys :: godot_method_bind , get_selection_from_column : 0 as * mut sys :: godot_method_bind , get_selection_from_line : 0 as * mut sys :: godot_method_bind , get_selection_text : 0 as * mut sys :: godot_method_bind , get_selection_to_column : 0 as * mut sys :: godot_method_bind , get_selection_to_line : 0 as * mut sys :: godot_method_bind , get_text : 0 as * mut sys :: godot_method_bind , get_total_gutter_width : 0 as * mut sys :: godot_method_bind , get_total_visible_rows : 0 as * mut sys :: godot_method_bind , get_v_scroll : 0 as * mut sys :: godot_method_bind , get_v_scroll_speed : 0 as * mut sys :: godot_method_bind , get_visible_rows : 0 as * mut sys :: godot_method_bind , get_word_under_cursor : 0 as * mut sys :: godot_method_bind , has_keyword_color : 0 as * mut sys :: godot_method_bind , has_redo : 0 as * mut sys :: godot_method_bind , has_undo : 0 as * mut sys :: godot_method_bind , insert_text_at_cursor : 0 as * mut sys :: godot_method_bind , is_bookmark_gutter_enabled : 0 as * mut sys :: godot_method_bind , is_breakpoint_gutter_enabled : 0 as * mut sys :: godot_method_bind , is_context_menu_enabled : 0 as * mut sys :: godot_method_bind , is_deselect_on_focus_loss_enabled : 0 as * mut sys :: godot_method_bind , is_drag_and_drop_selection_enabled : 0 as * mut sys :: godot_method_bind , is_drawing_fold_gutter : 0 as * mut sys :: godot_method_bind , is_drawing_minimap : 0 as * mut sys :: godot_method_bind , is_drawing_spaces : 0 as * mut sys :: godot_method_bind , is_drawing_tabs : 0 as * mut sys :: godot_method_bind , is_folded : 0 as * mut sys :: godot_method_bind , is_hiding_enabled : 0 as * mut sys :: godot_method_bind , is_highlight_all_occurrences_enabled : 0 as * mut sys :: godot_method_bind , is_highlight_current_line_enabled : 0 as * mut sys :: godot_method_bind , is_line_hidden : 0 as * mut sys :: godot_method_bind , is_line_set_as_bookmark : 0 as * mut sys :: godot_method_bind , is_line_set_as_breakpoint : 0 as * mut sys :: godot_method_bind , is_line_set_as_safe : 0 as * mut sys :: godot_method_bind , is_line_wrapped : 0 as * mut sys :: godot_method_bind , is_middle_mouse_paste_enabled : 0 as * mut sys :: godot_method_bind , is_mouse_over_selection : 0 as * mut sys :: godot_method_bind , is_overriding_selected_font_color : 0 as * mut sys :: godot_method_bind , is_readonly : 0 as * mut sys :: godot_method_bind , is_right_click_moving_caret : 0 as * mut sys :: godot_method_bind , is_selecting_enabled : 0 as * mut sys :: godot_method_bind , is_selection_active : 0 as * mut sys :: godot_method_bind , is_shortcut_keys_enabled : 0 as * mut sys :: godot_method_bind , is_show_line_numbers_enabled : 0 as * mut sys :: godot_method_bind , is_smooth_scroll_enabled : 0 as * mut sys :: godot_method_bind , is_syntax_coloring_enabled : 0 as * mut sys :: godot_method_bind , is_virtual_keyboard_enabled : 0 as * mut sys :: godot_method_bind , is_wrap_enabled : 0 as * mut sys :: godot_method_bind , menu_option : 0 as * mut sys :: godot_method_bind , paste : 0 as * mut sys :: godot_method_bind , redo : 0 as * mut sys :: godot_method_bind , remove_breakpoints : 0 as * mut sys :: godot_method_bind , search : 0 as * mut sys :: godot_method_bind , select : 0 as * mut sys :: godot_method_bind , select_all : 0 as * mut sys :: godot_method_bind , set_bookmark_gutter_enabled : 0 as * mut sys :: godot_method_bind , set_breakpoint_gutter_enabled : 0 as * mut sys :: godot_method_bind , set_context_menu_enabled : 0 as * mut sys :: godot_method_bind , set_deselect_on_focus_loss_enabled : 0 as * mut sys :: godot_method_bind , set_drag_and_drop_selection_enabled : 0 as * mut sys :: godot_method_bind , set_draw_fold_gutter : 0 as * mut sys :: godot_method_bind , set_draw_spaces : 0 as * mut sys :: godot_method_bind , set_draw_tabs : 0 as * mut sys :: godot_method_bind , set_h_scroll : 0 as * mut sys :: godot_method_bind , set_hiding_enabled : 0 as * mut sys :: godot_method_bind , set_highlight_all_occurrences : 0 as * mut sys :: godot_method_bind , set_highlight_current_line : 0 as * mut sys :: godot_method_bind , set_line : 0 as * mut sys :: godot_method_bind , set_line_as_bookmark : 0 as * mut sys :: godot_method_bind , set_line_as_breakpoint : 0 as * mut sys :: godot_method_bind , set_line_as_hidden : 0 as * mut sys :: godot_method_bind , set_line_as_safe : 0 as * mut sys :: godot_method_bind , set_middle_mouse_paste_enabled : 0 as * mut sys :: godot_method_bind , set_minimap_width : 0 as * mut sys :: godot_method_bind , set_override_selected_font_color : 0 as * mut sys :: godot_method_bind , set_readonly : 0 as * mut sys :: godot_method_bind , set_right_click_moves_caret : 0 as * mut sys :: godot_method_bind , set_selecting_enabled : 0 as * mut sys :: godot_method_bind , set_shortcut_keys_enabled : 0 as * mut sys :: godot_method_bind , set_show_line_numbers : 0 as * mut sys :: godot_method_bind , set_smooth_scroll_enable : 0 as * mut sys :: godot_method_bind , set_syntax_coloring : 0 as * mut sys :: godot_method_bind , set_text : 0 as * mut sys :: godot_method_bind , set_v_scroll : 0 as * mut sys :: godot_method_bind , set_v_scroll_speed : 0 as * mut sys :: godot_method_bind , set_virtual_keyboard_enabled : 0 as * mut sys :: godot_method_bind , set_wrap_enabled : 0 as * mut sys :: godot_method_bind , toggle_fold_line : 0 as * mut sys :: godot_method_bind , undo : 0 as * mut sys :: godot_method_bind , unfold_line : 0 as * mut sys :: godot_method_bind , unhide_all_lines : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TextEditMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TextEdit\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_color_region = (gd_api . godot_method_bind_get_method) (class_name , "add_color_region\0" . as_ptr () as * const c_char) ; table . add_keyword_color = (gd_api . godot_method_bind_get_method) (class_name , "add_keyword_color\0" . as_ptr () as * const c_char) ; table . can_fold = (gd_api . godot_method_bind_get_method) (class_name , "can_fold\0" . as_ptr () as * const c_char) ; table . center_viewport_to_cursor = (gd_api . godot_method_bind_get_method) (class_name , "center_viewport_to_cursor\0" . as_ptr () as * const c_char) ; table . clear_colors = (gd_api . godot_method_bind_get_method) (class_name , "clear_colors\0" . as_ptr () as * const c_char) ; table . clear_undo_history = (gd_api . godot_method_bind_get_method) (class_name , "clear_undo_history\0" . as_ptr () as * const c_char) ; table . copy = (gd_api . godot_method_bind_get_method) (class_name , "copy\0" . as_ptr () as * const c_char) ; table . cursor_get_blink_enabled = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_blink_enabled\0" . as_ptr () as * const c_char) ; table . cursor_get_blink_speed = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_blink_speed\0" . as_ptr () as * const c_char) ; table . cursor_get_column = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_column\0" . as_ptr () as * const c_char) ; table . cursor_get_line = (gd_api . godot_method_bind_get_method) (class_name , "cursor_get_line\0" . as_ptr () as * const c_char) ; table . cursor_is_block_mode = (gd_api . godot_method_bind_get_method) (class_name , "cursor_is_block_mode\0" . as_ptr () as * const c_char) ; table . cursor_set_blink_enabled = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_blink_enabled\0" . as_ptr () as * const c_char) ; table . cursor_set_blink_speed = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_blink_speed\0" . as_ptr () as * const c_char) ; table . cursor_set_block_mode = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_block_mode\0" . as_ptr () as * const c_char) ; table . cursor_set_column = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_column\0" . as_ptr () as * const c_char) ; table . cursor_set_line = (gd_api . godot_method_bind_get_method) (class_name , "cursor_set_line\0" . as_ptr () as * const c_char) ; table . cut = (gd_api . godot_method_bind_get_method) (class_name , "cut\0" . as_ptr () as * const c_char) ; table . deselect = (gd_api . godot_method_bind_get_method) (class_name , "deselect\0" . as_ptr () as * const c_char) ; table . draw_minimap = (gd_api . godot_method_bind_get_method) (class_name , "draw_minimap\0" . as_ptr () as * const c_char) ; table . fold_all_lines = (gd_api . godot_method_bind_get_method) (class_name , "fold_all_lines\0" . as_ptr () as * const c_char) ; table . fold_line = (gd_api . godot_method_bind_get_method) (class_name , "fold_line\0" . as_ptr () as * const c_char) ; table . get_breakpoints = (gd_api . godot_method_bind_get_method) (class_name , "get_breakpoints\0" . as_ptr () as * const c_char) ; table . get_h_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_h_scroll\0" . as_ptr () as * const c_char) ; table . get_keyword_color = (gd_api . godot_method_bind_get_method) (class_name , "get_keyword_color\0" . as_ptr () as * const c_char) ; table . get_line = (gd_api . godot_method_bind_get_method) (class_name , "get_line\0" . as_ptr () as * const c_char) ; table . get_line_column_at_pos = (gd_api . godot_method_bind_get_method) (class_name , "get_line_column_at_pos\0" . as_ptr () as * const c_char) ; table . get_line_count = (gd_api . godot_method_bind_get_method) (class_name , "get_line_count\0" . as_ptr () as * const c_char) ; table . get_line_height = (gd_api . godot_method_bind_get_method) (class_name , "get_line_height\0" . as_ptr () as * const c_char) ; table . get_line_width = (gd_api . godot_method_bind_get_method) (class_name , "get_line_width\0" . as_ptr () as * const c_char) ; table . get_line_wrap_count = (gd_api . godot_method_bind_get_method) (class_name , "get_line_wrap_count\0" . as_ptr () as * const c_char) ; table . get_line_wrapped_text = (gd_api . godot_method_bind_get_method) (class_name , "get_line_wrapped_text\0" . as_ptr () as * const c_char) ; table . get_menu = (gd_api . godot_method_bind_get_method) (class_name , "get_menu\0" . as_ptr () as * const c_char) ; table . get_minimap_width = (gd_api . godot_method_bind_get_method) (class_name , "get_minimap_width\0" . as_ptr () as * const c_char) ; table . get_pos_at_line_column = (gd_api . godot_method_bind_get_method) (class_name , "get_pos_at_line_column\0" . as_ptr () as * const c_char) ; table . get_rect_at_line_column = (gd_api . godot_method_bind_get_method) (class_name , "get_rect_at_line_column\0" . as_ptr () as * const c_char) ; table . get_selection_from_column = (gd_api . godot_method_bind_get_method) (class_name , "get_selection_from_column\0" . as_ptr () as * const c_char) ; table . get_selection_from_line = (gd_api . godot_method_bind_get_method) (class_name , "get_selection_from_line\0" . as_ptr () as * const c_char) ; table . get_selection_text = (gd_api . godot_method_bind_get_method) (class_name , "get_selection_text\0" . as_ptr () as * const c_char) ; table . get_selection_to_column = (gd_api . godot_method_bind_get_method) (class_name , "get_selection_to_column\0" . as_ptr () as * const c_char) ; table . get_selection_to_line = (gd_api . godot_method_bind_get_method) (class_name , "get_selection_to_line\0" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . get_total_gutter_width = (gd_api . godot_method_bind_get_method) (class_name , "get_total_gutter_width\0" . as_ptr () as * const c_char) ; table . get_total_visible_rows = (gd_api . godot_method_bind_get_method) (class_name , "get_total_visible_rows\0" . as_ptr () as * const c_char) ; table . get_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scroll\0" . as_ptr () as * const c_char) ; table . get_v_scroll_speed = (gd_api . godot_method_bind_get_method) (class_name , "get_v_scroll_speed\0" . as_ptr () as * const c_char) ; table . get_visible_rows = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_rows\0" . as_ptr () as * const c_char) ; table . get_word_under_cursor = (gd_api . godot_method_bind_get_method) (class_name , "get_word_under_cursor\0" . as_ptr () as * const c_char) ; table . has_keyword_color = (gd_api . godot_method_bind_get_method) (class_name , "has_keyword_color\0" . as_ptr () as * const c_char) ; table . has_redo = (gd_api . godot_method_bind_get_method) (class_name , "has_redo\0" . as_ptr () as * const c_char) ; table . has_undo = (gd_api . godot_method_bind_get_method) (class_name , "has_undo\0" . as_ptr () as * const c_char) ; table . insert_text_at_cursor = (gd_api . godot_method_bind_get_method) (class_name , "insert_text_at_cursor\0" . as_ptr () as * const c_char) ; table . is_bookmark_gutter_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_bookmark_gutter_enabled\0" . as_ptr () as * const c_char) ; table . is_breakpoint_gutter_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_breakpoint_gutter_enabled\0" . as_ptr () as * const c_char) ; table . is_context_menu_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_context_menu_enabled\0" . as_ptr () as * const c_char) ; table . is_deselect_on_focus_loss_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_deselect_on_focus_loss_enabled\0" . as_ptr () as * const c_char) ; table . is_drag_and_drop_selection_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_drag_and_drop_selection_enabled\0" . as_ptr () as * const c_char) ; table . is_drawing_fold_gutter = (gd_api . godot_method_bind_get_method) (class_name , "is_drawing_fold_gutter\0" . as_ptr () as * const c_char) ; table . is_drawing_minimap = (gd_api . godot_method_bind_get_method) (class_name , "is_drawing_minimap\0" . as_ptr () as * const c_char) ; table . is_drawing_spaces = (gd_api . godot_method_bind_get_method) (class_name , "is_drawing_spaces\0" . as_ptr () as * const c_char) ; table . is_drawing_tabs = (gd_api . godot_method_bind_get_method) (class_name , "is_drawing_tabs\0" . as_ptr () as * const c_char) ; table . is_folded = (gd_api . godot_method_bind_get_method) (class_name , "is_folded\0" . as_ptr () as * const c_char) ; table . is_hiding_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_hiding_enabled\0" . as_ptr () as * const c_char) ; table . is_highlight_all_occurrences_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_highlight_all_occurrences_enabled\0" . as_ptr () as * const c_char) ; table . is_highlight_current_line_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_highlight_current_line_enabled\0" . as_ptr () as * const c_char) ; table . is_line_hidden = (gd_api . godot_method_bind_get_method) (class_name , "is_line_hidden\0" . as_ptr () as * const c_char) ; table . is_line_set_as_bookmark = (gd_api . godot_method_bind_get_method) (class_name , "is_line_set_as_bookmark\0" . as_ptr () as * const c_char) ; table . is_line_set_as_breakpoint = (gd_api . godot_method_bind_get_method) (class_name , "is_line_set_as_breakpoint\0" . as_ptr () as * const c_char) ; table . is_line_set_as_safe = (gd_api . godot_method_bind_get_method) (class_name , "is_line_set_as_safe\0" . as_ptr () as * const c_char) ; table . is_line_wrapped = (gd_api . godot_method_bind_get_method) (class_name , "is_line_wrapped\0" . as_ptr () as * const c_char) ; table . is_middle_mouse_paste_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_middle_mouse_paste_enabled\0" . as_ptr () as * const c_char) ; table . is_mouse_over_selection = (gd_api . godot_method_bind_get_method) (class_name , "is_mouse_over_selection\0" . as_ptr () as * const c_char) ; table . is_overriding_selected_font_color = (gd_api . godot_method_bind_get_method) (class_name , "is_overriding_selected_font_color\0" . as_ptr () as * const c_char) ; table . is_readonly = (gd_api . godot_method_bind_get_method) (class_name , "is_readonly\0" . as_ptr () as * const c_char) ; table . is_right_click_moving_caret = (gd_api . godot_method_bind_get_method) (class_name , "is_right_click_moving_caret\0" . as_ptr () as * const c_char) ; table . is_selecting_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_selecting_enabled\0" . as_ptr () as * const c_char) ; table . is_selection_active = (gd_api . godot_method_bind_get_method) (class_name , "is_selection_active\0" . as_ptr () as * const c_char) ; table . is_shortcut_keys_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_shortcut_keys_enabled\0" . as_ptr () as * const c_char) ; table . is_show_line_numbers_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_show_line_numbers_enabled\0" . as_ptr () as * const c_char) ; table . is_smooth_scroll_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_smooth_scroll_enabled\0" . as_ptr () as * const c_char) ; table . is_syntax_coloring_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_syntax_coloring_enabled\0" . as_ptr () as * const c_char) ; table . is_virtual_keyboard_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_virtual_keyboard_enabled\0" . as_ptr () as * const c_char) ; table . is_wrap_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_wrap_enabled\0" . as_ptr () as * const c_char) ; table . menu_option = (gd_api . godot_method_bind_get_method) (class_name , "menu_option\0" . as_ptr () as * const c_char) ; table . paste = (gd_api . godot_method_bind_get_method) (class_name , "paste\0" . as_ptr () as * const c_char) ; table . redo = (gd_api . godot_method_bind_get_method) (class_name , "redo\0" . as_ptr () as * const c_char) ; table . remove_breakpoints = (gd_api . godot_method_bind_get_method) (class_name , "remove_breakpoints\0" . as_ptr () as * const c_char) ; table . search = (gd_api . godot_method_bind_get_method) (class_name , "search\0" . as_ptr () as * const c_char) ; table . select = (gd_api . godot_method_bind_get_method) (class_name , "select\0" . as_ptr () as * const c_char) ; table . select_all = (gd_api . godot_method_bind_get_method) (class_name , "select_all\0" . as_ptr () as * const c_char) ; table . set_bookmark_gutter_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_bookmark_gutter_enabled\0" . as_ptr () as * const c_char) ; table . set_breakpoint_gutter_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_breakpoint_gutter_enabled\0" . as_ptr () as * const c_char) ; table . set_context_menu_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_context_menu_enabled\0" . as_ptr () as * const c_char) ; table . set_deselect_on_focus_loss_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_deselect_on_focus_loss_enabled\0" . as_ptr () as * const c_char) ; table . set_drag_and_drop_selection_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_drag_and_drop_selection_enabled\0" . as_ptr () as * const c_char) ; table . set_draw_fold_gutter = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_fold_gutter\0" . as_ptr () as * const c_char) ; table . set_draw_spaces = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_spaces\0" . as_ptr () as * const c_char) ; table . set_draw_tabs = (gd_api . godot_method_bind_get_method) (class_name , "set_draw_tabs\0" . as_ptr () as * const c_char) ; table . set_h_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_h_scroll\0" . as_ptr () as * const c_char) ; table . set_hiding_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_hiding_enabled\0" . as_ptr () as * const c_char) ; table . set_highlight_all_occurrences = (gd_api . godot_method_bind_get_method) (class_name , "set_highlight_all_occurrences\0" . as_ptr () as * const c_char) ; table . set_highlight_current_line = (gd_api . godot_method_bind_get_method) (class_name , "set_highlight_current_line\0" . as_ptr () as * const c_char) ; table . set_line = (gd_api . godot_method_bind_get_method) (class_name , "set_line\0" . as_ptr () as * const c_char) ; table . set_line_as_bookmark = (gd_api . godot_method_bind_get_method) (class_name , "set_line_as_bookmark\0" . as_ptr () as * const c_char) ; table . set_line_as_breakpoint = (gd_api . godot_method_bind_get_method) (class_name , "set_line_as_breakpoint\0" . as_ptr () as * const c_char) ; table . set_line_as_hidden = (gd_api . godot_method_bind_get_method) (class_name , "set_line_as_hidden\0" . as_ptr () as * const c_char) ; table . set_line_as_safe = (gd_api . godot_method_bind_get_method) (class_name , "set_line_as_safe\0" . as_ptr () as * const c_char) ; table . set_middle_mouse_paste_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_middle_mouse_paste_enabled\0" . as_ptr () as * const c_char) ; table . set_minimap_width = (gd_api . godot_method_bind_get_method) (class_name , "set_minimap_width\0" . as_ptr () as * const c_char) ; table . set_override_selected_font_color = (gd_api . godot_method_bind_get_method) (class_name , "set_override_selected_font_color\0" . as_ptr () as * const c_char) ; table . set_readonly = (gd_api . godot_method_bind_get_method) (class_name , "set_readonly\0" . as_ptr () as * const c_char) ; table . set_right_click_moves_caret = (gd_api . godot_method_bind_get_method) (class_name , "set_right_click_moves_caret\0" . as_ptr () as * const c_char) ; table . set_selecting_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_selecting_enabled\0" . as_ptr () as * const c_char) ; table . set_shortcut_keys_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_shortcut_keys_enabled\0" . as_ptr () as * const c_char) ; table . set_show_line_numbers = (gd_api . godot_method_bind_get_method) (class_name , "set_show_line_numbers\0" . as_ptr () as * const c_char) ; table . set_smooth_scroll_enable = (gd_api . godot_method_bind_get_method) (class_name , "set_smooth_scroll_enable\0" . as_ptr () as * const c_char) ; table . set_syntax_coloring = (gd_api . godot_method_bind_get_method) (class_name , "set_syntax_coloring\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; table . set_v_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_v_scroll\0" . as_ptr () as * const c_char) ; table . set_v_scroll_speed = (gd_api . godot_method_bind_get_method) (class_name , "set_v_scroll_speed\0" . as_ptr () as * const c_char) ; table . set_virtual_keyboard_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_virtual_keyboard_enabled\0" . as_ptr () as * const c_char) ; table . set_wrap_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_wrap_enabled\0" . as_ptr () as * const c_char) ; table . toggle_fold_line = (gd_api . godot_method_bind_get_method) (class_name , "toggle_fold_line\0" . as_ptr () as * const c_char) ; table . undo = (gd_api . godot_method_bind_get_method) (class_name , "undo\0" . as_ptr () as * const c_char) ; table . unfold_line = (gd_api . godot_method_bind_get_method) (class_name , "unfold_line\0" . as_ptr () as * const c_char) ; table . unhide_all_lines = (gd_api . godot_method_bind_get_method) (class_name , "unhide_all_lines\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::text_edit::private::TextEdit;
            
            pub(crate) mod text_file {
                # ! [doc = "This module contains types related to the API class [`TextFile`][super::TextFile]."] pub (crate) mod private { # [doc = "`core class TextFile` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_textfile.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTextFile inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TextFile { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TextFile ; impl TextFile { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TextFileMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for TextFile { } unsafe impl GodotObject for TextFile { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "TextFile" } } impl std :: ops :: Deref for TextFile { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextFile { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for TextFile { } unsafe impl SubClass < crate :: generated :: Reference > for TextFile { } unsafe impl SubClass < crate :: generated :: Object > for TextFile { } impl Instanciable for TextFile { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { TextFile :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextFileMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl TextFileMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextFileMethodTable = TextFileMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TextFileMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TextFile\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::text_file::private::TextFile;
            
            pub mod text_mesh {
                # ! [doc = "This module contains types related to the API class [`TextMesh`][super::TextMesh]."] pub (crate) mod private { # [doc = "`core class TextMesh` inherits `PrimitiveMesh` (reference-counted).\n\nThis class has related types in the [`text_mesh`][super::text_mesh] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_textmesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTextMesh inherits methods from:\n - [PrimitiveMesh](struct.PrimitiveMesh.html)\n - [Mesh](struct.Mesh.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TextMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TextMesh ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Align (pub i64) ; impl Align { pub const LEFT : Align = Align (0i64) ; pub const CENTER : Align = Align (1i64) ; pub const RIGHT : Align = Align (2i64) ; } impl From < i64 > for Align { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Align > for i64 { # [inline] fn from (v : Align) -> Self { v . 0 } } impl FromVariant for Align { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TextMesh { pub const ALIGN_LEFT : i64 = 0i64 ; pub const ALIGN_CENTER : i64 = 1i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; } impl TextMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TextMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Step (in pixels) used to approximate Bézier curves."] # [doc = ""] # [inline] pub fn curve_step (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextMeshMethodTable :: get (get_api ()) . get_curve_step ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Depths of the mesh, if set to `0.0` only front surface, is generated, and UV layout is changed to use full texture for the front face only."] # [doc = ""] # [inline] pub fn depth (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextMeshMethodTable :: get (get_api ()) . get_depth ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "[`Font`][Font] used for the [`TextMesh`][TextMesh]'s text."] # [doc = ""] # [inline] pub fn font (& self) -> Option < Ref < crate :: generated :: Font , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextMeshMethodTable :: get (get_api ()) . get_font ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Font , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Controls the text's horizontal alignment. Supports left, center and right. Set it to one of the [`Align`][Align] constants."] # [doc = ""] # [inline] pub fn horizontal_alignment (& self) -> crate :: generated :: text_mesh :: Align { unsafe { let method_bind : * mut sys :: godot_method_bind = TextMeshMethodTable :: get (get_api ()) . get_horizontal_alignment ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: text_mesh :: Align > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The size of one pixel's width on the text to scale it in 3D."] # [doc = ""] # [inline] pub fn pixel_size (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextMeshMethodTable :: get (get_api ()) . get_pixel_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The text to generate mesh from."] # [doc = ""] # [inline] pub fn text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TextMeshMethodTable :: get (get_api ()) . get_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, all the text displays as UPPERCASE."] # [doc = ""] # [inline] pub fn is_uppercase (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextMeshMethodTable :: get (get_api ()) . is_uppercase ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Step (in pixels) used to approximate Bézier curves."] # [doc = ""] # [inline] pub fn set_curve_step (& self , curve_step : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextMeshMethodTable :: get (get_api ()) . set_curve_step ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , curve_step as _) ; } } # [doc = "Depths of the mesh, if set to `0.0` only front surface, is generated, and UV layout is changed to use full texture for the front face only."] # [doc = ""] # [inline] pub fn set_depth (& self , depth : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextMeshMethodTable :: get (get_api ()) . set_depth ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , depth as _) ; } } # [doc = "[`Font`][Font] used for the [`TextMesh`][TextMesh]'s text."] # [doc = ""] # [inline] pub fn set_font (& self , font : impl AsArg < crate :: generated :: Font >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextMeshMethodTable :: get (get_api ()) . set_font ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , font . as_arg_ptr ()) ; } } # [doc = "Controls the text's horizontal alignment. Supports left, center and right. Set it to one of the [`Align`][Align] constants."] # [doc = ""] # [inline] pub fn set_horizontal_alignment (& self , alignment : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextMeshMethodTable :: get (get_api ()) . set_horizontal_alignment ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , alignment as _) ; } } # [doc = "The size of one pixel's width on the text to scale it in 3D."] # [doc = ""] # [inline] pub fn set_pixel_size (& self , pixel_size : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextMeshMethodTable :: get (get_api ()) . set_pixel_size ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , pixel_size as _) ; } } # [doc = "The text to generate mesh from."] # [doc = ""] # [inline] pub fn set_text (& self , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextMeshMethodTable :: get (get_api ()) . set_text ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , text . into ()) ; } } # [doc = "If `true`, all the text displays as UPPERCASE."] # [doc = ""] # [inline] pub fn set_uppercase (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextMeshMethodTable :: get (get_api ()) . set_uppercase ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TextMesh { } unsafe impl GodotObject for TextMesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "TextMesh" } } impl std :: ops :: Deref for TextMesh { type Target = crate :: generated :: PrimitiveMesh ; # [inline] fn deref (& self) -> & crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PrimitiveMesh { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PrimitiveMesh > for TextMesh { } unsafe impl SubClass < crate :: generated :: Mesh > for TextMesh { } unsafe impl SubClass < crate :: generated :: Resource > for TextMesh { } unsafe impl SubClass < crate :: generated :: Reference > for TextMesh { } unsafe impl SubClass < crate :: generated :: Object > for TextMesh { } impl Instanciable for TextMesh { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { TextMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_curve_step : * mut sys :: godot_method_bind , pub get_depth : * mut sys :: godot_method_bind , pub get_font : * mut sys :: godot_method_bind , pub get_horizontal_alignment : * mut sys :: godot_method_bind , pub get_pixel_size : * mut sys :: godot_method_bind , pub get_text : * mut sys :: godot_method_bind , pub is_uppercase : * mut sys :: godot_method_bind , pub set_curve_step : * mut sys :: godot_method_bind , pub set_depth : * mut sys :: godot_method_bind , pub set_font : * mut sys :: godot_method_bind , pub set_horizontal_alignment : * mut sys :: godot_method_bind , pub set_pixel_size : * mut sys :: godot_method_bind , pub set_text : * mut sys :: godot_method_bind , pub set_uppercase : * mut sys :: godot_method_bind } impl TextMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextMeshMethodTable = TextMeshMethodTable { class_constructor : None , get_curve_step : 0 as * mut sys :: godot_method_bind , get_depth : 0 as * mut sys :: godot_method_bind , get_font : 0 as * mut sys :: godot_method_bind , get_horizontal_alignment : 0 as * mut sys :: godot_method_bind , get_pixel_size : 0 as * mut sys :: godot_method_bind , get_text : 0 as * mut sys :: godot_method_bind , is_uppercase : 0 as * mut sys :: godot_method_bind , set_curve_step : 0 as * mut sys :: godot_method_bind , set_depth : 0 as * mut sys :: godot_method_bind , set_font : 0 as * mut sys :: godot_method_bind , set_horizontal_alignment : 0 as * mut sys :: godot_method_bind , set_pixel_size : 0 as * mut sys :: godot_method_bind , set_text : 0 as * mut sys :: godot_method_bind , set_uppercase : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TextMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TextMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_curve_step = (gd_api . godot_method_bind_get_method) (class_name , "get_curve_step\0" . as_ptr () as * const c_char) ; table . get_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_depth\0" . as_ptr () as * const c_char) ; table . get_font = (gd_api . godot_method_bind_get_method) (class_name , "get_font\0" . as_ptr () as * const c_char) ; table . get_horizontal_alignment = (gd_api . godot_method_bind_get_method) (class_name , "get_horizontal_alignment\0" . as_ptr () as * const c_char) ; table . get_pixel_size = (gd_api . godot_method_bind_get_method) (class_name , "get_pixel_size\0" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . is_uppercase = (gd_api . godot_method_bind_get_method) (class_name , "is_uppercase\0" . as_ptr () as * const c_char) ; table . set_curve_step = (gd_api . godot_method_bind_get_method) (class_name , "set_curve_step\0" . as_ptr () as * const c_char) ; table . set_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_depth\0" . as_ptr () as * const c_char) ; table . set_font = (gd_api . godot_method_bind_get_method) (class_name , "set_font\0" . as_ptr () as * const c_char) ; table . set_horizontal_alignment = (gd_api . godot_method_bind_get_method) (class_name , "set_horizontal_alignment\0" . as_ptr () as * const c_char) ; table . set_pixel_size = (gd_api . godot_method_bind_get_method) (class_name , "set_pixel_size\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; table . set_uppercase = (gd_api . godot_method_bind_get_method) (class_name , "set_uppercase\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::text_mesh::private::TextMesh;
            
            pub mod texture {
                # ! [doc = "This module contains types related to the API class [`Texture`][super::Texture]."] pub (crate) mod private { # [doc = "`core class Texture` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`texture`][super::texture] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_texture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTexture inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Texture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Texture ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flags (pub i64) ; impl Flags { pub const FLAG_MIPMAPS : Flags = Flags (1i64) ; pub const FLAG_REPEAT : Flags = Flags (2i64) ; pub const FLAG_FILTER : Flags = Flags (4i64) ; pub const FLAGS_DEFAULT : Flags = Flags (7i64) ; pub const FLAG_ANISOTROPIC_FILTER : Flags = Flags (8i64) ; pub const FLAG_CONVERT_TO_LINEAR : Flags = Flags (16i64) ; pub const FLAG_MIRRORED_REPEAT : Flags = Flags (32i64) ; pub const FLAG_VIDEO_SURFACE : Flags = Flags (2048i64) ; } impl From < i64 > for Flags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flags > for i64 { # [inline] fn from (v : Flags) -> Self { v . 0 } } impl FromVariant for Flags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Texture { pub const FLAG_MIPMAPS : i64 = 1i64 ; pub const FLAG_REPEAT : i64 = 2i64 ; pub const FLAG_FILTER : i64 = 4i64 ; pub const FLAGS_DEFAULT : i64 = 7i64 ; pub const FLAG_ANISOTROPIC_FILTER : i64 = 8i64 ; pub const FLAG_CONVERT_TO_LINEAR : i64 = 16i64 ; pub const FLAG_MIRRORED_REPEAT : i64 = 32i64 ; pub const FLAG_VIDEO_SURFACE : i64 = 2048i64 ; } impl Texture { # [doc = "Draws the texture using a [`CanvasItem`][CanvasItem] with the [`VisualServer`][VisualServer] API at the specified `position`. Equivalent to [`VisualServer.canvas_item_add_texture_rect`][VisualServer::canvas_item_add_texture_rect] with a rect at `position` and the size of this [`Texture`][Texture].\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `normal_map` - `null`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn draw (& self , canvas_item : Rid , position : Vector2 , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . draw ; let ret = crate :: icalls :: icallvar__rid_vec2_color_bool_obj (method_bind , self . this . sys () . as_ptr () , canvas_item , position , modulate , transpose as _ , normal_map . as_arg_ptr ()) ; } } # [doc = "Draws the texture using a [`CanvasItem`][CanvasItem] with the [`VisualServer`][VisualServer] API. Equivalent to [`VisualServer.canvas_item_add_texture_rect`][VisualServer::canvas_item_add_texture_rect].\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `normal_map` - `null`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn draw_rect (& self , canvas_item : Rid , rect : Rect2 , tile : bool , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . draw_rect ; let ret = crate :: icalls :: icallvar__rid_rect2_bool_color_bool_obj (method_bind , self . this . sys () . as_ptr () , canvas_item , rect , tile as _ , modulate , transpose as _ , normal_map . as_arg_ptr ()) ; } } # [doc = "Draws a part of the texture using a [`CanvasItem`][CanvasItem] with the [`VisualServer`][VisualServer] API. Equivalent to [`VisualServer.canvas_item_add_texture_rect_region`][VisualServer::canvas_item_add_texture_rect_region].\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `normal_map` - `null`\n* `clip_uv` - `true`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn draw_rect_region (& self , canvas_item : Rid , rect : Rect2 , src_rect : Rect2 , modulate : Color , transpose : bool , normal_map : impl AsArg < crate :: generated :: Texture > , clip_uv : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . draw_rect_region ; let ret = crate :: icalls :: icallvar__rid_rect2_rect2_color_bool_obj_bool (method_bind , self . this . sys () . as_ptr () , canvas_item , rect , src_rect , modulate , transpose as _ , normal_map . as_arg_ptr () , clip_uv as _) ; } } # [doc = "Returns an [`Image`][Image] that is a copy of data from this [`Texture`][Texture]. [`Image`][Image]s can be accessed and manipulated directly."] # [doc = ""] # [inline] pub fn get_data (& self) -> Option < Ref < crate :: generated :: Image , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_data ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Image , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The texture's [`Flags`][Flags]. [`Flags`][Flags] are used to set various properties of the [`Texture`][Texture]."] # [doc = ""] # [inline] pub fn flags (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_flags ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the texture height."] # [doc = ""] # [inline] pub fn get_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the texture size."] # [doc = ""] # [inline] pub fn get_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the texture width."] # [doc = ""] # [inline] pub fn get_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . get_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this [`Texture`][Texture] has an alpha channel."] # [doc = ""] # [inline] pub fn has_alpha (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . has_alpha ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The texture's [`Flags`][Flags]. [`Flags`][Flags] are used to set various properties of the [`Texture`][Texture]."] # [doc = ""] # [inline] pub fn set_flags (& self , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureMethodTable :: get (get_api ()) . set_flags ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flags as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Texture { } unsafe impl GodotObject for Texture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Texture" } } impl std :: ops :: Deref for Texture { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Texture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Texture { } unsafe impl SubClass < crate :: generated :: Reference > for Texture { } unsafe impl SubClass < crate :: generated :: Object > for Texture { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub draw : * mut sys :: godot_method_bind , pub draw_rect : * mut sys :: godot_method_bind , pub draw_rect_region : * mut sys :: godot_method_bind , pub get_data : * mut sys :: godot_method_bind , pub get_flags : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_width : * mut sys :: godot_method_bind , pub has_alpha : * mut sys :: godot_method_bind , pub set_flags : * mut sys :: godot_method_bind } impl TextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextureMethodTable = TextureMethodTable { class_constructor : None , draw : 0 as * mut sys :: godot_method_bind , draw_rect : 0 as * mut sys :: godot_method_bind , draw_rect_region : 0 as * mut sys :: godot_method_bind , get_data : 0 as * mut sys :: godot_method_bind , get_flags : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_width : 0 as * mut sys :: godot_method_bind , has_alpha : 0 as * mut sys :: godot_method_bind , set_flags : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Texture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . draw = (gd_api . godot_method_bind_get_method) (class_name , "draw\0" . as_ptr () as * const c_char) ; table . draw_rect = (gd_api . godot_method_bind_get_method) (class_name , "draw_rect\0" . as_ptr () as * const c_char) ; table . draw_rect_region = (gd_api . godot_method_bind_get_method) (class_name , "draw_rect_region\0" . as_ptr () as * const c_char) ; table . get_data = (gd_api . godot_method_bind_get_method) (class_name , "get_data\0" . as_ptr () as * const c_char) ; table . get_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_flags\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\0" . as_ptr () as * const c_char) ; table . has_alpha = (gd_api . godot_method_bind_get_method) (class_name , "has_alpha\0" . as_ptr () as * const c_char) ; table . set_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_flags\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::texture::private::Texture;
            
            pub(crate) mod texture_3d {
                # ! [doc = "This module contains types related to the API class [`Texture3D`][super::Texture3D]."] pub (crate) mod private { # [doc = "`core class Texture3D` inherits `TextureLayered` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_texture3d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTexture3D inherits methods from:\n - [TextureLayered](struct.TextureLayered.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Texture3D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Texture3D ; impl Texture3D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = Texture3DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Creates the Texture3D with specified `width`, `height`, and `depth`. See [enum Image.Format] for `format` options. See [enum TextureLayered.Flags] enumerator for `flags` options.\n# Default Arguments\n* `flags` - `4`"] # [doc = ""] # [inline] pub fn create (& self , width : i64 , height : i64 , depth : i64 , format : i64 , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = Texture3DMethodTable :: get (get_api ()) . create ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , width as _ , height as _ , depth as _ , format as _ , flags as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Texture3D { } unsafe impl GodotObject for Texture3D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Texture3D" } } impl std :: ops :: Deref for Texture3D { type Target = crate :: generated :: TextureLayered ; # [inline] fn deref (& self) -> & crate :: generated :: TextureLayered { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Texture3D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: TextureLayered { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: TextureLayered > for Texture3D { } unsafe impl SubClass < crate :: generated :: Resource > for Texture3D { } unsafe impl SubClass < crate :: generated :: Reference > for Texture3D { } unsafe impl SubClass < crate :: generated :: Object > for Texture3D { } impl Instanciable for Texture3D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Texture3D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct Texture3DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create : * mut sys :: godot_method_bind } impl Texture3DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : Texture3DMethodTable = Texture3DMethodTable { class_constructor : None , create : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { Texture3DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Texture3D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create = (gd_api . godot_method_bind_get_method) (class_name , "create\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::texture_3d::private::Texture3D;
            
            pub(crate) mod texture_array {
                # ! [doc = "This module contains types related to the API class [`TextureArray`][super::TextureArray]."] pub (crate) mod private { # [doc = "`core class TextureArray` inherits `TextureLayered` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_texturearray.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTextureArray inherits methods from:\n - [TextureLayered](struct.TextureLayered.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TextureArray { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TextureArray ; impl TextureArray { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TextureArrayMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Creates the TextureArray with specified `width`, `height`, and `depth`. See [enum Image.Format] for `format` options. See [enum TextureLayered.Flags] enumerator for `flags` options.\n# Default Arguments\n* `flags` - `7`"] # [doc = ""] # [inline] pub fn create (& self , width : i64 , height : i64 , depth : i64 , format : i64 , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureArrayMethodTable :: get (get_api ()) . create ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , width as _ , height as _ , depth as _ , format as _ , flags as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TextureArray { } unsafe impl GodotObject for TextureArray { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "TextureArray" } } impl std :: ops :: Deref for TextureArray { type Target = crate :: generated :: TextureLayered ; # [inline] fn deref (& self) -> & crate :: generated :: TextureLayered { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextureArray { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: TextureLayered { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: TextureLayered > for TextureArray { } unsafe impl SubClass < crate :: generated :: Resource > for TextureArray { } unsafe impl SubClass < crate :: generated :: Reference > for TextureArray { } unsafe impl SubClass < crate :: generated :: Object > for TextureArray { } impl Instanciable for TextureArray { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { TextureArray :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextureArrayMethodTable { pub class_constructor : sys :: godot_class_constructor , pub create : * mut sys :: godot_method_bind } impl TextureArrayMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextureArrayMethodTable = TextureArrayMethodTable { class_constructor : None , create : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TextureArrayMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TextureArray\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . create = (gd_api . godot_method_bind_get_method) (class_name , "create\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::texture_array::private::TextureArray;
            
            pub mod texture_button {
                # ! [doc = "This module contains types related to the API class [`TextureButton`][super::TextureButton]."] pub (crate) mod private { # [doc = "`core class TextureButton` inherits `BaseButton` (manually managed).\n\nThis class has related types in the [`texture_button`][super::texture_button] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_texturebutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`TextureButton` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<TextureButton>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nTextureButton inherits methods from:\n - [BaseButton](struct.BaseButton.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TextureButton { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TextureButton ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct StretchMode (pub i64) ; impl StretchMode { pub const SCALE : StretchMode = StretchMode (0i64) ; pub const TILE : StretchMode = StretchMode (1i64) ; pub const KEEP : StretchMode = StretchMode (2i64) ; pub const KEEP_CENTERED : StretchMode = StretchMode (3i64) ; pub const KEEP_ASPECT : StretchMode = StretchMode (4i64) ; pub const KEEP_ASPECT_CENTERED : StretchMode = StretchMode (5i64) ; pub const KEEP_ASPECT_COVERED : StretchMode = StretchMode (6i64) ; } impl From < i64 > for StretchMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < StretchMode > for i64 { # [inline] fn from (v : StretchMode) -> Self { v . 0 } } impl FromVariant for StretchMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TextureButton { pub const STRETCH_SCALE : i64 = 0i64 ; pub const STRETCH_TILE : i64 = 1i64 ; pub const STRETCH_KEEP : i64 = 2i64 ; pub const STRETCH_KEEP_CENTERED : i64 = 3i64 ; pub const STRETCH_KEEP_ASPECT : i64 = 4i64 ; pub const STRETCH_KEEP_ASPECT_CENTERED : i64 = 5i64 ; pub const STRETCH_KEEP_ASPECT_COVERED : i64 = 6i64 ; } impl TextureButton { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TextureButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Pure black and white [`BitMap`][BitMap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes."] # [doc = ""] # [inline] pub fn click_mask (& self) -> Option < Ref < crate :: generated :: BitMap , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_click_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: BitMap , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture to display when the node is disabled. See [`BaseButton.disabled`][BaseButton::disabled]."] # [doc = ""] # [inline] pub fn disabled_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_disabled_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the texture stretches to the edges of the node's bounding rectangle using the [`stretch_mode`][Self::stretch_mode]. If `false`, the texture will not scale with the node."] # [doc = ""] # [inline] pub fn expand (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_expand ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Texture to display when the node has mouse or keyboard focus."] # [doc = ""] # [inline] pub fn focused_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_focused_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture to display when the mouse hovers the node."] # [doc = ""] # [inline] pub fn hover_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_hover_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture to display by default, when the node is **not** in the disabled, focused, hover or pressed state."] # [doc = ""] # [inline] pub fn normal_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_normal_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the Enter key or if the player presses the [`BaseButton.shortcut`][BaseButton::shortcut] key."] # [doc = ""] # [inline] pub fn pressed_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_pressed_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Controls the texture's behavior when you resize the node's bounding rectangle, **only if** [`expand`][Self::expand] is `true`. Set it to one of the [`StretchMode`][StretchMode] constants. See the constants to learn more."] # [doc = ""] # [inline] pub fn stretch_mode (& self) -> crate :: generated :: texture_button :: StretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . get_stretch_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: texture_button :: StretchMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn is_flipped_h (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . is_flipped_h ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn is_flipped_v (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . is_flipped_v ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Pure black and white [`BitMap`][BitMap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes."] # [doc = ""] # [inline] pub fn set_click_mask (& self , mask : impl AsArg < crate :: generated :: BitMap >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_click_mask ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , mask . as_arg_ptr ()) ; } } # [doc = "Texture to display when the node is disabled. See [`BaseButton.disabled`][BaseButton::disabled]."] # [doc = ""] # [inline] pub fn set_disabled_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_disabled_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "If `true`, the texture stretches to the edges of the node's bounding rectangle using the [`stretch_mode`][Self::stretch_mode]. If `false`, the texture will not scale with the node."] # [doc = ""] # [inline] pub fn set_expand (& self , p_expand : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_expand ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , p_expand as _) ; } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn set_flip_h (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_flip_h ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn set_flip_v (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_flip_v ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Texture to display when the node has mouse or keyboard focus."] # [doc = ""] # [inline] pub fn set_focused_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_focused_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Texture to display when the mouse hovers the node."] # [doc = ""] # [inline] pub fn set_hover_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_hover_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Texture to display by default, when the node is **not** in the disabled, focused, hover or pressed state."] # [doc = ""] # [inline] pub fn set_normal_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_normal_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the Enter key or if the player presses the [`BaseButton.shortcut`][BaseButton::shortcut] key."] # [doc = ""] # [inline] pub fn set_pressed_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_pressed_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "Controls the texture's behavior when you resize the node's bounding rectangle, **only if** [`expand`][Self::expand] is `true`. Set it to one of the [`StretchMode`][StretchMode] constants. See the constants to learn more."] # [doc = ""] # [inline] pub fn set_stretch_mode (& self , p_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureButtonMethodTable :: get (get_api ()) . set_stretch_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , p_mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TextureButton { } unsafe impl GodotObject for TextureButton { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "TextureButton" } } impl QueueFree for TextureButton { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for TextureButton { type Target = crate :: generated :: BaseButton ; # [inline] fn deref (& self) -> & crate :: generated :: BaseButton { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextureButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: BaseButton { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: BaseButton > for TextureButton { } unsafe impl SubClass < crate :: generated :: Control > for TextureButton { } unsafe impl SubClass < crate :: generated :: CanvasItem > for TextureButton { } unsafe impl SubClass < crate :: generated :: Node > for TextureButton { } unsafe impl SubClass < crate :: generated :: Object > for TextureButton { } impl Instanciable for TextureButton { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { TextureButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextureButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_click_mask : * mut sys :: godot_method_bind , pub get_disabled_texture : * mut sys :: godot_method_bind , pub get_expand : * mut sys :: godot_method_bind , pub get_focused_texture : * mut sys :: godot_method_bind , pub get_hover_texture : * mut sys :: godot_method_bind , pub get_normal_texture : * mut sys :: godot_method_bind , pub get_pressed_texture : * mut sys :: godot_method_bind , pub get_stretch_mode : * mut sys :: godot_method_bind , pub is_flipped_h : * mut sys :: godot_method_bind , pub is_flipped_v : * mut sys :: godot_method_bind , pub set_click_mask : * mut sys :: godot_method_bind , pub set_disabled_texture : * mut sys :: godot_method_bind , pub set_expand : * mut sys :: godot_method_bind , pub set_flip_h : * mut sys :: godot_method_bind , pub set_flip_v : * mut sys :: godot_method_bind , pub set_focused_texture : * mut sys :: godot_method_bind , pub set_hover_texture : * mut sys :: godot_method_bind , pub set_normal_texture : * mut sys :: godot_method_bind , pub set_pressed_texture : * mut sys :: godot_method_bind , pub set_stretch_mode : * mut sys :: godot_method_bind } impl TextureButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextureButtonMethodTable = TextureButtonMethodTable { class_constructor : None , get_click_mask : 0 as * mut sys :: godot_method_bind , get_disabled_texture : 0 as * mut sys :: godot_method_bind , get_expand : 0 as * mut sys :: godot_method_bind , get_focused_texture : 0 as * mut sys :: godot_method_bind , get_hover_texture : 0 as * mut sys :: godot_method_bind , get_normal_texture : 0 as * mut sys :: godot_method_bind , get_pressed_texture : 0 as * mut sys :: godot_method_bind , get_stretch_mode : 0 as * mut sys :: godot_method_bind , is_flipped_h : 0 as * mut sys :: godot_method_bind , is_flipped_v : 0 as * mut sys :: godot_method_bind , set_click_mask : 0 as * mut sys :: godot_method_bind , set_disabled_texture : 0 as * mut sys :: godot_method_bind , set_expand : 0 as * mut sys :: godot_method_bind , set_flip_h : 0 as * mut sys :: godot_method_bind , set_flip_v : 0 as * mut sys :: godot_method_bind , set_focused_texture : 0 as * mut sys :: godot_method_bind , set_hover_texture : 0 as * mut sys :: godot_method_bind , set_normal_texture : 0 as * mut sys :: godot_method_bind , set_pressed_texture : 0 as * mut sys :: godot_method_bind , set_stretch_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TextureButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TextureButton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_click_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_click_mask\0" . as_ptr () as * const c_char) ; table . get_disabled_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_disabled_texture\0" . as_ptr () as * const c_char) ; table . get_expand = (gd_api . godot_method_bind_get_method) (class_name , "get_expand\0" . as_ptr () as * const c_char) ; table . get_focused_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_focused_texture\0" . as_ptr () as * const c_char) ; table . get_hover_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_hover_texture\0" . as_ptr () as * const c_char) ; table . get_normal_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_normal_texture\0" . as_ptr () as * const c_char) ; table . get_pressed_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_pressed_texture\0" . as_ptr () as * const c_char) ; table . get_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_mode\0" . as_ptr () as * const c_char) ; table . is_flipped_h = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_h\0" . as_ptr () as * const c_char) ; table . is_flipped_v = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_v\0" . as_ptr () as * const c_char) ; table . set_click_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_click_mask\0" . as_ptr () as * const c_char) ; table . set_disabled_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_disabled_texture\0" . as_ptr () as * const c_char) ; table . set_expand = (gd_api . godot_method_bind_get_method) (class_name , "set_expand\0" . as_ptr () as * const c_char) ; table . set_flip_h = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_h\0" . as_ptr () as * const c_char) ; table . set_flip_v = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_v\0" . as_ptr () as * const c_char) ; table . set_focused_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_focused_texture\0" . as_ptr () as * const c_char) ; table . set_hover_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_hover_texture\0" . as_ptr () as * const c_char) ; table . set_normal_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_normal_texture\0" . as_ptr () as * const c_char) ; table . set_pressed_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_pressed_texture\0" . as_ptr () as * const c_char) ; table . set_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::texture_button::private::TextureButton;
            
            pub mod texture_layered {
                # ! [doc = "This module contains types related to the API class [`TextureLayered`][super::TextureLayered]."] pub (crate) mod private { # [doc = "`core class TextureLayered` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`texture_layered`][super::texture_layered] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_texturelayered.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTextureLayered inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TextureLayered { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TextureLayered ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Flags (pub i64) ; impl Flags { pub const FLAG_MIPMAPS : Flags = Flags (1i64) ; pub const FLAG_REPEAT : Flags = Flags (2i64) ; pub const FLAGS_DEFAULT_TEXTURE_3D : Flags = Flags (4i64) ; pub const FLAG_FILTER : Flags = Flags (4i64) ; pub const FLAGS_DEFAULT_TEXTURE_ARRAY : Flags = Flags (7i64) ; pub const FLAG_ANISOTROPIC_FILTER : Flags = Flags (8i64) ; } impl From < i64 > for Flags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Flags > for i64 { # [inline] fn from (v : Flags) -> Self { v . 0 } } impl FromVariant for Flags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TextureLayered { pub const FLAG_MIPMAPS : i64 = 1i64 ; pub const FLAG_REPEAT : i64 = 2i64 ; pub const FLAGS_DEFAULT_TEXTURE_3D : i64 = 4i64 ; pub const FLAG_FILTER : i64 = 4i64 ; pub const FLAGS_DEFAULT_TEXTURE_ARRAY : i64 = 7i64 ; pub const FLAG_ANISOTROPIC_FILTER : i64 = 8i64 ; } impl TextureLayered { # [doc = "Returns the depth of the texture. Depth is the 3rd dimension (typically Z-axis)."] # [doc = ""] # [inline] pub fn get_depth (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . get_depth ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Specifies which [`Flags`][Flags] apply to this texture."] # [doc = ""] # [inline] pub fn flags (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . get_flags ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the current format being used by this texture. See [enum Image.Format] for details."] # [doc = ""] # [inline] pub fn get_format (& self) -> crate :: generated :: image :: Format { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . get_format ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: image :: Format > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the height of the texture. Height is typically represented by the Y-axis."] # [doc = ""] # [inline] pub fn get_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . get_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an [`Image`][Image] resource with the data from specified `layer`."] # [doc = ""] # [inline] pub fn get_layer_data (& self , layer : i64) -> Option < Ref < crate :: generated :: Image , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . get_layer_data ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , layer as _) ; < Option < Ref < crate :: generated :: Image , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the width of the texture. Width is typically represented by the X-axis."] # [doc = ""] # [inline] pub fn get_width (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . get_width ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Partially sets the data for a specified `layer` by overwriting using the data of the specified `image`. `x_offset` and `y_offset` determine where the [`Image`][Image] is \"stamped\" over the texture. The `image` must fit within the texture.\n# Default Arguments\n* `mipmap` - `0`"] # [doc = ""] # [inline] pub fn set_data_partial (& self , image : impl AsArg < crate :: generated :: Image > , x_offset : i64 , y_offset : i64 , layer : i64 , mipmap : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . set_data_partial ; let ret = crate :: icalls :: icallvar__obj_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , x_offset as _ , y_offset as _ , layer as _ , mipmap as _) ; } } # [doc = "Specifies which [`Flags`][Flags] apply to this texture."] # [doc = ""] # [inline] pub fn set_flags (& self , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . set_flags ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flags as _) ; } } # [doc = "Sets the data for the specified layer. Data takes the form of a 2-dimensional [`Image`][Image] resource."] # [doc = ""] # [inline] pub fn set_layer_data (& self , image : impl AsArg < crate :: generated :: Image > , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureLayeredMethodTable :: get (get_api ()) . set_layer_data ; let ret = crate :: icalls :: icallvar__obj_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , layer as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TextureLayered { } unsafe impl GodotObject for TextureLayered { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "TextureLayered" } } impl std :: ops :: Deref for TextureLayered { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextureLayered { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for TextureLayered { } unsafe impl SubClass < crate :: generated :: Reference > for TextureLayered { } unsafe impl SubClass < crate :: generated :: Object > for TextureLayered { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextureLayeredMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_depth : * mut sys :: godot_method_bind , pub get_flags : * mut sys :: godot_method_bind , pub get_format : * mut sys :: godot_method_bind , pub get_height : * mut sys :: godot_method_bind , pub get_layer_data : * mut sys :: godot_method_bind , pub get_width : * mut sys :: godot_method_bind , pub set_data_partial : * mut sys :: godot_method_bind , pub set_flags : * mut sys :: godot_method_bind , pub set_layer_data : * mut sys :: godot_method_bind } impl TextureLayeredMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextureLayeredMethodTable = TextureLayeredMethodTable { class_constructor : None , get_depth : 0 as * mut sys :: godot_method_bind , get_flags : 0 as * mut sys :: godot_method_bind , get_format : 0 as * mut sys :: godot_method_bind , get_height : 0 as * mut sys :: godot_method_bind , get_layer_data : 0 as * mut sys :: godot_method_bind , get_width : 0 as * mut sys :: godot_method_bind , set_data_partial : 0 as * mut sys :: godot_method_bind , set_flags : 0 as * mut sys :: godot_method_bind , set_layer_data : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TextureLayeredMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TextureLayered\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_depth\0" . as_ptr () as * const c_char) ; table . get_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_flags\0" . as_ptr () as * const c_char) ; table . get_format = (gd_api . godot_method_bind_get_method) (class_name , "get_format\0" . as_ptr () as * const c_char) ; table . get_height = (gd_api . godot_method_bind_get_method) (class_name , "get_height\0" . as_ptr () as * const c_char) ; table . get_layer_data = (gd_api . godot_method_bind_get_method) (class_name , "get_layer_data\0" . as_ptr () as * const c_char) ; table . get_width = (gd_api . godot_method_bind_get_method) (class_name , "get_width\0" . as_ptr () as * const c_char) ; table . set_data_partial = (gd_api . godot_method_bind_get_method) (class_name , "set_data_partial\0" . as_ptr () as * const c_char) ; table . set_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_flags\0" . as_ptr () as * const c_char) ; table . set_layer_data = (gd_api . godot_method_bind_get_method) (class_name , "set_layer_data\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::texture_layered::private::TextureLayered;
            
            pub mod texture_progress {
                # ! [doc = "This module contains types related to the API class [`TextureProgress`][super::TextureProgress]."] pub (crate) mod private { # [doc = "`core class TextureProgress` inherits `Range` (manually managed).\n\nThis class has related types in the [`texture_progress`][super::texture_progress] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_textureprogress.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`TextureProgress` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<TextureProgress>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nTextureProgress inherits methods from:\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TextureProgress { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TextureProgress ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct FillMode (pub i64) ; impl FillMode { pub const LEFT_TO_RIGHT : FillMode = FillMode (0i64) ; pub const RIGHT_TO_LEFT : FillMode = FillMode (1i64) ; pub const TOP_TO_BOTTOM : FillMode = FillMode (2i64) ; pub const BOTTOM_TO_TOP : FillMode = FillMode (3i64) ; pub const CLOCKWISE : FillMode = FillMode (4i64) ; pub const COUNTER_CLOCKWISE : FillMode = FillMode (5i64) ; pub const BILINEAR_LEFT_AND_RIGHT : FillMode = FillMode (6i64) ; pub const BILINEAR_TOP_AND_BOTTOM : FillMode = FillMode (7i64) ; pub const CLOCKWISE_AND_COUNTER_CLOCKWISE : FillMode = FillMode (8i64) ; } impl From < i64 > for FillMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < FillMode > for i64 { # [inline] fn from (v : FillMode) -> Self { v . 0 } } impl FromVariant for FillMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TextureProgress { pub const FILL_LEFT_TO_RIGHT : i64 = 0i64 ; pub const FILL_RIGHT_TO_LEFT : i64 = 1i64 ; pub const FILL_TOP_TO_BOTTOM : i64 = 2i64 ; pub const FILL_BOTTOM_TO_TOP : i64 = 3i64 ; pub const FILL_CLOCKWISE : i64 = 4i64 ; pub const FILL_COUNTER_CLOCKWISE : i64 = 5i64 ; pub const FILL_BILINEAR_LEFT_AND_RIGHT : i64 = 6i64 ; pub const FILL_BILINEAR_TOP_AND_BOTTOM : i64 = 7i64 ; pub const FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE : i64 = 8i64 ; } impl TextureProgress { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TextureProgressMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Upper limit for the fill of [`texture_progress`][Self::texture_progress] if [`fill_mode`][Self::fill_mode] is [`FILL_CLOCKWISE`][Self::FILL_CLOCKWISE] or [`FILL_COUNTER_CLOCKWISE`][Self::FILL_COUNTER_CLOCKWISE]. When the node's `value` is equal to its `max_value`, the texture fills up to this angle.\nSee [`Range.value`][Range::value], [`Range.max_value`][Range::max_value]."] # [doc = ""] # [inline] pub fn fill_degrees (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_fill_degrees ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The fill direction. See [`FillMode`][FillMode] for possible values."] # [doc = ""] # [inline] pub fn fill_mode (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_fill_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, Godot treats the bar's textures like in [`NinePatchRect`][NinePatchRect]. Use the `stretch_margin_*` properties like [`stretch_margin_bottom`][Self::stretch_margin_bottom] to set up the nine patch's 3×3 grid. When using a radial [`fill_mode`][Self::fill_mode], this setting will enable stretching."] # [doc = ""] # [inline] pub fn nine_patch_stretch (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_nine_patch_stretch ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "[`Texture`][Texture] that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of [`texture_progress`][Self::texture_progress]."] # [doc = ""] # [inline] pub fn over_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_over_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "[`Texture`][Texture] that clips based on the node's `value` and [`fill_mode`][Self::fill_mode]. As `value` increased, the texture fills up. It shows entirely when `value` reaches `max_value`. It doesn't show at all if `value` is equal to `min_value`.\nThe `value` property comes from [`Range`][Range]. See [`Range.value`][Range::value], [`Range.min_value`][Range::min_value], [`Range.max_value`][Range::max_value]."] # [doc = ""] # [inline] pub fn progress_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_progress_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Offsets [`texture_progress`][Self::texture_progress] if [`fill_mode`][Self::fill_mode] is [`FILL_CLOCKWISE`][Self::FILL_CLOCKWISE] or [`FILL_COUNTER_CLOCKWISE`][Self::FILL_COUNTER_CLOCKWISE]."] # [doc = ""] # [inline] pub fn radial_center_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_radial_center_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Starting angle for the fill of [`texture_progress`][Self::texture_progress] if [`fill_mode`][Self::fill_mode] is [`FILL_CLOCKWISE`][Self::FILL_CLOCKWISE] or [`FILL_COUNTER_CLOCKWISE`][Self::FILL_COUNTER_CLOCKWISE]. When the node's `value` is equal to its `min_value`, the texture doesn't show up at all. When the `value` increases, the texture fills and tends towards [`radial_fill_degrees`][Self::radial_fill_degrees]."] # [doc = ""] # [inline] pub fn radial_initial_angle (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_radial_initial_angle ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The height of the 9-patch's top row."] # [doc = ""] # [inline] pub fn stretch_margin (& self , margin : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_stretch_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , margin as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The offset of [`texture_progress`][Self::texture_progress]. Useful for [`texture_over`][Self::texture_over] and [`texture_under`][Self::texture_under] with fancy borders, to avoid transparent margins in your progress texture."] # [doc = ""] # [inline] pub fn texture_progress_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_texture_progress_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Multiplies the color of the bar's `texture_over` texture. The effect is similar to [`CanvasItem.modulate`][CanvasItem::modulate], except it only affects this specific texture instead of the entire node."] # [doc = ""] # [inline] pub fn tint_over (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_tint_over ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Multiplies the color of the bar's `texture_progress` texture."] # [doc = ""] # [inline] pub fn tint_progress (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_tint_progress ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Multiplies the color of the bar's `texture_under` texture."] # [doc = ""] # [inline] pub fn tint_under (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_tint_under ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "[`Texture`][Texture] that draws under the progress bar. The bar's background."] # [doc = ""] # [inline] pub fn under_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_under_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Upper limit for the fill of [`texture_progress`][Self::texture_progress] if [`fill_mode`][Self::fill_mode] is [`FILL_CLOCKWISE`][Self::FILL_CLOCKWISE] or [`FILL_COUNTER_CLOCKWISE`][Self::FILL_COUNTER_CLOCKWISE]. When the node's `value` is equal to its `max_value`, the texture fills up to this angle.\nSee [`Range.value`][Range::value], [`Range.max_value`][Range::max_value]."] # [doc = ""] # [inline] pub fn set_fill_degrees (& self , mode : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_fill_degrees ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The fill direction. See [`FillMode`][FillMode] for possible values."] # [doc = ""] # [inline] pub fn set_fill_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_fill_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "If `true`, Godot treats the bar's textures like in [`NinePatchRect`][NinePatchRect]. Use the `stretch_margin_*` properties like [`stretch_margin_bottom`][Self::stretch_margin_bottom] to set up the nine patch's 3×3 grid. When using a radial [`fill_mode`][Self::fill_mode], this setting will enable stretching."] # [doc = ""] # [inline] pub fn set_nine_patch_stretch (& self , stretch : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_nine_patch_stretch ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , stretch as _) ; } } # [doc = "[`Texture`][Texture] that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of [`texture_progress`][Self::texture_progress]."] # [doc = ""] # [inline] pub fn set_over_texture (& self , tex : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_over_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , tex . as_arg_ptr ()) ; } } # [doc = "[`Texture`][Texture] that clips based on the node's `value` and [`fill_mode`][Self::fill_mode]. As `value` increased, the texture fills up. It shows entirely when `value` reaches `max_value`. It doesn't show at all if `value` is equal to `min_value`.\nThe `value` property comes from [`Range`][Range]. See [`Range.value`][Range::value], [`Range.min_value`][Range::min_value], [`Range.max_value`][Range::max_value]."] # [doc = ""] # [inline] pub fn set_progress_texture (& self , tex : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_progress_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , tex . as_arg_ptr ()) ; } } # [doc = "Offsets [`texture_progress`][Self::texture_progress] if [`fill_mode`][Self::fill_mode] is [`FILL_CLOCKWISE`][Self::FILL_CLOCKWISE] or [`FILL_COUNTER_CLOCKWISE`][Self::FILL_COUNTER_CLOCKWISE]."] # [doc = ""] # [inline] pub fn set_radial_center_offset (& self , mode : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_radial_center_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , mode) ; } } # [doc = "Starting angle for the fill of [`texture_progress`][Self::texture_progress] if [`fill_mode`][Self::fill_mode] is [`FILL_CLOCKWISE`][Self::FILL_CLOCKWISE] or [`FILL_COUNTER_CLOCKWISE`][Self::FILL_COUNTER_CLOCKWISE]. When the node's `value` is equal to its `min_value`, the texture doesn't show up at all. When the `value` increases, the texture fills and tends towards [`radial_fill_degrees`][Self::radial_fill_degrees]."] # [doc = ""] # [inline] pub fn set_radial_initial_angle (& self , mode : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_radial_initial_angle ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The height of the 9-patch's top row."] # [doc = ""] # [inline] pub fn set_stretch_margin (& self , margin : i64 , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_stretch_margin ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , margin as _ , value as _) ; } } # [doc = "The offset of [`texture_progress`][Self::texture_progress]. Useful for [`texture_over`][Self::texture_over] and [`texture_under`][Self::texture_under] with fancy borders, to avoid transparent margins in your progress texture."] # [doc = ""] # [inline] pub fn set_texture_progress_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_texture_progress_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Multiplies the color of the bar's `texture_over` texture. The effect is similar to [`CanvasItem.modulate`][CanvasItem::modulate], except it only affects this specific texture instead of the entire node."] # [doc = ""] # [inline] pub fn set_tint_over (& self , tint : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_tint_over ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , tint) ; } } # [doc = "Multiplies the color of the bar's `texture_progress` texture."] # [doc = ""] # [inline] pub fn set_tint_progress (& self , tint : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_tint_progress ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , tint) ; } } # [doc = "Multiplies the color of the bar's `texture_under` texture."] # [doc = ""] # [inline] pub fn set_tint_under (& self , tint : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_tint_under ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , tint) ; } } # [doc = "[`Texture`][Texture] that draws under the progress bar. The bar's background."] # [doc = ""] # [inline] pub fn set_under_texture (& self , tex : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_under_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , tex . as_arg_ptr ()) ; } } # [doc = "The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders."] # [doc = ""] # [inline] pub fn stretch_margin_bottom (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_stretch_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders."] # [doc = ""] # [inline] pub fn set_stretch_margin_bottom (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_stretch_margin ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } # [doc = "The width of the 9-patch's left column."] # [doc = ""] # [inline] pub fn stretch_margin_left (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_stretch_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The width of the 9-patch's left column."] # [doc = ""] # [inline] pub fn set_stretch_margin_left (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_stretch_margin ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "The width of the 9-patch's right column."] # [doc = ""] # [inline] pub fn stretch_margin_right (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_stretch_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The width of the 9-patch's right column."] # [doc = ""] # [inline] pub fn set_stretch_margin_right (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_stretch_margin ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "The height of the 9-patch's top row."] # [doc = ""] # [inline] pub fn stretch_margin_top (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . get_stretch_margin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The height of the 9-patch's top row."] # [doc = ""] # [inline] pub fn set_stretch_margin_top (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureProgressMethodTable :: get (get_api ()) . set_stretch_margin ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TextureProgress { } unsafe impl GodotObject for TextureProgress { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "TextureProgress" } } impl QueueFree for TextureProgress { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for TextureProgress { type Target = crate :: generated :: Range ; # [inline] fn deref (& self) -> & crate :: generated :: Range { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextureProgress { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Range { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Range > for TextureProgress { } unsafe impl SubClass < crate :: generated :: Control > for TextureProgress { } unsafe impl SubClass < crate :: generated :: CanvasItem > for TextureProgress { } unsafe impl SubClass < crate :: generated :: Node > for TextureProgress { } unsafe impl SubClass < crate :: generated :: Object > for TextureProgress { } impl Instanciable for TextureProgress { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { TextureProgress :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextureProgressMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_fill_degrees : * mut sys :: godot_method_bind , pub get_fill_mode : * mut sys :: godot_method_bind , pub get_nine_patch_stretch : * mut sys :: godot_method_bind , pub get_over_texture : * mut sys :: godot_method_bind , pub get_progress_texture : * mut sys :: godot_method_bind , pub get_radial_center_offset : * mut sys :: godot_method_bind , pub get_radial_initial_angle : * mut sys :: godot_method_bind , pub get_stretch_margin : * mut sys :: godot_method_bind , pub get_texture_progress_offset : * mut sys :: godot_method_bind , pub get_tint_over : * mut sys :: godot_method_bind , pub get_tint_progress : * mut sys :: godot_method_bind , pub get_tint_under : * mut sys :: godot_method_bind , pub get_under_texture : * mut sys :: godot_method_bind , pub set_fill_degrees : * mut sys :: godot_method_bind , pub set_fill_mode : * mut sys :: godot_method_bind , pub set_nine_patch_stretch : * mut sys :: godot_method_bind , pub set_over_texture : * mut sys :: godot_method_bind , pub set_progress_texture : * mut sys :: godot_method_bind , pub set_radial_center_offset : * mut sys :: godot_method_bind , pub set_radial_initial_angle : * mut sys :: godot_method_bind , pub set_stretch_margin : * mut sys :: godot_method_bind , pub set_texture_progress_offset : * mut sys :: godot_method_bind , pub set_tint_over : * mut sys :: godot_method_bind , pub set_tint_progress : * mut sys :: godot_method_bind , pub set_tint_under : * mut sys :: godot_method_bind , pub set_under_texture : * mut sys :: godot_method_bind } impl TextureProgressMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextureProgressMethodTable = TextureProgressMethodTable { class_constructor : None , get_fill_degrees : 0 as * mut sys :: godot_method_bind , get_fill_mode : 0 as * mut sys :: godot_method_bind , get_nine_patch_stretch : 0 as * mut sys :: godot_method_bind , get_over_texture : 0 as * mut sys :: godot_method_bind , get_progress_texture : 0 as * mut sys :: godot_method_bind , get_radial_center_offset : 0 as * mut sys :: godot_method_bind , get_radial_initial_angle : 0 as * mut sys :: godot_method_bind , get_stretch_margin : 0 as * mut sys :: godot_method_bind , get_texture_progress_offset : 0 as * mut sys :: godot_method_bind , get_tint_over : 0 as * mut sys :: godot_method_bind , get_tint_progress : 0 as * mut sys :: godot_method_bind , get_tint_under : 0 as * mut sys :: godot_method_bind , get_under_texture : 0 as * mut sys :: godot_method_bind , set_fill_degrees : 0 as * mut sys :: godot_method_bind , set_fill_mode : 0 as * mut sys :: godot_method_bind , set_nine_patch_stretch : 0 as * mut sys :: godot_method_bind , set_over_texture : 0 as * mut sys :: godot_method_bind , set_progress_texture : 0 as * mut sys :: godot_method_bind , set_radial_center_offset : 0 as * mut sys :: godot_method_bind , set_radial_initial_angle : 0 as * mut sys :: godot_method_bind , set_stretch_margin : 0 as * mut sys :: godot_method_bind , set_texture_progress_offset : 0 as * mut sys :: godot_method_bind , set_tint_over : 0 as * mut sys :: godot_method_bind , set_tint_progress : 0 as * mut sys :: godot_method_bind , set_tint_under : 0 as * mut sys :: godot_method_bind , set_under_texture : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TextureProgressMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TextureProgress\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_fill_degrees = (gd_api . godot_method_bind_get_method) (class_name , "get_fill_degrees\0" . as_ptr () as * const c_char) ; table . get_fill_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_fill_mode\0" . as_ptr () as * const c_char) ; table . get_nine_patch_stretch = (gd_api . godot_method_bind_get_method) (class_name , "get_nine_patch_stretch\0" . as_ptr () as * const c_char) ; table . get_over_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_over_texture\0" . as_ptr () as * const c_char) ; table . get_progress_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_progress_texture\0" . as_ptr () as * const c_char) ; table . get_radial_center_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_radial_center_offset\0" . as_ptr () as * const c_char) ; table . get_radial_initial_angle = (gd_api . godot_method_bind_get_method) (class_name , "get_radial_initial_angle\0" . as_ptr () as * const c_char) ; table . get_stretch_margin = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_margin\0" . as_ptr () as * const c_char) ; table . get_texture_progress_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_progress_offset\0" . as_ptr () as * const c_char) ; table . get_tint_over = (gd_api . godot_method_bind_get_method) (class_name , "get_tint_over\0" . as_ptr () as * const c_char) ; table . get_tint_progress = (gd_api . godot_method_bind_get_method) (class_name , "get_tint_progress\0" . as_ptr () as * const c_char) ; table . get_tint_under = (gd_api . godot_method_bind_get_method) (class_name , "get_tint_under\0" . as_ptr () as * const c_char) ; table . get_under_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_under_texture\0" . as_ptr () as * const c_char) ; table . set_fill_degrees = (gd_api . godot_method_bind_get_method) (class_name , "set_fill_degrees\0" . as_ptr () as * const c_char) ; table . set_fill_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_fill_mode\0" . as_ptr () as * const c_char) ; table . set_nine_patch_stretch = (gd_api . godot_method_bind_get_method) (class_name , "set_nine_patch_stretch\0" . as_ptr () as * const c_char) ; table . set_over_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_over_texture\0" . as_ptr () as * const c_char) ; table . set_progress_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_progress_texture\0" . as_ptr () as * const c_char) ; table . set_radial_center_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_radial_center_offset\0" . as_ptr () as * const c_char) ; table . set_radial_initial_angle = (gd_api . godot_method_bind_get_method) (class_name , "set_radial_initial_angle\0" . as_ptr () as * const c_char) ; table . set_stretch_margin = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_margin\0" . as_ptr () as * const c_char) ; table . set_texture_progress_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_progress_offset\0" . as_ptr () as * const c_char) ; table . set_tint_over = (gd_api . godot_method_bind_get_method) (class_name , "set_tint_over\0" . as_ptr () as * const c_char) ; table . set_tint_progress = (gd_api . godot_method_bind_get_method) (class_name , "set_tint_progress\0" . as_ptr () as * const c_char) ; table . set_tint_under = (gd_api . godot_method_bind_get_method) (class_name , "set_tint_under\0" . as_ptr () as * const c_char) ; table . set_under_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_under_texture\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::texture_progress::private::TextureProgress;
            
            pub mod texture_rect {
                # ! [doc = "This module contains types related to the API class [`TextureRect`][super::TextureRect]."] pub (crate) mod private { # [doc = "`core class TextureRect` inherits `Control` (manually managed).\n\nThis class has related types in the [`texture_rect`][super::texture_rect] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_texturerect.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`TextureRect` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<TextureRect>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nTextureRect inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TextureRect { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TextureRect ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct StretchMode (pub i64) ; impl StretchMode { pub const SCALE_ON_EXPAND : StretchMode = StretchMode (0i64) ; pub const SCALE : StretchMode = StretchMode (1i64) ; pub const TILE : StretchMode = StretchMode (2i64) ; pub const KEEP : StretchMode = StretchMode (3i64) ; pub const KEEP_CENTERED : StretchMode = StretchMode (4i64) ; pub const KEEP_ASPECT : StretchMode = StretchMode (5i64) ; pub const KEEP_ASPECT_CENTERED : StretchMode = StretchMode (6i64) ; pub const KEEP_ASPECT_COVERED : StretchMode = StretchMode (7i64) ; } impl From < i64 > for StretchMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < StretchMode > for i64 { # [inline] fn from (v : StretchMode) -> Self { v . 0 } } impl FromVariant for StretchMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TextureRect { pub const STRETCH_SCALE_ON_EXPAND : i64 = 0i64 ; pub const STRETCH_SCALE : i64 = 1i64 ; pub const STRETCH_TILE : i64 = 2i64 ; pub const STRETCH_KEEP : i64 = 3i64 ; pub const STRETCH_KEEP_CENTERED : i64 = 4i64 ; pub const STRETCH_KEEP_ASPECT : i64 = 5i64 ; pub const STRETCH_KEEP_ASPECT_CENTERED : i64 = 6i64 ; pub const STRETCH_KEEP_ASPECT_COVERED : i64 = 7i64 ; } impl TextureRect { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TextureRectMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Controls the texture's behavior when resizing the node's bounding rectangle. See [`StretchMode`][StretchMode]."] # [doc = ""] # [inline] pub fn stretch_mode (& self) -> crate :: generated :: texture_rect :: StretchMode { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . get_stretch_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: texture_rect :: StretchMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The node's [`Texture`][Texture] resource."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the texture scales to fit its bounding rectangle."] # [doc = ""] # [inline] pub fn has_expand (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . has_expand ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn is_flipped_h (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . is_flipped_h ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn is_flipped_v (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . is_flipped_v ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the texture scales to fit its bounding rectangle."] # [doc = ""] # [inline] pub fn set_expand (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . set_expand ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, texture is flipped horizontally."] # [doc = ""] # [inline] pub fn set_flip_h (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . set_flip_h ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, texture is flipped vertically."] # [doc = ""] # [inline] pub fn set_flip_v (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . set_flip_v ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Controls the texture's behavior when resizing the node's bounding rectangle. See [`StretchMode`][StretchMode]."] # [doc = ""] # [inline] pub fn set_stretch_mode (& self , stretch_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . set_stretch_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , stretch_mode as _) ; } } # [doc = "The node's [`Texture`][Texture] resource."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TextureRectMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TextureRect { } unsafe impl GodotObject for TextureRect { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "TextureRect" } } impl QueueFree for TextureRect { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for TextureRect { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TextureRect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for TextureRect { } unsafe impl SubClass < crate :: generated :: CanvasItem > for TextureRect { } unsafe impl SubClass < crate :: generated :: Node > for TextureRect { } unsafe impl SubClass < crate :: generated :: Object > for TextureRect { } impl Instanciable for TextureRect { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { TextureRect :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TextureRectMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_stretch_mode : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub has_expand : * mut sys :: godot_method_bind , pub is_flipped_h : * mut sys :: godot_method_bind , pub is_flipped_v : * mut sys :: godot_method_bind , pub set_expand : * mut sys :: godot_method_bind , pub set_flip_h : * mut sys :: godot_method_bind , pub set_flip_v : * mut sys :: godot_method_bind , pub set_stretch_mode : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind } impl TextureRectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TextureRectMethodTable = TextureRectMethodTable { class_constructor : None , get_stretch_mode : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , has_expand : 0 as * mut sys :: godot_method_bind , is_flipped_h : 0 as * mut sys :: godot_method_bind , is_flipped_v : 0 as * mut sys :: godot_method_bind , set_expand : 0 as * mut sys :: godot_method_bind , set_flip_h : 0 as * mut sys :: godot_method_bind , set_flip_v : 0 as * mut sys :: godot_method_bind , set_stretch_mode : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TextureRectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TextureRect\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_mode\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . has_expand = (gd_api . godot_method_bind_get_method) (class_name , "has_expand\0" . as_ptr () as * const c_char) ; table . is_flipped_h = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_h\0" . as_ptr () as * const c_char) ; table . is_flipped_v = (gd_api . godot_method_bind_get_method) (class_name , "is_flipped_v\0" . as_ptr () as * const c_char) ; table . set_expand = (gd_api . godot_method_bind_get_method) (class_name , "set_expand\0" . as_ptr () as * const c_char) ; table . set_flip_h = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_h\0" . as_ptr () as * const c_char) ; table . set_flip_v = (gd_api . godot_method_bind_get_method) (class_name , "set_flip_v\0" . as_ptr () as * const c_char) ; table . set_stretch_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_mode\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::texture_rect::private::TextureRect;
            
            pub mod theme {
                # ! [doc = "This module contains types related to the API class [`Theme`][super::Theme]."] pub (crate) mod private { # [doc = "`core class Theme` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`theme`][super::theme] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_theme.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTheme inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Theme { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Theme ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DataType (pub i64) ; impl DataType { pub const COLOR : DataType = DataType (0i64) ; pub const CONSTANT : DataType = DataType (1i64) ; pub const FONT : DataType = DataType (2i64) ; pub const ICON : DataType = DataType (3i64) ; pub const STYLEBOX : DataType = DataType (4i64) ; pub const MAX : DataType = DataType (5i64) ; } impl From < i64 > for DataType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DataType > for i64 { # [inline] fn from (v : DataType) -> Self { v . 0 } } impl FromVariant for DataType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Theme { pub const DATA_TYPE_COLOR : i64 = 0i64 ; pub const DATA_TYPE_CONSTANT : i64 = 1i64 ; pub const DATA_TYPE_FONT : i64 = 2i64 ; pub const DATA_TYPE_ICON : i64 = 3i64 ; pub const DATA_TYPE_STYLEBOX : i64 = 4i64 ; pub const DATA_TYPE_MAX : i64 = 5i64 ; } impl Theme { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ThemeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds an empty theme type for every valid data type.\n**Note:** Empty types are not saved with the theme. This method only exists to perform in-memory changes to the resource. Use available `set_*` methods to add theme items."] # [doc = ""] # [inline] pub fn add_type (& self , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . add_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , theme_type . into ()) ; } } # [doc = "Clears all values on the theme."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Clears the [`Color`][Color] at `name` if the theme has `theme_type`."] # [doc = ""] # [inline] pub fn clear_color (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . clear_color ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; } } # [doc = "Clears the constant at `name` if the theme has `theme_type`."] # [doc = ""] # [inline] pub fn clear_constant (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . clear_constant ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; } } # [doc = "Clears the [`Font`][Font] at `name` if the theme has `theme_type`."] # [doc = ""] # [inline] pub fn clear_font (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . clear_font ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; } } # [doc = "Clears the icon at `name` if the theme has `theme_type`."] # [doc = ""] # [inline] pub fn clear_icon (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . clear_icon ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; } } # [doc = "Clears [`StyleBox`][StyleBox] at `name` if the theme has `theme_type`."] # [doc = ""] # [inline] pub fn clear_stylebox (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . clear_stylebox ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; } } # [doc = "Clears the theme item of `data_type` at `name` if the theme has `theme_type`."] # [doc = ""] # [inline] pub fn clear_theme_item (& self , data_type : i64 , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . clear_theme_item ; let ret = crate :: icalls :: icallvar__i64_str_str (method_bind , self . this . sys () . as_ptr () , data_type as _ , name . into () , theme_type . into ()) ; } } # [doc = "Unmarks `theme_type` as being a variation of another theme type. See [`set_type_variation`][Self::set_type_variation]."] # [doc = ""] # [inline] pub fn clear_type_variation (& self , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . clear_type_variation ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , theme_type . into ()) ; } } # [doc = "Sets the theme's values to a copy of the default theme values."] # [doc = ""] # [inline] pub fn copy_default_theme (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . copy_default_theme ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Sets the theme's values to a copy of a given theme."] # [doc = ""] # [inline] pub fn copy_theme (& self , other : impl AsArg < crate :: generated :: Theme >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . copy_theme ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , other . as_arg_ptr ()) ; } } # [doc = "Returns the [`Color`][Color] at `name` if the theme has `theme_type`."] # [doc = ""] # [inline] pub fn get_color (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_color ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all the [`Color`][Color]s as a [`PoolStringArray`][PoolArray<GodotString>] filled with each [`Color`][Color]'s name, for use in [`get_color`][Self::get_color], if the theme has `theme_type`."] # [doc = ""] # [inline] pub fn get_color_list (& self , theme_type : impl Into < GodotString >) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_color_list ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , theme_type . into ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all the [`Color`][Color] types as a [`PoolStringArray`][PoolArray<GodotString>] filled with unique type names, for use in [`get_color`][Self::get_color] and/or [`get_color_list`][Self::get_color_list]."] # [doc = ""] # [inline] pub fn get_color_types (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_color_types ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the constant at `name` if the theme has `theme_type`."] # [doc = ""] # [inline] pub fn get_constant (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_constant ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns all the constants as a [`PoolStringArray`][PoolArray<GodotString>] filled with each constant's name, for use in [`get_constant`][Self::get_constant], if the theme has `theme_type`."] # [doc = ""] # [inline] pub fn get_constant_list (& self , theme_type : impl Into < GodotString >) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_constant_list ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , theme_type . into ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all the constant types as a [`PoolStringArray`][PoolArray<GodotString>] filled with unique type names, for use in [`get_constant`][Self::get_constant] and/or [`get_constant_list`][Self::get_constant_list]."] # [doc = ""] # [inline] pub fn get_constant_types (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_constant_types ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The default font of this [`Theme`][Theme] resource. Used as a fallback value for font items defined in this theme, but having invalid values. If this value is also invalid, the global default value is used.\nUse [`has_default_font`][Self::has_default_font] to check if this value is valid."] # [doc = ""] # [inline] pub fn default_font (& self) -> Option < Ref < crate :: generated :: Font , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_default_font ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Font , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`Font`][Font] at `name` if the theme has `theme_type`. If such item does not exist and [`default_font`][Self::default_font] is set on the theme, the default font will be returned."] # [doc = ""] # [inline] pub fn get_font (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> Option < Ref < crate :: generated :: Font , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_font ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < Option < Ref < crate :: generated :: Font , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all the [`Font`][Font]s as a [`PoolStringArray`][PoolArray<GodotString>] filled with each [`Font`][Font]'s name, for use in [`get_font`][Self::get_font], if the theme has `theme_type`."] # [doc = ""] # [inline] pub fn get_font_list (& self , theme_type : impl Into < GodotString >) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_font_list ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , theme_type . into ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all the [`Font`][Font] types as a [`PoolStringArray`][PoolArray<GodotString>] filled with unique type names, for use in [`get_font`][Self::get_font] and/or [`get_font_list`][Self::get_font_list]."] # [doc = ""] # [inline] pub fn get_font_types (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_font_types ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the icon [`Texture`][Texture] at `name` if the theme has `theme_type`."] # [doc = ""] # [inline] pub fn get_icon (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_icon ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all the icons as a [`PoolStringArray`][PoolArray<GodotString>] filled with each [`Texture`][Texture]'s name, for use in [`get_icon`][Self::get_icon], if the theme has `theme_type`."] # [doc = ""] # [inline] pub fn get_icon_list (& self , theme_type : impl Into < GodotString >) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_icon_list ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , theme_type . into ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all the icon types as a [`PoolStringArray`][PoolArray<GodotString>] filled with unique type names, for use in [`get_icon`][Self::get_icon] and/or [`get_icon_list`][Self::get_icon_list]."] # [doc = ""] # [inline] pub fn get_icon_types (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_icon_types ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`StyleBox`][StyleBox] at `name` if the theme has `theme_type`.\nValid `name`s may be found using [`get_stylebox_list`][Self::get_stylebox_list]. Valid `theme_type`s may be found using [`get_stylebox_types`][Self::get_stylebox_types]."] # [doc = ""] # [inline] pub fn get_stylebox (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> Option < Ref < crate :: generated :: StyleBox , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_stylebox ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < Option < Ref < crate :: generated :: StyleBox , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all the [`StyleBox`][StyleBox]s as a [`PoolStringArray`][PoolArray<GodotString>] filled with each [`StyleBox`][StyleBox]'s name, for use in [`get_stylebox`][Self::get_stylebox], if the theme has `theme_type`.\nValid `theme_type`s may be found using [`get_stylebox_types`][Self::get_stylebox_types]."] # [doc = ""] # [inline] pub fn get_stylebox_list (& self , theme_type : impl Into < GodotString >) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_stylebox_list ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , theme_type . into ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all the [`StyleBox`][StyleBox] types as a [`PoolStringArray`][PoolArray<GodotString>] filled with unique type names, for use in [`get_stylebox`][Self::get_stylebox] and/or [`get_stylebox_list`][Self::get_stylebox_list]."] # [doc = ""] # [inline] pub fn get_stylebox_types (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_stylebox_types ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the theme item of `data_type` at `name` if the theme has `theme_type`.\nValid `name`s may be found using [`get_theme_item_list`][Self::get_theme_item_list] or a data type specific method. Valid `theme_type`s may be found using [`get_theme_item_types`][Self::get_theme_item_types] or a data type specific method."] # [doc = ""] # [inline] pub fn get_theme_item (& self , data_type : i64 , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_theme_item ; let ret = crate :: icalls :: icallvar__i64_str_str (method_bind , self . this . sys () . as_ptr () , data_type as _ , name . into () , theme_type . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all the theme items of `data_type` as a [`PoolStringArray`][PoolArray<GodotString>] filled with each theme items's name, for use in [`get_theme_item`][Self::get_theme_item] or a data type specific method, if the theme has `theme_type`.\nValid `theme_type`s may be found using [`get_theme_item_types`][Self::get_theme_item_types] or a data type specific method."] # [doc = ""] # [inline] pub fn get_theme_item_list (& self , data_type : i64 , theme_type : impl Into < GodotString >) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_theme_item_list ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , data_type as _ , theme_type . into ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all the theme items of `data_type` types as a [`PoolStringArray`][PoolArray<GodotString>] filled with unique type names, for use in [`get_theme_item`][Self::get_theme_item], [`get_theme_item_list`][Self::get_theme_item_list] or data type specific methods."] # [doc = ""] # [inline] pub fn get_theme_item_types (& self , data_type : i64) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_theme_item_types ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , data_type as _) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns all the theme types as a [`PoolStringArray`][PoolArray<GodotString>] filled with unique type names, for use in other `get_*` functions of this theme.\n**Note:** `theme_type` has no effect and will be removed in future version."] # [doc = ""] # [inline] pub fn get_type_list (& self , theme_type : impl Into < GodotString >) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_type_list ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , theme_type . into ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the name of the base theme type if `theme_type` is a valid variation type. Returns an empty string otherwise."] # [doc = ""] # [inline] pub fn get_type_variation_base (& self , theme_type : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_type_variation_base ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , theme_type . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a list of all type variations for the given `base_type`."] # [doc = ""] # [inline] pub fn get_type_variation_list (& self , base_type : impl Into < GodotString >) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . get_type_variation_list ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , base_type . into ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if [`Color`][Color] with `name` is in `theme_type`.\nReturns `false` if the theme does not have `theme_type`."] # [doc = ""] # [inline] pub fn has_color (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . has_color ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if constant with `name` is in `theme_type`.\nReturns `false` if the theme does not have `theme_type`."] # [doc = ""] # [inline] pub fn has_constant (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . has_constant ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this theme has a valid [`default_font`][Self::default_font] value."] # [doc = ""] # [inline] pub fn has_default_font (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . has_default_font ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if [`Font`][Font] with `name` is in `theme_type`.\nReturns `false` if the theme does not have `theme_type`."] # [doc = ""] # [inline] pub fn has_font (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . has_font ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if icon [`Texture`][Texture] with `name` is in `theme_type`.\nReturns `false` if the theme does not have `theme_type`."] # [doc = ""] # [inline] pub fn has_icon (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . has_icon ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if [`StyleBox`][StyleBox] with `name` is in `theme_type`.\nReturns `false` if the theme does not have `theme_type`."] # [doc = ""] # [inline] pub fn has_stylebox (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . has_stylebox ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if a theme item of `data_type` with `name` is in `theme_type`.\nReturns `false` if the theme does not have `theme_type`."] # [doc = ""] # [inline] pub fn has_theme_item (& self , data_type : i64 , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . has_theme_item ; let ret = crate :: icalls :: icallvar__i64_str_str (method_bind , self . this . sys () . as_ptr () , data_type as _ , name . into () , theme_type . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if `theme_type` is marked as a variation of `base_type`."] # [doc = ""] # [inline] pub fn is_type_variation (& self , theme_type : impl Into < GodotString > , base_type : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . is_type_variation ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , theme_type . into () , base_type . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Adds missing and overrides existing definitions with values from the `other` [`Theme`][Theme].\n**Note:** This modifies the current theme. If you want to merge two themes together without modifying either one, create a new empty theme and merge the other two into it one after another."] # [doc = ""] # [inline] pub fn merge_with (& self , other : impl AsArg < crate :: generated :: Theme >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . merge_with ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , other . as_arg_ptr ()) ; } } # [doc = "Removes the theme type, gracefully discarding defined theme items. If the type is a variation, this information is also erased. If the type is a base for type variations, those variations lose their base."] # [doc = ""] # [inline] pub fn remove_type (& self , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . remove_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , theme_type . into ()) ; } } # [doc = "Renames the [`Color`][Color] at `old_name` to `name` if the theme has `theme_type`. If `name` is already taken, this method fails."] # [doc = ""] # [inline] pub fn rename_color (& self , old_name : impl Into < GodotString > , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . rename_color ; let ret = crate :: icalls :: icallvar__str_str_str (method_bind , self . this . sys () . as_ptr () , old_name . into () , name . into () , theme_type . into ()) ; } } # [doc = "Renames the constant at `old_name` to `name` if the theme has `theme_type`. If `name` is already taken, this method fails."] # [doc = ""] # [inline] pub fn rename_constant (& self , old_name : impl Into < GodotString > , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . rename_constant ; let ret = crate :: icalls :: icallvar__str_str_str (method_bind , self . this . sys () . as_ptr () , old_name . into () , name . into () , theme_type . into ()) ; } } # [doc = "Renames the [`Font`][Font] at `old_name` to `name` if the theme has `theme_type`. If `name` is already taken, this method fails."] # [doc = ""] # [inline] pub fn rename_font (& self , old_name : impl Into < GodotString > , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . rename_font ; let ret = crate :: icalls :: icallvar__str_str_str (method_bind , self . this . sys () . as_ptr () , old_name . into () , name . into () , theme_type . into ()) ; } } # [doc = "Renames the icon at `old_name` to `name` if the theme has `theme_type`. If `name` is already taken, this method fails."] # [doc = ""] # [inline] pub fn rename_icon (& self , old_name : impl Into < GodotString > , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . rename_icon ; let ret = crate :: icalls :: icallvar__str_str_str (method_bind , self . this . sys () . as_ptr () , old_name . into () , name . into () , theme_type . into ()) ; } } # [doc = "Renames [`StyleBox`][StyleBox] at `old_name` to `name` if the theme has `theme_type`. If `name` is already taken, this method fails."] # [doc = ""] # [inline] pub fn rename_stylebox (& self , old_name : impl Into < GodotString > , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . rename_stylebox ; let ret = crate :: icalls :: icallvar__str_str_str (method_bind , self . this . sys () . as_ptr () , old_name . into () , name . into () , theme_type . into ()) ; } } # [doc = "Renames the theme item of `data_type` at `old_name` to `name` if the theme has `theme_type`. If `name` is already taken, this method fails."] # [doc = ""] # [inline] pub fn rename_theme_item (& self , data_type : i64 , old_name : impl Into < GodotString > , name : impl Into < GodotString > , theme_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . rename_theme_item ; let ret = crate :: icalls :: icallvar__i64_str_str_str (method_bind , self . this . sys () . as_ptr () , data_type as _ , old_name . into () , name . into () , theme_type . into ()) ; } } # [doc = "Sets the theme's [`Color`][Color] to `color` at `name` in `theme_type`.\nCreates `theme_type` if the theme does not have it."] # [doc = ""] # [inline] pub fn set_color (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString > , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . set_color ; let ret = crate :: icalls :: icallvar__str_str_color (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into () , color) ; } } # [doc = "Sets the theme's constant to `constant` at `name` in `theme_type`.\nCreates `theme_type` if the theme does not have it."] # [doc = ""] # [inline] pub fn set_constant (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString > , constant : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . set_constant ; let ret = crate :: icalls :: icallvar__str_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into () , constant as _) ; } } # [doc = "The default font of this [`Theme`][Theme] resource. Used as a fallback value for font items defined in this theme, but having invalid values. If this value is also invalid, the global default value is used.\nUse [`has_default_font`][Self::has_default_font] to check if this value is valid."] # [doc = ""] # [inline] pub fn set_default_font (& self , font : impl AsArg < crate :: generated :: Font >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . set_default_font ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , font . as_arg_ptr ()) ; } } # [doc = "Sets the theme's [`Font`][Font] to `font` at `name` in `theme_type`.\nCreates `theme_type` if the theme does not have it."] # [doc = ""] # [inline] pub fn set_font (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString > , font : impl AsArg < crate :: generated :: Font >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . set_font ; let ret = crate :: icalls :: icallvar__str_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into () , font . as_arg_ptr ()) ; } } # [doc = "Sets the theme's icon [`Texture`][Texture] to `texture` at `name` in `theme_type`.\nCreates `theme_type` if the theme does not have it."] # [doc = ""] # [inline] pub fn set_icon (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString > , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . set_icon ; let ret = crate :: icalls :: icallvar__str_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into () , texture . as_arg_ptr ()) ; } } # [doc = "Sets theme's [`StyleBox`][StyleBox] to `stylebox` at `name` in `theme_type`.\nCreates `theme_type` if the theme does not have it."] # [doc = ""] # [inline] pub fn set_stylebox (& self , name : impl Into < GodotString > , theme_type : impl Into < GodotString > , texture : impl AsArg < crate :: generated :: StyleBox >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . set_stylebox ; let ret = crate :: icalls :: icallvar__str_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , theme_type . into () , texture . as_arg_ptr ()) ; } } # [doc = "Sets the theme item of `data_type` to `value` at `name` in `theme_type`.\nDoes nothing if the `value` type does not match `data_type`.\nCreates `theme_type` if the theme does not have it."] # [doc = ""] # [inline] pub fn set_theme_item (& self , data_type : i64 , name : impl Into < GodotString > , theme_type : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . set_theme_item ; let ret = crate :: icalls :: icallvar__i64_str_str_var (method_bind , self . this . sys () . as_ptr () , data_type as _ , name . into () , theme_type . into () , value . owned_to_variant ()) ; } } # [doc = "Marks `theme_type` as a variation of `base_type`.\nThis adds `theme_type` as a suggested option for [`Control.theme_type_variation`][Control::theme_type_variation] on a [`Control`][Control] that is of the `base_type` class.\nVariations can also be nested, i.e. `base_type` can be another variation. If a chain of variations ends with a `base_type` matching the class of the [`Control`][Control], the whole chain is going to be suggested as options.\n**Note:** Suggestions only show up if this theme resource is set as the project default theme. See [member ProjectSettings.gui/theme/custom]."] # [doc = ""] # [inline] pub fn set_type_variation (& self , theme_type : impl Into < GodotString > , base_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ThemeMethodTable :: get (get_api ()) . set_type_variation ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , theme_type . into () , base_type . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Theme { } unsafe impl GodotObject for Theme { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Theme" } } impl std :: ops :: Deref for Theme { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Theme { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Theme { } unsafe impl SubClass < crate :: generated :: Reference > for Theme { } unsafe impl SubClass < crate :: generated :: Object > for Theme { } impl Instanciable for Theme { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Theme :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ThemeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_type : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub clear_color : * mut sys :: godot_method_bind , pub clear_constant : * mut sys :: godot_method_bind , pub clear_font : * mut sys :: godot_method_bind , pub clear_icon : * mut sys :: godot_method_bind , pub clear_stylebox : * mut sys :: godot_method_bind , pub clear_theme_item : * mut sys :: godot_method_bind , pub clear_type_variation : * mut sys :: godot_method_bind , pub copy_default_theme : * mut sys :: godot_method_bind , pub copy_theme : * mut sys :: godot_method_bind , pub get_color : * mut sys :: godot_method_bind , pub get_color_list : * mut sys :: godot_method_bind , pub get_color_types : * mut sys :: godot_method_bind , pub get_constant : * mut sys :: godot_method_bind , pub get_constant_list : * mut sys :: godot_method_bind , pub get_constant_types : * mut sys :: godot_method_bind , pub get_default_font : * mut sys :: godot_method_bind , pub get_font : * mut sys :: godot_method_bind , pub get_font_list : * mut sys :: godot_method_bind , pub get_font_types : * mut sys :: godot_method_bind , pub get_icon : * mut sys :: godot_method_bind , pub get_icon_list : * mut sys :: godot_method_bind , pub get_icon_types : * mut sys :: godot_method_bind , pub get_stylebox : * mut sys :: godot_method_bind , pub get_stylebox_list : * mut sys :: godot_method_bind , pub get_stylebox_types : * mut sys :: godot_method_bind , pub get_theme_item : * mut sys :: godot_method_bind , pub get_theme_item_list : * mut sys :: godot_method_bind , pub get_theme_item_types : * mut sys :: godot_method_bind , pub get_type_list : * mut sys :: godot_method_bind , pub get_type_variation_base : * mut sys :: godot_method_bind , pub get_type_variation_list : * mut sys :: godot_method_bind , pub has_color : * mut sys :: godot_method_bind , pub has_constant : * mut sys :: godot_method_bind , pub has_default_font : * mut sys :: godot_method_bind , pub has_font : * mut sys :: godot_method_bind , pub has_icon : * mut sys :: godot_method_bind , pub has_stylebox : * mut sys :: godot_method_bind , pub has_theme_item : * mut sys :: godot_method_bind , pub is_type_variation : * mut sys :: godot_method_bind , pub merge_with : * mut sys :: godot_method_bind , pub remove_type : * mut sys :: godot_method_bind , pub rename_color : * mut sys :: godot_method_bind , pub rename_constant : * mut sys :: godot_method_bind , pub rename_font : * mut sys :: godot_method_bind , pub rename_icon : * mut sys :: godot_method_bind , pub rename_stylebox : * mut sys :: godot_method_bind , pub rename_theme_item : * mut sys :: godot_method_bind , pub set_color : * mut sys :: godot_method_bind , pub set_constant : * mut sys :: godot_method_bind , pub set_default_font : * mut sys :: godot_method_bind , pub set_font : * mut sys :: godot_method_bind , pub set_icon : * mut sys :: godot_method_bind , pub set_stylebox : * mut sys :: godot_method_bind , pub set_theme_item : * mut sys :: godot_method_bind , pub set_type_variation : * mut sys :: godot_method_bind } impl ThemeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ThemeMethodTable = ThemeMethodTable { class_constructor : None , add_type : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , clear_color : 0 as * mut sys :: godot_method_bind , clear_constant : 0 as * mut sys :: godot_method_bind , clear_font : 0 as * mut sys :: godot_method_bind , clear_icon : 0 as * mut sys :: godot_method_bind , clear_stylebox : 0 as * mut sys :: godot_method_bind , clear_theme_item : 0 as * mut sys :: godot_method_bind , clear_type_variation : 0 as * mut sys :: godot_method_bind , copy_default_theme : 0 as * mut sys :: godot_method_bind , copy_theme : 0 as * mut sys :: godot_method_bind , get_color : 0 as * mut sys :: godot_method_bind , get_color_list : 0 as * mut sys :: godot_method_bind , get_color_types : 0 as * mut sys :: godot_method_bind , get_constant : 0 as * mut sys :: godot_method_bind , get_constant_list : 0 as * mut sys :: godot_method_bind , get_constant_types : 0 as * mut sys :: godot_method_bind , get_default_font : 0 as * mut sys :: godot_method_bind , get_font : 0 as * mut sys :: godot_method_bind , get_font_list : 0 as * mut sys :: godot_method_bind , get_font_types : 0 as * mut sys :: godot_method_bind , get_icon : 0 as * mut sys :: godot_method_bind , get_icon_list : 0 as * mut sys :: godot_method_bind , get_icon_types : 0 as * mut sys :: godot_method_bind , get_stylebox : 0 as * mut sys :: godot_method_bind , get_stylebox_list : 0 as * mut sys :: godot_method_bind , get_stylebox_types : 0 as * mut sys :: godot_method_bind , get_theme_item : 0 as * mut sys :: godot_method_bind , get_theme_item_list : 0 as * mut sys :: godot_method_bind , get_theme_item_types : 0 as * mut sys :: godot_method_bind , get_type_list : 0 as * mut sys :: godot_method_bind , get_type_variation_base : 0 as * mut sys :: godot_method_bind , get_type_variation_list : 0 as * mut sys :: godot_method_bind , has_color : 0 as * mut sys :: godot_method_bind , has_constant : 0 as * mut sys :: godot_method_bind , has_default_font : 0 as * mut sys :: godot_method_bind , has_font : 0 as * mut sys :: godot_method_bind , has_icon : 0 as * mut sys :: godot_method_bind , has_stylebox : 0 as * mut sys :: godot_method_bind , has_theme_item : 0 as * mut sys :: godot_method_bind , is_type_variation : 0 as * mut sys :: godot_method_bind , merge_with : 0 as * mut sys :: godot_method_bind , remove_type : 0 as * mut sys :: godot_method_bind , rename_color : 0 as * mut sys :: godot_method_bind , rename_constant : 0 as * mut sys :: godot_method_bind , rename_font : 0 as * mut sys :: godot_method_bind , rename_icon : 0 as * mut sys :: godot_method_bind , rename_stylebox : 0 as * mut sys :: godot_method_bind , rename_theme_item : 0 as * mut sys :: godot_method_bind , set_color : 0 as * mut sys :: godot_method_bind , set_constant : 0 as * mut sys :: godot_method_bind , set_default_font : 0 as * mut sys :: godot_method_bind , set_font : 0 as * mut sys :: godot_method_bind , set_icon : 0 as * mut sys :: godot_method_bind , set_stylebox : 0 as * mut sys :: godot_method_bind , set_theme_item : 0 as * mut sys :: godot_method_bind , set_type_variation : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ThemeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Theme\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_type = (gd_api . godot_method_bind_get_method) (class_name , "add_type\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . clear_color = (gd_api . godot_method_bind_get_method) (class_name , "clear_color\0" . as_ptr () as * const c_char) ; table . clear_constant = (gd_api . godot_method_bind_get_method) (class_name , "clear_constant\0" . as_ptr () as * const c_char) ; table . clear_font = (gd_api . godot_method_bind_get_method) (class_name , "clear_font\0" . as_ptr () as * const c_char) ; table . clear_icon = (gd_api . godot_method_bind_get_method) (class_name , "clear_icon\0" . as_ptr () as * const c_char) ; table . clear_stylebox = (gd_api . godot_method_bind_get_method) (class_name , "clear_stylebox\0" . as_ptr () as * const c_char) ; table . clear_theme_item = (gd_api . godot_method_bind_get_method) (class_name , "clear_theme_item\0" . as_ptr () as * const c_char) ; table . clear_type_variation = (gd_api . godot_method_bind_get_method) (class_name , "clear_type_variation\0" . as_ptr () as * const c_char) ; table . copy_default_theme = (gd_api . godot_method_bind_get_method) (class_name , "copy_default_theme\0" . as_ptr () as * const c_char) ; table . copy_theme = (gd_api . godot_method_bind_get_method) (class_name , "copy_theme\0" . as_ptr () as * const c_char) ; table . get_color = (gd_api . godot_method_bind_get_method) (class_name , "get_color\0" . as_ptr () as * const c_char) ; table . get_color_list = (gd_api . godot_method_bind_get_method) (class_name , "get_color_list\0" . as_ptr () as * const c_char) ; table . get_color_types = (gd_api . godot_method_bind_get_method) (class_name , "get_color_types\0" . as_ptr () as * const c_char) ; table . get_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_constant\0" . as_ptr () as * const c_char) ; table . get_constant_list = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_list\0" . as_ptr () as * const c_char) ; table . get_constant_types = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_types\0" . as_ptr () as * const c_char) ; table . get_default_font = (gd_api . godot_method_bind_get_method) (class_name , "get_default_font\0" . as_ptr () as * const c_char) ; table . get_font = (gd_api . godot_method_bind_get_method) (class_name , "get_font\0" . as_ptr () as * const c_char) ; table . get_font_list = (gd_api . godot_method_bind_get_method) (class_name , "get_font_list\0" . as_ptr () as * const c_char) ; table . get_font_types = (gd_api . godot_method_bind_get_method) (class_name , "get_font_types\0" . as_ptr () as * const c_char) ; table . get_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_icon\0" . as_ptr () as * const c_char) ; table . get_icon_list = (gd_api . godot_method_bind_get_method) (class_name , "get_icon_list\0" . as_ptr () as * const c_char) ; table . get_icon_types = (gd_api . godot_method_bind_get_method) (class_name , "get_icon_types\0" . as_ptr () as * const c_char) ; table . get_stylebox = (gd_api . godot_method_bind_get_method) (class_name , "get_stylebox\0" . as_ptr () as * const c_char) ; table . get_stylebox_list = (gd_api . godot_method_bind_get_method) (class_name , "get_stylebox_list\0" . as_ptr () as * const c_char) ; table . get_stylebox_types = (gd_api . godot_method_bind_get_method) (class_name , "get_stylebox_types\0" . as_ptr () as * const c_char) ; table . get_theme_item = (gd_api . godot_method_bind_get_method) (class_name , "get_theme_item\0" . as_ptr () as * const c_char) ; table . get_theme_item_list = (gd_api . godot_method_bind_get_method) (class_name , "get_theme_item_list\0" . as_ptr () as * const c_char) ; table . get_theme_item_types = (gd_api . godot_method_bind_get_method) (class_name , "get_theme_item_types\0" . as_ptr () as * const c_char) ; table . get_type_list = (gd_api . godot_method_bind_get_method) (class_name , "get_type_list\0" . as_ptr () as * const c_char) ; table . get_type_variation_base = (gd_api . godot_method_bind_get_method) (class_name , "get_type_variation_base\0" . as_ptr () as * const c_char) ; table . get_type_variation_list = (gd_api . godot_method_bind_get_method) (class_name , "get_type_variation_list\0" . as_ptr () as * const c_char) ; table . has_color = (gd_api . godot_method_bind_get_method) (class_name , "has_color\0" . as_ptr () as * const c_char) ; table . has_constant = (gd_api . godot_method_bind_get_method) (class_name , "has_constant\0" . as_ptr () as * const c_char) ; table . has_default_font = (gd_api . godot_method_bind_get_method) (class_name , "has_default_font\0" . as_ptr () as * const c_char) ; table . has_font = (gd_api . godot_method_bind_get_method) (class_name , "has_font\0" . as_ptr () as * const c_char) ; table . has_icon = (gd_api . godot_method_bind_get_method) (class_name , "has_icon\0" . as_ptr () as * const c_char) ; table . has_stylebox = (gd_api . godot_method_bind_get_method) (class_name , "has_stylebox\0" . as_ptr () as * const c_char) ; table . has_theme_item = (gd_api . godot_method_bind_get_method) (class_name , "has_theme_item\0" . as_ptr () as * const c_char) ; table . is_type_variation = (gd_api . godot_method_bind_get_method) (class_name , "is_type_variation\0" . as_ptr () as * const c_char) ; table . merge_with = (gd_api . godot_method_bind_get_method) (class_name , "merge_with\0" . as_ptr () as * const c_char) ; table . remove_type = (gd_api . godot_method_bind_get_method) (class_name , "remove_type\0" . as_ptr () as * const c_char) ; table . rename_color = (gd_api . godot_method_bind_get_method) (class_name , "rename_color\0" . as_ptr () as * const c_char) ; table . rename_constant = (gd_api . godot_method_bind_get_method) (class_name , "rename_constant\0" . as_ptr () as * const c_char) ; table . rename_font = (gd_api . godot_method_bind_get_method) (class_name , "rename_font\0" . as_ptr () as * const c_char) ; table . rename_icon = (gd_api . godot_method_bind_get_method) (class_name , "rename_icon\0" . as_ptr () as * const c_char) ; table . rename_stylebox = (gd_api . godot_method_bind_get_method) (class_name , "rename_stylebox\0" . as_ptr () as * const c_char) ; table . rename_theme_item = (gd_api . godot_method_bind_get_method) (class_name , "rename_theme_item\0" . as_ptr () as * const c_char) ; table . set_color = (gd_api . godot_method_bind_get_method) (class_name , "set_color\0" . as_ptr () as * const c_char) ; table . set_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_constant\0" . as_ptr () as * const c_char) ; table . set_default_font = (gd_api . godot_method_bind_get_method) (class_name , "set_default_font\0" . as_ptr () as * const c_char) ; table . set_font = (gd_api . godot_method_bind_get_method) (class_name , "set_font\0" . as_ptr () as * const c_char) ; table . set_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_icon\0" . as_ptr () as * const c_char) ; table . set_stylebox = (gd_api . godot_method_bind_get_method) (class_name , "set_stylebox\0" . as_ptr () as * const c_char) ; table . set_theme_item = (gd_api . godot_method_bind_get_method) (class_name , "set_theme_item\0" . as_ptr () as * const c_char) ; table . set_type_variation = (gd_api . godot_method_bind_get_method) (class_name , "set_type_variation\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::theme::private::Theme;
            
            pub mod tile_map {
                # ! [doc = "This module contains types related to the API class [`TileMap`][super::TileMap]."] pub (crate) mod private { # [doc = "`core class TileMap` inherits `Node2D` (manually managed).\n\nThis class has related types in the [`tile_map`][super::tile_map] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_tilemap.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`TileMap` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<TileMap>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nTileMap inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TileMap { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TileMap ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct HalfOffset (pub i64) ; impl HalfOffset { pub const X : HalfOffset = HalfOffset (0i64) ; pub const Y : HalfOffset = HalfOffset (1i64) ; pub const DISABLED : HalfOffset = HalfOffset (2i64) ; pub const NEGATIVE_X : HalfOffset = HalfOffset (3i64) ; pub const NEGATIVE_Y : HalfOffset = HalfOffset (4i64) ; } impl From < i64 > for HalfOffset { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < HalfOffset > for i64 { # [inline] fn from (v : HalfOffset) -> Self { v . 0 } } impl FromVariant for HalfOffset { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const SQUARE : Mode = Mode (0i64) ; pub const ISOMETRIC : Mode = Mode (1i64) ; pub const CUSTOM : Mode = Mode (2i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } impl FromVariant for Mode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TileOrigin (pub i64) ; impl TileOrigin { pub const TOP_LEFT : TileOrigin = TileOrigin (0i64) ; pub const CENTER : TileOrigin = TileOrigin (1i64) ; pub const BOTTOM_LEFT : TileOrigin = TileOrigin (2i64) ; } impl From < i64 > for TileOrigin { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TileOrigin > for i64 { # [inline] fn from (v : TileOrigin) -> Self { v . 0 } } impl FromVariant for TileOrigin { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TileMap { pub const INVALID_CELL : i64 = - 1i64 ; pub const HALF_OFFSET_X : i64 = 0i64 ; pub const MODE_SQUARE : i64 = 0i64 ; pub const TILE_ORIGIN_TOP_LEFT : i64 = 0i64 ; pub const HALF_OFFSET_Y : i64 = 1i64 ; pub const MODE_ISOMETRIC : i64 = 1i64 ; pub const TILE_ORIGIN_CENTER : i64 = 1i64 ; pub const HALF_OFFSET_DISABLED : i64 = 2i64 ; pub const MODE_CUSTOM : i64 = 2i64 ; pub const TILE_ORIGIN_BOTTOM_LEFT : i64 = 2i64 ; pub const HALF_OFFSET_NEGATIVE_X : i64 = 3i64 ; pub const HALF_OFFSET_NEGATIVE_Y : i64 = 4i64 ; } impl TileMap { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TileMapMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Clears all cells."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Clears cells that do not exist in the tileset."] # [doc = ""] # [inline] pub fn fix_invalid_tiles (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . fix_invalid_tiles ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the tile index of the given cell. If no tile exists in the cell, returns [`INVALID_CELL`][Self::INVALID_CELL]."] # [doc = ""] # [inline] pub fn get_cell (& self , x : i64 , y : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_cell ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , x as _ , y as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the coordinate (subtile column and row) of the autotile variation in the tileset. Returns a zero vector if the cell doesn't have autotiling."] # [doc = ""] # [inline] pub fn get_cell_autotile_coord (& self , x : i64 , y : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_cell_autotile_coord ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , x as _ , y as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The TileMap's cell size."] # [doc = ""] # [inline] pub fn cell_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_cell_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tile index of the cell given by a Vector2. If no tile exists in the cell, returns [`INVALID_CELL`][Self::INVALID_CELL]."] # [doc = ""] # [inline] pub fn get_cellv (& self , position : Vector2) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_cellv ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the cell's UVs will be clipped."] # [doc = ""] # [inline] pub fn clip_uv (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_clip_uv ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Bounce value for static body collisions (see `collision_use_kinematic`)."] # [doc = ""] # [inline] pub fn collision_bounce (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_bounce ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Friction value for static body collisions (see `collision_use_kinematic`)."] # [doc = ""] # [inline] pub fn collision_friction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_friction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The collision layer(s) for all colliders in the TileMap. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_layer (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_layer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given collision layer bit is set."] # [doc = ""] # [inline] pub fn get_collision_layer_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_layer_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The collision mask(s) for all colliders in the TileMap. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn collision_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given collision mask bit is set."] # [doc = ""] # [inline] pub fn get_collision_mask_bit (& self , bit : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , bit as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, TileMap collisions will be handled as a kinematic body. If `false`, collisions will be handled as static body."] # [doc = ""] # [inline] pub fn collision_use_kinematic (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_use_kinematic ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, this tilemap's collision shape will be added to the collision shape of the parent. The parent has to be a [`CollisionObject2D`][CollisionObject2D]."] # [doc = ""] # [inline] pub fn collision_use_parent (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_collision_use_parent ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The custom [`Transform2D`][Transform2D] to be applied to the TileMap's cells."] # [doc = ""] # [inline] pub fn custom_transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_custom_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Amount to offset alternating tiles. See [`HalfOffset`][HalfOffset] for possible values."] # [doc = ""] # [inline] pub fn half_offset (& self) -> crate :: generated :: tile_map :: HalfOffset { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_half_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: tile_map :: HalfOffset > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The TileMap orientation mode. See [`Mode`][Mode] for possible values."] # [doc = ""] # [inline] pub fn mode (& self) -> crate :: generated :: tile_map :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: tile_map :: Mode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The navigation layers the TileMap generates its navigation regions in."] # [doc = ""] # [inline] pub fn navigation_layers (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_navigation_layers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s)."] # [doc = ""] # [inline] pub fn occluder_light_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_occluder_light_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size."] # [doc = ""] # [inline] pub fn quadrant_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_quadrant_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Position for tile origin. See [`TileOrigin`][TileOrigin] for possible values."] # [doc = ""] # [inline] pub fn tile_origin (& self) -> crate :: generated :: tile_map :: TileOrigin { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_tile_origin ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: tile_map :: TileOrigin > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The assigned [`TileSet`][TileSet]."] # [doc = ""] # [inline] pub fn tileset (& self) -> Option < Ref < crate :: generated :: TileSet , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_tileset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: TileSet , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a [`Vector2`][Vector2] array with the positions of all cells containing a tile from the tileset (i.e. a tile index different from `-1`)."] # [doc = ""] # [inline] pub fn get_used_cells (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_used_cells ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array of all cells with the given tile index specified in `id`."] # [doc = ""] # [inline] pub fn get_used_cells_by_id (& self , id : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_used_cells_by_id ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a rectangle enclosing the used (non-empty) tiles of the map."] # [doc = ""] # [inline] pub fn get_used_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . get_used_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, this TileMap bakes a navigation region."] # [doc = ""] # [inline] pub fn is_baking_navigation (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . is_baking_navigation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given cell is transposed, i.e. the X and Y axes are swapped."] # [doc = ""] # [inline] pub fn is_cell_transposed (& self , x : i64 , y : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . is_cell_transposed ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , x as _ , y as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given cell is flipped in the X axis."] # [doc = ""] # [inline] pub fn is_cell_x_flipped (& self , x : i64 , y : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . is_cell_x_flipped ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , x as _ , y as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given cell is flipped in the Y axis."] # [doc = ""] # [inline] pub fn is_cell_y_flipped (& self , x : i64 , y : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . is_cell_y_flipped ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , x as _ , y as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the textures will be centered in the middle of each tile. This is useful for certain isometric or top-down modes when textures are made larger or smaller than the tiles (e.g. to avoid flickering on tile edges). The offset is still applied, but from the center of the tile. If used, [`compatibility_mode`][Self::compatibility_mode] is ignored.\nIf `false`, the texture position start in the top-left corner unless [`compatibility_mode`][Self::compatibility_mode] is enabled."] # [doc = ""] # [inline] pub fn is_centered_textures_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . is_centered_textures_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the compatibility with the tilemaps made in Godot 3.1 or earlier is maintained (textures move when the tile origin changes and rotate if the texture size is not homogeneous). This mode presents problems when doing `flip_h`, `flip_v` and `transpose` tile operations on non-homogeneous isometric tiles (e.g. 2:1), in which the texture could not coincide with the collision, thus it is not recommended for isometric or non-square tiles.\nIf `false`, the textures do not move when doing `flip_h`, `flip_v` operations if no offset is used, nor when changing the tile origin.\nThe compatibility mode doesn't work with the [`centered_textures`][Self::centered_textures] option, because displacing textures with the [`cell_tile_origin`][Self::cell_tile_origin] option or in irregular tiles is not relevant when centering those textures."] # [doc = ""] # [inline] pub fn is_compatibility_mode_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . is_compatibility_mode_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, collision shapes are visible in the editor. Doesn't affect collision shapes visibility at runtime. To show collision shapes at runtime, enable **Visible Collision Shapes** in the **Debug** menu instead."] # [doc = ""] # [inline] pub fn is_show_collision_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . is_show_collision_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the TileMap's direct children will be drawn in order of their Y coordinate."] # [doc = ""] # [inline] pub fn is_y_sort_mode_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . is_y_sort_mode_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the local position of the top left corner of the cell corresponding to the given tilemap (grid-based) coordinates.\nTo get the global position, use [`Node2D.to_global`][Node2D::to_global]:\n```gdscript\nvar local_position = my_tilemap.map_to_world(map_position)\nvar global_position = my_tilemap.to_global(local_position)\n```\nOptionally, the tilemap's half offset can be ignored.\n# Default Arguments\n* `ignore_half_ofs` - `false`"] # [doc = ""] # [inline] pub fn map_to_world (& self , map_position : Vector2 , ignore_half_ofs : bool) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . map_to_world ; let ret = crate :: icalls :: icallvar__vec2_bool (method_bind , self . this . sys () . as_ptr () , map_position , ignore_half_ofs as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, this TileMap bakes a navigation region."] # [doc = ""] # [inline] pub fn set_bake_navigation (& self , bake_navigation : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_bake_navigation ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , bake_navigation as _) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets the tile index for the given cell.\nAn index of `-1` clears the cell.\nOptionally, the tile can also be flipped, transposed, or given autotile coordinates. The autotile coordinate refers to the column and row of the subtile.\n**Note:** Data such as navigation polygons and collision shapes are not immediately updated for performance reasons.\nIf you need these to be immediately updated, you can call [`update_dirty_quadrants`][Self::update_dirty_quadrants].\nOverriding this method also overrides it internally, allowing custom logic to be implemented when tiles are placed/removed:\n```gdscript\nfunc set_cell(x, y, tile, flip_x=false, flip_y=false, transpose=false, autotile_coord=Vector2()):\n    # Write your custom logic here.\n    # To call the default method:\n    .set_cell(x, y, tile, flip_x, flip_y, transpose, autotile_coord)\n```\n# Default Arguments\n* `flip_x` - `false`\n* `flip_y` - `false`\n* `transpose` - `false`\n* `autotile_coord` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn set_cell (& self , x : i64 , y : i64 , tile : i64 , flip_x : bool , flip_y : bool , transpose : bool , autotile_coord : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_cell ; let ret = crate :: icalls :: icallvar__i64_i64_i64_bool_bool_bool_vec2 (method_bind , self . this . sys () . as_ptr () , x as _ , y as _ , tile as _ , flip_x as _ , flip_y as _ , transpose as _ , autotile_coord) ; } } # [doc = "The TileMap's cell size."] # [doc = ""] # [inline] pub fn set_cell_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_cell_size ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Sets the tile index for the cell given by a Vector2.\nAn index of `-1` clears the cell.\nOptionally, the tile can also be flipped, transposed, or given autotile coordinates. The autotile coordinate refers to the column and row of the subtile.\n**Note:** Data such as navigation polygons and collision shapes are not immediately updated for performance reasons.\nIf you need these to be immediately updated, you can call [`update_dirty_quadrants`][Self::update_dirty_quadrants].\n# Default Arguments\n* `flip_x` - `false`\n* `flip_y` - `false`\n* `transpose` - `false`\n* `autotile_coord` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn set_cellv (& self , position : Vector2 , tile : i64 , flip_x : bool , flip_y : bool , transpose : bool , autotile_coord : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_cellv ; let ret = crate :: icalls :: icallvar__vec2_i64_bool_bool_bool_vec2 (method_bind , self . this . sys () . as_ptr () , position , tile as _ , flip_x as _ , flip_y as _ , transpose as _ , autotile_coord) ; } } # [doc = "If `true`, the textures will be centered in the middle of each tile. This is useful for certain isometric or top-down modes when textures are made larger or smaller than the tiles (e.g. to avoid flickering on tile edges). The offset is still applied, but from the center of the tile. If used, [`compatibility_mode`][Self::compatibility_mode] is ignored.\nIf `false`, the texture position start in the top-left corner unless [`compatibility_mode`][Self::compatibility_mode] is enabled."] # [doc = ""] # [inline] pub fn set_centered_textures (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_centered_textures ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the cell's UVs will be clipped."] # [doc = ""] # [inline] pub fn set_clip_uv (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_clip_uv ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Bounce value for static body collisions (see `collision_use_kinematic`)."] # [doc = ""] # [inline] pub fn set_collision_bounce (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_bounce ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Friction value for static body collisions (see `collision_use_kinematic`)."] # [doc = ""] # [inline] pub fn set_collision_friction (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_friction ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "The collision layer(s) for all colliders in the TileMap. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_layer (& self , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_layer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , layer as _) ; } } # [doc = "Sets the given collision layer bit."] # [doc = ""] # [inline] pub fn set_collision_layer_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_layer_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = "The collision mask(s) for all colliders in the TileMap. See [Collision layers and masks](https://docs.godotengine.org/en/3.5.1/tutorials/physics/physics_introduction.html#collision-layers-and-masks) in the documentation for more information."] # [doc = ""] # [inline] pub fn set_collision_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "Sets the given collision mask bit."] # [doc = ""] # [inline] pub fn set_collision_mask_bit (& self , bit : i64 , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_mask_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , bit as _ , value as _) ; } } # [doc = "If `true`, TileMap collisions will be handled as a kinematic body. If `false`, collisions will be handled as static body."] # [doc = ""] # [inline] pub fn set_collision_use_kinematic (& self , use_kinematic : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_use_kinematic ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , use_kinematic as _) ; } } # [doc = "If `true`, this tilemap's collision shape will be added to the collision shape of the parent. The parent has to be a [`CollisionObject2D`][CollisionObject2D]."] # [doc = ""] # [inline] pub fn set_collision_use_parent (& self , use_parent : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_collision_use_parent ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , use_parent as _) ; } } # [doc = "If `true`, the compatibility with the tilemaps made in Godot 3.1 or earlier is maintained (textures move when the tile origin changes and rotate if the texture size is not homogeneous). This mode presents problems when doing `flip_h`, `flip_v` and `transpose` tile operations on non-homogeneous isometric tiles (e.g. 2:1), in which the texture could not coincide with the collision, thus it is not recommended for isometric or non-square tiles.\nIf `false`, the textures do not move when doing `flip_h`, `flip_v` operations if no offset is used, nor when changing the tile origin.\nThe compatibility mode doesn't work with the [`centered_textures`][Self::centered_textures] option, because displacing textures with the [`cell_tile_origin`][Self::cell_tile_origin] option or in irregular tiles is not relevant when centering those textures."] # [doc = ""] # [inline] pub fn set_compatibility_mode (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_compatibility_mode ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The custom [`Transform2D`][Transform2D] to be applied to the TileMap's cells."] # [doc = ""] # [inline] pub fn set_custom_transform (& self , custom_transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_custom_transform ; let ret = crate :: icalls :: icallvar__trans2D (method_bind , self . this . sys () . as_ptr () , custom_transform) ; } } # [doc = "Amount to offset alternating tiles. See [`HalfOffset`][HalfOffset] for possible values."] # [doc = ""] # [inline] pub fn set_half_offset (& self , half_offset : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_half_offset ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , half_offset as _) ; } } # [doc = "The TileMap orientation mode. See [`Mode`][Mode] for possible values."] # [doc = ""] # [inline] pub fn set_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The navigation layers the TileMap generates its navigation regions in."] # [doc = ""] # [inline] pub fn set_navigation_layers (& self , navigation_layers : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_navigation_layers ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , navigation_layers as _) ; } } # [doc = "The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s)."] # [doc = ""] # [inline] pub fn set_occluder_light_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_occluder_light_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size."] # [doc = ""] # [inline] pub fn set_quadrant_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_quadrant_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } # [doc = "If `true`, collision shapes are visible in the editor. Doesn't affect collision shapes visibility at runtime. To show collision shapes at runtime, enable **Visible Collision Shapes** in the **Debug** menu instead."] # [doc = ""] # [inline] pub fn set_show_collision (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_show_collision ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Position for tile origin. See [`TileOrigin`][TileOrigin] for possible values."] # [doc = ""] # [inline] pub fn set_tile_origin (& self , origin : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_tile_origin ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , origin as _) ; } } # [doc = "The assigned [`TileSet`][TileSet]."] # [doc = ""] # [inline] pub fn set_tileset (& self , tileset : impl AsArg < crate :: generated :: TileSet >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_tileset ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , tileset . as_arg_ptr ()) ; } } # [doc = "If `true`, the TileMap's direct children will be drawn in order of their Y coordinate."] # [doc = ""] # [inline] pub fn set_y_sort_mode (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . set_y_sort_mode ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Applies autotiling rules to the cell (and its adjacent cells) referenced by its grid-based X and Y coordinates."] # [doc = ""] # [inline] pub fn update_bitmask_area (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . update_bitmask_area ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "Applies autotiling rules to the cells in the given region (specified by grid-based X and Y coordinates).\nCalling with invalid (or missing) parameters applies autotiling rules for the entire tilemap.\n# Default Arguments\n* `start` - `Vector2( 0, 0 )`\n* `end` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn update_bitmask_region (& self , start : Vector2 , end : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . update_bitmask_region ; let ret = crate :: icalls :: icallvar__vec2_vec2 (method_bind , self . this . sys () . as_ptr () , start , end) ; } } # [doc = "Updates the tile map's quadrants, allowing things such as navigation and collision shapes to be immediately used if modified."] # [doc = ""] # [inline] pub fn update_dirty_quadrants (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . update_dirty_quadrants ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the tilemap (grid-based) coordinates corresponding to the given local position.\nTo use this with a global position, first determine the local position with [`Node2D.to_local`][Node2D::to_local]:\n```gdscript\nvar local_position = my_tilemap.to_local(global_position)\nvar map_position = my_tilemap.world_to_map(local_position)\n```"] # [doc = ""] # [inline] pub fn world_to_map (& self , world_position : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileMapMethodTable :: get (get_api ()) . world_to_map ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , world_position) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for TileMap { } unsafe impl GodotObject for TileMap { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "TileMap" } } impl QueueFree for TileMap { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for TileMap { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TileMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for TileMap { } unsafe impl SubClass < crate :: generated :: CanvasItem > for TileMap { } unsafe impl SubClass < crate :: generated :: Node > for TileMap { } unsafe impl SubClass < crate :: generated :: Object > for TileMap { } impl Instanciable for TileMap { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { TileMap :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TileMapMethodTable { pub class_constructor : sys :: godot_class_constructor , pub clear : * mut sys :: godot_method_bind , pub fix_invalid_tiles : * mut sys :: godot_method_bind , pub get_cell : * mut sys :: godot_method_bind , pub get_cell_autotile_coord : * mut sys :: godot_method_bind , pub get_cell_size : * mut sys :: godot_method_bind , pub get_cellv : * mut sys :: godot_method_bind , pub get_clip_uv : * mut sys :: godot_method_bind , pub get_collision_bounce : * mut sys :: godot_method_bind , pub get_collision_friction : * mut sys :: godot_method_bind , pub get_collision_layer : * mut sys :: godot_method_bind , pub get_collision_layer_bit : * mut sys :: godot_method_bind , pub get_collision_mask : * mut sys :: godot_method_bind , pub get_collision_mask_bit : * mut sys :: godot_method_bind , pub get_collision_use_kinematic : * mut sys :: godot_method_bind , pub get_collision_use_parent : * mut sys :: godot_method_bind , pub get_custom_transform : * mut sys :: godot_method_bind , pub get_half_offset : * mut sys :: godot_method_bind , pub get_mode : * mut sys :: godot_method_bind , pub get_navigation_layers : * mut sys :: godot_method_bind , pub get_occluder_light_mask : * mut sys :: godot_method_bind , pub get_quadrant_size : * mut sys :: godot_method_bind , pub get_tile_origin : * mut sys :: godot_method_bind , pub get_tileset : * mut sys :: godot_method_bind , pub get_used_cells : * mut sys :: godot_method_bind , pub get_used_cells_by_id : * mut sys :: godot_method_bind , pub get_used_rect : * mut sys :: godot_method_bind , pub is_baking_navigation : * mut sys :: godot_method_bind , pub is_cell_transposed : * mut sys :: godot_method_bind , pub is_cell_x_flipped : * mut sys :: godot_method_bind , pub is_cell_y_flipped : * mut sys :: godot_method_bind , pub is_centered_textures_enabled : * mut sys :: godot_method_bind , pub is_compatibility_mode_enabled : * mut sys :: godot_method_bind , pub is_show_collision_enabled : * mut sys :: godot_method_bind , pub is_y_sort_mode_enabled : * mut sys :: godot_method_bind , pub map_to_world : * mut sys :: godot_method_bind , pub set_bake_navigation : * mut sys :: godot_method_bind , pub set_cell : * mut sys :: godot_method_bind , pub set_cell_size : * mut sys :: godot_method_bind , pub set_cellv : * mut sys :: godot_method_bind , pub set_centered_textures : * mut sys :: godot_method_bind , pub set_clip_uv : * mut sys :: godot_method_bind , pub set_collision_bounce : * mut sys :: godot_method_bind , pub set_collision_friction : * mut sys :: godot_method_bind , pub set_collision_layer : * mut sys :: godot_method_bind , pub set_collision_layer_bit : * mut sys :: godot_method_bind , pub set_collision_mask : * mut sys :: godot_method_bind , pub set_collision_mask_bit : * mut sys :: godot_method_bind , pub set_collision_use_kinematic : * mut sys :: godot_method_bind , pub set_collision_use_parent : * mut sys :: godot_method_bind , pub set_compatibility_mode : * mut sys :: godot_method_bind , pub set_custom_transform : * mut sys :: godot_method_bind , pub set_half_offset : * mut sys :: godot_method_bind , pub set_mode : * mut sys :: godot_method_bind , pub set_navigation_layers : * mut sys :: godot_method_bind , pub set_occluder_light_mask : * mut sys :: godot_method_bind , pub set_quadrant_size : * mut sys :: godot_method_bind , pub set_show_collision : * mut sys :: godot_method_bind , pub set_tile_origin : * mut sys :: godot_method_bind , pub set_tileset : * mut sys :: godot_method_bind , pub set_y_sort_mode : * mut sys :: godot_method_bind , pub update_bitmask_area : * mut sys :: godot_method_bind , pub update_bitmask_region : * mut sys :: godot_method_bind , pub update_dirty_quadrants : * mut sys :: godot_method_bind , pub world_to_map : * mut sys :: godot_method_bind } impl TileMapMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TileMapMethodTable = TileMapMethodTable { class_constructor : None , clear : 0 as * mut sys :: godot_method_bind , fix_invalid_tiles : 0 as * mut sys :: godot_method_bind , get_cell : 0 as * mut sys :: godot_method_bind , get_cell_autotile_coord : 0 as * mut sys :: godot_method_bind , get_cell_size : 0 as * mut sys :: godot_method_bind , get_cellv : 0 as * mut sys :: godot_method_bind , get_clip_uv : 0 as * mut sys :: godot_method_bind , get_collision_bounce : 0 as * mut sys :: godot_method_bind , get_collision_friction : 0 as * mut sys :: godot_method_bind , get_collision_layer : 0 as * mut sys :: godot_method_bind , get_collision_layer_bit : 0 as * mut sys :: godot_method_bind , get_collision_mask : 0 as * mut sys :: godot_method_bind , get_collision_mask_bit : 0 as * mut sys :: godot_method_bind , get_collision_use_kinematic : 0 as * mut sys :: godot_method_bind , get_collision_use_parent : 0 as * mut sys :: godot_method_bind , get_custom_transform : 0 as * mut sys :: godot_method_bind , get_half_offset : 0 as * mut sys :: godot_method_bind , get_mode : 0 as * mut sys :: godot_method_bind , get_navigation_layers : 0 as * mut sys :: godot_method_bind , get_occluder_light_mask : 0 as * mut sys :: godot_method_bind , get_quadrant_size : 0 as * mut sys :: godot_method_bind , get_tile_origin : 0 as * mut sys :: godot_method_bind , get_tileset : 0 as * mut sys :: godot_method_bind , get_used_cells : 0 as * mut sys :: godot_method_bind , get_used_cells_by_id : 0 as * mut sys :: godot_method_bind , get_used_rect : 0 as * mut sys :: godot_method_bind , is_baking_navigation : 0 as * mut sys :: godot_method_bind , is_cell_transposed : 0 as * mut sys :: godot_method_bind , is_cell_x_flipped : 0 as * mut sys :: godot_method_bind , is_cell_y_flipped : 0 as * mut sys :: godot_method_bind , is_centered_textures_enabled : 0 as * mut sys :: godot_method_bind , is_compatibility_mode_enabled : 0 as * mut sys :: godot_method_bind , is_show_collision_enabled : 0 as * mut sys :: godot_method_bind , is_y_sort_mode_enabled : 0 as * mut sys :: godot_method_bind , map_to_world : 0 as * mut sys :: godot_method_bind , set_bake_navigation : 0 as * mut sys :: godot_method_bind , set_cell : 0 as * mut sys :: godot_method_bind , set_cell_size : 0 as * mut sys :: godot_method_bind , set_cellv : 0 as * mut sys :: godot_method_bind , set_centered_textures : 0 as * mut sys :: godot_method_bind , set_clip_uv : 0 as * mut sys :: godot_method_bind , set_collision_bounce : 0 as * mut sys :: godot_method_bind , set_collision_friction : 0 as * mut sys :: godot_method_bind , set_collision_layer : 0 as * mut sys :: godot_method_bind , set_collision_layer_bit : 0 as * mut sys :: godot_method_bind , set_collision_mask : 0 as * mut sys :: godot_method_bind , set_collision_mask_bit : 0 as * mut sys :: godot_method_bind , set_collision_use_kinematic : 0 as * mut sys :: godot_method_bind , set_collision_use_parent : 0 as * mut sys :: godot_method_bind , set_compatibility_mode : 0 as * mut sys :: godot_method_bind , set_custom_transform : 0 as * mut sys :: godot_method_bind , set_half_offset : 0 as * mut sys :: godot_method_bind , set_mode : 0 as * mut sys :: godot_method_bind , set_navigation_layers : 0 as * mut sys :: godot_method_bind , set_occluder_light_mask : 0 as * mut sys :: godot_method_bind , set_quadrant_size : 0 as * mut sys :: godot_method_bind , set_show_collision : 0 as * mut sys :: godot_method_bind , set_tile_origin : 0 as * mut sys :: godot_method_bind , set_tileset : 0 as * mut sys :: godot_method_bind , set_y_sort_mode : 0 as * mut sys :: godot_method_bind , update_bitmask_area : 0 as * mut sys :: godot_method_bind , update_bitmask_region : 0 as * mut sys :: godot_method_bind , update_dirty_quadrants : 0 as * mut sys :: godot_method_bind , world_to_map : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TileMapMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TileMap\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . fix_invalid_tiles = (gd_api . godot_method_bind_get_method) (class_name , "fix_invalid_tiles\0" . as_ptr () as * const c_char) ; table . get_cell = (gd_api . godot_method_bind_get_method) (class_name , "get_cell\0" . as_ptr () as * const c_char) ; table . get_cell_autotile_coord = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_autotile_coord\0" . as_ptr () as * const c_char) ; table . get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_size\0" . as_ptr () as * const c_char) ; table . get_cellv = (gd_api . godot_method_bind_get_method) (class_name , "get_cellv\0" . as_ptr () as * const c_char) ; table . get_clip_uv = (gd_api . godot_method_bind_get_method) (class_name , "get_clip_uv\0" . as_ptr () as * const c_char) ; table . get_collision_bounce = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_bounce\0" . as_ptr () as * const c_char) ; table . get_collision_friction = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_friction\0" . as_ptr () as * const c_char) ; table . get_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer\0" . as_ptr () as * const c_char) ; table . get_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . get_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask\0" . as_ptr () as * const c_char) ; table . get_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . get_collision_use_kinematic = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_use_kinematic\0" . as_ptr () as * const c_char) ; table . get_collision_use_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_collision_use_parent\0" . as_ptr () as * const c_char) ; table . get_custom_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_transform\0" . as_ptr () as * const c_char) ; table . get_half_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_half_offset\0" . as_ptr () as * const c_char) ; table . get_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_mode\0" . as_ptr () as * const c_char) ; table . get_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_layers\0" . as_ptr () as * const c_char) ; table . get_occluder_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_occluder_light_mask\0" . as_ptr () as * const c_char) ; table . get_quadrant_size = (gd_api . godot_method_bind_get_method) (class_name , "get_quadrant_size\0" . as_ptr () as * const c_char) ; table . get_tile_origin = (gd_api . godot_method_bind_get_method) (class_name , "get_tile_origin\0" . as_ptr () as * const c_char) ; table . get_tileset = (gd_api . godot_method_bind_get_method) (class_name , "get_tileset\0" . as_ptr () as * const c_char) ; table . get_used_cells = (gd_api . godot_method_bind_get_method) (class_name , "get_used_cells\0" . as_ptr () as * const c_char) ; table . get_used_cells_by_id = (gd_api . godot_method_bind_get_method) (class_name , "get_used_cells_by_id\0" . as_ptr () as * const c_char) ; table . get_used_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_used_rect\0" . as_ptr () as * const c_char) ; table . is_baking_navigation = (gd_api . godot_method_bind_get_method) (class_name , "is_baking_navigation\0" . as_ptr () as * const c_char) ; table . is_cell_transposed = (gd_api . godot_method_bind_get_method) (class_name , "is_cell_transposed\0" . as_ptr () as * const c_char) ; table . is_cell_x_flipped = (gd_api . godot_method_bind_get_method) (class_name , "is_cell_x_flipped\0" . as_ptr () as * const c_char) ; table . is_cell_y_flipped = (gd_api . godot_method_bind_get_method) (class_name , "is_cell_y_flipped\0" . as_ptr () as * const c_char) ; table . is_centered_textures_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_centered_textures_enabled\0" . as_ptr () as * const c_char) ; table . is_compatibility_mode_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_compatibility_mode_enabled\0" . as_ptr () as * const c_char) ; table . is_show_collision_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_show_collision_enabled\0" . as_ptr () as * const c_char) ; table . is_y_sort_mode_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_y_sort_mode_enabled\0" . as_ptr () as * const c_char) ; table . map_to_world = (gd_api . godot_method_bind_get_method) (class_name , "map_to_world\0" . as_ptr () as * const c_char) ; table . set_bake_navigation = (gd_api . godot_method_bind_get_method) (class_name , "set_bake_navigation\0" . as_ptr () as * const c_char) ; table . set_cell = (gd_api . godot_method_bind_get_method) (class_name , "set_cell\0" . as_ptr () as * const c_char) ; table . set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_size\0" . as_ptr () as * const c_char) ; table . set_cellv = (gd_api . godot_method_bind_get_method) (class_name , "set_cellv\0" . as_ptr () as * const c_char) ; table . set_centered_textures = (gd_api . godot_method_bind_get_method) (class_name , "set_centered_textures\0" . as_ptr () as * const c_char) ; table . set_clip_uv = (gd_api . godot_method_bind_get_method) (class_name , "set_clip_uv\0" . as_ptr () as * const c_char) ; table . set_collision_bounce = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_bounce\0" . as_ptr () as * const c_char) ; table . set_collision_friction = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_friction\0" . as_ptr () as * const c_char) ; table . set_collision_layer = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer\0" . as_ptr () as * const c_char) ; table . set_collision_layer_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_layer_bit\0" . as_ptr () as * const c_char) ; table . set_collision_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask\0" . as_ptr () as * const c_char) ; table . set_collision_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_mask_bit\0" . as_ptr () as * const c_char) ; table . set_collision_use_kinematic = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_use_kinematic\0" . as_ptr () as * const c_char) ; table . set_collision_use_parent = (gd_api . godot_method_bind_get_method) (class_name , "set_collision_use_parent\0" . as_ptr () as * const c_char) ; table . set_compatibility_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_compatibility_mode\0" . as_ptr () as * const c_char) ; table . set_custom_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_transform\0" . as_ptr () as * const c_char) ; table . set_half_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_half_offset\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_navigation_layers = (gd_api . godot_method_bind_get_method) (class_name , "set_navigation_layers\0" . as_ptr () as * const c_char) ; table . set_occluder_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_occluder_light_mask\0" . as_ptr () as * const c_char) ; table . set_quadrant_size = (gd_api . godot_method_bind_get_method) (class_name , "set_quadrant_size\0" . as_ptr () as * const c_char) ; table . set_show_collision = (gd_api . godot_method_bind_get_method) (class_name , "set_show_collision\0" . as_ptr () as * const c_char) ; table . set_tile_origin = (gd_api . godot_method_bind_get_method) (class_name , "set_tile_origin\0" . as_ptr () as * const c_char) ; table . set_tileset = (gd_api . godot_method_bind_get_method) (class_name , "set_tileset\0" . as_ptr () as * const c_char) ; table . set_y_sort_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_y_sort_mode\0" . as_ptr () as * const c_char) ; table . update_bitmask_area = (gd_api . godot_method_bind_get_method) (class_name , "update_bitmask_area\0" . as_ptr () as * const c_char) ; table . update_bitmask_region = (gd_api . godot_method_bind_get_method) (class_name , "update_bitmask_region\0" . as_ptr () as * const c_char) ; table . update_dirty_quadrants = (gd_api . godot_method_bind_get_method) (class_name , "update_dirty_quadrants\0" . as_ptr () as * const c_char) ; table . world_to_map = (gd_api . godot_method_bind_get_method) (class_name , "world_to_map\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::tile_map::private::TileMap;
            
            pub mod tile_set {
                # ! [doc = "This module contains types related to the API class [`TileSet`][super::TileSet]."] pub (crate) mod private { # [doc = "`core class TileSet` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`tile_set`][super::tile_set] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_tileset.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTileSet inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TileSet { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TileSet ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AutotileBindings (pub i64) ; impl AutotileBindings { pub const TOPLEFT : AutotileBindings = AutotileBindings (1i64) ; pub const TOP : AutotileBindings = AutotileBindings (2i64) ; pub const TOPRIGHT : AutotileBindings = AutotileBindings (4i64) ; pub const LEFT : AutotileBindings = AutotileBindings (8i64) ; pub const CENTER : AutotileBindings = AutotileBindings (16i64) ; pub const RIGHT : AutotileBindings = AutotileBindings (32i64) ; pub const BOTTOMLEFT : AutotileBindings = AutotileBindings (64i64) ; pub const BOTTOM : AutotileBindings = AutotileBindings (128i64) ; pub const BOTTOMRIGHT : AutotileBindings = AutotileBindings (256i64) ; } impl From < i64 > for AutotileBindings { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AutotileBindings > for i64 { # [inline] fn from (v : AutotileBindings) -> Self { v . 0 } } impl FromVariant for AutotileBindings { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BitmaskMode (pub i64) ; impl BitmaskMode { pub const _2X2 : BitmaskMode = BitmaskMode (0i64) ; pub const _3X3_MINIMAL : BitmaskMode = BitmaskMode (1i64) ; pub const _3X3 : BitmaskMode = BitmaskMode (2i64) ; } impl From < i64 > for BitmaskMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BitmaskMode > for i64 { # [inline] fn from (v : BitmaskMode) -> Self { v . 0 } } impl FromVariant for BitmaskMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TileMode (pub i64) ; impl TileMode { pub const SINGLE_TILE : TileMode = TileMode (0i64) ; pub const AUTO_TILE : TileMode = TileMode (1i64) ; pub const ATLAS_TILE : TileMode = TileMode (2i64) ; } impl From < i64 > for TileMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TileMode > for i64 { # [inline] fn from (v : TileMode) -> Self { v . 0 } } impl FromVariant for TileMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TileSet { pub const BITMASK_2X2 : i64 = 0i64 ; pub const SINGLE_TILE : i64 = 0i64 ; pub const AUTO_TILE : i64 = 1i64 ; pub const BIND_TOPLEFT : i64 = 1i64 ; pub const BITMASK_3X3_MINIMAL : i64 = 1i64 ; pub const ATLAS_TILE : i64 = 2i64 ; pub const BIND_TOP : i64 = 2i64 ; pub const BITMASK_3X3 : i64 = 2i64 ; pub const BIND_TOPRIGHT : i64 = 4i64 ; pub const BIND_LEFT : i64 = 8i64 ; pub const BIND_CENTER : i64 = 16i64 ; pub const BIND_RIGHT : i64 = 32i64 ; pub const BIND_BOTTOMLEFT : i64 = 64i64 ; pub const BIND_BOTTOM : i64 = 128i64 ; pub const BIND_BOTTOMRIGHT : i64 = 256i64 ; } impl TileSet { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TileSetMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Clears all bitmask information of the autotile."] # [doc = ""] # [inline] pub fn autotile_clear_bitmask_map (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_clear_bitmask_map ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; } } # [doc = "Returns the bitmask of the subtile from an autotile given its coordinates.\nThe value is the sum of the values in [`AutotileBindings`][AutotileBindings] present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right)."] # [doc = ""] # [inline] pub fn autotile_get_bitmask (& self , id : i64 , coord : Vector2) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_get_bitmask ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , id as _ , coord) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`BitmaskMode`][BitmaskMode] of the autotile."] # [doc = ""] # [inline] pub fn autotile_get_bitmask_mode (& self , id : i64) -> crate :: generated :: tile_set :: BitmaskMode { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_get_bitmask_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < crate :: generated :: tile_set :: BitmaskMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the subtile that's being used as an icon in an atlas/autotile given its coordinates.\nThe subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor."] # [doc = ""] # [inline] pub fn autotile_get_icon_coordinate (& self , id : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_get_icon_coordinate ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the light occluder of the subtile from an atlas/autotile given its coordinates."] # [doc = ""] # [inline] pub fn autotile_get_light_occluder (& self , id : i64 , coord : Vector2) -> Option < Ref < crate :: generated :: OccluderPolygon2D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_get_light_occluder ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , id as _ , coord) ; < Option < Ref < crate :: generated :: OccluderPolygon2D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the navigation polygon of the subtile from an atlas/autotile given its coordinates."] # [doc = ""] # [inline] pub fn autotile_get_navigation_polygon (& self , id : i64 , coord : Vector2) -> Option < Ref < crate :: generated :: NavigationPolygon , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_get_navigation_polygon ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , id as _ , coord) ; < Option < Ref < crate :: generated :: NavigationPolygon , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the size of the subtiles in an atlas/autotile."] # [doc = ""] # [inline] pub fn autotile_get_size (& self , id : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_get_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the spacing between subtiles of the atlas/autotile."] # [doc = ""] # [inline] pub fn autotile_get_spacing (& self , id : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_get_spacing ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the priority of the subtile from an autotile given its coordinates.\nWhen more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked."] # [doc = ""] # [inline] pub fn autotile_get_subtile_priority (& self , id : i64 , coord : Vector2) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_get_subtile_priority ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , id as _ , coord) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the drawing index of the subtile from an atlas/autotile given its coordinates."] # [doc = ""] # [inline] pub fn autotile_get_z_index (& self , id : i64 , coord : Vector2) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_get_z_index ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , id as _ , coord) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the bitmask of the subtile from an autotile given its coordinates.\nThe value is the sum of the values in [`AutotileBindings`][AutotileBindings] present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right)."] # [doc = ""] # [inline] pub fn autotile_set_bitmask (& self , id : i64 , bitmask : Vector2 , flag : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_set_bitmask ; let ret = crate :: icalls :: icallvar__i64_vec2_i64 (method_bind , self . this . sys () . as_ptr () , id as _ , bitmask , flag as _) ; } } # [doc = "Sets the [`BitmaskMode`][BitmaskMode] of the autotile."] # [doc = ""] # [inline] pub fn autotile_set_bitmask_mode (& self , id : i64 , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_set_bitmask_mode ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , id as _ , mode as _) ; } } # [doc = "Sets the subtile that will be used as an icon in an atlas/autotile given its coordinates.\nThe subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor."] # [doc = ""] # [inline] pub fn autotile_set_icon_coordinate (& self , id : i64 , coord : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_set_icon_coordinate ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , id as _ , coord) ; } } # [doc = "Sets the light occluder of the subtile from an atlas/autotile given its coordinates."] # [doc = ""] # [inline] pub fn autotile_set_light_occluder (& self , id : i64 , light_occluder : impl AsArg < crate :: generated :: OccluderPolygon2D > , coord : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_set_light_occluder ; let ret = crate :: icalls :: icallvar__i64_obj_vec2 (method_bind , self . this . sys () . as_ptr () , id as _ , light_occluder . as_arg_ptr () , coord) ; } } # [doc = "Sets the navigation polygon of the subtile from an atlas/autotile given its coordinates."] # [doc = ""] # [inline] pub fn autotile_set_navigation_polygon (& self , id : i64 , navigation_polygon : impl AsArg < crate :: generated :: NavigationPolygon > , coord : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_set_navigation_polygon ; let ret = crate :: icalls :: icallvar__i64_obj_vec2 (method_bind , self . this . sys () . as_ptr () , id as _ , navigation_polygon . as_arg_ptr () , coord) ; } } # [doc = "Sets the size of the subtiles in an atlas/autotile."] # [doc = ""] # [inline] pub fn autotile_set_size (& self , id : i64 , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_set_size ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , id as _ , size) ; } } # [doc = "Sets the spacing between subtiles of the atlas/autotile."] # [doc = ""] # [inline] pub fn autotile_set_spacing (& self , id : i64 , spacing : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_set_spacing ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , id as _ , spacing as _) ; } } # [doc = "Sets the priority of the subtile from an autotile given its coordinates.\nWhen more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked."] # [doc = ""] # [inline] pub fn autotile_set_subtile_priority (& self , id : i64 , coord : Vector2 , priority : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_set_subtile_priority ; let ret = crate :: icalls :: icallvar__i64_vec2_i64 (method_bind , self . this . sys () . as_ptr () , id as _ , coord , priority as _) ; } } # [doc = "Sets the drawing index of the subtile from an atlas/autotile given its coordinates."] # [doc = ""] # [inline] pub fn autotile_set_z_index (& self , id : i64 , coord : Vector2 , z_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . autotile_set_z_index ; let ret = crate :: icalls :: icallvar__i64_vec2_i64 (method_bind , self . this . sys () . as_ptr () , id as _ , coord , z_index as _) ; } } # [doc = "Clears all tiles."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Creates a new tile with the given ID."] # [doc = ""] # [inline] pub fn create_tile (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . create_tile ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; } } # [doc = "Returns the first tile matching the given name."] # [doc = ""] # [inline] pub fn find_tile_by_name (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . find_tile_by_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the ID following the last currently used ID, useful when creating a new tile."] # [doc = ""] # [inline] pub fn get_last_unused_tile_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . get_last_unused_tile_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an array of all currently used tile IDs."] # [doc = ""] # [inline] pub fn get_tiles_ids (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . get_tiles_ids ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Removes the given tile ID."] # [doc = ""] # [inline] pub fn remove_tile (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . remove_tile ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; } } # [doc = "Adds a shape to the tile.\n# Default Arguments\n* `one_way` - `false`\n* `autotile_coord` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn tile_add_shape (& self , id : i64 , shape : impl AsArg < crate :: generated :: Shape2D > , shape_transform : Transform2D , one_way : bool , autotile_coord : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_add_shape ; let ret = crate :: icalls :: icallvar__i64_obj_trans2D_bool_vec2 (method_bind , self . this . sys () . as_ptr () , id as _ , shape . as_arg_ptr () , shape_transform , one_way as _ , autotile_coord) ; } } # [doc = "Returns the tile's light occluder."] # [doc = ""] # [inline] pub fn tile_get_light_occluder (& self , id : i64) -> Option < Ref < crate :: generated :: OccluderPolygon2D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_light_occluder ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Option < Ref < crate :: generated :: OccluderPolygon2D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tile's material."] # [doc = ""] # [inline] pub fn tile_get_material (& self , id : i64) -> Option < Ref < crate :: generated :: ShaderMaterial , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_material ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Option < Ref < crate :: generated :: ShaderMaterial , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tile's modulation color."] # [doc = ""] # [inline] pub fn tile_get_modulate (& self , id : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_modulate ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tile's name."] # [doc = ""] # [inline] pub fn tile_get_name (& self , id : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the navigation polygon of the tile."] # [doc = ""] # [inline] pub fn tile_get_navigation_polygon (& self , id : i64) -> Option < Ref < crate :: generated :: NavigationPolygon , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_navigation_polygon ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Option < Ref < crate :: generated :: NavigationPolygon , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the offset of the tile's navigation polygon."] # [doc = ""] # [inline] pub fn tile_get_navigation_polygon_offset (& self , id : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_navigation_polygon_offset ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tile's normal map texture."] # [doc = ""] # [inline] pub fn tile_get_normal_map (& self , id : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_normal_map ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the offset of the tile's light occluder."] # [doc = ""] # [inline] pub fn tile_get_occluder_offset (& self , id : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_occluder_offset ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tile sub-region in the texture."] # [doc = ""] # [inline] pub fn tile_get_region (& self , id : i64) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_region ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a tile's given shape."] # [doc = ""] # [inline] pub fn tile_get_shape (& self , id : i64 , shape_id : i64) -> Option < Ref < crate :: generated :: Shape2D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_shape ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , id as _ , shape_id as _) ; < Option < Ref < crate :: generated :: Shape2D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of shapes assigned to a tile."] # [doc = ""] # [inline] pub fn tile_get_shape_count (& self , id : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_shape_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the offset of a tile's shape."] # [doc = ""] # [inline] pub fn tile_get_shape_offset (& self , id : i64 , shape_id : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_shape_offset ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , id as _ , shape_id as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the one-way collision value of a tile's shape."] # [doc = ""] # [inline] pub fn tile_get_shape_one_way (& self , id : i64 , shape_id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_shape_one_way ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , id as _ , shape_id as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn tile_get_shape_one_way_margin (& self , id : i64 , shape_id : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_shape_one_way_margin ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , id as _ , shape_id as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`Transform2D`][Transform2D] of a tile's shape."] # [doc = ""] # [inline] pub fn tile_get_shape_transform (& self , id : i64 , shape_id : i64) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_shape_transform ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , id as _ , shape_id as _) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns an array of dictionaries describing the tile's shapes.\n**Dictionary structure in the array returned by this method:**\n```gdscript\n{\n    \"autotile_coord\": Vector2,\n    \"one_way\": bool,\n    \"one_way_margin\": int,\n    \"shape\": CollisionShape2D,\n    \"shape_transform\": Transform2D,\n}\n```"] # [doc = ""] # [inline] pub fn tile_get_shapes (& self , id : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_shapes ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tile's texture."] # [doc = ""] # [inline] pub fn tile_get_texture (& self , id : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_texture ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the texture offset of the tile."] # [doc = ""] # [inline] pub fn tile_get_texture_offset (& self , id : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_texture_offset ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tile's [`TileMode`][TileMode]."] # [doc = ""] # [inline] pub fn tile_get_tile_mode (& self , id : i64) -> crate :: generated :: tile_set :: TileMode { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_tile_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < crate :: generated :: tile_set :: TileMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tile's Z index (drawing layer)."] # [doc = ""] # [inline] pub fn tile_get_z_index (& self , id : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_get_z_index ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Sets a light occluder for the tile."] # [doc = ""] # [inline] pub fn tile_set_light_occluder (& self , id : i64 , light_occluder : impl AsArg < crate :: generated :: OccluderPolygon2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_light_occluder ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , id as _ , light_occluder . as_arg_ptr ()) ; } } # [doc = "Sets the tile's material."] # [doc = ""] # [inline] pub fn tile_set_material (& self , id : i64 , material : impl AsArg < crate :: generated :: ShaderMaterial >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_material ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , id as _ , material . as_arg_ptr ()) ; } } # [doc = "Sets the tile's modulation color.\n**Note:** Modulation is performed by setting the tile's vertex color. To access this in a shader, use `COLOR` rather than `MODULATE` (which instead accesses the [`TileMap`][TileMap]'s [`CanvasItem.modulate`][CanvasItem::modulate] property)."] # [doc = ""] # [inline] pub fn tile_set_modulate (& self , id : i64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_modulate ; let ret = crate :: icalls :: icallvar__i64_color (method_bind , self . this . sys () . as_ptr () , id as _ , color) ; } } # [doc = "Sets the tile's name."] # [doc = ""] # [inline] pub fn tile_set_name (& self , id : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_name ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , id as _ , name . into ()) ; } } # [doc = "Sets the tile's navigation polygon."] # [doc = ""] # [inline] pub fn tile_set_navigation_polygon (& self , id : i64 , navigation_polygon : impl AsArg < crate :: generated :: NavigationPolygon >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_navigation_polygon ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , id as _ , navigation_polygon . as_arg_ptr ()) ; } } # [doc = "Sets an offset for the tile's navigation polygon."] # [doc = ""] # [inline] pub fn tile_set_navigation_polygon_offset (& self , id : i64 , navigation_polygon_offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_navigation_polygon_offset ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , id as _ , navigation_polygon_offset) ; } } # [doc = "Sets the tile's normal map texture.\n**Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [this page](http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates) for a comparison of normal map coordinates expected by popular engines."] # [doc = ""] # [inline] pub fn tile_set_normal_map (& self , id : i64 , normal_map : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_normal_map ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , id as _ , normal_map . as_arg_ptr ()) ; } } # [doc = "Sets an offset for the tile's light occluder."] # [doc = ""] # [inline] pub fn tile_set_occluder_offset (& self , id : i64 , occluder_offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_occluder_offset ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , id as _ , occluder_offset) ; } } # [doc = "Sets the tile's sub-region in the texture. This is common in texture atlases."] # [doc = ""] # [inline] pub fn tile_set_region (& self , id : i64 , region : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_region ; let ret = crate :: icalls :: icallvar__i64_rect2 (method_bind , self . this . sys () . as_ptr () , id as _ , region) ; } } # [doc = "Sets a shape for the tile, enabling collision."] # [doc = ""] # [inline] pub fn tile_set_shape (& self , id : i64 , shape_id : i64 , shape : impl AsArg < crate :: generated :: Shape2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_shape ; let ret = crate :: icalls :: icallvar__i64_i64_obj (method_bind , self . this . sys () . as_ptr () , id as _ , shape_id as _ , shape . as_arg_ptr ()) ; } } # [doc = "Sets the offset of a tile's shape."] # [doc = ""] # [inline] pub fn tile_set_shape_offset (& self , id : i64 , shape_id : i64 , shape_offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_shape_offset ; let ret = crate :: icalls :: icallvar__i64_i64_vec2 (method_bind , self . this . sys () . as_ptr () , id as _ , shape_id as _ , shape_offset) ; } } # [doc = "Enables one-way collision on a tile's shape."] # [doc = ""] # [inline] pub fn tile_set_shape_one_way (& self , id : i64 , shape_id : i64 , one_way : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_shape_one_way ; let ret = crate :: icalls :: icallvar__i64_i64_bool (method_bind , self . this . sys () . as_ptr () , id as _ , shape_id as _ , one_way as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn tile_set_shape_one_way_margin (& self , id : i64 , shape_id : i64 , one_way : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_shape_one_way_margin ; let ret = crate :: icalls :: icallvar__i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , id as _ , shape_id as _ , one_way as _) ; } } # [doc = "Sets a [`Transform2D`][Transform2D] on a tile's shape."] # [doc = ""] # [inline] pub fn tile_set_shape_transform (& self , id : i64 , shape_id : i64 , shape_transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_shape_transform ; let ret = crate :: icalls :: icallvar__i64_i64_trans2D (method_bind , self . this . sys () . as_ptr () , id as _ , shape_id as _ , shape_transform) ; } } # [doc = "Sets an array of shapes for the tile, enabling collision."] # [doc = ""] # [inline] pub fn tile_set_shapes (& self , id : i64 , shapes : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_shapes ; let ret = crate :: icalls :: icallvar__i64_arr (method_bind , self . this . sys () . as_ptr () , id as _ , shapes) ; } } # [doc = "Sets the tile's texture."] # [doc = ""] # [inline] pub fn tile_set_texture (& self , id : i64 , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_texture ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , id as _ , texture . as_arg_ptr ()) ; } } # [doc = "Sets the tile's texture offset."] # [doc = ""] # [inline] pub fn tile_set_texture_offset (& self , id : i64 , texture_offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_texture_offset ; let ret = crate :: icalls :: icallvar__i64_vec2 (method_bind , self . this . sys () . as_ptr () , id as _ , texture_offset) ; } } # [doc = "Sets the tile's [`TileMode`][TileMode]."] # [doc = ""] # [inline] pub fn tile_set_tile_mode (& self , id : i64 , tilemode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_tile_mode ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , id as _ , tilemode as _) ; } } # [doc = "Sets the tile's drawing index."] # [doc = ""] # [inline] pub fn tile_set_z_index (& self , id : i64 , z_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TileSetMethodTable :: get (get_api ()) . tile_set_z_index ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , id as _ , z_index as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TileSet { } unsafe impl GodotObject for TileSet { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "TileSet" } } impl std :: ops :: Deref for TileSet { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TileSet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for TileSet { } unsafe impl SubClass < crate :: generated :: Reference > for TileSet { } unsafe impl SubClass < crate :: generated :: Object > for TileSet { } impl Instanciable for TileSet { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { TileSet :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TileSetMethodTable { pub class_constructor : sys :: godot_class_constructor , pub autotile_clear_bitmask_map : * mut sys :: godot_method_bind , pub autotile_get_bitmask : * mut sys :: godot_method_bind , pub autotile_get_bitmask_mode : * mut sys :: godot_method_bind , pub autotile_get_icon_coordinate : * mut sys :: godot_method_bind , pub autotile_get_light_occluder : * mut sys :: godot_method_bind , pub autotile_get_navigation_polygon : * mut sys :: godot_method_bind , pub autotile_get_size : * mut sys :: godot_method_bind , pub autotile_get_spacing : * mut sys :: godot_method_bind , pub autotile_get_subtile_priority : * mut sys :: godot_method_bind , pub autotile_get_z_index : * mut sys :: godot_method_bind , pub autotile_set_bitmask : * mut sys :: godot_method_bind , pub autotile_set_bitmask_mode : * mut sys :: godot_method_bind , pub autotile_set_icon_coordinate : * mut sys :: godot_method_bind , pub autotile_set_light_occluder : * mut sys :: godot_method_bind , pub autotile_set_navigation_polygon : * mut sys :: godot_method_bind , pub autotile_set_size : * mut sys :: godot_method_bind , pub autotile_set_spacing : * mut sys :: godot_method_bind , pub autotile_set_subtile_priority : * mut sys :: godot_method_bind , pub autotile_set_z_index : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub create_tile : * mut sys :: godot_method_bind , pub find_tile_by_name : * mut sys :: godot_method_bind , pub get_last_unused_tile_id : * mut sys :: godot_method_bind , pub get_tiles_ids : * mut sys :: godot_method_bind , pub remove_tile : * mut sys :: godot_method_bind , pub tile_add_shape : * mut sys :: godot_method_bind , pub tile_get_light_occluder : * mut sys :: godot_method_bind , pub tile_get_material : * mut sys :: godot_method_bind , pub tile_get_modulate : * mut sys :: godot_method_bind , pub tile_get_name : * mut sys :: godot_method_bind , pub tile_get_navigation_polygon : * mut sys :: godot_method_bind , pub tile_get_navigation_polygon_offset : * mut sys :: godot_method_bind , pub tile_get_normal_map : * mut sys :: godot_method_bind , pub tile_get_occluder_offset : * mut sys :: godot_method_bind , pub tile_get_region : * mut sys :: godot_method_bind , pub tile_get_shape : * mut sys :: godot_method_bind , pub tile_get_shape_count : * mut sys :: godot_method_bind , pub tile_get_shape_offset : * mut sys :: godot_method_bind , pub tile_get_shape_one_way : * mut sys :: godot_method_bind , pub tile_get_shape_one_way_margin : * mut sys :: godot_method_bind , pub tile_get_shape_transform : * mut sys :: godot_method_bind , pub tile_get_shapes : * mut sys :: godot_method_bind , pub tile_get_texture : * mut sys :: godot_method_bind , pub tile_get_texture_offset : * mut sys :: godot_method_bind , pub tile_get_tile_mode : * mut sys :: godot_method_bind , pub tile_get_z_index : * mut sys :: godot_method_bind , pub tile_set_light_occluder : * mut sys :: godot_method_bind , pub tile_set_material : * mut sys :: godot_method_bind , pub tile_set_modulate : * mut sys :: godot_method_bind , pub tile_set_name : * mut sys :: godot_method_bind , pub tile_set_navigation_polygon : * mut sys :: godot_method_bind , pub tile_set_navigation_polygon_offset : * mut sys :: godot_method_bind , pub tile_set_normal_map : * mut sys :: godot_method_bind , pub tile_set_occluder_offset : * mut sys :: godot_method_bind , pub tile_set_region : * mut sys :: godot_method_bind , pub tile_set_shape : * mut sys :: godot_method_bind , pub tile_set_shape_offset : * mut sys :: godot_method_bind , pub tile_set_shape_one_way : * mut sys :: godot_method_bind , pub tile_set_shape_one_way_margin : * mut sys :: godot_method_bind , pub tile_set_shape_transform : * mut sys :: godot_method_bind , pub tile_set_shapes : * mut sys :: godot_method_bind , pub tile_set_texture : * mut sys :: godot_method_bind , pub tile_set_texture_offset : * mut sys :: godot_method_bind , pub tile_set_tile_mode : * mut sys :: godot_method_bind , pub tile_set_z_index : * mut sys :: godot_method_bind } impl TileSetMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TileSetMethodTable = TileSetMethodTable { class_constructor : None , autotile_clear_bitmask_map : 0 as * mut sys :: godot_method_bind , autotile_get_bitmask : 0 as * mut sys :: godot_method_bind , autotile_get_bitmask_mode : 0 as * mut sys :: godot_method_bind , autotile_get_icon_coordinate : 0 as * mut sys :: godot_method_bind , autotile_get_light_occluder : 0 as * mut sys :: godot_method_bind , autotile_get_navigation_polygon : 0 as * mut sys :: godot_method_bind , autotile_get_size : 0 as * mut sys :: godot_method_bind , autotile_get_spacing : 0 as * mut sys :: godot_method_bind , autotile_get_subtile_priority : 0 as * mut sys :: godot_method_bind , autotile_get_z_index : 0 as * mut sys :: godot_method_bind , autotile_set_bitmask : 0 as * mut sys :: godot_method_bind , autotile_set_bitmask_mode : 0 as * mut sys :: godot_method_bind , autotile_set_icon_coordinate : 0 as * mut sys :: godot_method_bind , autotile_set_light_occluder : 0 as * mut sys :: godot_method_bind , autotile_set_navigation_polygon : 0 as * mut sys :: godot_method_bind , autotile_set_size : 0 as * mut sys :: godot_method_bind , autotile_set_spacing : 0 as * mut sys :: godot_method_bind , autotile_set_subtile_priority : 0 as * mut sys :: godot_method_bind , autotile_set_z_index : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , create_tile : 0 as * mut sys :: godot_method_bind , find_tile_by_name : 0 as * mut sys :: godot_method_bind , get_last_unused_tile_id : 0 as * mut sys :: godot_method_bind , get_tiles_ids : 0 as * mut sys :: godot_method_bind , remove_tile : 0 as * mut sys :: godot_method_bind , tile_add_shape : 0 as * mut sys :: godot_method_bind , tile_get_light_occluder : 0 as * mut sys :: godot_method_bind , tile_get_material : 0 as * mut sys :: godot_method_bind , tile_get_modulate : 0 as * mut sys :: godot_method_bind , tile_get_name : 0 as * mut sys :: godot_method_bind , tile_get_navigation_polygon : 0 as * mut sys :: godot_method_bind , tile_get_navigation_polygon_offset : 0 as * mut sys :: godot_method_bind , tile_get_normal_map : 0 as * mut sys :: godot_method_bind , tile_get_occluder_offset : 0 as * mut sys :: godot_method_bind , tile_get_region : 0 as * mut sys :: godot_method_bind , tile_get_shape : 0 as * mut sys :: godot_method_bind , tile_get_shape_count : 0 as * mut sys :: godot_method_bind , tile_get_shape_offset : 0 as * mut sys :: godot_method_bind , tile_get_shape_one_way : 0 as * mut sys :: godot_method_bind , tile_get_shape_one_way_margin : 0 as * mut sys :: godot_method_bind , tile_get_shape_transform : 0 as * mut sys :: godot_method_bind , tile_get_shapes : 0 as * mut sys :: godot_method_bind , tile_get_texture : 0 as * mut sys :: godot_method_bind , tile_get_texture_offset : 0 as * mut sys :: godot_method_bind , tile_get_tile_mode : 0 as * mut sys :: godot_method_bind , tile_get_z_index : 0 as * mut sys :: godot_method_bind , tile_set_light_occluder : 0 as * mut sys :: godot_method_bind , tile_set_material : 0 as * mut sys :: godot_method_bind , tile_set_modulate : 0 as * mut sys :: godot_method_bind , tile_set_name : 0 as * mut sys :: godot_method_bind , tile_set_navigation_polygon : 0 as * mut sys :: godot_method_bind , tile_set_navigation_polygon_offset : 0 as * mut sys :: godot_method_bind , tile_set_normal_map : 0 as * mut sys :: godot_method_bind , tile_set_occluder_offset : 0 as * mut sys :: godot_method_bind , tile_set_region : 0 as * mut sys :: godot_method_bind , tile_set_shape : 0 as * mut sys :: godot_method_bind , tile_set_shape_offset : 0 as * mut sys :: godot_method_bind , tile_set_shape_one_way : 0 as * mut sys :: godot_method_bind , tile_set_shape_one_way_margin : 0 as * mut sys :: godot_method_bind , tile_set_shape_transform : 0 as * mut sys :: godot_method_bind , tile_set_shapes : 0 as * mut sys :: godot_method_bind , tile_set_texture : 0 as * mut sys :: godot_method_bind , tile_set_texture_offset : 0 as * mut sys :: godot_method_bind , tile_set_tile_mode : 0 as * mut sys :: godot_method_bind , tile_set_z_index : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TileSetMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TileSet\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . autotile_clear_bitmask_map = (gd_api . godot_method_bind_get_method) (class_name , "autotile_clear_bitmask_map\0" . as_ptr () as * const c_char) ; table . autotile_get_bitmask = (gd_api . godot_method_bind_get_method) (class_name , "autotile_get_bitmask\0" . as_ptr () as * const c_char) ; table . autotile_get_bitmask_mode = (gd_api . godot_method_bind_get_method) (class_name , "autotile_get_bitmask_mode\0" . as_ptr () as * const c_char) ; table . autotile_get_icon_coordinate = (gd_api . godot_method_bind_get_method) (class_name , "autotile_get_icon_coordinate\0" . as_ptr () as * const c_char) ; table . autotile_get_light_occluder = (gd_api . godot_method_bind_get_method) (class_name , "autotile_get_light_occluder\0" . as_ptr () as * const c_char) ; table . autotile_get_navigation_polygon = (gd_api . godot_method_bind_get_method) (class_name , "autotile_get_navigation_polygon\0" . as_ptr () as * const c_char) ; table . autotile_get_size = (gd_api . godot_method_bind_get_method) (class_name , "autotile_get_size\0" . as_ptr () as * const c_char) ; table . autotile_get_spacing = (gd_api . godot_method_bind_get_method) (class_name , "autotile_get_spacing\0" . as_ptr () as * const c_char) ; table . autotile_get_subtile_priority = (gd_api . godot_method_bind_get_method) (class_name , "autotile_get_subtile_priority\0" . as_ptr () as * const c_char) ; table . autotile_get_z_index = (gd_api . godot_method_bind_get_method) (class_name , "autotile_get_z_index\0" . as_ptr () as * const c_char) ; table . autotile_set_bitmask = (gd_api . godot_method_bind_get_method) (class_name , "autotile_set_bitmask\0" . as_ptr () as * const c_char) ; table . autotile_set_bitmask_mode = (gd_api . godot_method_bind_get_method) (class_name , "autotile_set_bitmask_mode\0" . as_ptr () as * const c_char) ; table . autotile_set_icon_coordinate = (gd_api . godot_method_bind_get_method) (class_name , "autotile_set_icon_coordinate\0" . as_ptr () as * const c_char) ; table . autotile_set_light_occluder = (gd_api . godot_method_bind_get_method) (class_name , "autotile_set_light_occluder\0" . as_ptr () as * const c_char) ; table . autotile_set_navigation_polygon = (gd_api . godot_method_bind_get_method) (class_name , "autotile_set_navigation_polygon\0" . as_ptr () as * const c_char) ; table . autotile_set_size = (gd_api . godot_method_bind_get_method) (class_name , "autotile_set_size\0" . as_ptr () as * const c_char) ; table . autotile_set_spacing = (gd_api . godot_method_bind_get_method) (class_name , "autotile_set_spacing\0" . as_ptr () as * const c_char) ; table . autotile_set_subtile_priority = (gd_api . godot_method_bind_get_method) (class_name , "autotile_set_subtile_priority\0" . as_ptr () as * const c_char) ; table . autotile_set_z_index = (gd_api . godot_method_bind_get_method) (class_name , "autotile_set_z_index\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . create_tile = (gd_api . godot_method_bind_get_method) (class_name , "create_tile\0" . as_ptr () as * const c_char) ; table . find_tile_by_name = (gd_api . godot_method_bind_get_method) (class_name , "find_tile_by_name\0" . as_ptr () as * const c_char) ; table . get_last_unused_tile_id = (gd_api . godot_method_bind_get_method) (class_name , "get_last_unused_tile_id\0" . as_ptr () as * const c_char) ; table . get_tiles_ids = (gd_api . godot_method_bind_get_method) (class_name , "get_tiles_ids\0" . as_ptr () as * const c_char) ; table . remove_tile = (gd_api . godot_method_bind_get_method) (class_name , "remove_tile\0" . as_ptr () as * const c_char) ; table . tile_add_shape = (gd_api . godot_method_bind_get_method) (class_name , "tile_add_shape\0" . as_ptr () as * const c_char) ; table . tile_get_light_occluder = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_light_occluder\0" . as_ptr () as * const c_char) ; table . tile_get_material = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_material\0" . as_ptr () as * const c_char) ; table . tile_get_modulate = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_modulate\0" . as_ptr () as * const c_char) ; table . tile_get_name = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_name\0" . as_ptr () as * const c_char) ; table . tile_get_navigation_polygon = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_navigation_polygon\0" . as_ptr () as * const c_char) ; table . tile_get_navigation_polygon_offset = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_navigation_polygon_offset\0" . as_ptr () as * const c_char) ; table . tile_get_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_normal_map\0" . as_ptr () as * const c_char) ; table . tile_get_occluder_offset = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_occluder_offset\0" . as_ptr () as * const c_char) ; table . tile_get_region = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_region\0" . as_ptr () as * const c_char) ; table . tile_get_shape = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_shape\0" . as_ptr () as * const c_char) ; table . tile_get_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_shape_count\0" . as_ptr () as * const c_char) ; table . tile_get_shape_offset = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_shape_offset\0" . as_ptr () as * const c_char) ; table . tile_get_shape_one_way = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_shape_one_way\0" . as_ptr () as * const c_char) ; table . tile_get_shape_one_way_margin = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_shape_one_way_margin\0" . as_ptr () as * const c_char) ; table . tile_get_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_shape_transform\0" . as_ptr () as * const c_char) ; table . tile_get_shapes = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_shapes\0" . as_ptr () as * const c_char) ; table . tile_get_texture = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_texture\0" . as_ptr () as * const c_char) ; table . tile_get_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_texture_offset\0" . as_ptr () as * const c_char) ; table . tile_get_tile_mode = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_tile_mode\0" . as_ptr () as * const c_char) ; table . tile_get_z_index = (gd_api . godot_method_bind_get_method) (class_name , "tile_get_z_index\0" . as_ptr () as * const c_char) ; table . tile_set_light_occluder = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_light_occluder\0" . as_ptr () as * const c_char) ; table . tile_set_material = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_material\0" . as_ptr () as * const c_char) ; table . tile_set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_modulate\0" . as_ptr () as * const c_char) ; table . tile_set_name = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_name\0" . as_ptr () as * const c_char) ; table . tile_set_navigation_polygon = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_navigation_polygon\0" . as_ptr () as * const c_char) ; table . tile_set_navigation_polygon_offset = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_navigation_polygon_offset\0" . as_ptr () as * const c_char) ; table . tile_set_normal_map = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_normal_map\0" . as_ptr () as * const c_char) ; table . tile_set_occluder_offset = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_occluder_offset\0" . as_ptr () as * const c_char) ; table . tile_set_region = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_region\0" . as_ptr () as * const c_char) ; table . tile_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_shape\0" . as_ptr () as * const c_char) ; table . tile_set_shape_offset = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_shape_offset\0" . as_ptr () as * const c_char) ; table . tile_set_shape_one_way = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_shape_one_way\0" . as_ptr () as * const c_char) ; table . tile_set_shape_one_way_margin = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_shape_one_way_margin\0" . as_ptr () as * const c_char) ; table . tile_set_shape_transform = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_shape_transform\0" . as_ptr () as * const c_char) ; table . tile_set_shapes = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_shapes\0" . as_ptr () as * const c_char) ; table . tile_set_texture = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_texture\0" . as_ptr () as * const c_char) ; table . tile_set_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_texture_offset\0" . as_ptr () as * const c_char) ; table . tile_set_tile_mode = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_tile_mode\0" . as_ptr () as * const c_char) ; table . tile_set_z_index = (gd_api . godot_method_bind_get_method) (class_name , "tile_set_z_index\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::tile_set::private::TileSet;
            
            pub mod time {
                # ! [doc = "This module contains types related to the API class [`Time`][super::Time]."] pub (crate) mod private { # [doc = "`core singleton class Time` inherits `Object` (manually managed).\n\nThis class has related types in the [`time`][super::time] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_time.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nTime inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Time { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Time ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Month (pub i64) ; impl Month { pub const JANUARY : Month = Month (1i64) ; pub const FEBRUARY : Month = Month (2i64) ; pub const MARCH : Month = Month (3i64) ; pub const APRIL : Month = Month (4i64) ; pub const MAY : Month = Month (5i64) ; pub const JUNE : Month = Month (6i64) ; pub const JULY : Month = Month (7i64) ; pub const AUGUST : Month = Month (8i64) ; pub const SEPTEMBER : Month = Month (9i64) ; pub const OCTOBER : Month = Month (10i64) ; pub const NOVEMBER : Month = Month (11i64) ; pub const DECEMBER : Month = Month (12i64) ; } impl From < i64 > for Month { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Month > for i64 { # [inline] fn from (v : Month) -> Self { v . 0 } } impl FromVariant for Month { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Weekday (pub i64) ; impl Weekday { pub const SUNDAY : Weekday = Weekday (0i64) ; pub const MONDAY : Weekday = Weekday (1i64) ; pub const TUESDAY : Weekday = Weekday (2i64) ; pub const WEDNESDAY : Weekday = Weekday (3i64) ; pub const THURSDAY : Weekday = Weekday (4i64) ; pub const FRIDAY : Weekday = Weekday (5i64) ; pub const SATURDAY : Weekday = Weekday (6i64) ; } impl From < i64 > for Weekday { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Weekday > for i64 { # [inline] fn from (v : Weekday) -> Self { v . 0 } } impl FromVariant for Weekday { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Time { pub const WEEKDAY_SUNDAY : i64 = 0i64 ; pub const MONTH_JANUARY : i64 = 1i64 ; pub const WEEKDAY_MONDAY : i64 = 1i64 ; pub const MONTH_FEBRUARY : i64 = 2i64 ; pub const WEEKDAY_TUESDAY : i64 = 2i64 ; pub const MONTH_MARCH : i64 = 3i64 ; pub const WEEKDAY_WEDNESDAY : i64 = 3i64 ; pub const MONTH_APRIL : i64 = 4i64 ; pub const WEEKDAY_THURSDAY : i64 = 4i64 ; pub const MONTH_MAY : i64 = 5i64 ; pub const WEEKDAY_FRIDAY : i64 = 5i64 ; pub const MONTH_JUNE : i64 = 6i64 ; pub const WEEKDAY_SATURDAY : i64 = 6i64 ; pub const MONTH_JULY : i64 = 7i64 ; pub const MONTH_AUGUST : i64 = 8i64 ; pub const MONTH_SEPTEMBER : i64 = 9i64 ; pub const MONTH_OCTOBER : i64 = 10i64 ; pub const MONTH_NOVEMBER : i64 = 11i64 ; pub const MONTH_DECEMBER : i64 = 12i64 ; } impl Time { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("Time\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Returns the current date as a dictionary of keys: `year`, `month`, `day`, `weekday`, and `dst` (Daylight Savings Time).\nThe returned values are in the system's local time when `utc` is false, otherwise they are in UTC.\n# Default Arguments\n* `utc` - `false`"] # [doc = ""] # [inline] pub fn get_date_dict_from_system (& self , utc : bool) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_date_dict_from_system ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , utc as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Converts the given Unix timestamp to a dictionary of keys: `year`, `month`, `day`, and `weekday`."] # [doc = ""] # [inline] pub fn get_date_dict_from_unix_time (& self , unix_time_val : i64) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_date_dict_from_unix_time ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , unix_time_val as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current date as an ISO 8601 date string (YYYY-MM-DD).\nThe returned values are in the system's local time when `utc` is false, otherwise they are in UTC.\n# Default Arguments\n* `utc` - `false`"] # [doc = ""] # [inline] pub fn get_date_string_from_system (& self , utc : bool) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_date_string_from_system ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , utc as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Converts the given Unix timestamp to an ISO 8601 date string (YYYY-MM-DD)."] # [doc = ""] # [inline] pub fn get_date_string_from_unix_time (& self , unix_time_val : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_date_string_from_unix_time ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , unix_time_val as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Converts the given ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS) to a dictionary of keys: `year`, `month`, `day`, `weekday`, `hour`, `minute`, and `second`.\nIf `weekday` is false, then the `weekday` entry is excluded (the calculation is relatively expensive).\n**Note:** Any decimal fraction in the time string will be ignored silently."] # [doc = ""] # [inline] pub fn get_datetime_dict_from_datetime_string (& self , datetime : impl Into < GodotString > , weekday : bool) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_datetime_dict_from_datetime_string ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , datetime . into () , weekday as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current date as a dictionary of keys: `year`, `month`, `day`, `weekday`, `hour`, `minute`, and `second`.\n# Default Arguments\n* `utc` - `false`"] # [doc = ""] # [inline] pub fn get_datetime_dict_from_system (& self , utc : bool) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_datetime_dict_from_system ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , utc as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Converts the given Unix timestamp to a dictionary of keys: `year`, `month`, `day`, and `weekday`.\nThe returned Dictionary's values will be the same as the [`get_datetime_dict_from_system`][Self::get_datetime_dict_from_system] if the Unix timestamp is the current time, with the exception of Daylight Savings Time as it cannot be determined from the epoch."] # [doc = ""] # [inline] pub fn get_datetime_dict_from_unix_time (& self , unix_time_val : i64) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_datetime_dict_from_unix_time ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , unix_time_val as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Converts the given dictionary of keys to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS).\nThe given dictionary can be populated with the following keys: `year`, `month`, `day`, `hour`, `minute`, and `second`. Any other entries (including `dst`) are ignored.\nIf the dictionary is empty, `0` is returned. If some keys are omitted, they default to the equivalent values for the Unix epoch timestamp 0 (1970-01-01 at 00:00:00).\nIf `use_space` is true, use a space instead of the letter T in the middle."] # [doc = ""] # [inline] pub fn get_datetime_string_from_datetime_dict (& self , datetime : Dictionary , use_space : bool) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_datetime_string_from_datetime_dict ; let ret = crate :: icalls :: icallvar__dict_bool (method_bind , self . this . sys () . as_ptr () , datetime , use_space as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current date and time as an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS).\nThe returned values are in the system's local time when `utc` is false, otherwise they are in UTC.\nIf `use_space` is true, use a space instead of the letter T in the middle.\n# Default Arguments\n* `utc` - `false`\n* `use_space` - `false`"] # [doc = ""] # [inline] pub fn get_datetime_string_from_system (& self , utc : bool , use_space : bool) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_datetime_string_from_system ; let ret = crate :: icalls :: icallvar__bool_bool (method_bind , self . this . sys () . as_ptr () , utc as _ , use_space as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Converts the given Unix timestamp to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS).\nIf `use_space` is true, use a space instead of the letter T in the middle.\n# Default Arguments\n* `use_space` - `false`"] # [doc = ""] # [inline] pub fn get_datetime_string_from_unix_time (& self , unix_time_val : i64 , use_space : bool) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_datetime_string_from_unix_time ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , unix_time_val as _ , use_space as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Converts the given timezone offset in minutes to a timezone offset string. For example, -480 returns \"-08:00\", 345 returns \"+05:45\", and 0 returns \"+00:00\"."] # [doc = ""] # [inline] pub fn get_offset_string_from_offset_minutes (& self , offset_minutes : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_offset_string_from_offset_minutes ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , offset_minutes as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the amount of time passed in milliseconds since the engine started.\nWill always be positive or 0 and uses a 64-bit value (it will wrap after roughly 500 million years)."] # [doc = ""] # [inline] pub fn get_ticks_msec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_ticks_msec ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the amount of time passed in microseconds since the engine started.\nWill always be positive or 0 and uses a 64-bit value (it will wrap after roughly half a million years)."] # [doc = ""] # [inline] pub fn get_ticks_usec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_ticks_usec ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the current time as a dictionary of keys: `hour`, `minute`, and `second`.\nThe returned values are in the system's local time when `utc` is false, otherwise they are in UTC.\n# Default Arguments\n* `utc` - `false`"] # [doc = ""] # [inline] pub fn get_time_dict_from_system (& self , utc : bool) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_time_dict_from_system ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , utc as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Converts the given time to a dictionary of keys: `hour`, `minute`, and `second`."] # [doc = ""] # [inline] pub fn get_time_dict_from_unix_time (& self , unix_time_val : i64) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_time_dict_from_unix_time ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , unix_time_val as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current time as an ISO 8601 time string (HH:MM:SS).\nThe returned values are in the system's local time when `utc` is false, otherwise they are in UTC.\n# Default Arguments\n* `utc` - `false`"] # [doc = ""] # [inline] pub fn get_time_string_from_system (& self , utc : bool) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_time_string_from_system ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , utc as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Converts the given Unix timestamp to an ISO 8601 time string (HH:MM:SS)."] # [doc = ""] # [inline] pub fn get_time_string_from_unix_time (& self , unix_time_val : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_time_string_from_unix_time ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , unix_time_val as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current time zone as a dictionary of keys: `bias` and `name`. The `bias` value is the offset from UTC in minutes, since not all time zones are multiples of an hour from UTC."] # [doc = ""] # [inline] pub fn get_time_zone_from_system (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_time_zone_from_system ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Converts a dictionary of time values to a Unix timestamp.\nThe given dictionary can be populated with the following keys: `year`, `month`, `day`, `hour`, `minute`, and `second`. Any other entries (including `dst`) are ignored.\nIf the dictionary is empty, `0` is returned. If some keys are omitted, they default to the equivalent values for the Unix epoch timestamp 0 (1970-01-01 at 00:00:00).\nYou can pass the output from [`get_datetime_dict_from_unix_time`][Self::get_datetime_dict_from_unix_time] directly into this function and get the same as what was put in.\n**Note:** Unix timestamps are often in UTC. This method does not do any timezone conversion, so the timestamp will be in the same timezone as the given datetime dictionary."] # [doc = ""] # [inline] pub fn get_unix_time_from_datetime_dict (& self , datetime : Dictionary) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_unix_time_from_datetime_dict ; let ret = crate :: icalls :: icallvar__dict (method_bind , self . this . sys () . as_ptr () , datetime) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Converts the given ISO 8601 date and/or time string to a Unix timestamp. The string can contain a date only, a time only, or both.\n**Note:** Unix timestamps are often in UTC. This method does not do any timezone conversion, so the timestamp will be in the same timezone as the given datetime string.\n**Note:** Any decimal fraction in the time string will be ignored silently."] # [doc = ""] # [inline] pub fn get_unix_time_from_datetime_string (& self , datetime : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_unix_time_from_datetime_string ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , datetime . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the current Unix timestamp in seconds based on the system time in UTC. This method is implemented by the operating system and always returns the time in UTC.\n**Note:** Unlike other methods that use integer timestamps, this method returns the timestamp as a [`float`][float] for sub-second precision."] # [doc = ""] # [inline] pub fn get_unix_time_from_system (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TimeMethodTable :: get (get_api ()) . get_unix_time_from_system ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Time { } unsafe impl GodotObject for Time { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Time" } } impl std :: ops :: Deref for Time { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Time { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for Time { } unsafe impl Send for Time { } unsafe impl Sync for Time { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TimeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_date_dict_from_system : * mut sys :: godot_method_bind , pub get_date_dict_from_unix_time : * mut sys :: godot_method_bind , pub get_date_string_from_system : * mut sys :: godot_method_bind , pub get_date_string_from_unix_time : * mut sys :: godot_method_bind , pub get_datetime_dict_from_datetime_string : * mut sys :: godot_method_bind , pub get_datetime_dict_from_system : * mut sys :: godot_method_bind , pub get_datetime_dict_from_unix_time : * mut sys :: godot_method_bind , pub get_datetime_string_from_datetime_dict : * mut sys :: godot_method_bind , pub get_datetime_string_from_system : * mut sys :: godot_method_bind , pub get_datetime_string_from_unix_time : * mut sys :: godot_method_bind , pub get_offset_string_from_offset_minutes : * mut sys :: godot_method_bind , pub get_ticks_msec : * mut sys :: godot_method_bind , pub get_ticks_usec : * mut sys :: godot_method_bind , pub get_time_dict_from_system : * mut sys :: godot_method_bind , pub get_time_dict_from_unix_time : * mut sys :: godot_method_bind , pub get_time_string_from_system : * mut sys :: godot_method_bind , pub get_time_string_from_unix_time : * mut sys :: godot_method_bind , pub get_time_zone_from_system : * mut sys :: godot_method_bind , pub get_unix_time_from_datetime_dict : * mut sys :: godot_method_bind , pub get_unix_time_from_datetime_string : * mut sys :: godot_method_bind , pub get_unix_time_from_system : * mut sys :: godot_method_bind } impl TimeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TimeMethodTable = TimeMethodTable { class_constructor : None , get_date_dict_from_system : 0 as * mut sys :: godot_method_bind , get_date_dict_from_unix_time : 0 as * mut sys :: godot_method_bind , get_date_string_from_system : 0 as * mut sys :: godot_method_bind , get_date_string_from_unix_time : 0 as * mut sys :: godot_method_bind , get_datetime_dict_from_datetime_string : 0 as * mut sys :: godot_method_bind , get_datetime_dict_from_system : 0 as * mut sys :: godot_method_bind , get_datetime_dict_from_unix_time : 0 as * mut sys :: godot_method_bind , get_datetime_string_from_datetime_dict : 0 as * mut sys :: godot_method_bind , get_datetime_string_from_system : 0 as * mut sys :: godot_method_bind , get_datetime_string_from_unix_time : 0 as * mut sys :: godot_method_bind , get_offset_string_from_offset_minutes : 0 as * mut sys :: godot_method_bind , get_ticks_msec : 0 as * mut sys :: godot_method_bind , get_ticks_usec : 0 as * mut sys :: godot_method_bind , get_time_dict_from_system : 0 as * mut sys :: godot_method_bind , get_time_dict_from_unix_time : 0 as * mut sys :: godot_method_bind , get_time_string_from_system : 0 as * mut sys :: godot_method_bind , get_time_string_from_unix_time : 0 as * mut sys :: godot_method_bind , get_time_zone_from_system : 0 as * mut sys :: godot_method_bind , get_unix_time_from_datetime_dict : 0 as * mut sys :: godot_method_bind , get_unix_time_from_datetime_string : 0 as * mut sys :: godot_method_bind , get_unix_time_from_system : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TimeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Time\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_date_dict_from_system = (gd_api . godot_method_bind_get_method) (class_name , "get_date_dict_from_system\0" . as_ptr () as * const c_char) ; table . get_date_dict_from_unix_time = (gd_api . godot_method_bind_get_method) (class_name , "get_date_dict_from_unix_time\0" . as_ptr () as * const c_char) ; table . get_date_string_from_system = (gd_api . godot_method_bind_get_method) (class_name , "get_date_string_from_system\0" . as_ptr () as * const c_char) ; table . get_date_string_from_unix_time = (gd_api . godot_method_bind_get_method) (class_name , "get_date_string_from_unix_time\0" . as_ptr () as * const c_char) ; table . get_datetime_dict_from_datetime_string = (gd_api . godot_method_bind_get_method) (class_name , "get_datetime_dict_from_datetime_string\0" . as_ptr () as * const c_char) ; table . get_datetime_dict_from_system = (gd_api . godot_method_bind_get_method) (class_name , "get_datetime_dict_from_system\0" . as_ptr () as * const c_char) ; table . get_datetime_dict_from_unix_time = (gd_api . godot_method_bind_get_method) (class_name , "get_datetime_dict_from_unix_time\0" . as_ptr () as * const c_char) ; table . get_datetime_string_from_datetime_dict = (gd_api . godot_method_bind_get_method) (class_name , "get_datetime_string_from_datetime_dict\0" . as_ptr () as * const c_char) ; table . get_datetime_string_from_system = (gd_api . godot_method_bind_get_method) (class_name , "get_datetime_string_from_system\0" . as_ptr () as * const c_char) ; table . get_datetime_string_from_unix_time = (gd_api . godot_method_bind_get_method) (class_name , "get_datetime_string_from_unix_time\0" . as_ptr () as * const c_char) ; table . get_offset_string_from_offset_minutes = (gd_api . godot_method_bind_get_method) (class_name , "get_offset_string_from_offset_minutes\0" . as_ptr () as * const c_char) ; table . get_ticks_msec = (gd_api . godot_method_bind_get_method) (class_name , "get_ticks_msec\0" . as_ptr () as * const c_char) ; table . get_ticks_usec = (gd_api . godot_method_bind_get_method) (class_name , "get_ticks_usec\0" . as_ptr () as * const c_char) ; table . get_time_dict_from_system = (gd_api . godot_method_bind_get_method) (class_name , "get_time_dict_from_system\0" . as_ptr () as * const c_char) ; table . get_time_dict_from_unix_time = (gd_api . godot_method_bind_get_method) (class_name , "get_time_dict_from_unix_time\0" . as_ptr () as * const c_char) ; table . get_time_string_from_system = (gd_api . godot_method_bind_get_method) (class_name , "get_time_string_from_system\0" . as_ptr () as * const c_char) ; table . get_time_string_from_unix_time = (gd_api . godot_method_bind_get_method) (class_name , "get_time_string_from_unix_time\0" . as_ptr () as * const c_char) ; table . get_time_zone_from_system = (gd_api . godot_method_bind_get_method) (class_name , "get_time_zone_from_system\0" . as_ptr () as * const c_char) ; table . get_unix_time_from_datetime_dict = (gd_api . godot_method_bind_get_method) (class_name , "get_unix_time_from_datetime_dict\0" . as_ptr () as * const c_char) ; table . get_unix_time_from_datetime_string = (gd_api . godot_method_bind_get_method) (class_name , "get_unix_time_from_datetime_string\0" . as_ptr () as * const c_char) ; table . get_unix_time_from_system = (gd_api . godot_method_bind_get_method) (class_name , "get_unix_time_from_system\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::time::private::Time;
            
            pub mod timer {
                # ! [doc = "This module contains types related to the API class [`Timer`][super::Timer]."] pub (crate) mod private { # [doc = "`core class Timer` inherits `Node` (manually managed).\n\nThis class has related types in the [`timer`][super::timer] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_timer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Timer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Timer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nTimer inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Timer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Timer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TimerProcessMode (pub i64) ; impl TimerProcessMode { pub const PHYSICS : TimerProcessMode = TimerProcessMode (0i64) ; pub const IDLE : TimerProcessMode = TimerProcessMode (1i64) ; } impl From < i64 > for TimerProcessMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TimerProcessMode > for i64 { # [inline] fn from (v : TimerProcessMode) -> Self { v . 0 } } impl FromVariant for TimerProcessMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Timer { pub const TIMER_PROCESS_PHYSICS : i64 = 0i64 ; pub const TIMER_PROCESS_IDLE : i64 = 1i64 ; } impl Timer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TimerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The timer's remaining time in seconds. Returns 0 if the timer is inactive.\n**Note:** You cannot set this value. To change the timer's remaining time, use [`start`][Self::start]."] # [doc = ""] # [inline] pub fn time_left (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TimerMethodTable :: get (get_api ()) . get_time_left ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Processing mode. See [`TimerProcessMode`][TimerProcessMode]."] # [doc = ""] # [inline] pub fn timer_process_mode (& self) -> crate :: generated :: timer :: TimerProcessMode { unsafe { let method_bind : * mut sys :: godot_method_bind = TimerMethodTable :: get (get_api ()) . get_timer_process_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: timer :: TimerProcessMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The wait time in seconds.\n**Note:** Timers can only emit once per rendered frame at most (or once per physics frame if [`process_mode`][Self::process_mode] is [`TIMER_PROCESS_PHYSICS`][Self::TIMER_PROCESS_PHYSICS]). This means very low wait times (lower than 0.05 seconds) will behave in significantly different ways depending on the rendered framerate. For very low wait times, it is recommended to use a process loop in a script instead of using a Timer node."] # [doc = ""] # [inline] pub fn wait_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TimerMethodTable :: get (get_api ()) . get_wait_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the timer will automatically start when entering the scene tree.\n**Note:** This property is automatically set to `false` after the timer enters the scene tree and starts."] # [doc = ""] # [inline] pub fn has_autostart (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TimerMethodTable :: get (get_api ()) . has_autostart ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the timer will stop when reaching 0. If `false`, it will restart."] # [doc = ""] # [inline] pub fn is_one_shot (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TimerMethodTable :: get (get_api ()) . is_one_shot ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the timer is paused and will not process until it is unpaused again, even if [`start`][Self::start] is called."] # [doc = ""] # [inline] pub fn is_paused (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TimerMethodTable :: get (get_api ()) . is_paused ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the timer is stopped."] # [doc = ""] # [inline] pub fn is_stopped (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TimerMethodTable :: get (get_api ()) . is_stopped ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the timer will automatically start when entering the scene tree.\n**Note:** This property is automatically set to `false` after the timer enters the scene tree and starts."] # [doc = ""] # [inline] pub fn set_autostart (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TimerMethodTable :: get (get_api ()) . set_autostart ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the timer will stop when reaching 0. If `false`, it will restart."] # [doc = ""] # [inline] pub fn set_one_shot (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TimerMethodTable :: get (get_api ()) . set_one_shot ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the timer is paused and will not process until it is unpaused again, even if [`start`][Self::start] is called."] # [doc = ""] # [inline] pub fn set_paused (& self , paused : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TimerMethodTable :: get (get_api ()) . set_paused ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , paused as _) ; } } # [doc = "Processing mode. See [`TimerProcessMode`][TimerProcessMode]."] # [doc = ""] # [inline] pub fn set_timer_process_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TimerMethodTable :: get (get_api ()) . set_timer_process_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The wait time in seconds.\n**Note:** Timers can only emit once per rendered frame at most (or once per physics frame if [`process_mode`][Self::process_mode] is [`TIMER_PROCESS_PHYSICS`][Self::TIMER_PROCESS_PHYSICS]). This means very low wait times (lower than 0.05 seconds) will behave in significantly different ways depending on the rendered framerate. For very low wait times, it is recommended to use a process loop in a script instead of using a Timer node."] # [doc = ""] # [inline] pub fn set_wait_time (& self , time_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TimerMethodTable :: get (get_api ()) . set_wait_time ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , time_sec as _) ; } } # [doc = "Starts the timer. Sets `wait_time` to `time_sec` if `time_sec > 0`. This also resets the remaining time to `wait_time`.\n**Note:** This method will not resume a paused timer. See [`paused`][Self::paused].\n# Default Arguments\n* `time_sec` - `-1`"] # [doc = ""] # [inline] pub fn start (& self , time_sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TimerMethodTable :: get (get_api ()) . start ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , time_sec as _) ; } } # [doc = "Stops the timer."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TimerMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Timer { } unsafe impl GodotObject for Timer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Timer" } } impl QueueFree for Timer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Timer { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Timer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for Timer { } unsafe impl SubClass < crate :: generated :: Object > for Timer { } impl Instanciable for Timer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Timer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TimerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_time_left : * mut sys :: godot_method_bind , pub get_timer_process_mode : * mut sys :: godot_method_bind , pub get_wait_time : * mut sys :: godot_method_bind , pub has_autostart : * mut sys :: godot_method_bind , pub is_one_shot : * mut sys :: godot_method_bind , pub is_paused : * mut sys :: godot_method_bind , pub is_stopped : * mut sys :: godot_method_bind , pub set_autostart : * mut sys :: godot_method_bind , pub set_one_shot : * mut sys :: godot_method_bind , pub set_paused : * mut sys :: godot_method_bind , pub set_timer_process_mode : * mut sys :: godot_method_bind , pub set_wait_time : * mut sys :: godot_method_bind , pub start : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl TimerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TimerMethodTable = TimerMethodTable { class_constructor : None , get_time_left : 0 as * mut sys :: godot_method_bind , get_timer_process_mode : 0 as * mut sys :: godot_method_bind , get_wait_time : 0 as * mut sys :: godot_method_bind , has_autostart : 0 as * mut sys :: godot_method_bind , is_one_shot : 0 as * mut sys :: godot_method_bind , is_paused : 0 as * mut sys :: godot_method_bind , is_stopped : 0 as * mut sys :: godot_method_bind , set_autostart : 0 as * mut sys :: godot_method_bind , set_one_shot : 0 as * mut sys :: godot_method_bind , set_paused : 0 as * mut sys :: godot_method_bind , set_timer_process_mode : 0 as * mut sys :: godot_method_bind , set_wait_time : 0 as * mut sys :: godot_method_bind , start : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TimerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Timer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_time_left = (gd_api . godot_method_bind_get_method) (class_name , "get_time_left\0" . as_ptr () as * const c_char) ; table . get_timer_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_timer_process_mode\0" . as_ptr () as * const c_char) ; table . get_wait_time = (gd_api . godot_method_bind_get_method) (class_name , "get_wait_time\0" . as_ptr () as * const c_char) ; table . has_autostart = (gd_api . godot_method_bind_get_method) (class_name , "has_autostart\0" . as_ptr () as * const c_char) ; table . is_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "is_one_shot\0" . as_ptr () as * const c_char) ; table . is_paused = (gd_api . godot_method_bind_get_method) (class_name , "is_paused\0" . as_ptr () as * const c_char) ; table . is_stopped = (gd_api . godot_method_bind_get_method) (class_name , "is_stopped\0" . as_ptr () as * const c_char) ; table . set_autostart = (gd_api . godot_method_bind_get_method) (class_name , "set_autostart\0" . as_ptr () as * const c_char) ; table . set_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "set_one_shot\0" . as_ptr () as * const c_char) ; table . set_paused = (gd_api . godot_method_bind_get_method) (class_name , "set_paused\0" . as_ptr () as * const c_char) ; table . set_timer_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_timer_process_mode\0" . as_ptr () as * const c_char) ; table . set_wait_time = (gd_api . godot_method_bind_get_method) (class_name , "set_wait_time\0" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::timer::private::Timer;
            
            pub(crate) mod tool_button {
                # ! [doc = "This module contains types related to the API class [`ToolButton`][super::ToolButton]."] pub (crate) mod private { # [doc = "`core class ToolButton` inherits `Button` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_toolbutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ToolButton` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ToolButton>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nToolButton inherits methods from:\n - [Button](struct.Button.html)\n - [BaseButton](struct.BaseButton.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ToolButton { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ToolButton ; impl ToolButton { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ToolButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for ToolButton { } unsafe impl GodotObject for ToolButton { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ToolButton" } } impl QueueFree for ToolButton { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ToolButton { type Target = crate :: generated :: Button ; # [inline] fn deref (& self) -> & crate :: generated :: Button { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ToolButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Button { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Button > for ToolButton { } unsafe impl SubClass < crate :: generated :: BaseButton > for ToolButton { } unsafe impl SubClass < crate :: generated :: Control > for ToolButton { } unsafe impl SubClass < crate :: generated :: CanvasItem > for ToolButton { } unsafe impl SubClass < crate :: generated :: Node > for ToolButton { } unsafe impl SubClass < crate :: generated :: Object > for ToolButton { } impl Instanciable for ToolButton { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ToolButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ToolButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl ToolButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ToolButtonMethodTable = ToolButtonMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ToolButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ToolButton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::tool_button::private::ToolButton;
            
            pub mod touch_screen_button {
                # ! [doc = "This module contains types related to the API class [`TouchScreenButton`][super::TouchScreenButton]."] pub (crate) mod private { # [doc = "`core class TouchScreenButton` inherits `Node2D` (manually managed).\n\nThis class has related types in the [`touch_screen_button`][super::touch_screen_button] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_touchscreenbutton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`TouchScreenButton` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<TouchScreenButton>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nTouchScreenButton inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TouchScreenButton { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TouchScreenButton ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct VisibilityMode (pub i64) ; impl VisibilityMode { pub const ALWAYS : VisibilityMode = VisibilityMode (0i64) ; pub const TOUCHSCREEN_ONLY : VisibilityMode = VisibilityMode (1i64) ; } impl From < i64 > for VisibilityMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < VisibilityMode > for i64 { # [inline] fn from (v : VisibilityMode) -> Self { v . 0 } } impl FromVariant for VisibilityMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TouchScreenButton { pub const VISIBILITY_ALWAYS : i64 = 0i64 ; pub const VISIBILITY_TOUCHSCREEN_ONLY : i64 = 1i64 ; } impl TouchScreenButton { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TouchScreenButtonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The button's action. Actions can be handled with [`InputEventAction`][InputEventAction]."] # [doc = ""] # [inline] pub fn action (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . get_action ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The button's bitmask."] # [doc = ""] # [inline] pub fn bitmask (& self) -> Option < Ref < crate :: generated :: BitMap , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . get_bitmask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: BitMap , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The button's shape."] # [doc = ""] # [inline] pub fn shape (& self) -> Option < Ref < crate :: generated :: Shape2D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . get_shape ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Shape2D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The button's texture for the normal state."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The button's texture for the pressed state."] # [doc = ""] # [inline] pub fn texture_pressed (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . get_texture_pressed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The button's visibility mode. See [`VisibilityMode`][VisibilityMode] for possible values."] # [doc = ""] # [inline] pub fn visibility_mode (& self) -> crate :: generated :: touch_screen_button :: VisibilityMode { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . get_visibility_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: touch_screen_button :: VisibilityMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the `pressed` and `released` signals are emitted whenever a pressed finger goes in and out of the button, even if the pressure started outside the active area of the button.\n**Note:** This is a \"pass-by\" (not \"bypass\") press mode."] # [doc = ""] # [inline] pub fn is_passby_press_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . is_passby_press_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this button is currently pressed."] # [doc = ""] # [inline] pub fn is_pressed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . is_pressed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the button's shape is centered in the provided texture. If no texture is used, this property has no effect."] # [doc = ""] # [inline] pub fn is_shape_centered (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . is_shape_centered ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the button's shape is visible."] # [doc = ""] # [inline] pub fn is_shape_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . is_shape_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The button's action. Actions can be handled with [`InputEventAction`][InputEventAction]."] # [doc = ""] # [inline] pub fn set_action (& self , action : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . set_action ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , action . into ()) ; } } # [doc = "The button's bitmask."] # [doc = ""] # [inline] pub fn set_bitmask (& self , bitmask : impl AsArg < crate :: generated :: BitMap >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . set_bitmask ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , bitmask . as_arg_ptr ()) ; } } # [doc = "If `true`, the `pressed` and `released` signals are emitted whenever a pressed finger goes in and out of the button, even if the pressure started outside the active area of the button.\n**Note:** This is a \"pass-by\" (not \"bypass\") press mode."] # [doc = ""] # [inline] pub fn set_passby_press (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . set_passby_press ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The button's shape."] # [doc = ""] # [inline] pub fn set_shape (& self , shape : impl AsArg < crate :: generated :: Shape2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . set_shape ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , shape . as_arg_ptr ()) ; } } # [doc = "If `true`, the button's shape is centered in the provided texture. If no texture is used, this property has no effect."] # [doc = ""] # [inline] pub fn set_shape_centered (& self , bool : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . set_shape_centered ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , bool as _) ; } } # [doc = "If `true`, the button's shape is visible."] # [doc = ""] # [inline] pub fn set_shape_visible (& self , bool : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . set_shape_visible ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , bool as _) ; } } # [doc = "The button's texture for the normal state."] # [doc = ""] # [inline] pub fn set_texture (& self , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture . as_arg_ptr ()) ; } } # [doc = "The button's texture for the pressed state."] # [doc = ""] # [inline] pub fn set_texture_pressed (& self , texture_pressed : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . set_texture_pressed ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , texture_pressed . as_arg_ptr ()) ; } } # [doc = "The button's visibility mode. See [`VisibilityMode`][VisibilityMode] for possible values."] # [doc = ""] # [inline] pub fn set_visibility_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TouchScreenButtonMethodTable :: get (get_api ()) . set_visibility_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TouchScreenButton { } unsafe impl GodotObject for TouchScreenButton { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "TouchScreenButton" } } impl QueueFree for TouchScreenButton { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for TouchScreenButton { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TouchScreenButton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for TouchScreenButton { } unsafe impl SubClass < crate :: generated :: CanvasItem > for TouchScreenButton { } unsafe impl SubClass < crate :: generated :: Node > for TouchScreenButton { } unsafe impl SubClass < crate :: generated :: Object > for TouchScreenButton { } impl Instanciable for TouchScreenButton { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { TouchScreenButton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TouchScreenButtonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_action : * mut sys :: godot_method_bind , pub get_bitmask : * mut sys :: godot_method_bind , pub get_shape : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_texture_pressed : * mut sys :: godot_method_bind , pub get_visibility_mode : * mut sys :: godot_method_bind , pub is_passby_press_enabled : * mut sys :: godot_method_bind , pub is_pressed : * mut sys :: godot_method_bind , pub is_shape_centered : * mut sys :: godot_method_bind , pub is_shape_visible : * mut sys :: godot_method_bind , pub set_action : * mut sys :: godot_method_bind , pub set_bitmask : * mut sys :: godot_method_bind , pub set_passby_press : * mut sys :: godot_method_bind , pub set_shape : * mut sys :: godot_method_bind , pub set_shape_centered : * mut sys :: godot_method_bind , pub set_shape_visible : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_texture_pressed : * mut sys :: godot_method_bind , pub set_visibility_mode : * mut sys :: godot_method_bind } impl TouchScreenButtonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TouchScreenButtonMethodTable = TouchScreenButtonMethodTable { class_constructor : None , get_action : 0 as * mut sys :: godot_method_bind , get_bitmask : 0 as * mut sys :: godot_method_bind , get_shape : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_texture_pressed : 0 as * mut sys :: godot_method_bind , get_visibility_mode : 0 as * mut sys :: godot_method_bind , is_passby_press_enabled : 0 as * mut sys :: godot_method_bind , is_pressed : 0 as * mut sys :: godot_method_bind , is_shape_centered : 0 as * mut sys :: godot_method_bind , is_shape_visible : 0 as * mut sys :: godot_method_bind , set_action : 0 as * mut sys :: godot_method_bind , set_bitmask : 0 as * mut sys :: godot_method_bind , set_passby_press : 0 as * mut sys :: godot_method_bind , set_shape : 0 as * mut sys :: godot_method_bind , set_shape_centered : 0 as * mut sys :: godot_method_bind , set_shape_visible : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_texture_pressed : 0 as * mut sys :: godot_method_bind , set_visibility_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TouchScreenButtonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TouchScreenButton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_action = (gd_api . godot_method_bind_get_method) (class_name , "get_action\0" . as_ptr () as * const c_char) ; table . get_bitmask = (gd_api . godot_method_bind_get_method) (class_name , "get_bitmask\0" . as_ptr () as * const c_char) ; table . get_shape = (gd_api . godot_method_bind_get_method) (class_name , "get_shape\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_texture_pressed = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_pressed\0" . as_ptr () as * const c_char) ; table . get_visibility_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_visibility_mode\0" . as_ptr () as * const c_char) ; table . is_passby_press_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_passby_press_enabled\0" . as_ptr () as * const c_char) ; table . is_pressed = (gd_api . godot_method_bind_get_method) (class_name , "is_pressed\0" . as_ptr () as * const c_char) ; table . is_shape_centered = (gd_api . godot_method_bind_get_method) (class_name , "is_shape_centered\0" . as_ptr () as * const c_char) ; table . is_shape_visible = (gd_api . godot_method_bind_get_method) (class_name , "is_shape_visible\0" . as_ptr () as * const c_char) ; table . set_action = (gd_api . godot_method_bind_get_method) (class_name , "set_action\0" . as_ptr () as * const c_char) ; table . set_bitmask = (gd_api . godot_method_bind_get_method) (class_name , "set_bitmask\0" . as_ptr () as * const c_char) ; table . set_passby_press = (gd_api . godot_method_bind_get_method) (class_name , "set_passby_press\0" . as_ptr () as * const c_char) ; table . set_shape = (gd_api . godot_method_bind_get_method) (class_name , "set_shape\0" . as_ptr () as * const c_char) ; table . set_shape_centered = (gd_api . godot_method_bind_get_method) (class_name , "set_shape_centered\0" . as_ptr () as * const c_char) ; table . set_shape_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_shape_visible\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_texture_pressed = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_pressed\0" . as_ptr () as * const c_char) ; table . set_visibility_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_visibility_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::touch_screen_button::private::TouchScreenButton;
            
            pub(crate) mod translation {
                # ! [doc = "This module contains types related to the API class [`Translation`][super::Translation]."] pub (crate) mod private { # [doc = "`core class Translation` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_translation.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTranslation inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Translation { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Translation ; impl Translation { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TranslationMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds a message if nonexistent, followed by its translation."] # [doc = ""] # [inline] pub fn add_message (& self , src_message : impl Into < GodotString > , xlated_message : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationMethodTable :: get (get_api ()) . add_message ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , src_message . into () , xlated_message . into ()) ; } } # [doc = "Erases a message."] # [doc = ""] # [inline] pub fn erase_message (& self , src_message : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationMethodTable :: get (get_api ()) . erase_message ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , src_message . into ()) ; } } # [doc = "The locale of the translation."] # [doc = ""] # [inline] pub fn locale (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationMethodTable :: get (get_api ()) . get_locale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a message's translation."] # [doc = ""] # [inline] pub fn get_message (& self , src_message : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationMethodTable :: get (get_api ()) . get_message ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , src_message . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of existing messages."] # [doc = ""] # [inline] pub fn get_message_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationMethodTable :: get (get_api ()) . get_message_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns all the messages (keys)."] # [doc = ""] # [inline] pub fn get_message_list (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationMethodTable :: get (get_api ()) . get_message_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The locale of the translation."] # [doc = ""] # [inline] pub fn set_locale (& self , locale : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationMethodTable :: get (get_api ()) . set_locale ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , locale . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Translation { } unsafe impl GodotObject for Translation { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Translation" } } impl std :: ops :: Deref for Translation { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Translation { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for Translation { } unsafe impl SubClass < crate :: generated :: Reference > for Translation { } unsafe impl SubClass < crate :: generated :: Object > for Translation { } impl Instanciable for Translation { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Translation :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TranslationMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_message : * mut sys :: godot_method_bind , pub erase_message : * mut sys :: godot_method_bind , pub get_locale : * mut sys :: godot_method_bind , pub get_message : * mut sys :: godot_method_bind , pub get_message_count : * mut sys :: godot_method_bind , pub get_message_list : * mut sys :: godot_method_bind , pub set_locale : * mut sys :: godot_method_bind } impl TranslationMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TranslationMethodTable = TranslationMethodTable { class_constructor : None , add_message : 0 as * mut sys :: godot_method_bind , erase_message : 0 as * mut sys :: godot_method_bind , get_locale : 0 as * mut sys :: godot_method_bind , get_message : 0 as * mut sys :: godot_method_bind , get_message_count : 0 as * mut sys :: godot_method_bind , get_message_list : 0 as * mut sys :: godot_method_bind , set_locale : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TranslationMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Translation\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_message = (gd_api . godot_method_bind_get_method) (class_name , "add_message\0" . as_ptr () as * const c_char) ; table . erase_message = (gd_api . godot_method_bind_get_method) (class_name , "erase_message\0" . as_ptr () as * const c_char) ; table . get_locale = (gd_api . godot_method_bind_get_method) (class_name , "get_locale\0" . as_ptr () as * const c_char) ; table . get_message = (gd_api . godot_method_bind_get_method) (class_name , "get_message\0" . as_ptr () as * const c_char) ; table . get_message_count = (gd_api . godot_method_bind_get_method) (class_name , "get_message_count\0" . as_ptr () as * const c_char) ; table . get_message_list = (gd_api . godot_method_bind_get_method) (class_name , "get_message_list\0" . as_ptr () as * const c_char) ; table . set_locale = (gd_api . godot_method_bind_get_method) (class_name , "set_locale\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::translation::private::Translation;
            
            pub(crate) mod translation_server {
                # ! [doc = "This module contains types related to the API class [`TranslationServer`][super::TranslationServer]."] pub (crate) mod private { # [doc = "`core singleton class TranslationServer` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_translationserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nTranslationServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TranslationServer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TranslationServer ; impl TranslationServer { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("TranslationServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Adds a [`Translation`][Translation] resource."] # [doc = ""] # [inline] pub fn add_translation (& self , translation : impl AsArg < crate :: generated :: Translation >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . add_translation ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , translation . as_arg_ptr ()) ; } } # [doc = "Clears the server from all translations."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns an array of all loaded locales of the project."] # [doc = ""] # [inline] pub fn get_loaded_locales (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . get_loaded_locales ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current locale of the project.\nSee also [`OS.get_locale`][OS::get_locale] and [`OS.get_locale_language`][OS::get_locale_language] to query the locale of the user system."] # [doc = ""] # [inline] pub fn get_locale (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . get_locale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a locale's language and its variant (e.g. `\"en_US\"` would return `\"English (United States)\"`)."] # [doc = ""] # [inline] pub fn get_locale_name (& self , locale : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . get_locale_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , locale . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Removes the given translation from the server."] # [doc = ""] # [inline] pub fn remove_translation (& self , translation : impl AsArg < crate :: generated :: Translation >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . remove_translation ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , translation . as_arg_ptr ()) ; } } # [doc = "Sets the locale of the project. The `locale` string will be standardized to match known locales (e.g. `en-US` would be matched to `en_US`).\nIf translations have been loaded beforehand for the new locale, they will be applied."] # [doc = ""] # [inline] pub fn set_locale (& self , locale : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . set_locale ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , locale . into ()) ; } } # [doc = "Returns the current locale's translation for the given message (key)."] # [doc = ""] # [inline] pub fn translate (& self , message : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TranslationServerMethodTable :: get (get_api ()) . translate ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , message . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for TranslationServer { } unsafe impl GodotObject for TranslationServer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "TranslationServer" } } impl std :: ops :: Deref for TranslationServer { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TranslationServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for TranslationServer { } unsafe impl Send for TranslationServer { } unsafe impl Sync for TranslationServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TranslationServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_translation : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub get_loaded_locales : * mut sys :: godot_method_bind , pub get_locale : * mut sys :: godot_method_bind , pub get_locale_name : * mut sys :: godot_method_bind , pub remove_translation : * mut sys :: godot_method_bind , pub set_locale : * mut sys :: godot_method_bind , pub translate : * mut sys :: godot_method_bind } impl TranslationServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TranslationServerMethodTable = TranslationServerMethodTable { class_constructor : None , add_translation : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , get_loaded_locales : 0 as * mut sys :: godot_method_bind , get_locale : 0 as * mut sys :: godot_method_bind , get_locale_name : 0 as * mut sys :: godot_method_bind , remove_translation : 0 as * mut sys :: godot_method_bind , set_locale : 0 as * mut sys :: godot_method_bind , translate : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TranslationServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TranslationServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_translation = (gd_api . godot_method_bind_get_method) (class_name , "add_translation\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . get_loaded_locales = (gd_api . godot_method_bind_get_method) (class_name , "get_loaded_locales\0" . as_ptr () as * const c_char) ; table . get_locale = (gd_api . godot_method_bind_get_method) (class_name , "get_locale\0" . as_ptr () as * const c_char) ; table . get_locale_name = (gd_api . godot_method_bind_get_method) (class_name , "get_locale_name\0" . as_ptr () as * const c_char) ; table . remove_translation = (gd_api . godot_method_bind_get_method) (class_name , "remove_translation\0" . as_ptr () as * const c_char) ; table . set_locale = (gd_api . godot_method_bind_get_method) (class_name , "set_locale\0" . as_ptr () as * const c_char) ; table . translate = (gd_api . godot_method_bind_get_method) (class_name , "translate\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::translation_server::private::TranslationServer;
            
            pub mod tree {
                # ! [doc = "This module contains types related to the API class [`Tree`][super::Tree]."] pub (crate) mod private { # [doc = "`core class Tree` inherits `Control` (manually managed).\n\nThis class has related types in the [`tree`][super::tree] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_tree.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Tree` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Tree>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nTree inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Tree { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Tree ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DropModeFlags (pub i64) ; impl DropModeFlags { pub const DISABLED : DropModeFlags = DropModeFlags (0i64) ; pub const ON_ITEM : DropModeFlags = DropModeFlags (1i64) ; pub const INBETWEEN : DropModeFlags = DropModeFlags (2i64) ; } impl From < i64 > for DropModeFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DropModeFlags > for i64 { # [inline] fn from (v : DropModeFlags) -> Self { v . 0 } } impl FromVariant for DropModeFlags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SelectMode (pub i64) ; impl SelectMode { pub const SINGLE : SelectMode = SelectMode (0i64) ; pub const ROW : SelectMode = SelectMode (1i64) ; pub const MULTI : SelectMode = SelectMode (2i64) ; } impl From < i64 > for SelectMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SelectMode > for i64 { # [inline] fn from (v : SelectMode) -> Self { v . 0 } } impl FromVariant for SelectMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Tree { pub const DROP_MODE_DISABLED : i64 = 0i64 ; pub const SELECT_SINGLE : i64 = 0i64 ; pub const DROP_MODE_ON_ITEM : i64 = 1i64 ; pub const SELECT_ROW : i64 = 1i64 ; pub const DROP_MODE_INBETWEEN : i64 = 2i64 ; pub const SELECT_MULTI : i64 = 2i64 ; } impl Tree { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TreeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, column titles are visible."] # [doc = ""] # [inline] pub fn are_column_titles_visible (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . are_column_titles_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Clears the tree. This removes all items."] # [doc = ""] # [inline] pub fn clear (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . clear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Creates an item in the tree and adds it as a child of `parent`, which can be either a valid [`TreeItem`][TreeItem] or `null`.\nIf `parent` is `null`, the root item will be the parent, or the new item will be the root itself if the tree is empty.\nThe new item will be the `idx`th child of parent, or it will be the last child if there are not enough siblings.\n# Default Arguments\n* `parent` - `null`\n* `idx` - `-1`"] # [doc = ""] # [inline] pub fn create_item (& self , parent : impl AsArg < crate :: generated :: Object > , idx : i64) -> Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . create_item ; let ret = crate :: icalls :: icallvar__obj_i64 (method_bind , self . this . sys () . as_ptr () , parent . as_arg_ptr () , idx as _) ; < Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Edits the selected tree item as if it was clicked. The item must be set editable with [`TreeItem.set_editable`][TreeItem::set_editable]. Returns `true` if the item could be edited. Fails if no item is selected."] # [doc = ""] # [inline] pub fn edit_selected (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . edit_selected ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Makes the currently focused cell visible.\nThis will scroll the tree if necessary. In [`SELECT_ROW`][Self::SELECT_ROW] mode, this will not do horizontal scrolling, as all the cells in the selected row is focused logically.\n**Note:** Despite the name of this method, the focus cursor itself is only visible in [`SELECT_MULTI`][Self::SELECT_MULTI] mode."] # [doc = ""] # [inline] pub fn ensure_cursor_is_visible (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . ensure_cursor_is_visible ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the currently selected cell may be selected again."] # [doc = ""] # [inline] pub fn allow_reselect (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_allow_reselect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, a right mouse button click can select items."] # [doc = ""] # [inline] pub fn allow_rmb_select (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_allow_rmb_select ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the button id at `position`, or -1 if no button is there."] # [doc = ""] # [inline] pub fn get_button_id_at_position (& self , position : Vector2) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_button_id_at_position ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the column index at `position`, or -1 if no item is there."] # [doc = ""] # [inline] pub fn get_column_at_position (& self , position : Vector2) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_column_at_position ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the column's title."] # [doc = ""] # [inline] pub fn get_column_title (& self , column : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_column_title ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the column's width in pixels."] # [doc = ""] # [inline] pub fn get_column_width (& self , column : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_column_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The number of columns."] # [doc = ""] # [inline] pub fn columns (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_columns ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See [`TreeItem.set_cell_mode`][TreeItem::set_cell_mode]."] # [doc = ""] # [inline] pub fn get_custom_popup_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_custom_popup_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The drop mode as an OR combination of flags. See [`DropModeFlags`][DropModeFlags] constants. Once dropping is done, reverts to [`DROP_MODE_DISABLED`][Self::DROP_MODE_DISABLED]. Setting this during [`Control.can_drop_data`][Control::can_drop_data] is recommended.\nThis controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position."] # [doc = ""] # [inline] pub fn drop_mode_flags (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_drop_mode_flags ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the drop section at `position`, or -100 if no item is there.\nValues -1, 0, or 1 will be returned for the \"above item\", \"on item\", and \"below item\" drop sections, respectively. See [`DropModeFlags`][DropModeFlags] for a description of each drop section.\nTo get the item which the returned drop section is relative to, use [`get_item_at_position`][Self::get_item_at_position]."] # [doc = ""] # [inline] pub fn get_drop_section_at_position (& self , position : Vector2) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_drop_section_at_position ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the currently edited item. Can be used with `item_edited` to get the item that was modified.\n```gdscript\nfunc _ready():\n    $Tree.connect(\"item_edited\", self, \"on_Tree_item_edited\")\n\nfunc on_Tree_item_edited():\n    print($Tree.get_edited()) # This item just got edited (e.g. checked).\n```"] # [doc = ""] # [inline] pub fn get_edited (& self) -> Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_edited ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the column for the currently edited item."] # [doc = ""] # [inline] pub fn get_edited_column (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_edited_column ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the rectangle area for the specified [`TreeItem`][TreeItem]. If `column` is specified, only get the position and size of that column, otherwise get the rectangle containing all columns.\n# Default Arguments\n* `column` - `-1`"] # [doc = ""] # [inline] pub fn get_item_area_rect (& self , item : impl AsArg < crate :: generated :: Object > , column : i64) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_item_area_rect ; let ret = crate :: icalls :: icallvar__obj_i64 (method_bind , self . this . sys () . as_ptr () , item . as_arg_ptr () , column as _) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the tree item at the specified position (relative to the tree origin position)."] # [doc = ""] # [inline] pub fn get_item_at_position (& self , position : Vector2) -> Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_item_at_position ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; < Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the next selected [`TreeItem`][TreeItem] after the given one, or `null` if the end is reached.\nIf `from` is `null`, this returns the first selected item."] # [doc = ""] # [inline] pub fn get_next_selected (& self , from : impl AsArg < crate :: generated :: Object >) -> Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_next_selected ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , from . as_arg_ptr ()) ; < Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the last pressed button's index."] # [doc = ""] # [inline] pub fn get_pressed_button (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_pressed_button ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the tree's root item, or `null` if the tree is empty."] # [doc = ""] # [inline] pub fn get_root (& self) -> Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_root ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current scrolling position."] # [doc = ""] # [inline] pub fn get_scroll (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_scroll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Allows single or multiple selection. See the [`SelectMode`][SelectMode] constants."] # [doc = ""] # [inline] pub fn select_mode (& self) -> crate :: generated :: tree :: SelectMode { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_select_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: tree :: SelectMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the currently focused item, or `null` if no item is focused.\nIn [`SELECT_ROW`][Self::SELECT_ROW] and [`SELECT_SINGLE`][Self::SELECT_SINGLE] modes, the focused item is same as the selected item. In [`SELECT_MULTI`][Self::SELECT_MULTI] mode, the focused item is the item under the focus cursor, not necessarily selected.\nTo get the currently selected item(s), use [`get_next_selected`][Self::get_next_selected]."] # [doc = ""] # [inline] pub fn get_selected (& self) -> Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_selected ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the currently focused column, or -1 if no column is focused.\nIn [`SELECT_SINGLE`][Self::SELECT_SINGLE] mode, the focused column is the selected column. In [`SELECT_ROW`][Self::SELECT_ROW] mode, the focused column is always 0 if any item is selected. In [`SELECT_MULTI`][Self::SELECT_MULTI] mode, the focused column is the column under the focus cursor, and there are not necessarily any column selected.\nTo tell whether a column of an item is selected, use [`TreeItem.is_selected`][TreeItem::is_selected]."] # [doc = ""] # [inline] pub fn get_selected_column (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . get_selected_column ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the folding arrow is hidden."] # [doc = ""] # [inline] pub fn is_folding_hidden (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . is_folding_hidden ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the tree's root is hidden."] # [doc = ""] # [inline] pub fn is_root_hidden (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . is_root_hidden ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Causes the [`Tree`][Tree] to jump to the specified [`TreeItem`][TreeItem]."] # [doc = ""] # [inline] pub fn scroll_to_item (& self , item : impl AsArg < crate :: generated :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . scroll_to_item ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , item . as_arg_ptr ()) ; } } # [doc = "If `true`, the currently selected cell may be selected again."] # [doc = ""] # [inline] pub fn set_allow_reselect (& self , allow : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . set_allow_reselect ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , allow as _) ; } } # [doc = "If `true`, a right mouse button click can select items."] # [doc = ""] # [inline] pub fn set_allow_rmb_select (& self , allow : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . set_allow_rmb_select ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , allow as _) ; } } # [doc = "If `true`, the column will have the \"Expand\" flag of [`Control`][Control]. Columns that have the \"Expand\" flag will use their \"min_width\" in a similar fashion to [`Control.size_flags_stretch_ratio`][Control::size_flags_stretch_ratio]."] # [doc = ""] # [inline] pub fn set_column_expand (& self , column : i64 , expand : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . set_column_expand ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , column as _ , expand as _) ; } } # [doc = "Sets the minimum width of a column. Columns that have the \"Expand\" flag will use their \"min_width\" in a similar fashion to [`Control.size_flags_stretch_ratio`][Control::size_flags_stretch_ratio]."] # [doc = ""] # [inline] pub fn set_column_min_width (& self , column : i64 , min_width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . set_column_min_width ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , column as _ , min_width as _) ; } } # [doc = "Sets the title of a column."] # [doc = ""] # [inline] pub fn set_column_title (& self , column : i64 , title : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . set_column_title ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , column as _ , title . into ()) ; } } # [doc = "If `true`, column titles are visible."] # [doc = ""] # [inline] pub fn set_column_titles_visible (& self , visible : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . set_column_titles_visible ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , visible as _) ; } } # [doc = "The number of columns."] # [doc = ""] # [inline] pub fn set_columns (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . set_columns ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = "The drop mode as an OR combination of flags. See [`DropModeFlags`][DropModeFlags] constants. Once dropping is done, reverts to [`DROP_MODE_DISABLED`][Self::DROP_MODE_DISABLED]. Setting this during [`Control.can_drop_data`][Control::can_drop_data] is recommended.\nThis controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position."] # [doc = ""] # [inline] pub fn set_drop_mode_flags (& self , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . set_drop_mode_flags ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , flags as _) ; } } # [doc = "If `true`, the folding arrow is hidden."] # [doc = ""] # [inline] pub fn set_hide_folding (& self , hide : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . set_hide_folding ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , hide as _) ; } } # [doc = "If `true`, the tree's root is hidden."] # [doc = ""] # [inline] pub fn set_hide_root (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . set_hide_root ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Allows single or multiple selection. See the [`SelectMode`][SelectMode] constants."] # [doc = ""] # [inline] pub fn set_select_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeMethodTable :: get (get_api ()) . set_select_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Tree { } unsafe impl GodotObject for Tree { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Tree" } } impl QueueFree for Tree { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Tree { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Tree { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for Tree { } unsafe impl SubClass < crate :: generated :: CanvasItem > for Tree { } unsafe impl SubClass < crate :: generated :: Node > for Tree { } unsafe impl SubClass < crate :: generated :: Object > for Tree { } impl Instanciable for Tree { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Tree :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TreeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub are_column_titles_visible : * mut sys :: godot_method_bind , pub clear : * mut sys :: godot_method_bind , pub create_item : * mut sys :: godot_method_bind , pub edit_selected : * mut sys :: godot_method_bind , pub ensure_cursor_is_visible : * mut sys :: godot_method_bind , pub get_allow_reselect : * mut sys :: godot_method_bind , pub get_allow_rmb_select : * mut sys :: godot_method_bind , pub get_button_id_at_position : * mut sys :: godot_method_bind , pub get_column_at_position : * mut sys :: godot_method_bind , pub get_column_title : * mut sys :: godot_method_bind , pub get_column_width : * mut sys :: godot_method_bind , pub get_columns : * mut sys :: godot_method_bind , pub get_custom_popup_rect : * mut sys :: godot_method_bind , pub get_drop_mode_flags : * mut sys :: godot_method_bind , pub get_drop_section_at_position : * mut sys :: godot_method_bind , pub get_edited : * mut sys :: godot_method_bind , pub get_edited_column : * mut sys :: godot_method_bind , pub get_item_area_rect : * mut sys :: godot_method_bind , pub get_item_at_position : * mut sys :: godot_method_bind , pub get_next_selected : * mut sys :: godot_method_bind , pub get_pressed_button : * mut sys :: godot_method_bind , pub get_root : * mut sys :: godot_method_bind , pub get_scroll : * mut sys :: godot_method_bind , pub get_select_mode : * mut sys :: godot_method_bind , pub get_selected : * mut sys :: godot_method_bind , pub get_selected_column : * mut sys :: godot_method_bind , pub is_folding_hidden : * mut sys :: godot_method_bind , pub is_root_hidden : * mut sys :: godot_method_bind , pub scroll_to_item : * mut sys :: godot_method_bind , pub set_allow_reselect : * mut sys :: godot_method_bind , pub set_allow_rmb_select : * mut sys :: godot_method_bind , pub set_column_expand : * mut sys :: godot_method_bind , pub set_column_min_width : * mut sys :: godot_method_bind , pub set_column_title : * mut sys :: godot_method_bind , pub set_column_titles_visible : * mut sys :: godot_method_bind , pub set_columns : * mut sys :: godot_method_bind , pub set_drop_mode_flags : * mut sys :: godot_method_bind , pub set_hide_folding : * mut sys :: godot_method_bind , pub set_hide_root : * mut sys :: godot_method_bind , pub set_select_mode : * mut sys :: godot_method_bind } impl TreeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TreeMethodTable = TreeMethodTable { class_constructor : None , are_column_titles_visible : 0 as * mut sys :: godot_method_bind , clear : 0 as * mut sys :: godot_method_bind , create_item : 0 as * mut sys :: godot_method_bind , edit_selected : 0 as * mut sys :: godot_method_bind , ensure_cursor_is_visible : 0 as * mut sys :: godot_method_bind , get_allow_reselect : 0 as * mut sys :: godot_method_bind , get_allow_rmb_select : 0 as * mut sys :: godot_method_bind , get_button_id_at_position : 0 as * mut sys :: godot_method_bind , get_column_at_position : 0 as * mut sys :: godot_method_bind , get_column_title : 0 as * mut sys :: godot_method_bind , get_column_width : 0 as * mut sys :: godot_method_bind , get_columns : 0 as * mut sys :: godot_method_bind , get_custom_popup_rect : 0 as * mut sys :: godot_method_bind , get_drop_mode_flags : 0 as * mut sys :: godot_method_bind , get_drop_section_at_position : 0 as * mut sys :: godot_method_bind , get_edited : 0 as * mut sys :: godot_method_bind , get_edited_column : 0 as * mut sys :: godot_method_bind , get_item_area_rect : 0 as * mut sys :: godot_method_bind , get_item_at_position : 0 as * mut sys :: godot_method_bind , get_next_selected : 0 as * mut sys :: godot_method_bind , get_pressed_button : 0 as * mut sys :: godot_method_bind , get_root : 0 as * mut sys :: godot_method_bind , get_scroll : 0 as * mut sys :: godot_method_bind , get_select_mode : 0 as * mut sys :: godot_method_bind , get_selected : 0 as * mut sys :: godot_method_bind , get_selected_column : 0 as * mut sys :: godot_method_bind , is_folding_hidden : 0 as * mut sys :: godot_method_bind , is_root_hidden : 0 as * mut sys :: godot_method_bind , scroll_to_item : 0 as * mut sys :: godot_method_bind , set_allow_reselect : 0 as * mut sys :: godot_method_bind , set_allow_rmb_select : 0 as * mut sys :: godot_method_bind , set_column_expand : 0 as * mut sys :: godot_method_bind , set_column_min_width : 0 as * mut sys :: godot_method_bind , set_column_title : 0 as * mut sys :: godot_method_bind , set_column_titles_visible : 0 as * mut sys :: godot_method_bind , set_columns : 0 as * mut sys :: godot_method_bind , set_drop_mode_flags : 0 as * mut sys :: godot_method_bind , set_hide_folding : 0 as * mut sys :: godot_method_bind , set_hide_root : 0 as * mut sys :: godot_method_bind , set_select_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TreeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Tree\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . are_column_titles_visible = (gd_api . godot_method_bind_get_method) (class_name , "are_column_titles_visible\0" . as_ptr () as * const c_char) ; table . clear = (gd_api . godot_method_bind_get_method) (class_name , "clear\0" . as_ptr () as * const c_char) ; table . create_item = (gd_api . godot_method_bind_get_method) (class_name , "create_item\0" . as_ptr () as * const c_char) ; table . edit_selected = (gd_api . godot_method_bind_get_method) (class_name , "edit_selected\0" . as_ptr () as * const c_char) ; table . ensure_cursor_is_visible = (gd_api . godot_method_bind_get_method) (class_name , "ensure_cursor_is_visible\0" . as_ptr () as * const c_char) ; table . get_allow_reselect = (gd_api . godot_method_bind_get_method) (class_name , "get_allow_reselect\0" . as_ptr () as * const c_char) ; table . get_allow_rmb_select = (gd_api . godot_method_bind_get_method) (class_name , "get_allow_rmb_select\0" . as_ptr () as * const c_char) ; table . get_button_id_at_position = (gd_api . godot_method_bind_get_method) (class_name , "get_button_id_at_position\0" . as_ptr () as * const c_char) ; table . get_column_at_position = (gd_api . godot_method_bind_get_method) (class_name , "get_column_at_position\0" . as_ptr () as * const c_char) ; table . get_column_title = (gd_api . godot_method_bind_get_method) (class_name , "get_column_title\0" . as_ptr () as * const c_char) ; table . get_column_width = (gd_api . godot_method_bind_get_method) (class_name , "get_column_width\0" . as_ptr () as * const c_char) ; table . get_columns = (gd_api . godot_method_bind_get_method) (class_name , "get_columns\0" . as_ptr () as * const c_char) ; table . get_custom_popup_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_popup_rect\0" . as_ptr () as * const c_char) ; table . get_drop_mode_flags = (gd_api . godot_method_bind_get_method) (class_name , "get_drop_mode_flags\0" . as_ptr () as * const c_char) ; table . get_drop_section_at_position = (gd_api . godot_method_bind_get_method) (class_name , "get_drop_section_at_position\0" . as_ptr () as * const c_char) ; table . get_edited = (gd_api . godot_method_bind_get_method) (class_name , "get_edited\0" . as_ptr () as * const c_char) ; table . get_edited_column = (gd_api . godot_method_bind_get_method) (class_name , "get_edited_column\0" . as_ptr () as * const c_char) ; table . get_item_area_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_item_area_rect\0" . as_ptr () as * const c_char) ; table . get_item_at_position = (gd_api . godot_method_bind_get_method) (class_name , "get_item_at_position\0" . as_ptr () as * const c_char) ; table . get_next_selected = (gd_api . godot_method_bind_get_method) (class_name , "get_next_selected\0" . as_ptr () as * const c_char) ; table . get_pressed_button = (gd_api . godot_method_bind_get_method) (class_name , "get_pressed_button\0" . as_ptr () as * const c_char) ; table . get_root = (gd_api . godot_method_bind_get_method) (class_name , "get_root\0" . as_ptr () as * const c_char) ; table . get_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_scroll\0" . as_ptr () as * const c_char) ; table . get_select_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_select_mode\0" . as_ptr () as * const c_char) ; table . get_selected = (gd_api . godot_method_bind_get_method) (class_name , "get_selected\0" . as_ptr () as * const c_char) ; table . get_selected_column = (gd_api . godot_method_bind_get_method) (class_name , "get_selected_column\0" . as_ptr () as * const c_char) ; table . is_folding_hidden = (gd_api . godot_method_bind_get_method) (class_name , "is_folding_hidden\0" . as_ptr () as * const c_char) ; table . is_root_hidden = (gd_api . godot_method_bind_get_method) (class_name , "is_root_hidden\0" . as_ptr () as * const c_char) ; table . scroll_to_item = (gd_api . godot_method_bind_get_method) (class_name , "scroll_to_item\0" . as_ptr () as * const c_char) ; table . set_allow_reselect = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_reselect\0" . as_ptr () as * const c_char) ; table . set_allow_rmb_select = (gd_api . godot_method_bind_get_method) (class_name , "set_allow_rmb_select\0" . as_ptr () as * const c_char) ; table . set_column_expand = (gd_api . godot_method_bind_get_method) (class_name , "set_column_expand\0" . as_ptr () as * const c_char) ; table . set_column_min_width = (gd_api . godot_method_bind_get_method) (class_name , "set_column_min_width\0" . as_ptr () as * const c_char) ; table . set_column_title = (gd_api . godot_method_bind_get_method) (class_name , "set_column_title\0" . as_ptr () as * const c_char) ; table . set_column_titles_visible = (gd_api . godot_method_bind_get_method) (class_name , "set_column_titles_visible\0" . as_ptr () as * const c_char) ; table . set_columns = (gd_api . godot_method_bind_get_method) (class_name , "set_columns\0" . as_ptr () as * const c_char) ; table . set_drop_mode_flags = (gd_api . godot_method_bind_get_method) (class_name , "set_drop_mode_flags\0" . as_ptr () as * const c_char) ; table . set_hide_folding = (gd_api . godot_method_bind_get_method) (class_name , "set_hide_folding\0" . as_ptr () as * const c_char) ; table . set_hide_root = (gd_api . godot_method_bind_get_method) (class_name , "set_hide_root\0" . as_ptr () as * const c_char) ; table . set_select_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_select_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::tree::private::Tree;
            
            pub mod tree_item {
                # ! [doc = "This module contains types related to the API class [`TreeItem`][super::TreeItem]."] pub (crate) mod private { # [doc = "`core class TreeItem` inherits `Object` (manually managed).\n\nThis class has related types in the [`tree_item`][super::tree_item] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_treeitem.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nTreeItem inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TreeItem { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TreeItem ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TextAlign (pub i64) ; impl TextAlign { pub const LEFT : TextAlign = TextAlign (0i64) ; pub const CENTER : TextAlign = TextAlign (1i64) ; pub const RIGHT : TextAlign = TextAlign (2i64) ; } impl From < i64 > for TextAlign { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TextAlign > for i64 { # [inline] fn from (v : TextAlign) -> Self { v . 0 } } impl FromVariant for TextAlign { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TreeCellMode (pub i64) ; impl TreeCellMode { pub const STRING : TreeCellMode = TreeCellMode (0i64) ; pub const CHECK : TreeCellMode = TreeCellMode (1i64) ; pub const RANGE : TreeCellMode = TreeCellMode (2i64) ; pub const ICON : TreeCellMode = TreeCellMode (3i64) ; pub const CUSTOM : TreeCellMode = TreeCellMode (4i64) ; } impl From < i64 > for TreeCellMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TreeCellMode > for i64 { # [inline] fn from (v : TreeCellMode) -> Self { v . 0 } } impl FromVariant for TreeCellMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl TreeItem { pub const ALIGN_LEFT : i64 = 0i64 ; pub const CELL_MODE_STRING : i64 = 0i64 ; pub const ALIGN_CENTER : i64 = 1i64 ; pub const CELL_MODE_CHECK : i64 = 1i64 ; pub const ALIGN_RIGHT : i64 = 2i64 ; pub const CELL_MODE_RANGE : i64 = 2i64 ; pub const CELL_MODE_ICON : i64 = 3i64 ; pub const CELL_MODE_CUSTOM : i64 = 4i64 ; } impl TreeItem { # [doc = "Adds a button with [`Texture`][Texture] `button` at column `column`. The `id` is used to identify the button. If not specified, the next available index is used, which may be retrieved by calling [`get_button_count`][Self::get_button_count] immediately before this method. Optionally, the button can be `disabled` and have a `tooltip`.\n# Default Arguments\n* `id` - `-1`\n* `disabled` - `false`\n* `tooltip` - `\"\"`"] # [doc = ""] # [inline] pub fn add_button (& self , column : i64 , button : impl AsArg < crate :: generated :: Texture > , id : i64 , disabled : bool , tooltip : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . add_button ; let ret = crate :: icalls :: icallvar__i64_obj_i64_bool_str (method_bind , self . this . sys () . as_ptr () , column as _ , button . as_arg_ptr () , id as _ , disabled as _ , tooltip . into ()) ; } } # [doc = "Calls the `method` on the actual TreeItem and its children recursively. Pass parameters as a comma separated list."] # [doc = ""] # [inline] pub fn call_recursive (& self , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . call_recursive ; let ret = crate :: icalls :: icallvarargs__str (method_bind , self . this . sys () . as_ptr () , method . into () , varargs) ; ret } } # [doc = "Resets the background color for the given column to default."] # [doc = ""] # [inline] pub fn clear_custom_bg_color (& self , column : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . clear_custom_bg_color ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; } } # [doc = "Resets the color for the given column to default."] # [doc = ""] # [inline] pub fn clear_custom_color (& self , column : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . clear_custom_color ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; } } # [doc = "Deselects the given column."] # [doc = ""] # [inline] pub fn deselect (& self , column : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . deselect ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; } } # [doc = "Removes the button at index `button_idx` in column `column`."] # [doc = ""] # [inline] pub fn erase_button (& self , column : i64 , button_idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . erase_button ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , column as _ , button_idx as _) ; } } # [doc = "Returns the [`Texture`][Texture] of the button at index `button_idx` in column `column`."] # [doc = ""] # [inline] pub fn get_button (& self , column : i64 , button_idx : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_button ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , column as _ , button_idx as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the button index if there is a button with id `id` in column `column`, otherwise returns -1."] # [doc = ""] # [inline] pub fn get_button_by_id (& self , column : i64 , id : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_button_by_id ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , column as _ , id as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of buttons in column `column`."] # [doc = ""] # [inline] pub fn get_button_count (& self , column : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_button_count ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the id for the button at index `button_idx` in column `column`."] # [doc = ""] # [inline] pub fn get_button_id (& self , column : i64 , button_idx : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_button_id ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , column as _ , button_idx as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the tooltip string for the button at index `button_idx` in column `column`."] # [doc = ""] # [inline] pub fn get_button_tooltip (& self , column : i64 , button_idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_button_tooltip ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , column as _ , button_idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the column's cell mode."] # [doc = ""] # [inline] pub fn get_cell_mode (& self , column : i64) -> crate :: generated :: tree_item :: TreeCellMode { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_cell_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < crate :: generated :: tree_item :: TreeCellMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the TreeItem's first child item or a null object if there is none."] # [doc = ""] # [inline] pub fn get_children (& self) -> Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_children ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the custom background color of column `column`."] # [doc = ""] # [inline] pub fn get_custom_bg_color (& self , column : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_custom_bg_color ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the custom color of column `column`."] # [doc = ""] # [inline] pub fn get_custom_color (& self , column : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_custom_color ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The custom minimum height."] # [doc = ""] # [inline] pub fn custom_minimum_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_custom_minimum_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if `expand_right` is set."] # [doc = ""] # [inline] pub fn get_expand_right (& self , column : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_expand_right ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the given column's icon [`Texture`][Texture]. Error if no icon is set."] # [doc = ""] # [inline] pub fn get_icon (& self , column : i64) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_icon ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the column's icon's maximum width."] # [doc = ""] # [inline] pub fn get_icon_max_width (& self , column : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_icon_max_width ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`Color`][Color] modulating the column's icon."] # [doc = ""] # [inline] pub fn get_icon_modulate (& self , column : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_icon_modulate ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the icon [`Texture`][Texture] region as [`Rect2`][Rect2]."] # [doc = ""] # [inline] pub fn get_icon_region (& self , column : i64) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_icon_region ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the metadata value that was set for the given column using [`set_metadata`][Self::set_metadata]."] # [doc = ""] # [inline] pub fn get_metadata (& self , column : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_metadata ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the next sibling TreeItem in the tree or a null object if there is none."] # [doc = ""] # [inline] pub fn get_next (& self) -> Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_next ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the next visible sibling TreeItem in the tree or a null object if there is none.\nIf `wrap` is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns `null`.\n# Default Arguments\n* `wrap` - `false`"] # [doc = ""] # [inline] pub fn get_next_visible (& self , wrap : bool) -> Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_next_visible ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , wrap as _) ; < Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the parent TreeItem or a null object if there is none."] # [doc = ""] # [inline] pub fn get_parent (& self) -> Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_parent ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the previous sibling TreeItem in the tree or a null object if there is none."] # [doc = ""] # [inline] pub fn get_prev (& self) -> Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_prev ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the previous visible sibling TreeItem in the tree or a null object if there is none.\nIf `wrap` is enabled, the method will wrap around to the last visible element in the tree when called on the first visible element, otherwise it returns `null`.\n# Default Arguments\n* `wrap` - `false`"] # [doc = ""] # [inline] pub fn get_prev_visible (& self , wrap : bool) -> Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_prev_visible ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , wrap as _) ; < Option < Ref < crate :: generated :: TreeItem , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the value of a [`CELL_MODE_RANGE`][Self::CELL_MODE_RANGE] column."] # [doc = ""] # [inline] pub fn get_range (& self , column : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_range ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a dictionary containing the range parameters for a given column. The keys are \"min\", \"max\", \"step\", and \"expr\"."] # [doc = ""] # [inline] pub fn get_range_config (& self , column : i64) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_range_config ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the suffix string shown after the column value."] # [doc = ""] # [inline] pub fn get_suffix (& self , column : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_suffix ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the given column's text."] # [doc = ""] # [inline] pub fn get_text (& self , column : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_text ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the given column's text alignment."] # [doc = ""] # [inline] pub fn get_text_align (& self , column : i64) -> crate :: generated :: tree_item :: TextAlign { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_text_align ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < crate :: generated :: tree_item :: TextAlign > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the given column's tooltip."] # [doc = ""] # [inline] pub fn get_tooltip (& self , column : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . get_tooltip ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the button at index `button_idx` for the given column is disabled."] # [doc = ""] # [inline] pub fn is_button_disabled (& self , column : i64 , button_idx : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . is_button_disabled ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , column as _ , button_idx as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the given column is checked."] # [doc = ""] # [inline] pub fn is_checked (& self , column : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . is_checked ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the TreeItem is collapsed."] # [doc = ""] # [inline] pub fn is_collapsed (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . is_collapsed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_custom_set_as_button (& self , column : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . is_custom_set_as_button ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if column `column` is editable."] # [doc = ""] # [inline] pub fn is_editable (& self , column : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . is_editable ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, folding is disabled for this TreeItem."] # [doc = ""] # [inline] pub fn is_folding_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . is_folding_disabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if column `column` is selectable."] # [doc = ""] # [inline] pub fn is_selectable (& self , column : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . is_selectable ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if column `column` is selected."] # [doc = ""] # [inline] pub fn is_selected (& self , column : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . is_selected ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Moves this TreeItem to the bottom in the [`Tree`][Tree] hierarchy."] # [doc = ""] # [inline] pub fn move_to_bottom (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . move_to_bottom ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Moves this TreeItem to the top in the [`Tree`][Tree] hierarchy."] # [doc = ""] # [inline] pub fn move_to_top (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . move_to_top ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes the given child [`TreeItem`][TreeItem] and all its children from the [`Tree`][Tree]. Note that it doesn't free the item from memory, so it can be reused later. To completely remove a [`TreeItem`][TreeItem] use [`Object.free`][Object::free]."] # [doc = ""] # [inline] pub fn remove_child (& self , child : impl AsArg < crate :: generated :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . remove_child ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , child . as_arg_ptr ()) ; } } # [doc = "Selects the column `column`."] # [doc = ""] # [inline] pub fn select (& self , column : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . select ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , column as _) ; } } # [doc = "Sets the given column's button [`Texture`][Texture] at index `button_idx` to `button`."] # [doc = ""] # [inline] pub fn set_button (& self , column : i64 , button_idx : i64 , button : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_button ; let ret = crate :: icalls :: icallvar__i64_i64_obj (method_bind , self . this . sys () . as_ptr () , column as _ , button_idx as _ , button . as_arg_ptr ()) ; } } # [doc = "If `true`, disables the button at index `button_idx` in column `column`."] # [doc = ""] # [inline] pub fn set_button_disabled (& self , column : i64 , button_idx : i64 , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_button_disabled ; let ret = crate :: icalls :: icallvar__i64_i64_bool (method_bind , self . this . sys () . as_ptr () , column as _ , button_idx as _ , disabled as _) ; } } # [doc = "Sets the given column's cell mode to `mode`. See [`TreeCellMode`][TreeCellMode] constants."] # [doc = ""] # [inline] pub fn set_cell_mode (& self , column : i64 , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_cell_mode ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , column as _ , mode as _) ; } } # [doc = "If `true`, the column `column` is checked."] # [doc = ""] # [inline] pub fn set_checked (& self , column : i64 , checked : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_checked ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , column as _ , checked as _) ; } } # [doc = "If `true`, the TreeItem is collapsed."] # [doc = ""] # [inline] pub fn set_collapsed (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_collapsed ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_custom_as_button (& self , column : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_custom_as_button ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , column as _ , enable as _) ; } } # [doc = "Sets the given column's custom background color and whether to just use it as an outline.\n# Default Arguments\n* `just_outline` - `false`"] # [doc = ""] # [inline] pub fn set_custom_bg_color (& self , column : i64 , color : Color , just_outline : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_custom_bg_color ; let ret = crate :: icalls :: icallvar__i64_color_bool (method_bind , self . this . sys () . as_ptr () , column as _ , color , just_outline as _) ; } } # [doc = "Sets the given column's custom color."] # [doc = ""] # [inline] pub fn set_custom_color (& self , column : i64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_custom_color ; let ret = crate :: icalls :: icallvar__i64_color (method_bind , self . this . sys () . as_ptr () , column as _ , color) ; } } # [doc = "Sets the given column's custom draw callback to `callback` method on `object`.\nThe `callback` should accept two arguments: the [`TreeItem`][TreeItem] that is drawn and its position and size as a [`Rect2`][Rect2]."] # [doc = ""] # [inline] pub fn set_custom_draw (& self , column : i64 , object : impl AsArg < crate :: generated :: Object > , callback : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_custom_draw ; let ret = crate :: icalls :: icallvar__i64_obj_str (method_bind , self . this . sys () . as_ptr () , column as _ , object . as_arg_ptr () , callback . into ()) ; } } # [doc = "The custom minimum height."] # [doc = ""] # [inline] pub fn set_custom_minimum_height (& self , height : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_custom_minimum_height ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , height as _) ; } } # [doc = "If `true`, folding is disabled for this TreeItem."] # [doc = ""] # [inline] pub fn set_disable_folding (& self , disable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_disable_folding ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , disable as _) ; } } # [doc = "If `true`, column `column` is editable."] # [doc = ""] # [inline] pub fn set_editable (& self , column : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_editable ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , column as _ , enabled as _) ; } } # [doc = "If `true`, column `column` is expanded to the right."] # [doc = ""] # [inline] pub fn set_expand_right (& self , column : i64 , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_expand_right ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , column as _ , enable as _) ; } } # [doc = "Sets the given column's icon [`Texture`][Texture]."] # [doc = ""] # [inline] pub fn set_icon (& self , column : i64 , texture : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_icon ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , column as _ , texture . as_arg_ptr ()) ; } } # [doc = "Sets the given column's icon's maximum width."] # [doc = ""] # [inline] pub fn set_icon_max_width (& self , column : i64 , width : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_icon_max_width ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , column as _ , width as _) ; } } # [doc = "Modulates the given column's icon with `modulate`."] # [doc = ""] # [inline] pub fn set_icon_modulate (& self , column : i64 , modulate : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_icon_modulate ; let ret = crate :: icalls :: icallvar__i64_color (method_bind , self . this . sys () . as_ptr () , column as _ , modulate) ; } } # [doc = "Sets the given column's icon's texture region."] # [doc = ""] # [inline] pub fn set_icon_region (& self , column : i64 , region : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_icon_region ; let ret = crate :: icalls :: icallvar__i64_rect2 (method_bind , self . this . sys () . as_ptr () , column as _ , region) ; } } # [doc = "Sets the metadata value for the given column, which can be retrieved later using [`get_metadata`][Self::get_metadata]. This can be used, for example, to store a reference to the original data."] # [doc = ""] # [inline] pub fn set_metadata (& self , column : i64 , meta : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_metadata ; let ret = crate :: icalls :: icallvar__i64_var (method_bind , self . this . sys () . as_ptr () , column as _ , meta . owned_to_variant ()) ; } } # [doc = "Sets the value of a [`CELL_MODE_RANGE`][Self::CELL_MODE_RANGE] column."] # [doc = ""] # [inline] pub fn set_range (& self , column : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_range ; let ret = crate :: icalls :: icallvar__i64_f64 (method_bind , self . this . sys () . as_ptr () , column as _ , value as _) ; } } # [doc = "Sets the range of accepted values for a column. The column must be in the [`CELL_MODE_RANGE`][Self::CELL_MODE_RANGE] mode.\nIf `expr` is `true`, the edit mode slider will use an exponential scale as with [`Range.exp_edit`][Range::exp_edit].\n# Default Arguments\n* `expr` - `false`"] # [doc = ""] # [inline] pub fn set_range_config (& self , column : i64 , min : f64 , max : f64 , step : f64 , expr : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_range_config ; let ret = crate :: icalls :: icallvar__i64_f64_f64_f64_bool (method_bind , self . this . sys () . as_ptr () , column as _ , min as _ , max as _ , step as _ , expr as _) ; } } # [doc = "If `true`, the given column is selectable."] # [doc = ""] # [inline] pub fn set_selectable (& self , column : i64 , selectable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_selectable ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , column as _ , selectable as _) ; } } # [doc = "Sets a string to be shown after a column's value (for example, a unit abbreviation)."] # [doc = ""] # [inline] pub fn set_suffix (& self , column : i64 , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_suffix ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , column as _ , text . into ()) ; } } # [doc = "Sets the given column's text value."] # [doc = ""] # [inline] pub fn set_text (& self , column : i64 , text : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_text ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , column as _ , text . into ()) ; } } # [doc = "Sets the given column's text alignment. See [`TextAlign`][TextAlign] for possible values."] # [doc = ""] # [inline] pub fn set_text_align (& self , column : i64 , text_align : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_text_align ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , column as _ , text_align as _) ; } } # [doc = "Sets the given column's tooltip text."] # [doc = ""] # [inline] pub fn set_tooltip (& self , column : i64 , tooltip : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TreeItemMethodTable :: get (get_api ()) . set_tooltip ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , column as _ , tooltip . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for TreeItem { } unsafe impl GodotObject for TreeItem { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "TreeItem" } } impl std :: ops :: Deref for TreeItem { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TreeItem { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for TreeItem { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TreeItemMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_button : * mut sys :: godot_method_bind , pub call_recursive : * mut sys :: godot_method_bind , pub clear_custom_bg_color : * mut sys :: godot_method_bind , pub clear_custom_color : * mut sys :: godot_method_bind , pub deselect : * mut sys :: godot_method_bind , pub erase_button : * mut sys :: godot_method_bind , pub get_button : * mut sys :: godot_method_bind , pub get_button_by_id : * mut sys :: godot_method_bind , pub get_button_count : * mut sys :: godot_method_bind , pub get_button_id : * mut sys :: godot_method_bind , pub get_button_tooltip : * mut sys :: godot_method_bind , pub get_cell_mode : * mut sys :: godot_method_bind , pub get_children : * mut sys :: godot_method_bind , pub get_custom_bg_color : * mut sys :: godot_method_bind , pub get_custom_color : * mut sys :: godot_method_bind , pub get_custom_minimum_height : * mut sys :: godot_method_bind , pub get_expand_right : * mut sys :: godot_method_bind , pub get_icon : * mut sys :: godot_method_bind , pub get_icon_max_width : * mut sys :: godot_method_bind , pub get_icon_modulate : * mut sys :: godot_method_bind , pub get_icon_region : * mut sys :: godot_method_bind , pub get_metadata : * mut sys :: godot_method_bind , pub get_next : * mut sys :: godot_method_bind , pub get_next_visible : * mut sys :: godot_method_bind , pub get_parent : * mut sys :: godot_method_bind , pub get_prev : * mut sys :: godot_method_bind , pub get_prev_visible : * mut sys :: godot_method_bind , pub get_range : * mut sys :: godot_method_bind , pub get_range_config : * mut sys :: godot_method_bind , pub get_suffix : * mut sys :: godot_method_bind , pub get_text : * mut sys :: godot_method_bind , pub get_text_align : * mut sys :: godot_method_bind , pub get_tooltip : * mut sys :: godot_method_bind , pub is_button_disabled : * mut sys :: godot_method_bind , pub is_checked : * mut sys :: godot_method_bind , pub is_collapsed : * mut sys :: godot_method_bind , pub is_custom_set_as_button : * mut sys :: godot_method_bind , pub is_editable : * mut sys :: godot_method_bind , pub is_folding_disabled : * mut sys :: godot_method_bind , pub is_selectable : * mut sys :: godot_method_bind , pub is_selected : * mut sys :: godot_method_bind , pub move_to_bottom : * mut sys :: godot_method_bind , pub move_to_top : * mut sys :: godot_method_bind , pub remove_child : * mut sys :: godot_method_bind , pub select : * mut sys :: godot_method_bind , pub set_button : * mut sys :: godot_method_bind , pub set_button_disabled : * mut sys :: godot_method_bind , pub set_cell_mode : * mut sys :: godot_method_bind , pub set_checked : * mut sys :: godot_method_bind , pub set_collapsed : * mut sys :: godot_method_bind , pub set_custom_as_button : * mut sys :: godot_method_bind , pub set_custom_bg_color : * mut sys :: godot_method_bind , pub set_custom_color : * mut sys :: godot_method_bind , pub set_custom_draw : * mut sys :: godot_method_bind , pub set_custom_minimum_height : * mut sys :: godot_method_bind , pub set_disable_folding : * mut sys :: godot_method_bind , pub set_editable : * mut sys :: godot_method_bind , pub set_expand_right : * mut sys :: godot_method_bind , pub set_icon : * mut sys :: godot_method_bind , pub set_icon_max_width : * mut sys :: godot_method_bind , pub set_icon_modulate : * mut sys :: godot_method_bind , pub set_icon_region : * mut sys :: godot_method_bind , pub set_metadata : * mut sys :: godot_method_bind , pub set_range : * mut sys :: godot_method_bind , pub set_range_config : * mut sys :: godot_method_bind , pub set_selectable : * mut sys :: godot_method_bind , pub set_suffix : * mut sys :: godot_method_bind , pub set_text : * mut sys :: godot_method_bind , pub set_text_align : * mut sys :: godot_method_bind , pub set_tooltip : * mut sys :: godot_method_bind } impl TreeItemMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TreeItemMethodTable = TreeItemMethodTable { class_constructor : None , add_button : 0 as * mut sys :: godot_method_bind , call_recursive : 0 as * mut sys :: godot_method_bind , clear_custom_bg_color : 0 as * mut sys :: godot_method_bind , clear_custom_color : 0 as * mut sys :: godot_method_bind , deselect : 0 as * mut sys :: godot_method_bind , erase_button : 0 as * mut sys :: godot_method_bind , get_button : 0 as * mut sys :: godot_method_bind , get_button_by_id : 0 as * mut sys :: godot_method_bind , get_button_count : 0 as * mut sys :: godot_method_bind , get_button_id : 0 as * mut sys :: godot_method_bind , get_button_tooltip : 0 as * mut sys :: godot_method_bind , get_cell_mode : 0 as * mut sys :: godot_method_bind , get_children : 0 as * mut sys :: godot_method_bind , get_custom_bg_color : 0 as * mut sys :: godot_method_bind , get_custom_color : 0 as * mut sys :: godot_method_bind , get_custom_minimum_height : 0 as * mut sys :: godot_method_bind , get_expand_right : 0 as * mut sys :: godot_method_bind , get_icon : 0 as * mut sys :: godot_method_bind , get_icon_max_width : 0 as * mut sys :: godot_method_bind , get_icon_modulate : 0 as * mut sys :: godot_method_bind , get_icon_region : 0 as * mut sys :: godot_method_bind , get_metadata : 0 as * mut sys :: godot_method_bind , get_next : 0 as * mut sys :: godot_method_bind , get_next_visible : 0 as * mut sys :: godot_method_bind , get_parent : 0 as * mut sys :: godot_method_bind , get_prev : 0 as * mut sys :: godot_method_bind , get_prev_visible : 0 as * mut sys :: godot_method_bind , get_range : 0 as * mut sys :: godot_method_bind , get_range_config : 0 as * mut sys :: godot_method_bind , get_suffix : 0 as * mut sys :: godot_method_bind , get_text : 0 as * mut sys :: godot_method_bind , get_text_align : 0 as * mut sys :: godot_method_bind , get_tooltip : 0 as * mut sys :: godot_method_bind , is_button_disabled : 0 as * mut sys :: godot_method_bind , is_checked : 0 as * mut sys :: godot_method_bind , is_collapsed : 0 as * mut sys :: godot_method_bind , is_custom_set_as_button : 0 as * mut sys :: godot_method_bind , is_editable : 0 as * mut sys :: godot_method_bind , is_folding_disabled : 0 as * mut sys :: godot_method_bind , is_selectable : 0 as * mut sys :: godot_method_bind , is_selected : 0 as * mut sys :: godot_method_bind , move_to_bottom : 0 as * mut sys :: godot_method_bind , move_to_top : 0 as * mut sys :: godot_method_bind , remove_child : 0 as * mut sys :: godot_method_bind , select : 0 as * mut sys :: godot_method_bind , set_button : 0 as * mut sys :: godot_method_bind , set_button_disabled : 0 as * mut sys :: godot_method_bind , set_cell_mode : 0 as * mut sys :: godot_method_bind , set_checked : 0 as * mut sys :: godot_method_bind , set_collapsed : 0 as * mut sys :: godot_method_bind , set_custom_as_button : 0 as * mut sys :: godot_method_bind , set_custom_bg_color : 0 as * mut sys :: godot_method_bind , set_custom_color : 0 as * mut sys :: godot_method_bind , set_custom_draw : 0 as * mut sys :: godot_method_bind , set_custom_minimum_height : 0 as * mut sys :: godot_method_bind , set_disable_folding : 0 as * mut sys :: godot_method_bind , set_editable : 0 as * mut sys :: godot_method_bind , set_expand_right : 0 as * mut sys :: godot_method_bind , set_icon : 0 as * mut sys :: godot_method_bind , set_icon_max_width : 0 as * mut sys :: godot_method_bind , set_icon_modulate : 0 as * mut sys :: godot_method_bind , set_icon_region : 0 as * mut sys :: godot_method_bind , set_metadata : 0 as * mut sys :: godot_method_bind , set_range : 0 as * mut sys :: godot_method_bind , set_range_config : 0 as * mut sys :: godot_method_bind , set_selectable : 0 as * mut sys :: godot_method_bind , set_suffix : 0 as * mut sys :: godot_method_bind , set_text : 0 as * mut sys :: godot_method_bind , set_text_align : 0 as * mut sys :: godot_method_bind , set_tooltip : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TreeItemMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TreeItem\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_button = (gd_api . godot_method_bind_get_method) (class_name , "add_button\0" . as_ptr () as * const c_char) ; table . call_recursive = (gd_api . godot_method_bind_get_method) (class_name , "call_recursive\0" . as_ptr () as * const c_char) ; table . clear_custom_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "clear_custom_bg_color\0" . as_ptr () as * const c_char) ; table . clear_custom_color = (gd_api . godot_method_bind_get_method) (class_name , "clear_custom_color\0" . as_ptr () as * const c_char) ; table . deselect = (gd_api . godot_method_bind_get_method) (class_name , "deselect\0" . as_ptr () as * const c_char) ; table . erase_button = (gd_api . godot_method_bind_get_method) (class_name , "erase_button\0" . as_ptr () as * const c_char) ; table . get_button = (gd_api . godot_method_bind_get_method) (class_name , "get_button\0" . as_ptr () as * const c_char) ; table . get_button_by_id = (gd_api . godot_method_bind_get_method) (class_name , "get_button_by_id\0" . as_ptr () as * const c_char) ; table . get_button_count = (gd_api . godot_method_bind_get_method) (class_name , "get_button_count\0" . as_ptr () as * const c_char) ; table . get_button_id = (gd_api . godot_method_bind_get_method) (class_name , "get_button_id\0" . as_ptr () as * const c_char) ; table . get_button_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "get_button_tooltip\0" . as_ptr () as * const c_char) ; table . get_cell_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_cell_mode\0" . as_ptr () as * const c_char) ; table . get_children = (gd_api . godot_method_bind_get_method) (class_name , "get_children\0" . as_ptr () as * const c_char) ; table . get_custom_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_bg_color\0" . as_ptr () as * const c_char) ; table . get_custom_color = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_color\0" . as_ptr () as * const c_char) ; table . get_custom_minimum_height = (gd_api . godot_method_bind_get_method) (class_name , "get_custom_minimum_height\0" . as_ptr () as * const c_char) ; table . get_expand_right = (gd_api . godot_method_bind_get_method) (class_name , "get_expand_right\0" . as_ptr () as * const c_char) ; table . get_icon = (gd_api . godot_method_bind_get_method) (class_name , "get_icon\0" . as_ptr () as * const c_char) ; table . get_icon_max_width = (gd_api . godot_method_bind_get_method) (class_name , "get_icon_max_width\0" . as_ptr () as * const c_char) ; table . get_icon_modulate = (gd_api . godot_method_bind_get_method) (class_name , "get_icon_modulate\0" . as_ptr () as * const c_char) ; table . get_icon_region = (gd_api . godot_method_bind_get_method) (class_name , "get_icon_region\0" . as_ptr () as * const c_char) ; table . get_metadata = (gd_api . godot_method_bind_get_method) (class_name , "get_metadata\0" . as_ptr () as * const c_char) ; table . get_next = (gd_api . godot_method_bind_get_method) (class_name , "get_next\0" . as_ptr () as * const c_char) ; table . get_next_visible = (gd_api . godot_method_bind_get_method) (class_name , "get_next_visible\0" . as_ptr () as * const c_char) ; table . get_parent = (gd_api . godot_method_bind_get_method) (class_name , "get_parent\0" . as_ptr () as * const c_char) ; table . get_prev = (gd_api . godot_method_bind_get_method) (class_name , "get_prev\0" . as_ptr () as * const c_char) ; table . get_prev_visible = (gd_api . godot_method_bind_get_method) (class_name , "get_prev_visible\0" . as_ptr () as * const c_char) ; table . get_range = (gd_api . godot_method_bind_get_method) (class_name , "get_range\0" . as_ptr () as * const c_char) ; table . get_range_config = (gd_api . godot_method_bind_get_method) (class_name , "get_range_config\0" . as_ptr () as * const c_char) ; table . get_suffix = (gd_api . godot_method_bind_get_method) (class_name , "get_suffix\0" . as_ptr () as * const c_char) ; table . get_text = (gd_api . godot_method_bind_get_method) (class_name , "get_text\0" . as_ptr () as * const c_char) ; table . get_text_align = (gd_api . godot_method_bind_get_method) (class_name , "get_text_align\0" . as_ptr () as * const c_char) ; table . get_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "get_tooltip\0" . as_ptr () as * const c_char) ; table . is_button_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_button_disabled\0" . as_ptr () as * const c_char) ; table . is_checked = (gd_api . godot_method_bind_get_method) (class_name , "is_checked\0" . as_ptr () as * const c_char) ; table . is_collapsed = (gd_api . godot_method_bind_get_method) (class_name , "is_collapsed\0" . as_ptr () as * const c_char) ; table . is_custom_set_as_button = (gd_api . godot_method_bind_get_method) (class_name , "is_custom_set_as_button\0" . as_ptr () as * const c_char) ; table . is_editable = (gd_api . godot_method_bind_get_method) (class_name , "is_editable\0" . as_ptr () as * const c_char) ; table . is_folding_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_folding_disabled\0" . as_ptr () as * const c_char) ; table . is_selectable = (gd_api . godot_method_bind_get_method) (class_name , "is_selectable\0" . as_ptr () as * const c_char) ; table . is_selected = (gd_api . godot_method_bind_get_method) (class_name , "is_selected\0" . as_ptr () as * const c_char) ; table . move_to_bottom = (gd_api . godot_method_bind_get_method) (class_name , "move_to_bottom\0" . as_ptr () as * const c_char) ; table . move_to_top = (gd_api . godot_method_bind_get_method) (class_name , "move_to_top\0" . as_ptr () as * const c_char) ; table . remove_child = (gd_api . godot_method_bind_get_method) (class_name , "remove_child\0" . as_ptr () as * const c_char) ; table . select = (gd_api . godot_method_bind_get_method) (class_name , "select\0" . as_ptr () as * const c_char) ; table . set_button = (gd_api . godot_method_bind_get_method) (class_name , "set_button\0" . as_ptr () as * const c_char) ; table . set_button_disabled = (gd_api . godot_method_bind_get_method) (class_name , "set_button_disabled\0" . as_ptr () as * const c_char) ; table . set_cell_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_cell_mode\0" . as_ptr () as * const c_char) ; table . set_checked = (gd_api . godot_method_bind_get_method) (class_name , "set_checked\0" . as_ptr () as * const c_char) ; table . set_collapsed = (gd_api . godot_method_bind_get_method) (class_name , "set_collapsed\0" . as_ptr () as * const c_char) ; table . set_custom_as_button = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_as_button\0" . as_ptr () as * const c_char) ; table . set_custom_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_bg_color\0" . as_ptr () as * const c_char) ; table . set_custom_color = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_color\0" . as_ptr () as * const c_char) ; table . set_custom_draw = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_draw\0" . as_ptr () as * const c_char) ; table . set_custom_minimum_height = (gd_api . godot_method_bind_get_method) (class_name , "set_custom_minimum_height\0" . as_ptr () as * const c_char) ; table . set_disable_folding = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_folding\0" . as_ptr () as * const c_char) ; table . set_editable = (gd_api . godot_method_bind_get_method) (class_name , "set_editable\0" . as_ptr () as * const c_char) ; table . set_expand_right = (gd_api . godot_method_bind_get_method) (class_name , "set_expand_right\0" . as_ptr () as * const c_char) ; table . set_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_icon\0" . as_ptr () as * const c_char) ; table . set_icon_max_width = (gd_api . godot_method_bind_get_method) (class_name , "set_icon_max_width\0" . as_ptr () as * const c_char) ; table . set_icon_modulate = (gd_api . godot_method_bind_get_method) (class_name , "set_icon_modulate\0" . as_ptr () as * const c_char) ; table . set_icon_region = (gd_api . godot_method_bind_get_method) (class_name , "set_icon_region\0" . as_ptr () as * const c_char) ; table . set_metadata = (gd_api . godot_method_bind_get_method) (class_name , "set_metadata\0" . as_ptr () as * const c_char) ; table . set_range = (gd_api . godot_method_bind_get_method) (class_name , "set_range\0" . as_ptr () as * const c_char) ; table . set_range_config = (gd_api . godot_method_bind_get_method) (class_name , "set_range_config\0" . as_ptr () as * const c_char) ; table . set_selectable = (gd_api . godot_method_bind_get_method) (class_name , "set_selectable\0" . as_ptr () as * const c_char) ; table . set_suffix = (gd_api . godot_method_bind_get_method) (class_name , "set_suffix\0" . as_ptr () as * const c_char) ; table . set_text = (gd_api . godot_method_bind_get_method) (class_name , "set_text\0" . as_ptr () as * const c_char) ; table . set_text_align = (gd_api . godot_method_bind_get_method) (class_name , "set_text_align\0" . as_ptr () as * const c_char) ; table . set_tooltip = (gd_api . godot_method_bind_get_method) (class_name , "set_tooltip\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::tree_item::private::TreeItem;
            
            pub(crate) mod triangle_mesh {
                # ! [doc = "This module contains types related to the API class [`TriangleMesh`][super::TriangleMesh]."] pub (crate) mod private { # [doc = "`core class TriangleMesh` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_trianglemesh.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTriangleMesh inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct TriangleMesh { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: TriangleMesh ; impl TriangleMesh { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TriangleMeshMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for TriangleMesh { } unsafe impl GodotObject for TriangleMesh { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "TriangleMesh" } } impl std :: ops :: Deref for TriangleMesh { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for TriangleMesh { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for TriangleMesh { } unsafe impl SubClass < crate :: generated :: Object > for TriangleMesh { } impl Instanciable for TriangleMesh { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { TriangleMesh :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TriangleMeshMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl TriangleMeshMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TriangleMeshMethodTable = TriangleMeshMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TriangleMeshMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "TriangleMesh\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::triangle_mesh::private::TriangleMesh;
            
            pub mod tween {
                # ! [doc = "This module contains types related to the API class [`Tween`][super::Tween]."] pub (crate) mod private { # [doc = "`core class Tween` inherits `Node` (manually managed).\n\nThis class has related types in the [`tween`][super::tween] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_tween.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Tween` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Tween>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nTween inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Tween { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Tween ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EaseType (pub i64) ; impl EaseType { pub const IN : EaseType = EaseType (0i64) ; pub const OUT : EaseType = EaseType (1i64) ; pub const IN_OUT : EaseType = EaseType (2i64) ; pub const OUT_IN : EaseType = EaseType (3i64) ; } impl From < i64 > for EaseType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EaseType > for i64 { # [inline] fn from (v : EaseType) -> Self { v . 0 } } impl FromVariant for EaseType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TransitionType (pub i64) ; impl TransitionType { pub const LINEAR : TransitionType = TransitionType (0i64) ; pub const SINE : TransitionType = TransitionType (1i64) ; pub const QUINT : TransitionType = TransitionType (2i64) ; pub const QUART : TransitionType = TransitionType (3i64) ; pub const QUAD : TransitionType = TransitionType (4i64) ; pub const EXPO : TransitionType = TransitionType (5i64) ; pub const ELASTIC : TransitionType = TransitionType (6i64) ; pub const CUBIC : TransitionType = TransitionType (7i64) ; pub const CIRC : TransitionType = TransitionType (8i64) ; pub const BOUNCE : TransitionType = TransitionType (9i64) ; pub const BACK : TransitionType = TransitionType (10i64) ; } impl From < i64 > for TransitionType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TransitionType > for i64 { # [inline] fn from (v : TransitionType) -> Self { v . 0 } } impl FromVariant for TransitionType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TweenProcessMode (pub i64) ; impl TweenProcessMode { pub const PHYSICS : TweenProcessMode = TweenProcessMode (0i64) ; pub const IDLE : TweenProcessMode = TweenProcessMode (1i64) ; } impl From < i64 > for TweenProcessMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TweenProcessMode > for i64 { # [inline] fn from (v : TweenProcessMode) -> Self { v . 0 } } impl FromVariant for TweenProcessMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Tween { pub const EASE_IN : i64 = 0i64 ; pub const TRANS_LINEAR : i64 = 0i64 ; pub const TWEEN_PROCESS_PHYSICS : i64 = 0i64 ; pub const EASE_OUT : i64 = 1i64 ; pub const TRANS_SINE : i64 = 1i64 ; pub const TWEEN_PROCESS_IDLE : i64 = 1i64 ; pub const EASE_IN_OUT : i64 = 2i64 ; pub const TRANS_QUINT : i64 = 2i64 ; pub const EASE_OUT_IN : i64 = 3i64 ; pub const TRANS_QUART : i64 = 3i64 ; pub const TRANS_QUAD : i64 = 4i64 ; pub const TRANS_EXPO : i64 = 5i64 ; pub const TRANS_ELASTIC : i64 = 6i64 ; pub const TRANS_CUBIC : i64 = 7i64 ; pub const TRANS_CIRC : i64 = 8i64 ; pub const TRANS_BOUNCE : i64 = 9i64 ; pub const TRANS_BACK : i64 = 10i64 ; } impl Tween { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = TweenMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Follows `method` of `object` and applies the returned value on `target_method` of `target`, beginning from `initial_val` for `duration` seconds, `delay` later. Methods are called with consecutive values.\nUse [`TransitionType`][TransitionType] for `trans_type` and [`EaseType`][EaseType] for `ease_type` parameters. These values control the timing and direction of the interpolation. See the class description for more information.\n# Default Arguments\n* `trans_type` - `0`\n* `ease_type` - `2`\n* `delay` - `0`"] # [doc = ""] # [inline] pub fn follow_method (& self , object : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString > , initial_val : impl OwnedToVariant , target : impl AsArg < crate :: generated :: Object > , target_method : impl Into < GodotString > , duration : f64 , trans_type : i64 , ease_type : i64 , delay : f64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . follow_method ; let ret = crate :: icalls :: icallvar__obj_str_var_obj_str_f64_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , method . into () , initial_val . owned_to_variant () , target . as_arg_ptr () , target_method . into () , duration as _ , trans_type as _ , ease_type as _ , delay as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Follows `property` of `object` and applies it on `target_property` of `target`, beginning from `initial_val` for `duration` seconds, `delay` seconds later.\nUse [`TransitionType`][TransitionType] for `trans_type` and [`EaseType`][EaseType] for `ease_type` parameters. These values control the timing and direction of the interpolation. See the class description for more information.\n# Default Arguments\n* `trans_type` - `0`\n* `ease_type` - `2`\n* `delay` - `0`"] # [doc = ""] # [inline] pub fn follow_property (& self , object : impl AsArg < crate :: generated :: Object > , property : impl Into < NodePath > , initial_val : impl OwnedToVariant , target : impl AsArg < crate :: generated :: Object > , target_property : impl Into < NodePath > , duration : f64 , trans_type : i64 , ease_type : i64 , delay : f64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . follow_property ; let ret = crate :: icalls :: icallvar__obj_nodepath_var_obj_nodepath_f64_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into () , initial_val . owned_to_variant () , target . as_arg_ptr () , target_property . into () , duration as _ , trans_type as _ , ease_type as _ , delay as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the total time needed for all tweens to end. If you have two tweens, one lasting 10 seconds and the other 20 seconds, it would return 20 seconds, as by that time all tweens would have finished."] # [doc = ""] # [inline] pub fn get_runtime (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . get_runtime ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The tween's speed multiplier. For example, set it to `1.0` for normal speed, `2.0` for two times normal speed, or `0.5` for half of the normal speed. A value of `0` pauses the animation, but see also [`set_active`][Self::set_active] or [`stop_all`][Self::stop_all] for this."] # [doc = ""] # [inline] pub fn speed_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . get_speed_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The tween's animation process thread. See [`TweenProcessMode`][TweenProcessMode]."] # [doc = ""] # [inline] pub fn tween_process_mode (& self) -> crate :: generated :: tween :: TweenProcessMode { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . get_tween_process_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: tween :: TweenProcessMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Calls `callback` of `object` after `duration`. `arg1`-`arg5` are arguments to be passed to the callback.\n# Default Arguments\n* `arg1` - `null`\n* `arg2` - `null`\n* `arg3` - `null`\n* `arg4` - `null`\n* `arg5` - `null`\n* `arg6` - `null`\n* `arg7` - `null`\n* `arg8` - `null`"] # [doc = ""] # [inline] pub fn interpolate_callback (& self , object : impl AsArg < crate :: generated :: Object > , duration : f64 , callback : impl Into < GodotString > , arg1 : impl OwnedToVariant , arg2 : impl OwnedToVariant , arg3 : impl OwnedToVariant , arg4 : impl OwnedToVariant , arg5 : impl OwnedToVariant , arg6 : impl OwnedToVariant , arg7 : impl OwnedToVariant , arg8 : impl OwnedToVariant) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . interpolate_callback ; let ret = crate :: icalls :: icallvar__obj_f64_str_var_var_var_var_var_var_var_var (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , duration as _ , callback . into () , arg1 . owned_to_variant () , arg2 . owned_to_variant () , arg3 . owned_to_variant () , arg4 . owned_to_variant () , arg5 . owned_to_variant () , arg6 . owned_to_variant () , arg7 . owned_to_variant () , arg8 . owned_to_variant ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Calls `callback` of `object` after `duration` on the main thread (similar to [`Object.call_deferred`][Object::call_deferred]). `arg1`-`arg5` are arguments to be passed to the callback.\n# Default Arguments\n* `arg1` - `null`\n* `arg2` - `null`\n* `arg3` - `null`\n* `arg4` - `null`\n* `arg5` - `null`\n* `arg6` - `null`\n* `arg7` - `null`\n* `arg8` - `null`"] # [doc = ""] # [inline] pub fn interpolate_deferred_callback (& self , object : impl AsArg < crate :: generated :: Object > , duration : f64 , callback : impl Into < GodotString > , arg1 : impl OwnedToVariant , arg2 : impl OwnedToVariant , arg3 : impl OwnedToVariant , arg4 : impl OwnedToVariant , arg5 : impl OwnedToVariant , arg6 : impl OwnedToVariant , arg7 : impl OwnedToVariant , arg8 : impl OwnedToVariant) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . interpolate_deferred_callback ; let ret = crate :: icalls :: icallvar__obj_f64_str_var_var_var_var_var_var_var_var (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , duration as _ , callback . into () , arg1 . owned_to_variant () , arg2 . owned_to_variant () , arg3 . owned_to_variant () , arg4 . owned_to_variant () , arg5 . owned_to_variant () , arg6 . owned_to_variant () , arg7 . owned_to_variant () , arg8 . owned_to_variant ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Animates `method` of `object` from `initial_val` to `final_val` for `duration` seconds, `delay` seconds later. Methods are called with consecutive values.\nUse [`TransitionType`][TransitionType] for `trans_type` and [`EaseType`][EaseType] for `ease_type` parameters. These values control the timing and direction of the interpolation. See the class description for more information.\n# Default Arguments\n* `trans_type` - `0`\n* `ease_type` - `2`\n* `delay` - `0`"] # [doc = ""] # [inline] pub fn interpolate_method (& self , object : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString > , initial_val : impl OwnedToVariant , final_val : impl OwnedToVariant , duration : f64 , trans_type : i64 , ease_type : i64 , delay : f64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . interpolate_method ; let ret = crate :: icalls :: icallvar__obj_str_var_var_f64_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , method . into () , initial_val . owned_to_variant () , final_val . owned_to_variant () , duration as _ , trans_type as _ , ease_type as _ , delay as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Animates `property` of `object` from `initial_val` to `final_val` for `duration` seconds, `delay` seconds later. Setting the initial value to `null` uses the current value of the property.\nUse [`TransitionType`][TransitionType] for `trans_type` and [`EaseType`][EaseType] for `ease_type` parameters. These values control the timing and direction of the interpolation. See the class description for more information.\n# Default Arguments\n* `trans_type` - `0`\n* `ease_type` - `2`\n* `delay` - `0`"] # [doc = ""] # [inline] pub fn interpolate_property (& self , object : impl AsArg < crate :: generated :: Object > , property : impl Into < NodePath > , initial_val : impl OwnedToVariant , final_val : impl OwnedToVariant , duration : f64 , trans_type : i64 , ease_type : i64 , delay : f64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . interpolate_property ; let ret = crate :: icalls :: icallvar__obj_nodepath_var_var_f64_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into () , initial_val . owned_to_variant () , final_val . owned_to_variant () , duration as _ , trans_type as _ , ease_type as _ , delay as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if any tweens are currently running.\n**Note:** This method doesn't consider tweens that have ended."] # [doc = ""] # [inline] pub fn is_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . is_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the tween loops."] # [doc = ""] # [inline] pub fn is_repeat (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . is_repeat ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Stops animation and removes a tween, given its object and property/method pair. By default, all tweens are removed, unless `key` is specified.\n# Default Arguments\n* `key` - `\"\"`"] # [doc = ""] # [inline] pub fn remove (& self , object : impl AsArg < crate :: generated :: Object > , key : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . remove ; let ret = crate :: icalls :: icallvar__obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , key . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Stops animation and removes all tweens."] # [doc = ""] # [inline] pub fn remove_all (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . remove_all ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Resets a tween to its initial value (the one given, not the one before the tween), given its object and property/method pair. By default, all tweens are reset, unless `key` is specified.\n# Default Arguments\n* `key` - `\"\"`"] # [doc = ""] # [inline] pub fn reset (& self , object : impl AsArg < crate :: generated :: Object > , key : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . reset ; let ret = crate :: icalls :: icallvar__obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , key . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Resets all tweens to their initial values (the ones given, not those before the tween)."] # [doc = ""] # [inline] pub fn reset_all (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . reset_all ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Continues animating a stopped tween, given its object and property/method pair. By default, all tweens are resumed, unless `key` is specified.\n# Default Arguments\n* `key` - `\"\"`"] # [doc = ""] # [inline] pub fn resume (& self , object : impl AsArg < crate :: generated :: Object > , key : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . resume ; let ret = crate :: icalls :: icallvar__obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , key . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Continues animating all stopped tweens."] # [doc = ""] # [inline] pub fn resume_all (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . resume_all ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets the interpolation to the given `time` in seconds."] # [doc = ""] # [inline] pub fn seek (& self , time : f64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . seek ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , time as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Activates/deactivates the tween. See also [`stop_all`][Self::stop_all] and [`resume_all`][Self::resume_all]."] # [doc = ""] # [inline] pub fn set_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . set_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , active as _) ; } } # [doc = "If `true`, the tween loops."] # [doc = ""] # [inline] pub fn set_repeat (& self , repeat : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . set_repeat ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , repeat as _) ; } } # [doc = "The tween's speed multiplier. For example, set it to `1.0` for normal speed, `2.0` for two times normal speed, or `0.5` for half of the normal speed. A value of `0` pauses the animation, but see also [`set_active`][Self::set_active] or [`stop_all`][Self::stop_all] for this."] # [doc = ""] # [inline] pub fn set_speed_scale (& self , speed : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . set_speed_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , speed as _) ; } } # [doc = "The tween's animation process thread. See [`TweenProcessMode`][TweenProcessMode]."] # [doc = ""] # [inline] pub fn set_tween_process_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . set_tween_process_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Starts the tween. You can define animations both before and after this."] # [doc = ""] # [inline] pub fn start (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . start ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Stops a tween, given its object and property/method pair. By default, all tweens are stopped, unless `key` is specified.\n# Default Arguments\n* `key` - `\"\"`"] # [doc = ""] # [inline] pub fn stop (& self , object : impl AsArg < crate :: generated :: Object > , key : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallvar__obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , key . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Stops animating all tweens."] # [doc = ""] # [inline] pub fn stop_all (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . stop_all ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Animates `method` of `object` from the value returned by `initial_method` to `final_val` for `duration` seconds, `delay` seconds later. Methods are animated by calling them with consecutive values.\nUse [`TransitionType`][TransitionType] for `trans_type` and [`EaseType`][EaseType] for `ease_type` parameters. These values control the timing and direction of the interpolation. See the class description for more information.\n# Default Arguments\n* `trans_type` - `0`\n* `ease_type` - `2`\n* `delay` - `0`"] # [doc = ""] # [inline] pub fn targeting_method (& self , object : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString > , initial : impl AsArg < crate :: generated :: Object > , initial_method : impl Into < GodotString > , final_val : impl OwnedToVariant , duration : f64 , trans_type : i64 , ease_type : i64 , delay : f64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . targeting_method ; let ret = crate :: icalls :: icallvar__obj_str_obj_str_var_f64_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , method . into () , initial . as_arg_ptr () , initial_method . into () , final_val . owned_to_variant () , duration as _ , trans_type as _ , ease_type as _ , delay as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Animates `property` of `object` from the current value of the `initial_val` property of `initial` to `final_val` for `duration` seconds, `delay` seconds later.\nUse [`TransitionType`][TransitionType] for `trans_type` and [`EaseType`][EaseType] for `ease_type` parameters. These values control the timing and direction of the interpolation. See the class description for more information.\n# Default Arguments\n* `trans_type` - `0`\n* `ease_type` - `2`\n* `delay` - `0`"] # [doc = ""] # [inline] pub fn targeting_property (& self , object : impl AsArg < crate :: generated :: Object > , property : impl Into < NodePath > , initial : impl AsArg < crate :: generated :: Object > , initial_val : impl Into < NodePath > , final_val : impl OwnedToVariant , duration : f64 , trans_type : i64 , ease_type : i64 , delay : f64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . targeting_property ; let ret = crate :: icalls :: icallvar__obj_nodepath_obj_nodepath_var_f64_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into () , initial . as_arg_ptr () , initial_val . into () , final_val . owned_to_variant () , duration as _ , trans_type as _ , ease_type as _ , delay as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the current time of the tween."] # [doc = ""] # [inline] pub fn tell (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = TweenMethodTable :: get (get_api ()) . tell ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for Tween { } unsafe impl GodotObject for Tween { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Tween" } } impl QueueFree for Tween { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Tween { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Tween { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for Tween { } unsafe impl SubClass < crate :: generated :: Object > for Tween { } impl Instanciable for Tween { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Tween :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct TweenMethodTable { pub class_constructor : sys :: godot_class_constructor , pub follow_method : * mut sys :: godot_method_bind , pub follow_property : * mut sys :: godot_method_bind , pub get_runtime : * mut sys :: godot_method_bind , pub get_speed_scale : * mut sys :: godot_method_bind , pub get_tween_process_mode : * mut sys :: godot_method_bind , pub interpolate_callback : * mut sys :: godot_method_bind , pub interpolate_deferred_callback : * mut sys :: godot_method_bind , pub interpolate_method : * mut sys :: godot_method_bind , pub interpolate_property : * mut sys :: godot_method_bind , pub is_active : * mut sys :: godot_method_bind , pub is_repeat : * mut sys :: godot_method_bind , pub remove : * mut sys :: godot_method_bind , pub remove_all : * mut sys :: godot_method_bind , pub reset : * mut sys :: godot_method_bind , pub reset_all : * mut sys :: godot_method_bind , pub resume : * mut sys :: godot_method_bind , pub resume_all : * mut sys :: godot_method_bind , pub seek : * mut sys :: godot_method_bind , pub set_active : * mut sys :: godot_method_bind , pub set_repeat : * mut sys :: godot_method_bind , pub set_speed_scale : * mut sys :: godot_method_bind , pub set_tween_process_mode : * mut sys :: godot_method_bind , pub start : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind , pub stop_all : * mut sys :: godot_method_bind , pub targeting_method : * mut sys :: godot_method_bind , pub targeting_property : * mut sys :: godot_method_bind , pub tell : * mut sys :: godot_method_bind } impl TweenMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : TweenMethodTable = TweenMethodTable { class_constructor : None , follow_method : 0 as * mut sys :: godot_method_bind , follow_property : 0 as * mut sys :: godot_method_bind , get_runtime : 0 as * mut sys :: godot_method_bind , get_speed_scale : 0 as * mut sys :: godot_method_bind , get_tween_process_mode : 0 as * mut sys :: godot_method_bind , interpolate_callback : 0 as * mut sys :: godot_method_bind , interpolate_deferred_callback : 0 as * mut sys :: godot_method_bind , interpolate_method : 0 as * mut sys :: godot_method_bind , interpolate_property : 0 as * mut sys :: godot_method_bind , is_active : 0 as * mut sys :: godot_method_bind , is_repeat : 0 as * mut sys :: godot_method_bind , remove : 0 as * mut sys :: godot_method_bind , remove_all : 0 as * mut sys :: godot_method_bind , reset : 0 as * mut sys :: godot_method_bind , reset_all : 0 as * mut sys :: godot_method_bind , resume : 0 as * mut sys :: godot_method_bind , resume_all : 0 as * mut sys :: godot_method_bind , seek : 0 as * mut sys :: godot_method_bind , set_active : 0 as * mut sys :: godot_method_bind , set_repeat : 0 as * mut sys :: godot_method_bind , set_speed_scale : 0 as * mut sys :: godot_method_bind , set_tween_process_mode : 0 as * mut sys :: godot_method_bind , start : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind , stop_all : 0 as * mut sys :: godot_method_bind , targeting_method : 0 as * mut sys :: godot_method_bind , targeting_property : 0 as * mut sys :: godot_method_bind , tell : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { TweenMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Tween\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . follow_method = (gd_api . godot_method_bind_get_method) (class_name , "follow_method\0" . as_ptr () as * const c_char) ; table . follow_property = (gd_api . godot_method_bind_get_method) (class_name , "follow_property\0" . as_ptr () as * const c_char) ; table . get_runtime = (gd_api . godot_method_bind_get_method) (class_name , "get_runtime\0" . as_ptr () as * const c_char) ; table . get_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_speed_scale\0" . as_ptr () as * const c_char) ; table . get_tween_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_tween_process_mode\0" . as_ptr () as * const c_char) ; table . interpolate_callback = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_callback\0" . as_ptr () as * const c_char) ; table . interpolate_deferred_callback = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_deferred_callback\0" . as_ptr () as * const c_char) ; table . interpolate_method = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_method\0" . as_ptr () as * const c_char) ; table . interpolate_property = (gd_api . godot_method_bind_get_method) (class_name , "interpolate_property\0" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\0" . as_ptr () as * const c_char) ; table . is_repeat = (gd_api . godot_method_bind_get_method) (class_name , "is_repeat\0" . as_ptr () as * const c_char) ; table . remove = (gd_api . godot_method_bind_get_method) (class_name , "remove\0" . as_ptr () as * const c_char) ; table . remove_all = (gd_api . godot_method_bind_get_method) (class_name , "remove_all\0" . as_ptr () as * const c_char) ; table . reset = (gd_api . godot_method_bind_get_method) (class_name , "reset\0" . as_ptr () as * const c_char) ; table . reset_all = (gd_api . godot_method_bind_get_method) (class_name , "reset_all\0" . as_ptr () as * const c_char) ; table . resume = (gd_api . godot_method_bind_get_method) (class_name , "resume\0" . as_ptr () as * const c_char) ; table . resume_all = (gd_api . godot_method_bind_get_method) (class_name , "resume_all\0" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\0" . as_ptr () as * const c_char) ; table . set_active = (gd_api . godot_method_bind_get_method) (class_name , "set_active\0" . as_ptr () as * const c_char) ; table . set_repeat = (gd_api . godot_method_bind_get_method) (class_name , "set_repeat\0" . as_ptr () as * const c_char) ; table . set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_speed_scale\0" . as_ptr () as * const c_char) ; table . set_tween_process_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_tween_process_mode\0" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; table . stop_all = (gd_api . godot_method_bind_get_method) (class_name , "stop_all\0" . as_ptr () as * const c_char) ; table . targeting_method = (gd_api . godot_method_bind_get_method) (class_name , "targeting_method\0" . as_ptr () as * const c_char) ; table . targeting_property = (gd_api . godot_method_bind_get_method) (class_name , "targeting_property\0" . as_ptr () as * const c_char) ; table . tell = (gd_api . godot_method_bind_get_method) (class_name , "tell\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::tween::private::Tween;
            
            pub(crate) mod tweener {
                # ! [doc = "This module contains types related to the API class [`Tweener`][super::Tweener]."] pub (crate) mod private { # [doc = "`core class Tweener` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_tweener.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nTweener inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Tweener { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Tweener ; impl Tweener { } impl gdnative_core :: private :: godot_object :: Sealed for Tweener { } unsafe impl GodotObject for Tweener { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Tweener" } } impl std :: ops :: Deref for Tweener { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Tweener { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for Tweener { } unsafe impl SubClass < crate :: generated :: Object > for Tweener { }
                use super::*;
            }
            pub use crate::generated::tweener::private::Tweener;
            
            pub(crate) mod udp_server {
                # ! [doc = "This module contains types related to the API class [`UDPServer`][super::UDPServer]."] pub (crate) mod private { # [doc = "`core class UDPServer` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_udpserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nUDPServer inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct UDPServer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: UDPServer ; impl UDPServer { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = UDPServerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Define the maximum number of pending connections, during [`poll`][Self::poll], any new pending connection exceeding that value will be automatically dropped. Setting this value to `0` effectively prevents any new pending connection to be accepted (e.g. when all your players have connected)."] # [doc = ""] # [inline] pub fn max_pending_connections (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UDPServerMethodTable :: get (get_api ()) . get_max_pending_connections ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if a packet with a new address/port combination was received on the socket."] # [doc = ""] # [inline] pub fn is_connection_available (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UDPServerMethodTable :: get (get_api ()) . is_connection_available ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the socket is open and listening on a port."] # [doc = ""] # [inline] pub fn is_listening (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UDPServerMethodTable :: get (get_api ()) . is_listening ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Starts the server by opening a UDP socket listening on the given port. You can optionally specify a `bind_address` to only listen for packets sent to that address. See also [`PacketPeerUDP.listen`][PacketPeerUDP::listen].\n# Default Arguments\n* `bind_address` - `\"*\"`"] # [doc = ""] # [inline] pub fn listen (& self , port : i64 , bind_address : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = UDPServerMethodTable :: get (get_api ()) . listen ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , port as _ , bind_address . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Call this method at regular intervals (e.g. inside [`Node._process`][Node::_process]) to process new packets. And packet from known address/port pair will be delivered to the appropriate [`PacketPeerUDP`][PacketPeerUDP], any packet received from an unknown address/port pair will be added as a pending connection (see [`is_connection_available`][Self::is_connection_available], [`take_connection`][Self::take_connection]). The maximum number of pending connection is defined via [`max_pending_connections`][Self::max_pending_connections]."] # [doc = ""] # [inline] pub fn poll (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = UDPServerMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Define the maximum number of pending connections, during [`poll`][Self::poll], any new pending connection exceeding that value will be automatically dropped. Setting this value to `0` effectively prevents any new pending connection to be accepted (e.g. when all your players have connected)."] # [doc = ""] # [inline] pub fn set_max_pending_connections (& self , max_pending_connections : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UDPServerMethodTable :: get (get_api ()) . set_max_pending_connections ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , max_pending_connections as _) ; } } # [doc = "Stops the server, closing the UDP socket if open. Will close all connected [`PacketPeerUDP`][PacketPeerUDP] accepted via [`take_connection`][Self::take_connection] (remote peers will not be notified)."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UDPServerMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the first pending connection (connected to the appropriate address/port). Will return `null` if no new connection is available. See also [`is_connection_available`][Self::is_connection_available], [`PacketPeerUDP.connect_to_host`][PacketPeerUDP::connect_to_host]."] # [doc = ""] # [inline] pub fn take_connection (& self) -> Option < Ref < crate :: generated :: PacketPeerUDP , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = UDPServerMethodTable :: get (get_api ()) . take_connection ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: PacketPeerUDP , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for UDPServer { } unsafe impl GodotObject for UDPServer { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "UDPServer" } } impl std :: ops :: Deref for UDPServer { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for UDPServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for UDPServer { } unsafe impl SubClass < crate :: generated :: Object > for UDPServer { } impl Instanciable for UDPServer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { UDPServer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct UDPServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_max_pending_connections : * mut sys :: godot_method_bind , pub is_connection_available : * mut sys :: godot_method_bind , pub is_listening : * mut sys :: godot_method_bind , pub listen : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind , pub set_max_pending_connections : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind , pub take_connection : * mut sys :: godot_method_bind } impl UDPServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : UDPServerMethodTable = UDPServerMethodTable { class_constructor : None , get_max_pending_connections : 0 as * mut sys :: godot_method_bind , is_connection_available : 0 as * mut sys :: godot_method_bind , is_listening : 0 as * mut sys :: godot_method_bind , listen : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind , set_max_pending_connections : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind , take_connection : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { UDPServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "UDPServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_max_pending_connections = (gd_api . godot_method_bind_get_method) (class_name , "get_max_pending_connections\0" . as_ptr () as * const c_char) ; table . is_connection_available = (gd_api . godot_method_bind_get_method) (class_name , "is_connection_available\0" . as_ptr () as * const c_char) ; table . is_listening = (gd_api . godot_method_bind_get_method) (class_name , "is_listening\0" . as_ptr () as * const c_char) ; table . listen = (gd_api . godot_method_bind_get_method) (class_name , "listen\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . set_max_pending_connections = (gd_api . godot_method_bind_get_method) (class_name , "set_max_pending_connections\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; table . take_connection = (gd_api . godot_method_bind_get_method) (class_name , "take_connection\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::udp_server::private::UDPServer;
            
            pub mod upnp {
                # ! [doc = "This module contains types related to the API class [`UPNP`][super::UPNP]."] pub (crate) mod private { # [doc = "`core class UPNP` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`upnp`][super::upnp] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_upnp.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nUPNP inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct UPNP { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: UPNP ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct UpnpResult (pub i64) ; impl UpnpResult { pub const SUCCESS : UpnpResult = UpnpResult (0i64) ; pub const NOT_AUTHORIZED : UpnpResult = UpnpResult (1i64) ; pub const PORT_MAPPING_NOT_FOUND : UpnpResult = UpnpResult (2i64) ; pub const INCONSISTENT_PARAMETERS : UpnpResult = UpnpResult (3i64) ; pub const NO_SUCH_ENTRY_IN_ARRAY : UpnpResult = UpnpResult (4i64) ; pub const ACTION_FAILED : UpnpResult = UpnpResult (5i64) ; pub const SRC_IP_WILDCARD_NOT_PERMITTED : UpnpResult = UpnpResult (6i64) ; pub const EXT_PORT_WILDCARD_NOT_PERMITTED : UpnpResult = UpnpResult (7i64) ; pub const INT_PORT_WILDCARD_NOT_PERMITTED : UpnpResult = UpnpResult (8i64) ; pub const REMOTE_HOST_MUST_BE_WILDCARD : UpnpResult = UpnpResult (9i64) ; pub const EXT_PORT_MUST_BE_WILDCARD : UpnpResult = UpnpResult (10i64) ; pub const NO_PORT_MAPS_AVAILABLE : UpnpResult = UpnpResult (11i64) ; pub const CONFLICT_WITH_OTHER_MECHANISM : UpnpResult = UpnpResult (12i64) ; pub const CONFLICT_WITH_OTHER_MAPPING : UpnpResult = UpnpResult (13i64) ; pub const SAME_PORT_VALUES_REQUIRED : UpnpResult = UpnpResult (14i64) ; pub const ONLY_PERMANENT_LEASE_SUPPORTED : UpnpResult = UpnpResult (15i64) ; pub const INVALID_GATEWAY : UpnpResult = UpnpResult (16i64) ; pub const INVALID_PORT : UpnpResult = UpnpResult (17i64) ; pub const INVALID_PROTOCOL : UpnpResult = UpnpResult (18i64) ; pub const INVALID_DURATION : UpnpResult = UpnpResult (19i64) ; pub const INVALID_ARGS : UpnpResult = UpnpResult (20i64) ; pub const INVALID_RESPONSE : UpnpResult = UpnpResult (21i64) ; pub const INVALID_PARAM : UpnpResult = UpnpResult (22i64) ; pub const HTTP_ERROR : UpnpResult = UpnpResult (23i64) ; pub const SOCKET_ERROR : UpnpResult = UpnpResult (24i64) ; pub const MEM_ALLOC_ERROR : UpnpResult = UpnpResult (25i64) ; pub const NO_GATEWAY : UpnpResult = UpnpResult (26i64) ; pub const NO_DEVICES : UpnpResult = UpnpResult (27i64) ; pub const UNKNOWN_ERROR : UpnpResult = UpnpResult (28i64) ; } impl From < i64 > for UpnpResult { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < UpnpResult > for i64 { # [inline] fn from (v : UpnpResult) -> Self { v . 0 } } impl FromVariant for UpnpResult { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl UPNP { pub const UPNP_RESULT_SUCCESS : i64 = 0i64 ; pub const UPNP_RESULT_NOT_AUTHORIZED : i64 = 1i64 ; pub const UPNP_RESULT_PORT_MAPPING_NOT_FOUND : i64 = 2i64 ; pub const UPNP_RESULT_INCONSISTENT_PARAMETERS : i64 = 3i64 ; pub const UPNP_RESULT_NO_SUCH_ENTRY_IN_ARRAY : i64 = 4i64 ; pub const UPNP_RESULT_ACTION_FAILED : i64 = 5i64 ; pub const UPNP_RESULT_SRC_IP_WILDCARD_NOT_PERMITTED : i64 = 6i64 ; pub const UPNP_RESULT_EXT_PORT_WILDCARD_NOT_PERMITTED : i64 = 7i64 ; pub const UPNP_RESULT_INT_PORT_WILDCARD_NOT_PERMITTED : i64 = 8i64 ; pub const UPNP_RESULT_REMOTE_HOST_MUST_BE_WILDCARD : i64 = 9i64 ; pub const UPNP_RESULT_EXT_PORT_MUST_BE_WILDCARD : i64 = 10i64 ; pub const UPNP_RESULT_NO_PORT_MAPS_AVAILABLE : i64 = 11i64 ; pub const UPNP_RESULT_CONFLICT_WITH_OTHER_MECHANISM : i64 = 12i64 ; pub const UPNP_RESULT_CONFLICT_WITH_OTHER_MAPPING : i64 = 13i64 ; pub const UPNP_RESULT_SAME_PORT_VALUES_REQUIRED : i64 = 14i64 ; pub const UPNP_RESULT_ONLY_PERMANENT_LEASE_SUPPORTED : i64 = 15i64 ; pub const UPNP_RESULT_INVALID_GATEWAY : i64 = 16i64 ; pub const UPNP_RESULT_INVALID_PORT : i64 = 17i64 ; pub const UPNP_RESULT_INVALID_PROTOCOL : i64 = 18i64 ; pub const UPNP_RESULT_INVALID_DURATION : i64 = 19i64 ; pub const UPNP_RESULT_INVALID_ARGS : i64 = 20i64 ; pub const UPNP_RESULT_INVALID_RESPONSE : i64 = 21i64 ; pub const UPNP_RESULT_INVALID_PARAM : i64 = 22i64 ; pub const UPNP_RESULT_HTTP_ERROR : i64 = 23i64 ; pub const UPNP_RESULT_SOCKET_ERROR : i64 = 24i64 ; pub const UPNP_RESULT_MEM_ALLOC_ERROR : i64 = 25i64 ; pub const UPNP_RESULT_NO_GATEWAY : i64 = 26i64 ; pub const UPNP_RESULT_NO_DEVICES : i64 = 27i64 ; pub const UPNP_RESULT_UNKNOWN_ERROR : i64 = 28i64 ; } impl UPNP { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = UPNPMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_device (& self , device : impl AsArg < crate :: generated :: UPNPDevice >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . add_device ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , device . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_port_mapping (& self , port : i64 , port_internal : i64 , desc : impl Into < GodotString > , proto : impl Into < GodotString > , duration : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . add_port_mapping ; let ret = crate :: icalls :: icallvar__i64_i64_str_str_i64 (method_bind , self . this . sys () . as_ptr () , port as _ , port_internal as _ , desc . into () , proto . into () , duration as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn clear_devices (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . clear_devices ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn delete_port_mapping (& self , port : i64 , proto : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . delete_port_mapping ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , port as _ , proto . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn discover (& self , timeout : i64 , ttl : i64 , device_filter : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . discover ; let ret = crate :: icalls :: icallvar__i64_i64_str (method_bind , self . this . sys () . as_ptr () , timeout as _ , ttl as _ , device_filter . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_device (& self , index : i64) -> Option < Ref < crate :: generated :: UPNPDevice , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . get_device ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; < Option < Ref < crate :: generated :: UPNPDevice , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_device_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . get_device_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn discover_local_port (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . get_discover_local_port ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn discover_multicast_if (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . get_discover_multicast_if ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_gateway (& self) -> Option < Ref < crate :: generated :: UPNPDevice , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . get_gateway ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: UPNPDevice , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn is_discover_ipv6 (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . is_discover_ipv6 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn query_external_address (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . query_external_address ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_device (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . remove_device ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_device (& self , index : i64 , device : impl AsArg < crate :: generated :: UPNPDevice >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . set_device ; let ret = crate :: icalls :: icallvar__i64_obj (method_bind , self . this . sys () . as_ptr () , index as _ , device . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_discover_ipv6 (& self , ipv6 : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . set_discover_ipv6 ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , ipv6 as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_discover_local_port (& self , port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . set_discover_local_port ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , port as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_discover_multicast_if (& self , m_if : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPMethodTable :: get (get_api ()) . set_discover_multicast_if ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , m_if . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for UPNP { } unsafe impl GodotObject for UPNP { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "UPNP" } } impl std :: ops :: Deref for UPNP { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for UPNP { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for UPNP { } unsafe impl SubClass < crate :: generated :: Object > for UPNP { } impl Instanciable for UPNP { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { UPNP :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct UPNPMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_device : * mut sys :: godot_method_bind , pub add_port_mapping : * mut sys :: godot_method_bind , pub clear_devices : * mut sys :: godot_method_bind , pub delete_port_mapping : * mut sys :: godot_method_bind , pub discover : * mut sys :: godot_method_bind , pub get_device : * mut sys :: godot_method_bind , pub get_device_count : * mut sys :: godot_method_bind , pub get_discover_local_port : * mut sys :: godot_method_bind , pub get_discover_multicast_if : * mut sys :: godot_method_bind , pub get_gateway : * mut sys :: godot_method_bind , pub is_discover_ipv6 : * mut sys :: godot_method_bind , pub query_external_address : * mut sys :: godot_method_bind , pub remove_device : * mut sys :: godot_method_bind , pub set_device : * mut sys :: godot_method_bind , pub set_discover_ipv6 : * mut sys :: godot_method_bind , pub set_discover_local_port : * mut sys :: godot_method_bind , pub set_discover_multicast_if : * mut sys :: godot_method_bind } impl UPNPMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : UPNPMethodTable = UPNPMethodTable { class_constructor : None , add_device : 0 as * mut sys :: godot_method_bind , add_port_mapping : 0 as * mut sys :: godot_method_bind , clear_devices : 0 as * mut sys :: godot_method_bind , delete_port_mapping : 0 as * mut sys :: godot_method_bind , discover : 0 as * mut sys :: godot_method_bind , get_device : 0 as * mut sys :: godot_method_bind , get_device_count : 0 as * mut sys :: godot_method_bind , get_discover_local_port : 0 as * mut sys :: godot_method_bind , get_discover_multicast_if : 0 as * mut sys :: godot_method_bind , get_gateway : 0 as * mut sys :: godot_method_bind , is_discover_ipv6 : 0 as * mut sys :: godot_method_bind , query_external_address : 0 as * mut sys :: godot_method_bind , remove_device : 0 as * mut sys :: godot_method_bind , set_device : 0 as * mut sys :: godot_method_bind , set_discover_ipv6 : 0 as * mut sys :: godot_method_bind , set_discover_local_port : 0 as * mut sys :: godot_method_bind , set_discover_multicast_if : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { UPNPMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "UPNP\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_device = (gd_api . godot_method_bind_get_method) (class_name , "add_device\0" . as_ptr () as * const c_char) ; table . add_port_mapping = (gd_api . godot_method_bind_get_method) (class_name , "add_port_mapping\0" . as_ptr () as * const c_char) ; table . clear_devices = (gd_api . godot_method_bind_get_method) (class_name , "clear_devices\0" . as_ptr () as * const c_char) ; table . delete_port_mapping = (gd_api . godot_method_bind_get_method) (class_name , "delete_port_mapping\0" . as_ptr () as * const c_char) ; table . discover = (gd_api . godot_method_bind_get_method) (class_name , "discover\0" . as_ptr () as * const c_char) ; table . get_device = (gd_api . godot_method_bind_get_method) (class_name , "get_device\0" . as_ptr () as * const c_char) ; table . get_device_count = (gd_api . godot_method_bind_get_method) (class_name , "get_device_count\0" . as_ptr () as * const c_char) ; table . get_discover_local_port = (gd_api . godot_method_bind_get_method) (class_name , "get_discover_local_port\0" . as_ptr () as * const c_char) ; table . get_discover_multicast_if = (gd_api . godot_method_bind_get_method) (class_name , "get_discover_multicast_if\0" . as_ptr () as * const c_char) ; table . get_gateway = (gd_api . godot_method_bind_get_method) (class_name , "get_gateway\0" . as_ptr () as * const c_char) ; table . is_discover_ipv6 = (gd_api . godot_method_bind_get_method) (class_name , "is_discover_ipv6\0" . as_ptr () as * const c_char) ; table . query_external_address = (gd_api . godot_method_bind_get_method) (class_name , "query_external_address\0" . as_ptr () as * const c_char) ; table . remove_device = (gd_api . godot_method_bind_get_method) (class_name , "remove_device\0" . as_ptr () as * const c_char) ; table . set_device = (gd_api . godot_method_bind_get_method) (class_name , "set_device\0" . as_ptr () as * const c_char) ; table . set_discover_ipv6 = (gd_api . godot_method_bind_get_method) (class_name , "set_discover_ipv6\0" . as_ptr () as * const c_char) ; table . set_discover_local_port = (gd_api . godot_method_bind_get_method) (class_name , "set_discover_local_port\0" . as_ptr () as * const c_char) ; table . set_discover_multicast_if = (gd_api . godot_method_bind_get_method) (class_name , "set_discover_multicast_if\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::upnp::private::UPNP;
            
            pub mod upnp_device {
                # ! [doc = "This module contains types related to the API class [`UPNPDevice`][super::UPNPDevice]."] pub (crate) mod private { # [doc = "`core class UPNPDevice` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`upnp_device`][super::upnp_device] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_upnpdevice.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nUPNPDevice inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct UPNPDevice { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: UPNPDevice ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct IgdStatus (pub i64) ; impl IgdStatus { pub const OK : IgdStatus = IgdStatus (0i64) ; pub const HTTP_ERROR : IgdStatus = IgdStatus (1i64) ; pub const HTTP_EMPTY : IgdStatus = IgdStatus (2i64) ; pub const NO_URLS : IgdStatus = IgdStatus (3i64) ; pub const NO_IGD : IgdStatus = IgdStatus (4i64) ; pub const DISCONNECTED : IgdStatus = IgdStatus (5i64) ; pub const UNKNOWN_DEVICE : IgdStatus = IgdStatus (6i64) ; pub const INVALID_CONTROL : IgdStatus = IgdStatus (7i64) ; pub const MALLOC_ERROR : IgdStatus = IgdStatus (8i64) ; pub const UNKNOWN_ERROR : IgdStatus = IgdStatus (9i64) ; } impl From < i64 > for IgdStatus { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < IgdStatus > for i64 { # [inline] fn from (v : IgdStatus) -> Self { v . 0 } } impl FromVariant for IgdStatus { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl UPNPDevice { pub const IGD_STATUS_OK : i64 = 0i64 ; pub const IGD_STATUS_HTTP_ERROR : i64 = 1i64 ; pub const IGD_STATUS_HTTP_EMPTY : i64 = 2i64 ; pub const IGD_STATUS_NO_URLS : i64 = 3i64 ; pub const IGD_STATUS_NO_IGD : i64 = 4i64 ; pub const IGD_STATUS_DISCONNECTED : i64 = 5i64 ; pub const IGD_STATUS_UNKNOWN_DEVICE : i64 = 6i64 ; pub const IGD_STATUS_INVALID_CONTROL : i64 = 7i64 ; pub const IGD_STATUS_MALLOC_ERROR : i64 = 8i64 ; pub const IGD_STATUS_UNKNOWN_ERROR : i64 = 9i64 ; } impl UPNPDevice { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = UPNPDeviceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_port_mapping (& self , port : i64 , port_internal : i64 , desc : impl Into < GodotString > , proto : impl Into < GodotString > , duration : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . add_port_mapping ; let ret = crate :: icalls :: icallvar__i64_i64_str_str_i64 (method_bind , self . this . sys () . as_ptr () , port as _ , port_internal as _ , desc . into () , proto . into () , duration as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn delete_port_mapping (& self , port : i64 , proto : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . delete_port_mapping ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , port as _ , proto . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn description_url (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_description_url ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_control_url (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_control_url ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_our_addr (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_our_addr ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_service_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_service_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn igd_status (& self) -> crate :: generated :: upnp_device :: IgdStatus { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_igd_status ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: upnp_device :: IgdStatus > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn service_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . get_service_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn is_valid_gateway (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . is_valid_gateway ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn query_external_address (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . query_external_address ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_description_url (& self , url : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_description_url ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , url . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_control_url (& self , url : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_control_url ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , url . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_our_addr (& self , addr : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_our_addr ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , addr . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_service_type (& self , type_ : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_service_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , type_ . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_igd_status (& self , status : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_igd_status ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , status as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_service_type (& self , type_ : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UPNPDeviceMethodTable :: get (get_api ()) . set_service_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , type_ . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for UPNPDevice { } unsafe impl GodotObject for UPNPDevice { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "UPNPDevice" } } impl std :: ops :: Deref for UPNPDevice { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for UPNPDevice { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for UPNPDevice { } unsafe impl SubClass < crate :: generated :: Object > for UPNPDevice { } impl Instanciable for UPNPDevice { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { UPNPDevice :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct UPNPDeviceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_port_mapping : * mut sys :: godot_method_bind , pub delete_port_mapping : * mut sys :: godot_method_bind , pub get_description_url : * mut sys :: godot_method_bind , pub get_igd_control_url : * mut sys :: godot_method_bind , pub get_igd_our_addr : * mut sys :: godot_method_bind , pub get_igd_service_type : * mut sys :: godot_method_bind , pub get_igd_status : * mut sys :: godot_method_bind , pub get_service_type : * mut sys :: godot_method_bind , pub is_valid_gateway : * mut sys :: godot_method_bind , pub query_external_address : * mut sys :: godot_method_bind , pub set_description_url : * mut sys :: godot_method_bind , pub set_igd_control_url : * mut sys :: godot_method_bind , pub set_igd_our_addr : * mut sys :: godot_method_bind , pub set_igd_service_type : * mut sys :: godot_method_bind , pub set_igd_status : * mut sys :: godot_method_bind , pub set_service_type : * mut sys :: godot_method_bind } impl UPNPDeviceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : UPNPDeviceMethodTable = UPNPDeviceMethodTable { class_constructor : None , add_port_mapping : 0 as * mut sys :: godot_method_bind , delete_port_mapping : 0 as * mut sys :: godot_method_bind , get_description_url : 0 as * mut sys :: godot_method_bind , get_igd_control_url : 0 as * mut sys :: godot_method_bind , get_igd_our_addr : 0 as * mut sys :: godot_method_bind , get_igd_service_type : 0 as * mut sys :: godot_method_bind , get_igd_status : 0 as * mut sys :: godot_method_bind , get_service_type : 0 as * mut sys :: godot_method_bind , is_valid_gateway : 0 as * mut sys :: godot_method_bind , query_external_address : 0 as * mut sys :: godot_method_bind , set_description_url : 0 as * mut sys :: godot_method_bind , set_igd_control_url : 0 as * mut sys :: godot_method_bind , set_igd_our_addr : 0 as * mut sys :: godot_method_bind , set_igd_service_type : 0 as * mut sys :: godot_method_bind , set_igd_status : 0 as * mut sys :: godot_method_bind , set_service_type : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { UPNPDeviceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "UPNPDevice\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_port_mapping = (gd_api . godot_method_bind_get_method) (class_name , "add_port_mapping\0" . as_ptr () as * const c_char) ; table . delete_port_mapping = (gd_api . godot_method_bind_get_method) (class_name , "delete_port_mapping\0" . as_ptr () as * const c_char) ; table . get_description_url = (gd_api . godot_method_bind_get_method) (class_name , "get_description_url\0" . as_ptr () as * const c_char) ; table . get_igd_control_url = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_control_url\0" . as_ptr () as * const c_char) ; table . get_igd_our_addr = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_our_addr\0" . as_ptr () as * const c_char) ; table . get_igd_service_type = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_service_type\0" . as_ptr () as * const c_char) ; table . get_igd_status = (gd_api . godot_method_bind_get_method) (class_name , "get_igd_status\0" . as_ptr () as * const c_char) ; table . get_service_type = (gd_api . godot_method_bind_get_method) (class_name , "get_service_type\0" . as_ptr () as * const c_char) ; table . is_valid_gateway = (gd_api . godot_method_bind_get_method) (class_name , "is_valid_gateway\0" . as_ptr () as * const c_char) ; table . query_external_address = (gd_api . godot_method_bind_get_method) (class_name , "query_external_address\0" . as_ptr () as * const c_char) ; table . set_description_url = (gd_api . godot_method_bind_get_method) (class_name , "set_description_url\0" . as_ptr () as * const c_char) ; table . set_igd_control_url = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_control_url\0" . as_ptr () as * const c_char) ; table . set_igd_our_addr = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_our_addr\0" . as_ptr () as * const c_char) ; table . set_igd_service_type = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_service_type\0" . as_ptr () as * const c_char) ; table . set_igd_status = (gd_api . godot_method_bind_get_method) (class_name , "set_igd_status\0" . as_ptr () as * const c_char) ; table . set_service_type = (gd_api . godot_method_bind_get_method) (class_name , "set_service_type\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::upnp_device::private::UPNPDevice;
            
            pub mod undo_redo {
                # ! [doc = "This module contains types related to the API class [`UndoRedo`][super::UndoRedo]."] pub (crate) mod private { # [doc = "`core class UndoRedo` inherits `Object` (manually managed).\n\nThis class has related types in the [`undo_redo`][super::undo_redo] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_undoredo.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`UndoRedo` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<UndoRedo>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nUndoRedo inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct UndoRedo { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: UndoRedo ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MergeMode (pub i64) ; impl MergeMode { pub const DISABLE : MergeMode = MergeMode (0i64) ; pub const ENDS : MergeMode = MergeMode (1i64) ; pub const ALL : MergeMode = MergeMode (2i64) ; } impl From < i64 > for MergeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MergeMode > for i64 { # [inline] fn from (v : MergeMode) -> Self { v . 0 } } impl FromVariant for MergeMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl UndoRedo { pub const MERGE_DISABLE : i64 = 0i64 ; pub const MERGE_ENDS : i64 = 1i64 ; pub const MERGE_ALL : i64 = 2i64 ; } impl UndoRedo { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = UndoRedoMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Register a method that will be called when the action is committed."] # [doc = ""] # [inline] pub fn add_do_method (& self , object : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_do_method ; let ret = crate :: icalls :: icallvarargs__obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , method . into () , varargs) ; ret } } # [doc = "Register a property value change for \"do\"."] # [doc = ""] # [inline] pub fn add_do_property (& self , object : impl AsArg < crate :: generated :: Object > , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_do_property ; let ret = crate :: icalls :: icallvar__obj_str_var (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "Register a reference for \"do\" that will be erased if the \"do\" history is lost. This is useful mostly for new nodes created for the \"do\" call. Do not use for resources."] # [doc = ""] # [inline] pub fn add_do_reference (& self , object : impl AsArg < crate :: generated :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_do_reference ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr ()) ; } } # [doc = "Register a method that will be called when the action is undone."] # [doc = ""] # [inline] pub fn add_undo_method (& self , object : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString > , varargs : & [Variant]) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_undo_method ; let ret = crate :: icalls :: icallvarargs__obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , method . into () , varargs) ; ret } } # [doc = "Register a property value change for \"undo\"."] # [doc = ""] # [inline] pub fn add_undo_property (& self , object : impl AsArg < crate :: generated :: Object > , property : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_undo_property ; let ret = crate :: icalls :: icallvar__obj_str_var (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into () , value . owned_to_variant ()) ; } } # [doc = "Register a reference for \"undo\" that will be erased if the \"undo\" history is lost. This is useful mostly for nodes removed with the \"do\" call (not the \"undo\" call!)."] # [doc = ""] # [inline] pub fn add_undo_reference (& self , object : impl AsArg < crate :: generated :: Object >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . add_undo_reference ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr ()) ; } } # [doc = "Clear the undo/redo history and associated references.\nPassing `false` to `increase_version` will prevent the version number to be increased from this.\n# Default Arguments\n* `increase_version` - `true`"] # [doc = ""] # [inline] pub fn clear_history (& self , increase_version : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . clear_history ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , increase_version as _) ; } } # [doc = "Commit the action. All \"do\" methods/properties are called/set when this function is called."] # [doc = ""] # [inline] pub fn commit_action (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . commit_action ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Create a new action. After this is called, do all your calls to [`add_do_method`][Self::add_do_method], [`add_undo_method`][Self::add_undo_method], [`add_do_property`][Self::add_do_property], and [`add_undo_property`][Self::add_undo_property], then commit the action with [`commit_action`][Self::commit_action].\nThe way actions are merged is dictated by the `merge_mode` argument. See [`MergeMode`][MergeMode] for details.\n# Default Arguments\n* `merge_mode` - `0`"] # [doc = ""] # [inline] pub fn create_action (& self , name : impl Into < GodotString > , merge_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . create_action ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , merge_mode as _) ; } } # [doc = "Gets the name of the current action."] # [doc = ""] # [inline] pub fn get_current_action_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . get_current_action_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the version. Every time a new action is committed, the [`UndoRedo`][UndoRedo]'s version number is increased automatically.\nThis is useful mostly to check if something changed from a saved version."] # [doc = ""] # [inline] pub fn get_version (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . get_version ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if a \"redo\" action is available."] # [doc = ""] # [inline] pub fn has_redo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . has_redo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if an \"undo\" action is available."] # [doc = ""] # [inline] pub fn has_undo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . has_undo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the [`UndoRedo`][UndoRedo] is currently committing the action, i.e. running its \"do\" method or property change (see [`commit_action`][Self::commit_action])."] # [doc = ""] # [inline] pub fn is_commiting_action (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . is_commiting_action ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Redo the last action."] # [doc = ""] # [inline] pub fn redo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . redo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Undo the last action."] # [doc = ""] # [inline] pub fn undo (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = UndoRedoMethodTable :: get (get_api ()) . undo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for UndoRedo { } unsafe impl GodotObject for UndoRedo { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "UndoRedo" } } impl std :: ops :: Deref for UndoRedo { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for UndoRedo { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for UndoRedo { } impl Instanciable for UndoRedo { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { UndoRedo :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct UndoRedoMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_do_method : * mut sys :: godot_method_bind , pub add_do_property : * mut sys :: godot_method_bind , pub add_do_reference : * mut sys :: godot_method_bind , pub add_undo_method : * mut sys :: godot_method_bind , pub add_undo_property : * mut sys :: godot_method_bind , pub add_undo_reference : * mut sys :: godot_method_bind , pub clear_history : * mut sys :: godot_method_bind , pub commit_action : * mut sys :: godot_method_bind , pub create_action : * mut sys :: godot_method_bind , pub get_current_action_name : * mut sys :: godot_method_bind , pub get_version : * mut sys :: godot_method_bind , pub has_redo : * mut sys :: godot_method_bind , pub has_undo : * mut sys :: godot_method_bind , pub is_commiting_action : * mut sys :: godot_method_bind , pub redo : * mut sys :: godot_method_bind , pub undo : * mut sys :: godot_method_bind } impl UndoRedoMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : UndoRedoMethodTable = UndoRedoMethodTable { class_constructor : None , add_do_method : 0 as * mut sys :: godot_method_bind , add_do_property : 0 as * mut sys :: godot_method_bind , add_do_reference : 0 as * mut sys :: godot_method_bind , add_undo_method : 0 as * mut sys :: godot_method_bind , add_undo_property : 0 as * mut sys :: godot_method_bind , add_undo_reference : 0 as * mut sys :: godot_method_bind , clear_history : 0 as * mut sys :: godot_method_bind , commit_action : 0 as * mut sys :: godot_method_bind , create_action : 0 as * mut sys :: godot_method_bind , get_current_action_name : 0 as * mut sys :: godot_method_bind , get_version : 0 as * mut sys :: godot_method_bind , has_redo : 0 as * mut sys :: godot_method_bind , has_undo : 0 as * mut sys :: godot_method_bind , is_commiting_action : 0 as * mut sys :: godot_method_bind , redo : 0 as * mut sys :: godot_method_bind , undo : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { UndoRedoMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "UndoRedo\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_do_method = (gd_api . godot_method_bind_get_method) (class_name , "add_do_method\0" . as_ptr () as * const c_char) ; table . add_do_property = (gd_api . godot_method_bind_get_method) (class_name , "add_do_property\0" . as_ptr () as * const c_char) ; table . add_do_reference = (gd_api . godot_method_bind_get_method) (class_name , "add_do_reference\0" . as_ptr () as * const c_char) ; table . add_undo_method = (gd_api . godot_method_bind_get_method) (class_name , "add_undo_method\0" . as_ptr () as * const c_char) ; table . add_undo_property = (gd_api . godot_method_bind_get_method) (class_name , "add_undo_property\0" . as_ptr () as * const c_char) ; table . add_undo_reference = (gd_api . godot_method_bind_get_method) (class_name , "add_undo_reference\0" . as_ptr () as * const c_char) ; table . clear_history = (gd_api . godot_method_bind_get_method) (class_name , "clear_history\0" . as_ptr () as * const c_char) ; table . commit_action = (gd_api . godot_method_bind_get_method) (class_name , "commit_action\0" . as_ptr () as * const c_char) ; table . create_action = (gd_api . godot_method_bind_get_method) (class_name , "create_action\0" . as_ptr () as * const c_char) ; table . get_current_action_name = (gd_api . godot_method_bind_get_method) (class_name , "get_current_action_name\0" . as_ptr () as * const c_char) ; table . get_version = (gd_api . godot_method_bind_get_method) (class_name , "get_version\0" . as_ptr () as * const c_char) ; table . has_redo = (gd_api . godot_method_bind_get_method) (class_name , "has_redo\0" . as_ptr () as * const c_char) ; table . has_undo = (gd_api . godot_method_bind_get_method) (class_name , "has_undo\0" . as_ptr () as * const c_char) ; table . is_commiting_action = (gd_api . godot_method_bind_get_method) (class_name , "is_commiting_action\0" . as_ptr () as * const c_char) ; table . redo = (gd_api . godot_method_bind_get_method) (class_name , "redo\0" . as_ptr () as * const c_char) ; table . undo = (gd_api . godot_method_bind_get_method) (class_name , "undo\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::undo_redo::private::UndoRedo;
            
            pub(crate) mod vbox_container {
                # ! [doc = "This module contains types related to the API class [`VBoxContainer`][super::VBoxContainer]."] pub (crate) mod private { # [doc = "`core class VBoxContainer` inherits `BoxContainer` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_vboxcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`VBoxContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<VBoxContainer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVBoxContainer inherits methods from:\n - [BoxContainer](struct.BoxContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VBoxContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VBoxContainer ; impl VBoxContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VBoxContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VBoxContainer { } unsafe impl GodotObject for VBoxContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VBoxContainer" } } impl QueueFree for VBoxContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for VBoxContainer { type Target = crate :: generated :: BoxContainer ; # [inline] fn deref (& self) -> & crate :: generated :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VBoxContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: BoxContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: BoxContainer > for VBoxContainer { } unsafe impl SubClass < crate :: generated :: Container > for VBoxContainer { } unsafe impl SubClass < crate :: generated :: Control > for VBoxContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for VBoxContainer { } unsafe impl SubClass < crate :: generated :: Node > for VBoxContainer { } unsafe impl SubClass < crate :: generated :: Object > for VBoxContainer { } impl Instanciable for VBoxContainer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VBoxContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VBoxContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VBoxContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VBoxContainerMethodTable = VBoxContainerMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VBoxContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VBoxContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::vbox_container::private::VBoxContainer;
            
            pub(crate) mod vflow_container {
                # ! [doc = "This module contains types related to the API class [`VFlowContainer`][super::VFlowContainer]."] pub (crate) mod private { # [doc = "`core class VFlowContainer` inherits `FlowContainer` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_vflowcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`VFlowContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<VFlowContainer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVFlowContainer inherits methods from:\n - [FlowContainer](struct.FlowContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VFlowContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VFlowContainer ; impl VFlowContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VFlowContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VFlowContainer { } unsafe impl GodotObject for VFlowContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VFlowContainer" } } impl QueueFree for VFlowContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for VFlowContainer { type Target = crate :: generated :: FlowContainer ; # [inline] fn deref (& self) -> & crate :: generated :: FlowContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VFlowContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: FlowContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: FlowContainer > for VFlowContainer { } unsafe impl SubClass < crate :: generated :: Container > for VFlowContainer { } unsafe impl SubClass < crate :: generated :: Control > for VFlowContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for VFlowContainer { } unsafe impl SubClass < crate :: generated :: Node > for VFlowContainer { } unsafe impl SubClass < crate :: generated :: Object > for VFlowContainer { } impl Instanciable for VFlowContainer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VFlowContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VFlowContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VFlowContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VFlowContainerMethodTable = VFlowContainerMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VFlowContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VFlowContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::vflow_container::private::VFlowContainer;
            
            pub(crate) mod vscroll_bar {
                # ! [doc = "This module contains types related to the API class [`VScrollBar`][super::VScrollBar]."] pub (crate) mod private { # [doc = "`core class VScrollBar` inherits `ScrollBar` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_vscrollbar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`VScrollBar` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<VScrollBar>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVScrollBar inherits methods from:\n - [ScrollBar](struct.ScrollBar.html)\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VScrollBar { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VScrollBar ; impl VScrollBar { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VScrollBarMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VScrollBar { } unsafe impl GodotObject for VScrollBar { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VScrollBar" } } impl QueueFree for VScrollBar { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for VScrollBar { type Target = crate :: generated :: ScrollBar ; # [inline] fn deref (& self) -> & crate :: generated :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VScrollBar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: ScrollBar { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: ScrollBar > for VScrollBar { } unsafe impl SubClass < crate :: generated :: Range > for VScrollBar { } unsafe impl SubClass < crate :: generated :: Control > for VScrollBar { } unsafe impl SubClass < crate :: generated :: CanvasItem > for VScrollBar { } unsafe impl SubClass < crate :: generated :: Node > for VScrollBar { } unsafe impl SubClass < crate :: generated :: Object > for VScrollBar { } impl Instanciable for VScrollBar { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VScrollBar :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VScrollBarMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VScrollBarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VScrollBarMethodTable = VScrollBarMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VScrollBarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VScrollBar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::vscroll_bar::private::VScrollBar;
            
            pub(crate) mod vseparator {
                # ! [doc = "This module contains types related to the API class [`VSeparator`][super::VSeparator]."] pub (crate) mod private { # [doc = "`core class VSeparator` inherits `Separator` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_vseparator.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`VSeparator` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<VSeparator>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVSeparator inherits methods from:\n - [Separator](struct.Separator.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VSeparator { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VSeparator ; impl VSeparator { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VSeparatorMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VSeparator { } unsafe impl GodotObject for VSeparator { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VSeparator" } } impl QueueFree for VSeparator { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for VSeparator { type Target = crate :: generated :: Separator ; # [inline] fn deref (& self) -> & crate :: generated :: Separator { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VSeparator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Separator { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Separator > for VSeparator { } unsafe impl SubClass < crate :: generated :: Control > for VSeparator { } unsafe impl SubClass < crate :: generated :: CanvasItem > for VSeparator { } unsafe impl SubClass < crate :: generated :: Node > for VSeparator { } unsafe impl SubClass < crate :: generated :: Object > for VSeparator { } impl Instanciable for VSeparator { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VSeparator :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VSeparatorMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VSeparatorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VSeparatorMethodTable = VSeparatorMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VSeparatorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VSeparator\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::vseparator::private::VSeparator;
            
            pub(crate) mod vslider {
                # ! [doc = "This module contains types related to the API class [`VSlider`][super::VSlider]."] pub (crate) mod private { # [doc = "`core class VSlider` inherits `Slider` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_vslider.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`VSlider` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<VSlider>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVSlider inherits methods from:\n - [Slider](struct.Slider.html)\n - [Range](struct.Range.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VSlider { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VSlider ; impl VSlider { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VSliderMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VSlider { } unsafe impl GodotObject for VSlider { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VSlider" } } impl QueueFree for VSlider { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for VSlider { type Target = crate :: generated :: Slider ; # [inline] fn deref (& self) -> & crate :: generated :: Slider { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VSlider { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Slider { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Slider > for VSlider { } unsafe impl SubClass < crate :: generated :: Range > for VSlider { } unsafe impl SubClass < crate :: generated :: Control > for VSlider { } unsafe impl SubClass < crate :: generated :: CanvasItem > for VSlider { } unsafe impl SubClass < crate :: generated :: Node > for VSlider { } unsafe impl SubClass < crate :: generated :: Object > for VSlider { } impl Instanciable for VSlider { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VSlider :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VSliderMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VSliderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VSliderMethodTable = VSliderMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VSliderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VSlider\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::vslider::private::VSlider;
            
            pub(crate) mod vsplit_container {
                # ! [doc = "This module contains types related to the API class [`VSplitContainer`][super::VSplitContainer]."] pub (crate) mod private { # [doc = "`core class VSplitContainer` inherits `SplitContainer` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_vsplitcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`VSplitContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<VSplitContainer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVSplitContainer inherits methods from:\n - [SplitContainer](struct.SplitContainer.html)\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VSplitContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VSplitContainer ; impl VSplitContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VSplitContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VSplitContainer { } unsafe impl GodotObject for VSplitContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VSplitContainer" } } impl QueueFree for VSplitContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for VSplitContainer { type Target = crate :: generated :: SplitContainer ; # [inline] fn deref (& self) -> & crate :: generated :: SplitContainer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VSplitContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: SplitContainer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: SplitContainer > for VSplitContainer { } unsafe impl SubClass < crate :: generated :: Container > for VSplitContainer { } unsafe impl SubClass < crate :: generated :: Control > for VSplitContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for VSplitContainer { } unsafe impl SubClass < crate :: generated :: Node > for VSplitContainer { } unsafe impl SubClass < crate :: generated :: Object > for VSplitContainer { } impl Instanciable for VSplitContainer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VSplitContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VSplitContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VSplitContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VSplitContainerMethodTable = VSplitContainerMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VSplitContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VSplitContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::vsplit_container::private::VSplitContainer;
            
            pub(crate) mod vehicle_body {
                # ! [doc = "This module contains types related to the API class [`VehicleBody`][super::VehicleBody]."] pub (crate) mod private { # [doc = "`core class VehicleBody` inherits `RigidBody` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_vehiclebody.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`VehicleBody` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<VehicleBody>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVehicleBody inherits methods from:\n - [RigidBody](struct.RigidBody.html)\n - [PhysicsBody](struct.PhysicsBody.html)\n - [CollisionObject](struct.CollisionObject.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VehicleBody { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VehicleBody ; impl VehicleBody { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VehicleBodyMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [`RigidBody.mass`][RigidBody::mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking."] # [doc = ""] # [inline] pub fn brake (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleBodyMethodTable :: get (get_api ()) . get_brake ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Accelerates the vehicle by applying an engine force. The vehicle is only sped up if the wheels that have [`VehicleWheel.use_as_traction`][VehicleWheel::use_as_traction] set to `true` and are in contact with a surface. The [`RigidBody.mass`][RigidBody::mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.\n**Note:** The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears.\nA negative value will result in the vehicle reversing."] # [doc = ""] # [inline] pub fn engine_force (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleBodyMethodTable :: get (get_api ()) . get_engine_force ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The steering angle for the vehicle. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [`VehicleWheel.use_as_steering`][VehicleWheel::use_as_steering] set to `true` will automatically be rotated."] # [doc = ""] # [inline] pub fn steering (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleBodyMethodTable :: get (get_api ()) . get_steering ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [`RigidBody.mass`][RigidBody::mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking."] # [doc = ""] # [inline] pub fn set_brake (& self , brake : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleBodyMethodTable :: get (get_api ()) . set_brake ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , brake as _) ; } } # [doc = "Accelerates the vehicle by applying an engine force. The vehicle is only sped up if the wheels that have [`VehicleWheel.use_as_traction`][VehicleWheel::use_as_traction] set to `true` and are in contact with a surface. The [`RigidBody.mass`][RigidBody::mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.\n**Note:** The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears.\nA negative value will result in the vehicle reversing."] # [doc = ""] # [inline] pub fn set_engine_force (& self , engine_force : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleBodyMethodTable :: get (get_api ()) . set_engine_force ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , engine_force as _) ; } } # [doc = "The steering angle for the vehicle. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [`VehicleWheel.use_as_steering`][VehicleWheel::use_as_steering] set to `true` will automatically be rotated."] # [doc = ""] # [inline] pub fn set_steering (& self , steering : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleBodyMethodTable :: get (get_api ()) . set_steering ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , steering as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VehicleBody { } unsafe impl GodotObject for VehicleBody { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VehicleBody" } } impl QueueFree for VehicleBody { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for VehicleBody { type Target = crate :: generated :: RigidBody ; # [inline] fn deref (& self) -> & crate :: generated :: RigidBody { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VehicleBody { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: RigidBody { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: RigidBody > for VehicleBody { } unsafe impl SubClass < crate :: generated :: PhysicsBody > for VehicleBody { } unsafe impl SubClass < crate :: generated :: CollisionObject > for VehicleBody { } unsafe impl SubClass < crate :: generated :: Spatial > for VehicleBody { } unsafe impl SubClass < crate :: generated :: Node > for VehicleBody { } unsafe impl SubClass < crate :: generated :: Object > for VehicleBody { } impl Instanciable for VehicleBody { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VehicleBody :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VehicleBodyMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_brake : * mut sys :: godot_method_bind , pub get_engine_force : * mut sys :: godot_method_bind , pub get_steering : * mut sys :: godot_method_bind , pub set_brake : * mut sys :: godot_method_bind , pub set_engine_force : * mut sys :: godot_method_bind , pub set_steering : * mut sys :: godot_method_bind } impl VehicleBodyMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VehicleBodyMethodTable = VehicleBodyMethodTable { class_constructor : None , get_brake : 0 as * mut sys :: godot_method_bind , get_engine_force : 0 as * mut sys :: godot_method_bind , get_steering : 0 as * mut sys :: godot_method_bind , set_brake : 0 as * mut sys :: godot_method_bind , set_engine_force : 0 as * mut sys :: godot_method_bind , set_steering : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VehicleBodyMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VehicleBody\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_brake = (gd_api . godot_method_bind_get_method) (class_name , "get_brake\0" . as_ptr () as * const c_char) ; table . get_engine_force = (gd_api . godot_method_bind_get_method) (class_name , "get_engine_force\0" . as_ptr () as * const c_char) ; table . get_steering = (gd_api . godot_method_bind_get_method) (class_name , "get_steering\0" . as_ptr () as * const c_char) ; table . set_brake = (gd_api . godot_method_bind_get_method) (class_name , "set_brake\0" . as_ptr () as * const c_char) ; table . set_engine_force = (gd_api . godot_method_bind_get_method) (class_name , "set_engine_force\0" . as_ptr () as * const c_char) ; table . set_steering = (gd_api . godot_method_bind_get_method) (class_name , "set_steering\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::vehicle_body::private::VehicleBody;
            
            pub(crate) mod vehicle_wheel {
                # ! [doc = "This module contains types related to the API class [`VehicleWheel`][super::VehicleWheel]."] pub (crate) mod private { # [doc = "`core class VehicleWheel` inherits `Spatial` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_vehiclewheel.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`VehicleWheel` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<VehicleWheel>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVehicleWheel inherits methods from:\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VehicleWheel { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VehicleWheel ; impl VehicleWheel { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VehicleWheelMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [`RigidBody.mass`][RigidBody::mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking."] # [doc = ""] # [inline] pub fn brake (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_brake ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the contacting body node if valid in the tree, as [`Spatial`][Spatial]. At the moment, [`GridMap`][GridMap] is not supported so the node will be always of type [`PhysicsBody`][PhysicsBody].\nReturns `null` if the wheel is not in contact with a surface, or the contact body is not a [`PhysicsBody`][PhysicsBody]."] # [doc = ""] # [inline] pub fn get_contact_body (& self) -> Option < Ref < crate :: generated :: Spatial , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_contact_body ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Spatial , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The damping applied to the spring when the spring is being compressed. This value should be between 0.0 (no damping) and 1.0. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car."] # [doc = ""] # [inline] pub fn damping_compression (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_damping_compression ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the [`damping_compression`][Self::damping_compression] property. For a [`damping_compression`][Self::damping_compression] value of 0.3, try a relaxation value of 0.5."] # [doc = ""] # [inline] pub fn damping_relaxation (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_damping_relaxation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Accelerates the wheel by applying an engine force. The wheel is only sped up if it is in contact with a surface. The [`RigidBody.mass`][RigidBody::mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.\n**Note:** The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears.\nA negative value will result in the wheel reversing."] # [doc = ""] # [inline] pub fn engine_force (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_engine_force ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "This determines how much grip this wheel has. It is combined with the friction setting of the surface the wheel is in contact with. 0.0 means no grip, 1.0 is normal grip. For a drift car setup, try setting the grip of the rear wheels slightly lower than the front wheels, or use a lower value to simulate tire wear.\nIt's best to set this to 1.0 when starting out."] # [doc = ""] # [inline] pub fn friction_slip (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_friction_slip ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The radius of the wheel in meters."] # [doc = ""] # [inline] pub fn radius (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_radius ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "This value affects the roll of your vehicle. If set to 1.0 for all wheels, your vehicle will be prone to rolling over, while a value of 0.0 will resist body roll."] # [doc = ""] # [inline] pub fn roll_influence (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_roll_influence ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the rotational speed of the wheel in revolutions per minute."] # [doc = ""] # [inline] pub fn get_rpm (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_rpm ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a value between 0.0 and 1.0 that indicates whether this wheel is skidding. 0.0 is skidding (the wheel has lost grip, e.g. icy terrain), 1.0 means not skidding (the wheel has full grip, e.g. dry asphalt road)."] # [doc = ""] # [inline] pub fn get_skidinfo (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_skidinfo ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The steering angle for the wheel. Setting this to a non-zero value will result in the vehicle turning when it's moving."] # [doc = ""] # [inline] pub fn steering (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_steering ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum force the spring can resist. This value should be higher than a quarter of the [`RigidBody.mass`][RigidBody::mass] of the [`VehicleBody`][VehicleBody] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number."] # [doc = ""] # [inline] pub fn suspension_max_force (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_suspension_max_force ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "This is the distance in meters the wheel is lowered from its origin point. Don't set this to 0.0 and move the wheel into position, instead move the origin point of your wheel (the gizmo in Godot) to the position the wheel will take when bottoming out, then use the rest length to move the wheel down to the position it should be in when the car is in rest."] # [doc = ""] # [inline] pub fn suspension_rest_length (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_suspension_rest_length ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "This value defines the stiffness of the suspension. Use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car."] # [doc = ""] # [inline] pub fn suspension_stiffness (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_suspension_stiffness ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "This is the distance the suspension can travel. As Godot units are equivalent to meters, keep this setting relatively low. Try a value between 0.1 and 0.3 depending on the type of car."] # [doc = ""] # [inline] pub fn suspension_travel (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . get_suspension_travel ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this wheel is in contact with a surface."] # [doc = ""] # [inline] pub fn is_in_contact (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . is_in_contact ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, this wheel will be turned when the car steers. This value is used in conjunction with [`VehicleBody.steering`][VehicleBody::steering] and ignored if you are using the per-wheel [`steering`][Self::steering] value instead."] # [doc = ""] # [inline] pub fn is_used_as_steering (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . is_used_as_steering ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, this wheel transfers engine force to the ground to propel the vehicle forward. This value is used in conjunction with [`VehicleBody.engine_force`][VehicleBody::engine_force] and ignored if you are using the per-wheel [`engine_force`][Self::engine_force] value instead."] # [doc = ""] # [inline] pub fn is_used_as_traction (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . is_used_as_traction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [`RigidBody.mass`][RigidBody::mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking."] # [doc = ""] # [inline] pub fn set_brake (& self , brake : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . set_brake ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , brake as _) ; } } # [doc = "The damping applied to the spring when the spring is being compressed. This value should be between 0.0 (no damping) and 1.0. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car."] # [doc = ""] # [inline] pub fn set_damping_compression (& self , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . set_damping_compression ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , length as _) ; } } # [doc = "The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the [`damping_compression`][Self::damping_compression] property. For a [`damping_compression`][Self::damping_compression] value of 0.3, try a relaxation value of 0.5."] # [doc = ""] # [inline] pub fn set_damping_relaxation (& self , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . set_damping_relaxation ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , length as _) ; } } # [doc = "Accelerates the wheel by applying an engine force. The wheel is only sped up if it is in contact with a surface. The [`RigidBody.mass`][RigidBody::mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.\n**Note:** The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears.\nA negative value will result in the wheel reversing."] # [doc = ""] # [inline] pub fn set_engine_force (& self , engine_force : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . set_engine_force ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , engine_force as _) ; } } # [doc = "This determines how much grip this wheel has. It is combined with the friction setting of the surface the wheel is in contact with. 0.0 means no grip, 1.0 is normal grip. For a drift car setup, try setting the grip of the rear wheels slightly lower than the front wheels, or use a lower value to simulate tire wear.\nIt's best to set this to 1.0 when starting out."] # [doc = ""] # [inline] pub fn set_friction_slip (& self , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . set_friction_slip ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , length as _) ; } } # [doc = "The radius of the wheel in meters."] # [doc = ""] # [inline] pub fn set_radius (& self , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . set_radius ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , length as _) ; } } # [doc = "This value affects the roll of your vehicle. If set to 1.0 for all wheels, your vehicle will be prone to rolling over, while a value of 0.0 will resist body roll."] # [doc = ""] # [inline] pub fn set_roll_influence (& self , roll_influence : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . set_roll_influence ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , roll_influence as _) ; } } # [doc = "The steering angle for the wheel. Setting this to a non-zero value will result in the vehicle turning when it's moving."] # [doc = ""] # [inline] pub fn set_steering (& self , steering : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . set_steering ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , steering as _) ; } } # [doc = "The maximum force the spring can resist. This value should be higher than a quarter of the [`RigidBody.mass`][RigidBody::mass] of the [`VehicleBody`][VehicleBody] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number."] # [doc = ""] # [inline] pub fn set_suspension_max_force (& self , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . set_suspension_max_force ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , length as _) ; } } # [doc = "This is the distance in meters the wheel is lowered from its origin point. Don't set this to 0.0 and move the wheel into position, instead move the origin point of your wheel (the gizmo in Godot) to the position the wheel will take when bottoming out, then use the rest length to move the wheel down to the position it should be in when the car is in rest."] # [doc = ""] # [inline] pub fn set_suspension_rest_length (& self , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . set_suspension_rest_length ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , length as _) ; } } # [doc = "This value defines the stiffness of the suspension. Use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car."] # [doc = ""] # [inline] pub fn set_suspension_stiffness (& self , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . set_suspension_stiffness ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , length as _) ; } } # [doc = "This is the distance the suspension can travel. As Godot units are equivalent to meters, keep this setting relatively low. Try a value between 0.1 and 0.3 depending on the type of car."] # [doc = ""] # [inline] pub fn set_suspension_travel (& self , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . set_suspension_travel ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , length as _) ; } } # [doc = "If `true`, this wheel will be turned when the car steers. This value is used in conjunction with [`VehicleBody.steering`][VehicleBody::steering] and ignored if you are using the per-wheel [`steering`][Self::steering] value instead."] # [doc = ""] # [inline] pub fn set_use_as_steering (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . set_use_as_steering ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, this wheel transfers engine force to the ground to propel the vehicle forward. This value is used in conjunction with [`VehicleBody.engine_force`][VehicleBody::engine_force] and ignored if you are using the per-wheel [`engine_force`][Self::engine_force] value instead."] # [doc = ""] # [inline] pub fn set_use_as_traction (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VehicleWheelMethodTable :: get (get_api ()) . set_use_as_traction ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VehicleWheel { } unsafe impl GodotObject for VehicleWheel { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VehicleWheel" } } impl QueueFree for VehicleWheel { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for VehicleWheel { type Target = crate :: generated :: Spatial ; # [inline] fn deref (& self) -> & crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VehicleWheel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Spatial { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Spatial > for VehicleWheel { } unsafe impl SubClass < crate :: generated :: Node > for VehicleWheel { } unsafe impl SubClass < crate :: generated :: Object > for VehicleWheel { } impl Instanciable for VehicleWheel { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VehicleWheel :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VehicleWheelMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_brake : * mut sys :: godot_method_bind , pub get_contact_body : * mut sys :: godot_method_bind , pub get_damping_compression : * mut sys :: godot_method_bind , pub get_damping_relaxation : * mut sys :: godot_method_bind , pub get_engine_force : * mut sys :: godot_method_bind , pub get_friction_slip : * mut sys :: godot_method_bind , pub get_radius : * mut sys :: godot_method_bind , pub get_roll_influence : * mut sys :: godot_method_bind , pub get_rpm : * mut sys :: godot_method_bind , pub get_skidinfo : * mut sys :: godot_method_bind , pub get_steering : * mut sys :: godot_method_bind , pub get_suspension_max_force : * mut sys :: godot_method_bind , pub get_suspension_rest_length : * mut sys :: godot_method_bind , pub get_suspension_stiffness : * mut sys :: godot_method_bind , pub get_suspension_travel : * mut sys :: godot_method_bind , pub is_in_contact : * mut sys :: godot_method_bind , pub is_used_as_steering : * mut sys :: godot_method_bind , pub is_used_as_traction : * mut sys :: godot_method_bind , pub set_brake : * mut sys :: godot_method_bind , pub set_damping_compression : * mut sys :: godot_method_bind , pub set_damping_relaxation : * mut sys :: godot_method_bind , pub set_engine_force : * mut sys :: godot_method_bind , pub set_friction_slip : * mut sys :: godot_method_bind , pub set_radius : * mut sys :: godot_method_bind , pub set_roll_influence : * mut sys :: godot_method_bind , pub set_steering : * mut sys :: godot_method_bind , pub set_suspension_max_force : * mut sys :: godot_method_bind , pub set_suspension_rest_length : * mut sys :: godot_method_bind , pub set_suspension_stiffness : * mut sys :: godot_method_bind , pub set_suspension_travel : * mut sys :: godot_method_bind , pub set_use_as_steering : * mut sys :: godot_method_bind , pub set_use_as_traction : * mut sys :: godot_method_bind } impl VehicleWheelMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VehicleWheelMethodTable = VehicleWheelMethodTable { class_constructor : None , get_brake : 0 as * mut sys :: godot_method_bind , get_contact_body : 0 as * mut sys :: godot_method_bind , get_damping_compression : 0 as * mut sys :: godot_method_bind , get_damping_relaxation : 0 as * mut sys :: godot_method_bind , get_engine_force : 0 as * mut sys :: godot_method_bind , get_friction_slip : 0 as * mut sys :: godot_method_bind , get_radius : 0 as * mut sys :: godot_method_bind , get_roll_influence : 0 as * mut sys :: godot_method_bind , get_rpm : 0 as * mut sys :: godot_method_bind , get_skidinfo : 0 as * mut sys :: godot_method_bind , get_steering : 0 as * mut sys :: godot_method_bind , get_suspension_max_force : 0 as * mut sys :: godot_method_bind , get_suspension_rest_length : 0 as * mut sys :: godot_method_bind , get_suspension_stiffness : 0 as * mut sys :: godot_method_bind , get_suspension_travel : 0 as * mut sys :: godot_method_bind , is_in_contact : 0 as * mut sys :: godot_method_bind , is_used_as_steering : 0 as * mut sys :: godot_method_bind , is_used_as_traction : 0 as * mut sys :: godot_method_bind , set_brake : 0 as * mut sys :: godot_method_bind , set_damping_compression : 0 as * mut sys :: godot_method_bind , set_damping_relaxation : 0 as * mut sys :: godot_method_bind , set_engine_force : 0 as * mut sys :: godot_method_bind , set_friction_slip : 0 as * mut sys :: godot_method_bind , set_radius : 0 as * mut sys :: godot_method_bind , set_roll_influence : 0 as * mut sys :: godot_method_bind , set_steering : 0 as * mut sys :: godot_method_bind , set_suspension_max_force : 0 as * mut sys :: godot_method_bind , set_suspension_rest_length : 0 as * mut sys :: godot_method_bind , set_suspension_stiffness : 0 as * mut sys :: godot_method_bind , set_suspension_travel : 0 as * mut sys :: godot_method_bind , set_use_as_steering : 0 as * mut sys :: godot_method_bind , set_use_as_traction : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VehicleWheelMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VehicleWheel\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_brake = (gd_api . godot_method_bind_get_method) (class_name , "get_brake\0" . as_ptr () as * const c_char) ; table . get_contact_body = (gd_api . godot_method_bind_get_method) (class_name , "get_contact_body\0" . as_ptr () as * const c_char) ; table . get_damping_compression = (gd_api . godot_method_bind_get_method) (class_name , "get_damping_compression\0" . as_ptr () as * const c_char) ; table . get_damping_relaxation = (gd_api . godot_method_bind_get_method) (class_name , "get_damping_relaxation\0" . as_ptr () as * const c_char) ; table . get_engine_force = (gd_api . godot_method_bind_get_method) (class_name , "get_engine_force\0" . as_ptr () as * const c_char) ; table . get_friction_slip = (gd_api . godot_method_bind_get_method) (class_name , "get_friction_slip\0" . as_ptr () as * const c_char) ; table . get_radius = (gd_api . godot_method_bind_get_method) (class_name , "get_radius\0" . as_ptr () as * const c_char) ; table . get_roll_influence = (gd_api . godot_method_bind_get_method) (class_name , "get_roll_influence\0" . as_ptr () as * const c_char) ; table . get_rpm = (gd_api . godot_method_bind_get_method) (class_name , "get_rpm\0" . as_ptr () as * const c_char) ; table . get_skidinfo = (gd_api . godot_method_bind_get_method) (class_name , "get_skidinfo\0" . as_ptr () as * const c_char) ; table . get_steering = (gd_api . godot_method_bind_get_method) (class_name , "get_steering\0" . as_ptr () as * const c_char) ; table . get_suspension_max_force = (gd_api . godot_method_bind_get_method) (class_name , "get_suspension_max_force\0" . as_ptr () as * const c_char) ; table . get_suspension_rest_length = (gd_api . godot_method_bind_get_method) (class_name , "get_suspension_rest_length\0" . as_ptr () as * const c_char) ; table . get_suspension_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "get_suspension_stiffness\0" . as_ptr () as * const c_char) ; table . get_suspension_travel = (gd_api . godot_method_bind_get_method) (class_name , "get_suspension_travel\0" . as_ptr () as * const c_char) ; table . is_in_contact = (gd_api . godot_method_bind_get_method) (class_name , "is_in_contact\0" . as_ptr () as * const c_char) ; table . is_used_as_steering = (gd_api . godot_method_bind_get_method) (class_name , "is_used_as_steering\0" . as_ptr () as * const c_char) ; table . is_used_as_traction = (gd_api . godot_method_bind_get_method) (class_name , "is_used_as_traction\0" . as_ptr () as * const c_char) ; table . set_brake = (gd_api . godot_method_bind_get_method) (class_name , "set_brake\0" . as_ptr () as * const c_char) ; table . set_damping_compression = (gd_api . godot_method_bind_get_method) (class_name , "set_damping_compression\0" . as_ptr () as * const c_char) ; table . set_damping_relaxation = (gd_api . godot_method_bind_get_method) (class_name , "set_damping_relaxation\0" . as_ptr () as * const c_char) ; table . set_engine_force = (gd_api . godot_method_bind_get_method) (class_name , "set_engine_force\0" . as_ptr () as * const c_char) ; table . set_friction_slip = (gd_api . godot_method_bind_get_method) (class_name , "set_friction_slip\0" . as_ptr () as * const c_char) ; table . set_radius = (gd_api . godot_method_bind_get_method) (class_name , "set_radius\0" . as_ptr () as * const c_char) ; table . set_roll_influence = (gd_api . godot_method_bind_get_method) (class_name , "set_roll_influence\0" . as_ptr () as * const c_char) ; table . set_steering = (gd_api . godot_method_bind_get_method) (class_name , "set_steering\0" . as_ptr () as * const c_char) ; table . set_suspension_max_force = (gd_api . godot_method_bind_get_method) (class_name , "set_suspension_max_force\0" . as_ptr () as * const c_char) ; table . set_suspension_rest_length = (gd_api . godot_method_bind_get_method) (class_name , "set_suspension_rest_length\0" . as_ptr () as * const c_char) ; table . set_suspension_stiffness = (gd_api . godot_method_bind_get_method) (class_name , "set_suspension_stiffness\0" . as_ptr () as * const c_char) ; table . set_suspension_travel = (gd_api . godot_method_bind_get_method) (class_name , "set_suspension_travel\0" . as_ptr () as * const c_char) ; table . set_use_as_steering = (gd_api . godot_method_bind_get_method) (class_name , "set_use_as_steering\0" . as_ptr () as * const c_char) ; table . set_use_as_traction = (gd_api . godot_method_bind_get_method) (class_name , "set_use_as_traction\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::vehicle_wheel::private::VehicleWheel;
            
            pub(crate) mod video_player {
                # ! [doc = "This module contains types related to the API class [`VideoPlayer`][super::VideoPlayer]."] pub (crate) mod private { # [doc = "`core class VideoPlayer` inherits `Control` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_videoplayer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`VideoPlayer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<VideoPlayer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVideoPlayer inherits methods from:\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VideoPlayer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VideoPlayer ; impl VideoPlayer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VideoPlayerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The embedded audio track to play."] # [doc = ""] # [inline] pub fn audio_track (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . get_audio_track ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Amount of time in milliseconds to store in buffer while playing."] # [doc = ""] # [inline] pub fn buffering_msec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . get_buffering_msec ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Audio bus to use for sound playback."] # [doc = ""] # [inline] pub fn bus (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . get_bus ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The assigned video stream. See description for supported formats."] # [doc = ""] # [inline] pub fn stream (& self) -> Option < Ref < crate :: generated :: VideoStream , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . get_stream ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: VideoStream , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the video stream's name, or `\"<No Stream>\"` if no video stream is assigned."] # [doc = ""] # [inline] pub fn get_stream_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . get_stream_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The current position of the stream, in seconds.\n**Note:** Changing this value won't have any effect as seeking is not implemented yet, except in video formats implemented by a GDNative add-on."] # [doc = ""] # [inline] pub fn stream_position (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . get_stream_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the current frame as a [`Texture`][Texture]."] # [doc = ""] # [inline] pub fn get_video_texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . get_video_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Audio volume as a linear value."] # [doc = ""] # [inline] pub fn volume (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . get_volume ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Audio volume in dB."] # [doc = ""] # [inline] pub fn volume_db (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . get_volume_db ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, playback starts when the scene loads."] # [doc = ""] # [inline] pub fn has_autoplay (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . has_autoplay ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the video scales to the control size. Otherwise, the control minimum size will be automatically adjusted to match the video stream's dimensions."] # [doc = ""] # [inline] pub fn has_expand (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . has_expand ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the video is paused."] # [doc = ""] # [inline] pub fn is_paused (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . is_paused ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the video is playing.\n**Note:** The video is still considered playing if paused during playback."] # [doc = ""] # [inline] pub fn is_playing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . is_playing ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Starts the video playback from the beginning. If the video is paused, this will not unpause the video."] # [doc = ""] # [inline] pub fn play (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . play ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "The embedded audio track to play."] # [doc = ""] # [inline] pub fn set_audio_track (& self , track : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . set_audio_track ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , track as _) ; } } # [doc = "If `true`, playback starts when the scene loads."] # [doc = ""] # [inline] pub fn set_autoplay (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . set_autoplay ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "Amount of time in milliseconds to store in buffer while playing."] # [doc = ""] # [inline] pub fn set_buffering_msec (& self , msec : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . set_buffering_msec ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , msec as _) ; } } # [doc = "Audio bus to use for sound playback."] # [doc = ""] # [inline] pub fn set_bus (& self , bus : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . set_bus ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , bus . into ()) ; } } # [doc = "If `true`, the video scales to the control size. Otherwise, the control minimum size will be automatically adjusted to match the video stream's dimensions."] # [doc = ""] # [inline] pub fn set_expand (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . set_expand ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the video is paused."] # [doc = ""] # [inline] pub fn set_paused (& self , paused : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . set_paused ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , paused as _) ; } } # [doc = "The assigned video stream. See description for supported formats."] # [doc = ""] # [inline] pub fn set_stream (& self , stream : impl AsArg < crate :: generated :: VideoStream >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . set_stream ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , stream . as_arg_ptr ()) ; } } # [doc = "The current position of the stream, in seconds.\n**Note:** Changing this value won't have any effect as seeking is not implemented yet, except in video formats implemented by a GDNative add-on."] # [doc = ""] # [inline] pub fn set_stream_position (& self , position : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . set_stream_position ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , position as _) ; } } # [doc = "Audio volume as a linear value."] # [doc = ""] # [inline] pub fn set_volume (& self , volume : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . set_volume ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , volume as _) ; } } # [doc = "Audio volume in dB."] # [doc = ""] # [inline] pub fn set_volume_db (& self , db : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . set_volume_db ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , db as _) ; } } # [doc = "Stops the video playback and sets the stream position to 0.\n**Note:** Although the stream position will be set to 0, the first frame of the video stream won't become the current frame."] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoPlayerMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VideoPlayer { } unsafe impl GodotObject for VideoPlayer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VideoPlayer" } } impl QueueFree for VideoPlayer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for VideoPlayer { type Target = crate :: generated :: Control ; # [inline] fn deref (& self) -> & crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VideoPlayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Control { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Control > for VideoPlayer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for VideoPlayer { } unsafe impl SubClass < crate :: generated :: Node > for VideoPlayer { } unsafe impl SubClass < crate :: generated :: Object > for VideoPlayer { } impl Instanciable for VideoPlayer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VideoPlayer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VideoPlayerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_audio_track : * mut sys :: godot_method_bind , pub get_buffering_msec : * mut sys :: godot_method_bind , pub get_bus : * mut sys :: godot_method_bind , pub get_stream : * mut sys :: godot_method_bind , pub get_stream_name : * mut sys :: godot_method_bind , pub get_stream_position : * mut sys :: godot_method_bind , pub get_video_texture : * mut sys :: godot_method_bind , pub get_volume : * mut sys :: godot_method_bind , pub get_volume_db : * mut sys :: godot_method_bind , pub has_autoplay : * mut sys :: godot_method_bind , pub has_expand : * mut sys :: godot_method_bind , pub is_paused : * mut sys :: godot_method_bind , pub is_playing : * mut sys :: godot_method_bind , pub play : * mut sys :: godot_method_bind , pub set_audio_track : * mut sys :: godot_method_bind , pub set_autoplay : * mut sys :: godot_method_bind , pub set_buffering_msec : * mut sys :: godot_method_bind , pub set_bus : * mut sys :: godot_method_bind , pub set_expand : * mut sys :: godot_method_bind , pub set_paused : * mut sys :: godot_method_bind , pub set_stream : * mut sys :: godot_method_bind , pub set_stream_position : * mut sys :: godot_method_bind , pub set_volume : * mut sys :: godot_method_bind , pub set_volume_db : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl VideoPlayerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VideoPlayerMethodTable = VideoPlayerMethodTable { class_constructor : None , get_audio_track : 0 as * mut sys :: godot_method_bind , get_buffering_msec : 0 as * mut sys :: godot_method_bind , get_bus : 0 as * mut sys :: godot_method_bind , get_stream : 0 as * mut sys :: godot_method_bind , get_stream_name : 0 as * mut sys :: godot_method_bind , get_stream_position : 0 as * mut sys :: godot_method_bind , get_video_texture : 0 as * mut sys :: godot_method_bind , get_volume : 0 as * mut sys :: godot_method_bind , get_volume_db : 0 as * mut sys :: godot_method_bind , has_autoplay : 0 as * mut sys :: godot_method_bind , has_expand : 0 as * mut sys :: godot_method_bind , is_paused : 0 as * mut sys :: godot_method_bind , is_playing : 0 as * mut sys :: godot_method_bind , play : 0 as * mut sys :: godot_method_bind , set_audio_track : 0 as * mut sys :: godot_method_bind , set_autoplay : 0 as * mut sys :: godot_method_bind , set_buffering_msec : 0 as * mut sys :: godot_method_bind , set_bus : 0 as * mut sys :: godot_method_bind , set_expand : 0 as * mut sys :: godot_method_bind , set_paused : 0 as * mut sys :: godot_method_bind , set_stream : 0 as * mut sys :: godot_method_bind , set_stream_position : 0 as * mut sys :: godot_method_bind , set_volume : 0 as * mut sys :: godot_method_bind , set_volume_db : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VideoPlayerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VideoPlayer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_audio_track = (gd_api . godot_method_bind_get_method) (class_name , "get_audio_track\0" . as_ptr () as * const c_char) ; table . get_buffering_msec = (gd_api . godot_method_bind_get_method) (class_name , "get_buffering_msec\0" . as_ptr () as * const c_char) ; table . get_bus = (gd_api . godot_method_bind_get_method) (class_name , "get_bus\0" . as_ptr () as * const c_char) ; table . get_stream = (gd_api . godot_method_bind_get_method) (class_name , "get_stream\0" . as_ptr () as * const c_char) ; table . get_stream_name = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_name\0" . as_ptr () as * const c_char) ; table . get_stream_position = (gd_api . godot_method_bind_get_method) (class_name , "get_stream_position\0" . as_ptr () as * const c_char) ; table . get_video_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_video_texture\0" . as_ptr () as * const c_char) ; table . get_volume = (gd_api . godot_method_bind_get_method) (class_name , "get_volume\0" . as_ptr () as * const c_char) ; table . get_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "get_volume_db\0" . as_ptr () as * const c_char) ; table . has_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "has_autoplay\0" . as_ptr () as * const c_char) ; table . has_expand = (gd_api . godot_method_bind_get_method) (class_name , "has_expand\0" . as_ptr () as * const c_char) ; table . is_paused = (gd_api . godot_method_bind_get_method) (class_name , "is_paused\0" . as_ptr () as * const c_char) ; table . is_playing = (gd_api . godot_method_bind_get_method) (class_name , "is_playing\0" . as_ptr () as * const c_char) ; table . play = (gd_api . godot_method_bind_get_method) (class_name , "play\0" . as_ptr () as * const c_char) ; table . set_audio_track = (gd_api . godot_method_bind_get_method) (class_name , "set_audio_track\0" . as_ptr () as * const c_char) ; table . set_autoplay = (gd_api . godot_method_bind_get_method) (class_name , "set_autoplay\0" . as_ptr () as * const c_char) ; table . set_buffering_msec = (gd_api . godot_method_bind_get_method) (class_name , "set_buffering_msec\0" . as_ptr () as * const c_char) ; table . set_bus = (gd_api . godot_method_bind_get_method) (class_name , "set_bus\0" . as_ptr () as * const c_char) ; table . set_expand = (gd_api . godot_method_bind_get_method) (class_name , "set_expand\0" . as_ptr () as * const c_char) ; table . set_paused = (gd_api . godot_method_bind_get_method) (class_name , "set_paused\0" . as_ptr () as * const c_char) ; table . set_stream = (gd_api . godot_method_bind_get_method) (class_name , "set_stream\0" . as_ptr () as * const c_char) ; table . set_stream_position = (gd_api . godot_method_bind_get_method) (class_name , "set_stream_position\0" . as_ptr () as * const c_char) ; table . set_volume = (gd_api . godot_method_bind_get_method) (class_name , "set_volume\0" . as_ptr () as * const c_char) ; table . set_volume_db = (gd_api . godot_method_bind_get_method) (class_name , "set_volume_db\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::video_player::private::VideoPlayer;
            
            pub(crate) mod video_stream {
                # ! [doc = "This module contains types related to the API class [`VideoStream`][super::VideoStream]."] pub (crate) mod private { # [doc = "`core class VideoStream` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_videostream.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVideoStream inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VideoStream { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VideoStream ; impl VideoStream { } impl gdnative_core :: private :: godot_object :: Sealed for VideoStream { } unsafe impl GodotObject for VideoStream { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VideoStream" } } impl std :: ops :: Deref for VideoStream { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VideoStream { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for VideoStream { } unsafe impl SubClass < crate :: generated :: Reference > for VideoStream { } unsafe impl SubClass < crate :: generated :: Object > for VideoStream { }
                use super::*;
            }
            pub use crate::generated::video_stream::private::VideoStream;
            
            pub(crate) mod video_stream_gdnative {
                # ! [doc = "This module contains types related to the API class [`VideoStreamGDNative`][super::VideoStreamGDNative]."] pub (crate) mod private { # [doc = "`core class VideoStreamGDNative` inherits `VideoStream` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_videostreamgdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVideoStreamGDNative inherits methods from:\n - [VideoStream](struct.VideoStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VideoStreamGDNative { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VideoStreamGDNative ; impl VideoStreamGDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VideoStreamGDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn file (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoStreamGDNativeMethodTable :: get (get_api ()) . get_file ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoStreamGDNativeMethodTable :: get (get_api ()) . set_file ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VideoStreamGDNative { } unsafe impl GodotObject for VideoStreamGDNative { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VideoStreamGDNative" } } impl std :: ops :: Deref for VideoStreamGDNative { type Target = crate :: generated :: VideoStream ; # [inline] fn deref (& self) -> & crate :: generated :: VideoStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VideoStreamGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VideoStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VideoStream > for VideoStreamGDNative { } unsafe impl SubClass < crate :: generated :: Resource > for VideoStreamGDNative { } unsafe impl SubClass < crate :: generated :: Reference > for VideoStreamGDNative { } unsafe impl SubClass < crate :: generated :: Object > for VideoStreamGDNative { } impl Instanciable for VideoStreamGDNative { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VideoStreamGDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VideoStreamGDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_file : * mut sys :: godot_method_bind , pub set_file : * mut sys :: godot_method_bind } impl VideoStreamGDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VideoStreamGDNativeMethodTable = VideoStreamGDNativeMethodTable { class_constructor : None , get_file : 0 as * mut sys :: godot_method_bind , set_file : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VideoStreamGDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VideoStreamGDNative\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_file = (gd_api . godot_method_bind_get_method) (class_name , "get_file\0" . as_ptr () as * const c_char) ; table . set_file = (gd_api . godot_method_bind_get_method) (class_name , "set_file\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::video_stream_gdnative::private::VideoStreamGDNative;
            
            pub(crate) mod video_stream_theora {
                # ! [doc = "This module contains types related to the API class [`VideoStreamTheora`][super::VideoStreamTheora]."] pub (crate) mod private { # [doc = "`core class VideoStreamTheora` inherits `VideoStream` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_videostreamtheora.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVideoStreamTheora inherits methods from:\n - [VideoStream](struct.VideoStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VideoStreamTheora { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VideoStreamTheora ; impl VideoStreamTheora { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VideoStreamTheoraMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn file (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoStreamTheoraMethodTable :: get (get_api ()) . get_file ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoStreamTheoraMethodTable :: get (get_api ()) . set_file ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VideoStreamTheora { } unsafe impl GodotObject for VideoStreamTheora { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VideoStreamTheora" } } impl std :: ops :: Deref for VideoStreamTheora { type Target = crate :: generated :: VideoStream ; # [inline] fn deref (& self) -> & crate :: generated :: VideoStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VideoStreamTheora { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VideoStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VideoStream > for VideoStreamTheora { } unsafe impl SubClass < crate :: generated :: Resource > for VideoStreamTheora { } unsafe impl SubClass < crate :: generated :: Reference > for VideoStreamTheora { } unsafe impl SubClass < crate :: generated :: Object > for VideoStreamTheora { } impl Instanciable for VideoStreamTheora { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VideoStreamTheora :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VideoStreamTheoraMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_file : * mut sys :: godot_method_bind , pub set_file : * mut sys :: godot_method_bind } impl VideoStreamTheoraMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VideoStreamTheoraMethodTable = VideoStreamTheoraMethodTable { class_constructor : None , get_file : 0 as * mut sys :: godot_method_bind , set_file : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VideoStreamTheoraMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VideoStreamTheora\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_file = (gd_api . godot_method_bind_get_method) (class_name , "get_file\0" . as_ptr () as * const c_char) ; table . set_file = (gd_api . godot_method_bind_get_method) (class_name , "set_file\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::video_stream_theora::private::VideoStreamTheora;
            
            pub(crate) mod video_stream_webm {
                # ! [doc = "This module contains types related to the API class [`VideoStreamWebm`][super::VideoStreamWebm]."] pub (crate) mod private { # [doc = "`core class VideoStreamWebm` inherits `VideoStream` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_videostreamwebm.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVideoStreamWebm inherits methods from:\n - [VideoStream](struct.VideoStream.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VideoStreamWebm { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VideoStreamWebm ; impl VideoStreamWebm { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VideoStreamWebmMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn file (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoStreamWebmMethodTable :: get (get_api ()) . get_file ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VideoStreamWebmMethodTable :: get (get_api ()) . set_file ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VideoStreamWebm { } unsafe impl GodotObject for VideoStreamWebm { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VideoStreamWebm" } } impl std :: ops :: Deref for VideoStreamWebm { type Target = crate :: generated :: VideoStream ; # [inline] fn deref (& self) -> & crate :: generated :: VideoStream { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VideoStreamWebm { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VideoStream { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VideoStream > for VideoStreamWebm { } unsafe impl SubClass < crate :: generated :: Resource > for VideoStreamWebm { } unsafe impl SubClass < crate :: generated :: Reference > for VideoStreamWebm { } unsafe impl SubClass < crate :: generated :: Object > for VideoStreamWebm { } impl Instanciable for VideoStreamWebm { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VideoStreamWebm :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VideoStreamWebmMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_file : * mut sys :: godot_method_bind , pub set_file : * mut sys :: godot_method_bind } impl VideoStreamWebmMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VideoStreamWebmMethodTable = VideoStreamWebmMethodTable { class_constructor : None , get_file : 0 as * mut sys :: godot_method_bind , set_file : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VideoStreamWebmMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VideoStreamWebm\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_file = (gd_api . godot_method_bind_get_method) (class_name , "get_file\0" . as_ptr () as * const c_char) ; table . set_file = (gd_api . godot_method_bind_get_method) (class_name , "set_file\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::video_stream_webm::private::VideoStreamWebm;
            
            pub mod viewport {
                # ! [doc = "This module contains types related to the API class [`Viewport`][super::Viewport]."] pub (crate) mod private { # [doc = "`core class Viewport` inherits `Node` (manually managed).\n\nThis class has related types in the [`viewport`][super::viewport] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_viewport.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`Viewport` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<Viewport>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nViewport inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Viewport { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Viewport ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ClearMode (pub i64) ; impl ClearMode { pub const ALWAYS : ClearMode = ClearMode (0i64) ; pub const NEVER : ClearMode = ClearMode (1i64) ; pub const ONLY_NEXT_FRAME : ClearMode = ClearMode (2i64) ; } impl From < i64 > for ClearMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ClearMode > for i64 { # [inline] fn from (v : ClearMode) -> Self { v . 0 } } impl FromVariant for ClearMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct DebugDraw (pub i64) ; impl DebugDraw { pub const DISABLED : DebugDraw = DebugDraw (0i64) ; pub const UNSHADED : DebugDraw = DebugDraw (1i64) ; pub const OVERDRAW : DebugDraw = DebugDraw (2i64) ; pub const WIREFRAME : DebugDraw = DebugDraw (3i64) ; } impl From < i64 > for DebugDraw { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < DebugDraw > for i64 { # [inline] fn from (v : DebugDraw) -> Self { v . 0 } } impl FromVariant for DebugDraw { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Msaa (pub i64) ; impl Msaa { pub const DISABLED : Msaa = Msaa (0i64) ; pub const _2X : Msaa = Msaa (1i64) ; pub const _4X : Msaa = Msaa (2i64) ; pub const _8X : Msaa = Msaa (3i64) ; pub const _16X : Msaa = Msaa (4i64) ; } impl From < i64 > for Msaa { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Msaa > for i64 { # [inline] fn from (v : Msaa) -> Self { v . 0 } } impl FromVariant for Msaa { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct RenderInfo (pub i64) ; impl RenderInfo { pub const OBJECTS_IN_FRAME : RenderInfo = RenderInfo (0i64) ; pub const VERTICES_IN_FRAME : RenderInfo = RenderInfo (1i64) ; pub const MATERIAL_CHANGES_IN_FRAME : RenderInfo = RenderInfo (2i64) ; pub const SHADER_CHANGES_IN_FRAME : RenderInfo = RenderInfo (3i64) ; pub const SURFACE_CHANGES_IN_FRAME : RenderInfo = RenderInfo (4i64) ; pub const DRAW_CALLS_IN_FRAME : RenderInfo = RenderInfo (5i64) ; pub const _2D_ITEMS_IN_FRAME : RenderInfo = RenderInfo (6i64) ; pub const _2D_DRAW_CALLS_IN_FRAME : RenderInfo = RenderInfo (7i64) ; pub const MAX : RenderInfo = RenderInfo (8i64) ; } impl From < i64 > for RenderInfo { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < RenderInfo > for i64 { # [inline] fn from (v : RenderInfo) -> Self { v . 0 } } impl FromVariant for RenderInfo { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShadowAtlasQuadrantSubdiv (pub i64) ; impl ShadowAtlasQuadrantSubdiv { pub const DISABLED : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (0i64) ; pub const _1 : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (1i64) ; pub const _4 : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (2i64) ; pub const _16 : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (3i64) ; pub const _64 : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (4i64) ; pub const _256 : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (5i64) ; pub const _1024 : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (6i64) ; pub const MAX : ShadowAtlasQuadrantSubdiv = ShadowAtlasQuadrantSubdiv (7i64) ; } impl From < i64 > for ShadowAtlasQuadrantSubdiv { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShadowAtlasQuadrantSubdiv > for i64 { # [inline] fn from (v : ShadowAtlasQuadrantSubdiv) -> Self { v . 0 } } impl FromVariant for ShadowAtlasQuadrantSubdiv { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct UpdateMode (pub i64) ; impl UpdateMode { pub const DISABLED : UpdateMode = UpdateMode (0i64) ; pub const ONCE : UpdateMode = UpdateMode (1i64) ; pub const WHEN_VISIBLE : UpdateMode = UpdateMode (2i64) ; pub const ALWAYS : UpdateMode = UpdateMode (3i64) ; } impl From < i64 > for UpdateMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < UpdateMode > for i64 { # [inline] fn from (v : UpdateMode) -> Self { v . 0 } } impl FromVariant for UpdateMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Usage (pub i64) ; impl Usage { pub const _2D : Usage = Usage (0i64) ; pub const _2D_NO_SAMPLING : Usage = Usage (1i64) ; pub const _3D : Usage = Usage (2i64) ; pub const _3D_NO_EFFECTS : Usage = Usage (3i64) ; } impl From < i64 > for Usage { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Usage > for i64 { # [inline] fn from (v : Usage) -> Self { v . 0 } } impl FromVariant for Usage { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Viewport { pub const CLEAR_MODE_ALWAYS : i64 = 0i64 ; pub const DEBUG_DRAW_DISABLED : i64 = 0i64 ; pub const MSAA_DISABLED : i64 = 0i64 ; pub const RENDER_INFO_OBJECTS_IN_FRAME : i64 = 0i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED : i64 = 0i64 ; pub const UPDATE_DISABLED : i64 = 0i64 ; pub const USAGE_2D : i64 = 0i64 ; pub const CLEAR_MODE_NEVER : i64 = 1i64 ; pub const DEBUG_DRAW_UNSHADED : i64 = 1i64 ; pub const MSAA_2X : i64 = 1i64 ; pub const RENDER_INFO_VERTICES_IN_FRAME : i64 = 1i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_1 : i64 = 1i64 ; pub const UPDATE_ONCE : i64 = 1i64 ; pub const USAGE_2D_NO_SAMPLING : i64 = 1i64 ; pub const CLEAR_MODE_ONLY_NEXT_FRAME : i64 = 2i64 ; pub const DEBUG_DRAW_OVERDRAW : i64 = 2i64 ; pub const MSAA_4X : i64 = 2i64 ; pub const RENDER_INFO_MATERIAL_CHANGES_IN_FRAME : i64 = 2i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_4 : i64 = 2i64 ; pub const UPDATE_WHEN_VISIBLE : i64 = 2i64 ; pub const USAGE_3D : i64 = 2i64 ; pub const DEBUG_DRAW_WIREFRAME : i64 = 3i64 ; pub const MSAA_8X : i64 = 3i64 ; pub const RENDER_INFO_SHADER_CHANGES_IN_FRAME : i64 = 3i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_16 : i64 = 3i64 ; pub const UPDATE_ALWAYS : i64 = 3i64 ; pub const USAGE_3D_NO_EFFECTS : i64 = 3i64 ; pub const MSAA_16X : i64 = 4i64 ; pub const RENDER_INFO_SURFACE_CHANGES_IN_FRAME : i64 = 4i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_64 : i64 = 4i64 ; pub const RENDER_INFO_DRAW_CALLS_IN_FRAME : i64 = 5i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_256 : i64 = 5i64 ; pub const RENDER_INFO_2D_ITEMS_IN_FRAME : i64 = 6i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_1024 : i64 = 6i64 ; pub const RENDER_INFO_2D_DRAW_CALLS_IN_FRAME : i64 = 7i64 ; pub const SHADOW_ATLAS_QUADRANT_SUBDIV_MAX : i64 = 7i64 ; pub const RENDER_INFO_MAX : i64 = 8i64 ; } impl Viewport { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ViewportMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the first valid [`World`][World] for this viewport, searching the [`world`][Self::world] property of itself and any Viewport ancestor."] # [doc = ""] # [inline] pub fn find_world (& self) -> Option < Ref < crate :: generated :: World , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . find_world ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: World , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the first valid [`World2D`][World2D] for this viewport, searching the [`world_2d`][Self::world_2d] property of itself and any Viewport ancestor."] # [doc = ""] # [inline] pub fn find_world_2d (& self) -> Option < Ref < crate :: generated :: World2D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . find_world_2d ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: World2D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the active 3D camera."] # [doc = ""] # [inline] pub fn get_camera (& self) -> Option < Ref < crate :: generated :: Camera , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_camera ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Camera , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The canvas transform of the viewport, useful for changing the on-screen positions of all child [`CanvasItem`][CanvasItem]s. This is relative to the global canvas transform of the viewport."] # [doc = ""] # [inline] pub fn canvas_transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_canvas_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The clear mode when viewport used as a render target.\n**Note:** This property is intended for 2D usage."] # [doc = ""] # [inline] pub fn clear_mode (& self) -> crate :: generated :: viewport :: ClearMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_clear_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: viewport :: ClearMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The overlay mode for test rendered geometry in debug purposes."] # [doc = ""] # [inline] pub fn debug_draw (& self) -> crate :: generated :: viewport :: DebugDraw { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_debug_draw ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: viewport :: DebugDraw > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the total transform of the viewport."] # [doc = ""] # [inline] pub fn get_final_transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_final_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The global canvas transform of the viewport. The canvas transform is relative to this."] # [doc = ""] # [inline] pub fn global_canvas_transform (& self) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_global_canvas_transform ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the viewport rendering will receive benefits from High Dynamic Range algorithm. High Dynamic Range allows the viewport to receive values that are outside the 0-1 range. In Godot, HDR uses half floating-point precision (16-bit) by default. To use full floating-point precision (32-bit), enable [`use_32_bpc_depth`][Self::use_32_bpc_depth].\n**Note:** Requires [`usage`][Self::usage] to be set to [`USAGE_3D`][Self::USAGE_3D] or [`USAGE_3D_NO_EFFECTS`][Self::USAGE_3D_NO_EFFECTS], since HDR is not supported for 2D.\n**Note:** Only available on the GLES3 backend."] # [doc = ""] # [inline] pub fn hdr (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_hdr ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output. For the GLES2 driver this will convert the sRGB output to linear, this should only be used for VR plugins that require input in linear color space!"] # [doc = ""] # [inline] pub fn keep_3d_linear (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_keep_3d_linear ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the topmost modal in the stack."] # [doc = ""] # [inline] pub fn get_modal_stack_top (& self) -> Option < Ref < crate :: generated :: Control , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_modal_stack_top ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Control , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the mouse's position in this [`Viewport`][Viewport] using the coordinate system of this [`Viewport`][Viewport]."] # [doc = ""] # [inline] pub fn get_mouse_position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_mouse_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 4 is best unless targeting very high-end systems."] # [doc = ""] # [inline] pub fn msaa (& self) -> crate :: generated :: viewport :: Msaa { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_msaa ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: viewport :: Msaa > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the objects rendered by viewport become subjects of mouse picking process."] # [doc = ""] # [inline] pub fn physics_object_picking (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_physics_object_picking ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns information about the viewport from the rendering pipeline."] # [doc = ""] # [inline] pub fn get_render_info (& self , info : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_render_info ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , info as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the [`ShadowAtlasQuadrantSubdiv`][ShadowAtlasQuadrantSubdiv] of the specified quadrant."] # [doc = ""] # [inline] pub fn shadow_atlas_quadrant_subdiv (& self , quadrant : i64) -> crate :: generated :: viewport :: ShadowAtlasQuadrantSubdiv { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_shadow_atlas_quadrant_subdiv ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , quadrant as _) ; < crate :: generated :: viewport :: ShadowAtlasQuadrantSubdiv > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.\n**Note:** If this is set to `0`, both point _and_ directional shadows won't be visible. Since user-created viewports default to a value of `0`, this value must be set above `0` manually (typically at least `256`)."] # [doc = ""] # [inline] pub fn shadow_atlas_size (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_shadow_atlas_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If set to a value greater than `0.0`, contrast-adaptive sharpening will be applied to the 3D viewport. This has a low performance cost and can be used to recover some of the sharpness lost from using FXAA. Values around `0.5` generally give the best results. See also [`fxaa`][Self::fxaa]."] # [doc = ""] # [inline] pub fn sharpen_intensity (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_sharpen_intensity ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The width and height of viewport. Must be set to a value greater than or equal to 2 pixels on both dimensions. Otherwise, nothing will be displayed."] # [doc = ""] # [inline] pub fn size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the size override set with [`set_size_override`][Self::set_size_override]."] # [doc = ""] # [inline] pub fn get_size_override (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_size_override ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the viewport's texture.\n**Note:** Due to the way OpenGL works, the resulting [`ViewportTexture`][ViewportTexture] is flipped vertically. You can use [`Image.flip_y`][Image::flip_y] on the result of [`Texture.get_data`][Texture::get_data] to flip it back, for example:\n```gdscript\nvar img = get_viewport().get_texture().get_data()\nimg.flip_y()\n```"] # [doc = ""] # [inline] pub fn get_texture (& self) -> Option < Ref < crate :: generated :: ViewportTexture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: ViewportTexture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The update mode when viewport used as a render target."] # [doc = ""] # [inline] pub fn update_mode (& self) -> crate :: generated :: viewport :: UpdateMode { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_update_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: viewport :: UpdateMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The rendering mode of viewport.\n**Note:** If set to [`USAGE_2D`][Self::USAGE_2D] or [`USAGE_2D_NO_SAMPLING`][Self::USAGE_2D_NO_SAMPLING], [`hdr`][Self::hdr] will have no effect when enabled since HDR is not supported for 2D."] # [doc = ""] # [inline] pub fn usage (& self) -> crate :: generated :: viewport :: Usage { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_usage ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: viewport :: Usage > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, allocates the viewport's framebuffer with full floating-point precision (32-bit) instead of half floating-point precision (16-bit). Only effective when [`hdr`][Self::hdr] is also enabled.\n**Note:** Enabling this setting does not improve rendering quality. Using full floating-point precision is slower, and is generally only needed for advanced shaders that require a high level of precision. To reduce banding, enable [`debanding`][Self::debanding] instead.\n**Note:** Only available on the GLES3 backend."] # [doc = ""] # [inline] pub fn use_32_bpc_depth (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_use_32_bpc_depth ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, uses a fast post-processing filter to make banding significantly less visible. In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger.\n**Note:** Only available on the GLES3 backend. [`hdr`][Self::hdr] must also be `true` for debanding to be effective."] # [doc = ""] # [inline] pub fn use_debanding (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_use_debanding ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Enables fast approximate antialiasing. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K. Some of the lost sharpness can be recovered by enabling contrast-adaptive sharpening (see [`sharpen_intensity`][Self::sharpen_intensity])."] # [doc = ""] # [inline] pub fn use_fxaa (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_use_fxaa ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the result of rendering will be flipped vertically. Since Viewports in Godot 3.x render upside-down, it's recommended to set this to `true` in most situations."] # [doc = ""] # [inline] pub fn vflip (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_vflip ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the viewport's RID from the [`VisualServer`][VisualServer]."] # [doc = ""] # [inline] pub fn get_viewport_rid (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_viewport_rid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the visible rectangle in global screen coordinates."] # [doc = ""] # [inline] pub fn get_visible_rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_visible_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The custom [`World`][World] which can be used as 3D environment source."] # [doc = ""] # [inline] pub fn world (& self) -> Option < Ref < crate :: generated :: World , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_world ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: World , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The custom [`World2D`][World2D] which can be used as 2D environment source."] # [doc = ""] # [inline] pub fn world_2d (& self) -> Option < Ref < crate :: generated :: World2D , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_world_2d ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: World2D , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the drag data from the GUI, that was previously returned by [`Control.get_drag_data`][Control::get_drag_data]."] # [doc = ""] # [inline] pub fn gui_get_drag_data (& self) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . gui_get_drag_data ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if there are visible modals on-screen."] # [doc = ""] # [inline] pub fn gui_has_modal_stack (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . gui_has_modal_stack ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the drag operation is successful."] # [doc = ""] # [inline] pub fn gui_is_drag_successful (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . gui_is_drag_successful ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the viewport is currently performing a drag operation.\nAlternative to [`Node.NOTIFICATION_DRAG_BEGIN`][Node::NOTIFICATION_DRAG_BEGIN] and [`Node.NOTIFICATION_DRAG_END`][Node::NOTIFICATION_DRAG_END] when you prefer polling the value."] # [doc = ""] # [inline] pub fn gui_is_dragging (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . gui_is_dragging ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the viewport should render its background as transparent."] # [doc = ""] # [inline] pub fn has_transparent_background (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . has_transparent_background ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn input (& self , local_event : impl AsArg < crate :: generated :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . input ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , local_event . as_arg_ptr ()) ; } } # [doc = "If `true`, the viewport will disable 3D rendering. For actual disabling use `usage`."] # [doc = ""] # [inline] pub fn is_3d_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_3d_disabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the viewport will process 3D audio streams."] # [doc = ""] # [inline] pub fn is_audio_listener (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_audio_listener ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the viewport will process 2D audio streams."] # [doc = ""] # [inline] pub fn is_audio_listener_2d (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_audio_listener_2d ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_handling_input_locally (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_handling_input_locally ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the viewport will not receive input events."] # [doc = ""] # [inline] pub fn is_input_disabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_input_disabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_input_handled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_input_handled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the size override is enabled. See [`set_size_override`][Self::set_size_override]."] # [doc = ""] # [inline] pub fn is_size_override_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_size_override_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the size override affects stretch as well."] # [doc = ""] # [inline] pub fn is_size_override_stretch_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_size_override_stretch_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the GUI controls on the viewport will lay pixel perfectly."] # [doc = ""] # [inline] pub fn is_snap_controls_to_pixels_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_snap_controls_to_pixels_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the viewport will use a unique copy of the [`World`][World] defined in [`world`][Self::world]."] # [doc = ""] # [inline] pub fn is_using_own_world (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_using_own_world ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, renders the Viewport directly to the screen instead of to the root viewport. Only available in GLES2. This is a low-level optimization and should not be used in most cases. If used, reading from the Viewport or from `SCREEN_TEXTURE` becomes unavailable. For more information see [`VisualServer.viewport_set_render_direct_to_screen`][VisualServer::viewport_set_render_direct_to_screen]."] # [doc = ""] # [inline] pub fn is_using_render_direct_to_screen (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . is_using_render_direct_to_screen ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the viewport will process 3D audio streams."] # [doc = ""] # [inline] pub fn set_as_audio_listener (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_as_audio_listener ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the viewport will process 2D audio streams."] # [doc = ""] # [inline] pub fn set_as_audio_listener_2d (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_as_audio_listener_2d ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Attaches this [`Viewport`][Viewport] to the root [`Viewport`][Viewport] with the specified rectangle. This bypasses the need for another node to display this [`Viewport`][Viewport] but makes you responsible for updating the position of this [`Viewport`][Viewport] manually."] # [doc = ""] # [inline] pub fn set_attach_to_screen_rect (& self , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_attach_to_screen_rect ; let ret = crate :: icalls :: icallvar__rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; } } # [doc = "The canvas transform of the viewport, useful for changing the on-screen positions of all child [`CanvasItem`][CanvasItem]s. This is relative to the global canvas transform of the viewport."] # [doc = ""] # [inline] pub fn set_canvas_transform (& self , xform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_canvas_transform ; let ret = crate :: icalls :: icallvar__trans2D (method_bind , self . this . sys () . as_ptr () , xform) ; } } # [doc = "The clear mode when viewport used as a render target.\n**Note:** This property is intended for 2D usage."] # [doc = ""] # [inline] pub fn set_clear_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_clear_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The overlay mode for test rendered geometry in debug purposes."] # [doc = ""] # [inline] pub fn set_debug_draw (& self , debug_draw : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_debug_draw ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , debug_draw as _) ; } } # [doc = "If `true`, the viewport will disable 3D rendering. For actual disabling use `usage`."] # [doc = ""] # [inline] pub fn set_disable_3d (& self , disable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_disable_3d ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , disable as _) ; } } # [doc = "If `true`, the viewport will not receive input events."] # [doc = ""] # [inline] pub fn set_disable_input (& self , disable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_disable_input ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , disable as _) ; } } # [doc = "The global canvas transform of the viewport. The canvas transform is relative to this."] # [doc = ""] # [inline] pub fn set_global_canvas_transform (& self , xform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_global_canvas_transform ; let ret = crate :: icalls :: icallvar__trans2D (method_bind , self . this . sys () . as_ptr () , xform) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_handle_input_locally (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_handle_input_locally ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the viewport rendering will receive benefits from High Dynamic Range algorithm. High Dynamic Range allows the viewport to receive values that are outside the 0-1 range. In Godot, HDR uses half floating-point precision (16-bit) by default. To use full floating-point precision (32-bit), enable [`use_32_bpc_depth`][Self::use_32_bpc_depth].\n**Note:** Requires [`usage`][Self::usage] to be set to [`USAGE_3D`][Self::USAGE_3D] or [`USAGE_3D_NO_EFFECTS`][Self::USAGE_3D_NO_EFFECTS], since HDR is not supported for 2D.\n**Note:** Only available on the GLES3 backend."] # [doc = ""] # [inline] pub fn set_hdr (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_hdr ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Stops the input from propagating further down the [`SceneTree`][SceneTree]."] # [doc = ""] # [inline] pub fn set_input_as_handled (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_input_as_handled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output. For the GLES2 driver this will convert the sRGB output to linear, this should only be used for VR plugins that require input in linear color space!"] # [doc = ""] # [inline] pub fn set_keep_3d_linear (& self , keep_3d_linear : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_keep_3d_linear ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , keep_3d_linear as _) ; } } # [doc = "The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 4 is best unless targeting very high-end systems."] # [doc = ""] # [inline] pub fn set_msaa (& self , msaa : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_msaa ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , msaa as _) ; } } # [doc = "If `true`, the objects rendered by viewport become subjects of mouse picking process."] # [doc = ""] # [inline] pub fn set_physics_object_picking (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_physics_object_picking ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible."] # [doc = ""] # [inline] pub fn set_shadow_atlas_quadrant_subdiv (& self , quadrant : i64 , subdiv : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_shadow_atlas_quadrant_subdiv ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , quadrant as _ , subdiv as _) ; } } # [doc = "The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.\n**Note:** If this is set to `0`, both point _and_ directional shadows won't be visible. Since user-created viewports default to a value of `0`, this value must be set above `0` manually (typically at least `256`)."] # [doc = ""] # [inline] pub fn set_shadow_atlas_size (& self , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_shadow_atlas_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , size as _) ; } } # [doc = "If set to a value greater than `0.0`, contrast-adaptive sharpening will be applied to the 3D viewport. This has a low performance cost and can be used to recover some of the sharpness lost from using FXAA. Values around `0.5` generally give the best results. See also [`fxaa`][Self::fxaa]."] # [doc = ""] # [inline] pub fn set_sharpen_intensity (& self , intensity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_sharpen_intensity ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , intensity as _) ; } } # [doc = "The width and height of viewport. Must be set to a value greater than or equal to 2 pixels on both dimensions. Otherwise, nothing will be displayed."] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Sets the size override of the viewport. If the `enable` parameter is `true` the override is used, otherwise it uses the default size. If the size parameter is `(-1, -1)`, it won't update the size.\n# Default Arguments\n* `size` - `Vector2( -1, -1 )`\n* `margin` - `Vector2( 0, 0 )`"] # [doc = ""] # [inline] pub fn set_size_override (& self , enable : bool , size : Vector2 , margin : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_size_override ; let ret = crate :: icalls :: icallvar__bool_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , enable as _ , size , margin) ; } } # [doc = "If `true`, the size override affects stretch as well."] # [doc = ""] # [inline] pub fn set_size_override_stretch (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_size_override_stretch ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, the GUI controls on the viewport will lay pixel perfectly."] # [doc = ""] # [inline] pub fn set_snap_controls_to_pixels (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_snap_controls_to_pixels ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, the viewport should render its background as transparent."] # [doc = ""] # [inline] pub fn set_transparent_background (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_transparent_background ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The update mode when viewport used as a render target."] # [doc = ""] # [inline] pub fn set_update_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_update_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "The rendering mode of viewport.\n**Note:** If set to [`USAGE_2D`][Self::USAGE_2D] or [`USAGE_2D_NO_SAMPLING`][Self::USAGE_2D_NO_SAMPLING], [`hdr`][Self::hdr] will have no effect when enabled since HDR is not supported for 2D."] # [doc = ""] # [inline] pub fn set_usage (& self , usage : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_usage ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , usage as _) ; } } # [doc = "If `true`, allocates the viewport's framebuffer with full floating-point precision (32-bit) instead of half floating-point precision (16-bit). Only effective when [`hdr`][Self::hdr] is also enabled.\n**Note:** Enabling this setting does not improve rendering quality. Using full floating-point precision is slower, and is generally only needed for advanced shaders that require a high level of precision. To reduce banding, enable [`debanding`][Self::debanding] instead.\n**Note:** Only available on the GLES3 backend."] # [doc = ""] # [inline] pub fn set_use_32_bpc_depth (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_use_32_bpc_depth ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the viewport will be used in AR/VR process."] # [doc = ""] # [inline] pub fn set_use_arvr (& self , use_ : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_use_arvr ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , use_ as _) ; } } # [doc = "If `true`, uses a fast post-processing filter to make banding significantly less visible. In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger.\n**Note:** Only available on the GLES3 backend. [`hdr`][Self::hdr] must also be `true` for debanding to be effective."] # [doc = ""] # [inline] pub fn set_use_debanding (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_use_debanding ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Enables fast approximate antialiasing. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K. Some of the lost sharpness can be recovered by enabling contrast-adaptive sharpening (see [`sharpen_intensity`][Self::sharpen_intensity])."] # [doc = ""] # [inline] pub fn set_use_fxaa (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_use_fxaa ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the viewport will use a unique copy of the [`World`][World] defined in [`world`][Self::world]."] # [doc = ""] # [inline] pub fn set_use_own_world (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_use_own_world ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, renders the Viewport directly to the screen instead of to the root viewport. Only available in GLES2. This is a low-level optimization and should not be used in most cases. If used, reading from the Viewport or from `SCREEN_TEXTURE` becomes unavailable. For more information see [`VisualServer.viewport_set_render_direct_to_screen`][VisualServer::viewport_set_render_direct_to_screen]."] # [doc = ""] # [inline] pub fn set_use_render_direct_to_screen (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_use_render_direct_to_screen ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true`, the result of rendering will be flipped vertically. Since Viewports in Godot 3.x render upside-down, it's recommended to set this to `true` in most situations."] # [doc = ""] # [inline] pub fn set_vflip (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_vflip ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The custom [`World`][World] which can be used as 3D environment source."] # [doc = ""] # [inline] pub fn set_world (& self , world : impl AsArg < crate :: generated :: World >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_world ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , world . as_arg_ptr ()) ; } } # [doc = "The custom [`World2D`][World2D] which can be used as 2D environment source."] # [doc = ""] # [inline] pub fn set_world_2d (& self , world_2d : impl AsArg < crate :: generated :: World2D >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_world_2d ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , world_2d . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn unhandled_input (& self , local_event : impl AsArg < crate :: generated :: InputEvent >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . unhandled_input ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , local_event . as_arg_ptr ()) ; } } # [doc = "Forces update of the 2D and 3D worlds."] # [doc = ""] # [inline] pub fn update_worlds (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . update_worlds ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "If `true`, the viewport will be used in AR/VR process."] # [doc = ""] # [inline] pub fn use_arvr (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . use_arvr ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Moves the mouse pointer to the specified position in this [`Viewport`][Viewport] using the coordinate system of this [`Viewport`][Viewport]."] # [doc = ""] # [inline] pub fn warp_mouse (& self , to_position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . warp_mouse ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , to_position) ; } } # [doc = "The subdivision amount of the first quadrant on the shadow atlas."] # [doc = ""] # [inline] pub fn shadow_atlas_quad_0 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_shadow_atlas_quadrant_subdiv ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The subdivision amount of the first quadrant on the shadow atlas."] # [doc = ""] # [inline] pub fn set_shadow_atlas_quad_0 (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_shadow_atlas_quadrant_subdiv ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "The subdivision amount of the second quadrant on the shadow atlas."] # [doc = ""] # [inline] pub fn shadow_atlas_quad_1 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_shadow_atlas_quadrant_subdiv ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The subdivision amount of the second quadrant on the shadow atlas."] # [doc = ""] # [inline] pub fn set_shadow_atlas_quad_1 (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_shadow_atlas_quadrant_subdiv ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "The subdivision amount of the third quadrant on the shadow atlas."] # [doc = ""] # [inline] pub fn shadow_atlas_quad_2 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_shadow_atlas_quadrant_subdiv ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The subdivision amount of the third quadrant on the shadow atlas."] # [doc = ""] # [inline] pub fn set_shadow_atlas_quad_2 (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_shadow_atlas_quadrant_subdiv ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "The subdivision amount of the fourth quadrant on the shadow atlas."] # [doc = ""] # [inline] pub fn shadow_atlas_quad_3 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . get_shadow_atlas_quadrant_subdiv ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The subdivision amount of the fourth quadrant on the shadow atlas."] # [doc = ""] # [inline] pub fn set_shadow_atlas_quad_3 (& self , value : i64) { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportMethodTable :: get (get_api ()) . set_shadow_atlas_quadrant_subdiv ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Viewport { } unsafe impl GodotObject for Viewport { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Viewport" } } impl QueueFree for Viewport { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for Viewport { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Viewport { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for Viewport { } unsafe impl SubClass < crate :: generated :: Object > for Viewport { } impl Instanciable for Viewport { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Viewport :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ViewportMethodTable { pub class_constructor : sys :: godot_class_constructor , pub find_world : * mut sys :: godot_method_bind , pub find_world_2d : * mut sys :: godot_method_bind , pub get_camera : * mut sys :: godot_method_bind , pub get_canvas_transform : * mut sys :: godot_method_bind , pub get_clear_mode : * mut sys :: godot_method_bind , pub get_debug_draw : * mut sys :: godot_method_bind , pub get_final_transform : * mut sys :: godot_method_bind , pub get_global_canvas_transform : * mut sys :: godot_method_bind , pub get_hdr : * mut sys :: godot_method_bind , pub get_keep_3d_linear : * mut sys :: godot_method_bind , pub get_modal_stack_top : * mut sys :: godot_method_bind , pub get_mouse_position : * mut sys :: godot_method_bind , pub get_msaa : * mut sys :: godot_method_bind , pub get_physics_object_picking : * mut sys :: godot_method_bind , pub get_render_info : * mut sys :: godot_method_bind , pub get_shadow_atlas_quadrant_subdiv : * mut sys :: godot_method_bind , pub get_shadow_atlas_size : * mut sys :: godot_method_bind , pub get_sharpen_intensity : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_size_override : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_update_mode : * mut sys :: godot_method_bind , pub get_usage : * mut sys :: godot_method_bind , pub get_use_32_bpc_depth : * mut sys :: godot_method_bind , pub get_use_debanding : * mut sys :: godot_method_bind , pub get_use_fxaa : * mut sys :: godot_method_bind , pub get_vflip : * mut sys :: godot_method_bind , pub get_viewport_rid : * mut sys :: godot_method_bind , pub get_visible_rect : * mut sys :: godot_method_bind , pub get_world : * mut sys :: godot_method_bind , pub get_world_2d : * mut sys :: godot_method_bind , pub gui_get_drag_data : * mut sys :: godot_method_bind , pub gui_has_modal_stack : * mut sys :: godot_method_bind , pub gui_is_drag_successful : * mut sys :: godot_method_bind , pub gui_is_dragging : * mut sys :: godot_method_bind , pub has_transparent_background : * mut sys :: godot_method_bind , pub input : * mut sys :: godot_method_bind , pub is_3d_disabled : * mut sys :: godot_method_bind , pub is_audio_listener : * mut sys :: godot_method_bind , pub is_audio_listener_2d : * mut sys :: godot_method_bind , pub is_handling_input_locally : * mut sys :: godot_method_bind , pub is_input_disabled : * mut sys :: godot_method_bind , pub is_input_handled : * mut sys :: godot_method_bind , pub is_size_override_enabled : * mut sys :: godot_method_bind , pub is_size_override_stretch_enabled : * mut sys :: godot_method_bind , pub is_snap_controls_to_pixels_enabled : * mut sys :: godot_method_bind , pub is_using_own_world : * mut sys :: godot_method_bind , pub is_using_render_direct_to_screen : * mut sys :: godot_method_bind , pub set_as_audio_listener : * mut sys :: godot_method_bind , pub set_as_audio_listener_2d : * mut sys :: godot_method_bind , pub set_attach_to_screen_rect : * mut sys :: godot_method_bind , pub set_canvas_transform : * mut sys :: godot_method_bind , pub set_clear_mode : * mut sys :: godot_method_bind , pub set_debug_draw : * mut sys :: godot_method_bind , pub set_disable_3d : * mut sys :: godot_method_bind , pub set_disable_input : * mut sys :: godot_method_bind , pub set_global_canvas_transform : * mut sys :: godot_method_bind , pub set_handle_input_locally : * mut sys :: godot_method_bind , pub set_hdr : * mut sys :: godot_method_bind , pub set_input_as_handled : * mut sys :: godot_method_bind , pub set_keep_3d_linear : * mut sys :: godot_method_bind , pub set_msaa : * mut sys :: godot_method_bind , pub set_physics_object_picking : * mut sys :: godot_method_bind , pub set_shadow_atlas_quadrant_subdiv : * mut sys :: godot_method_bind , pub set_shadow_atlas_size : * mut sys :: godot_method_bind , pub set_sharpen_intensity : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind , pub set_size_override : * mut sys :: godot_method_bind , pub set_size_override_stretch : * mut sys :: godot_method_bind , pub set_snap_controls_to_pixels : * mut sys :: godot_method_bind , pub set_transparent_background : * mut sys :: godot_method_bind , pub set_update_mode : * mut sys :: godot_method_bind , pub set_usage : * mut sys :: godot_method_bind , pub set_use_32_bpc_depth : * mut sys :: godot_method_bind , pub set_use_arvr : * mut sys :: godot_method_bind , pub set_use_debanding : * mut sys :: godot_method_bind , pub set_use_fxaa : * mut sys :: godot_method_bind , pub set_use_own_world : * mut sys :: godot_method_bind , pub set_use_render_direct_to_screen : * mut sys :: godot_method_bind , pub set_vflip : * mut sys :: godot_method_bind , pub set_world : * mut sys :: godot_method_bind , pub set_world_2d : * mut sys :: godot_method_bind , pub unhandled_input : * mut sys :: godot_method_bind , pub update_worlds : * mut sys :: godot_method_bind , pub use_arvr : * mut sys :: godot_method_bind , pub warp_mouse : * mut sys :: godot_method_bind } impl ViewportMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ViewportMethodTable = ViewportMethodTable { class_constructor : None , find_world : 0 as * mut sys :: godot_method_bind , find_world_2d : 0 as * mut sys :: godot_method_bind , get_camera : 0 as * mut sys :: godot_method_bind , get_canvas_transform : 0 as * mut sys :: godot_method_bind , get_clear_mode : 0 as * mut sys :: godot_method_bind , get_debug_draw : 0 as * mut sys :: godot_method_bind , get_final_transform : 0 as * mut sys :: godot_method_bind , get_global_canvas_transform : 0 as * mut sys :: godot_method_bind , get_hdr : 0 as * mut sys :: godot_method_bind , get_keep_3d_linear : 0 as * mut sys :: godot_method_bind , get_modal_stack_top : 0 as * mut sys :: godot_method_bind , get_mouse_position : 0 as * mut sys :: godot_method_bind , get_msaa : 0 as * mut sys :: godot_method_bind , get_physics_object_picking : 0 as * mut sys :: godot_method_bind , get_render_info : 0 as * mut sys :: godot_method_bind , get_shadow_atlas_quadrant_subdiv : 0 as * mut sys :: godot_method_bind , get_shadow_atlas_size : 0 as * mut sys :: godot_method_bind , get_sharpen_intensity : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_size_override : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_update_mode : 0 as * mut sys :: godot_method_bind , get_usage : 0 as * mut sys :: godot_method_bind , get_use_32_bpc_depth : 0 as * mut sys :: godot_method_bind , get_use_debanding : 0 as * mut sys :: godot_method_bind , get_use_fxaa : 0 as * mut sys :: godot_method_bind , get_vflip : 0 as * mut sys :: godot_method_bind , get_viewport_rid : 0 as * mut sys :: godot_method_bind , get_visible_rect : 0 as * mut sys :: godot_method_bind , get_world : 0 as * mut sys :: godot_method_bind , get_world_2d : 0 as * mut sys :: godot_method_bind , gui_get_drag_data : 0 as * mut sys :: godot_method_bind , gui_has_modal_stack : 0 as * mut sys :: godot_method_bind , gui_is_drag_successful : 0 as * mut sys :: godot_method_bind , gui_is_dragging : 0 as * mut sys :: godot_method_bind , has_transparent_background : 0 as * mut sys :: godot_method_bind , input : 0 as * mut sys :: godot_method_bind , is_3d_disabled : 0 as * mut sys :: godot_method_bind , is_audio_listener : 0 as * mut sys :: godot_method_bind , is_audio_listener_2d : 0 as * mut sys :: godot_method_bind , is_handling_input_locally : 0 as * mut sys :: godot_method_bind , is_input_disabled : 0 as * mut sys :: godot_method_bind , is_input_handled : 0 as * mut sys :: godot_method_bind , is_size_override_enabled : 0 as * mut sys :: godot_method_bind , is_size_override_stretch_enabled : 0 as * mut sys :: godot_method_bind , is_snap_controls_to_pixels_enabled : 0 as * mut sys :: godot_method_bind , is_using_own_world : 0 as * mut sys :: godot_method_bind , is_using_render_direct_to_screen : 0 as * mut sys :: godot_method_bind , set_as_audio_listener : 0 as * mut sys :: godot_method_bind , set_as_audio_listener_2d : 0 as * mut sys :: godot_method_bind , set_attach_to_screen_rect : 0 as * mut sys :: godot_method_bind , set_canvas_transform : 0 as * mut sys :: godot_method_bind , set_clear_mode : 0 as * mut sys :: godot_method_bind , set_debug_draw : 0 as * mut sys :: godot_method_bind , set_disable_3d : 0 as * mut sys :: godot_method_bind , set_disable_input : 0 as * mut sys :: godot_method_bind , set_global_canvas_transform : 0 as * mut sys :: godot_method_bind , set_handle_input_locally : 0 as * mut sys :: godot_method_bind , set_hdr : 0 as * mut sys :: godot_method_bind , set_input_as_handled : 0 as * mut sys :: godot_method_bind , set_keep_3d_linear : 0 as * mut sys :: godot_method_bind , set_msaa : 0 as * mut sys :: godot_method_bind , set_physics_object_picking : 0 as * mut sys :: godot_method_bind , set_shadow_atlas_quadrant_subdiv : 0 as * mut sys :: godot_method_bind , set_shadow_atlas_size : 0 as * mut sys :: godot_method_bind , set_sharpen_intensity : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind , set_size_override : 0 as * mut sys :: godot_method_bind , set_size_override_stretch : 0 as * mut sys :: godot_method_bind , set_snap_controls_to_pixels : 0 as * mut sys :: godot_method_bind , set_transparent_background : 0 as * mut sys :: godot_method_bind , set_update_mode : 0 as * mut sys :: godot_method_bind , set_usage : 0 as * mut sys :: godot_method_bind , set_use_32_bpc_depth : 0 as * mut sys :: godot_method_bind , set_use_arvr : 0 as * mut sys :: godot_method_bind , set_use_debanding : 0 as * mut sys :: godot_method_bind , set_use_fxaa : 0 as * mut sys :: godot_method_bind , set_use_own_world : 0 as * mut sys :: godot_method_bind , set_use_render_direct_to_screen : 0 as * mut sys :: godot_method_bind , set_vflip : 0 as * mut sys :: godot_method_bind , set_world : 0 as * mut sys :: godot_method_bind , set_world_2d : 0 as * mut sys :: godot_method_bind , unhandled_input : 0 as * mut sys :: godot_method_bind , update_worlds : 0 as * mut sys :: godot_method_bind , use_arvr : 0 as * mut sys :: godot_method_bind , warp_mouse : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ViewportMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "Viewport\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . find_world = (gd_api . godot_method_bind_get_method) (class_name , "find_world\0" . as_ptr () as * const c_char) ; table . find_world_2d = (gd_api . godot_method_bind_get_method) (class_name , "find_world_2d\0" . as_ptr () as * const c_char) ; table . get_camera = (gd_api . godot_method_bind_get_method) (class_name , "get_camera\0" . as_ptr () as * const c_char) ; table . get_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_canvas_transform\0" . as_ptr () as * const c_char) ; table . get_clear_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_clear_mode\0" . as_ptr () as * const c_char) ; table . get_debug_draw = (gd_api . godot_method_bind_get_method) (class_name , "get_debug_draw\0" . as_ptr () as * const c_char) ; table . get_final_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_final_transform\0" . as_ptr () as * const c_char) ; table . get_global_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "get_global_canvas_transform\0" . as_ptr () as * const c_char) ; table . get_hdr = (gd_api . godot_method_bind_get_method) (class_name , "get_hdr\0" . as_ptr () as * const c_char) ; table . get_keep_3d_linear = (gd_api . godot_method_bind_get_method) (class_name , "get_keep_3d_linear\0" . as_ptr () as * const c_char) ; table . get_modal_stack_top = (gd_api . godot_method_bind_get_method) (class_name , "get_modal_stack_top\0" . as_ptr () as * const c_char) ; table . get_mouse_position = (gd_api . godot_method_bind_get_method) (class_name , "get_mouse_position\0" . as_ptr () as * const c_char) ; table . get_msaa = (gd_api . godot_method_bind_get_method) (class_name , "get_msaa\0" . as_ptr () as * const c_char) ; table . get_physics_object_picking = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_object_picking\0" . as_ptr () as * const c_char) ; table . get_render_info = (gd_api . godot_method_bind_get_method) (class_name , "get_render_info\0" . as_ptr () as * const c_char) ; table . get_shadow_atlas_quadrant_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_atlas_quadrant_subdiv\0" . as_ptr () as * const c_char) ; table . get_shadow_atlas_size = (gd_api . godot_method_bind_get_method) (class_name , "get_shadow_atlas_size\0" . as_ptr () as * const c_char) ; table . get_sharpen_intensity = (gd_api . godot_method_bind_get_method) (class_name , "get_sharpen_intensity\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_size_override = (gd_api . godot_method_bind_get_method) (class_name , "get_size_override\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_update_mode\0" . as_ptr () as * const c_char) ; table . get_usage = (gd_api . godot_method_bind_get_method) (class_name , "get_usage\0" . as_ptr () as * const c_char) ; table . get_use_32_bpc_depth = (gd_api . godot_method_bind_get_method) (class_name , "get_use_32_bpc_depth\0" . as_ptr () as * const c_char) ; table . get_use_debanding = (gd_api . godot_method_bind_get_method) (class_name , "get_use_debanding\0" . as_ptr () as * const c_char) ; table . get_use_fxaa = (gd_api . godot_method_bind_get_method) (class_name , "get_use_fxaa\0" . as_ptr () as * const c_char) ; table . get_vflip = (gd_api . godot_method_bind_get_method) (class_name , "get_vflip\0" . as_ptr () as * const c_char) ; table . get_viewport_rid = (gd_api . godot_method_bind_get_method) (class_name , "get_viewport_rid\0" . as_ptr () as * const c_char) ; table . get_visible_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_visible_rect\0" . as_ptr () as * const c_char) ; table . get_world = (gd_api . godot_method_bind_get_method) (class_name , "get_world\0" . as_ptr () as * const c_char) ; table . get_world_2d = (gd_api . godot_method_bind_get_method) (class_name , "get_world_2d\0" . as_ptr () as * const c_char) ; table . gui_get_drag_data = (gd_api . godot_method_bind_get_method) (class_name , "gui_get_drag_data\0" . as_ptr () as * const c_char) ; table . gui_has_modal_stack = (gd_api . godot_method_bind_get_method) (class_name , "gui_has_modal_stack\0" . as_ptr () as * const c_char) ; table . gui_is_drag_successful = (gd_api . godot_method_bind_get_method) (class_name , "gui_is_drag_successful\0" . as_ptr () as * const c_char) ; table . gui_is_dragging = (gd_api . godot_method_bind_get_method) (class_name , "gui_is_dragging\0" . as_ptr () as * const c_char) ; table . has_transparent_background = (gd_api . godot_method_bind_get_method) (class_name , "has_transparent_background\0" . as_ptr () as * const c_char) ; table . input = (gd_api . godot_method_bind_get_method) (class_name , "input\0" . as_ptr () as * const c_char) ; table . is_3d_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_3d_disabled\0" . as_ptr () as * const c_char) ; table . is_audio_listener = (gd_api . godot_method_bind_get_method) (class_name , "is_audio_listener\0" . as_ptr () as * const c_char) ; table . is_audio_listener_2d = (gd_api . godot_method_bind_get_method) (class_name , "is_audio_listener_2d\0" . as_ptr () as * const c_char) ; table . is_handling_input_locally = (gd_api . godot_method_bind_get_method) (class_name , "is_handling_input_locally\0" . as_ptr () as * const c_char) ; table . is_input_disabled = (gd_api . godot_method_bind_get_method) (class_name , "is_input_disabled\0" . as_ptr () as * const c_char) ; table . is_input_handled = (gd_api . godot_method_bind_get_method) (class_name , "is_input_handled\0" . as_ptr () as * const c_char) ; table . is_size_override_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_size_override_enabled\0" . as_ptr () as * const c_char) ; table . is_size_override_stretch_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_size_override_stretch_enabled\0" . as_ptr () as * const c_char) ; table . is_snap_controls_to_pixels_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_snap_controls_to_pixels_enabled\0" . as_ptr () as * const c_char) ; table . is_using_own_world = (gd_api . godot_method_bind_get_method) (class_name , "is_using_own_world\0" . as_ptr () as * const c_char) ; table . is_using_render_direct_to_screen = (gd_api . godot_method_bind_get_method) (class_name , "is_using_render_direct_to_screen\0" . as_ptr () as * const c_char) ; table . set_as_audio_listener = (gd_api . godot_method_bind_get_method) (class_name , "set_as_audio_listener\0" . as_ptr () as * const c_char) ; table . set_as_audio_listener_2d = (gd_api . godot_method_bind_get_method) (class_name , "set_as_audio_listener_2d\0" . as_ptr () as * const c_char) ; table . set_attach_to_screen_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_attach_to_screen_rect\0" . as_ptr () as * const c_char) ; table . set_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_canvas_transform\0" . as_ptr () as * const c_char) ; table . set_clear_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_clear_mode\0" . as_ptr () as * const c_char) ; table . set_debug_draw = (gd_api . godot_method_bind_get_method) (class_name , "set_debug_draw\0" . as_ptr () as * const c_char) ; table . set_disable_3d = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_3d\0" . as_ptr () as * const c_char) ; table . set_disable_input = (gd_api . godot_method_bind_get_method) (class_name , "set_disable_input\0" . as_ptr () as * const c_char) ; table . set_global_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "set_global_canvas_transform\0" . as_ptr () as * const c_char) ; table . set_handle_input_locally = (gd_api . godot_method_bind_get_method) (class_name , "set_handle_input_locally\0" . as_ptr () as * const c_char) ; table . set_hdr = (gd_api . godot_method_bind_get_method) (class_name , "set_hdr\0" . as_ptr () as * const c_char) ; table . set_input_as_handled = (gd_api . godot_method_bind_get_method) (class_name , "set_input_as_handled\0" . as_ptr () as * const c_char) ; table . set_keep_3d_linear = (gd_api . godot_method_bind_get_method) (class_name , "set_keep_3d_linear\0" . as_ptr () as * const c_char) ; table . set_msaa = (gd_api . godot_method_bind_get_method) (class_name , "set_msaa\0" . as_ptr () as * const c_char) ; table . set_physics_object_picking = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_object_picking\0" . as_ptr () as * const c_char) ; table . set_shadow_atlas_quadrant_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_atlas_quadrant_subdiv\0" . as_ptr () as * const c_char) ; table . set_shadow_atlas_size = (gd_api . godot_method_bind_get_method) (class_name , "set_shadow_atlas_size\0" . as_ptr () as * const c_char) ; table . set_sharpen_intensity = (gd_api . godot_method_bind_get_method) (class_name , "set_sharpen_intensity\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; table . set_size_override = (gd_api . godot_method_bind_get_method) (class_name , "set_size_override\0" . as_ptr () as * const c_char) ; table . set_size_override_stretch = (gd_api . godot_method_bind_get_method) (class_name , "set_size_override_stretch\0" . as_ptr () as * const c_char) ; table . set_snap_controls_to_pixels = (gd_api . godot_method_bind_get_method) (class_name , "set_snap_controls_to_pixels\0" . as_ptr () as * const c_char) ; table . set_transparent_background = (gd_api . godot_method_bind_get_method) (class_name , "set_transparent_background\0" . as_ptr () as * const c_char) ; table . set_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_update_mode\0" . as_ptr () as * const c_char) ; table . set_usage = (gd_api . godot_method_bind_get_method) (class_name , "set_usage\0" . as_ptr () as * const c_char) ; table . set_use_32_bpc_depth = (gd_api . godot_method_bind_get_method) (class_name , "set_use_32_bpc_depth\0" . as_ptr () as * const c_char) ; table . set_use_arvr = (gd_api . godot_method_bind_get_method) (class_name , "set_use_arvr\0" . as_ptr () as * const c_char) ; table . set_use_debanding = (gd_api . godot_method_bind_get_method) (class_name , "set_use_debanding\0" . as_ptr () as * const c_char) ; table . set_use_fxaa = (gd_api . godot_method_bind_get_method) (class_name , "set_use_fxaa\0" . as_ptr () as * const c_char) ; table . set_use_own_world = (gd_api . godot_method_bind_get_method) (class_name , "set_use_own_world\0" . as_ptr () as * const c_char) ; table . set_use_render_direct_to_screen = (gd_api . godot_method_bind_get_method) (class_name , "set_use_render_direct_to_screen\0" . as_ptr () as * const c_char) ; table . set_vflip = (gd_api . godot_method_bind_get_method) (class_name , "set_vflip\0" . as_ptr () as * const c_char) ; table . set_world = (gd_api . godot_method_bind_get_method) (class_name , "set_world\0" . as_ptr () as * const c_char) ; table . set_world_2d = (gd_api . godot_method_bind_get_method) (class_name , "set_world_2d\0" . as_ptr () as * const c_char) ; table . unhandled_input = (gd_api . godot_method_bind_get_method) (class_name , "unhandled_input\0" . as_ptr () as * const c_char) ; table . update_worlds = (gd_api . godot_method_bind_get_method) (class_name , "update_worlds\0" . as_ptr () as * const c_char) ; table . use_arvr = (gd_api . godot_method_bind_get_method) (class_name , "use_arvr\0" . as_ptr () as * const c_char) ; table . warp_mouse = (gd_api . godot_method_bind_get_method) (class_name , "warp_mouse\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::viewport::private::Viewport;
            
            pub(crate) mod viewport_container {
                # ! [doc = "This module contains types related to the API class [`ViewportContainer`][super::ViewportContainer]."] pub (crate) mod private { # [doc = "`core class ViewportContainer` inherits `Container` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_viewportcontainer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`ViewportContainer` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<ViewportContainer>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nViewportContainer inherits methods from:\n - [Container](struct.Container.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ViewportContainer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ViewportContainer ; impl ViewportContainer { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ViewportContainerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Divides the viewport's effective resolution by this value while preserving its scale. This can be used to speed up rendering.\nFor example, a 1280×720 viewport with [`stretch_shrink`][Self::stretch_shrink] set to `2` will be rendered at 640×360 while occupying the same size in the container.\n**Note:** [`stretch`][Self::stretch] must be `true` for this property to work."] # [doc = ""] # [inline] pub fn stretch_shrink (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportContainerMethodTable :: get (get_api ()) . get_stretch_shrink ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the viewport will be scaled to the control's size."] # [doc = ""] # [inline] pub fn is_stretch_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportContainerMethodTable :: get (get_api ()) . is_stretch_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the viewport will be scaled to the control's size."] # [doc = ""] # [inline] pub fn set_stretch (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportContainerMethodTable :: get (get_api ()) . set_stretch ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Divides the viewport's effective resolution by this value while preserving its scale. This can be used to speed up rendering.\nFor example, a 1280×720 viewport with [`stretch_shrink`][Self::stretch_shrink] set to `2` will be rendered at 640×360 while occupying the same size in the container.\n**Note:** [`stretch`][Self::stretch] must be `true` for this property to work."] # [doc = ""] # [inline] pub fn set_stretch_shrink (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportContainerMethodTable :: get (get_api ()) . set_stretch_shrink ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ViewportContainer { } unsafe impl GodotObject for ViewportContainer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ViewportContainer" } } impl QueueFree for ViewportContainer { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for ViewportContainer { type Target = crate :: generated :: Container ; # [inline] fn deref (& self) -> & crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ViewportContainer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Container { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Container > for ViewportContainer { } unsafe impl SubClass < crate :: generated :: Control > for ViewportContainer { } unsafe impl SubClass < crate :: generated :: CanvasItem > for ViewportContainer { } unsafe impl SubClass < crate :: generated :: Node > for ViewportContainer { } unsafe impl SubClass < crate :: generated :: Object > for ViewportContainer { } impl Instanciable for ViewportContainer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ViewportContainer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ViewportContainerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_stretch_shrink : * mut sys :: godot_method_bind , pub is_stretch_enabled : * mut sys :: godot_method_bind , pub set_stretch : * mut sys :: godot_method_bind , pub set_stretch_shrink : * mut sys :: godot_method_bind } impl ViewportContainerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ViewportContainerMethodTable = ViewportContainerMethodTable { class_constructor : None , get_stretch_shrink : 0 as * mut sys :: godot_method_bind , is_stretch_enabled : 0 as * mut sys :: godot_method_bind , set_stretch : 0 as * mut sys :: godot_method_bind , set_stretch_shrink : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ViewportContainerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ViewportContainer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_stretch_shrink = (gd_api . godot_method_bind_get_method) (class_name , "get_stretch_shrink\0" . as_ptr () as * const c_char) ; table . is_stretch_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_stretch_enabled\0" . as_ptr () as * const c_char) ; table . set_stretch = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch\0" . as_ptr () as * const c_char) ; table . set_stretch_shrink = (gd_api . godot_method_bind_get_method) (class_name , "set_stretch_shrink\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::viewport_container::private::ViewportContainer;
            
            pub(crate) mod viewport_texture {
                # ! [doc = "This module contains types related to the API class [`ViewportTexture`][super::ViewportTexture]."] pub (crate) mod private { # [doc = "`core class ViewportTexture` inherits `Texture` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_viewporttexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nViewportTexture inherits methods from:\n - [Texture](struct.Texture.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ViewportTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ViewportTexture ; impl ViewportTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ViewportTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The path to the [`Viewport`][Viewport] node to display. This is relative to the scene root, not to the node which uses the texture."] # [doc = ""] # [inline] pub fn viewport_path_in_scene (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportTextureMethodTable :: get (get_api ()) . get_viewport_path_in_scene ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The path to the [`Viewport`][Viewport] node to display. This is relative to the scene root, not to the node which uses the texture."] # [doc = ""] # [inline] pub fn set_viewport_path_in_scene (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ViewportTextureMethodTable :: get (get_api ()) . set_viewport_path_in_scene ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ViewportTexture { } unsafe impl GodotObject for ViewportTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "ViewportTexture" } } impl std :: ops :: Deref for ViewportTexture { type Target = crate :: generated :: Texture ; # [inline] fn deref (& self) -> & crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ViewportTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Texture { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Texture > for ViewportTexture { } unsafe impl SubClass < crate :: generated :: Resource > for ViewportTexture { } unsafe impl SubClass < crate :: generated :: Reference > for ViewportTexture { } unsafe impl SubClass < crate :: generated :: Object > for ViewportTexture { } impl Instanciable for ViewportTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { ViewportTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ViewportTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_viewport_path_in_scene : * mut sys :: godot_method_bind , pub set_viewport_path_in_scene : * mut sys :: godot_method_bind } impl ViewportTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ViewportTextureMethodTable = ViewportTextureMethodTable { class_constructor : None , get_viewport_path_in_scene : 0 as * mut sys :: godot_method_bind , set_viewport_path_in_scene : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ViewportTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "ViewportTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_viewport_path_in_scene = (gd_api . godot_method_bind_get_method) (class_name , "get_viewport_path_in_scene\0" . as_ptr () as * const c_char) ; table . set_viewport_path_in_scene = (gd_api . godot_method_bind_get_method) (class_name , "set_viewport_path_in_scene\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::viewport_texture::private::ViewportTexture;
            
            pub mod visibility_enabler {
                # ! [doc = "This module contains types related to the API class [`VisibilityEnabler`][super::VisibilityEnabler]."] pub (crate) mod private { # [doc = "`core class VisibilityEnabler` inherits `VisibilityNotifier` (manually managed).\n\nThis class has related types in the [`visibility_enabler`][super::visibility_enabler] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visibilityenabler.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`VisibilityEnabler` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<VisibilityEnabler>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVisibilityEnabler inherits methods from:\n - [VisibilityNotifier](struct.VisibilityNotifier.html)\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisibilityEnabler { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisibilityEnabler ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Enabler (pub i64) ; impl Enabler { pub const PAUSE_ANIMATIONS : Enabler = Enabler (0i64) ; pub const FREEZE_BODIES : Enabler = Enabler (1i64) ; pub const MAX : Enabler = Enabler (2i64) ; } impl From < i64 > for Enabler { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Enabler > for i64 { # [inline] fn from (v : Enabler) -> Self { v . 0 } } impl FromVariant for Enabler { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisibilityEnabler { pub const ENABLER_PAUSE_ANIMATIONS : i64 = 0i64 ; pub const ENABLER_FREEZE_BODIES : i64 = 1i64 ; pub const ENABLER_MAX : i64 = 2i64 ; } impl VisibilityEnabler { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisibilityEnablerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns whether the enabler identified by given [`Enabler`][Enabler] constant is active."] # [doc = ""] # [inline] pub fn is_enabler_enabled (& self , enabler : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnablerMethodTable :: get (get_api ()) . is_enabler_enabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , enabler as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets active state of the enabler identified by given [`Enabler`][Enabler] constant."] # [doc = ""] # [inline] pub fn set_enabler (& self , enabler : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnablerMethodTable :: get (get_api ()) . set_enabler ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , enabler as _ , enabled as _) ; } } # [doc = "If `true`, [`RigidBody`][RigidBody] nodes will be paused."] # [doc = ""] # [inline] pub fn freeze_bodies (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnablerMethodTable :: get (get_api ()) . is_enabler_enabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, [`RigidBody`][RigidBody] nodes will be paused."] # [doc = ""] # [inline] pub fn set_freeze_bodies (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnablerMethodTable :: get (get_api ()) . set_enabler ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "If `true`, [`AnimationPlayer`][AnimationPlayer] nodes will be paused."] # [doc = ""] # [inline] pub fn pause_animations (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnablerMethodTable :: get (get_api ()) . is_enabler_enabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, [`AnimationPlayer`][AnimationPlayer] nodes will be paused."] # [doc = ""] # [inline] pub fn set_pause_animations (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnablerMethodTable :: get (get_api ()) . set_enabler ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisibilityEnabler { } unsafe impl GodotObject for VisibilityEnabler { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisibilityEnabler" } } impl QueueFree for VisibilityEnabler { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for VisibilityEnabler { type Target = crate :: generated :: VisibilityNotifier ; # [inline] fn deref (& self) -> & crate :: generated :: VisibilityNotifier { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisibilityEnabler { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisibilityNotifier { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisibilityNotifier > for VisibilityEnabler { } unsafe impl SubClass < crate :: generated :: CullInstance > for VisibilityEnabler { } unsafe impl SubClass < crate :: generated :: Spatial > for VisibilityEnabler { } unsafe impl SubClass < crate :: generated :: Node > for VisibilityEnabler { } unsafe impl SubClass < crate :: generated :: Object > for VisibilityEnabler { } impl Instanciable for VisibilityEnabler { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisibilityEnabler :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisibilityEnablerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_enabler_enabled : * mut sys :: godot_method_bind , pub set_enabler : * mut sys :: godot_method_bind } impl VisibilityEnablerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisibilityEnablerMethodTable = VisibilityEnablerMethodTable { class_constructor : None , is_enabler_enabled : 0 as * mut sys :: godot_method_bind , set_enabler : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisibilityEnablerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisibilityEnabler\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_enabler_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabler_enabled\0" . as_ptr () as * const c_char) ; table . set_enabler = (gd_api . godot_method_bind_get_method) (class_name , "set_enabler\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visibility_enabler::private::VisibilityEnabler;
            
            pub mod visibility_enabler_2d {
                # ! [doc = "This module contains types related to the API class [`VisibilityEnabler2D`][super::VisibilityEnabler2D]."] pub (crate) mod private { # [doc = "`core class VisibilityEnabler2D` inherits `VisibilityNotifier2D` (manually managed).\n\nThis class has related types in the [`visibility_enabler_2d`][super::visibility_enabler_2d] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visibilityenabler2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`VisibilityEnabler2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<VisibilityEnabler2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVisibilityEnabler2D inherits methods from:\n - [VisibilityNotifier2D](struct.VisibilityNotifier2D.html)\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisibilityEnabler2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisibilityEnabler2D ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Enabler (pub i64) ; impl Enabler { pub const PAUSE_ANIMATIONS : Enabler = Enabler (0i64) ; pub const FREEZE_BODIES : Enabler = Enabler (1i64) ; pub const PAUSE_PARTICLES : Enabler = Enabler (2i64) ; pub const PARENT_PROCESS : Enabler = Enabler (3i64) ; pub const PARENT_PHYSICS_PROCESS : Enabler = Enabler (4i64) ; pub const PAUSE_ANIMATED_SPRITES : Enabler = Enabler (5i64) ; pub const MAX : Enabler = Enabler (6i64) ; } impl From < i64 > for Enabler { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Enabler > for i64 { # [inline] fn from (v : Enabler) -> Self { v . 0 } } impl FromVariant for Enabler { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisibilityEnabler2D { pub const ENABLER_PAUSE_ANIMATIONS : i64 = 0i64 ; pub const ENABLER_FREEZE_BODIES : i64 = 1i64 ; pub const ENABLER_PAUSE_PARTICLES : i64 = 2i64 ; pub const ENABLER_PARENT_PROCESS : i64 = 3i64 ; pub const ENABLER_PARENT_PHYSICS_PROCESS : i64 = 4i64 ; pub const ENABLER_PAUSE_ANIMATED_SPRITES : i64 = 5i64 ; pub const ENABLER_MAX : i64 = 6i64 ; } impl VisibilityEnabler2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisibilityEnabler2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns whether the enabler identified by given [`Enabler`][Enabler] constant is active."] # [doc = ""] # [inline] pub fn is_enabler_enabled (& self , enabler : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . is_enabler_enabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , enabler as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets active state of the enabler identified by given [`Enabler`][Enabler] constant."] # [doc = ""] # [inline] pub fn set_enabler (& self , enabler : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . set_enabler ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , enabler as _ , enabled as _) ; } } # [doc = "If `true`, [`RigidBody2D`][RigidBody2D] nodes will be paused."] # [doc = ""] # [inline] pub fn freeze_bodies (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . is_enabler_enabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 1i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, [`RigidBody2D`][RigidBody2D] nodes will be paused."] # [doc = ""] # [inline] pub fn set_freeze_bodies (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . set_enabler ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 1i64 , value as _) ; } } # [doc = "If `true`, [`AnimatedSprite`][AnimatedSprite] nodes will be paused."] # [doc = ""] # [inline] pub fn pause_animated_sprites (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . is_enabler_enabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 5i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, [`AnimatedSprite`][AnimatedSprite] nodes will be paused."] # [doc = ""] # [inline] pub fn set_pause_animated_sprites (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . set_enabler ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 5i64 , value as _) ; } } # [doc = "If `true`, [`AnimationPlayer`][AnimationPlayer] nodes will be paused."] # [doc = ""] # [inline] pub fn pause_animations (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . is_enabler_enabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 0i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, [`AnimationPlayer`][AnimationPlayer] nodes will be paused."] # [doc = ""] # [inline] pub fn set_pause_animations (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . set_enabler ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 0i64 , value as _) ; } } # [doc = "If `true`, [`Particles2D`][Particles2D] nodes will be paused."] # [doc = ""] # [inline] pub fn pause_particles (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . is_enabler_enabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 2i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, [`Particles2D`][Particles2D] nodes will be paused."] # [doc = ""] # [inline] pub fn set_pause_particles (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . set_enabler ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 2i64 , value as _) ; } } # [doc = "If `true`, the parent's [`Node._physics_process`][Node::_physics_process] will be stopped."] # [doc = ""] # [inline] pub fn physics_process_parent (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . is_enabler_enabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 4i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the parent's [`Node._physics_process`][Node::_physics_process] will be stopped."] # [doc = ""] # [inline] pub fn set_physics_process_parent (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . set_enabler ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 4i64 , value as _) ; } } # [doc = "If `true`, the parent's [`Node._process`][Node::_process] will be stopped."] # [doc = ""] # [inline] pub fn process_parent (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . is_enabler_enabled ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , 3i64) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the parent's [`Node._process`][Node::_process] will be stopped."] # [doc = ""] # [inline] pub fn set_process_parent (& self , value : bool) { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityEnabler2DMethodTable :: get (get_api ()) . set_enabler ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , 3i64 , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisibilityEnabler2D { } unsafe impl GodotObject for VisibilityEnabler2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisibilityEnabler2D" } } impl QueueFree for VisibilityEnabler2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for VisibilityEnabler2D { type Target = crate :: generated :: VisibilityNotifier2D ; # [inline] fn deref (& self) -> & crate :: generated :: VisibilityNotifier2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisibilityEnabler2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisibilityNotifier2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisibilityNotifier2D > for VisibilityEnabler2D { } unsafe impl SubClass < crate :: generated :: Node2D > for VisibilityEnabler2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for VisibilityEnabler2D { } unsafe impl SubClass < crate :: generated :: Node > for VisibilityEnabler2D { } unsafe impl SubClass < crate :: generated :: Object > for VisibilityEnabler2D { } impl Instanciable for VisibilityEnabler2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisibilityEnabler2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisibilityEnabler2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_enabler_enabled : * mut sys :: godot_method_bind , pub set_enabler : * mut sys :: godot_method_bind } impl VisibilityEnabler2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisibilityEnabler2DMethodTable = VisibilityEnabler2DMethodTable { class_constructor : None , is_enabler_enabled : 0 as * mut sys :: godot_method_bind , set_enabler : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisibilityEnabler2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisibilityEnabler2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_enabler_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_enabler_enabled\0" . as_ptr () as * const c_char) ; table . set_enabler = (gd_api . godot_method_bind_get_method) (class_name , "set_enabler\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visibility_enabler_2d::private::VisibilityEnabler2D;
            
            pub(crate) mod visibility_notifier {
                # ! [doc = "This module contains types related to the API class [`VisibilityNotifier`][super::VisibilityNotifier]."] pub (crate) mod private { # [doc = "`core class VisibilityNotifier` inherits `CullInstance` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visibilitynotifier.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`VisibilityNotifier` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<VisibilityNotifier>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVisibilityNotifier inherits methods from:\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisibilityNotifier { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisibilityNotifier ; impl VisibilityNotifier { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisibilityNotifierMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The VisibilityNotifier's bounding box."] # [doc = ""] # [inline] pub fn aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityNotifierMethodTable :: get (get_api ()) . get_aabb ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "In addition to checking whether a node is on screen or within a [`Camera`][Camera]'s view, VisibilityNotifier can also optionally check whether a node is within a specified maximum distance when using a [`Camera`][Camera] with perspective projection. This is useful for throttling the performance requirements of nodes that are far away.\n**Note:** This feature will be disabled if set to 0.0."] # [doc = ""] # [inline] pub fn max_distance (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityNotifierMethodTable :: get (get_api ()) . get_max_distance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the bounding box is on the screen.\n**Note:** It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return `false` right after it is instantiated, even if it will be on screen in the draw pass."] # [doc = ""] # [inline] pub fn is_on_screen (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityNotifierMethodTable :: get (get_api ()) . is_on_screen ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The VisibilityNotifier's bounding box."] # [doc = ""] # [inline] pub fn set_aabb (& self , rect : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityNotifierMethodTable :: get (get_api ()) . set_aabb ; let ret = crate :: icalls :: icallvar__aabb (method_bind , self . this . sys () . as_ptr () , rect) ; } } # [doc = "In addition to checking whether a node is on screen or within a [`Camera`][Camera]'s view, VisibilityNotifier can also optionally check whether a node is within a specified maximum distance when using a [`Camera`][Camera] with perspective projection. This is useful for throttling the performance requirements of nodes that are far away.\n**Note:** This feature will be disabled if set to 0.0."] # [doc = ""] # [inline] pub fn set_max_distance (& self , distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityNotifierMethodTable :: get (get_api ()) . set_max_distance ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , distance as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisibilityNotifier { } unsafe impl GodotObject for VisibilityNotifier { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisibilityNotifier" } } impl QueueFree for VisibilityNotifier { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for VisibilityNotifier { type Target = crate :: generated :: CullInstance ; # [inline] fn deref (& self) -> & crate :: generated :: CullInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisibilityNotifier { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CullInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CullInstance > for VisibilityNotifier { } unsafe impl SubClass < crate :: generated :: Spatial > for VisibilityNotifier { } unsafe impl SubClass < crate :: generated :: Node > for VisibilityNotifier { } unsafe impl SubClass < crate :: generated :: Object > for VisibilityNotifier { } impl Instanciable for VisibilityNotifier { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisibilityNotifier :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisibilityNotifierMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_aabb : * mut sys :: godot_method_bind , pub get_max_distance : * mut sys :: godot_method_bind , pub is_on_screen : * mut sys :: godot_method_bind , pub set_aabb : * mut sys :: godot_method_bind , pub set_max_distance : * mut sys :: godot_method_bind } impl VisibilityNotifierMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisibilityNotifierMethodTable = VisibilityNotifierMethodTable { class_constructor : None , get_aabb : 0 as * mut sys :: godot_method_bind , get_max_distance : 0 as * mut sys :: godot_method_bind , is_on_screen : 0 as * mut sys :: godot_method_bind , set_aabb : 0 as * mut sys :: godot_method_bind , set_max_distance : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisibilityNotifierMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisibilityNotifier\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_aabb\0" . as_ptr () as * const c_char) ; table . get_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "get_max_distance\0" . as_ptr () as * const c_char) ; table . is_on_screen = (gd_api . godot_method_bind_get_method) (class_name , "is_on_screen\0" . as_ptr () as * const c_char) ; table . set_aabb = (gd_api . godot_method_bind_get_method) (class_name , "set_aabb\0" . as_ptr () as * const c_char) ; table . set_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "set_max_distance\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visibility_notifier::private::VisibilityNotifier;
            
            pub(crate) mod visibility_notifier_2d {
                # ! [doc = "This module contains types related to the API class [`VisibilityNotifier2D`][super::VisibilityNotifier2D]."] pub (crate) mod private { # [doc = "`core class VisibilityNotifier2D` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visibilitynotifier2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`VisibilityNotifier2D` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<VisibilityNotifier2D>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nVisibilityNotifier2D inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisibilityNotifier2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisibilityNotifier2D ; impl VisibilityNotifier2D { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisibilityNotifier2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The VisibilityNotifier2D's bounding rectangle."] # [doc = ""] # [inline] pub fn rect (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityNotifier2DMethodTable :: get (get_api ()) . get_rect ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the bounding rectangle is on the screen.\n**Note:** It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return `false` right after it is instantiated, even if it will be on screen in the draw pass."] # [doc = ""] # [inline] pub fn is_on_screen (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityNotifier2DMethodTable :: get (get_api ()) . is_on_screen ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The VisibilityNotifier2D's bounding rectangle."] # [doc = ""] # [inline] pub fn set_rect (& self , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisibilityNotifier2DMethodTable :: get (get_api ()) . set_rect ; let ret = crate :: icalls :: icallvar__rect2 (method_bind , self . this . sys () . as_ptr () , rect) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisibilityNotifier2D { } unsafe impl GodotObject for VisibilityNotifier2D { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisibilityNotifier2D" } } impl QueueFree for VisibilityNotifier2D { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for VisibilityNotifier2D { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisibilityNotifier2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for VisibilityNotifier2D { } unsafe impl SubClass < crate :: generated :: CanvasItem > for VisibilityNotifier2D { } unsafe impl SubClass < crate :: generated :: Node > for VisibilityNotifier2D { } unsafe impl SubClass < crate :: generated :: Object > for VisibilityNotifier2D { } impl Instanciable for VisibilityNotifier2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisibilityNotifier2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisibilityNotifier2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_rect : * mut sys :: godot_method_bind , pub is_on_screen : * mut sys :: godot_method_bind , pub set_rect : * mut sys :: godot_method_bind } impl VisibilityNotifier2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisibilityNotifier2DMethodTable = VisibilityNotifier2DMethodTable { class_constructor : None , get_rect : 0 as * mut sys :: godot_method_bind , is_on_screen : 0 as * mut sys :: godot_method_bind , set_rect : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisibilityNotifier2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisibilityNotifier2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_rect = (gd_api . godot_method_bind_get_method) (class_name , "get_rect\0" . as_ptr () as * const c_char) ; table . is_on_screen = (gd_api . godot_method_bind_get_method) (class_name , "is_on_screen\0" . as_ptr () as * const c_char) ; table . set_rect = (gd_api . godot_method_bind_get_method) (class_name , "set_rect\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visibility_notifier_2d::private::VisibilityNotifier2D;
            
            pub(crate) mod visual_instance {
                # ! [doc = "This module contains types related to the API class [`VisualInstance`][super::VisualInstance]."] pub (crate) mod private { # [doc = "`core class VisualInstance` inherits `CullInstance` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualinstance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nVisualInstance inherits methods from:\n - [CullInstance](struct.CullInstance.html)\n - [Spatial](struct.Spatial.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualInstance { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualInstance ; impl VisualInstance { # [doc = "Returns the [`AABB`][Aabb] (also known as the bounding box) for this [`VisualInstance`][VisualInstance]. See also [`get_transformed_aabb`][Self::get_transformed_aabb]."] # [doc = ""] # [inline] pub fn get_aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualInstanceMethodTable :: get (get_api ()) . get_aabb ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the RID of the resource associated with this [`VisualInstance`][VisualInstance]. For example, if the Node is a [`MeshInstance`][MeshInstance], this will return the RID of the associated [`Mesh`][Mesh]."] # [doc = ""] # [inline] pub fn get_base (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualInstanceMethodTable :: get (get_api ()) . get_base ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the RID of this instance. This RID is the same as the RID returned by [`VisualServer.instance_create`][VisualServer::instance_create]. This RID is needed if you want to call [`VisualServer`][VisualServer] functions directly on this [`VisualInstance`][VisualInstance]."] # [doc = ""] # [inline] pub fn get_instance (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualInstanceMethodTable :: get (get_api ()) . get_instance ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The render layer(s) this [`VisualInstance`][VisualInstance] is drawn on.\nThis object will only be visible for [`Camera`][Camera]s whose cull mask includes the render object this [`VisualInstance`][VisualInstance] is set to."] # [doc = ""] # [inline] pub fn layer_mask (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualInstanceMethodTable :: get (get_api ()) . get_layer_mask ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` when the specified layer is enabled in [`layers`][Self::layers] and `false` otherwise."] # [doc = ""] # [inline] pub fn get_layer_mask_bit (& self , layer : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualInstanceMethodTable :: get (get_api ()) . get_layer_mask_bit ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , layer as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the transformed [`AABB`][Aabb] (also known as the bounding box) for this [`VisualInstance`][VisualInstance].\nTransformed in this case means the [`AABB`][Aabb] plus the position, rotation, and scale of the [`Spatial`][Spatial]'s [`Transform`][Transform]. See also [`get_aabb`][Self::get_aabb]."] # [doc = ""] # [inline] pub fn get_transformed_aabb (& self) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualInstanceMethodTable :: get (get_api ()) . get_transformed_aabb ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the resource that is instantiated by this [`VisualInstance`][VisualInstance], which changes how the engine handles the [`VisualInstance`][VisualInstance] under the hood. Equivalent to [`VisualServer.instance_set_base`][VisualServer::instance_set_base]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn set_base (& self , base : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualInstanceMethodTable :: get (get_api ()) . set_base ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , base) ; } } # [doc = "The render layer(s) this [`VisualInstance`][VisualInstance] is drawn on.\nThis object will only be visible for [`Camera`][Camera]s whose cull mask includes the render object this [`VisualInstance`][VisualInstance] is set to."] # [doc = ""] # [inline] pub fn set_layer_mask (& self , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualInstanceMethodTable :: get (get_api ()) . set_layer_mask ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mask as _) ; } } # [doc = "Enables a particular layer in [`layers`][Self::layers]."] # [doc = ""] # [inline] pub fn set_layer_mask_bit (& self , layer : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualInstanceMethodTable :: get (get_api ()) . set_layer_mask_bit ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , layer as _ , enabled as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualInstance { } unsafe impl GodotObject for VisualInstance { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisualInstance" } } impl QueueFree for VisualInstance { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for VisualInstance { type Target = crate :: generated :: CullInstance ; # [inline] fn deref (& self) -> & crate :: generated :: CullInstance { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualInstance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: CullInstance { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: CullInstance > for VisualInstance { } unsafe impl SubClass < crate :: generated :: Spatial > for VisualInstance { } unsafe impl SubClass < crate :: generated :: Node > for VisualInstance { } unsafe impl SubClass < crate :: generated :: Object > for VisualInstance { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualInstanceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_aabb : * mut sys :: godot_method_bind , pub get_base : * mut sys :: godot_method_bind , pub get_instance : * mut sys :: godot_method_bind , pub get_layer_mask : * mut sys :: godot_method_bind , pub get_layer_mask_bit : * mut sys :: godot_method_bind , pub get_transformed_aabb : * mut sys :: godot_method_bind , pub set_base : * mut sys :: godot_method_bind , pub set_layer_mask : * mut sys :: godot_method_bind , pub set_layer_mask_bit : * mut sys :: godot_method_bind } impl VisualInstanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualInstanceMethodTable = VisualInstanceMethodTable { class_constructor : None , get_aabb : 0 as * mut sys :: godot_method_bind , get_base : 0 as * mut sys :: godot_method_bind , get_instance : 0 as * mut sys :: godot_method_bind , get_layer_mask : 0 as * mut sys :: godot_method_bind , get_layer_mask_bit : 0 as * mut sys :: godot_method_bind , get_transformed_aabb : 0 as * mut sys :: godot_method_bind , set_base : 0 as * mut sys :: godot_method_bind , set_layer_mask : 0 as * mut sys :: godot_method_bind , set_layer_mask_bit : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualInstanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualInstance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_aabb\0" . as_ptr () as * const c_char) ; table . get_base = (gd_api . godot_method_bind_get_method) (class_name , "get_base\0" . as_ptr () as * const c_char) ; table . get_instance = (gd_api . godot_method_bind_get_method) (class_name , "get_instance\0" . as_ptr () as * const c_char) ; table . get_layer_mask = (gd_api . godot_method_bind_get_method) (class_name , "get_layer_mask\0" . as_ptr () as * const c_char) ; table . get_layer_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_layer_mask_bit\0" . as_ptr () as * const c_char) ; table . get_transformed_aabb = (gd_api . godot_method_bind_get_method) (class_name , "get_transformed_aabb\0" . as_ptr () as * const c_char) ; table . set_base = (gd_api . godot_method_bind_get_method) (class_name , "set_base\0" . as_ptr () as * const c_char) ; table . set_layer_mask = (gd_api . godot_method_bind_get_method) (class_name , "set_layer_mask\0" . as_ptr () as * const c_char) ; table . set_layer_mask_bit = (gd_api . godot_method_bind_get_method) (class_name , "set_layer_mask_bit\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_instance::private::VisualInstance;
            
            pub(crate) mod visual_script {
                # ! [doc = "This module contains types related to the API class [`VisualScript`][super::VisualScript]."] pub (crate) mod private { # [doc = "`core class VisualScript` inherits `Script` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscript.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScript inherits methods from:\n - [Script](struct.Script.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScript { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScript ; impl VisualScript { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_custom_signal (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . add_custom_signal ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_function (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . add_function ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_node (& self , func : impl Into < GodotString > , id : i64 , node : impl AsArg < crate :: generated :: VisualScriptNode > , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . add_node ; let ret = crate :: icalls :: icallvar__str_i64_obj_vec2 (method_bind , self . this . sys () . as_ptr () , func . into () , id as _ , node . as_arg_ptr () , position) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_variable (& self , name : impl Into < GodotString > , default_value : impl OwnedToVariant , export : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . add_variable ; let ret = crate :: icalls :: icallvar__str_var_bool (method_bind , self . this . sys () . as_ptr () , name . into () , default_value . owned_to_variant () , export as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_add_argument (& self , name : impl Into < GodotString > , type_ : i64 , argname : impl Into < GodotString > , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_add_argument ; let ret = crate :: icalls :: icallvar__str_i64_str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , type_ as _ , argname . into () , index as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_get_argument_count (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_get_argument_count ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_get_argument_name (& self , name : impl Into < GodotString > , argidx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_get_argument_name ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_get_argument_type (& self , name : impl Into < GodotString > , argidx : i64) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_get_argument_type ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx as _) ; VariantType :: from_sys (sys :: godot_variant_type :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_remove_argument (& self , name : impl Into < GodotString > , argidx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_remove_argument ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_set_argument_name (& self , name : impl Into < GodotString > , argidx : i64 , argname : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_set_argument_name ; let ret = crate :: icalls :: icallvar__str_i64_str (method_bind , self . this . sys () . as_ptr () , name . into () , argidx as _ , argname . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_set_argument_type (& self , name : impl Into < GodotString > , argidx : i64 , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_set_argument_type ; let ret = crate :: icalls :: icallvar__str_i64_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx as _ , type_ as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn custom_signal_swap_argument (& self , name : impl Into < GodotString > , argidx : i64 , withidx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . custom_signal_swap_argument ; let ret = crate :: icalls :: icallvar__str_i64_i64 (method_bind , self . this . sys () . as_ptr () , name . into () , argidx as _ , withidx as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn data_connect (& self , func : impl Into < GodotString > , from_node : i64 , from_port : i64 , to_node : i64 , to_port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . data_connect ; let ret = crate :: icalls :: icallvar__str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node as _ , from_port as _ , to_node as _ , to_port as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn data_disconnect (& self , func : impl Into < GodotString > , from_node : i64 , from_port : i64 , to_node : i64 , to_port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . data_disconnect ; let ret = crate :: icalls :: icallvar__str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node as _ , from_port as _ , to_node as _ , to_port as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_function_node_id (& self , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_function_node_id ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_function_scroll (& self , name : impl Into < GodotString >) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_function_scroll ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_node (& self , func : impl Into < GodotString > , id : i64) -> Option < Ref < crate :: generated :: VisualScriptNode , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_node ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id as _) ; < Option < Ref < crate :: generated :: VisualScriptNode , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_node_position (& self , func : impl Into < GodotString > , id : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_node_position ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_variable_default_value (& self , name : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_variable_default_value ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_variable_export (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_variable_export ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_variable_info (& self , name : impl Into < GodotString >) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . get_variable_info ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn has_custom_signal (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_custom_signal ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn has_data_connection (& self , func : impl Into < GodotString > , from_node : i64 , from_port : i64 , to_node : i64 , to_port : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_data_connection ; let ret = crate :: icalls :: icallvar__str_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node as _ , from_port as _ , to_node as _ , to_port as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn has_function (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_function ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn has_node (& self , func : impl Into < GodotString > , id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_node ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn has_sequence_connection (& self , func : impl Into < GodotString > , from_node : i64 , from_output : i64 , to_node : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_sequence_connection ; let ret = crate :: icalls :: icallvar__str_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node as _ , from_output as _ , to_node as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn has_variable (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . has_variable ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_custom_signal (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . remove_custom_signal ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_function (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . remove_function ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_node (& self , func : impl Into < GodotString > , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . remove_node ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , id as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_variable (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . remove_variable ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn rename_custom_signal (& self , name : impl Into < GodotString > , new_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . rename_custom_signal ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , new_name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn rename_function (& self , name : impl Into < GodotString > , new_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . rename_function ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , new_name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn rename_variable (& self , name : impl Into < GodotString > , new_name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . rename_variable ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , new_name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn sequence_connect (& self , func : impl Into < GodotString > , from_node : i64 , from_output : i64 , to_node : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . sequence_connect ; let ret = crate :: icalls :: icallvar__str_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node as _ , from_output as _ , to_node as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn sequence_disconnect (& self , func : impl Into < GodotString > , from_node : i64 , from_output : i64 , to_node : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . sequence_disconnect ; let ret = crate :: icalls :: icallvar__str_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , func . into () , from_node as _ , from_output as _ , to_node as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_function_scroll (& self , name : impl Into < GodotString > , ofs : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_function_scroll ; let ret = crate :: icalls :: icallvar__str_vec2 (method_bind , self . this . sys () . as_ptr () , name . into () , ofs) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_instance_base_type (& self , type_ : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_instance_base_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , type_ . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_node_position (& self , func : impl Into < GodotString > , id : i64 , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_node_position ; let ret = crate :: icalls :: icallvar__str_i64_vec2 (method_bind , self . this . sys () . as_ptr () , func . into () , id as _ , position) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_variable_default_value (& self , name : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_variable_default_value ; let ret = crate :: icalls :: icallvar__str_var (method_bind , self . this . sys () . as_ptr () , name . into () , value . owned_to_variant ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_variable_export (& self , name : impl Into < GodotString > , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_variable_export ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , name . into () , enable as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_variable_info (& self , name : impl Into < GodotString > , value : Dictionary) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMethodTable :: get (get_api ()) . set_variable_info ; let ret = crate :: icalls :: icallvar__str_dict (method_bind , self . this . sys () . as_ptr () , name . into () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScript { } unsafe impl GodotObject for VisualScript { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScript" } } impl std :: ops :: Deref for VisualScript { type Target = crate :: generated :: Script ; # [inline] fn deref (& self) -> & crate :: generated :: Script { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScript { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Script { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Script > for VisualScript { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScript { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScript { } unsafe impl SubClass < crate :: generated :: Object > for VisualScript { } impl Instanciable for VisualScript { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScript :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_custom_signal : * mut sys :: godot_method_bind , pub add_function : * mut sys :: godot_method_bind , pub add_node : * mut sys :: godot_method_bind , pub add_variable : * mut sys :: godot_method_bind , pub custom_signal_add_argument : * mut sys :: godot_method_bind , pub custom_signal_get_argument_count : * mut sys :: godot_method_bind , pub custom_signal_get_argument_name : * mut sys :: godot_method_bind , pub custom_signal_get_argument_type : * mut sys :: godot_method_bind , pub custom_signal_remove_argument : * mut sys :: godot_method_bind , pub custom_signal_set_argument_name : * mut sys :: godot_method_bind , pub custom_signal_set_argument_type : * mut sys :: godot_method_bind , pub custom_signal_swap_argument : * mut sys :: godot_method_bind , pub data_connect : * mut sys :: godot_method_bind , pub data_disconnect : * mut sys :: godot_method_bind , pub get_function_node_id : * mut sys :: godot_method_bind , pub get_function_scroll : * mut sys :: godot_method_bind , pub get_node : * mut sys :: godot_method_bind , pub get_node_position : * mut sys :: godot_method_bind , pub get_variable_default_value : * mut sys :: godot_method_bind , pub get_variable_export : * mut sys :: godot_method_bind , pub get_variable_info : * mut sys :: godot_method_bind , pub has_custom_signal : * mut sys :: godot_method_bind , pub has_data_connection : * mut sys :: godot_method_bind , pub has_function : * mut sys :: godot_method_bind , pub has_node : * mut sys :: godot_method_bind , pub has_sequence_connection : * mut sys :: godot_method_bind , pub has_variable : * mut sys :: godot_method_bind , pub remove_custom_signal : * mut sys :: godot_method_bind , pub remove_function : * mut sys :: godot_method_bind , pub remove_node : * mut sys :: godot_method_bind , pub remove_variable : * mut sys :: godot_method_bind , pub rename_custom_signal : * mut sys :: godot_method_bind , pub rename_function : * mut sys :: godot_method_bind , pub rename_variable : * mut sys :: godot_method_bind , pub sequence_connect : * mut sys :: godot_method_bind , pub sequence_disconnect : * mut sys :: godot_method_bind , pub set_function_scroll : * mut sys :: godot_method_bind , pub set_instance_base_type : * mut sys :: godot_method_bind , pub set_node_position : * mut sys :: godot_method_bind , pub set_variable_default_value : * mut sys :: godot_method_bind , pub set_variable_export : * mut sys :: godot_method_bind , pub set_variable_info : * mut sys :: godot_method_bind } impl VisualScriptMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptMethodTable = VisualScriptMethodTable { class_constructor : None , add_custom_signal : 0 as * mut sys :: godot_method_bind , add_function : 0 as * mut sys :: godot_method_bind , add_node : 0 as * mut sys :: godot_method_bind , add_variable : 0 as * mut sys :: godot_method_bind , custom_signal_add_argument : 0 as * mut sys :: godot_method_bind , custom_signal_get_argument_count : 0 as * mut sys :: godot_method_bind , custom_signal_get_argument_name : 0 as * mut sys :: godot_method_bind , custom_signal_get_argument_type : 0 as * mut sys :: godot_method_bind , custom_signal_remove_argument : 0 as * mut sys :: godot_method_bind , custom_signal_set_argument_name : 0 as * mut sys :: godot_method_bind , custom_signal_set_argument_type : 0 as * mut sys :: godot_method_bind , custom_signal_swap_argument : 0 as * mut sys :: godot_method_bind , data_connect : 0 as * mut sys :: godot_method_bind , data_disconnect : 0 as * mut sys :: godot_method_bind , get_function_node_id : 0 as * mut sys :: godot_method_bind , get_function_scroll : 0 as * mut sys :: godot_method_bind , get_node : 0 as * mut sys :: godot_method_bind , get_node_position : 0 as * mut sys :: godot_method_bind , get_variable_default_value : 0 as * mut sys :: godot_method_bind , get_variable_export : 0 as * mut sys :: godot_method_bind , get_variable_info : 0 as * mut sys :: godot_method_bind , has_custom_signal : 0 as * mut sys :: godot_method_bind , has_data_connection : 0 as * mut sys :: godot_method_bind , has_function : 0 as * mut sys :: godot_method_bind , has_node : 0 as * mut sys :: godot_method_bind , has_sequence_connection : 0 as * mut sys :: godot_method_bind , has_variable : 0 as * mut sys :: godot_method_bind , remove_custom_signal : 0 as * mut sys :: godot_method_bind , remove_function : 0 as * mut sys :: godot_method_bind , remove_node : 0 as * mut sys :: godot_method_bind , remove_variable : 0 as * mut sys :: godot_method_bind , rename_custom_signal : 0 as * mut sys :: godot_method_bind , rename_function : 0 as * mut sys :: godot_method_bind , rename_variable : 0 as * mut sys :: godot_method_bind , sequence_connect : 0 as * mut sys :: godot_method_bind , sequence_disconnect : 0 as * mut sys :: godot_method_bind , set_function_scroll : 0 as * mut sys :: godot_method_bind , set_instance_base_type : 0 as * mut sys :: godot_method_bind , set_node_position : 0 as * mut sys :: godot_method_bind , set_variable_default_value : 0 as * mut sys :: godot_method_bind , set_variable_export : 0 as * mut sys :: godot_method_bind , set_variable_info : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScript\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "add_custom_signal\0" . as_ptr () as * const c_char) ; table . add_function = (gd_api . godot_method_bind_get_method) (class_name , "add_function\0" . as_ptr () as * const c_char) ; table . add_node = (gd_api . godot_method_bind_get_method) (class_name , "add_node\0" . as_ptr () as * const c_char) ; table . add_variable = (gd_api . godot_method_bind_get_method) (class_name , "add_variable\0" . as_ptr () as * const c_char) ; table . custom_signal_add_argument = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_add_argument\0" . as_ptr () as * const c_char) ; table . custom_signal_get_argument_count = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_get_argument_count\0" . as_ptr () as * const c_char) ; table . custom_signal_get_argument_name = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_get_argument_name\0" . as_ptr () as * const c_char) ; table . custom_signal_get_argument_type = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_get_argument_type\0" . as_ptr () as * const c_char) ; table . custom_signal_remove_argument = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_remove_argument\0" . as_ptr () as * const c_char) ; table . custom_signal_set_argument_name = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_set_argument_name\0" . as_ptr () as * const c_char) ; table . custom_signal_set_argument_type = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_set_argument_type\0" . as_ptr () as * const c_char) ; table . custom_signal_swap_argument = (gd_api . godot_method_bind_get_method) (class_name , "custom_signal_swap_argument\0" . as_ptr () as * const c_char) ; table . data_connect = (gd_api . godot_method_bind_get_method) (class_name , "data_connect\0" . as_ptr () as * const c_char) ; table . data_disconnect = (gd_api . godot_method_bind_get_method) (class_name , "data_disconnect\0" . as_ptr () as * const c_char) ; table . get_function_node_id = (gd_api . godot_method_bind_get_method) (class_name , "get_function_node_id\0" . as_ptr () as * const c_char) ; table . get_function_scroll = (gd_api . godot_method_bind_get_method) (class_name , "get_function_scroll\0" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\0" . as_ptr () as * const c_char) ; table . get_node_position = (gd_api . godot_method_bind_get_method) (class_name , "get_node_position\0" . as_ptr () as * const c_char) ; table . get_variable_default_value = (gd_api . godot_method_bind_get_method) (class_name , "get_variable_default_value\0" . as_ptr () as * const c_char) ; table . get_variable_export = (gd_api . godot_method_bind_get_method) (class_name , "get_variable_export\0" . as_ptr () as * const c_char) ; table . get_variable_info = (gd_api . godot_method_bind_get_method) (class_name , "get_variable_info\0" . as_ptr () as * const c_char) ; table . has_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "has_custom_signal\0" . as_ptr () as * const c_char) ; table . has_data_connection = (gd_api . godot_method_bind_get_method) (class_name , "has_data_connection\0" . as_ptr () as * const c_char) ; table . has_function = (gd_api . godot_method_bind_get_method) (class_name , "has_function\0" . as_ptr () as * const c_char) ; table . has_node = (gd_api . godot_method_bind_get_method) (class_name , "has_node\0" . as_ptr () as * const c_char) ; table . has_sequence_connection = (gd_api . godot_method_bind_get_method) (class_name , "has_sequence_connection\0" . as_ptr () as * const c_char) ; table . has_variable = (gd_api . godot_method_bind_get_method) (class_name , "has_variable\0" . as_ptr () as * const c_char) ; table . remove_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "remove_custom_signal\0" . as_ptr () as * const c_char) ; table . remove_function = (gd_api . godot_method_bind_get_method) (class_name , "remove_function\0" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\0" . as_ptr () as * const c_char) ; table . remove_variable = (gd_api . godot_method_bind_get_method) (class_name , "remove_variable\0" . as_ptr () as * const c_char) ; table . rename_custom_signal = (gd_api . godot_method_bind_get_method) (class_name , "rename_custom_signal\0" . as_ptr () as * const c_char) ; table . rename_function = (gd_api . godot_method_bind_get_method) (class_name , "rename_function\0" . as_ptr () as * const c_char) ; table . rename_variable = (gd_api . godot_method_bind_get_method) (class_name , "rename_variable\0" . as_ptr () as * const c_char) ; table . sequence_connect = (gd_api . godot_method_bind_get_method) (class_name , "sequence_connect\0" . as_ptr () as * const c_char) ; table . sequence_disconnect = (gd_api . godot_method_bind_get_method) (class_name , "sequence_disconnect\0" . as_ptr () as * const c_char) ; table . set_function_scroll = (gd_api . godot_method_bind_get_method) (class_name , "set_function_scroll\0" . as_ptr () as * const c_char) ; table . set_instance_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_instance_base_type\0" . as_ptr () as * const c_char) ; table . set_node_position = (gd_api . godot_method_bind_get_method) (class_name , "set_node_position\0" . as_ptr () as * const c_char) ; table . set_variable_default_value = (gd_api . godot_method_bind_get_method) (class_name , "set_variable_default_value\0" . as_ptr () as * const c_char) ; table . set_variable_export = (gd_api . godot_method_bind_get_method) (class_name , "set_variable_export\0" . as_ptr () as * const c_char) ; table . set_variable_info = (gd_api . godot_method_bind_get_method) (class_name , "set_variable_info\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script::private::VisualScript;
            
            pub(crate) mod visual_script_basic_type_constant {
                # ! [doc = "This module contains types related to the API class [`VisualScriptBasicTypeConstant`][super::VisualScriptBasicTypeConstant]."] pub (crate) mod private { # [doc = "`core class VisualScriptBasicTypeConstant` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptbasictypeconstant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptBasicTypeConstant inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptBasicTypeConstant { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptBasicTypeConstant ; impl VisualScriptBasicTypeConstant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptBasicTypeConstantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn basic_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptBasicTypeConstantMethodTable :: get (get_api ()) . get_basic_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (sys :: godot_variant_type :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn basic_type_constant (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptBasicTypeConstantMethodTable :: get (get_api ()) . get_basic_type_constant ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_basic_type (& self , name : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptBasicTypeConstantMethodTable :: get (get_api ()) . set_basic_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , name as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_basic_type_constant (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptBasicTypeConstantMethodTable :: get (get_api ()) . set_basic_type_constant ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptBasicTypeConstant { } unsafe impl GodotObject for VisualScriptBasicTypeConstant { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptBasicTypeConstant" } } impl std :: ops :: Deref for VisualScriptBasicTypeConstant { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptBasicTypeConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptBasicTypeConstant { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptBasicTypeConstant { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptBasicTypeConstant { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptBasicTypeConstant { } impl Instanciable for VisualScriptBasicTypeConstant { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptBasicTypeConstant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptBasicTypeConstantMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_basic_type : * mut sys :: godot_method_bind , pub get_basic_type_constant : * mut sys :: godot_method_bind , pub set_basic_type : * mut sys :: godot_method_bind , pub set_basic_type_constant : * mut sys :: godot_method_bind } impl VisualScriptBasicTypeConstantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptBasicTypeConstantMethodTable = VisualScriptBasicTypeConstantMethodTable { class_constructor : None , get_basic_type : 0 as * mut sys :: godot_method_bind , get_basic_type_constant : 0 as * mut sys :: godot_method_bind , set_basic_type : 0 as * mut sys :: godot_method_bind , set_basic_type_constant : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptBasicTypeConstantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptBasicTypeConstant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "get_basic_type\0" . as_ptr () as * const c_char) ; table . get_basic_type_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_basic_type_constant\0" . as_ptr () as * const c_char) ; table . set_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "set_basic_type\0" . as_ptr () as * const c_char) ; table . set_basic_type_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_basic_type_constant\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_basic_type_constant::private::VisualScriptBasicTypeConstant;
            
            pub mod visual_script_builtin_func {
                # ! [doc = "This module contains types related to the API class [`VisualScriptBuiltinFunc`][super::VisualScriptBuiltinFunc]."] pub (crate) mod private { # [doc = "`core class VisualScriptBuiltinFunc` inherits `VisualScriptNode` (reference-counted).\n\nThis class has related types in the [`visual_script_builtin_func`][super::visual_script_builtin_func] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptbuiltinfunc.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptBuiltinFunc inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptBuiltinFunc { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptBuiltinFunc ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BuiltinFunc (pub i64) ; impl BuiltinFunc { pub const MATH_SIN : BuiltinFunc = BuiltinFunc (0i64) ; pub const MATH_COS : BuiltinFunc = BuiltinFunc (1i64) ; pub const MATH_TAN : BuiltinFunc = BuiltinFunc (2i64) ; pub const MATH_SINH : BuiltinFunc = BuiltinFunc (3i64) ; pub const MATH_COSH : BuiltinFunc = BuiltinFunc (4i64) ; pub const MATH_TANH : BuiltinFunc = BuiltinFunc (5i64) ; pub const MATH_ASIN : BuiltinFunc = BuiltinFunc (6i64) ; pub const MATH_ACOS : BuiltinFunc = BuiltinFunc (7i64) ; pub const MATH_ATAN : BuiltinFunc = BuiltinFunc (8i64) ; pub const MATH_ATAN2 : BuiltinFunc = BuiltinFunc (9i64) ; pub const MATH_SQRT : BuiltinFunc = BuiltinFunc (10i64) ; pub const MATH_FMOD : BuiltinFunc = BuiltinFunc (11i64) ; pub const MATH_FPOSMOD : BuiltinFunc = BuiltinFunc (12i64) ; pub const MATH_FLOOR : BuiltinFunc = BuiltinFunc (13i64) ; pub const MATH_CEIL : BuiltinFunc = BuiltinFunc (14i64) ; pub const MATH_ROUND : BuiltinFunc = BuiltinFunc (15i64) ; pub const MATH_ABS : BuiltinFunc = BuiltinFunc (16i64) ; pub const MATH_SIGN : BuiltinFunc = BuiltinFunc (17i64) ; pub const MATH_POW : BuiltinFunc = BuiltinFunc (18i64) ; pub const MATH_LOG : BuiltinFunc = BuiltinFunc (19i64) ; pub const MATH_EXP : BuiltinFunc = BuiltinFunc (20i64) ; pub const MATH_ISNAN : BuiltinFunc = BuiltinFunc (21i64) ; pub const MATH_ISINF : BuiltinFunc = BuiltinFunc (22i64) ; pub const MATH_EASE : BuiltinFunc = BuiltinFunc (23i64) ; pub const MATH_DECIMALS : BuiltinFunc = BuiltinFunc (24i64) ; pub const MATH_STEPIFY : BuiltinFunc = BuiltinFunc (25i64) ; pub const MATH_LERP : BuiltinFunc = BuiltinFunc (26i64) ; pub const MATH_INVERSE_LERP : BuiltinFunc = BuiltinFunc (27i64) ; pub const MATH_RANGE_LERP : BuiltinFunc = BuiltinFunc (28i64) ; pub const MATH_MOVE_TOWARD : BuiltinFunc = BuiltinFunc (29i64) ; pub const MATH_DECTIME : BuiltinFunc = BuiltinFunc (30i64) ; pub const MATH_RANDOMIZE : BuiltinFunc = BuiltinFunc (31i64) ; pub const MATH_RAND : BuiltinFunc = BuiltinFunc (32i64) ; pub const MATH_RANDF : BuiltinFunc = BuiltinFunc (33i64) ; pub const MATH_RANDOM : BuiltinFunc = BuiltinFunc (34i64) ; pub const MATH_SEED : BuiltinFunc = BuiltinFunc (35i64) ; pub const MATH_RANDSEED : BuiltinFunc = BuiltinFunc (36i64) ; pub const MATH_DEG2RAD : BuiltinFunc = BuiltinFunc (37i64) ; pub const MATH_RAD2DEG : BuiltinFunc = BuiltinFunc (38i64) ; pub const MATH_LINEAR2DB : BuiltinFunc = BuiltinFunc (39i64) ; pub const MATH_DB2LINEAR : BuiltinFunc = BuiltinFunc (40i64) ; pub const MATH_POLAR2CARTESIAN : BuiltinFunc = BuiltinFunc (41i64) ; pub const MATH_CARTESIAN2POLAR : BuiltinFunc = BuiltinFunc (42i64) ; pub const MATH_WRAP : BuiltinFunc = BuiltinFunc (43i64) ; pub const MATH_WRAPF : BuiltinFunc = BuiltinFunc (44i64) ; pub const LOGIC_MAX : BuiltinFunc = BuiltinFunc (45i64) ; pub const LOGIC_MIN : BuiltinFunc = BuiltinFunc (46i64) ; pub const LOGIC_CLAMP : BuiltinFunc = BuiltinFunc (47i64) ; pub const LOGIC_NEAREST_PO2 : BuiltinFunc = BuiltinFunc (48i64) ; pub const OBJ_WEAKREF : BuiltinFunc = BuiltinFunc (49i64) ; pub const FUNC_FUNCREF : BuiltinFunc = BuiltinFunc (50i64) ; pub const TYPE_CONVERT : BuiltinFunc = BuiltinFunc (51i64) ; pub const TYPE_OF : BuiltinFunc = BuiltinFunc (52i64) ; pub const TYPE_EXISTS : BuiltinFunc = BuiltinFunc (53i64) ; pub const TEXT_CHAR : BuiltinFunc = BuiltinFunc (54i64) ; pub const TEXT_STR : BuiltinFunc = BuiltinFunc (55i64) ; pub const TEXT_PRINT : BuiltinFunc = BuiltinFunc (56i64) ; pub const TEXT_PRINTERR : BuiltinFunc = BuiltinFunc (57i64) ; pub const TEXT_PRINTRAW : BuiltinFunc = BuiltinFunc (58i64) ; pub const VAR_TO_STR : BuiltinFunc = BuiltinFunc (59i64) ; pub const STR_TO_VAR : BuiltinFunc = BuiltinFunc (60i64) ; pub const VAR_TO_BYTES : BuiltinFunc = BuiltinFunc (61i64) ; pub const BYTES_TO_VAR : BuiltinFunc = BuiltinFunc (62i64) ; pub const COLORN : BuiltinFunc = BuiltinFunc (63i64) ; pub const MATH_SMOOTHSTEP : BuiltinFunc = BuiltinFunc (64i64) ; pub const MATH_POSMOD : BuiltinFunc = BuiltinFunc (65i64) ; pub const MATH_LERP_ANGLE : BuiltinFunc = BuiltinFunc (66i64) ; pub const TEXT_ORD : BuiltinFunc = BuiltinFunc (67i64) ; pub const FUNC_MAX : BuiltinFunc = BuiltinFunc (68i64) ; } impl From < i64 > for BuiltinFunc { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BuiltinFunc > for i64 { # [inline] fn from (v : BuiltinFunc) -> Self { v . 0 } } impl FromVariant for BuiltinFunc { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptBuiltinFunc { pub const MATH_SIN : i64 = 0i64 ; pub const MATH_COS : i64 = 1i64 ; pub const MATH_TAN : i64 = 2i64 ; pub const MATH_SINH : i64 = 3i64 ; pub const MATH_COSH : i64 = 4i64 ; pub const MATH_TANH : i64 = 5i64 ; pub const MATH_ASIN : i64 = 6i64 ; pub const MATH_ACOS : i64 = 7i64 ; pub const MATH_ATAN : i64 = 8i64 ; pub const MATH_ATAN2 : i64 = 9i64 ; pub const MATH_SQRT : i64 = 10i64 ; pub const MATH_FMOD : i64 = 11i64 ; pub const MATH_FPOSMOD : i64 = 12i64 ; pub const MATH_FLOOR : i64 = 13i64 ; pub const MATH_CEIL : i64 = 14i64 ; pub const MATH_ROUND : i64 = 15i64 ; pub const MATH_ABS : i64 = 16i64 ; pub const MATH_SIGN : i64 = 17i64 ; pub const MATH_POW : i64 = 18i64 ; pub const MATH_LOG : i64 = 19i64 ; pub const MATH_EXP : i64 = 20i64 ; pub const MATH_ISNAN : i64 = 21i64 ; pub const MATH_ISINF : i64 = 22i64 ; pub const MATH_EASE : i64 = 23i64 ; pub const MATH_DECIMALS : i64 = 24i64 ; pub const MATH_STEPIFY : i64 = 25i64 ; pub const MATH_LERP : i64 = 26i64 ; pub const MATH_INVERSE_LERP : i64 = 27i64 ; pub const MATH_RANGE_LERP : i64 = 28i64 ; pub const MATH_MOVE_TOWARD : i64 = 29i64 ; pub const MATH_DECTIME : i64 = 30i64 ; pub const MATH_RANDOMIZE : i64 = 31i64 ; pub const MATH_RAND : i64 = 32i64 ; pub const MATH_RANDF : i64 = 33i64 ; pub const MATH_RANDOM : i64 = 34i64 ; pub const MATH_SEED : i64 = 35i64 ; pub const MATH_RANDSEED : i64 = 36i64 ; pub const MATH_DEG2RAD : i64 = 37i64 ; pub const MATH_RAD2DEG : i64 = 38i64 ; pub const MATH_LINEAR2DB : i64 = 39i64 ; pub const MATH_DB2LINEAR : i64 = 40i64 ; pub const MATH_POLAR2CARTESIAN : i64 = 41i64 ; pub const MATH_CARTESIAN2POLAR : i64 = 42i64 ; pub const MATH_WRAP : i64 = 43i64 ; pub const MATH_WRAPF : i64 = 44i64 ; pub const LOGIC_MAX : i64 = 45i64 ; pub const LOGIC_MIN : i64 = 46i64 ; pub const LOGIC_CLAMP : i64 = 47i64 ; pub const LOGIC_NEAREST_PO2 : i64 = 48i64 ; pub const OBJ_WEAKREF : i64 = 49i64 ; pub const FUNC_FUNCREF : i64 = 50i64 ; pub const TYPE_CONVERT : i64 = 51i64 ; pub const TYPE_OF : i64 = 52i64 ; pub const TYPE_EXISTS : i64 = 53i64 ; pub const TEXT_CHAR : i64 = 54i64 ; pub const TEXT_STR : i64 = 55i64 ; pub const TEXT_PRINT : i64 = 56i64 ; pub const TEXT_PRINTERR : i64 = 57i64 ; pub const TEXT_PRINTRAW : i64 = 58i64 ; pub const VAR_TO_STR : i64 = 59i64 ; pub const STR_TO_VAR : i64 = 60i64 ; pub const VAR_TO_BYTES : i64 = 61i64 ; pub const BYTES_TO_VAR : i64 = 62i64 ; pub const COLORN : i64 = 63i64 ; pub const MATH_SMOOTHSTEP : i64 = 64i64 ; pub const MATH_POSMOD : i64 = 65i64 ; pub const MATH_LERP_ANGLE : i64 = 66i64 ; pub const TEXT_ORD : i64 = 67i64 ; pub const FUNC_MAX : i64 = 68i64 ; } impl VisualScriptBuiltinFunc { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptBuiltinFuncMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn func (& self) -> crate :: generated :: visual_script_builtin_func :: BuiltinFunc { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptBuiltinFuncMethodTable :: get (get_api ()) . get_func ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_script_builtin_func :: BuiltinFunc > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_func (& self , which : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptBuiltinFuncMethodTable :: get (get_api ()) . set_func ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , which as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptBuiltinFunc { } unsafe impl GodotObject for VisualScriptBuiltinFunc { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptBuiltinFunc" } } impl std :: ops :: Deref for VisualScriptBuiltinFunc { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptBuiltinFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptBuiltinFunc { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptBuiltinFunc { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptBuiltinFunc { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptBuiltinFunc { } impl Instanciable for VisualScriptBuiltinFunc { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptBuiltinFunc :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptBuiltinFuncMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_func : * mut sys :: godot_method_bind , pub set_func : * mut sys :: godot_method_bind } impl VisualScriptBuiltinFuncMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptBuiltinFuncMethodTable = VisualScriptBuiltinFuncMethodTable { class_constructor : None , get_func : 0 as * mut sys :: godot_method_bind , set_func : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptBuiltinFuncMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptBuiltinFunc\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_func = (gd_api . godot_method_bind_get_method) (class_name , "get_func\0" . as_ptr () as * const c_char) ; table . set_func = (gd_api . godot_method_bind_get_method) (class_name , "set_func\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_builtin_func::private::VisualScriptBuiltinFunc;
            
            pub(crate) mod visual_script_class_constant {
                # ! [doc = "This module contains types related to the API class [`VisualScriptClassConstant`][super::VisualScriptClassConstant]."] pub (crate) mod private { # [doc = "`core class VisualScriptClassConstant` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptclassconstant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptClassConstant inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptClassConstant { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptClassConstant ; impl VisualScriptClassConstant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptClassConstantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn base_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptClassConstantMethodTable :: get (get_api ()) . get_base_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn class_constant (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptClassConstantMethodTable :: get (get_api ()) . get_class_constant ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_type (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptClassConstantMethodTable :: get (get_api ()) . set_base_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_class_constant (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptClassConstantMethodTable :: get (get_api ()) . set_class_constant ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptClassConstant { } unsafe impl GodotObject for VisualScriptClassConstant { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptClassConstant" } } impl std :: ops :: Deref for VisualScriptClassConstant { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptClassConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptClassConstant { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptClassConstant { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptClassConstant { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptClassConstant { } impl Instanciable for VisualScriptClassConstant { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptClassConstant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptClassConstantMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_base_type : * mut sys :: godot_method_bind , pub get_class_constant : * mut sys :: godot_method_bind , pub set_base_type : * mut sys :: godot_method_bind , pub set_class_constant : * mut sys :: godot_method_bind } impl VisualScriptClassConstantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptClassConstantMethodTable = VisualScriptClassConstantMethodTable { class_constructor : None , get_base_type : 0 as * mut sys :: godot_method_bind , get_class_constant : 0 as * mut sys :: godot_method_bind , set_base_type : 0 as * mut sys :: godot_method_bind , set_class_constant : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptClassConstantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptClassConstant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\0" . as_ptr () as * const c_char) ; table . get_class_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_class_constant\0" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\0" . as_ptr () as * const c_char) ; table . set_class_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_class_constant\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_class_constant::private::VisualScriptClassConstant;
            
            pub(crate) mod visual_script_comment {
                # ! [doc = "This module contains types related to the API class [`VisualScriptComment`][super::VisualScriptComment]."] pub (crate) mod private { # [doc = "`core class VisualScriptComment` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptcomment.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptComment inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptComment { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptComment ; impl VisualScriptComment { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptCommentMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn description (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptCommentMethodTable :: get (get_api ()) . get_description ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptCommentMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn title (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptCommentMethodTable :: get (get_api ()) . get_title ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_description (& self , description : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptCommentMethodTable :: get (get_api ()) . set_description ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , description . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptCommentMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_title (& self , title : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptCommentMethodTable :: get (get_api ()) . set_title ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , title . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptComment { } unsafe impl GodotObject for VisualScriptComment { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptComment" } } impl std :: ops :: Deref for VisualScriptComment { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptComment { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptComment { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptComment { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptComment { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptComment { } impl Instanciable for VisualScriptComment { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptComment :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptCommentMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_description : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub get_title : * mut sys :: godot_method_bind , pub set_description : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind , pub set_title : * mut sys :: godot_method_bind } impl VisualScriptCommentMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptCommentMethodTable = VisualScriptCommentMethodTable { class_constructor : None , get_description : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , get_title : 0 as * mut sys :: godot_method_bind , set_description : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind , set_title : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptCommentMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptComment\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_description = (gd_api . godot_method_bind_get_method) (class_name , "get_description\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . get_title = (gd_api . godot_method_bind_get_method) (class_name , "get_title\0" . as_ptr () as * const c_char) ; table . set_description = (gd_api . godot_method_bind_get_method) (class_name , "set_description\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; table . set_title = (gd_api . godot_method_bind_get_method) (class_name , "set_title\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_comment::private::VisualScriptComment;
            
            pub(crate) mod visual_script_compose_array {
                # ! [doc = "This module contains types related to the API class [`VisualScriptComposeArray`][super::VisualScriptComposeArray]."] pub (crate) mod private { # [doc = "`core class VisualScriptComposeArray` inherits `VisualScriptLists` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptcomposearray.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptComposeArray inherits methods from:\n - [VisualScriptLists](struct.VisualScriptLists.html)\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptComposeArray { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptComposeArray ; impl VisualScriptComposeArray { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptComposeArrayMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptComposeArray { } unsafe impl GodotObject for VisualScriptComposeArray { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptComposeArray" } } impl std :: ops :: Deref for VisualScriptComposeArray { type Target = crate :: generated :: VisualScriptLists ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptLists { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptComposeArray { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptLists { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptLists > for VisualScriptComposeArray { } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptComposeArray { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptComposeArray { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptComposeArray { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptComposeArray { } impl Instanciable for VisualScriptComposeArray { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptComposeArray :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptComposeArrayMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptComposeArrayMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptComposeArrayMethodTable = VisualScriptComposeArrayMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptComposeArrayMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptComposeArray\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_compose_array::private::VisualScriptComposeArray;
            
            pub(crate) mod visual_script_condition {
                # ! [doc = "This module contains types related to the API class [`VisualScriptCondition`][super::VisualScriptCondition]."] pub (crate) mod private { # [doc = "`core class VisualScriptCondition` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptcondition.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptCondition inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptCondition { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptCondition ; impl VisualScriptCondition { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptConditionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptCondition { } unsafe impl GodotObject for VisualScriptCondition { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptCondition" } } impl std :: ops :: Deref for VisualScriptCondition { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptCondition { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptCondition { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptCondition { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptCondition { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptCondition { } impl Instanciable for VisualScriptCondition { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptCondition :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptConditionMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptConditionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptConditionMethodTable = VisualScriptConditionMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptConditionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptCondition\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_condition::private::VisualScriptCondition;
            
            pub(crate) mod visual_script_constant {
                # ! [doc = "This module contains types related to the API class [`VisualScriptConstant`][super::VisualScriptConstant]."] pub (crate) mod private { # [doc = "`core class VisualScriptConstant` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptconstant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptConstant inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptConstant { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptConstant ; impl VisualScriptConstant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptConstantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn constant_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptConstantMethodTable :: get (get_api ()) . get_constant_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (sys :: godot_variant_type :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn constant_value (& self) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptConstantMethodTable :: get (get_api ()) . get_constant_value ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_constant_type (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptConstantMethodTable :: get (get_api ()) . set_constant_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_constant_value (& self , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptConstantMethodTable :: get (get_api ()) . set_constant_value ; let ret = crate :: icalls :: icallvar__var (method_bind , self . this . sys () . as_ptr () , value . owned_to_variant ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptConstant { } unsafe impl GodotObject for VisualScriptConstant { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptConstant" } } impl std :: ops :: Deref for VisualScriptConstant { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptConstant { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptConstant { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptConstant { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptConstant { } impl Instanciable for VisualScriptConstant { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptConstant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptConstantMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_constant_type : * mut sys :: godot_method_bind , pub get_constant_value : * mut sys :: godot_method_bind , pub set_constant_type : * mut sys :: godot_method_bind , pub set_constant_value : * mut sys :: godot_method_bind } impl VisualScriptConstantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptConstantMethodTable = VisualScriptConstantMethodTable { class_constructor : None , get_constant_type : 0 as * mut sys :: godot_method_bind , get_constant_value : 0 as * mut sys :: godot_method_bind , set_constant_type : 0 as * mut sys :: godot_method_bind , set_constant_value : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptConstantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptConstant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_constant_type = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_type\0" . as_ptr () as * const c_char) ; table . get_constant_value = (gd_api . godot_method_bind_get_method) (class_name , "get_constant_value\0" . as_ptr () as * const c_char) ; table . set_constant_type = (gd_api . godot_method_bind_get_method) (class_name , "set_constant_type\0" . as_ptr () as * const c_char) ; table . set_constant_value = (gd_api . godot_method_bind_get_method) (class_name , "set_constant_value\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_constant::private::VisualScriptConstant;
            
            pub(crate) mod visual_script_constructor {
                # ! [doc = "This module contains types related to the API class [`VisualScriptConstructor`][super::VisualScriptConstructor]."] pub (crate) mod private { # [doc = "`core class VisualScriptConstructor` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptconstructor.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptConstructor inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptConstructor { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptConstructor ; impl VisualScriptConstructor { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptConstructorMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn constructor (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptConstructorMethodTable :: get (get_api ()) . get_constructor ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn constructor_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptConstructorMethodTable :: get (get_api ()) . get_constructor_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (sys :: godot_variant_type :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_constructor (& self , constructor : Dictionary) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptConstructorMethodTable :: get (get_api ()) . set_constructor ; let ret = crate :: icalls :: icallvar__dict (method_bind , self . this . sys () . as_ptr () , constructor) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_constructor_type (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptConstructorMethodTable :: get (get_api ()) . set_constructor_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptConstructor { } unsafe impl GodotObject for VisualScriptConstructor { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptConstructor" } } impl std :: ops :: Deref for VisualScriptConstructor { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptConstructor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptConstructor { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptConstructor { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptConstructor { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptConstructor { } impl Instanciable for VisualScriptConstructor { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptConstructor :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptConstructorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_constructor : * mut sys :: godot_method_bind , pub get_constructor_type : * mut sys :: godot_method_bind , pub set_constructor : * mut sys :: godot_method_bind , pub set_constructor_type : * mut sys :: godot_method_bind } impl VisualScriptConstructorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptConstructorMethodTable = VisualScriptConstructorMethodTable { class_constructor : None , get_constructor : 0 as * mut sys :: godot_method_bind , get_constructor_type : 0 as * mut sys :: godot_method_bind , set_constructor : 0 as * mut sys :: godot_method_bind , set_constructor_type : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptConstructorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptConstructor\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_constructor = (gd_api . godot_method_bind_get_method) (class_name , "get_constructor\0" . as_ptr () as * const c_char) ; table . get_constructor_type = (gd_api . godot_method_bind_get_method) (class_name , "get_constructor_type\0" . as_ptr () as * const c_char) ; table . set_constructor = (gd_api . godot_method_bind_get_method) (class_name , "set_constructor\0" . as_ptr () as * const c_char) ; table . set_constructor_type = (gd_api . godot_method_bind_get_method) (class_name , "set_constructor_type\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_constructor::private::VisualScriptConstructor;
            
            pub mod visual_script_custom_node {
                # ! [doc = "This module contains types related to the API class [`VisualScriptCustomNode`][super::VisualScriptCustomNode]."] pub (crate) mod private { # [doc = "`core class VisualScriptCustomNode` inherits `VisualScriptNode` (reference-counted).\n\nThis class has related types in the [`visual_script_custom_node`][super::visual_script_custom_node] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptcustomnode.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptCustomNode inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptCustomNode { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptCustomNode ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct StartMode (pub i64) ; impl StartMode { pub const BEGIN_SEQUENCE : StartMode = StartMode (0i64) ; pub const CONTINUE_SEQUENCE : StartMode = StartMode (1i64) ; pub const RESUME_YIELD : StartMode = StartMode (2i64) ; } impl From < i64 > for StartMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < StartMode > for i64 { # [inline] fn from (v : StartMode) -> Self { v . 0 } } impl FromVariant for StartMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptCustomNode { pub const START_MODE_BEGIN_SEQUENCE : i64 = 0i64 ; pub const START_MODE_CONTINUE_SEQUENCE : i64 = 1i64 ; pub const START_MODE_RESUME_YIELD : i64 = 2i64 ; pub const STEP_PUSH_STACK_BIT : i64 = 16777216i64 ; pub const STEP_GO_BACK_BIT : i64 = 33554432i64 ; pub const STEP_NO_ADVANCE_BIT : i64 = 67108864i64 ; pub const STEP_EXIT_FUNCTION_BIT : i64 = 134217728i64 ; pub const STEP_YIELD_BIT : i64 = 268435456i64 ; } impl VisualScriptCustomNode { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptCustomNodeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptCustomNode { } unsafe impl GodotObject for VisualScriptCustomNode { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptCustomNode" } } impl std :: ops :: Deref for VisualScriptCustomNode { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptCustomNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptCustomNode { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptCustomNode { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptCustomNode { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptCustomNode { } impl Instanciable for VisualScriptCustomNode { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptCustomNode :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptCustomNodeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptCustomNodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptCustomNodeMethodTable = VisualScriptCustomNodeMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptCustomNodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptCustomNode\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_custom_node::private::VisualScriptCustomNode;
            
            pub(crate) mod visual_script_deconstruct {
                # ! [doc = "This module contains types related to the API class [`VisualScriptDeconstruct`][super::VisualScriptDeconstruct]."] pub (crate) mod private { # [doc = "`core class VisualScriptDeconstruct` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptdeconstruct.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptDeconstruct inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptDeconstruct { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptDeconstruct ; impl VisualScriptDeconstruct { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptDeconstructMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn deconstruct_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptDeconstructMethodTable :: get (get_api ()) . get_deconstruct_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (sys :: godot_variant_type :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_deconstruct_type (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptDeconstructMethodTable :: get (get_api ()) . set_deconstruct_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptDeconstruct { } unsafe impl GodotObject for VisualScriptDeconstruct { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptDeconstruct" } } impl std :: ops :: Deref for VisualScriptDeconstruct { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptDeconstruct { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptDeconstruct { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptDeconstruct { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptDeconstruct { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptDeconstruct { } impl Instanciable for VisualScriptDeconstruct { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptDeconstruct :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptDeconstructMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_deconstruct_type : * mut sys :: godot_method_bind , pub set_deconstruct_type : * mut sys :: godot_method_bind } impl VisualScriptDeconstructMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptDeconstructMethodTable = VisualScriptDeconstructMethodTable { class_constructor : None , get_deconstruct_type : 0 as * mut sys :: godot_method_bind , set_deconstruct_type : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptDeconstructMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptDeconstruct\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_deconstruct_type = (gd_api . godot_method_bind_get_method) (class_name , "get_deconstruct_type\0" . as_ptr () as * const c_char) ; table . set_deconstruct_type = (gd_api . godot_method_bind_get_method) (class_name , "set_deconstruct_type\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_deconstruct::private::VisualScriptDeconstruct;
            
            pub(crate) mod visual_script_emit_signal {
                # ! [doc = "This module contains types related to the API class [`VisualScriptEmitSignal`][super::VisualScriptEmitSignal]."] pub (crate) mod private { # [doc = "`core class VisualScriptEmitSignal` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptemitsignal.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptEmitSignal inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptEmitSignal { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptEmitSignal ; impl VisualScriptEmitSignal { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptEmitSignalMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn signal (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptEmitSignalMethodTable :: get (get_api ()) . get_signal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_signal (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptEmitSignalMethodTable :: get (get_api ()) . set_signal ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptEmitSignal { } unsafe impl GodotObject for VisualScriptEmitSignal { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptEmitSignal" } } impl std :: ops :: Deref for VisualScriptEmitSignal { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptEmitSignal { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptEmitSignal { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptEmitSignal { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptEmitSignal { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptEmitSignal { } impl Instanciable for VisualScriptEmitSignal { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptEmitSignal :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptEmitSignalMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_signal : * mut sys :: godot_method_bind , pub set_signal : * mut sys :: godot_method_bind } impl VisualScriptEmitSignalMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptEmitSignalMethodTable = VisualScriptEmitSignalMethodTable { class_constructor : None , get_signal : 0 as * mut sys :: godot_method_bind , set_signal : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptEmitSignalMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptEmitSignal\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_signal = (gd_api . godot_method_bind_get_method) (class_name , "get_signal\0" . as_ptr () as * const c_char) ; table . set_signal = (gd_api . godot_method_bind_get_method) (class_name , "set_signal\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_emit_signal::private::VisualScriptEmitSignal;
            
            pub(crate) mod visual_script_engine_singleton {
                # ! [doc = "This module contains types related to the API class [`VisualScriptEngineSingleton`][super::VisualScriptEngineSingleton]."] pub (crate) mod private { # [doc = "`core class VisualScriptEngineSingleton` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptenginesingleton.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptEngineSingleton inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptEngineSingleton { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptEngineSingleton ; impl VisualScriptEngineSingleton { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptEngineSingletonMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn singleton (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptEngineSingletonMethodTable :: get (get_api ()) . get_singleton ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_singleton (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptEngineSingletonMethodTable :: get (get_api ()) . set_singleton ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptEngineSingleton { } unsafe impl GodotObject for VisualScriptEngineSingleton { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptEngineSingleton" } } impl std :: ops :: Deref for VisualScriptEngineSingleton { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptEngineSingleton { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptEngineSingleton { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptEngineSingleton { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptEngineSingleton { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptEngineSingleton { } impl Instanciable for VisualScriptEngineSingleton { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptEngineSingleton :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptEngineSingletonMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_singleton : * mut sys :: godot_method_bind , pub set_singleton : * mut sys :: godot_method_bind } impl VisualScriptEngineSingletonMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptEngineSingletonMethodTable = VisualScriptEngineSingletonMethodTable { class_constructor : None , get_singleton : 0 as * mut sys :: godot_method_bind , set_singleton : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptEngineSingletonMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptEngineSingleton\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_singleton = (gd_api . godot_method_bind_get_method) (class_name , "get_singleton\0" . as_ptr () as * const c_char) ; table . set_singleton = (gd_api . godot_method_bind_get_method) (class_name , "set_singleton\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_engine_singleton::private::VisualScriptEngineSingleton;
            
            pub(crate) mod visual_script_expression {
                # ! [doc = "This module contains types related to the API class [`VisualScriptExpression`][super::VisualScriptExpression]."] pub (crate) mod private { # [doc = "`core class VisualScriptExpression` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptexpression.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptExpression inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptExpression { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptExpression ; impl VisualScriptExpression { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptExpressionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptExpression { } unsafe impl GodotObject for VisualScriptExpression { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptExpression" } } impl std :: ops :: Deref for VisualScriptExpression { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptExpression { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptExpression { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptExpression { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptExpression { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptExpression { } impl Instanciable for VisualScriptExpression { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptExpression :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptExpressionMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptExpressionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptExpressionMethodTable = VisualScriptExpressionMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptExpressionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptExpression\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_expression::private::VisualScriptExpression;
            
            pub(crate) mod visual_script_function {
                # ! [doc = "This module contains types related to the API class [`VisualScriptFunction`][super::VisualScriptFunction]."] pub (crate) mod private { # [doc = "`core class VisualScriptFunction` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptfunction.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptFunction inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptFunction { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptFunction ; impl VisualScriptFunction { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptFunctionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptFunction { } unsafe impl GodotObject for VisualScriptFunction { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptFunction" } } impl std :: ops :: Deref for VisualScriptFunction { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptFunction { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptFunction { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptFunction { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptFunction { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptFunction { } impl Instanciable for VisualScriptFunction { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptFunction :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptFunctionMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptFunctionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptFunctionMethodTable = VisualScriptFunctionMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptFunctionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptFunction\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_function::private::VisualScriptFunction;
            
            pub mod visual_script_function_call {
                # ! [doc = "This module contains types related to the API class [`VisualScriptFunctionCall`][super::VisualScriptFunctionCall]."] pub (crate) mod private { # [doc = "`core class VisualScriptFunctionCall` inherits `VisualScriptNode` (reference-counted).\n\nThis class has related types in the [`visual_script_function_call`][super::visual_script_function_call] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptfunctioncall.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptFunctionCall inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptFunctionCall { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptFunctionCall ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CallMode (pub i64) ; impl CallMode { pub const SELF : CallMode = CallMode (0i64) ; pub const NODE_PATH : CallMode = CallMode (1i64) ; pub const INSTANCE : CallMode = CallMode (2i64) ; pub const BASIC_TYPE : CallMode = CallMode (3i64) ; pub const SINGLETON : CallMode = CallMode (4i64) ; } impl From < i64 > for CallMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CallMode > for i64 { # [inline] fn from (v : CallMode) -> Self { v . 0 } } impl FromVariant for CallMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct RpcCallMode (pub i64) ; impl RpcCallMode { pub const DISABLED : RpcCallMode = RpcCallMode (0i64) ; pub const RELIABLE : RpcCallMode = RpcCallMode (1i64) ; pub const UNRELIABLE : RpcCallMode = RpcCallMode (2i64) ; pub const RELIABLE_TO_ID : RpcCallMode = RpcCallMode (3i64) ; pub const UNRELIABLE_TO_ID : RpcCallMode = RpcCallMode (4i64) ; } impl From < i64 > for RpcCallMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < RpcCallMode > for i64 { # [inline] fn from (v : RpcCallMode) -> Self { v . 0 } } impl FromVariant for RpcCallMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptFunctionCall { pub const CALL_MODE_SELF : i64 = 0i64 ; pub const RPC_DISABLED : i64 = 0i64 ; pub const CALL_MODE_NODE_PATH : i64 = 1i64 ; pub const RPC_RELIABLE : i64 = 1i64 ; pub const CALL_MODE_INSTANCE : i64 = 2i64 ; pub const RPC_UNRELIABLE : i64 = 2i64 ; pub const CALL_MODE_BASIC_TYPE : i64 = 3i64 ; pub const RPC_RELIABLE_TO_ID : i64 = 3i64 ; pub const CALL_MODE_SINGLETON : i64 = 4i64 ; pub const RPC_UNRELIABLE_TO_ID : i64 = 4i64 ; } impl VisualScriptFunctionCall { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptFunctionCallMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn base_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_base_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn base_script (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_base_script ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn base_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_base_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn basic_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_basic_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (sys :: godot_variant_type :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn call_mode (& self) -> crate :: generated :: visual_script_function_call :: CallMode { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_call_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_script_function_call :: CallMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn function (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_function ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn rpc_call_mode (& self) -> crate :: generated :: visual_script_function_call :: RpcCallMode { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_rpc_call_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_script_function_call :: RpcCallMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn singleton (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_singleton ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn use_default_args (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_use_default_args ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn validate (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . get_validate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_path (& self , base_path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_base_path ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , base_path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_script (& self , base_script : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_base_script ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , base_script . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_type (& self , base_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_base_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , base_type . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_basic_type (& self , basic_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_basic_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , basic_type as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_call_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_call_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_function (& self , function : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_function ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , function . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_rpc_call_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_rpc_call_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_singleton (& self , singleton : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_singleton ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , singleton . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_use_default_args (& self , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_use_default_args ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , amount as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_validate (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionCallMethodTable :: get (get_api ()) . set_validate ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptFunctionCall { } unsafe impl GodotObject for VisualScriptFunctionCall { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptFunctionCall" } } impl std :: ops :: Deref for VisualScriptFunctionCall { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptFunctionCall { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptFunctionCall { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptFunctionCall { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptFunctionCall { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptFunctionCall { } impl Instanciable for VisualScriptFunctionCall { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptFunctionCall :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptFunctionCallMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_base_path : * mut sys :: godot_method_bind , pub get_base_script : * mut sys :: godot_method_bind , pub get_base_type : * mut sys :: godot_method_bind , pub get_basic_type : * mut sys :: godot_method_bind , pub get_call_mode : * mut sys :: godot_method_bind , pub get_function : * mut sys :: godot_method_bind , pub get_rpc_call_mode : * mut sys :: godot_method_bind , pub get_singleton : * mut sys :: godot_method_bind , pub get_use_default_args : * mut sys :: godot_method_bind , pub get_validate : * mut sys :: godot_method_bind , pub set_base_path : * mut sys :: godot_method_bind , pub set_base_script : * mut sys :: godot_method_bind , pub set_base_type : * mut sys :: godot_method_bind , pub set_basic_type : * mut sys :: godot_method_bind , pub set_call_mode : * mut sys :: godot_method_bind , pub set_function : * mut sys :: godot_method_bind , pub set_rpc_call_mode : * mut sys :: godot_method_bind , pub set_singleton : * mut sys :: godot_method_bind , pub set_use_default_args : * mut sys :: godot_method_bind , pub set_validate : * mut sys :: godot_method_bind } impl VisualScriptFunctionCallMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptFunctionCallMethodTable = VisualScriptFunctionCallMethodTable { class_constructor : None , get_base_path : 0 as * mut sys :: godot_method_bind , get_base_script : 0 as * mut sys :: godot_method_bind , get_base_type : 0 as * mut sys :: godot_method_bind , get_basic_type : 0 as * mut sys :: godot_method_bind , get_call_mode : 0 as * mut sys :: godot_method_bind , get_function : 0 as * mut sys :: godot_method_bind , get_rpc_call_mode : 0 as * mut sys :: godot_method_bind , get_singleton : 0 as * mut sys :: godot_method_bind , get_use_default_args : 0 as * mut sys :: godot_method_bind , get_validate : 0 as * mut sys :: godot_method_bind , set_base_path : 0 as * mut sys :: godot_method_bind , set_base_script : 0 as * mut sys :: godot_method_bind , set_base_type : 0 as * mut sys :: godot_method_bind , set_basic_type : 0 as * mut sys :: godot_method_bind , set_call_mode : 0 as * mut sys :: godot_method_bind , set_function : 0 as * mut sys :: godot_method_bind , set_rpc_call_mode : 0 as * mut sys :: godot_method_bind , set_singleton : 0 as * mut sys :: godot_method_bind , set_use_default_args : 0 as * mut sys :: godot_method_bind , set_validate : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptFunctionCallMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptFunctionCall\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_base_path = (gd_api . godot_method_bind_get_method) (class_name , "get_base_path\0" . as_ptr () as * const c_char) ; table . get_base_script = (gd_api . godot_method_bind_get_method) (class_name , "get_base_script\0" . as_ptr () as * const c_char) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\0" . as_ptr () as * const c_char) ; table . get_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "get_basic_type\0" . as_ptr () as * const c_char) ; table . get_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_call_mode\0" . as_ptr () as * const c_char) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . get_rpc_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_rpc_call_mode\0" . as_ptr () as * const c_char) ; table . get_singleton = (gd_api . godot_method_bind_get_method) (class_name , "get_singleton\0" . as_ptr () as * const c_char) ; table . get_use_default_args = (gd_api . godot_method_bind_get_method) (class_name , "get_use_default_args\0" . as_ptr () as * const c_char) ; table . get_validate = (gd_api . godot_method_bind_get_method) (class_name , "get_validate\0" . as_ptr () as * const c_char) ; table . set_base_path = (gd_api . godot_method_bind_get_method) (class_name , "set_base_path\0" . as_ptr () as * const c_char) ; table . set_base_script = (gd_api . godot_method_bind_get_method) (class_name , "set_base_script\0" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\0" . as_ptr () as * const c_char) ; table . set_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "set_basic_type\0" . as_ptr () as * const c_char) ; table . set_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_call_mode\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; table . set_rpc_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_rpc_call_mode\0" . as_ptr () as * const c_char) ; table . set_singleton = (gd_api . godot_method_bind_get_method) (class_name , "set_singleton\0" . as_ptr () as * const c_char) ; table . set_use_default_args = (gd_api . godot_method_bind_get_method) (class_name , "set_use_default_args\0" . as_ptr () as * const c_char) ; table . set_validate = (gd_api . godot_method_bind_get_method) (class_name , "set_validate\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_function_call::private::VisualScriptFunctionCall;
            
            pub(crate) mod visual_script_function_state {
                # ! [doc = "This module contains types related to the API class [`VisualScriptFunctionState`][super::VisualScriptFunctionState]."] pub (crate) mod private { # [doc = "`core class VisualScriptFunctionState` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptfunctionstate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptFunctionState inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptFunctionState { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptFunctionState ; impl VisualScriptFunctionState { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptFunctionStateMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn connect_to_signal (& self , obj : impl AsArg < crate :: generated :: Object > , signals : impl Into < GodotString > , args : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionStateMethodTable :: get (get_api ()) . connect_to_signal ; let ret = crate :: icalls :: icallvar__obj_str_arr (method_bind , self . this . sys () . as_ptr () , obj . as_arg_ptr () , signals . into () , args) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn is_valid (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionStateMethodTable :: get (get_api ()) . is_valid ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn resume (& self , args : VariantArray) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptFunctionStateMethodTable :: get (get_api ()) . resume ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , args) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptFunctionState { } unsafe impl GodotObject for VisualScriptFunctionState { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptFunctionState" } } impl std :: ops :: Deref for VisualScriptFunctionState { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptFunctionState { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptFunctionState { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptFunctionState { } impl Instanciable for VisualScriptFunctionState { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptFunctionState :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptFunctionStateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub connect_to_signal : * mut sys :: godot_method_bind , pub is_valid : * mut sys :: godot_method_bind , pub resume : * mut sys :: godot_method_bind } impl VisualScriptFunctionStateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptFunctionStateMethodTable = VisualScriptFunctionStateMethodTable { class_constructor : None , connect_to_signal : 0 as * mut sys :: godot_method_bind , is_valid : 0 as * mut sys :: godot_method_bind , resume : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptFunctionStateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptFunctionState\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . connect_to_signal = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_signal\0" . as_ptr () as * const c_char) ; table . is_valid = (gd_api . godot_method_bind_get_method) (class_name , "is_valid\0" . as_ptr () as * const c_char) ; table . resume = (gd_api . godot_method_bind_get_method) (class_name , "resume\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_function_state::private::VisualScriptFunctionState;
            
            pub(crate) mod visual_script_global_constant {
                # ! [doc = "This module contains types related to the API class [`VisualScriptGlobalConstant`][super::VisualScriptGlobalConstant]."] pub (crate) mod private { # [doc = "`core class VisualScriptGlobalConstant` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptglobalconstant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptGlobalConstant inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptGlobalConstant { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptGlobalConstant ; impl VisualScriptGlobalConstant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptGlobalConstantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn global_constant (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptGlobalConstantMethodTable :: get (get_api ()) . get_global_constant ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_global_constant (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptGlobalConstantMethodTable :: get (get_api ()) . set_global_constant ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptGlobalConstant { } unsafe impl GodotObject for VisualScriptGlobalConstant { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptGlobalConstant" } } impl std :: ops :: Deref for VisualScriptGlobalConstant { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptGlobalConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptGlobalConstant { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptGlobalConstant { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptGlobalConstant { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptGlobalConstant { } impl Instanciable for VisualScriptGlobalConstant { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptGlobalConstant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptGlobalConstantMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_global_constant : * mut sys :: godot_method_bind , pub set_global_constant : * mut sys :: godot_method_bind } impl VisualScriptGlobalConstantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptGlobalConstantMethodTable = VisualScriptGlobalConstantMethodTable { class_constructor : None , get_global_constant : 0 as * mut sys :: godot_method_bind , set_global_constant : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptGlobalConstantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptGlobalConstant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_global_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_global_constant\0" . as_ptr () as * const c_char) ; table . set_global_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_global_constant\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_global_constant::private::VisualScriptGlobalConstant;
            
            pub(crate) mod visual_script_index_get {
                # ! [doc = "This module contains types related to the API class [`VisualScriptIndexGet`][super::VisualScriptIndexGet]."] pub (crate) mod private { # [doc = "`core class VisualScriptIndexGet` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptindexget.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptIndexGet inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptIndexGet { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptIndexGet ; impl VisualScriptIndexGet { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptIndexGetMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptIndexGet { } unsafe impl GodotObject for VisualScriptIndexGet { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptIndexGet" } } impl std :: ops :: Deref for VisualScriptIndexGet { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptIndexGet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptIndexGet { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptIndexGet { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptIndexGet { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptIndexGet { } impl Instanciable for VisualScriptIndexGet { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptIndexGet :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptIndexGetMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptIndexGetMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptIndexGetMethodTable = VisualScriptIndexGetMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptIndexGetMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptIndexGet\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_index_get::private::VisualScriptIndexGet;
            
            pub(crate) mod visual_script_index_set {
                # ! [doc = "This module contains types related to the API class [`VisualScriptIndexSet`][super::VisualScriptIndexSet]."] pub (crate) mod private { # [doc = "`core class VisualScriptIndexSet` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptindexset.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptIndexSet inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptIndexSet { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptIndexSet ; impl VisualScriptIndexSet { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptIndexSetMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptIndexSet { } unsafe impl GodotObject for VisualScriptIndexSet { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptIndexSet" } } impl std :: ops :: Deref for VisualScriptIndexSet { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptIndexSet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptIndexSet { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptIndexSet { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptIndexSet { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptIndexSet { } impl Instanciable for VisualScriptIndexSet { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptIndexSet :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptIndexSetMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptIndexSetMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptIndexSetMethodTable = VisualScriptIndexSetMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptIndexSetMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptIndexSet\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_index_set::private::VisualScriptIndexSet;
            
            pub mod visual_script_input_action {
                # ! [doc = "This module contains types related to the API class [`VisualScriptInputAction`][super::VisualScriptInputAction]."] pub (crate) mod private { # [doc = "`core class VisualScriptInputAction` inherits `VisualScriptNode` (reference-counted).\n\nThis class has related types in the [`visual_script_input_action`][super::visual_script_input_action] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptinputaction.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptInputAction inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptInputAction { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptInputAction ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Mode (pub i64) ; impl Mode { pub const PRESSED : Mode = Mode (0i64) ; pub const RELEASED : Mode = Mode (1i64) ; pub const JUST_PRESSED : Mode = Mode (2i64) ; pub const JUST_RELEASED : Mode = Mode (3i64) ; } impl From < i64 > for Mode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Mode > for i64 { # [inline] fn from (v : Mode) -> Self { v . 0 } } impl FromVariant for Mode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptInputAction { pub const MODE_PRESSED : i64 = 0i64 ; pub const MODE_RELEASED : i64 = 1i64 ; pub const MODE_JUST_PRESSED : i64 = 2i64 ; pub const MODE_JUST_RELEASED : i64 = 3i64 ; } impl VisualScriptInputAction { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptInputActionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn action_mode (& self) -> crate :: generated :: visual_script_input_action :: Mode { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptInputActionMethodTable :: get (get_api ()) . get_action_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_script_input_action :: Mode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn action_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptInputActionMethodTable :: get (get_api ()) . get_action_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_action_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptInputActionMethodTable :: get (get_api ()) . set_action_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_action_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptInputActionMethodTable :: get (get_api ()) . set_action_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptInputAction { } unsafe impl GodotObject for VisualScriptInputAction { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptInputAction" } } impl std :: ops :: Deref for VisualScriptInputAction { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptInputAction { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptInputAction { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptInputAction { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptInputAction { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptInputAction { } impl Instanciable for VisualScriptInputAction { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptInputAction :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptInputActionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_action_mode : * mut sys :: godot_method_bind , pub get_action_name : * mut sys :: godot_method_bind , pub set_action_mode : * mut sys :: godot_method_bind , pub set_action_name : * mut sys :: godot_method_bind } impl VisualScriptInputActionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptInputActionMethodTable = VisualScriptInputActionMethodTable { class_constructor : None , get_action_mode : 0 as * mut sys :: godot_method_bind , get_action_name : 0 as * mut sys :: godot_method_bind , set_action_mode : 0 as * mut sys :: godot_method_bind , set_action_name : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptInputActionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptInputAction\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_action_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_action_mode\0" . as_ptr () as * const c_char) ; table . get_action_name = (gd_api . godot_method_bind_get_method) (class_name , "get_action_name\0" . as_ptr () as * const c_char) ; table . set_action_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_action_mode\0" . as_ptr () as * const c_char) ; table . set_action_name = (gd_api . godot_method_bind_get_method) (class_name , "set_action_name\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_input_action::private::VisualScriptInputAction;
            
            pub(crate) mod visual_script_iterator {
                # ! [doc = "This module contains types related to the API class [`VisualScriptIterator`][super::VisualScriptIterator]."] pub (crate) mod private { # [doc = "`core class VisualScriptIterator` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptiterator.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptIterator inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptIterator { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptIterator ; impl VisualScriptIterator { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptIteratorMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptIterator { } unsafe impl GodotObject for VisualScriptIterator { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptIterator" } } impl std :: ops :: Deref for VisualScriptIterator { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptIterator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptIterator { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptIterator { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptIterator { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptIterator { } impl Instanciable for VisualScriptIterator { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptIterator :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptIteratorMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptIteratorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptIteratorMethodTable = VisualScriptIteratorMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptIteratorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptIterator\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_iterator::private::VisualScriptIterator;
            
            pub(crate) mod visual_script_lists {
                # ! [doc = "This module contains types related to the API class [`VisualScriptLists`][super::VisualScriptLists]."] pub (crate) mod private { # [doc = "`core class VisualScriptLists` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptlists.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptLists inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptLists { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptLists ; impl VisualScriptLists { # [doc = ""] # [doc = ""] # [inline] pub fn add_input_data_port (& self , type_ : i64 , name : impl Into < GodotString > , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptListsMethodTable :: get (get_api ()) . add_input_data_port ; let ret = crate :: icalls :: icallvar__i64_str_i64 (method_bind , self . this . sys () . as_ptr () , type_ as _ , name . into () , index as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn add_output_data_port (& self , type_ : i64 , name : impl Into < GodotString > , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptListsMethodTable :: get (get_api ()) . add_output_data_port ; let ret = crate :: icalls :: icallvar__i64_str_i64 (method_bind , self . this . sys () . as_ptr () , type_ as _ , name . into () , index as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_input_data_port (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptListsMethodTable :: get (get_api ()) . remove_input_data_port ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_output_data_port (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptListsMethodTable :: get (get_api ()) . remove_output_data_port ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_input_data_port_name (& self , index : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptListsMethodTable :: get (get_api ()) . set_input_data_port_name ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , index as _ , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_input_data_port_type (& self , index : i64 , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptListsMethodTable :: get (get_api ()) . set_input_data_port_type ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , index as _ , type_ as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_output_data_port_name (& self , index : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptListsMethodTable :: get (get_api ()) . set_output_data_port_name ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , index as _ , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_output_data_port_type (& self , index : i64 , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptListsMethodTable :: get (get_api ()) . set_output_data_port_type ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , index as _ , type_ as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptLists { } unsafe impl GodotObject for VisualScriptLists { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptLists" } } impl std :: ops :: Deref for VisualScriptLists { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptLists { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptLists { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptLists { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptLists { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptLists { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptListsMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_input_data_port : * mut sys :: godot_method_bind , pub add_output_data_port : * mut sys :: godot_method_bind , pub remove_input_data_port : * mut sys :: godot_method_bind , pub remove_output_data_port : * mut sys :: godot_method_bind , pub set_input_data_port_name : * mut sys :: godot_method_bind , pub set_input_data_port_type : * mut sys :: godot_method_bind , pub set_output_data_port_name : * mut sys :: godot_method_bind , pub set_output_data_port_type : * mut sys :: godot_method_bind } impl VisualScriptListsMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptListsMethodTable = VisualScriptListsMethodTable { class_constructor : None , add_input_data_port : 0 as * mut sys :: godot_method_bind , add_output_data_port : 0 as * mut sys :: godot_method_bind , remove_input_data_port : 0 as * mut sys :: godot_method_bind , remove_output_data_port : 0 as * mut sys :: godot_method_bind , set_input_data_port_name : 0 as * mut sys :: godot_method_bind , set_input_data_port_type : 0 as * mut sys :: godot_method_bind , set_output_data_port_name : 0 as * mut sys :: godot_method_bind , set_output_data_port_type : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptListsMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptLists\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_input_data_port = (gd_api . godot_method_bind_get_method) (class_name , "add_input_data_port\0" . as_ptr () as * const c_char) ; table . add_output_data_port = (gd_api . godot_method_bind_get_method) (class_name , "add_output_data_port\0" . as_ptr () as * const c_char) ; table . remove_input_data_port = (gd_api . godot_method_bind_get_method) (class_name , "remove_input_data_port\0" . as_ptr () as * const c_char) ; table . remove_output_data_port = (gd_api . godot_method_bind_get_method) (class_name , "remove_output_data_port\0" . as_ptr () as * const c_char) ; table . set_input_data_port_name = (gd_api . godot_method_bind_get_method) (class_name , "set_input_data_port_name\0" . as_ptr () as * const c_char) ; table . set_input_data_port_type = (gd_api . godot_method_bind_get_method) (class_name , "set_input_data_port_type\0" . as_ptr () as * const c_char) ; table . set_output_data_port_name = (gd_api . godot_method_bind_get_method) (class_name , "set_output_data_port_name\0" . as_ptr () as * const c_char) ; table . set_output_data_port_type = (gd_api . godot_method_bind_get_method) (class_name , "set_output_data_port_type\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_lists::private::VisualScriptLists;
            
            pub(crate) mod visual_script_local_var {
                # ! [doc = "This module contains types related to the API class [`VisualScriptLocalVar`][super::VisualScriptLocalVar]."] pub (crate) mod private { # [doc = "`core class VisualScriptLocalVar` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptlocalvar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptLocalVar inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptLocalVar { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptLocalVar ; impl VisualScriptLocalVar { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptLocalVarMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn var_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . get_var_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn var_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . get_var_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (sys :: godot_variant_type :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_var_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . set_var_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_var_type (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarMethodTable :: get (get_api ()) . set_var_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptLocalVar { } unsafe impl GodotObject for VisualScriptLocalVar { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptLocalVar" } } impl std :: ops :: Deref for VisualScriptLocalVar { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptLocalVar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptLocalVar { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptLocalVar { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptLocalVar { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptLocalVar { } impl Instanciable for VisualScriptLocalVar { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptLocalVar :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptLocalVarMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_var_name : * mut sys :: godot_method_bind , pub get_var_type : * mut sys :: godot_method_bind , pub set_var_name : * mut sys :: godot_method_bind , pub set_var_type : * mut sys :: godot_method_bind } impl VisualScriptLocalVarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptLocalVarMethodTable = VisualScriptLocalVarMethodTable { class_constructor : None , get_var_name : 0 as * mut sys :: godot_method_bind , get_var_type : 0 as * mut sys :: godot_method_bind , set_var_name : 0 as * mut sys :: godot_method_bind , set_var_type : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptLocalVarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptLocalVar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_var_name = (gd_api . godot_method_bind_get_method) (class_name , "get_var_name\0" . as_ptr () as * const c_char) ; table . get_var_type = (gd_api . godot_method_bind_get_method) (class_name , "get_var_type\0" . as_ptr () as * const c_char) ; table . set_var_name = (gd_api . godot_method_bind_get_method) (class_name , "set_var_name\0" . as_ptr () as * const c_char) ; table . set_var_type = (gd_api . godot_method_bind_get_method) (class_name , "set_var_type\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_local_var::private::VisualScriptLocalVar;
            
            pub(crate) mod visual_script_local_var_set {
                # ! [doc = "This module contains types related to the API class [`VisualScriptLocalVarSet`][super::VisualScriptLocalVarSet]."] pub (crate) mod private { # [doc = "`core class VisualScriptLocalVarSet` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptlocalvarset.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptLocalVarSet inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptLocalVarSet { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptLocalVarSet ; impl VisualScriptLocalVarSet { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptLocalVarSetMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn var_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarSetMethodTable :: get (get_api ()) . get_var_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn var_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarSetMethodTable :: get (get_api ()) . get_var_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (sys :: godot_variant_type :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_var_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarSetMethodTable :: get (get_api ()) . set_var_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_var_type (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptLocalVarSetMethodTable :: get (get_api ()) . set_var_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptLocalVarSet { } unsafe impl GodotObject for VisualScriptLocalVarSet { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptLocalVarSet" } } impl std :: ops :: Deref for VisualScriptLocalVarSet { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptLocalVarSet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptLocalVarSet { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptLocalVarSet { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptLocalVarSet { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptLocalVarSet { } impl Instanciable for VisualScriptLocalVarSet { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptLocalVarSet :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptLocalVarSetMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_var_name : * mut sys :: godot_method_bind , pub get_var_type : * mut sys :: godot_method_bind , pub set_var_name : * mut sys :: godot_method_bind , pub set_var_type : * mut sys :: godot_method_bind } impl VisualScriptLocalVarSetMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptLocalVarSetMethodTable = VisualScriptLocalVarSetMethodTable { class_constructor : None , get_var_name : 0 as * mut sys :: godot_method_bind , get_var_type : 0 as * mut sys :: godot_method_bind , set_var_name : 0 as * mut sys :: godot_method_bind , set_var_type : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptLocalVarSetMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptLocalVarSet\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_var_name = (gd_api . godot_method_bind_get_method) (class_name , "get_var_name\0" . as_ptr () as * const c_char) ; table . get_var_type = (gd_api . godot_method_bind_get_method) (class_name , "get_var_type\0" . as_ptr () as * const c_char) ; table . set_var_name = (gd_api . godot_method_bind_get_method) (class_name , "set_var_name\0" . as_ptr () as * const c_char) ; table . set_var_type = (gd_api . godot_method_bind_get_method) (class_name , "set_var_type\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_local_var_set::private::VisualScriptLocalVarSet;
            
            pub mod visual_script_math_constant {
                # ! [doc = "This module contains types related to the API class [`VisualScriptMathConstant`][super::VisualScriptMathConstant]."] pub (crate) mod private { # [doc = "`core class VisualScriptMathConstant` inherits `VisualScriptNode` (reference-counted).\n\nThis class has related types in the [`visual_script_math_constant`][super::visual_script_math_constant] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptmathconstant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptMathConstant inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptMathConstant { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptMathConstant ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MathConstant (pub i64) ; impl MathConstant { pub const ONE : MathConstant = MathConstant (0i64) ; pub const PI : MathConstant = MathConstant (1i64) ; pub const HALF_PI : MathConstant = MathConstant (2i64) ; pub const TAU : MathConstant = MathConstant (3i64) ; pub const E : MathConstant = MathConstant (4i64) ; pub const SQRT2 : MathConstant = MathConstant (5i64) ; pub const INF : MathConstant = MathConstant (6i64) ; pub const NAN : MathConstant = MathConstant (7i64) ; pub const MAX : MathConstant = MathConstant (8i64) ; } impl From < i64 > for MathConstant { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MathConstant > for i64 { # [inline] fn from (v : MathConstant) -> Self { v . 0 } } impl FromVariant for MathConstant { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptMathConstant { pub const MATH_CONSTANT_ONE : i64 = 0i64 ; pub const MATH_CONSTANT_PI : i64 = 1i64 ; pub const MATH_CONSTANT_HALF_PI : i64 = 2i64 ; pub const MATH_CONSTANT_TAU : i64 = 3i64 ; pub const MATH_CONSTANT_E : i64 = 4i64 ; pub const MATH_CONSTANT_SQRT2 : i64 = 5i64 ; pub const MATH_CONSTANT_INF : i64 = 6i64 ; pub const MATH_CONSTANT_NAN : i64 = 7i64 ; pub const MATH_CONSTANT_MAX : i64 = 8i64 ; } impl VisualScriptMathConstant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptMathConstantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn math_constant (& self) -> crate :: generated :: visual_script_math_constant :: MathConstant { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMathConstantMethodTable :: get (get_api ()) . get_math_constant ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_script_math_constant :: MathConstant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_math_constant (& self , which : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptMathConstantMethodTable :: get (get_api ()) . set_math_constant ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , which as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptMathConstant { } unsafe impl GodotObject for VisualScriptMathConstant { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptMathConstant" } } impl std :: ops :: Deref for VisualScriptMathConstant { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptMathConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptMathConstant { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptMathConstant { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptMathConstant { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptMathConstant { } impl Instanciable for VisualScriptMathConstant { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptMathConstant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptMathConstantMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_math_constant : * mut sys :: godot_method_bind , pub set_math_constant : * mut sys :: godot_method_bind } impl VisualScriptMathConstantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptMathConstantMethodTable = VisualScriptMathConstantMethodTable { class_constructor : None , get_math_constant : 0 as * mut sys :: godot_method_bind , set_math_constant : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptMathConstantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptMathConstant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_math_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_math_constant\0" . as_ptr () as * const c_char) ; table . set_math_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_math_constant\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_math_constant::private::VisualScriptMathConstant;
            
            pub(crate) mod visual_script_node {
                # ! [doc = "This module contains types related to the API class [`VisualScriptNode`][super::VisualScriptNode]."] pub (crate) mod private { # [doc = "`core class VisualScriptNode` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptnode.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptNode inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptNode { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptNode ; impl VisualScriptNode { # [doc = ""] # [doc = ""] # [inline] pub fn get_default_input_value (& self , port_idx : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptNodeMethodTable :: get (get_api ()) . get_default_input_value ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , port_idx as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_visual_script (& self) -> Option < Ref < crate :: generated :: VisualScript , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptNodeMethodTable :: get (get_api ()) . get_visual_script ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: VisualScript , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn ports_changed_notify (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptNodeMethodTable :: get (get_api ()) . ports_changed_notify ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_default_input_value (& self , port_idx : i64 , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptNodeMethodTable :: get (get_api ()) . set_default_input_value ; let ret = crate :: icalls :: icallvar__i64_var (method_bind , self . this . sys () . as_ptr () , port_idx as _ , value . owned_to_variant ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptNode { } unsafe impl GodotObject for VisualScriptNode { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptNode" } } impl std :: ops :: Deref for VisualScriptNode { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptNode { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptNode { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptNode { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptNodeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_default_input_value : * mut sys :: godot_method_bind , pub get_visual_script : * mut sys :: godot_method_bind , pub ports_changed_notify : * mut sys :: godot_method_bind , pub set_default_input_value : * mut sys :: godot_method_bind } impl VisualScriptNodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptNodeMethodTable = VisualScriptNodeMethodTable { class_constructor : None , get_default_input_value : 0 as * mut sys :: godot_method_bind , get_visual_script : 0 as * mut sys :: godot_method_bind , ports_changed_notify : 0 as * mut sys :: godot_method_bind , set_default_input_value : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptNodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptNode\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_default_input_value = (gd_api . godot_method_bind_get_method) (class_name , "get_default_input_value\0" . as_ptr () as * const c_char) ; table . get_visual_script = (gd_api . godot_method_bind_get_method) (class_name , "get_visual_script\0" . as_ptr () as * const c_char) ; table . ports_changed_notify = (gd_api . godot_method_bind_get_method) (class_name , "ports_changed_notify\0" . as_ptr () as * const c_char) ; table . set_default_input_value = (gd_api . godot_method_bind_get_method) (class_name , "set_default_input_value\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_node::private::VisualScriptNode;
            
            pub(crate) mod visual_script_operator {
                # ! [doc = "This module contains types related to the API class [`VisualScriptOperator`][super::VisualScriptOperator]."] pub (crate) mod private { # [doc = "`core class VisualScriptOperator` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptoperator.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptOperator inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptOperator { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptOperator ; impl VisualScriptOperator { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptOperatorMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn operator (& self) -> VariantOperator { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptOperatorMethodTable :: get (get_api ()) . get_operator ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; VariantOperator :: try_from_sys (sys :: godot_variant_operator :: from_variant (& ret) . expect ("Unexpected variant type")) . expect ("enum variant should be valid") } } # [doc = ""] # [doc = ""] # [inline] pub fn typed (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptOperatorMethodTable :: get (get_api ()) . get_typed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (sys :: godot_variant_type :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_operator (& self , op : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptOperatorMethodTable :: get (get_api ()) . set_operator ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , op as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_typed (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptOperatorMethodTable :: get (get_api ()) . set_typed ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptOperator { } unsafe impl GodotObject for VisualScriptOperator { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptOperator" } } impl std :: ops :: Deref for VisualScriptOperator { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptOperator { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptOperator { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptOperator { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptOperator { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptOperator { } impl Instanciable for VisualScriptOperator { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptOperator :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptOperatorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_operator : * mut sys :: godot_method_bind , pub get_typed : * mut sys :: godot_method_bind , pub set_operator : * mut sys :: godot_method_bind , pub set_typed : * mut sys :: godot_method_bind } impl VisualScriptOperatorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptOperatorMethodTable = VisualScriptOperatorMethodTable { class_constructor : None , get_operator : 0 as * mut sys :: godot_method_bind , get_typed : 0 as * mut sys :: godot_method_bind , set_operator : 0 as * mut sys :: godot_method_bind , set_typed : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptOperatorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptOperator\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_operator\0" . as_ptr () as * const c_char) ; table . get_typed = (gd_api . godot_method_bind_get_method) (class_name , "get_typed\0" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\0" . as_ptr () as * const c_char) ; table . set_typed = (gd_api . godot_method_bind_get_method) (class_name , "set_typed\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_operator::private::VisualScriptOperator;
            
            pub(crate) mod visual_script_preload {
                # ! [doc = "This module contains types related to the API class [`VisualScriptPreload`][super::VisualScriptPreload]."] pub (crate) mod private { # [doc = "`core class VisualScriptPreload` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptpreload.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptPreload inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptPreload { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptPreload ; impl VisualScriptPreload { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptPreloadMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn preload (& self) -> Option < Ref < crate :: generated :: Resource , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPreloadMethodTable :: get (get_api ()) . get_preload ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Resource , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_preload (& self , resource : impl AsArg < crate :: generated :: Resource >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPreloadMethodTable :: get (get_api ()) . set_preload ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , resource . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptPreload { } unsafe impl GodotObject for VisualScriptPreload { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptPreload" } } impl std :: ops :: Deref for VisualScriptPreload { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptPreload { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptPreload { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptPreload { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptPreload { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptPreload { } impl Instanciable for VisualScriptPreload { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptPreload :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptPreloadMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_preload : * mut sys :: godot_method_bind , pub set_preload : * mut sys :: godot_method_bind } impl VisualScriptPreloadMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptPreloadMethodTable = VisualScriptPreloadMethodTable { class_constructor : None , get_preload : 0 as * mut sys :: godot_method_bind , set_preload : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptPreloadMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptPreload\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_preload = (gd_api . godot_method_bind_get_method) (class_name , "get_preload\0" . as_ptr () as * const c_char) ; table . set_preload = (gd_api . godot_method_bind_get_method) (class_name , "set_preload\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_preload::private::VisualScriptPreload;
            
            pub mod visual_script_property_get {
                # ! [doc = "This module contains types related to the API class [`VisualScriptPropertyGet`][super::VisualScriptPropertyGet]."] pub (crate) mod private { # [doc = "`core class VisualScriptPropertyGet` inherits `VisualScriptNode` (reference-counted).\n\nThis class has related types in the [`visual_script_property_get`][super::visual_script_property_get] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptpropertyget.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptPropertyGet inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptPropertyGet { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptPropertyGet ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CallMode (pub i64) ; impl CallMode { pub const SELF : CallMode = CallMode (0i64) ; pub const NODE_PATH : CallMode = CallMode (1i64) ; pub const INSTANCE : CallMode = CallMode (2i64) ; pub const BASIC_TYPE : CallMode = CallMode (3i64) ; } impl From < i64 > for CallMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CallMode > for i64 { # [inline] fn from (v : CallMode) -> Self { v . 0 } } impl FromVariant for CallMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptPropertyGet { pub const CALL_MODE_SELF : i64 = 0i64 ; pub const CALL_MODE_NODE_PATH : i64 = 1i64 ; pub const CALL_MODE_INSTANCE : i64 = 2i64 ; pub const CALL_MODE_BASIC_TYPE : i64 = 3i64 ; } impl VisualScriptPropertyGet { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptPropertyGetMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn base_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertyGetMethodTable :: get (get_api ()) . get_base_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn base_script (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertyGetMethodTable :: get (get_api ()) . get_base_script ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn base_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertyGetMethodTable :: get (get_api ()) . get_base_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn basic_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertyGetMethodTable :: get (get_api ()) . get_basic_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (sys :: godot_variant_type :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn call_mode (& self) -> crate :: generated :: visual_script_property_get :: CallMode { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertyGetMethodTable :: get (get_api ()) . get_call_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_script_property_get :: CallMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn index (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertyGetMethodTable :: get (get_api ()) . get_index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn property (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertyGetMethodTable :: get (get_api ()) . get_property ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_path (& self , base_path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertyGetMethodTable :: get (get_api ()) . set_base_path ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , base_path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_script (& self , base_script : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertyGetMethodTable :: get (get_api ()) . set_base_script ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , base_script . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_type (& self , base_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertyGetMethodTable :: get (get_api ()) . set_base_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , base_type . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_basic_type (& self , basic_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertyGetMethodTable :: get (get_api ()) . set_basic_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , basic_type as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_call_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertyGetMethodTable :: get (get_api ()) . set_call_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_index (& self , index : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertyGetMethodTable :: get (get_api ()) . set_index ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , index . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_property (& self , property : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertyGetMethodTable :: get (get_api ()) . set_property ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , property . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptPropertyGet { } unsafe impl GodotObject for VisualScriptPropertyGet { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptPropertyGet" } } impl std :: ops :: Deref for VisualScriptPropertyGet { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptPropertyGet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptPropertyGet { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptPropertyGet { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptPropertyGet { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptPropertyGet { } impl Instanciable for VisualScriptPropertyGet { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptPropertyGet :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptPropertyGetMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_base_path : * mut sys :: godot_method_bind , pub get_base_script : * mut sys :: godot_method_bind , pub get_base_type : * mut sys :: godot_method_bind , pub get_basic_type : * mut sys :: godot_method_bind , pub get_call_mode : * mut sys :: godot_method_bind , pub get_index : * mut sys :: godot_method_bind , pub get_property : * mut sys :: godot_method_bind , pub set_base_path : * mut sys :: godot_method_bind , pub set_base_script : * mut sys :: godot_method_bind , pub set_base_type : * mut sys :: godot_method_bind , pub set_basic_type : * mut sys :: godot_method_bind , pub set_call_mode : * mut sys :: godot_method_bind , pub set_index : * mut sys :: godot_method_bind , pub set_property : * mut sys :: godot_method_bind } impl VisualScriptPropertyGetMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptPropertyGetMethodTable = VisualScriptPropertyGetMethodTable { class_constructor : None , get_base_path : 0 as * mut sys :: godot_method_bind , get_base_script : 0 as * mut sys :: godot_method_bind , get_base_type : 0 as * mut sys :: godot_method_bind , get_basic_type : 0 as * mut sys :: godot_method_bind , get_call_mode : 0 as * mut sys :: godot_method_bind , get_index : 0 as * mut sys :: godot_method_bind , get_property : 0 as * mut sys :: godot_method_bind , set_base_path : 0 as * mut sys :: godot_method_bind , set_base_script : 0 as * mut sys :: godot_method_bind , set_base_type : 0 as * mut sys :: godot_method_bind , set_basic_type : 0 as * mut sys :: godot_method_bind , set_call_mode : 0 as * mut sys :: godot_method_bind , set_index : 0 as * mut sys :: godot_method_bind , set_property : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptPropertyGetMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptPropertyGet\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_base_path = (gd_api . godot_method_bind_get_method) (class_name , "get_base_path\0" . as_ptr () as * const c_char) ; table . get_base_script = (gd_api . godot_method_bind_get_method) (class_name , "get_base_script\0" . as_ptr () as * const c_char) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\0" . as_ptr () as * const c_char) ; table . get_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "get_basic_type\0" . as_ptr () as * const c_char) ; table . get_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_call_mode\0" . as_ptr () as * const c_char) ; table . get_index = (gd_api . godot_method_bind_get_method) (class_name , "get_index\0" . as_ptr () as * const c_char) ; table . get_property = (gd_api . godot_method_bind_get_method) (class_name , "get_property\0" . as_ptr () as * const c_char) ; table . set_base_path = (gd_api . godot_method_bind_get_method) (class_name , "set_base_path\0" . as_ptr () as * const c_char) ; table . set_base_script = (gd_api . godot_method_bind_get_method) (class_name , "set_base_script\0" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\0" . as_ptr () as * const c_char) ; table . set_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "set_basic_type\0" . as_ptr () as * const c_char) ; table . set_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_call_mode\0" . as_ptr () as * const c_char) ; table . set_index = (gd_api . godot_method_bind_get_method) (class_name , "set_index\0" . as_ptr () as * const c_char) ; table . set_property = (gd_api . godot_method_bind_get_method) (class_name , "set_property\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_property_get::private::VisualScriptPropertyGet;
            
            pub mod visual_script_property_set {
                # ! [doc = "This module contains types related to the API class [`VisualScriptPropertySet`][super::VisualScriptPropertySet]."] pub (crate) mod private { # [doc = "`core class VisualScriptPropertySet` inherits `VisualScriptNode` (reference-counted).\n\nThis class has related types in the [`visual_script_property_set`][super::visual_script_property_set] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptpropertyset.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptPropertySet inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptPropertySet { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptPropertySet ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct AssignOp (pub i64) ; impl AssignOp { pub const NONE : AssignOp = AssignOp (0i64) ; pub const ADD : AssignOp = AssignOp (1i64) ; pub const SUB : AssignOp = AssignOp (2i64) ; pub const MUL : AssignOp = AssignOp (3i64) ; pub const DIV : AssignOp = AssignOp (4i64) ; pub const MOD : AssignOp = AssignOp (5i64) ; pub const SHIFT_LEFT : AssignOp = AssignOp (6i64) ; pub const SHIFT_RIGHT : AssignOp = AssignOp (7i64) ; pub const BIT_AND : AssignOp = AssignOp (8i64) ; pub const BIT_OR : AssignOp = AssignOp (9i64) ; pub const BIT_XOR : AssignOp = AssignOp (10i64) ; } impl From < i64 > for AssignOp { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < AssignOp > for i64 { # [inline] fn from (v : AssignOp) -> Self { v . 0 } } impl FromVariant for AssignOp { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CallMode (pub i64) ; impl CallMode { pub const SELF : CallMode = CallMode (0i64) ; pub const NODE_PATH : CallMode = CallMode (1i64) ; pub const INSTANCE : CallMode = CallMode (2i64) ; pub const BASIC_TYPE : CallMode = CallMode (3i64) ; } impl From < i64 > for CallMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CallMode > for i64 { # [inline] fn from (v : CallMode) -> Self { v . 0 } } impl FromVariant for CallMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptPropertySet { pub const ASSIGN_OP_NONE : i64 = 0i64 ; pub const CALL_MODE_SELF : i64 = 0i64 ; pub const ASSIGN_OP_ADD : i64 = 1i64 ; pub const CALL_MODE_NODE_PATH : i64 = 1i64 ; pub const ASSIGN_OP_SUB : i64 = 2i64 ; pub const CALL_MODE_INSTANCE : i64 = 2i64 ; pub const ASSIGN_OP_MUL : i64 = 3i64 ; pub const CALL_MODE_BASIC_TYPE : i64 = 3i64 ; pub const ASSIGN_OP_DIV : i64 = 4i64 ; pub const ASSIGN_OP_MOD : i64 = 5i64 ; pub const ASSIGN_OP_SHIFT_LEFT : i64 = 6i64 ; pub const ASSIGN_OP_SHIFT_RIGHT : i64 = 7i64 ; pub const ASSIGN_OP_BIT_AND : i64 = 8i64 ; pub const ASSIGN_OP_BIT_OR : i64 = 9i64 ; pub const ASSIGN_OP_BIT_XOR : i64 = 10i64 ; } impl VisualScriptPropertySet { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptPropertySetMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn assign_op (& self) -> crate :: generated :: visual_script_property_set :: AssignOp { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_assign_op ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_script_property_set :: AssignOp > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn base_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_base_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn base_script (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_base_script ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn base_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_base_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn basic_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_basic_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (sys :: godot_variant_type :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn call_mode (& self) -> crate :: generated :: visual_script_property_set :: CallMode { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_call_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_script_property_set :: CallMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn index (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_index ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn property (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . get_property ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_assign_op (& self , assign_op : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_assign_op ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , assign_op as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_path (& self , base_path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_base_path ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , base_path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_script (& self , base_script : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_base_script ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , base_script . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_type (& self , base_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_base_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , base_type . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_basic_type (& self , basic_type : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_basic_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , basic_type as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_call_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_call_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_index (& self , index : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_index ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , index . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_property (& self , property : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptPropertySetMethodTable :: get (get_api ()) . set_property ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , property . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptPropertySet { } unsafe impl GodotObject for VisualScriptPropertySet { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptPropertySet" } } impl std :: ops :: Deref for VisualScriptPropertySet { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptPropertySet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptPropertySet { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptPropertySet { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptPropertySet { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptPropertySet { } impl Instanciable for VisualScriptPropertySet { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptPropertySet :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptPropertySetMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_assign_op : * mut sys :: godot_method_bind , pub get_base_path : * mut sys :: godot_method_bind , pub get_base_script : * mut sys :: godot_method_bind , pub get_base_type : * mut sys :: godot_method_bind , pub get_basic_type : * mut sys :: godot_method_bind , pub get_call_mode : * mut sys :: godot_method_bind , pub get_index : * mut sys :: godot_method_bind , pub get_property : * mut sys :: godot_method_bind , pub set_assign_op : * mut sys :: godot_method_bind , pub set_base_path : * mut sys :: godot_method_bind , pub set_base_script : * mut sys :: godot_method_bind , pub set_base_type : * mut sys :: godot_method_bind , pub set_basic_type : * mut sys :: godot_method_bind , pub set_call_mode : * mut sys :: godot_method_bind , pub set_index : * mut sys :: godot_method_bind , pub set_property : * mut sys :: godot_method_bind } impl VisualScriptPropertySetMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptPropertySetMethodTable = VisualScriptPropertySetMethodTable { class_constructor : None , get_assign_op : 0 as * mut sys :: godot_method_bind , get_base_path : 0 as * mut sys :: godot_method_bind , get_base_script : 0 as * mut sys :: godot_method_bind , get_base_type : 0 as * mut sys :: godot_method_bind , get_basic_type : 0 as * mut sys :: godot_method_bind , get_call_mode : 0 as * mut sys :: godot_method_bind , get_index : 0 as * mut sys :: godot_method_bind , get_property : 0 as * mut sys :: godot_method_bind , set_assign_op : 0 as * mut sys :: godot_method_bind , set_base_path : 0 as * mut sys :: godot_method_bind , set_base_script : 0 as * mut sys :: godot_method_bind , set_base_type : 0 as * mut sys :: godot_method_bind , set_basic_type : 0 as * mut sys :: godot_method_bind , set_call_mode : 0 as * mut sys :: godot_method_bind , set_index : 0 as * mut sys :: godot_method_bind , set_property : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptPropertySetMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptPropertySet\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_assign_op = (gd_api . godot_method_bind_get_method) (class_name , "get_assign_op\0" . as_ptr () as * const c_char) ; table . get_base_path = (gd_api . godot_method_bind_get_method) (class_name , "get_base_path\0" . as_ptr () as * const c_char) ; table . get_base_script = (gd_api . godot_method_bind_get_method) (class_name , "get_base_script\0" . as_ptr () as * const c_char) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\0" . as_ptr () as * const c_char) ; table . get_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "get_basic_type\0" . as_ptr () as * const c_char) ; table . get_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_call_mode\0" . as_ptr () as * const c_char) ; table . get_index = (gd_api . godot_method_bind_get_method) (class_name , "get_index\0" . as_ptr () as * const c_char) ; table . get_property = (gd_api . godot_method_bind_get_method) (class_name , "get_property\0" . as_ptr () as * const c_char) ; table . set_assign_op = (gd_api . godot_method_bind_get_method) (class_name , "set_assign_op\0" . as_ptr () as * const c_char) ; table . set_base_path = (gd_api . godot_method_bind_get_method) (class_name , "set_base_path\0" . as_ptr () as * const c_char) ; table . set_base_script = (gd_api . godot_method_bind_get_method) (class_name , "set_base_script\0" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\0" . as_ptr () as * const c_char) ; table . set_basic_type = (gd_api . godot_method_bind_get_method) (class_name , "set_basic_type\0" . as_ptr () as * const c_char) ; table . set_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_call_mode\0" . as_ptr () as * const c_char) ; table . set_index = (gd_api . godot_method_bind_get_method) (class_name , "set_index\0" . as_ptr () as * const c_char) ; table . set_property = (gd_api . godot_method_bind_get_method) (class_name , "set_property\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_property_set::private::VisualScriptPropertySet;
            
            pub(crate) mod visual_script_resource_path {
                # ! [doc = "This module contains types related to the API class [`VisualScriptResourcePath`][super::VisualScriptResourcePath]."] pub (crate) mod private { # [doc = "`core class VisualScriptResourcePath` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptresourcepath.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptResourcePath inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptResourcePath { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptResourcePath ; impl VisualScriptResourcePath { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptResourcePathMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn resource_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptResourcePathMethodTable :: get (get_api ()) . get_resource_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_resource_path (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptResourcePathMethodTable :: get (get_api ()) . set_resource_path ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptResourcePath { } unsafe impl GodotObject for VisualScriptResourcePath { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptResourcePath" } } impl std :: ops :: Deref for VisualScriptResourcePath { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptResourcePath { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptResourcePath { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptResourcePath { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptResourcePath { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptResourcePath { } impl Instanciable for VisualScriptResourcePath { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptResourcePath :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptResourcePathMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_resource_path : * mut sys :: godot_method_bind , pub set_resource_path : * mut sys :: godot_method_bind } impl VisualScriptResourcePathMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptResourcePathMethodTable = VisualScriptResourcePathMethodTable { class_constructor : None , get_resource_path : 0 as * mut sys :: godot_method_bind , set_resource_path : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptResourcePathMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptResourcePath\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_resource_path = (gd_api . godot_method_bind_get_method) (class_name , "get_resource_path\0" . as_ptr () as * const c_char) ; table . set_resource_path = (gd_api . godot_method_bind_get_method) (class_name , "set_resource_path\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_resource_path::private::VisualScriptResourcePath;
            
            pub(crate) mod visual_script_return {
                # ! [doc = "This module contains types related to the API class [`VisualScriptReturn`][super::VisualScriptReturn]."] pub (crate) mod private { # [doc = "`core class VisualScriptReturn` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptreturn.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptReturn inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptReturn { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptReturn ; impl VisualScriptReturn { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptReturnMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn return_type (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptReturnMethodTable :: get (get_api ()) . get_return_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (sys :: godot_variant_type :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_return_value_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptReturnMethodTable :: get (get_api ()) . is_return_value_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_enable_return_value (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptReturnMethodTable :: get (get_api ()) . set_enable_return_value ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_return_type (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptReturnMethodTable :: get (get_api ()) . set_return_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptReturn { } unsafe impl GodotObject for VisualScriptReturn { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptReturn" } } impl std :: ops :: Deref for VisualScriptReturn { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptReturn { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptReturn { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptReturn { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptReturn { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptReturn { } impl Instanciable for VisualScriptReturn { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptReturn :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptReturnMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_return_type : * mut sys :: godot_method_bind , pub is_return_value_enabled : * mut sys :: godot_method_bind , pub set_enable_return_value : * mut sys :: godot_method_bind , pub set_return_type : * mut sys :: godot_method_bind } impl VisualScriptReturnMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptReturnMethodTable = VisualScriptReturnMethodTable { class_constructor : None , get_return_type : 0 as * mut sys :: godot_method_bind , is_return_value_enabled : 0 as * mut sys :: godot_method_bind , set_enable_return_value : 0 as * mut sys :: godot_method_bind , set_return_type : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptReturnMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptReturn\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_return_type = (gd_api . godot_method_bind_get_method) (class_name , "get_return_type\0" . as_ptr () as * const c_char) ; table . is_return_value_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_return_value_enabled\0" . as_ptr () as * const c_char) ; table . set_enable_return_value = (gd_api . godot_method_bind_get_method) (class_name , "set_enable_return_value\0" . as_ptr () as * const c_char) ; table . set_return_type = (gd_api . godot_method_bind_get_method) (class_name , "set_return_type\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_return::private::VisualScriptReturn;
            
            pub(crate) mod visual_script_scene_node {
                # ! [doc = "This module contains types related to the API class [`VisualScriptSceneNode`][super::VisualScriptSceneNode]."] pub (crate) mod private { # [doc = "`core class VisualScriptSceneNode` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptscenenode.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptSceneNode inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptSceneNode { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptSceneNode ; impl VisualScriptSceneNode { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptSceneNodeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn node_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptSceneNodeMethodTable :: get (get_api ()) . get_node_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_node_path (& self , path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptSceneNodeMethodTable :: get (get_api ()) . set_node_path ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSceneNode { } unsafe impl GodotObject for VisualScriptSceneNode { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSceneNode" } } impl std :: ops :: Deref for VisualScriptSceneNode { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSceneNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptSceneNode { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptSceneNode { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptSceneNode { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptSceneNode { } impl Instanciable for VisualScriptSceneNode { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptSceneNode :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptSceneNodeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_node_path : * mut sys :: godot_method_bind , pub set_node_path : * mut sys :: godot_method_bind } impl VisualScriptSceneNodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptSceneNodeMethodTable = VisualScriptSceneNodeMethodTable { class_constructor : None , get_node_path : 0 as * mut sys :: godot_method_bind , set_node_path : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptSceneNodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptSceneNode\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_node_path = (gd_api . godot_method_bind_get_method) (class_name , "get_node_path\0" . as_ptr () as * const c_char) ; table . set_node_path = (gd_api . godot_method_bind_get_method) (class_name , "set_node_path\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_scene_node::private::VisualScriptSceneNode;
            
            pub(crate) mod visual_script_scene_tree {
                # ! [doc = "This module contains types related to the API class [`VisualScriptSceneTree`][super::VisualScriptSceneTree]."] pub (crate) mod private { # [doc = "`core class VisualScriptSceneTree` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptscenetree.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptSceneTree inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptSceneTree { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptSceneTree ; impl VisualScriptSceneTree { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptSceneTreeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSceneTree { } unsafe impl GodotObject for VisualScriptSceneTree { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSceneTree" } } impl std :: ops :: Deref for VisualScriptSceneTree { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSceneTree { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptSceneTree { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptSceneTree { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptSceneTree { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptSceneTree { } impl Instanciable for VisualScriptSceneTree { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptSceneTree :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptSceneTreeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptSceneTreeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptSceneTreeMethodTable = VisualScriptSceneTreeMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptSceneTreeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptSceneTree\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_scene_tree::private::VisualScriptSceneTree;
            
            pub(crate) mod visual_script_select {
                # ! [doc = "This module contains types related to the API class [`VisualScriptSelect`][super::VisualScriptSelect]."] pub (crate) mod private { # [doc = "`core class VisualScriptSelect` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptselect.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptSelect inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptSelect { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptSelect ; impl VisualScriptSelect { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptSelectMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn typed (& self) -> VariantType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptSelectMethodTable :: get (get_api ()) . get_typed ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; VariantType :: from_sys (sys :: godot_variant_type :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_typed (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptSelectMethodTable :: get (get_api ()) . set_typed ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSelect { } unsafe impl GodotObject for VisualScriptSelect { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSelect" } } impl std :: ops :: Deref for VisualScriptSelect { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSelect { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptSelect { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptSelect { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptSelect { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptSelect { } impl Instanciable for VisualScriptSelect { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptSelect :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptSelectMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_typed : * mut sys :: godot_method_bind , pub set_typed : * mut sys :: godot_method_bind } impl VisualScriptSelectMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptSelectMethodTable = VisualScriptSelectMethodTable { class_constructor : None , get_typed : 0 as * mut sys :: godot_method_bind , set_typed : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptSelectMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptSelect\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_typed = (gd_api . godot_method_bind_get_method) (class_name , "get_typed\0" . as_ptr () as * const c_char) ; table . set_typed = (gd_api . godot_method_bind_get_method) (class_name , "set_typed\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_select::private::VisualScriptSelect;
            
            pub(crate) mod visual_script_self {
                # ! [doc = "This module contains types related to the API class [`VisualScriptSelf`][super::VisualScriptSelf]."] pub (crate) mod private { # [doc = "`core class VisualScriptSelf` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptself.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptSelf inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptSelf { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptSelf ; impl VisualScriptSelf { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptSelfMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSelf { } unsafe impl GodotObject for VisualScriptSelf { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSelf" } } impl std :: ops :: Deref for VisualScriptSelf { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSelf { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptSelf { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptSelf { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptSelf { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptSelf { } impl Instanciable for VisualScriptSelf { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptSelf :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptSelfMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptSelfMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptSelfMethodTable = VisualScriptSelfMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptSelfMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptSelf\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_self::private::VisualScriptSelf;
            
            pub(crate) mod visual_script_sequence {
                # ! [doc = "This module contains types related to the API class [`VisualScriptSequence`][super::VisualScriptSequence]."] pub (crate) mod private { # [doc = "`core class VisualScriptSequence` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptsequence.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptSequence inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptSequence { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptSequence ; impl VisualScriptSequence { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptSequenceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn steps (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptSequenceMethodTable :: get (get_api ()) . get_steps ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_steps (& self , steps : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptSequenceMethodTable :: get (get_api ()) . set_steps ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , steps as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSequence { } unsafe impl GodotObject for VisualScriptSequence { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSequence" } } impl std :: ops :: Deref for VisualScriptSequence { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSequence { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptSequence { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptSequence { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptSequence { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptSequence { } impl Instanciable for VisualScriptSequence { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptSequence :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptSequenceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_steps : * mut sys :: godot_method_bind , pub set_steps : * mut sys :: godot_method_bind } impl VisualScriptSequenceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptSequenceMethodTable = VisualScriptSequenceMethodTable { class_constructor : None , get_steps : 0 as * mut sys :: godot_method_bind , set_steps : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptSequenceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptSequence\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_steps = (gd_api . godot_method_bind_get_method) (class_name , "get_steps\0" . as_ptr () as * const c_char) ; table . set_steps = (gd_api . godot_method_bind_get_method) (class_name , "set_steps\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_sequence::private::VisualScriptSequence;
            
            pub(crate) mod visual_script_sub_call {
                # ! [doc = "This module contains types related to the API class [`VisualScriptSubCall`][super::VisualScriptSubCall]."] pub (crate) mod private { # [doc = "`core class VisualScriptSubCall` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptsubcall.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptSubCall inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptSubCall { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptSubCall ; impl VisualScriptSubCall { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptSubCallMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSubCall { } unsafe impl GodotObject for VisualScriptSubCall { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSubCall" } } impl std :: ops :: Deref for VisualScriptSubCall { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSubCall { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptSubCall { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptSubCall { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptSubCall { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptSubCall { } impl Instanciable for VisualScriptSubCall { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptSubCall :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptSubCallMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptSubCallMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptSubCallMethodTable = VisualScriptSubCallMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptSubCallMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptSubCall\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_sub_call::private::VisualScriptSubCall;
            
            pub(crate) mod visual_script_switch {
                # ! [doc = "This module contains types related to the API class [`VisualScriptSwitch`][super::VisualScriptSwitch]."] pub (crate) mod private { # [doc = "`core class VisualScriptSwitch` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptswitch.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptSwitch inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptSwitch { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptSwitch ; impl VisualScriptSwitch { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptSwitchMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptSwitch { } unsafe impl GodotObject for VisualScriptSwitch { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptSwitch" } } impl std :: ops :: Deref for VisualScriptSwitch { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptSwitch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptSwitch { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptSwitch { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptSwitch { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptSwitch { } impl Instanciable for VisualScriptSwitch { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptSwitch :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptSwitchMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptSwitchMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptSwitchMethodTable = VisualScriptSwitchMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptSwitchMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptSwitch\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_switch::private::VisualScriptSwitch;
            
            pub(crate) mod visual_script_type_cast {
                # ! [doc = "This module contains types related to the API class [`VisualScriptTypeCast`][super::VisualScriptTypeCast]."] pub (crate) mod private { # [doc = "`core class VisualScriptTypeCast` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscripttypecast.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptTypeCast inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptTypeCast { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptTypeCast ; impl VisualScriptTypeCast { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptTypeCastMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn base_script (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptTypeCastMethodTable :: get (get_api ()) . get_base_script ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn base_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptTypeCastMethodTable :: get (get_api ()) . get_base_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_script (& self , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptTypeCastMethodTable :: get (get_api ()) . set_base_script ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_type (& self , type_ : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptTypeCastMethodTable :: get (get_api ()) . set_base_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , type_ . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptTypeCast { } unsafe impl GodotObject for VisualScriptTypeCast { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptTypeCast" } } impl std :: ops :: Deref for VisualScriptTypeCast { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptTypeCast { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptTypeCast { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptTypeCast { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptTypeCast { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptTypeCast { } impl Instanciable for VisualScriptTypeCast { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptTypeCast :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptTypeCastMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_base_script : * mut sys :: godot_method_bind , pub get_base_type : * mut sys :: godot_method_bind , pub set_base_script : * mut sys :: godot_method_bind , pub set_base_type : * mut sys :: godot_method_bind } impl VisualScriptTypeCastMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptTypeCastMethodTable = VisualScriptTypeCastMethodTable { class_constructor : None , get_base_script : 0 as * mut sys :: godot_method_bind , get_base_type : 0 as * mut sys :: godot_method_bind , set_base_script : 0 as * mut sys :: godot_method_bind , set_base_type : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptTypeCastMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptTypeCast\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_base_script = (gd_api . godot_method_bind_get_method) (class_name , "get_base_script\0" . as_ptr () as * const c_char) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\0" . as_ptr () as * const c_char) ; table . set_base_script = (gd_api . godot_method_bind_get_method) (class_name , "set_base_script\0" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_type_cast::private::VisualScriptTypeCast;
            
            pub(crate) mod visual_script_variable_get {
                # ! [doc = "This module contains types related to the API class [`VisualScriptVariableGet`][super::VisualScriptVariableGet]."] pub (crate) mod private { # [doc = "`core class VisualScriptVariableGet` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptvariableget.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptVariableGet inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptVariableGet { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptVariableGet ; impl VisualScriptVariableGet { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptVariableGetMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn variable (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptVariableGetMethodTable :: get (get_api ()) . get_variable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_variable (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptVariableGetMethodTable :: get (get_api ()) . set_variable ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptVariableGet { } unsafe impl GodotObject for VisualScriptVariableGet { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptVariableGet" } } impl std :: ops :: Deref for VisualScriptVariableGet { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptVariableGet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptVariableGet { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptVariableGet { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptVariableGet { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptVariableGet { } impl Instanciable for VisualScriptVariableGet { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptVariableGet :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptVariableGetMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_variable : * mut sys :: godot_method_bind , pub set_variable : * mut sys :: godot_method_bind } impl VisualScriptVariableGetMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptVariableGetMethodTable = VisualScriptVariableGetMethodTable { class_constructor : None , get_variable : 0 as * mut sys :: godot_method_bind , set_variable : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptVariableGetMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptVariableGet\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_variable = (gd_api . godot_method_bind_get_method) (class_name , "get_variable\0" . as_ptr () as * const c_char) ; table . set_variable = (gd_api . godot_method_bind_get_method) (class_name , "set_variable\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_variable_get::private::VisualScriptVariableGet;
            
            pub(crate) mod visual_script_variable_set {
                # ! [doc = "This module contains types related to the API class [`VisualScriptVariableSet`][super::VisualScriptVariableSet]."] pub (crate) mod private { # [doc = "`core class VisualScriptVariableSet` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptvariableset.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptVariableSet inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptVariableSet { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptVariableSet ; impl VisualScriptVariableSet { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptVariableSetMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn variable (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptVariableSetMethodTable :: get (get_api ()) . get_variable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_variable (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptVariableSetMethodTable :: get (get_api ()) . set_variable ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptVariableSet { } unsafe impl GodotObject for VisualScriptVariableSet { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptVariableSet" } } impl std :: ops :: Deref for VisualScriptVariableSet { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptVariableSet { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptVariableSet { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptVariableSet { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptVariableSet { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptVariableSet { } impl Instanciable for VisualScriptVariableSet { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptVariableSet :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptVariableSetMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_variable : * mut sys :: godot_method_bind , pub set_variable : * mut sys :: godot_method_bind } impl VisualScriptVariableSetMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptVariableSetMethodTable = VisualScriptVariableSetMethodTable { class_constructor : None , get_variable : 0 as * mut sys :: godot_method_bind , set_variable : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptVariableSetMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptVariableSet\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_variable = (gd_api . godot_method_bind_get_method) (class_name , "get_variable\0" . as_ptr () as * const c_char) ; table . set_variable = (gd_api . godot_method_bind_get_method) (class_name , "set_variable\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_variable_set::private::VisualScriptVariableSet;
            
            pub(crate) mod visual_script_while {
                # ! [doc = "This module contains types related to the API class [`VisualScriptWhile`][super::VisualScriptWhile]."] pub (crate) mod private { # [doc = "`core class VisualScriptWhile` inherits `VisualScriptNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptwhile.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptWhile inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptWhile { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptWhile ; impl VisualScriptWhile { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptWhileMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptWhile { } unsafe impl GodotObject for VisualScriptWhile { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptWhile" } } impl std :: ops :: Deref for VisualScriptWhile { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptWhile { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptWhile { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptWhile { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptWhile { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptWhile { } impl Instanciable for VisualScriptWhile { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptWhile :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptWhileMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualScriptWhileMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptWhileMethodTable = VisualScriptWhileMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptWhileMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptWhile\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_while::private::VisualScriptWhile;
            
            pub mod visual_script_yield {
                # ! [doc = "This module contains types related to the API class [`VisualScriptYield`][super::VisualScriptYield]."] pub (crate) mod private { # [doc = "`core class VisualScriptYield` inherits `VisualScriptNode` (reference-counted).\n\nThis class has related types in the [`visual_script_yield`][super::visual_script_yield] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptyield.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptYield inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptYield { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptYield ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct YieldMode (pub i64) ; impl YieldMode { pub const FRAME : YieldMode = YieldMode (1i64) ; pub const PHYSICS_FRAME : YieldMode = YieldMode (2i64) ; pub const WAIT : YieldMode = YieldMode (3i64) ; } impl From < i64 > for YieldMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < YieldMode > for i64 { # [inline] fn from (v : YieldMode) -> Self { v . 0 } } impl FromVariant for YieldMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptYield { pub const YIELD_FRAME : i64 = 1i64 ; pub const YIELD_PHYSICS_FRAME : i64 = 2i64 ; pub const YIELD_WAIT : i64 = 3i64 ; } impl VisualScriptYield { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptYieldMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn wait_time (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptYieldMethodTable :: get (get_api ()) . get_wait_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn yield_mode (& self) -> crate :: generated :: visual_script_yield :: YieldMode { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptYieldMethodTable :: get (get_api ()) . get_yield_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_script_yield :: YieldMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_wait_time (& self , sec : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptYieldMethodTable :: get (get_api ()) . set_wait_time ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , sec as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_yield_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptYieldMethodTable :: get (get_api ()) . set_yield_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptYield { } unsafe impl GodotObject for VisualScriptYield { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptYield" } } impl std :: ops :: Deref for VisualScriptYield { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptYield { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptYield { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptYield { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptYield { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptYield { } impl Instanciable for VisualScriptYield { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptYield :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptYieldMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_wait_time : * mut sys :: godot_method_bind , pub get_yield_mode : * mut sys :: godot_method_bind , pub set_wait_time : * mut sys :: godot_method_bind , pub set_yield_mode : * mut sys :: godot_method_bind } impl VisualScriptYieldMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptYieldMethodTable = VisualScriptYieldMethodTable { class_constructor : None , get_wait_time : 0 as * mut sys :: godot_method_bind , get_yield_mode : 0 as * mut sys :: godot_method_bind , set_wait_time : 0 as * mut sys :: godot_method_bind , set_yield_mode : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptYieldMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptYield\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_wait_time = (gd_api . godot_method_bind_get_method) (class_name , "get_wait_time\0" . as_ptr () as * const c_char) ; table . get_yield_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_yield_mode\0" . as_ptr () as * const c_char) ; table . set_wait_time = (gd_api . godot_method_bind_get_method) (class_name , "set_wait_time\0" . as_ptr () as * const c_char) ; table . set_yield_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_yield_mode\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_yield::private::VisualScriptYield;
            
            pub mod visual_script_yield_signal {
                # ! [doc = "This module contains types related to the API class [`VisualScriptYieldSignal`][super::VisualScriptYieldSignal]."] pub (crate) mod private { # [doc = "`core class VisualScriptYieldSignal` inherits `VisualScriptNode` (reference-counted).\n\nThis class has related types in the [`visual_script_yield_signal`][super::visual_script_yield_signal] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscriptyieldsignal.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualScriptYieldSignal inherits methods from:\n - [VisualScriptNode](struct.VisualScriptNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptYieldSignal { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptYieldSignal ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CallMode (pub i64) ; impl CallMode { pub const SELF : CallMode = CallMode (0i64) ; pub const NODE_PATH : CallMode = CallMode (1i64) ; pub const INSTANCE : CallMode = CallMode (2i64) ; } impl From < i64 > for CallMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CallMode > for i64 { # [inline] fn from (v : CallMode) -> Self { v . 0 } } impl FromVariant for CallMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualScriptYieldSignal { pub const CALL_MODE_SELF : i64 = 0i64 ; pub const CALL_MODE_NODE_PATH : i64 = 1i64 ; pub const CALL_MODE_INSTANCE : i64 = 2i64 ; } impl VisualScriptYieldSignal { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualScriptYieldSignalMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn base_path (& self) -> NodePath { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptYieldSignalMethodTable :: get (get_api ()) . get_base_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < NodePath > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn base_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptYieldSignalMethodTable :: get (get_api ()) . get_base_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn call_mode (& self) -> crate :: generated :: visual_script_yield_signal :: CallMode { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptYieldSignalMethodTable :: get (get_api ()) . get_call_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_script_yield_signal :: CallMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn signal (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptYieldSignalMethodTable :: get (get_api ()) . get_signal ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_path (& self , base_path : impl Into < NodePath >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptYieldSignalMethodTable :: get (get_api ()) . set_base_path ; let ret = crate :: icalls :: icallvar__nodepath (method_bind , self . this . sys () . as_ptr () , base_path . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_base_type (& self , base_type : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptYieldSignalMethodTable :: get (get_api ()) . set_base_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , base_type . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_call_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptYieldSignalMethodTable :: get (get_api ()) . set_call_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_signal (& self , signal : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptYieldSignalMethodTable :: get (get_api ()) . set_signal ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , signal . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptYieldSignal { } unsafe impl GodotObject for VisualScriptYieldSignal { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualScriptYieldSignal" } } impl std :: ops :: Deref for VisualScriptYieldSignal { type Target = crate :: generated :: VisualScriptNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptYieldSignal { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualScriptNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualScriptNode > for VisualScriptYieldSignal { } unsafe impl SubClass < crate :: generated :: Resource > for VisualScriptYieldSignal { } unsafe impl SubClass < crate :: generated :: Reference > for VisualScriptYieldSignal { } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptYieldSignal { } impl Instanciable for VisualScriptYieldSignal { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualScriptYieldSignal :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptYieldSignalMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_base_path : * mut sys :: godot_method_bind , pub get_base_type : * mut sys :: godot_method_bind , pub get_call_mode : * mut sys :: godot_method_bind , pub get_signal : * mut sys :: godot_method_bind , pub set_base_path : * mut sys :: godot_method_bind , pub set_base_type : * mut sys :: godot_method_bind , pub set_call_mode : * mut sys :: godot_method_bind , pub set_signal : * mut sys :: godot_method_bind } impl VisualScriptYieldSignalMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptYieldSignalMethodTable = VisualScriptYieldSignalMethodTable { class_constructor : None , get_base_path : 0 as * mut sys :: godot_method_bind , get_base_type : 0 as * mut sys :: godot_method_bind , get_call_mode : 0 as * mut sys :: godot_method_bind , get_signal : 0 as * mut sys :: godot_method_bind , set_base_path : 0 as * mut sys :: godot_method_bind , set_base_type : 0 as * mut sys :: godot_method_bind , set_call_mode : 0 as * mut sys :: godot_method_bind , set_signal : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptYieldSignalMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualScriptYieldSignal\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_base_path = (gd_api . godot_method_bind_get_method) (class_name , "get_base_path\0" . as_ptr () as * const c_char) ; table . get_base_type = (gd_api . godot_method_bind_get_method) (class_name , "get_base_type\0" . as_ptr () as * const c_char) ; table . get_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_call_mode\0" . as_ptr () as * const c_char) ; table . get_signal = (gd_api . godot_method_bind_get_method) (class_name , "get_signal\0" . as_ptr () as * const c_char) ; table . set_base_path = (gd_api . godot_method_bind_get_method) (class_name , "set_base_path\0" . as_ptr () as * const c_char) ; table . set_base_type = (gd_api . godot_method_bind_get_method) (class_name , "set_base_type\0" . as_ptr () as * const c_char) ; table . set_call_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_call_mode\0" . as_ptr () as * const c_char) ; table . set_signal = (gd_api . godot_method_bind_get_method) (class_name , "set_signal\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_yield_signal::private::VisualScriptYieldSignal;
            
            pub mod visual_server {
                # ! [doc = "This module contains types related to the API class [`VisualServer`][super::VisualServer]."] pub (crate) mod private { # [doc = "`core singleton class VisualServer` inherits `Object` (manually managed).\n\nThis class has related types in the [`visual_server`][super::visual_server] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nVisualServer inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualServer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualServer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ArrayFormat (pub i64) ; impl ArrayFormat { pub const FORMAT_VERTEX : ArrayFormat = ArrayFormat (1i64) ; pub const FORMAT_NORMAL : ArrayFormat = ArrayFormat (2i64) ; pub const FORMAT_TANGENT : ArrayFormat = ArrayFormat (4i64) ; pub const FORMAT_COLOR : ArrayFormat = ArrayFormat (8i64) ; pub const FORMAT_TEX_UV : ArrayFormat = ArrayFormat (16i64) ; pub const FORMAT_TEX_UV2 : ArrayFormat = ArrayFormat (32i64) ; pub const FORMAT_BONES : ArrayFormat = ArrayFormat (64i64) ; pub const FORMAT_WEIGHTS : ArrayFormat = ArrayFormat (128i64) ; pub const FORMAT_INDEX : ArrayFormat = ArrayFormat (256i64) ; pub const COMPRESS_VERTEX : ArrayFormat = ArrayFormat (512i64) ; pub const COMPRESS_NORMAL : ArrayFormat = ArrayFormat (1024i64) ; pub const COMPRESS_TANGENT : ArrayFormat = ArrayFormat (2048i64) ; pub const COMPRESS_COLOR : ArrayFormat = ArrayFormat (4096i64) ; pub const COMPRESS_TEX_UV : ArrayFormat = ArrayFormat (8192i64) ; pub const COMPRESS_TEX_UV2 : ArrayFormat = ArrayFormat (16384i64) ; pub const COMPRESS_BONES : ArrayFormat = ArrayFormat (32768i64) ; pub const COMPRESS_WEIGHTS : ArrayFormat = ArrayFormat (65536i64) ; pub const COMPRESS_INDEX : ArrayFormat = ArrayFormat (131072i64) ; pub const FLAG_USE_2D_VERTICES : ArrayFormat = ArrayFormat (262144i64) ; pub const FLAG_USE_16_BIT_BONES : ArrayFormat = ArrayFormat (524288i64) ; pub const FLAG_USE_OCTAHEDRAL_COMPRESSION : ArrayFormat = ArrayFormat (2097152i64) ; pub const COMPRESS_DEFAULT : ArrayFormat = ArrayFormat (2194432i64) ; } impl From < i64 > for ArrayFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ArrayFormat > for i64 { # [inline] fn from (v : ArrayFormat) -> Self { v . 0 } } impl FromVariant for ArrayFormat { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ArrayType (pub i64) ; impl ArrayType { pub const VERTEX : ArrayType = ArrayType (0i64) ; pub const NORMAL : ArrayType = ArrayType (1i64) ; pub const TANGENT : ArrayType = ArrayType (2i64) ; pub const COLOR : ArrayType = ArrayType (3i64) ; pub const TEX_UV : ArrayType = ArrayType (4i64) ; pub const TEX_UV2 : ArrayType = ArrayType (5i64) ; pub const BONES : ArrayType = ArrayType (6i64) ; pub const WEIGHTS : ArrayType = ArrayType (7i64) ; pub const INDEX : ArrayType = ArrayType (8i64) ; pub const MAX : ArrayType = ArrayType (9i64) ; } impl From < i64 > for ArrayType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ArrayType > for i64 { # [inline] fn from (v : ArrayType) -> Self { v . 0 } } impl FromVariant for ArrayType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct BlendShapeMode (pub i64) ; impl BlendShapeMode { pub const NORMALIZED : BlendShapeMode = BlendShapeMode (0i64) ; pub const RELATIVE : BlendShapeMode = BlendShapeMode (1i64) ; } impl From < i64 > for BlendShapeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < BlendShapeMode > for i64 { # [inline] fn from (v : BlendShapeMode) -> Self { v . 0 } } impl FromVariant for BlendShapeMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CanvasLightMode (pub i64) ; impl CanvasLightMode { pub const ADD : CanvasLightMode = CanvasLightMode (0i64) ; pub const SUB : CanvasLightMode = CanvasLightMode (1i64) ; pub const MIX : CanvasLightMode = CanvasLightMode (2i64) ; pub const MASK : CanvasLightMode = CanvasLightMode (3i64) ; } impl From < i64 > for CanvasLightMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CanvasLightMode > for i64 { # [inline] fn from (v : CanvasLightMode) -> Self { v . 0 } } impl FromVariant for CanvasLightMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CanvasLightShadowFilter (pub i64) ; impl CanvasLightShadowFilter { pub const NONE : CanvasLightShadowFilter = CanvasLightShadowFilter (0i64) ; pub const PCF3 : CanvasLightShadowFilter = CanvasLightShadowFilter (1i64) ; pub const PCF5 : CanvasLightShadowFilter = CanvasLightShadowFilter (2i64) ; pub const PCF7 : CanvasLightShadowFilter = CanvasLightShadowFilter (3i64) ; pub const PCF9 : CanvasLightShadowFilter = CanvasLightShadowFilter (4i64) ; pub const PCF13 : CanvasLightShadowFilter = CanvasLightShadowFilter (5i64) ; } impl From < i64 > for CanvasLightShadowFilter { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CanvasLightShadowFilter > for i64 { # [inline] fn from (v : CanvasLightShadowFilter) -> Self { v . 0 } } impl FromVariant for CanvasLightShadowFilter { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CanvasOccluderPolygonCullMode (pub i64) ; impl CanvasOccluderPolygonCullMode { pub const DISABLED : CanvasOccluderPolygonCullMode = CanvasOccluderPolygonCullMode (0i64) ; pub const CLOCKWISE : CanvasOccluderPolygonCullMode = CanvasOccluderPolygonCullMode (1i64) ; pub const COUNTER_CLOCKWISE : CanvasOccluderPolygonCullMode = CanvasOccluderPolygonCullMode (2i64) ; } impl From < i64 > for CanvasOccluderPolygonCullMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CanvasOccluderPolygonCullMode > for i64 { # [inline] fn from (v : CanvasOccluderPolygonCullMode) -> Self { v . 0 } } impl FromVariant for CanvasOccluderPolygonCullMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ChangedPriority (pub i64) ; impl ChangedPriority { pub const ANY : ChangedPriority = ChangedPriority (0i64) ; pub const LOW : ChangedPriority = ChangedPriority (1i64) ; pub const HIGH : ChangedPriority = ChangedPriority (2i64) ; } impl From < i64 > for ChangedPriority { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ChangedPriority > for i64 { # [inline] fn from (v : ChangedPriority) -> Self { v . 0 } } impl FromVariant for ChangedPriority { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CubeMapSide (pub i64) ; impl CubeMapSide { pub const LEFT : CubeMapSide = CubeMapSide (0i64) ; pub const RIGHT : CubeMapSide = CubeMapSide (1i64) ; pub const BOTTOM : CubeMapSide = CubeMapSide (2i64) ; pub const TOP : CubeMapSide = CubeMapSide (3i64) ; pub const FRONT : CubeMapSide = CubeMapSide (4i64) ; pub const BACK : CubeMapSide = CubeMapSide (5i64) ; } impl From < i64 > for CubeMapSide { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CubeMapSide > for i64 { # [inline] fn from (v : CubeMapSide) -> Self { v . 0 } } impl FromVariant for CubeMapSide { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EnvironmentBg (pub i64) ; impl EnvironmentBg { pub const CLEAR_COLOR : EnvironmentBg = EnvironmentBg (0i64) ; pub const COLOR : EnvironmentBg = EnvironmentBg (1i64) ; pub const SKY : EnvironmentBg = EnvironmentBg (2i64) ; pub const COLOR_SKY : EnvironmentBg = EnvironmentBg (3i64) ; pub const CANVAS : EnvironmentBg = EnvironmentBg (4i64) ; pub const KEEP : EnvironmentBg = EnvironmentBg (5i64) ; pub const MAX : EnvironmentBg = EnvironmentBg (7i64) ; } impl From < i64 > for EnvironmentBg { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EnvironmentBg > for i64 { # [inline] fn from (v : EnvironmentBg) -> Self { v . 0 } } impl FromVariant for EnvironmentBg { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EnvironmentDofBlurQuality (pub i64) ; impl EnvironmentDofBlurQuality { pub const LOW : EnvironmentDofBlurQuality = EnvironmentDofBlurQuality (0i64) ; pub const MEDIUM : EnvironmentDofBlurQuality = EnvironmentDofBlurQuality (1i64) ; pub const HIGH : EnvironmentDofBlurQuality = EnvironmentDofBlurQuality (2i64) ; } impl From < i64 > for EnvironmentDofBlurQuality { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EnvironmentDofBlurQuality > for i64 { # [inline] fn from (v : EnvironmentDofBlurQuality) -> Self { v . 0 } } impl FromVariant for EnvironmentDofBlurQuality { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EnvironmentGlowBlendMode (pub i64) ; impl EnvironmentGlowBlendMode { pub const ADDITIVE : EnvironmentGlowBlendMode = EnvironmentGlowBlendMode (0i64) ; pub const SCREEN : EnvironmentGlowBlendMode = EnvironmentGlowBlendMode (1i64) ; pub const SOFTLIGHT : EnvironmentGlowBlendMode = EnvironmentGlowBlendMode (2i64) ; pub const REPLACE : EnvironmentGlowBlendMode = EnvironmentGlowBlendMode (3i64) ; } impl From < i64 > for EnvironmentGlowBlendMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EnvironmentGlowBlendMode > for i64 { # [inline] fn from (v : EnvironmentGlowBlendMode) -> Self { v . 0 } } impl FromVariant for EnvironmentGlowBlendMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EnvironmentSsaoBlur (pub i64) ; impl EnvironmentSsaoBlur { pub const DISABLED : EnvironmentSsaoBlur = EnvironmentSsaoBlur (0i64) ; pub const _1X1 : EnvironmentSsaoBlur = EnvironmentSsaoBlur (1i64) ; pub const _2X2 : EnvironmentSsaoBlur = EnvironmentSsaoBlur (2i64) ; pub const _3X3 : EnvironmentSsaoBlur = EnvironmentSsaoBlur (3i64) ; } impl From < i64 > for EnvironmentSsaoBlur { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EnvironmentSsaoBlur > for i64 { # [inline] fn from (v : EnvironmentSsaoBlur) -> Self { v . 0 } } impl FromVariant for EnvironmentSsaoBlur { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EnvironmentSsaoQuality (pub i64) ; impl EnvironmentSsaoQuality { pub const LOW : EnvironmentSsaoQuality = EnvironmentSsaoQuality (0i64) ; pub const MEDIUM : EnvironmentSsaoQuality = EnvironmentSsaoQuality (1i64) ; pub const HIGH : EnvironmentSsaoQuality = EnvironmentSsaoQuality (2i64) ; } impl From < i64 > for EnvironmentSsaoQuality { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EnvironmentSsaoQuality > for i64 { # [inline] fn from (v : EnvironmentSsaoQuality) -> Self { v . 0 } } impl FromVariant for EnvironmentSsaoQuality { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct EnvironmentToneMapper (pub i64) ; impl EnvironmentToneMapper { pub const LINEAR : EnvironmentToneMapper = EnvironmentToneMapper (0i64) ; pub const REINHARD : EnvironmentToneMapper = EnvironmentToneMapper (1i64) ; pub const FILMIC : EnvironmentToneMapper = EnvironmentToneMapper (2i64) ; pub const ACES : EnvironmentToneMapper = EnvironmentToneMapper (3i64) ; pub const ACES_FITTED : EnvironmentToneMapper = EnvironmentToneMapper (4i64) ; } impl From < i64 > for EnvironmentToneMapper { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < EnvironmentToneMapper > for i64 { # [inline] fn from (v : EnvironmentToneMapper) -> Self { v . 0 } } impl FromVariant for EnvironmentToneMapper { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Features (pub i64) ; impl Features { pub const SHADERS : Features = Features (0i64) ; pub const MULTITHREADED : Features = Features (1i64) ; } impl From < i64 > for Features { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Features > for i64 { # [inline] fn from (v : Features) -> Self { v . 0 } } impl FromVariant for Features { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct InstanceFlags (pub i64) ; impl InstanceFlags { pub const USE_BAKED_LIGHT : InstanceFlags = InstanceFlags (0i64) ; pub const DRAW_NEXT_FRAME_IF_VISIBLE : InstanceFlags = InstanceFlags (1i64) ; pub const MAX : InstanceFlags = InstanceFlags (2i64) ; } impl From < i64 > for InstanceFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < InstanceFlags > for i64 { # [inline] fn from (v : InstanceFlags) -> Self { v . 0 } } impl FromVariant for InstanceFlags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct InstanceType (pub i64) ; impl InstanceType { pub const NONE : InstanceType = InstanceType (0i64) ; pub const MESH : InstanceType = InstanceType (1i64) ; pub const MULTIMESH : InstanceType = InstanceType (2i64) ; pub const IMMEDIATE : InstanceType = InstanceType (3i64) ; pub const PARTICLES : InstanceType = InstanceType (4i64) ; pub const LIGHT : InstanceType = InstanceType (5i64) ; pub const REFLECTION_PROBE : InstanceType = InstanceType (6i64) ; pub const GI_PROBE : InstanceType = InstanceType (7i64) ; pub const LIGHTMAP_CAPTURE : InstanceType = InstanceType (8i64) ; pub const MAX : InstanceType = InstanceType (9i64) ; pub const GEOMETRY_MASK : InstanceType = InstanceType (30i64) ; } impl From < i64 > for InstanceType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < InstanceType > for i64 { # [inline] fn from (v : InstanceType) -> Self { v . 0 } } impl FromVariant for InstanceType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightBakeMode (pub i64) ; impl LightBakeMode { pub const DISABLED : LightBakeMode = LightBakeMode (0i64) ; pub const INDIRECT : LightBakeMode = LightBakeMode (1i64) ; pub const ALL : LightBakeMode = LightBakeMode (2i64) ; } impl From < i64 > for LightBakeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightBakeMode > for i64 { # [inline] fn from (v : LightBakeMode) -> Self { v . 0 } } impl FromVariant for LightBakeMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightDirectionalShadowDepthRangeMode (pub i64) ; impl LightDirectionalShadowDepthRangeMode { pub const STABLE : LightDirectionalShadowDepthRangeMode = LightDirectionalShadowDepthRangeMode (0i64) ; pub const OPTIMIZED : LightDirectionalShadowDepthRangeMode = LightDirectionalShadowDepthRangeMode (1i64) ; } impl From < i64 > for LightDirectionalShadowDepthRangeMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightDirectionalShadowDepthRangeMode > for i64 { # [inline] fn from (v : LightDirectionalShadowDepthRangeMode) -> Self { v . 0 } } impl FromVariant for LightDirectionalShadowDepthRangeMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightDirectionalShadowMode (pub i64) ; impl LightDirectionalShadowMode { pub const ORTHOGONAL : LightDirectionalShadowMode = LightDirectionalShadowMode (0i64) ; pub const PARALLEL_2_SPLITS : LightDirectionalShadowMode = LightDirectionalShadowMode (1i64) ; pub const PARALLEL_4_SPLITS : LightDirectionalShadowMode = LightDirectionalShadowMode (2i64) ; } impl From < i64 > for LightDirectionalShadowMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightDirectionalShadowMode > for i64 { # [inline] fn from (v : LightDirectionalShadowMode) -> Self { v . 0 } } impl FromVariant for LightDirectionalShadowMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightOmniShadowDetail (pub i64) ; impl LightOmniShadowDetail { pub const VERTICAL : LightOmniShadowDetail = LightOmniShadowDetail (0i64) ; pub const HORIZONTAL : LightOmniShadowDetail = LightOmniShadowDetail (1i64) ; } impl From < i64 > for LightOmniShadowDetail { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightOmniShadowDetail > for i64 { # [inline] fn from (v : LightOmniShadowDetail) -> Self { v . 0 } } impl FromVariant for LightOmniShadowDetail { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightOmniShadowMode (pub i64) ; impl LightOmniShadowMode { pub const DUAL_PARABOLOID : LightOmniShadowMode = LightOmniShadowMode (0i64) ; pub const CUBE : LightOmniShadowMode = LightOmniShadowMode (1i64) ; } impl From < i64 > for LightOmniShadowMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightOmniShadowMode > for i64 { # [inline] fn from (v : LightOmniShadowMode) -> Self { v . 0 } } impl FromVariant for LightOmniShadowMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightParam (pub i64) ; impl LightParam { pub const ENERGY : LightParam = LightParam (0i64) ; pub const INDIRECT_ENERGY : LightParam = LightParam (1i64) ; pub const SIZE : LightParam = LightParam (2i64) ; pub const SPECULAR : LightParam = LightParam (3i64) ; pub const RANGE : LightParam = LightParam (4i64) ; pub const ATTENUATION : LightParam = LightParam (5i64) ; pub const SPOT_ANGLE : LightParam = LightParam (6i64) ; pub const SPOT_ATTENUATION : LightParam = LightParam (7i64) ; pub const CONTACT_SHADOW_SIZE : LightParam = LightParam (8i64) ; pub const SHADOW_MAX_DISTANCE : LightParam = LightParam (9i64) ; pub const SHADOW_SPLIT_1_OFFSET : LightParam = LightParam (10i64) ; pub const SHADOW_SPLIT_2_OFFSET : LightParam = LightParam (11i64) ; pub const SHADOW_SPLIT_3_OFFSET : LightParam = LightParam (12i64) ; pub const SHADOW_NORMAL_BIAS : LightParam = LightParam (13i64) ; pub const SHADOW_BIAS : LightParam = LightParam (14i64) ; pub const SHADOW_BIAS_SPLIT_SCALE : LightParam = LightParam (15i64) ; pub const MAX : LightParam = LightParam (16i64) ; } impl From < i64 > for LightParam { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightParam > for i64 { # [inline] fn from (v : LightParam) -> Self { v . 0 } } impl FromVariant for LightParam { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct LightType (pub i64) ; impl LightType { pub const DIRECTIONAL : LightType = LightType (0i64) ; pub const OMNI : LightType = LightType (1i64) ; pub const SPOT : LightType = LightType (2i64) ; } impl From < i64 > for LightType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < LightType > for i64 { # [inline] fn from (v : LightType) -> Self { v . 0 } } impl FromVariant for LightType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MultimeshColorFormat (pub i64) ; impl MultimeshColorFormat { pub const NONE : MultimeshColorFormat = MultimeshColorFormat (0i64) ; pub const _8BIT : MultimeshColorFormat = MultimeshColorFormat (1i64) ; pub const FLOAT : MultimeshColorFormat = MultimeshColorFormat (2i64) ; } impl From < i64 > for MultimeshColorFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MultimeshColorFormat > for i64 { # [inline] fn from (v : MultimeshColorFormat) -> Self { v . 0 } } impl FromVariant for MultimeshColorFormat { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MultimeshCustomDataFormat (pub i64) ; impl MultimeshCustomDataFormat { pub const NONE : MultimeshCustomDataFormat = MultimeshCustomDataFormat (0i64) ; pub const _8BIT : MultimeshCustomDataFormat = MultimeshCustomDataFormat (1i64) ; pub const FLOAT : MultimeshCustomDataFormat = MultimeshCustomDataFormat (2i64) ; } impl From < i64 > for MultimeshCustomDataFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MultimeshCustomDataFormat > for i64 { # [inline] fn from (v : MultimeshCustomDataFormat) -> Self { v . 0 } } impl FromVariant for MultimeshCustomDataFormat { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct MultimeshTransformFormat (pub i64) ; impl MultimeshTransformFormat { pub const _2D : MultimeshTransformFormat = MultimeshTransformFormat (0i64) ; pub const _3D : MultimeshTransformFormat = MultimeshTransformFormat (1i64) ; } impl From < i64 > for MultimeshTransformFormat { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < MultimeshTransformFormat > for i64 { # [inline] fn from (v : MultimeshTransformFormat) -> Self { v . 0 } } impl FromVariant for MultimeshTransformFormat { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct NinePatchAxisMode (pub i64) ; impl NinePatchAxisMode { pub const STRETCH : NinePatchAxisMode = NinePatchAxisMode (0i64) ; pub const TILE : NinePatchAxisMode = NinePatchAxisMode (1i64) ; pub const TILE_FIT : NinePatchAxisMode = NinePatchAxisMode (2i64) ; } impl From < i64 > for NinePatchAxisMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < NinePatchAxisMode > for i64 { # [inline] fn from (v : NinePatchAxisMode) -> Self { v . 0 } } impl FromVariant for NinePatchAxisMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ParticlesDrawOrder (pub i64) ; impl ParticlesDrawOrder { pub const INDEX : ParticlesDrawOrder = ParticlesDrawOrder (0i64) ; pub const LIFETIME : ParticlesDrawOrder = ParticlesDrawOrder (1i64) ; pub const VIEW_DEPTH : ParticlesDrawOrder = ParticlesDrawOrder (2i64) ; } impl From < i64 > for ParticlesDrawOrder { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ParticlesDrawOrder > for i64 { # [inline] fn from (v : ParticlesDrawOrder) -> Self { v . 0 } } impl FromVariant for ParticlesDrawOrder { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PrimitiveType (pub i64) ; impl PrimitiveType { pub const POINTS : PrimitiveType = PrimitiveType (0i64) ; pub const LINES : PrimitiveType = PrimitiveType (1i64) ; pub const LINE_STRIP : PrimitiveType = PrimitiveType (2i64) ; pub const LINE_LOOP : PrimitiveType = PrimitiveType (3i64) ; pub const TRIANGLES : PrimitiveType = PrimitiveType (4i64) ; pub const TRIANGLE_STRIP : PrimitiveType = PrimitiveType (5i64) ; pub const TRIANGLE_FAN : PrimitiveType = PrimitiveType (6i64) ; pub const MAX : PrimitiveType = PrimitiveType (7i64) ; } impl From < i64 > for PrimitiveType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PrimitiveType > for i64 { # [inline] fn from (v : PrimitiveType) -> Self { v . 0 } } impl FromVariant for PrimitiveType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ReflectionProbeUpdateMode (pub i64) ; impl ReflectionProbeUpdateMode { pub const ONCE : ReflectionProbeUpdateMode = ReflectionProbeUpdateMode (0i64) ; pub const ALWAYS : ReflectionProbeUpdateMode = ReflectionProbeUpdateMode (1i64) ; } impl From < i64 > for ReflectionProbeUpdateMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ReflectionProbeUpdateMode > for i64 { # [inline] fn from (v : ReflectionProbeUpdateMode) -> Self { v . 0 } } impl FromVariant for ReflectionProbeUpdateMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct RenderInfo (pub i64) ; impl RenderInfo { pub const OBJECTS_IN_FRAME : RenderInfo = RenderInfo (0i64) ; pub const VERTICES_IN_FRAME : RenderInfo = RenderInfo (1i64) ; pub const MATERIAL_CHANGES_IN_FRAME : RenderInfo = RenderInfo (2i64) ; pub const SHADER_CHANGES_IN_FRAME : RenderInfo = RenderInfo (3i64) ; pub const SHADER_COMPILES_IN_FRAME : RenderInfo = RenderInfo (4i64) ; pub const SURFACE_CHANGES_IN_FRAME : RenderInfo = RenderInfo (5i64) ; pub const DRAW_CALLS_IN_FRAME : RenderInfo = RenderInfo (6i64) ; pub const _2D_ITEMS_IN_FRAME : RenderInfo = RenderInfo (7i64) ; pub const _2D_DRAW_CALLS_IN_FRAME : RenderInfo = RenderInfo (8i64) ; pub const USAGE_VIDEO_MEM_TOTAL : RenderInfo = RenderInfo (9i64) ; pub const VIDEO_MEM_USED : RenderInfo = RenderInfo (10i64) ; pub const TEXTURE_MEM_USED : RenderInfo = RenderInfo (11i64) ; pub const VERTEX_MEM_USED : RenderInfo = RenderInfo (12i64) ; } impl From < i64 > for RenderInfo { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < RenderInfo > for i64 { # [inline] fn from (v : RenderInfo) -> Self { v . 0 } } impl FromVariant for RenderInfo { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ScenarioDebugMode (pub i64) ; impl ScenarioDebugMode { pub const DISABLED : ScenarioDebugMode = ScenarioDebugMode (0i64) ; pub const WIREFRAME : ScenarioDebugMode = ScenarioDebugMode (1i64) ; pub const OVERDRAW : ScenarioDebugMode = ScenarioDebugMode (2i64) ; pub const SHADELESS : ScenarioDebugMode = ScenarioDebugMode (3i64) ; } impl From < i64 > for ScenarioDebugMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ScenarioDebugMode > for i64 { # [inline] fn from (v : ScenarioDebugMode) -> Self { v . 0 } } impl FromVariant for ScenarioDebugMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShaderMode (pub i64) ; impl ShaderMode { pub const SPATIAL : ShaderMode = ShaderMode (0i64) ; pub const CANVAS_ITEM : ShaderMode = ShaderMode (1i64) ; pub const PARTICLES : ShaderMode = ShaderMode (2i64) ; pub const MAX : ShaderMode = ShaderMode (3i64) ; } impl From < i64 > for ShaderMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShaderMode > for i64 { # [inline] fn from (v : ShaderMode) -> Self { v . 0 } } impl FromVariant for ShaderMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ShadowCastingSetting (pub i64) ; impl ShadowCastingSetting { pub const OFF : ShadowCastingSetting = ShadowCastingSetting (0i64) ; pub const ON : ShadowCastingSetting = ShadowCastingSetting (1i64) ; pub const DOUBLE_SIDED : ShadowCastingSetting = ShadowCastingSetting (2i64) ; pub const SHADOWS_ONLY : ShadowCastingSetting = ShadowCastingSetting (3i64) ; } impl From < i64 > for ShadowCastingSetting { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ShadowCastingSetting > for i64 { # [inline] fn from (v : ShadowCastingSetting) -> Self { v . 0 } } impl FromVariant for ShadowCastingSetting { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TextureFlags (pub i64) ; impl TextureFlags { pub const FLAG_MIPMAPS : TextureFlags = TextureFlags (1i64) ; pub const FLAG_REPEAT : TextureFlags = TextureFlags (2i64) ; pub const FLAG_FILTER : TextureFlags = TextureFlags (4i64) ; pub const FLAGS_DEFAULT : TextureFlags = TextureFlags (7i64) ; pub const FLAG_ANISOTROPIC_FILTER : TextureFlags = TextureFlags (8i64) ; pub const FLAG_CONVERT_TO_LINEAR : TextureFlags = TextureFlags (16i64) ; pub const FLAG_MIRRORED_REPEAT : TextureFlags = TextureFlags (32i64) ; pub const FLAG_USED_FOR_STREAMING : TextureFlags = TextureFlags (2048i64) ; } impl From < i64 > for TextureFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TextureFlags > for i64 { # [inline] fn from (v : TextureFlags) -> Self { v . 0 } } impl FromVariant for TextureFlags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TextureType (pub i64) ; impl TextureType { pub const _2D : TextureType = TextureType (0i64) ; pub const CUBEMAP : TextureType = TextureType (2i64) ; pub const _2D_ARRAY : TextureType = TextureType (3i64) ; pub const _3D : TextureType = TextureType (4i64) ; } impl From < i64 > for TextureType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TextureType > for i64 { # [inline] fn from (v : TextureType) -> Self { v . 0 } } impl FromVariant for TextureType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ViewportClearMode (pub i64) ; impl ViewportClearMode { pub const ALWAYS : ViewportClearMode = ViewportClearMode (0i64) ; pub const NEVER : ViewportClearMode = ViewportClearMode (1i64) ; pub const ONLY_NEXT_FRAME : ViewportClearMode = ViewportClearMode (2i64) ; } impl From < i64 > for ViewportClearMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ViewportClearMode > for i64 { # [inline] fn from (v : ViewportClearMode) -> Self { v . 0 } } impl FromVariant for ViewportClearMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ViewportDebugDraw (pub i64) ; impl ViewportDebugDraw { pub const DISABLED : ViewportDebugDraw = ViewportDebugDraw (0i64) ; pub const UNSHADED : ViewportDebugDraw = ViewportDebugDraw (1i64) ; pub const OVERDRAW : ViewportDebugDraw = ViewportDebugDraw (2i64) ; pub const WIREFRAME : ViewportDebugDraw = ViewportDebugDraw (3i64) ; } impl From < i64 > for ViewportDebugDraw { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ViewportDebugDraw > for i64 { # [inline] fn from (v : ViewportDebugDraw) -> Self { v . 0 } } impl FromVariant for ViewportDebugDraw { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ViewportMsaa (pub i64) ; impl ViewportMsaa { pub const DISABLED : ViewportMsaa = ViewportMsaa (0i64) ; pub const _2X : ViewportMsaa = ViewportMsaa (1i64) ; pub const _4X : ViewportMsaa = ViewportMsaa (2i64) ; pub const _8X : ViewportMsaa = ViewportMsaa (3i64) ; pub const _16X : ViewportMsaa = ViewportMsaa (4i64) ; pub const EXT_2X : ViewportMsaa = ViewportMsaa (5i64) ; pub const EXT_4X : ViewportMsaa = ViewportMsaa (6i64) ; } impl From < i64 > for ViewportMsaa { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ViewportMsaa > for i64 { # [inline] fn from (v : ViewportMsaa) -> Self { v . 0 } } impl FromVariant for ViewportMsaa { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ViewportRenderInfo (pub i64) ; impl ViewportRenderInfo { pub const OBJECTS_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (0i64) ; pub const VERTICES_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (1i64) ; pub const MATERIAL_CHANGES_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (2i64) ; pub const SHADER_CHANGES_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (3i64) ; pub const SURFACE_CHANGES_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (4i64) ; pub const DRAW_CALLS_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (5i64) ; pub const _2D_ITEMS_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (6i64) ; pub const _2D_DRAW_CALLS_IN_FRAME : ViewportRenderInfo = ViewportRenderInfo (7i64) ; pub const MAX : ViewportRenderInfo = ViewportRenderInfo (8i64) ; } impl From < i64 > for ViewportRenderInfo { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ViewportRenderInfo > for i64 { # [inline] fn from (v : ViewportRenderInfo) -> Self { v . 0 } } impl FromVariant for ViewportRenderInfo { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ViewportUpdateMode (pub i64) ; impl ViewportUpdateMode { pub const DISABLED : ViewportUpdateMode = ViewportUpdateMode (0i64) ; pub const ONCE : ViewportUpdateMode = ViewportUpdateMode (1i64) ; pub const WHEN_VISIBLE : ViewportUpdateMode = ViewportUpdateMode (2i64) ; pub const ALWAYS : ViewportUpdateMode = ViewportUpdateMode (3i64) ; } impl From < i64 > for ViewportUpdateMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ViewportUpdateMode > for i64 { # [inline] fn from (v : ViewportUpdateMode) -> Self { v . 0 } } impl FromVariant for ViewportUpdateMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ViewportUsage (pub i64) ; impl ViewportUsage { pub const _2D : ViewportUsage = ViewportUsage (0i64) ; pub const _2D_NO_SAMPLING : ViewportUsage = ViewportUsage (1i64) ; pub const _3D : ViewportUsage = ViewportUsage (2i64) ; pub const _3D_NO_EFFECTS : ViewportUsage = ViewportUsage (3i64) ; } impl From < i64 > for ViewportUsage { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ViewportUsage > for i64 { # [inline] fn from (v : ViewportUsage) -> Self { v . 0 } } impl FromVariant for ViewportUsage { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualServer { pub const CANVAS_ITEM_Z_MIN : i64 = - 4096i64 ; pub const MATERIAL_RENDER_PRIORITY_MIN : i64 = - 128i64 ; pub const NO_INDEX_ARRAY : i64 = - 1i64 ; pub const ARRAY_VERTEX : i64 = 0i64 ; pub const BLEND_SHAPE_MODE_NORMALIZED : i64 = 0i64 ; pub const CANVAS_LIGHT_FILTER_NONE : i64 = 0i64 ; pub const CANVAS_LIGHT_MODE_ADD : i64 = 0i64 ; pub const CANVAS_OCCLUDER_POLYGON_CULL_DISABLED : i64 = 0i64 ; pub const CHANGED_PRIORITY_ANY : i64 = 0i64 ; pub const CUBEMAP_LEFT : i64 = 0i64 ; pub const ENV_BG_CLEAR_COLOR : i64 = 0i64 ; pub const ENV_DOF_BLUR_QUALITY_LOW : i64 = 0i64 ; pub const ENV_SSAO_BLUR_DISABLED : i64 = 0i64 ; pub const ENV_SSAO_QUALITY_LOW : i64 = 0i64 ; pub const ENV_TONE_MAPPER_LINEAR : i64 = 0i64 ; pub const FEATURE_SHADERS : i64 = 0i64 ; pub const GLOW_BLEND_MODE_ADDITIVE : i64 = 0i64 ; pub const INFO_OBJECTS_IN_FRAME : i64 = 0i64 ; pub const INSTANCE_FLAG_USE_BAKED_LIGHT : i64 = 0i64 ; pub const INSTANCE_NONE : i64 = 0i64 ; pub const LIGHT_BAKE_DISABLED : i64 = 0i64 ; pub const LIGHT_DIRECTIONAL : i64 = 0i64 ; pub const LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE : i64 = 0i64 ; pub const LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL : i64 = 0i64 ; pub const LIGHT_OMNI_SHADOW_DETAIL_VERTICAL : i64 = 0i64 ; pub const LIGHT_OMNI_SHADOW_DUAL_PARABOLOID : i64 = 0i64 ; pub const LIGHT_PARAM_ENERGY : i64 = 0i64 ; pub const MULTIMESH_COLOR_NONE : i64 = 0i64 ; pub const MULTIMESH_CUSTOM_DATA_NONE : i64 = 0i64 ; pub const MULTIMESH_TRANSFORM_2D : i64 = 0i64 ; pub const NINE_PATCH_STRETCH : i64 = 0i64 ; pub const PARTICLES_DRAW_ORDER_INDEX : i64 = 0i64 ; pub const PRIMITIVE_POINTS : i64 = 0i64 ; pub const REFLECTION_PROBE_UPDATE_ONCE : i64 = 0i64 ; pub const SCENARIO_DEBUG_DISABLED : i64 = 0i64 ; pub const SHADER_SPATIAL : i64 = 0i64 ; pub const SHADOW_CASTING_SETTING_OFF : i64 = 0i64 ; pub const TEXTURE_TYPE_2D : i64 = 0i64 ; pub const VIEWPORT_CLEAR_ALWAYS : i64 = 0i64 ; pub const VIEWPORT_DEBUG_DRAW_DISABLED : i64 = 0i64 ; pub const VIEWPORT_MSAA_DISABLED : i64 = 0i64 ; pub const VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME : i64 = 0i64 ; pub const VIEWPORT_UPDATE_DISABLED : i64 = 0i64 ; pub const VIEWPORT_USAGE_2D : i64 = 0i64 ; pub const ARRAY_FORMAT_VERTEX : i64 = 1i64 ; pub const ARRAY_NORMAL : i64 = 1i64 ; pub const BLEND_SHAPE_MODE_RELATIVE : i64 = 1i64 ; pub const CANVAS_LIGHT_FILTER_PCF3 : i64 = 1i64 ; pub const CANVAS_LIGHT_MODE_SUB : i64 = 1i64 ; pub const CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE : i64 = 1i64 ; pub const CHANGED_PRIORITY_LOW : i64 = 1i64 ; pub const CUBEMAP_RIGHT : i64 = 1i64 ; pub const ENV_BG_COLOR : i64 = 1i64 ; pub const ENV_DOF_BLUR_QUALITY_MEDIUM : i64 = 1i64 ; pub const ENV_SSAO_BLUR_1x1 : i64 = 1i64 ; pub const ENV_SSAO_QUALITY_MEDIUM : i64 = 1i64 ; pub const ENV_TONE_MAPPER_REINHARD : i64 = 1i64 ; pub const FEATURE_MULTITHREADED : i64 = 1i64 ; pub const GLOW_BLEND_MODE_SCREEN : i64 = 1i64 ; pub const INFO_VERTICES_IN_FRAME : i64 = 1i64 ; pub const INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE : i64 = 1i64 ; pub const INSTANCE_MESH : i64 = 1i64 ; pub const LIGHT_BAKE_INDIRECT : i64 = 1i64 ; pub const LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED : i64 = 1i64 ; pub const LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS : i64 = 1i64 ; pub const LIGHT_OMNI : i64 = 1i64 ; pub const LIGHT_OMNI_SHADOW_CUBE : i64 = 1i64 ; pub const LIGHT_OMNI_SHADOW_DETAIL_HORIZONTAL : i64 = 1i64 ; pub const LIGHT_PARAM_INDIRECT_ENERGY : i64 = 1i64 ; pub const MULTIMESH_COLOR_8BIT : i64 = 1i64 ; pub const MULTIMESH_CUSTOM_DATA_8BIT : i64 = 1i64 ; pub const MULTIMESH_TRANSFORM_3D : i64 = 1i64 ; pub const NINE_PATCH_TILE : i64 = 1i64 ; pub const PARTICLES_DRAW_ORDER_LIFETIME : i64 = 1i64 ; pub const PRIMITIVE_LINES : i64 = 1i64 ; pub const REFLECTION_PROBE_UPDATE_ALWAYS : i64 = 1i64 ; pub const SCENARIO_DEBUG_WIREFRAME : i64 = 1i64 ; pub const SHADER_CANVAS_ITEM : i64 = 1i64 ; pub const SHADOW_CASTING_SETTING_ON : i64 = 1i64 ; pub const TEXTURE_FLAG_MIPMAPS : i64 = 1i64 ; pub const VIEWPORT_CLEAR_NEVER : i64 = 1i64 ; pub const VIEWPORT_DEBUG_DRAW_UNSHADED : i64 = 1i64 ; pub const VIEWPORT_MSAA_2X : i64 = 1i64 ; pub const VIEWPORT_RENDER_INFO_VERTICES_IN_FRAME : i64 = 1i64 ; pub const VIEWPORT_UPDATE_ONCE : i64 = 1i64 ; pub const VIEWPORT_USAGE_2D_NO_SAMPLING : i64 = 1i64 ; pub const ARRAY_FORMAT_NORMAL : i64 = 2i64 ; pub const ARRAY_TANGENT : i64 = 2i64 ; pub const CANVAS_LIGHT_FILTER_PCF5 : i64 = 2i64 ; pub const CANVAS_LIGHT_MODE_MIX : i64 = 2i64 ; pub const CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE : i64 = 2i64 ; pub const CHANGED_PRIORITY_HIGH : i64 = 2i64 ; pub const CUBEMAP_BOTTOM : i64 = 2i64 ; pub const ENV_BG_SKY : i64 = 2i64 ; pub const ENV_DOF_BLUR_QUALITY_HIGH : i64 = 2i64 ; pub const ENV_SSAO_BLUR_2x2 : i64 = 2i64 ; pub const ENV_SSAO_QUALITY_HIGH : i64 = 2i64 ; pub const ENV_TONE_MAPPER_FILMIC : i64 = 2i64 ; pub const GLOW_BLEND_MODE_SOFTLIGHT : i64 = 2i64 ; pub const INFO_MATERIAL_CHANGES_IN_FRAME : i64 = 2i64 ; pub const INSTANCE_FLAG_MAX : i64 = 2i64 ; pub const INSTANCE_MULTIMESH : i64 = 2i64 ; pub const LIGHT_BAKE_ALL : i64 = 2i64 ; pub const LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS : i64 = 2i64 ; pub const LIGHT_PARAM_SIZE : i64 = 2i64 ; pub const LIGHT_SPOT : i64 = 2i64 ; pub const MULTIMESH_COLOR_FLOAT : i64 = 2i64 ; pub const MULTIMESH_CUSTOM_DATA_FLOAT : i64 = 2i64 ; pub const NINE_PATCH_TILE_FIT : i64 = 2i64 ; pub const PARTICLES_DRAW_ORDER_VIEW_DEPTH : i64 = 2i64 ; pub const PRIMITIVE_LINE_STRIP : i64 = 2i64 ; pub const SCENARIO_DEBUG_OVERDRAW : i64 = 2i64 ; pub const SHADER_PARTICLES : i64 = 2i64 ; pub const SHADOW_CASTING_SETTING_DOUBLE_SIDED : i64 = 2i64 ; pub const TEXTURE_FLAG_REPEAT : i64 = 2i64 ; pub const TEXTURE_TYPE_CUBEMAP : i64 = 2i64 ; pub const VIEWPORT_CLEAR_ONLY_NEXT_FRAME : i64 = 2i64 ; pub const VIEWPORT_DEBUG_DRAW_OVERDRAW : i64 = 2i64 ; pub const VIEWPORT_MSAA_4X : i64 = 2i64 ; pub const VIEWPORT_RENDER_INFO_MATERIAL_CHANGES_IN_FRAME : i64 = 2i64 ; pub const VIEWPORT_UPDATE_WHEN_VISIBLE : i64 = 2i64 ; pub const VIEWPORT_USAGE_3D : i64 = 2i64 ; pub const ARRAY_COLOR : i64 = 3i64 ; pub const CANVAS_LIGHT_FILTER_PCF7 : i64 = 3i64 ; pub const CANVAS_LIGHT_MODE_MASK : i64 = 3i64 ; pub const CUBEMAP_TOP : i64 = 3i64 ; pub const ENV_BG_COLOR_SKY : i64 = 3i64 ; pub const ENV_SSAO_BLUR_3x3 : i64 = 3i64 ; pub const ENV_TONE_MAPPER_ACES : i64 = 3i64 ; pub const GLOW_BLEND_MODE_REPLACE : i64 = 3i64 ; pub const INFO_SHADER_CHANGES_IN_FRAME : i64 = 3i64 ; pub const INSTANCE_IMMEDIATE : i64 = 3i64 ; pub const LIGHT_PARAM_SPECULAR : i64 = 3i64 ; pub const PRIMITIVE_LINE_LOOP : i64 = 3i64 ; pub const SCENARIO_DEBUG_SHADELESS : i64 = 3i64 ; pub const SHADER_MAX : i64 = 3i64 ; pub const SHADOW_CASTING_SETTING_SHADOWS_ONLY : i64 = 3i64 ; pub const TEXTURE_TYPE_2D_ARRAY : i64 = 3i64 ; pub const VIEWPORT_DEBUG_DRAW_WIREFRAME : i64 = 3i64 ; pub const VIEWPORT_MSAA_8X : i64 = 3i64 ; pub const VIEWPORT_RENDER_INFO_SHADER_CHANGES_IN_FRAME : i64 = 3i64 ; pub const VIEWPORT_UPDATE_ALWAYS : i64 = 3i64 ; pub const VIEWPORT_USAGE_3D_NO_EFFECTS : i64 = 3i64 ; pub const ARRAY_FORMAT_TANGENT : i64 = 4i64 ; pub const ARRAY_TEX_UV : i64 = 4i64 ; pub const ARRAY_WEIGHTS_SIZE : i64 = 4i64 ; pub const CANVAS_LIGHT_FILTER_PCF9 : i64 = 4i64 ; pub const CUBEMAP_FRONT : i64 = 4i64 ; pub const ENV_BG_CANVAS : i64 = 4i64 ; pub const ENV_TONE_MAPPER_ACES_FITTED : i64 = 4i64 ; pub const INFO_SHADER_COMPILES_IN_FRAME : i64 = 4i64 ; pub const INSTANCE_PARTICLES : i64 = 4i64 ; pub const LIGHT_PARAM_RANGE : i64 = 4i64 ; pub const PRIMITIVE_TRIANGLES : i64 = 4i64 ; pub const TEXTURE_FLAG_FILTER : i64 = 4i64 ; pub const TEXTURE_TYPE_3D : i64 = 4i64 ; pub const VIEWPORT_MSAA_16X : i64 = 4i64 ; pub const VIEWPORT_RENDER_INFO_SURFACE_CHANGES_IN_FRAME : i64 = 4i64 ; pub const ARRAY_TEX_UV2 : i64 = 5i64 ; pub const CANVAS_LIGHT_FILTER_PCF13 : i64 = 5i64 ; pub const CUBEMAP_BACK : i64 = 5i64 ; pub const ENV_BG_KEEP : i64 = 5i64 ; pub const INFO_SURFACE_CHANGES_IN_FRAME : i64 = 5i64 ; pub const INSTANCE_LIGHT : i64 = 5i64 ; pub const LIGHT_PARAM_ATTENUATION : i64 = 5i64 ; pub const PRIMITIVE_TRIANGLE_STRIP : i64 = 5i64 ; pub const VIEWPORT_MSAA_EXT_2X : i64 = 5i64 ; pub const VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME : i64 = 5i64 ; pub const ARRAY_BONES : i64 = 6i64 ; pub const INFO_DRAW_CALLS_IN_FRAME : i64 = 6i64 ; pub const INSTANCE_REFLECTION_PROBE : i64 = 6i64 ; pub const LIGHT_PARAM_SPOT_ANGLE : i64 = 6i64 ; pub const PRIMITIVE_TRIANGLE_FAN : i64 = 6i64 ; pub const VIEWPORT_MSAA_EXT_4X : i64 = 6i64 ; pub const VIEWPORT_RENDER_INFO_2D_ITEMS_IN_FRAME : i64 = 6i64 ; pub const ARRAY_WEIGHTS : i64 = 7i64 ; pub const ENV_BG_MAX : i64 = 7i64 ; pub const INFO_2D_ITEMS_IN_FRAME : i64 = 7i64 ; pub const INSTANCE_GI_PROBE : i64 = 7i64 ; pub const LIGHT_PARAM_SPOT_ATTENUATION : i64 = 7i64 ; pub const MAX_GLOW_LEVELS : i64 = 7i64 ; pub const PRIMITIVE_MAX : i64 = 7i64 ; pub const TEXTURE_FLAGS_DEFAULT : i64 = 7i64 ; pub const VIEWPORT_RENDER_INFO_2D_DRAW_CALLS_IN_FRAME : i64 = 7i64 ; pub const ARRAY_FORMAT_COLOR : i64 = 8i64 ; pub const ARRAY_INDEX : i64 = 8i64 ; pub const INFO_2D_DRAW_CALLS_IN_FRAME : i64 = 8i64 ; pub const INSTANCE_LIGHTMAP_CAPTURE : i64 = 8i64 ; pub const LIGHT_PARAM_CONTACT_SHADOW_SIZE : i64 = 8i64 ; pub const MAX_CURSORS : i64 = 8i64 ; pub const TEXTURE_FLAG_ANISOTROPIC_FILTER : i64 = 8i64 ; pub const VIEWPORT_RENDER_INFO_MAX : i64 = 8i64 ; pub const ARRAY_MAX : i64 = 9i64 ; pub const INFO_USAGE_VIDEO_MEM_TOTAL : i64 = 9i64 ; pub const INSTANCE_MAX : i64 = 9i64 ; pub const LIGHT_PARAM_SHADOW_MAX_DISTANCE : i64 = 9i64 ; pub const INFO_VIDEO_MEM_USED : i64 = 10i64 ; pub const LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET : i64 = 10i64 ; pub const INFO_TEXTURE_MEM_USED : i64 = 11i64 ; pub const LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET : i64 = 11i64 ; pub const INFO_VERTEX_MEM_USED : i64 = 12i64 ; pub const LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET : i64 = 12i64 ; pub const LIGHT_PARAM_SHADOW_NORMAL_BIAS : i64 = 13i64 ; pub const LIGHT_PARAM_SHADOW_BIAS : i64 = 14i64 ; pub const LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE : i64 = 15i64 ; pub const ARRAY_FORMAT_TEX_UV : i64 = 16i64 ; pub const LIGHT_PARAM_MAX : i64 = 16i64 ; pub const TEXTURE_FLAG_CONVERT_TO_LINEAR : i64 = 16i64 ; pub const INSTANCE_GEOMETRY_MASK : i64 = 30i64 ; pub const ARRAY_FORMAT_TEX_UV2 : i64 = 32i64 ; pub const TEXTURE_FLAG_MIRRORED_REPEAT : i64 = 32i64 ; pub const ARRAY_FORMAT_BONES : i64 = 64i64 ; pub const MATERIAL_RENDER_PRIORITY_MAX : i64 = 127i64 ; pub const ARRAY_FORMAT_WEIGHTS : i64 = 128i64 ; pub const ARRAY_FORMAT_INDEX : i64 = 256i64 ; pub const ARRAY_COMPRESS_VERTEX : i64 = 512i64 ; pub const ARRAY_COMPRESS_NORMAL : i64 = 1024i64 ; pub const ARRAY_COMPRESS_TANGENT : i64 = 2048i64 ; pub const TEXTURE_FLAG_USED_FOR_STREAMING : i64 = 2048i64 ; pub const ARRAY_COMPRESS_COLOR : i64 = 4096i64 ; pub const CANVAS_ITEM_Z_MAX : i64 = 4096i64 ; pub const ARRAY_COMPRESS_TEX_UV : i64 = 8192i64 ; pub const ARRAY_COMPRESS_TEX_UV2 : i64 = 16384i64 ; pub const ARRAY_COMPRESS_BONES : i64 = 32768i64 ; pub const ARRAY_COMPRESS_WEIGHTS : i64 = 65536i64 ; pub const ARRAY_COMPRESS_INDEX : i64 = 131072i64 ; pub const ARRAY_FLAG_USE_2D_VERTICES : i64 = 262144i64 ; pub const ARRAY_FLAG_USE_16_BIT_BONES : i64 = 524288i64 ; pub const ARRAY_FLAG_USE_OCTAHEDRAL_COMPRESSION : i64 = 2097152i64 ; pub const ARRAY_COMPRESS_DEFAULT : i64 = 2194432i64 ; } impl VisualServer { # [doc = "Returns a reference to the singleton instance.\n\n# Safety\n\nThis singleton server is only safe to access from outside the main thread if thread-safe\noperations are enabled in the project settings. See the official\n[thread-safety guidelines][thread-safety] for more information.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [inline] pub unsafe fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("VisualServer\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Sets images to be rendered in the window margin."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn black_bars_set_images (& self , left : Rid , top : Rid , right : Rid , bottom : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . black_bars_set_images ; let ret = crate :: icalls :: icallvar__rid_rid_rid_rid (method_bind , self . this . sys () . as_ptr () , left , top , right , bottom) ; } } # [doc = "Sets margin size, where black bars (or images, if [`black_bars_set_images`][Self::black_bars_set_images] was used) are rendered."] # [doc = ""] # [inline] pub fn black_bars_set_margins (& self , left : i64 , top : i64 , right : i64 , bottom : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . black_bars_set_margins ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , left as _ , top as _ , right as _ , bottom as _) ; } } # [doc = "Creates a camera and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `camera_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method."] # [doc = ""] # [inline] pub fn camera_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to [`Camera.cull_mask`][Camera::cull_mask]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn camera_set_cull_mask (& self , camera : Rid , layers : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_set_cull_mask ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , camera , layers as _) ; } } # [doc = "Sets the environment used by this camera. Equivalent to [`Camera.environment`][Camera::environment]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn camera_set_environment (& self , camera : Rid , env : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_set_environment ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , camera , env) ; } } # [doc = "Sets camera to use frustum projection. This mode allows adjusting the `offset` argument to create \"tilted frustum\" effects."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn camera_set_frustum (& self , camera : Rid , size : f64 , offset : Vector2 , z_near : f64 , z_far : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_set_frustum ; let ret = crate :: icalls :: icallvar__rid_f64_vec2_f64_f64 (method_bind , self . this . sys () . as_ptr () , camera , size as _ , offset , z_near as _ , z_far as _) ; } } # [doc = "Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn camera_set_orthogonal (& self , camera : Rid , size : f64 , z_near : f64 , z_far : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_set_orthogonal ; let ret = crate :: icalls :: icallvar__rid_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , camera , size as _ , z_near as _ , z_far as _) ; } } # [doc = "Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn camera_set_perspective (& self , camera : Rid , fovy_degrees : f64 , z_near : f64 , z_far : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_set_perspective ; let ret = crate :: icalls :: icallvar__rid_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , camera , fovy_degrees as _ , z_near as _ , z_far as _) ; } } # [doc = "Sets [`Transform`][Transform] of camera."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn camera_set_transform (& self , camera : Rid , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_set_transform ; let ret = crate :: icalls :: icallvar__rid_trans (method_bind , self . this . sys () . as_ptr () , camera , transform) ; } } # [doc = "If `true`, preserves the horizontal aspect ratio which is equivalent to [`Camera.KEEP_WIDTH`][Camera::KEEP_WIDTH]. If `false`, preserves the vertical aspect ratio which is equivalent to [`Camera.KEEP_HEIGHT`][Camera::KEEP_HEIGHT]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn camera_set_use_vertical_aspect (& self , camera : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . camera_set_use_vertical_aspect ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , camera , enable as _) ; } } # [doc = "Creates a canvas and returns the assigned [`RID`][Rid]. It can be accessed with the RID that is returned. This RID will be used in all `canvas_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method."] # [doc = ""] # [inline] pub fn canvas_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Adds a circle command to the [`CanvasItem`][CanvasItem]'s draw commands."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_add_circle (& self , item : Rid , pos : Vector2 , radius : f64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_circle ; let ret = crate :: icalls :: icallvar__rid_vec2_f64_color (method_bind , self . this . sys () . as_ptr () , item , pos , radius as _ , color) ; } } # [doc = "If ignore is `true`, the VisualServer does not perform clipping."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_add_clip_ignore (& self , item : Rid , ignore : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_clip_ignore ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , item , ignore as _) ; } } # [doc = "Adds a line command to the [`CanvasItem`][CanvasItem]'s draw commands.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_add_line (& self , item : Rid , from : Vector2 , to : Vector2 , color : Color , width : f64 , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_line ; let ret = crate :: icalls :: icallvar__rid_vec2_vec2_color_f64_bool (method_bind , self . this . sys () . as_ptr () , item , from , to , color , width as _ , antialiased as _) ; } } # [doc = "Adds a mesh command to the [`CanvasItem`][CanvasItem]'s draw commands.\n# Default Arguments\n* `transform` - `Transform2D( 1, 0, 0, 1, 0, 0 )`\n* `modulate` - `Color( 1, 1, 1, 1 )`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_add_mesh (& self , item : Rid , mesh : Rid , transform : Transform2D , modulate : Color , texture : Rid , normal_map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_mesh ; let ret = crate :: icalls :: icallvar__rid_rid_trans2D_color_rid_rid (method_bind , self . this . sys () . as_ptr () , item , mesh , transform , modulate , texture , normal_map) ; } } # [doc = "Adds a [`MultiMesh`][MultiMesh] to the [`CanvasItem`][CanvasItem]'s draw commands. Only affects its aabb at the moment."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_add_multimesh (& self , item : Rid , mesh : Rid , texture : Rid , normal_map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_multimesh ; let ret = crate :: icalls :: icallvar__rid_rid_rid_rid (method_bind , self . this . sys () . as_ptr () , item , mesh , texture , normal_map) ; } } # [doc = "Adds a nine patch image to the [`CanvasItem`][CanvasItem]'s draw commands.\nSee [`NinePatchRect`][NinePatchRect] for more explanation.\n# Default Arguments\n* `x_axis_mode` - `0`\n* `y_axis_mode` - `0`\n* `draw_center` - `true`\n* `modulate` - `Color( 1, 1, 1, 1 )`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_add_nine_patch (& self , item : Rid , rect : Rect2 , source : Rect2 , texture : Rid , topleft : Vector2 , bottomright : Vector2 , x_axis_mode : i64 , y_axis_mode : i64 , draw_center : bool , modulate : Color , normal_map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_nine_patch ; let ret = crate :: icalls :: icallvar__rid_rect2_rect2_rid_vec2_vec2_i64_i64_bool_color_rid (method_bind , self . this . sys () . as_ptr () , item , rect , source , texture , topleft , bottomright , x_axis_mode as _ , y_axis_mode as _ , draw_center as _ , modulate , normal_map) ; } } # [doc = "Adds a particle system to the [`CanvasItem`][CanvasItem]'s draw commands."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_add_particles (& self , item : Rid , particles : Rid , texture : Rid , normal_map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_particles ; let ret = crate :: icalls :: icallvar__rid_rid_rid_rid (method_bind , self . this . sys () . as_ptr () , item , particles , texture , normal_map) ; } } # [doc = "Adds a polygon to the [`CanvasItem`][CanvasItem]'s draw commands.\n# Default Arguments\n* `uvs` - `PoolVector2Array(  )`\n* `antialiased` - `false`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_add_polygon (& self , item : Rid , points : PoolArray < Vector2 > , colors : PoolArray < Color > , uvs : PoolArray < Vector2 > , texture : Rid , normal_map : Rid , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_polygon ; let ret = crate :: icalls :: icallvar__rid_vec2arr_colorarr_vec2arr_rid_rid_bool (method_bind , self . this . sys () . as_ptr () , item , points , colors , uvs , texture , normal_map , antialiased as _) ; } } # [doc = "Adds a polyline, which is a line from multiple points with a width, to the [`CanvasItem`][CanvasItem]'s draw commands.\n# Default Arguments\n* `width` - `1.0`\n* `antialiased` - `false`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_add_polyline (& self , item : Rid , points : PoolArray < Vector2 > , colors : PoolArray < Color > , width : f64 , antialiased : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_polyline ; let ret = crate :: icalls :: icallvar__rid_vec2arr_colorarr_f64_bool (method_bind , self . this . sys () . as_ptr () , item , points , colors , width as _ , antialiased as _) ; } } # [doc = "Adds a primitive to the [`CanvasItem`][CanvasItem]'s draw commands.\n# Default Arguments\n* `width` - `1.0`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_add_primitive (& self , item : Rid , points : PoolArray < Vector2 > , colors : PoolArray < Color > , uvs : PoolArray < Vector2 > , texture : Rid , width : f64 , normal_map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_primitive ; let ret = crate :: icalls :: icallvar__rid_vec2arr_colorarr_vec2arr_rid_f64_rid (method_bind , self . this . sys () . as_ptr () , item , points , colors , uvs , texture , width as _ , normal_map) ; } } # [doc = "Adds a rectangle to the [`CanvasItem`][CanvasItem]'s draw commands."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_add_rect (& self , item : Rid , rect : Rect2 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_rect ; let ret = crate :: icalls :: icallvar__rid_rect2_color (method_bind , self . this . sys () . as_ptr () , item , rect , color) ; } } # [doc = "Adds a [`Transform2D`][Transform2D] command to the [`CanvasItem`][CanvasItem]'s draw commands.\nThis sets the extra_matrix uniform when executed. This affects the later commands of the canvas item."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_add_set_transform (& self , item : Rid , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_set_transform ; let ret = crate :: icalls :: icallvar__rid_trans2D (method_bind , self . this . sys () . as_ptr () , item , transform) ; } } # [doc = "Adds a textured rect to the [`CanvasItem`][CanvasItem]'s draw commands.\n# Default Arguments\n* `tile` - `false`\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_add_texture_rect (& self , item : Rid , rect : Rect2 , texture : Rid , tile : bool , modulate : Color , transpose : bool , normal_map : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_texture_rect ; let ret = crate :: icalls :: icallvar__rid_rect2_rid_bool_color_bool_rid (method_bind , self . this . sys () . as_ptr () , item , rect , texture , tile as _ , modulate , transpose as _ , normal_map) ; } } # [doc = "Adds a texture rect with region setting to the [`CanvasItem`][CanvasItem]'s draw commands.\n# Default Arguments\n* `modulate` - `Color( 1, 1, 1, 1 )`\n* `transpose` - `false`\n* `clip_uv` - `true`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_add_texture_rect_region (& self , item : Rid , rect : Rect2 , texture : Rid , src_rect : Rect2 , modulate : Color , transpose : bool , normal_map : Rid , clip_uv : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_texture_rect_region ; let ret = crate :: icalls :: icallvar__rid_rect2_rid_rect2_color_bool_rid_bool (method_bind , self . this . sys () . as_ptr () , item , rect , texture , src_rect , modulate , transpose as _ , normal_map , clip_uv as _) ; } } # [doc = "Adds a triangle array to the [`CanvasItem`][CanvasItem]'s draw commands.\n# Default Arguments\n* `uvs` - `PoolVector2Array(  )`\n* `bones` - `PoolIntArray(  )`\n* `weights` - `PoolRealArray(  )`\n* `count` - `-1`\n* `antialiased` - `false`\n* `antialiasing_use_indices` - `false`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_add_triangle_array (& self , item : Rid , indices : PoolArray < i32 > , points : PoolArray < Vector2 > , colors : PoolArray < Color > , uvs : PoolArray < Vector2 > , bones : PoolArray < i32 > , weights : PoolArray < f32 > , texture : Rid , count : i64 , normal_map : Rid , antialiased : bool , antialiasing_use_indices : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_add_triangle_array ; let ret = crate :: icalls :: icallvar__rid_i32arr_vec2arr_colorarr_vec2arr_i32arr_f32arr_rid_i64_rid_bool_bool (method_bind , self . this . sys () . as_ptr () , item , indices , points , colors , uvs , bones , weights , texture , count as _ , normal_map , antialiased as _ , antialiasing_use_indices as _) ; } } # [doc = "Clears the [`CanvasItem`][CanvasItem] and removes all commands in it."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_clear (& self , item : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_clear ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , item) ; } } # [doc = "Creates a new [`CanvasItem`][CanvasItem] and returns its [`RID`][Rid]. It can be accessed with the RID that is returned. This RID will be used in all `canvas_item_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method."] # [doc = ""] # [inline] pub fn canvas_item_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets clipping for the [`CanvasItem`][CanvasItem]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_clip (& self , item : Rid , clip : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_clip ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , item , clip as _) ; } } # [doc = "Sets the [`CanvasItem`][CanvasItem] to copy a rect to the backbuffer."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_copy_to_backbuffer (& self , item : Rid , enabled : bool , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_copy_to_backbuffer ; let ret = crate :: icalls :: icallvar__rid_bool_rect2 (method_bind , self . this . sys () . as_ptr () , item , enabled as _ , rect) ; } } # [doc = "Defines a custom drawing rectangle for the [`CanvasItem`][CanvasItem].\n# Default Arguments\n* `rect` - `Rect2( 0, 0, 0, 0 )`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_custom_rect (& self , item : Rid , use_custom_rect : bool , rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_custom_rect ; let ret = crate :: icalls :: icallvar__rid_bool_rect2 (method_bind , self . this . sys () . as_ptr () , item , use_custom_rect as _ , rect) ; } } # [doc = "Enables the use of distance fields for GUI elements that are rendering distance field based fonts."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_distance_field_mode (& self , item : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_distance_field_mode ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , item , enabled as _) ; } } # [doc = "Sets [`CanvasItem`][CanvasItem] to be drawn behind its parent."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_draw_behind_parent (& self , item : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_draw_behind_parent ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , item , enabled as _) ; } } # [doc = "Sets the index for the [`CanvasItem`][CanvasItem]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_draw_index (& self , item : Rid , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_draw_index ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , item , index as _) ; } } # [doc = "The light mask. See [`LightOccluder2D`][LightOccluder2D] for more information on light masks."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_light_mask (& self , item : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_light_mask ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , item , mask as _) ; } } # [doc = "Sets a new material to the [`CanvasItem`][CanvasItem]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_material (& self , item : Rid , material : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_material ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , item , material) ; } } # [doc = "Sets the color that modulates the [`CanvasItem`][CanvasItem] and its children."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_modulate (& self , item : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_modulate ; let ret = crate :: icalls :: icallvar__rid_color (method_bind , self . this . sys () . as_ptr () , item , color) ; } } # [doc = "Sets the parent for the [`CanvasItem`][CanvasItem]. The parent can be another canvas item, or it can be the root canvas that is attached to the viewport."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_parent (& self , item : Rid , parent : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_parent ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , item , parent) ; } } # [doc = "Sets the color that modulates the [`CanvasItem`][CanvasItem] without children."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_self_modulate (& self , item : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_self_modulate ; let ret = crate :: icalls :: icallvar__rid_color (method_bind , self . this . sys () . as_ptr () , item , color) ; } } # [doc = "Sets if [`CanvasItem`][CanvasItem]'s children should be sorted by y-position."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_sort_children_by_y (& self , item : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_sort_children_by_y ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , item , enabled as _) ; } } # [doc = "Sets the [`CanvasItem`][CanvasItem]'s [`Transform2D`][Transform2D]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_transform (& self , item : Rid , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_transform ; let ret = crate :: icalls :: icallvar__rid_trans2D (method_bind , self . this . sys () . as_ptr () , item , transform) ; } } # [doc = "Sets if the [`CanvasItem`][CanvasItem] uses its parent's material."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_use_parent_material (& self , item : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_use_parent_material ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , item , enabled as _) ; } } # [doc = "Sets if the canvas item (including its children) is visible."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_visible (& self , item : Rid , visible : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_visible ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , item , visible as _) ; } } # [doc = "If this is enabled, the Z index of the parent will be added to the children's Z index."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_z_as_relative_to_parent (& self , item : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_z_as_relative_to_parent ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , item , enabled as _) ; } } # [doc = "Sets the [`CanvasItem`][CanvasItem]'s Z index, i.e. its draw order (lower indexes are drawn first)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_item_set_z_index (& self , item : Rid , z_index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_item_set_z_index ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , item , z_index as _) ; } } # [doc = "Attaches the canvas light to the canvas. Removes it from its previous canvas."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_attach_to_canvas (& self , light : Rid , canvas : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_attach_to_canvas ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , light , canvas) ; } } # [doc = "Creates a canvas light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_light_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method."] # [doc = ""] # [inline] pub fn canvas_light_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Attaches a light occluder to the canvas. Removes it from its previous canvas."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_occluder_attach_to_canvas (& self , occluder : Rid , canvas : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_occluder_attach_to_canvas ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , occluder , canvas) ; } } # [doc = "Creates a light occluder and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_light_ocluder_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method."] # [doc = ""] # [inline] pub fn canvas_light_occluder_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_occluder_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Enables or disables light occluder."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_occluder_set_enabled (& self , occluder : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_occluder_set_enabled ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , occluder , enabled as _) ; } } # [doc = "The light mask. See [`LightOccluder2D`][LightOccluder2D] for more information on light masks."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_occluder_set_light_mask (& self , occluder : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_occluder_set_light_mask ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , occluder , mask as _) ; } } # [doc = "Sets a light occluder's polygon."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_occluder_set_polygon (& self , occluder : Rid , polygon : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_occluder_set_polygon ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , occluder , polygon) ; } } # [doc = "Sets a light occluder's [`Transform2D`][Transform2D]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_occluder_set_transform (& self , occluder : Rid , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_occluder_set_transform ; let ret = crate :: icalls :: icallvar__rid_trans2D (method_bind , self . this . sys () . as_ptr () , occluder , transform) ; } } # [doc = "Sets the color for a light."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_color (& self , light : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_color ; let ret = crate :: icalls :: icallvar__rid_color (method_bind , self . this . sys () . as_ptr () , light , color) ; } } # [doc = "Enables or disables a canvas light."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_enabled (& self , light : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_enabled ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , light , enabled as _) ; } } # [doc = "Sets a canvas light's energy."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_energy (& self , light : Rid , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_energy ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , light , energy as _) ; } } # [doc = "Sets a canvas light's height."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_height (& self , light : Rid , height : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_height ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , light , height as _) ; } } # [doc = "The light mask. See [`LightOccluder2D`][LightOccluder2D] for more information on light masks."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_item_cull_mask (& self , light : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_item_cull_mask ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mask as _) ; } } # [doc = "The binary mask used to determine which layers this canvas light's shadows affects. See [`LightOccluder2D`][LightOccluder2D] for more information on light masks."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_item_shadow_cull_mask (& self , light : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_item_shadow_cull_mask ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mask as _) ; } } # [doc = "The layer range that gets rendered with this light."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_layer_range (& self , light : Rid , min_layer : i64 , max_layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_layer_range ; let ret = crate :: icalls :: icallvar__rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , light , min_layer as _ , max_layer as _) ; } } # [doc = "The mode of the light, see [`CanvasLightMode`][CanvasLightMode] constants."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_mode (& self , light : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_mode ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mode as _) ; } } # [doc = "Sets the texture's scale factor of the light. Equivalent to [`Light2D.texture_scale`][Light2D::texture_scale]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_scale (& self , light : Rid , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_scale ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , light , scale as _) ; } } # [doc = "Sets the width of the shadow buffer, size gets scaled to the next power of two for this."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_shadow_buffer_size (& self , light : Rid , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_shadow_buffer_size ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , light , size as _) ; } } # [doc = "Sets the color of the canvas light's shadow."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_shadow_color (& self , light : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_shadow_color ; let ret = crate :: icalls :: icallvar__rid_color (method_bind , self . this . sys () . as_ptr () , light , color) ; } } # [doc = "Enables or disables the canvas light's shadow."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_shadow_enabled (& self , light : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_shadow_enabled ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , light , enabled as _) ; } } # [doc = "Sets the canvas light's shadow's filter, see [`CanvasLightShadowFilter`][CanvasLightShadowFilter] constants."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_shadow_filter (& self , light : Rid , filter : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_shadow_filter ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , light , filter as _) ; } } # [doc = "Sets the length of the shadow's gradient."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_shadow_gradient_length (& self , light : Rid , length : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_shadow_gradient_length ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , light , length as _) ; } } # [doc = "Smoothens the shadow. The lower, the smoother."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_shadow_smooth (& self , light : Rid , smooth : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_shadow_smooth ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , light , smooth as _) ; } } # [doc = "Sets texture to be used by light. Equivalent to [`Light2D.texture`][Light2D::texture]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_texture (& self , light : Rid , texture : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_texture ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , light , texture) ; } } # [doc = "Sets the offset of the light's texture. Equivalent to [`Light2D.offset`][Light2D::offset]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_texture_offset (& self , light : Rid , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_texture_offset ; let ret = crate :: icalls :: icallvar__rid_vec2 (method_bind , self . this . sys () . as_ptr () , light , offset) ; } } # [doc = "Sets the canvas light's [`Transform2D`][Transform2D]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_transform (& self , light : Rid , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_transform ; let ret = crate :: icalls :: icallvar__rid_trans2D (method_bind , self . this . sys () . as_ptr () , light , transform) ; } } # [doc = "Sets the Z range of objects that will be affected by this light. Equivalent to [`Light2D.range_z_min`][Light2D::range_z_min] and [`Light2D.range_z_max`][Light2D::range_z_max]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_light_set_z_range (& self , light : Rid , min_z : i64 , max_z : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_light_set_z_range ; let ret = crate :: icalls :: icallvar__rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , light , min_z as _ , max_z as _) ; } } # [doc = "Creates a new light occluder polygon and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_occluder_polygon_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method."] # [doc = ""] # [inline] pub fn canvas_occluder_polygon_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_occluder_polygon_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets an occluder polygons cull mode. See [`CanvasOccluderPolygonCullMode`][CanvasOccluderPolygonCullMode] constants."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_occluder_polygon_set_cull_mode (& self , occluder_polygon : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_occluder_polygon_set_cull_mode ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , occluder_polygon , mode as _) ; } } # [doc = "Sets the shape of the occluder polygon."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_occluder_polygon_set_shape (& self , occluder_polygon : Rid , shape : PoolArray < Vector2 > , closed : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_occluder_polygon_set_shape ; let ret = crate :: icalls :: icallvar__rid_vec2arr_bool (method_bind , self . this . sys () . as_ptr () , occluder_polygon , shape , closed as _) ; } } # [doc = "Sets the shape of the occluder polygon as lines."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_occluder_polygon_set_shape_as_lines (& self , occluder_polygon : Rid , shape : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_occluder_polygon_set_shape_as_lines ; let ret = crate :: icalls :: icallvar__rid_vec2arr (method_bind , self . this . sys () . as_ptr () , occluder_polygon , shape) ; } } # [doc = "A copy of the canvas item will be drawn with a local offset of the mirroring [`Vector2`][Vector2]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_set_item_mirroring (& self , canvas : Rid , item : Rid , mirroring : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_set_item_mirroring ; let ret = crate :: icalls :: icallvar__rid_rid_vec2 (method_bind , self . this . sys () . as_ptr () , canvas , item , mirroring) ; } } # [doc = "Modulates all colors in the given canvas."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn canvas_set_modulate (& self , canvas : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . canvas_set_modulate ; let ret = crate :: icalls :: icallvar__rid_color (method_bind , self . this . sys () . as_ptr () , canvas , color) ; } } # [doc = "Creates a directional light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method.\nTo place in a scene, attach this directional light to an instance using [`instance_set_base`][Self::instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn directional_light_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . directional_light_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Draws a frame. _This method is deprecated_, please use [`force_draw`][Self::force_draw] instead.\n# Default Arguments\n* `swap_buffers` - `true`\n* `frame_step` - `0.0`"] # [doc = ""] # [inline] pub fn draw (& self , swap_buffers : bool , frame_step : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . draw ; let ret = crate :: icalls :: icallvar__bool_f64 (method_bind , self . this . sys () . as_ptr () , swap_buffers as _ , frame_step as _) ; } } # [doc = "Creates an environment and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `environment_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method."] # [doc = ""] # [inline] pub fn environment_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the values to be used with the \"Adjustment\" post-process effect. See [`Environment`][Environment] for more details."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_adjustment (& self , env : Rid , enable : bool , brightness : f64 , contrast : f64 , saturation : f64 , ramp : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_adjustment ; let ret = crate :: icalls :: icallvar__rid_bool_f64_f64_f64_rid (method_bind , self . this . sys () . as_ptr () , env , enable as _ , brightness as _ , contrast as _ , saturation as _ , ramp) ; } } # [doc = "Sets the ambient light parameters. See [`Environment`][Environment] for more details.\n# Default Arguments\n* `energy` - `1.0`\n* `sky_contibution` - `0.0`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_ambient_light (& self , env : Rid , color : Color , energy : f64 , sky_contibution : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_ambient_light ; let ret = crate :: icalls :: icallvar__rid_color_f64_f64 (method_bind , self . this . sys () . as_ptr () , env , color , energy as _ , sky_contibution as _) ; } } # [doc = "Sets the _BGMode_ of the environment. Equivalent to [`Environment.background_mode`][Environment::background_mode]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_background (& self , env : Rid , bg : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_background ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , env , bg as _) ; } } # [doc = "Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes)."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_bg_color (& self , env : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_bg_color ; let ret = crate :: icalls :: icallvar__rid_color (method_bind , self . this . sys () . as_ptr () , env , color) ; } } # [doc = "Sets the intensity of the background color."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_bg_energy (& self , env : Rid , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_bg_energy ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , env , energy as _) ; } } # [doc = "Sets the maximum layer to use if using Canvas background mode."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_canvas_max_layer (& self , env : Rid , max_layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_canvas_max_layer ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , env , max_layer as _) ; } } # [doc = "Sets the values to be used with the \"DoF Far Blur\" post-process effect. See [`Environment`][Environment] for more details."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_dof_blur_far (& self , env : Rid , enable : bool , distance : f64 , transition : f64 , far_amount : f64 , quality : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_dof_blur_far ; let ret = crate :: icalls :: icallvar__rid_bool_f64_f64_f64_i64 (method_bind , self . this . sys () . as_ptr () , env , enable as _ , distance as _ , transition as _ , far_amount as _ , quality as _) ; } } # [doc = "Sets the values to be used with the \"DoF Near Blur\" post-process effect. See [`Environment`][Environment] for more details."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_dof_blur_near (& self , env : Rid , enable : bool , distance : f64 , transition : f64 , far_amount : f64 , quality : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_dof_blur_near ; let ret = crate :: icalls :: icallvar__rid_bool_f64_f64_f64_i64 (method_bind , self . this . sys () . as_ptr () , env , enable as _ , distance as _ , transition as _ , far_amount as _ , quality as _) ; } } # [doc = "Sets the variables to be used with the scene fog. See [`Environment`][Environment] for more details."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_fog (& self , env : Rid , enable : bool , color : Color , sun_color : Color , sun_amount : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_fog ; let ret = crate :: icalls :: icallvar__rid_bool_color_color_f64 (method_bind , self . this . sys () . as_ptr () , env , enable as _ , color , sun_color , sun_amount as _) ; } } # [doc = "Sets the variables to be used with the fog depth effect. See [`Environment`][Environment] for more details."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_fog_depth (& self , env : Rid , enable : bool , depth_begin : f64 , depth_end : f64 , depth_curve : f64 , transmit : bool , transmit_curve : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_fog_depth ; let ret = crate :: icalls :: icallvar__rid_bool_f64_f64_f64_bool_f64 (method_bind , self . this . sys () . as_ptr () , env , enable as _ , depth_begin as _ , depth_end as _ , depth_curve as _ , transmit as _ , transmit_curve as _) ; } } # [doc = "Sets the variables to be used with the fog height effect. See [`Environment`][Environment] for more details."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_fog_height (& self , env : Rid , enable : bool , min_height : f64 , max_height : f64 , height_curve : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_fog_height ; let ret = crate :: icalls :: icallvar__rid_bool_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , env , enable as _ , min_height as _ , max_height as _ , height_curve as _) ; } } # [doc = "Sets the variables to be used with the \"glow\" post-process effect. See [`Environment`][Environment] for more details."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_glow (& self , env : Rid , enable : bool , level_flags : i64 , intensity : f64 , strength : f64 , bloom_threshold : f64 , blend_mode : i64 , hdr_bleed_threshold : f64 , hdr_bleed_scale : f64 , hdr_luminance_cap : f64 , bicubic_upscale : bool , high_quality : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_glow ; let ret = crate :: icalls :: icallvar__rid_bool_i64_f64_f64_f64_i64_f64_f64_f64_bool_bool (method_bind , self . this . sys () . as_ptr () , env , enable as _ , level_flags as _ , intensity as _ , strength as _ , bloom_threshold as _ , blend_mode as _ , hdr_bleed_threshold as _ , hdr_bleed_scale as _ , hdr_luminance_cap as _ , bicubic_upscale as _ , high_quality as _) ; } } # [doc = "Sets the [`Sky`][Sky] to be used as the environment's background when using _BGMode_ sky. Equivalent to [`Environment.background_sky`][Environment::background_sky]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_sky (& self , env : Rid , sky : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_sky ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , env , sky) ; } } # [doc = "Sets a custom field of view for the background [`Sky`][Sky]. Equivalent to [`Environment.background_sky_custom_fov`][Environment::background_sky_custom_fov]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_sky_custom_fov (& self , env : Rid , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_sky_custom_fov ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , env , scale as _) ; } } # [doc = "Sets the rotation of the background [`Sky`][Sky] expressed as a [`Basis`][Basis]. Equivalent to [`Environment.background_sky_orientation`][Environment::background_sky_orientation]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_sky_orientation (& self , env : Rid , orientation : Basis) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_sky_orientation ; let ret = crate :: icalls :: icallvar__rid_basis (method_bind , self . this . sys () . as_ptr () , env , orientation) ; } } # [doc = "Sets the variables to be used with the \"Screen Space Ambient Occlusion (SSAO)\" post-process effect. See [`Environment`][Environment] for more details."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_ssao (& self , env : Rid , enable : bool , radius : f64 , intensity : f64 , radius2 : f64 , intensity2 : f64 , bias : f64 , light_affect : f64 , ao_channel_affect : f64 , color : Color , quality : i64 , blur : i64 , bilateral_sharpness : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_ssao ; let ret = crate :: icalls :: icallvar__rid_bool_f64_f64_f64_f64_f64_f64_f64_color_i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , env , enable as _ , radius as _ , intensity as _ , radius2 as _ , intensity2 as _ , bias as _ , light_affect as _ , ao_channel_affect as _ , color , quality as _ , blur as _ , bilateral_sharpness as _) ; } } # [doc = "Sets the variables to be used with the \"screen space reflections\" post-process effect. See [`Environment`][Environment] for more details."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_ssr (& self , env : Rid , enable : bool , max_steps : i64 , fade_in : f64 , fade_out : f64 , depth_tolerance : f64 , roughness : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_ssr ; let ret = crate :: icalls :: icallvar__rid_bool_i64_f64_f64_f64_bool (method_bind , self . this . sys () . as_ptr () , env , enable as _ , max_steps as _ , fade_in as _ , fade_out as _ , depth_tolerance as _ , roughness as _) ; } } # [doc = "Sets the variables to be used with the \"tonemap\" post-process effect. See [`Environment`][Environment] for more details."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn environment_set_tonemap (& self , env : Rid , tone_mapper : i64 , exposure : f64 , white : f64 , auto_exposure : bool , min_luminance : f64 , max_luminance : f64 , auto_exp_speed : f64 , auto_exp_grey : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . environment_set_tonemap ; let ret = crate :: icalls :: icallvar__rid_i64_f64_f64_bool_f64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , env , tone_mapper as _ , exposure as _ , white as _ , auto_exposure as _ , min_luminance as _ , max_luminance as _ , auto_exp_speed as _ , auto_exp_grey as _) ; } } # [doc = "Removes buffers and clears testcubes."] # [doc = ""] # [inline] pub fn finish (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . finish ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Forces a frame to be drawn when the function is called. Drawing a frame updates all [`Viewport`][Viewport]s that are set to update. Use with extreme caution.\n# Default Arguments\n* `swap_buffers` - `true`\n* `frame_step` - `0.0`"] # [doc = ""] # [inline] pub fn force_draw (& self , swap_buffers : bool , frame_step : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . force_draw ; let ret = crate :: icalls :: icallvar__bool_f64 (method_bind , self . this . sys () . as_ptr () , swap_buffers as _ , frame_step as _) ; } } # [doc = "Synchronizes threads."] # [doc = ""] # [inline] pub fn force_sync (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . force_sync ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Tries to free an object in the VisualServer."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn free_rid (& self , rid : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . free_rid ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , rid) ; } } # [doc = "Returns a certain information, see [`RenderInfo`][RenderInfo] for options."] # [doc = ""] # [inline] pub fn get_render_info (& self , info : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . get_render_info ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , info as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the id of the test cube. Creates one if none exists."] # [doc = ""] # [inline] pub fn get_test_cube (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . get_test_cube ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the id of the test texture. Creates one if none exists."] # [doc = ""] # [inline] pub fn get_test_texture (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . get_test_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the name of the video adapter (e.g. \"GeForce GTX 1080/PCIe/SSE2\").\n**Note:** When running a headless or server binary, this function returns an empty string."] # [doc = ""] # [inline] pub fn get_video_adapter_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . get_video_adapter_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the vendor of the video adapter (e.g. \"NVIDIA Corporation\").\n**Note:** When running a headless or server binary, this function returns an empty string."] # [doc = ""] # [inline] pub fn get_video_adapter_vendor (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . get_video_adapter_vendor ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the id of a white texture. Creates one if none exists."] # [doc = ""] # [inline] pub fn get_white_texture (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . get_white_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a GI probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `gi_probe_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method.\nTo place in a scene, attach this GI probe to an instance using [`instance_set_base`][Self::instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn gi_probe_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the bias value for the GI probe. Bias is used to avoid self occlusion. Equivalent to [`GIProbeData.bias`][GIProbeData::bias]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_get_bias (& self , probe : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_bias ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , probe) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the axis-aligned bounding box that covers the full extent of the GI probe."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_get_bounds (& self , probe : Rid) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_bounds ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , probe) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the cell size set by [`gi_probe_set_cell_size`][Self::gi_probe_set_cell_size]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_get_cell_size (& self , probe : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_cell_size ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , probe) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the data used by the GI probe."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_get_dynamic_data (& self , probe : Rid) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_dynamic_data ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , probe) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the dynamic range set for this GI probe. Equivalent to [`GIProbe.dynamic_range`][GIProbe::dynamic_range]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_get_dynamic_range (& self , probe : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_dynamic_range ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , probe) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the energy multiplier for this GI probe. Equivalent to [`GIProbe.energy`][GIProbe::energy]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_get_energy (& self , probe : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_energy ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , probe) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the normal bias for this GI probe. Equivalent to [`GIProbe.normal_bias`][GIProbe::normal_bias]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_get_normal_bias (& self , probe : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_normal_bias ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , probe) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the propagation value for this GI probe. Equivalent to [`GIProbe.propagation`][GIProbe::propagation]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_get_propagation (& self , probe : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_propagation ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , probe) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the Transform set by [`gi_probe_set_to_cell_xform`][Self::gi_probe_set_to_cell_xform]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_get_to_cell_xform (& self , probe : Rid) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_get_to_cell_xform ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , probe) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the GI probe data associated with this GI probe is compressed. Equivalent to [`GIProbe.compress`][GIProbe::compress]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_is_compressed (& self , probe : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_is_compressed ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , probe) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the GI probe is set to interior, meaning it does not account for sky light. Equivalent to [`GIProbe.interior`][GIProbe::interior]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_is_interior (& self , probe : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_is_interior ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , probe) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets the bias value to avoid self-occlusion. Equivalent to [`GIProbe.bias`][GIProbe::bias]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_set_bias (& self , probe : Rid , bias : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_bias ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , bias as _) ; } } # [doc = "Sets the axis-aligned bounding box that covers the extent of the GI probe."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_set_bounds (& self , probe : Rid , bounds : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_bounds ; let ret = crate :: icalls :: icallvar__rid_aabb (method_bind , self . this . sys () . as_ptr () , probe , bounds) ; } } # [doc = "Sets the size of individual cells within the GI probe."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_set_cell_size (& self , probe : Rid , range : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_cell_size ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , range as _) ; } } # [doc = "Sets the compression setting for the GI probe data. Compressed data will take up less space but may look worse. Equivalent to [`GIProbe.compress`][GIProbe::compress]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_set_compress (& self , probe : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_compress ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , probe , enable as _) ; } } # [doc = "Sets the data to be used in the GI probe for lighting calculations. Normally this is created and called internally within the [`GIProbe`][GIProbe] node. You should not try to set this yourself."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_set_dynamic_data (& self , probe : Rid , data : PoolArray < i32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_dynamic_data ; let ret = crate :: icalls :: icallvar__rid_i32arr (method_bind , self . this . sys () . as_ptr () , probe , data) ; } } # [doc = "Sets the dynamic range of the GI probe. Dynamic range sets the limit for how bright lights can be. A smaller range captures greater detail but limits how bright lights can be. Equivalent to [`GIProbe.dynamic_range`][GIProbe::dynamic_range]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_set_dynamic_range (& self , probe : Rid , range : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_dynamic_range ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , probe , range as _) ; } } # [doc = "Sets the energy multiplier for this GI probe. A higher energy makes the indirect light from the GI probe brighter. Equivalent to [`GIProbe.energy`][GIProbe::energy]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_set_energy (& self , probe : Rid , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_energy ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , energy as _) ; } } # [doc = "Sets the interior value of this GI probe. A GI probe set to interior does not include the sky when calculating lighting. Equivalent to [`GIProbe.interior`][GIProbe::interior]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_set_interior (& self , probe : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_interior ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , probe , enable as _) ; } } # [doc = "Sets the normal bias for this GI probe. Normal bias behaves similar to the other form of bias and may help reduce self-occlusion. Equivalent to [`GIProbe.normal_bias`][GIProbe::normal_bias]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_set_normal_bias (& self , probe : Rid , bias : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_normal_bias ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , bias as _) ; } } # [doc = "Sets the propagation of light within this GI probe. Equivalent to [`GIProbe.propagation`][GIProbe::propagation]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_set_propagation (& self , probe : Rid , propagation : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_propagation ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , propagation as _) ; } } # [doc = "Sets the to cell [`Transform`][Transform] for this GI probe."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn gi_probe_set_to_cell_xform (& self , probe : Rid , xform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . gi_probe_set_to_cell_xform ; let ret = crate :: icalls :: icallvar__rid_trans (method_bind , self . this . sys () . as_ptr () , probe , xform) ; } } # [doc = "Returns `true` if changes have been made to the VisualServer's data. [`draw`][Self::draw] is usually called if this happens.\nAs changes are registered as either high or low priority (e.g. dynamic shaders), this function takes an optional argument to query either low or high priority changes, or any changes.\n# Default Arguments\n* `queried_priority` - `0`"] # [doc = ""] # [inline] pub fn has_changed (& self , queried_priority : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . has_changed ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , queried_priority as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Not yet implemented. Always returns `false`."] # [doc = ""] # [inline] pub fn has_feature (& self , feature : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . has_feature ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , feature as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the OS supports a certain feature. Features might be `s3tc`, `etc`, `etc2`, `pvrtc` and `skinning_fallback`.\nWhen rendering with GLES2, returns `true` with `skinning_fallback` in case the hardware doesn't support the default GPU skinning process."] # [doc = ""] # [inline] pub fn has_os_feature (& self , feature : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . has_os_feature ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , feature . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets up [`ImmediateGeometry`][ImmediateGeometry] internals to prepare for drawing. Equivalent to [`ImmediateGeometry.begin`][ImmediateGeometry::begin]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn immediate_begin (& self , immediate : Rid , primitive : i64 , texture : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_begin ; let ret = crate :: icalls :: icallvar__rid_i64_rid (method_bind , self . this . sys () . as_ptr () , immediate , primitive as _ , texture) ; } } # [doc = "Clears everything that was set up between [`immediate_begin`][Self::immediate_begin] and [`immediate_end`][Self::immediate_end]. Equivalent to [`ImmediateGeometry.clear`][ImmediateGeometry::clear]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn immediate_clear (& self , immediate : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_clear ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , immediate) ; } } # [doc = "Sets the color to be used with next vertex. Equivalent to [`ImmediateGeometry.set_color`][ImmediateGeometry::set_color]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn immediate_color (& self , immediate : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_color ; let ret = crate :: icalls :: icallvar__rid_color (method_bind , self . this . sys () . as_ptr () , immediate , color) ; } } # [doc = "Creates an immediate geometry and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `immediate_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method.\nTo place in a scene, attach this immediate geometry to an instance using [`instance_set_base`][Self::instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn immediate_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Ends drawing the [`ImmediateGeometry`][ImmediateGeometry] and displays it. Equivalent to [`ImmediateGeometry.end`][ImmediateGeometry::end]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn immediate_end (& self , immediate : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_end ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , immediate) ; } } # [doc = "Returns the material assigned to the [`ImmediateGeometry`][ImmediateGeometry]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn immediate_get_material (& self , immediate : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_get_material ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , immediate) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the normal to be used with next vertex. Equivalent to [`ImmediateGeometry.set_normal`][ImmediateGeometry::set_normal]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn immediate_normal (& self , immediate : Rid , normal : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_normal ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , immediate , normal) ; } } # [doc = "Sets the material to be used to draw the [`ImmediateGeometry`][ImmediateGeometry]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn immediate_set_material (& self , immediate : Rid , material : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_set_material ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , immediate , material) ; } } # [doc = "Sets the tangent to be used with next vertex. Equivalent to [`ImmediateGeometry.set_tangent`][ImmediateGeometry::set_tangent]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn immediate_tangent (& self , immediate : Rid , tangent : Plane) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_tangent ; let ret = crate :: icalls :: icallvar__rid_plane (method_bind , self . this . sys () . as_ptr () , immediate , tangent) ; } } # [doc = "Sets the UV to be used with next vertex. Equivalent to [`ImmediateGeometry.set_uv`][ImmediateGeometry::set_uv]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn immediate_uv (& self , immediate : Rid , tex_uv : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_uv ; let ret = crate :: icalls :: icallvar__rid_vec2 (method_bind , self . this . sys () . as_ptr () , immediate , tex_uv) ; } } # [doc = "Sets the UV2 to be used with next vertex. Equivalent to [`ImmediateGeometry.set_uv2`][ImmediateGeometry::set_uv2]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn immediate_uv2 (& self , immediate : Rid , tex_uv : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_uv2 ; let ret = crate :: icalls :: icallvar__rid_vec2 (method_bind , self . this . sys () . as_ptr () , immediate , tex_uv) ; } } # [doc = "Adds the next vertex using the information provided in advance. Equivalent to [`ImmediateGeometry.add_vertex`][ImmediateGeometry::add_vertex]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn immediate_vertex (& self , immediate : Rid , vertex : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_vertex ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , immediate , vertex) ; } } # [doc = "Adds the next vertex using the information provided in advance. This is a helper class that calls [`immediate_vertex`][Self::immediate_vertex] under the hood. Equivalent to [`ImmediateGeometry.add_vertex`][ImmediateGeometry::add_vertex]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn immediate_vertex_2d (& self , immediate : Rid , vertex : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . immediate_vertex_2d ; let ret = crate :: icalls :: icallvar__rid_vec2 (method_bind , self . this . sys () . as_ptr () , immediate , vertex) ; } } # [doc = "Initializes the visual server. This function is called internally by platform-dependent code during engine initialization. If called from a running game, it will not do anything."] # [doc = ""] # [inline] pub fn init (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . init ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with [`instances_cull_aabb`][Self::instances_cull_aabb], [`instances_cull_convex`][Self::instances_cull_convex], and [`instances_cull_ray`][Self::instances_cull_ray]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_attach_object_instance_id (& self , instance : Rid , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_attach_object_instance_id ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , instance , id as _) ; } } # [doc = "Attaches a skeleton to an instance. Removes the previous skeleton from the instance."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_attach_skeleton (& self , instance : Rid , skeleton : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_attach_skeleton ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , instance , skeleton) ; } } # [doc = "Creates a visual instance and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `instance_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method.\nAn instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, and reflection probes need to be associated with an instance to be visible in the scenario using [`instance_set_base`][Self::instance_set_base]."] # [doc = ""] # [inline] pub fn instance_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a visual instance, adds it to the VisualServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all `instance_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_create2 (& self , base : Rid , scenario : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_create2 ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , base , scenario) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Not implemented in Godot 3.x."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_geometry_set_as_instance_lod (& self , instance : Rid , as_lod_of_instance : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_geometry_set_as_instance_lod ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , instance , as_lod_of_instance) ; } } # [doc = "Sets the shadow casting setting to one of [`ShadowCastingSetting`][ShadowCastingSetting]. Equivalent to [`GeometryInstance.cast_shadow`][GeometryInstance::cast_shadow]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_geometry_set_cast_shadows_setting (& self , instance : Rid , shadow_casting_setting : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_geometry_set_cast_shadows_setting ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , instance , shadow_casting_setting as _) ; } } # [doc = "Not implemented in Godot 3.x."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_geometry_set_draw_range (& self , instance : Rid , min : f64 , max : f64 , min_margin : f64 , max_margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_geometry_set_draw_range ; let ret = crate :: icalls :: icallvar__rid_f64_f64_f64_f64 (method_bind , self . this . sys () . as_ptr () , instance , min as _ , max as _ , min_margin as _ , max_margin as _) ; } } # [doc = "Sets the flag for a given [`InstanceFlags`][InstanceFlags]. See [`InstanceFlags`][InstanceFlags] for more details."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_geometry_set_flag (& self , instance : Rid , flag : i64 , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_geometry_set_flag ; let ret = crate :: icalls :: icallvar__rid_i64_bool (method_bind , self . this . sys () . as_ptr () , instance , flag as _ , enabled as _) ; } } # [doc = "Sets a material that will be rendered for all surfaces on top of active materials for the mesh associated with this instance. Equivalent to [`GeometryInstance.material_overlay`][GeometryInstance::material_overlay]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_geometry_set_material_overlay (& self , instance : Rid , material : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_geometry_set_material_overlay ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , instance , material) ; } } # [doc = "Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [`GeometryInstance.material_override`][GeometryInstance::material_override]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_geometry_set_material_override (& self , instance : Rid , material : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_geometry_set_material_override ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , instance , material) ; } } # [doc = "Sets the base of the instance. A base can be any of the 3D objects that are created in the VisualServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap capture, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_set_base (& self , instance : Rid , base : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_base ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , instance , base) ; } } # [doc = "Sets the weight for a given blend shape associated with this instance."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_set_blend_shape_weight (& self , instance : Rid , shape : i64 , weight : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_blend_shape_weight ; let ret = crate :: icalls :: icallvar__rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , instance , shape as _ , weight as _) ; } } # [doc = "Sets a custom AABB to use when culling objects from the view frustum. Equivalent to [`GeometryInstance.set_custom_aabb`][GeometryInstance::set_custom_aabb]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_set_custom_aabb (& self , instance : Rid , aabb : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_custom_aabb ; let ret = crate :: icalls :: icallvar__rid_aabb (method_bind , self . this . sys () . as_ptr () , instance , aabb) ; } } # [doc = "Function not implemented in Godot 3.x."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_set_exterior (& self , instance : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_exterior ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , instance , enabled as _) ; } } # [doc = "Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you to avoid culling objects that fall outside the view frustum. Equivalent to [`GeometryInstance.extra_cull_margin`][GeometryInstance::extra_cull_margin]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_set_extra_visibility_margin (& self , instance : Rid , margin : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_extra_visibility_margin ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , instance , margin as _) ; } } # [doc = "Sets the render layers that this instance will be drawn to. Equivalent to [`VisualInstance.layers`][VisualInstance::layers]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_set_layer_mask (& self , instance : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_layer_mask ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , instance , mask as _) ; } } # [doc = "Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_set_scenario (& self , instance : Rid , scenario : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_scenario ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , instance , scenario) ; } } # [doc = "Sets the material of a specific surface. Equivalent to [`MeshInstance.set_surface_material`][MeshInstance::set_surface_material]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_set_surface_material (& self , instance : Rid , surface : i64 , material : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_surface_material ; let ret = crate :: icalls :: icallvar__rid_i64_rid (method_bind , self . this . sys () . as_ptr () , instance , surface as _ , material) ; } } # [doc = "Sets the world space transform of the instance. Equivalent to [`Spatial.transform`][Spatial::transform]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_set_transform (& self , instance : Rid , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_transform ; let ret = crate :: icalls :: icallvar__rid_trans (method_bind , self . this . sys () . as_ptr () , instance , transform) ; } } # [doc = "Sets the lightmap to use with this instance.\n# Default Arguments\n* `lightmap_slice` - `-1`\n* `lightmap_uv_rect` - `Rect2( 0, 0, 1, 1 )`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_set_use_lightmap (& self , instance : Rid , lightmap_instance : Rid , lightmap : Rid , lightmap_slice : i64 , lightmap_uv_rect : Rect2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_use_lightmap ; let ret = crate :: icalls :: icallvar__rid_rid_rid_i64_rect2 (method_bind , self . this . sys () . as_ptr () , instance , lightmap_instance , lightmap , lightmap_slice as _ , lightmap_uv_rect) ; } } # [doc = "Sets whether an instance is drawn or not. Equivalent to [`Spatial.visible`][Spatial::visible]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instance_set_visible (& self , instance : Rid , visible : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instance_set_visible ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , instance , visible as _) ; } } # [doc = "Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [`MeshInstance`][MeshInstance] or [`DirectionalLight`][DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [`World`][World] you want to query. This forces an update for all resources queued to update.\n**Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instances_cull_aabb (& self , aabb : Aabb , scenario : Rid) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instances_cull_aabb ; let ret = crate :: icalls :: icallvar__aabb_rid (method_bind , self . this . sys () . as_ptr () , aabb , scenario) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [`MeshInstance`][MeshInstance] or [`DirectionalLight`][DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [`World`][World] you want to query. This forces an update for all resources queued to update.\n**Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instances_cull_convex (& self , convex : VariantArray , scenario : Rid) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instances_cull_convex ; let ret = crate :: icalls :: icallvar__arr_rid (method_bind , self . this . sys () . as_ptr () , convex , scenario) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [`MeshInstance`][MeshInstance] or [`DirectionalLight`][DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [`World`][World] you want to query. This forces an update for all resources queued to update.\n**Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn instances_cull_ray (& self , from : Vector3 , to : Vector3 , scenario : Rid) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . instances_cull_ray ; let ret = crate :: icalls :: icallvar__vec3_vec3_rid (method_bind , self . this . sys () . as_ptr () , from , to , scenario) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `false`, disables rendering completely, but the engine logic is still being processed. You can call [`force_draw`][Self::force_draw] to draw a frame even with rendering disabled."] # [doc = ""] # [inline] pub fn is_render_loop_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . is_render_loop_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [`DirectionalLight.directional_shadow_blend_splits`][DirectionalLight::directional_shadow_blend_splits]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn light_directional_set_blend_splits (& self , light : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_directional_set_blend_splits ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , light , enable as _) ; } } # [doc = "Sets the shadow depth range mode for this directional light. Equivalent to [`DirectionalLight.directional_shadow_depth_range`][DirectionalLight::directional_shadow_depth_range]. See [`LightDirectionalShadowDepthRangeMode`][LightDirectionalShadowDepthRangeMode] for options."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn light_directional_set_shadow_depth_range_mode (& self , light : Rid , range_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_directional_set_shadow_depth_range_mode ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , light , range_mode as _) ; } } # [doc = "Sets the shadow mode for this directional light. Equivalent to [`DirectionalLight.directional_shadow_mode`][DirectionalLight::directional_shadow_mode]. See [`LightDirectionalShadowMode`][LightDirectionalShadowMode] for options."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn light_directional_set_shadow_mode (& self , light : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_directional_set_shadow_mode ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mode as _) ; } } # [doc = "Sets whether to use vertical or horizontal detail for this omni light. This can be used to alleviate artifacts in the shadow map. Equivalent to [`OmniLight.omni_shadow_detail`][OmniLight::omni_shadow_detail]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn light_omni_set_shadow_detail (& self , light : Rid , detail : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_omni_set_shadow_detail ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , light , detail as _) ; } } # [doc = "Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [`OmniLight.omni_shadow_mode`][OmniLight::omni_shadow_mode]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn light_omni_set_shadow_mode (& self , light : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_omni_set_shadow_mode ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mode as _) ; } } # [doc = "Sets the bake mode for this light, see [`LightBakeMode`][LightBakeMode] for options. The bake mode affects how the light will be baked in [`BakedLightmap`][BakedLightmap]s and [`GIProbe`][GIProbe]s."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn light_set_bake_mode (& self , light : Rid , bake_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_bake_mode ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , light , bake_mode as _) ; } } # [doc = "Sets the color of the light. Equivalent to [`Light.light_color`][Light::light_color]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn light_set_color (& self , light : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_color ; let ret = crate :: icalls :: icallvar__rid_color (method_bind , self . this . sys () . as_ptr () , light , color) ; } } # [doc = "Sets the cull mask for this Light. Lights only affect objects in the selected layers. Equivalent to [`Light.light_cull_mask`][Light::light_cull_mask]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn light_set_cull_mask (& self , light : Rid , mask : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_cull_mask ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , light , mask as _) ; } } # [doc = "If `true`, light will subtract light instead of adding light. Equivalent to [`Light.light_negative`][Light::light_negative]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn light_set_negative (& self , light : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_negative ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , light , enable as _) ; } } # [doc = "Sets the specified light parameter. See [`LightParam`][LightParam] for options. Equivalent to [`Light.set_param`][Light::set_param]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn light_set_param (& self , light : Rid , param : i64 , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_param ; let ret = crate :: icalls :: icallvar__rid_i64_f64 (method_bind , self . this . sys () . as_ptr () , light , param as _ , value as _) ; } } # [doc = "Not implemented in Godot 3.x."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn light_set_projector (& self , light : Rid , texture : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_projector ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , light , texture) ; } } # [doc = "If `true`, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double sided shadows with [`instance_geometry_set_cast_shadows_setting`][Self::instance_geometry_set_cast_shadows_setting]. Equivalent to [`Light.shadow_reverse_cull_face`][Light::shadow_reverse_cull_face]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn light_set_reverse_cull_face_mode (& self , light : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_reverse_cull_face_mode ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , light , enabled as _) ; } } # [doc = "If `true`, light will cast shadows. Equivalent to [`Light.shadow_enabled`][Light::shadow_enabled]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn light_set_shadow (& self , light : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_shadow ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , light , enabled as _) ; } } # [doc = "Sets the color of the shadow cast by the light. Equivalent to [`Light.shadow_color`][Light::shadow_color]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn light_set_shadow_color (& self , light : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_shadow_color ; let ret = crate :: icalls :: icallvar__rid_color (method_bind , self . this . sys () . as_ptr () , light , color) ; } } # [doc = "Sets whether GI probes capture light information from this light. _Deprecated method._ Use [`light_set_bake_mode`][Self::light_set_bake_mode] instead. This method is only kept for compatibility reasons and calls [`light_set_bake_mode`][Self::light_set_bake_mode] internally, setting the bake mode to [`LIGHT_BAKE_DISABLED`][Self::LIGHT_BAKE_DISABLED] or [`LIGHT_BAKE_INDIRECT`][Self::LIGHT_BAKE_INDIRECT] depending on the given parameter."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn light_set_use_gi (& self , light : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . light_set_use_gi ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , light , enabled as _) ; } } # [doc = "Creates a lightmap capture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `lightmap_capture_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method.\nTo place in a scene, attach this lightmap capture to an instance using [`instance_set_base`][Self::instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn lightmap_capture_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the size of the lightmap capture area."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn lightmap_capture_get_bounds (& self , capture : Rid) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_get_bounds ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , capture) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the energy multiplier used by the lightmap capture."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn lightmap_capture_get_energy (& self , capture : Rid) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_get_energy ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , capture) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the octree used by the lightmap capture."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn lightmap_capture_get_octree (& self , capture : Rid) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_get_octree ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , capture) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the cell subdivision amount used by this lightmap capture's octree."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn lightmap_capture_get_octree_cell_subdiv (& self , capture : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_get_octree_cell_subdiv ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , capture) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the cell transform for this lightmap capture's octree."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn lightmap_capture_get_octree_cell_transform (& self , capture : Rid) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_get_octree_cell_transform ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , capture) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if capture is in \"interior\" mode."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn lightmap_capture_is_interior (& self , capture : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_is_interior ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , capture) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets the size of the area covered by the lightmap capture. Equivalent to [`BakedLightmapData.bounds`][BakedLightmapData::bounds]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn lightmap_capture_set_bounds (& self , capture : Rid , bounds : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_set_bounds ; let ret = crate :: icalls :: icallvar__rid_aabb (method_bind , self . this . sys () . as_ptr () , capture , bounds) ; } } # [doc = "Sets the energy multiplier for this lightmap capture. Equivalent to [`BakedLightmapData.energy`][BakedLightmapData::energy]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn lightmap_capture_set_energy (& self , capture : Rid , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_set_energy ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , capture , energy as _) ; } } # [doc = "Sets the \"interior\" mode for this lightmap capture. Equivalent to [`BakedLightmapData.interior`][BakedLightmapData::interior]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn lightmap_capture_set_interior (& self , capture : Rid , interior : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_set_interior ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , capture , interior as _) ; } } # [doc = "Sets the octree to be used by this lightmap capture. This function is normally used by the [`BakedLightmap`][BakedLightmap] node. Equivalent to [`BakedLightmapData.octree`][BakedLightmapData::octree]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn lightmap_capture_set_octree (& self , capture : Rid , octree : PoolArray < u8 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_set_octree ; let ret = crate :: icalls :: icallvar__rid_bytearr (method_bind , self . this . sys () . as_ptr () , capture , octree) ; } } # [doc = "Sets the subdivision level of this lightmap capture's octree. Equivalent to [`BakedLightmapData.cell_subdiv`][BakedLightmapData::cell_subdiv]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn lightmap_capture_set_octree_cell_subdiv (& self , capture : Rid , subdiv : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_set_octree_cell_subdiv ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , capture , subdiv as _) ; } } # [doc = "Sets the octree cell transform for this lightmap capture's octree. Equivalent to [`BakedLightmapData.cell_space_transform`][BakedLightmapData::cell_space_transform]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn lightmap_capture_set_octree_cell_transform (& self , capture : Rid , xform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . lightmap_capture_set_octree_cell_transform ; let ret = crate :: icalls :: icallvar__rid_trans (method_bind , self . this . sys () . as_ptr () , capture , xform) ; } } # [doc = "Returns a mesh of a sphere with the given amount of horizontal and vertical subdivisions."] # [doc = ""] # [inline] pub fn make_sphere_mesh (& self , latitudes : i64 , longitudes : i64 , radius : f64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . make_sphere_mesh ; let ret = crate :: icalls :: icallvar__i64_i64_f64 (method_bind , self . this . sys () . as_ptr () , latitudes as _ , longitudes as _ , radius as _) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates an empty material and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `material_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method."] # [doc = ""] # [inline] pub fn material_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the value of a certain material's parameter."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn material_get_param (& self , material : Rid , parameter : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_get_param ; let ret = crate :: icalls :: icallvar__rid_str (method_bind , self . this . sys () . as_ptr () , material , parameter . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the default value for the param if available. Returns `null` otherwise."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn material_get_param_default (& self , material : Rid , parameter : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_get_param_default ; let ret = crate :: icalls :: icallvar__rid_str (method_bind , self . this . sys () . as_ptr () , material , parameter . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the shader of a certain material's shader. Returns an empty RID if the material doesn't have a shader."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn material_get_shader (& self , shader_material : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_get_shader ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , shader_material) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets a material's line width."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn material_set_line_width (& self , material : Rid , width : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_set_line_width ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , material , width as _) ; } } # [doc = "Sets an object's next material."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn material_set_next_pass (& self , material : Rid , next_material : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_set_next_pass ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , material , next_material) ; } } # [doc = "Sets a material's parameter."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn material_set_param (& self , material : Rid , parameter : impl Into < GodotString > , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_set_param ; let ret = crate :: icalls :: icallvar__rid_str_var (method_bind , self . this . sys () . as_ptr () , material , parameter . into () , value . owned_to_variant ()) ; } } # [doc = "Sets a material's render priority."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn material_set_render_priority (& self , material : Rid , priority : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_set_render_priority ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , material , priority as _) ; } } # [doc = "Sets a shader material's shader."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn material_set_shader (& self , shader_material : Rid , shader : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . material_set_shader ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , shader_material , shader) ; } } # [doc = "Adds a surface generated from the Arrays to a mesh. See [`PrimitiveType`][PrimitiveType] constants for types.\n# Default Arguments\n* `blend_shapes` - `[  ]`\n* `compress_format` - `2194432`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_add_surface_from_arrays (& self , mesh : Rid , primitive : i64 , arrays : VariantArray , blend_shapes : VariantArray , compress_format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_add_surface_from_arrays ; let ret = crate :: icalls :: icallvar__rid_i64_arr_arr_i64 (method_bind , self . this . sys () . as_ptr () , mesh , primitive as _ , arrays , blend_shapes , compress_format as _) ; } } # [doc = "Removes all surfaces from a mesh."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_clear (& self , mesh : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_clear ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , mesh) ; } } # [doc = "Creates a new mesh and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `mesh_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method.\nTo place in a scene, attach this mesh to an instance using [`instance_set_base`][Self::instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn mesh_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a mesh's blend shape count."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_get_blend_shape_count (& self , mesh : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_get_blend_shape_count ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , mesh) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a mesh's blend shape mode."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_get_blend_shape_mode (& self , mesh : Rid) -> crate :: generated :: visual_server :: BlendShapeMode { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_get_blend_shape_mode ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , mesh) ; < crate :: generated :: visual_server :: BlendShapeMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a mesh's custom aabb."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_get_custom_aabb (& self , mesh : Rid) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_get_custom_aabb ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , mesh) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a mesh's number of surfaces."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_get_surface_count (& self , mesh : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_get_surface_count ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , mesh) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Removes a mesh's surface."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_remove_surface (& self , mesh : Rid , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_remove_surface ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , index as _) ; } } # [doc = "Sets a mesh's blend shape count."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_set_blend_shape_count (& self , mesh : Rid , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_set_blend_shape_count ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , amount as _) ; } } # [doc = "Sets a mesh's blend shape mode."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_set_blend_shape_mode (& self , mesh : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_set_blend_shape_mode ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , mode as _) ; } } # [doc = "Sets a mesh's custom aabb."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_set_custom_aabb (& self , mesh : Rid , aabb : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_set_custom_aabb ; let ret = crate :: icalls :: icallvar__rid_aabb (method_bind , self . this . sys () . as_ptr () , mesh , aabb) ; } } # [doc = "Returns a mesh's surface's aabb."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_surface_get_aabb (& self , mesh : Rid , surface : i64) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_aabb ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface as _) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a mesh's surface's vertex buffer."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_surface_get_array (& self , mesh : Rid , surface : i64) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_array ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface as _) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a mesh's surface's amount of indices."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_surface_get_array_index_len (& self , mesh : Rid , surface : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_array_index_len ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a mesh's surface's amount of vertices."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_surface_get_array_len (& self , mesh : Rid , surface : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_array_len ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a mesh's surface's buffer arrays."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_surface_get_arrays (& self , mesh : Rid , surface : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_arrays ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a mesh's surface's arrays for blend shapes."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_surface_get_blend_shape_arrays (& self , mesh : Rid , surface : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_blend_shape_arrays ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the format of a mesh's surface."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_surface_get_format (& self , mesh : Rid , surface : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_format ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Function is unused in Godot 3.x."] # [doc = ""] # [inline] pub fn mesh_surface_get_format_offset (& self , format : i64 , vertex_len : i64 , index_len : i64 , array_index : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_format_offset ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , format as _ , vertex_len as _ , index_len as _ , array_index as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn mesh_surface_get_format_stride (& self , format : i64 , vertex_len : i64 , index_len : i64 , array_index : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_format_stride ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , format as _ , vertex_len as _ , index_len as _ , array_index as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a mesh's surface's index buffer."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_surface_get_index_array (& self , mesh : Rid , surface : i64) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_index_array ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface as _) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a mesh's surface's material."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_surface_get_material (& self , mesh : Rid , surface : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_material ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface as _) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the primitive type of a mesh's surface."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_surface_get_primitive_type (& self , mesh : Rid , surface : i64) -> crate :: generated :: visual_server :: PrimitiveType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_primitive_type ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface as _) ; < crate :: generated :: visual_server :: PrimitiveType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the aabb of a mesh's surface's skeleton."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_surface_get_skeleton_aabb (& self , mesh : Rid , surface : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_get_skeleton_aabb ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , mesh , surface as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets a mesh's surface's material."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_surface_set_material (& self , mesh : Rid , surface : i64 , material : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_set_material ; let ret = crate :: icalls :: icallvar__rid_i64_rid (method_bind , self . this . sys () . as_ptr () , mesh , surface as _ , material) ; } } # [doc = "Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn mesh_surface_update_region (& self , mesh : Rid , surface : i64 , offset : i64 , data : PoolArray < u8 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . mesh_surface_update_region ; let ret = crate :: icalls :: icallvar__rid_i64_i64_bytearr (method_bind , self . this . sys () . as_ptr () , mesh , surface as _ , offset as _ , data) ; } } # [doc = "Allocates space for the multimesh data. Format parameters determine how the data will be stored by OpenGL. See [`MultimeshTransformFormat`][MultimeshTransformFormat], [`MultimeshColorFormat`][MultimeshColorFormat], and [`MultimeshCustomDataFormat`][MultimeshCustomDataFormat] for usage. Equivalent to [`MultiMesh.instance_count`][MultiMesh::instance_count].\n# Default Arguments\n* `custom_data_format` - `0`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_allocate (& self , multimesh : Rid , instances : i64 , transform_format : i64 , color_format : i64 , custom_data_format : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_allocate ; let ret = crate :: icalls :: icallvar__rid_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , instances as _ , transform_format as _ , color_format as _ , custom_data_format as _) ; } } # [doc = "Creates a new multimesh on the VisualServer and returns an [`RID`][Rid] handle. This RID will be used in all `multimesh_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method.\nTo place in a scene, attach this multimesh to an instance using [`instance_set_base`][Self::instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn multimesh_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_get_aabb (& self , multimesh : Rid) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_get_aabb ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , multimesh) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of instances allocated for this multimesh."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_get_instance_count (& self , multimesh : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_get_instance_count ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , multimesh) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the RID of the mesh that will be used in drawing this multimesh."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_get_mesh (& self , multimesh : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_get_mesh ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , multimesh) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of visible instances for this multimesh."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_get_visible_instances (& self , multimesh : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_get_visible_instances ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , multimesh) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the color by which the specified instance will be modulated."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_instance_get_color (& self , multimesh : Rid , index : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_get_color ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , index as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the custom data associated with the specified instance."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_instance_get_custom_data (& self , multimesh : Rid , index : i64) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_get_custom_data ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , index as _) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`Transform`][Transform] of the specified instance."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_instance_get_transform (& self , multimesh : Rid , index : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_get_transform ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , index as _) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`Transform2D`][Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_instance_get_transform_2d (& self , multimesh : Rid , index : i64) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_get_transform_2d ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , index as _) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the color by which this instance will be modulated. Equivalent to [`MultiMesh.set_instance_color`][MultiMesh::set_instance_color]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_instance_set_color (& self , multimesh : Rid , index : i64 , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_set_color ; let ret = crate :: icalls :: icallvar__rid_i64_color (method_bind , self . this . sys () . as_ptr () , multimesh , index as _ , color) ; } } # [doc = "Sets the custom data for this instance. Custom data is passed as a [`Color`][Color], but is interpreted as a `vec4` in the shader. Equivalent to [`MultiMesh.set_instance_custom_data`][MultiMesh::set_instance_custom_data]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_instance_set_custom_data (& self , multimesh : Rid , index : i64 , custom_data : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_set_custom_data ; let ret = crate :: icalls :: icallvar__rid_i64_color (method_bind , self . this . sys () . as_ptr () , multimesh , index as _ , custom_data) ; } } # [doc = "Sets the [`Transform`][Transform] for this instance. Equivalent to [`MultiMesh.set_instance_transform`][MultiMesh::set_instance_transform]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_instance_set_transform (& self , multimesh : Rid , index : i64 , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_set_transform ; let ret = crate :: icalls :: icallvar__rid_i64_trans (method_bind , self . this . sys () . as_ptr () , multimesh , index as _ , transform) ; } } # [doc = "Sets the [`Transform2D`][Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [`MultiMesh.set_instance_transform_2d`][MultiMesh::set_instance_transform_2d]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_instance_set_transform_2d (& self , multimesh : Rid , index : i64 , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_instance_set_transform_2d ; let ret = crate :: icalls :: icallvar__rid_i64_trans2D (method_bind , self . this . sys () . as_ptr () , multimesh , index as _ , transform) ; } } # [doc = "Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative.\n\nAll data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc.\n\n[`Transform`][Transform] is stored as 12 floats, [`Transform2D`][Transform2D] is stored as 8 floats, `COLOR_8BIT` / `CUSTOM_DATA_8BIT` is stored as 1 float (4 bytes as is) and `COLOR_FLOAT` / `CUSTOM_DATA_FLOAT` is stored as 4 floats."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_set_as_bulk_array (& self , multimesh : Rid , array : PoolArray < f32 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_set_as_bulk_array ; let ret = crate :: icalls :: icallvar__rid_f32arr (method_bind , self . this . sys () . as_ptr () , multimesh , array) ; } } # [doc = "Sets the mesh to be drawn by the multimesh. Equivalent to [`MultiMesh.mesh`][MultiMesh::mesh]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_set_mesh (& self , multimesh : Rid , mesh : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_set_mesh ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , multimesh , mesh) ; } } # [doc = "Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to [`MultiMesh.visible_instance_count`][MultiMesh::visible_instance_count]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn multimesh_set_visible_instances (& self , multimesh : Rid , visible : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . multimesh_set_visible_instances ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , multimesh , visible as _) ; } } # [doc = "Creates a new omni light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method.\nTo place in a scene, attach this omni light to an instance using [`instance_set_base`][Self::instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn omni_light_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . omni_light_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a particle system and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `particles_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method.\nTo place in a scene, attach these particles to an instance using [`instance_set_base`][Self::instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn particles_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [`Particles.capture_aabb`][Particles::capture_aabb]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_get_current_aabb (& self , particles : Rid) -> Aabb { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_get_current_aabb ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , particles) ; < Aabb > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if particles are currently set to emitting."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_get_emitting (& self , particles : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_get_emitting ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , particles) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if particles are not emitting and particles are set to inactive."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_is_inactive (& self , particles : Rid) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_is_inactive ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , particles) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to [`instances_cull_aabb`][Self::instances_cull_aabb], [`instances_cull_convex`][Self::instances_cull_convex], or [`instances_cull_ray`][Self::instances_cull_ray]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_request_process (& self , particles : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_request_process ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , particles) ; } } # [doc = "Reset the particles on the next update. Equivalent to [`Particles.restart`][Particles::restart]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_restart (& self , particles : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_restart ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , particles) ; } } # [doc = "Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [`Particles.amount`][Particles::amount]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_amount (& self , particles : Rid , amount : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_amount ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , particles , amount as _) ; } } # [doc = "Sets a custom axis-aligned bounding box for the particle system. Equivalent to [`Particles.visibility_aabb`][Particles::visibility_aabb]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_custom_aabb (& self , particles : Rid , aabb : Aabb) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_custom_aabb ; let ret = crate :: icalls :: icallvar__rid_aabb (method_bind , self . this . sys () . as_ptr () , particles , aabb) ; } } # [doc = "Sets the draw order of the particles to one of the named enums from [`ParticlesDrawOrder`][ParticlesDrawOrder]. See [`ParticlesDrawOrder`][ParticlesDrawOrder] for options. Equivalent to [`Particles.draw_order`][Particles::draw_order]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_draw_order (& self , particles : Rid , order : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_draw_order ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , particles , order as _) ; } } # [doc = "Sets the mesh to be used for the specified draw pass. Equivalent to [`Particles.draw_pass_1`][Particles::draw_pass_1], [`Particles.draw_pass_2`][Particles::draw_pass_2], [`Particles.draw_pass_3`][Particles::draw_pass_3], and [`Particles.draw_pass_4`][Particles::draw_pass_4]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_draw_pass_mesh (& self , particles : Rid , pass : i64 , mesh : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_draw_pass_mesh ; let ret = crate :: icalls :: icallvar__rid_i64_rid (method_bind , self . this . sys () . as_ptr () , particles , pass as _ , mesh) ; } } # [doc = "Sets the number of draw passes to use. Equivalent to [`Particles.draw_passes`][Particles::draw_passes]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_draw_passes (& self , particles : Rid , count : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_draw_passes ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , particles , count as _) ; } } # [doc = "Sets the [`Transform`][Transform] that will be used by the particles when they first emit."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_emission_transform (& self , particles : Rid , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_emission_transform ; let ret = crate :: icalls :: icallvar__rid_trans (method_bind , self . this . sys () . as_ptr () , particles , transform) ; } } # [doc = "If `true`, particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to [`Particles.emitting`][Particles::emitting]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_emitting (& self , particles : Rid , emitting : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_emitting ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , particles , emitting as _) ; } } # [doc = "Sets the explosiveness ratio. Equivalent to [`Particles.explosiveness`][Particles::explosiveness]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_explosiveness_ratio (& self , particles : Rid , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_explosiveness_ratio ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , particles , ratio as _) ; } } # [doc = "Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [`Particles.fixed_fps`][Particles::fixed_fps]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_fixed_fps (& self , particles : Rid , fps : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_fixed_fps ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , particles , fps as _) ; } } # [doc = "If `true`, uses fractional delta which smooths the movement of the particles. Equivalent to [`Particles.fract_delta`][Particles::fract_delta]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_fractional_delta (& self , particles : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_fractional_delta ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , particles , enable as _) ; } } # [doc = "Sets the lifetime of each particle in the system. Equivalent to [`Particles.lifetime`][Particles::lifetime]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_lifetime (& self , particles : Rid , lifetime : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_lifetime ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , particles , lifetime as _) ; } } # [doc = "If `true`, particles will emit once and then stop. Equivalent to [`Particles.one_shot`][Particles::one_shot]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_one_shot (& self , particles : Rid , one_shot : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_one_shot ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , particles , one_shot as _) ; } } # [doc = "Sets the preprocess time for the particles' animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [`Particles.preprocess`][Particles::preprocess]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_pre_process_time (& self , particles : Rid , time : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_pre_process_time ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , particles , time as _) ; } } # [doc = "Sets the material for processing the particles.\n**Note:** This is not the material used to draw the materials. Equivalent to [`Particles.process_material`][Particles::process_material]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_process_material (& self , particles : Rid , material : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_process_material ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , particles , material) ; } } # [doc = "Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [`Particles.randomness`][Particles::randomness]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_randomness_ratio (& self , particles : Rid , ratio : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_randomness_ratio ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , particles , ratio as _) ; } } # [doc = "Sets the speed scale of the particle system. Equivalent to [`Particles.speed_scale`][Particles::speed_scale]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_speed_scale (& self , particles : Rid , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_speed_scale ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , particles , scale as _) ; } } # [doc = "If `true`, particles use local coordinates. If `false` they use global coordinates. Equivalent to [`Particles.local_coords`][Particles::local_coords]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn particles_set_use_local_coordinates (& self , particles : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . particles_set_use_local_coordinates ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , particles , enable as _) ; } } # [doc = "Creates a reflection probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `reflection_probe_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method.\nTo place in a scene, attach this reflection probe to an instance using [`instance_set_base`][Self::instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn reflection_probe_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, reflections will ignore sky contribution. Equivalent to [`ReflectionProbe.interior_enable`][ReflectionProbe::interior_enable]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn reflection_probe_set_as_interior (& self , probe : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_as_interior ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , probe , enable as _) ; } } # [doc = "Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to [`ReflectionProbe.cull_mask`][ReflectionProbe::cull_mask]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn reflection_probe_set_cull_mask (& self , probe : Rid , layers : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_cull_mask ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , probe , layers as _) ; } } # [doc = "If `true`, uses box projection. This can make reflections look more correct in certain situations. Equivalent to [`ReflectionProbe.box_projection`][ReflectionProbe::box_projection]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn reflection_probe_set_enable_box_projection (& self , probe : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_enable_box_projection ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , probe , enable as _) ; } } # [doc = "If `true`, computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [`ReflectionProbe.enable_shadows`][ReflectionProbe::enable_shadows]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn reflection_probe_set_enable_shadows (& self , probe : Rid , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_enable_shadows ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , probe , enable as _) ; } } # [doc = "Sets the size of the area that the reflection probe will capture. Equivalent to [`ReflectionProbe.extents`][ReflectionProbe::extents]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn reflection_probe_set_extents (& self , probe : Rid , extents : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_extents ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , probe , extents) ; } } # [doc = "Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [`ReflectionProbe.intensity`][ReflectionProbe::intensity]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn reflection_probe_set_intensity (& self , probe : Rid , intensity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_intensity ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , intensity as _) ; } } # [doc = "Sets the ambient light color for this reflection probe when set to interior mode. Equivalent to [`ReflectionProbe.interior_ambient_color`][ReflectionProbe::interior_ambient_color]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn reflection_probe_set_interior_ambient (& self , probe : Rid , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_interior_ambient ; let ret = crate :: icalls :: icallvar__rid_color (method_bind , self . this . sys () . as_ptr () , probe , color) ; } } # [doc = "Sets the energy multiplier for this reflection probes ambient light contribution when set to interior mode. Equivalent to [`ReflectionProbe.interior_ambient_energy`][ReflectionProbe::interior_ambient_energy]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn reflection_probe_set_interior_ambient_energy (& self , probe : Rid , energy : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_interior_ambient_energy ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , energy as _) ; } } # [doc = "Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to interior mode. Useful so that ambient light matches the color of the room. Equivalent to [`ReflectionProbe.interior_ambient_contrib`][ReflectionProbe::interior_ambient_contrib]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn reflection_probe_set_interior_ambient_probe_contribution (& self , probe : Rid , contrib : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_interior_ambient_probe_contribution ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , contrib as _) ; } } # [doc = "Sets the max distance away from the probe an object can be before it is culled. Equivalent to [`ReflectionProbe.max_distance`][ReflectionProbe::max_distance]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn reflection_probe_set_max_distance (& self , probe : Rid , distance : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_max_distance ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , probe , distance as _) ; } } # [doc = "Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to [`ReflectionProbe.origin_offset`][ReflectionProbe::origin_offset]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn reflection_probe_set_origin_offset (& self , probe : Rid , offset : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_origin_offset ; let ret = crate :: icalls :: icallvar__rid_vec3 (method_bind , self . this . sys () . as_ptr () , probe , offset) ; } } # [doc = "Sets how often the reflection probe updates. Can either be once or every frame. See [`ReflectionProbeUpdateMode`][ReflectionProbeUpdateMode] for options."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn reflection_probe_set_update_mode (& self , probe : Rid , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . reflection_probe_set_update_mode ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , probe , mode as _) ; } } # [doc = "Schedules a callback to the corresponding named `method` on `where` after a frame has been drawn.\nThe callback method must use only 1 argument which will be called with `userdata`."] # [doc = ""] # [inline] pub fn request_frame_drawn_callback (& self , where_ : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString > , userdata : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . request_frame_drawn_callback ; let ret = crate :: icalls :: icallvar__obj_str_var (method_bind , self . this . sys () . as_ptr () , where_ . as_arg_ptr () , method . into () , userdata . owned_to_variant ()) ; } } # [doc = "Creates a scenario and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `scenario_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method.\nThe scenario is the 3D world that all the visual instances exist in."] # [doc = ""] # [inline] pub fn scenario_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . scenario_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the [`ScenarioDebugMode`][ScenarioDebugMode] for this scenario. See [`ScenarioDebugMode`][ScenarioDebugMode] for options."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn scenario_set_debug (& self , scenario : Rid , debug_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . scenario_set_debug ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , scenario , debug_mode as _) ; } } # [doc = "Sets the environment that will be used with this scenario."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn scenario_set_environment (& self , scenario : Rid , environment : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . scenario_set_environment ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , scenario , environment) ; } } # [doc = "Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn scenario_set_fallback_environment (& self , scenario : Rid , environment : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . scenario_set_fallback_environment ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , scenario , environment) ; } } # [doc = "Sets the size of the reflection atlas shared by all reflection probes in this scenario."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn scenario_set_reflection_atlas_size (& self , scenario : Rid , size : i64 , subdiv : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . scenario_set_reflection_atlas_size ; let ret = crate :: icalls :: icallvar__rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , scenario , size as _ , subdiv as _) ; } } # [doc = "Sets a boot image. The color defines the background color. If `scale` is `true`, the image will be scaled to fit the screen size. If `use_filter` is `true`, the image will be scaled with linear interpolation. If `use_filter` is `false`, the image will be scaled with nearest-neighbor interpolation.\n# Default Arguments\n* `use_filter` - `true`"] # [doc = ""] # [inline] pub fn set_boot_image (& self , image : impl AsArg < crate :: generated :: Image > , color : Color , scale : bool , use_filter : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . set_boot_image ; let ret = crate :: icalls :: icallvar__obj_color_bool_bool (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , color , scale as _ , use_filter as _) ; } } # [doc = "If `true`, the engine will generate wireframes for use with the wireframe debug mode."] # [doc = ""] # [inline] pub fn set_debug_generate_wireframes (& self , generate : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . set_debug_generate_wireframes ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , generate as _) ; } } # [doc = "Sets the default clear color which is used when a specific clear color has not been selected."] # [doc = ""] # [inline] pub fn set_default_clear_color (& self , color : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . set_default_clear_color ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , color) ; } } # [doc = "If `false`, disables rendering completely, but the engine logic is still being processed. You can call [`force_draw`][Self::force_draw] to draw a frame even with rendering disabled."] # [doc = ""] # [inline] pub fn set_render_loop_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . set_render_loop_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If asynchronous shader compilation is enabled, this controls whether [`SpatialMaterial.ASYNC_MODE_HIDDEN`][SpatialMaterial::ASYNC_MODE_HIDDEN] is obeyed.\nFor instance, you may want to enable this temporarily before taking a screenshot. This ensures everything is visible even if shaders with async mode _hidden_ are not ready yet.\nReflection probes use this internally to ensure they capture everything regardless the shaders are ready or not."] # [doc = ""] # [inline] pub fn set_shader_async_hidden_forbidden (& self , forbidden : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . set_shader_async_hidden_forbidden ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , forbidden as _) ; } } # [doc = "Sets the scale to apply to the passage of time for the shaders' `TIME` builtin.\nThe default value is `1.0`, which means `TIME` will count the real time as it goes by, without narrowing or stretching it."] # [doc = ""] # [inline] pub fn set_shader_time_scale (& self , scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . set_shader_time_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , scale as _) ; } } # [doc = "Enables or disables occlusion culling."] # [doc = ""] # [inline] pub fn set_use_occlusion_culling (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . set_use_occlusion_culling ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Creates an empty shader and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `shader_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method."] # [doc = ""] # [inline] pub fn shader_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . shader_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a shader's code."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn shader_get_code (& self , shader : Rid) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . shader_get_code ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , shader) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a default texture from a shader searched by name."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn shader_get_default_texture_param (& self , shader : Rid , name : impl Into < GodotString >) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . shader_get_default_texture_param ; let ret = crate :: icalls :: icallvar__rid_str (method_bind , self . this . sys () . as_ptr () , shader , name . into ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the parameters of a shader."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn shader_get_param_list (& self , shader : Rid) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . shader_get_param_list ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , shader) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets a shader's code."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn shader_set_code (& self , shader : Rid , code : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . shader_set_code ; let ret = crate :: icalls :: icallvar__rid_str (method_bind , self . this . sys () . as_ptr () , shader , code . into ()) ; } } # [doc = "Sets a shader's default texture. Overwrites the texture given by name."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn shader_set_default_texture_param (& self , shader : Rid , name : impl Into < GodotString > , texture : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . shader_set_default_texture_param ; let ret = crate :: icalls :: icallvar__rid_str_rid (method_bind , self . this . sys () . as_ptr () , shader , name . into () , texture) ; } } # [doc = "Allocates the GPU buffers for this skeleton.\n# Default Arguments\n* `is_2d_skeleton` - `false`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn skeleton_allocate (& self , skeleton : Rid , bones : i64 , is_2d_skeleton : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . skeleton_allocate ; let ret = crate :: icalls :: icallvar__rid_i64_bool (method_bind , self . this . sys () . as_ptr () , skeleton , bones as _ , is_2d_skeleton as _) ; } } # [doc = "Returns the [`Transform`][Transform] set for a specific bone of this skeleton."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn skeleton_bone_get_transform (& self , skeleton : Rid , bone : i64) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . skeleton_bone_get_transform ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , skeleton , bone as _) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the [`Transform2D`][Transform2D] set for a specific bone of this skeleton."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn skeleton_bone_get_transform_2d (& self , skeleton : Rid , bone : i64) -> Transform2D { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . skeleton_bone_get_transform_2d ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , skeleton , bone as _) ; < Transform2D > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the [`Transform`][Transform] for a specific bone of this skeleton."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn skeleton_bone_set_transform (& self , skeleton : Rid , bone : i64 , transform : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . skeleton_bone_set_transform ; let ret = crate :: icalls :: icallvar__rid_i64_trans (method_bind , self . this . sys () . as_ptr () , skeleton , bone as _ , transform) ; } } # [doc = "Sets the [`Transform2D`][Transform2D] for a specific bone of this skeleton."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn skeleton_bone_set_transform_2d (& self , skeleton : Rid , bone : i64 , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . skeleton_bone_set_transform_2d ; let ret = crate :: icalls :: icallvar__rid_i64_trans2D (method_bind , self . this . sys () . as_ptr () , skeleton , bone as _ , transform) ; } } # [doc = "Creates a skeleton and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `skeleton_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method."] # [doc = ""] # [inline] pub fn skeleton_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . skeleton_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of bones allocated for this skeleton."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn skeleton_get_bone_count (& self , skeleton : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . skeleton_get_bone_count ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , skeleton) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Creates an empty sky and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `sky_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method."] # [doc = ""] # [inline] pub fn sky_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . sky_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets a sky's texture."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn sky_set_texture (& self , sky : Rid , cube_map : Rid , radiance_size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . sky_set_texture ; let ret = crate :: icalls :: icallvar__rid_rid_i64 (method_bind , self . this . sys () . as_ptr () , sky , cube_map , radiance_size as _) ; } } # [doc = "Creates a spot light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method.\nTo place in a scene, attach this spot light to an instance using [`instance_set_base`][Self::instance_set_base] using the returned RID."] # [doc = ""] # [inline] pub fn spot_light_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . spot_light_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Not implemented in Godot 3.x."] # [doc = ""] # [inline] pub fn sync (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . sync ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Allocates the GPU memory for the texture.\n# Default Arguments\n* `flags` - `7`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_allocate (& self , texture : Rid , width : i64 , height : i64 , depth_3d : i64 , format : i64 , type_ : i64 , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_allocate ; let ret = crate :: icalls :: icallvar__rid_i64_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , texture , width as _ , height as _ , depth_3d as _ , format as _ , type_ as _ , flags as _) ; } } # [doc = "Binds the texture to a texture slot."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_bind (& self , texture : Rid , number : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_bind ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , texture , number as _) ; } } # [doc = "Creates an empty texture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `texture_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method."] # [doc = ""] # [inline] pub fn texture_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates a texture, allocates the space for an image, and fills in the image.\n# Default Arguments\n* `flags` - `7`"] # [doc = ""] # [inline] pub fn texture_create_from_image (& self , image : impl AsArg < crate :: generated :: Image > , flags : i64) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_create_from_image ; let ret = crate :: icalls :: icallvar__obj_i64 (method_bind , self . this . sys () . as_ptr () , image . as_arg_ptr () , flags as _) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a list of all the textures and their information."] # [doc = ""] # [inline] pub fn texture_debug_usage (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_debug_usage ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a copy of a texture's image unless it's a CubeMap, in which case it returns the [`RID`][Rid] of the image at one of the cubes sides.\n# Default Arguments\n* `cube_side` - `0`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_get_data (& self , texture : Rid , cube_side : i64) -> Option < Ref < crate :: generated :: Image , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_data ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , texture , cube_side as _) ; < Option < Ref < crate :: generated :: Image , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the depth of the texture."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_get_depth (& self , texture : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_depth ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , texture) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the flags of a texture."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_get_flags (& self , texture : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_flags ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , texture) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the format of the texture's image."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_get_format (& self , texture : Rid) -> crate :: generated :: image :: Format { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_format ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , texture) ; < crate :: generated :: image :: Format > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the texture's height."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_get_height (& self , texture : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_height ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , texture) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the texture's path."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_get_path (& self , texture : Rid) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_path ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , texture) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the opengl id of the texture's image."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_get_texid (& self , texture : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_texid ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , texture) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the type of the texture, can be any of the [`TextureType`][TextureType]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_get_type (& self , texture : Rid) -> crate :: generated :: visual_server :: TextureType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_type ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , texture) ; < crate :: generated :: visual_server :: TextureType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the texture's width."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_get_width (& self , texture : Rid) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_get_width ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , texture) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the texture's image data. If it's a CubeMap, it sets the image data at a cube side.\n# Default Arguments\n* `layer` - `0`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_set_data (& self , texture : Rid , image : impl AsArg < crate :: generated :: Image > , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_set_data ; let ret = crate :: icalls :: icallvar__rid_obj_i64 (method_bind , self . this . sys () . as_ptr () , texture , image . as_arg_ptr () , layer as _) ; } } # [doc = "Sets a part of the data for a texture. Warning: this function calls the underlying graphics API directly and may corrupt your texture if used improperly.\n# Default Arguments\n* `layer` - `0`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_set_data_partial (& self , texture : Rid , image : impl AsArg < crate :: generated :: Image > , src_x : i64 , src_y : i64 , src_w : i64 , src_h : i64 , dst_x : i64 , dst_y : i64 , dst_mip : i64 , layer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_set_data_partial ; let ret = crate :: icalls :: icallvar__rid_obj_i64_i64_i64_i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , texture , image . as_arg_ptr () , src_x as _ , src_y as _ , src_w as _ , src_h as _ , dst_x as _ , dst_y as _ , dst_mip as _ , layer as _) ; } } # [doc = "Sets the texture's flags. See [`TextureFlags`][TextureFlags] for options."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_set_flags (& self , texture : Rid , flags : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_set_flags ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , texture , flags as _) ; } } # [doc = "Sets the texture's path."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_set_path (& self , texture : Rid , path : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_set_path ; let ret = crate :: icalls :: icallvar__rid_str (method_bind , self . this . sys () . as_ptr () , texture , path . into ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCreates an update link between two textures, similar to how [`ViewportTexture`][ViewportTexture]s operate. When the base texture is the texture of a [`Viewport`][Viewport], every time the viewport renders a new frame, the proxy texture automatically receives an update.\nFor example, this code links a generic [`ImageTexture`][ImageTexture] to the texture output of the [`Viewport`][Viewport] using the VisualServer API:\n```gdscript\nfunc _ready():\n    var viewport_rid = get_viewport().get_viewport_rid()\n    var viewport_texture_rid = VisualServer.viewport_get_texture(viewport_rid)\n\n    var proxy_texture = ImageTexture.new()\n    var viewport_texture_image_data = VisualServer.texture_get_data(viewport_texture_rid)\n\n    proxy_texture.create_from_image(viewport_texture_image_data)\n    var proxy_texture_rid = proxy_texture.get_rid()\n    VisualServer.texture_set_proxy(proxy_texture_rid, viewport_texture_rid)\n\n    $TextureRect.texture = proxy_texture\n```"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_set_proxy (& self , proxy : Rid , base : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_set_proxy ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , proxy , base) ; } } # [doc = "If `true`, sets internal processes to shrink all image data to half the size."] # [doc = ""] # [inline] pub fn texture_set_shrink_all_x2_on_set_data (& self , shrink : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_set_shrink_all_x2_on_set_data ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , shrink as _) ; } } # [doc = "Resizes the texture to the specified dimensions."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn texture_set_size_override (& self , texture : Rid , width : i64 , height : i64 , depth : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . texture_set_size_override ; let ret = crate :: icalls :: icallvar__rid_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , texture , width as _ , height as _ , depth as _) ; } } # [doc = "If `true`, the image will be stored in the texture's images array if overwritten."] # [doc = ""] # [inline] pub fn textures_keep_original (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . textures_keep_original ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Sets a viewport's camera."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_attach_camera (& self , viewport : Rid , camera : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_attach_camera ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , viewport , camera) ; } } # [doc = "Sets a viewport's canvas."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_attach_canvas (& self , viewport : Rid , canvas : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_attach_canvas ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , viewport , canvas) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nCopies viewport to a region of the screen specified by `rect`. If [`Viewport.render_direct_to_screen`][Viewport::render_direct_to_screen] is `true`, then viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.\nFor example, you can set the root viewport to not render at all with the following code:\n```gdscript\nfunc _ready():\n    get_viewport().set_attach_to_screen_rect(Rect2())\n    $Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600))\n```\nUsing this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see [`viewport_set_render_direct_to_screen`][Self::viewport_set_render_direct_to_screen].\n# Default Arguments\n* `rect` - `Rect2( 0, 0, 0, 0 )`\n* `screen` - `0`"] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_attach_to_screen (& self , viewport : Rid , rect : Rect2 , screen : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_attach_to_screen ; let ret = crate :: icalls :: icallvar__rid_rect2_i64 (method_bind , self . this . sys () . as_ptr () , viewport , rect , screen as _) ; } } # [doc = "Creates an empty viewport and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `viewport_*` VisualServer functions.\nOnce finished with your RID, you will want to free the RID using the VisualServer's [`free_rid`][Self::free_rid] static method."] # [doc = ""] # [inline] pub fn viewport_create (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_create ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Detaches the viewport from the screen."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_detach (& self , viewport : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_detach ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , viewport) ; } } # [doc = "Returns a viewport's render information. For options, see the [`ViewportRenderInfo`][ViewportRenderInfo] constants."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_get_render_info (& self , viewport : Rid , info : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_get_render_info ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , info as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the viewport's last rendered frame."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_get_texture (& self , viewport : Rid) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_get_texture ; let ret = crate :: icalls :: icallvar__rid (method_bind , self . this . sys () . as_ptr () , viewport) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Detaches a viewport from a canvas and vice versa."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_remove_canvas (& self , viewport : Rid , canvas : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_remove_canvas ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , viewport , canvas) ; } } # [doc = "If `true`, sets the viewport active, else sets it inactive."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_active (& self , viewport : Rid , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_active ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , active as _) ; } } # [doc = "Sets the stacking order for a viewport's canvas.\n`layer` is the actual canvas layer, while `sublayer` specifies the stacking order of the canvas among those in the same layer."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_canvas_stacking (& self , viewport : Rid , canvas : Rid , layer : i64 , sublayer : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_canvas_stacking ; let ret = crate :: icalls :: icallvar__rid_rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , viewport , canvas , layer as _ , sublayer as _) ; } } # [doc = "Sets the transformation of a viewport's canvas."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_canvas_transform (& self , viewport : Rid , canvas : Rid , offset : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_canvas_transform ; let ret = crate :: icalls :: icallvar__rid_rid_trans2D (method_bind , self . this . sys () . as_ptr () , viewport , canvas , offset) ; } } # [doc = "Sets the clear mode of a viewport. See [`ViewportClearMode`][ViewportClearMode] for options."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_clear_mode (& self , viewport : Rid , clear_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_clear_mode ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , clear_mode as _) ; } } # [doc = "Sets the debug draw mode of a viewport. See [`ViewportDebugDraw`][ViewportDebugDraw] for options."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_debug_draw (& self , viewport : Rid , draw : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_debug_draw ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , draw as _) ; } } # [doc = "If `true`, a viewport's 3D rendering is disabled."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_disable_3d (& self , viewport : Rid , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_disable_3d ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , disabled as _) ; } } # [doc = "If `true`, rendering of a viewport's environment is disabled."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_disable_environment (& self , viewport : Rid , disabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_disable_environment ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , disabled as _) ; } } # [doc = "Sets the viewport's global transformation matrix."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_global_canvas_transform (& self , viewport : Rid , transform : Transform2D) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_global_canvas_transform ; let ret = crate :: icalls :: icallvar__rid_trans2D (method_bind , self . this . sys () . as_ptr () , viewport , transform) ; } } # [doc = "If `true`, the viewport renders to high dynamic range (HDR) instead of standard dynamic range (SDR). See also [`viewport_set_use_32_bpc_depth`][Self::viewport_set_use_32_bpc_depth].\n**Note:** Only available on the GLES3 backend."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_hdr (& self , viewport : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_hdr ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , enabled as _) ; } } # [doc = "If `true`, the viewport's canvas is not rendered."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_hide_canvas (& self , viewport : Rid , hidden : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_hide_canvas ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , hidden as _) ; } } # [doc = "Currently unimplemented in Godot 3.x."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_hide_scenario (& self , viewport : Rid , hidden : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_hide_scenario ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , hidden as _) ; } } # [doc = "Sets the anti-aliasing mode. See [`ViewportMSAA`][ViewportMSAA] for options."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_msaa (& self , viewport : Rid , msaa : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_msaa ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , msaa as _) ; } } # [doc = "Sets the viewport's parent to another viewport."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_parent_viewport (& self , viewport : Rid , parent_viewport : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_parent_viewport ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , viewport , parent_viewport) ; } } # [doc = "If `true`, render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the `SCREEN_TEXTURE`. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_render_direct_to_screen (& self , viewport : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_render_direct_to_screen ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , enabled as _) ; } } # [doc = "Sets a viewport's scenario.\nThe scenario contains information about the [`ScenarioDebugMode`][ScenarioDebugMode], environment information, reflection atlas etc."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_scenario (& self , viewport : Rid , scenario : Rid) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_scenario ; let ret = crate :: icalls :: icallvar__rid_rid (method_bind , self . this . sys () . as_ptr () , viewport , scenario) ; } } # [doc = "Sets the shadow atlas quadrant's subdivision."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_shadow_atlas_quadrant_subdivision (& self , viewport : Rid , quadrant : i64 , subdivision : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_shadow_atlas_quadrant_subdivision ; let ret = crate :: icalls :: icallvar__rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , viewport , quadrant as _ , subdivision as _) ; } } # [doc = "Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_shadow_atlas_size (& self , viewport : Rid , size : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_shadow_atlas_size ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , size as _) ; } } # [doc = "Sets the sharpening `intensity` for the `viewport`. If set to a value greater than `0.0`, contrast-adaptive sharpening will be applied to the 3D viewport. This has a low performance cost and can be used to recover some of the sharpness lost from using FXAA. Values around `0.5` generally give the best results. See also [`viewport_set_use_fxaa`][Self::viewport_set_use_fxaa]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_sharpen_intensity (& self , viewport : Rid , intensity : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_sharpen_intensity ; let ret = crate :: icalls :: icallvar__rid_f64 (method_bind , self . this . sys () . as_ptr () , viewport , intensity as _) ; } } # [doc = "Sets the viewport's width and height."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_size (& self , viewport : Rid , width : i64 , height : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_size ; let ret = crate :: icalls :: icallvar__rid_i64_i64 (method_bind , self . this . sys () . as_ptr () , viewport , width as _ , height as _) ; } } # [doc = "If `true`, the viewport renders its background as transparent."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_transparent_background (& self , viewport : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_transparent_background ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , enabled as _) ; } } # [doc = "Sets when the viewport should be updated. See [`ViewportUpdateMode`][ViewportUpdateMode] constants for options."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_update_mode (& self , viewport : Rid , update_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_update_mode ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , update_mode as _) ; } } # [doc = "Sets the viewport's 2D/3D mode. See [`ViewportUsage`][ViewportUsage] constants for options."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_usage (& self , viewport : Rid , usage : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_usage ; let ret = crate :: icalls :: icallvar__rid_i64 (method_bind , self . this . sys () . as_ptr () , viewport , usage as _) ; } } # [doc = "If `true`, allocates the viewport's framebuffer with full floating-point precision (32-bit) instead of half floating-point precision (16-bit). Only effective if [`viewport_set_use_32_bpc_depth`][Self::viewport_set_use_32_bpc_depth] is used on the same [`Viewport`][Viewport] to set HDR to `true`.\n**Note:** Only available on the GLES3 backend."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_use_32_bpc_depth (& self , viewport : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_use_32_bpc_depth ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , enabled as _) ; } } # [doc = "If `true`, the viewport uses augmented or virtual reality technologies. See [`ARVRInterface`][ARVRInterface]."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_use_arvr (& self , viewport : Rid , use_arvr : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_use_arvr ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , use_arvr as _) ; } } # [doc = "If `true`, uses a fast post-processing filter to make banding significantly less visible. In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger.\n**Note:** Only available on the GLES3 backend. [`Viewport.hdr`][Viewport::hdr] must also be `true` for debanding to be effective."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_use_debanding (& self , viewport : Rid , debanding : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_use_debanding ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , debanding as _) ; } } # [doc = "Enables fast approximate antialiasing for this viewport. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K. Some of the lost sharpness can be recovered by enabling contrast-adaptive sharpening (see [`viewport_set_sharpen_intensity`][Self::viewport_set_sharpen_intensity])."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_use_fxaa (& self , viewport : Rid , fxaa : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_use_fxaa ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , fxaa as _) ; } } # [doc = "If `true`, the viewport's rendering is flipped vertically."] # [doc = "\n# Safety\nThis function has parameters of type `Rid` (resource ID). RIDs are untyped and interpreted as raw pointers by the engine, so passing an incorrect RID can cause UB."] # [inline] pub unsafe fn viewport_set_vflip (& self , viewport : Rid , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualServerMethodTable :: get (get_api ()) . viewport_set_vflip ; let ret = crate :: icalls :: icallvar__rid_bool (method_bind , self . this . sys () . as_ptr () , viewport , enabled as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualServer { } unsafe impl GodotObject for VisualServer { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisualServer" } } impl std :: ops :: Deref for VisualServer { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for VisualServer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub black_bars_set_images : * mut sys :: godot_method_bind , pub black_bars_set_margins : * mut sys :: godot_method_bind , pub camera_create : * mut sys :: godot_method_bind , pub camera_set_cull_mask : * mut sys :: godot_method_bind , pub camera_set_environment : * mut sys :: godot_method_bind , pub camera_set_frustum : * mut sys :: godot_method_bind , pub camera_set_orthogonal : * mut sys :: godot_method_bind , pub camera_set_perspective : * mut sys :: godot_method_bind , pub camera_set_transform : * mut sys :: godot_method_bind , pub camera_set_use_vertical_aspect : * mut sys :: godot_method_bind , pub canvas_create : * mut sys :: godot_method_bind , pub canvas_item_add_circle : * mut sys :: godot_method_bind , pub canvas_item_add_clip_ignore : * mut sys :: godot_method_bind , pub canvas_item_add_line : * mut sys :: godot_method_bind , pub canvas_item_add_mesh : * mut sys :: godot_method_bind , pub canvas_item_add_multimesh : * mut sys :: godot_method_bind , pub canvas_item_add_nine_patch : * mut sys :: godot_method_bind , pub canvas_item_add_particles : * mut sys :: godot_method_bind , pub canvas_item_add_polygon : * mut sys :: godot_method_bind , pub canvas_item_add_polyline : * mut sys :: godot_method_bind , pub canvas_item_add_primitive : * mut sys :: godot_method_bind , pub canvas_item_add_rect : * mut sys :: godot_method_bind , pub canvas_item_add_set_transform : * mut sys :: godot_method_bind , pub canvas_item_add_texture_rect : * mut sys :: godot_method_bind , pub canvas_item_add_texture_rect_region : * mut sys :: godot_method_bind , pub canvas_item_add_triangle_array : * mut sys :: godot_method_bind , pub canvas_item_clear : * mut sys :: godot_method_bind , pub canvas_item_create : * mut sys :: godot_method_bind , pub canvas_item_set_clip : * mut sys :: godot_method_bind , pub canvas_item_set_copy_to_backbuffer : * mut sys :: godot_method_bind , pub canvas_item_set_custom_rect : * mut sys :: godot_method_bind , pub canvas_item_set_distance_field_mode : * mut sys :: godot_method_bind , pub canvas_item_set_draw_behind_parent : * mut sys :: godot_method_bind , pub canvas_item_set_draw_index : * mut sys :: godot_method_bind , pub canvas_item_set_light_mask : * mut sys :: godot_method_bind , pub canvas_item_set_material : * mut sys :: godot_method_bind , pub canvas_item_set_modulate : * mut sys :: godot_method_bind , pub canvas_item_set_parent : * mut sys :: godot_method_bind , pub canvas_item_set_self_modulate : * mut sys :: godot_method_bind , pub canvas_item_set_sort_children_by_y : * mut sys :: godot_method_bind , pub canvas_item_set_transform : * mut sys :: godot_method_bind , pub canvas_item_set_use_parent_material : * mut sys :: godot_method_bind , pub canvas_item_set_visible : * mut sys :: godot_method_bind , pub canvas_item_set_z_as_relative_to_parent : * mut sys :: godot_method_bind , pub canvas_item_set_z_index : * mut sys :: godot_method_bind , pub canvas_light_attach_to_canvas : * mut sys :: godot_method_bind , pub canvas_light_create : * mut sys :: godot_method_bind , pub canvas_light_occluder_attach_to_canvas : * mut sys :: godot_method_bind , pub canvas_light_occluder_create : * mut sys :: godot_method_bind , pub canvas_light_occluder_set_enabled : * mut sys :: godot_method_bind , pub canvas_light_occluder_set_light_mask : * mut sys :: godot_method_bind , pub canvas_light_occluder_set_polygon : * mut sys :: godot_method_bind , pub canvas_light_occluder_set_transform : * mut sys :: godot_method_bind , pub canvas_light_set_color : * mut sys :: godot_method_bind , pub canvas_light_set_enabled : * mut sys :: godot_method_bind , pub canvas_light_set_energy : * mut sys :: godot_method_bind , pub canvas_light_set_height : * mut sys :: godot_method_bind , pub canvas_light_set_item_cull_mask : * mut sys :: godot_method_bind , pub canvas_light_set_item_shadow_cull_mask : * mut sys :: godot_method_bind , pub canvas_light_set_layer_range : * mut sys :: godot_method_bind , pub canvas_light_set_mode : * mut sys :: godot_method_bind , pub canvas_light_set_scale : * mut sys :: godot_method_bind , pub canvas_light_set_shadow_buffer_size : * mut sys :: godot_method_bind , pub canvas_light_set_shadow_color : * mut sys :: godot_method_bind , pub canvas_light_set_shadow_enabled : * mut sys :: godot_method_bind , pub canvas_light_set_shadow_filter : * mut sys :: godot_method_bind , pub canvas_light_set_shadow_gradient_length : * mut sys :: godot_method_bind , pub canvas_light_set_shadow_smooth : * mut sys :: godot_method_bind , pub canvas_light_set_texture : * mut sys :: godot_method_bind , pub canvas_light_set_texture_offset : * mut sys :: godot_method_bind , pub canvas_light_set_transform : * mut sys :: godot_method_bind , pub canvas_light_set_z_range : * mut sys :: godot_method_bind , pub canvas_occluder_polygon_create : * mut sys :: godot_method_bind , pub canvas_occluder_polygon_set_cull_mode : * mut sys :: godot_method_bind , pub canvas_occluder_polygon_set_shape : * mut sys :: godot_method_bind , pub canvas_occluder_polygon_set_shape_as_lines : * mut sys :: godot_method_bind , pub canvas_set_item_mirroring : * mut sys :: godot_method_bind , pub canvas_set_modulate : * mut sys :: godot_method_bind , pub directional_light_create : * mut sys :: godot_method_bind , pub draw : * mut sys :: godot_method_bind , pub environment_create : * mut sys :: godot_method_bind , pub environment_set_adjustment : * mut sys :: godot_method_bind , pub environment_set_ambient_light : * mut sys :: godot_method_bind , pub environment_set_background : * mut sys :: godot_method_bind , pub environment_set_bg_color : * mut sys :: godot_method_bind , pub environment_set_bg_energy : * mut sys :: godot_method_bind , pub environment_set_canvas_max_layer : * mut sys :: godot_method_bind , pub environment_set_dof_blur_far : * mut sys :: godot_method_bind , pub environment_set_dof_blur_near : * mut sys :: godot_method_bind , pub environment_set_fog : * mut sys :: godot_method_bind , pub environment_set_fog_depth : * mut sys :: godot_method_bind , pub environment_set_fog_height : * mut sys :: godot_method_bind , pub environment_set_glow : * mut sys :: godot_method_bind , pub environment_set_sky : * mut sys :: godot_method_bind , pub environment_set_sky_custom_fov : * mut sys :: godot_method_bind , pub environment_set_sky_orientation : * mut sys :: godot_method_bind , pub environment_set_ssao : * mut sys :: godot_method_bind , pub environment_set_ssr : * mut sys :: godot_method_bind , pub environment_set_tonemap : * mut sys :: godot_method_bind , pub finish : * mut sys :: godot_method_bind , pub force_draw : * mut sys :: godot_method_bind , pub force_sync : * mut sys :: godot_method_bind , pub free_rid : * mut sys :: godot_method_bind , pub get_render_info : * mut sys :: godot_method_bind , pub get_test_cube : * mut sys :: godot_method_bind , pub get_test_texture : * mut sys :: godot_method_bind , pub get_video_adapter_name : * mut sys :: godot_method_bind , pub get_video_adapter_vendor : * mut sys :: godot_method_bind , pub get_white_texture : * mut sys :: godot_method_bind , pub gi_probe_create : * mut sys :: godot_method_bind , pub gi_probe_get_bias : * mut sys :: godot_method_bind , pub gi_probe_get_bounds : * mut sys :: godot_method_bind , pub gi_probe_get_cell_size : * mut sys :: godot_method_bind , pub gi_probe_get_dynamic_data : * mut sys :: godot_method_bind , pub gi_probe_get_dynamic_range : * mut sys :: godot_method_bind , pub gi_probe_get_energy : * mut sys :: godot_method_bind , pub gi_probe_get_normal_bias : * mut sys :: godot_method_bind , pub gi_probe_get_propagation : * mut sys :: godot_method_bind , pub gi_probe_get_to_cell_xform : * mut sys :: godot_method_bind , pub gi_probe_is_compressed : * mut sys :: godot_method_bind , pub gi_probe_is_interior : * mut sys :: godot_method_bind , pub gi_probe_set_bias : * mut sys :: godot_method_bind , pub gi_probe_set_bounds : * mut sys :: godot_method_bind , pub gi_probe_set_cell_size : * mut sys :: godot_method_bind , pub gi_probe_set_compress : * mut sys :: godot_method_bind , pub gi_probe_set_dynamic_data : * mut sys :: godot_method_bind , pub gi_probe_set_dynamic_range : * mut sys :: godot_method_bind , pub gi_probe_set_energy : * mut sys :: godot_method_bind , pub gi_probe_set_interior : * mut sys :: godot_method_bind , pub gi_probe_set_normal_bias : * mut sys :: godot_method_bind , pub gi_probe_set_propagation : * mut sys :: godot_method_bind , pub gi_probe_set_to_cell_xform : * mut sys :: godot_method_bind , pub has_changed : * mut sys :: godot_method_bind , pub has_feature : * mut sys :: godot_method_bind , pub has_os_feature : * mut sys :: godot_method_bind , pub immediate_begin : * mut sys :: godot_method_bind , pub immediate_clear : * mut sys :: godot_method_bind , pub immediate_color : * mut sys :: godot_method_bind , pub immediate_create : * mut sys :: godot_method_bind , pub immediate_end : * mut sys :: godot_method_bind , pub immediate_get_material : * mut sys :: godot_method_bind , pub immediate_normal : * mut sys :: godot_method_bind , pub immediate_set_material : * mut sys :: godot_method_bind , pub immediate_tangent : * mut sys :: godot_method_bind , pub immediate_uv : * mut sys :: godot_method_bind , pub immediate_uv2 : * mut sys :: godot_method_bind , pub immediate_vertex : * mut sys :: godot_method_bind , pub immediate_vertex_2d : * mut sys :: godot_method_bind , pub init : * mut sys :: godot_method_bind , pub instance_attach_object_instance_id : * mut sys :: godot_method_bind , pub instance_attach_skeleton : * mut sys :: godot_method_bind , pub instance_create : * mut sys :: godot_method_bind , pub instance_create2 : * mut sys :: godot_method_bind , pub instance_geometry_set_as_instance_lod : * mut sys :: godot_method_bind , pub instance_geometry_set_cast_shadows_setting : * mut sys :: godot_method_bind , pub instance_geometry_set_draw_range : * mut sys :: godot_method_bind , pub instance_geometry_set_flag : * mut sys :: godot_method_bind , pub instance_geometry_set_material_overlay : * mut sys :: godot_method_bind , pub instance_geometry_set_material_override : * mut sys :: godot_method_bind , pub instance_set_base : * mut sys :: godot_method_bind , pub instance_set_blend_shape_weight : * mut sys :: godot_method_bind , pub instance_set_custom_aabb : * mut sys :: godot_method_bind , pub instance_set_exterior : * mut sys :: godot_method_bind , pub instance_set_extra_visibility_margin : * mut sys :: godot_method_bind , pub instance_set_layer_mask : * mut sys :: godot_method_bind , pub instance_set_scenario : * mut sys :: godot_method_bind , pub instance_set_surface_material : * mut sys :: godot_method_bind , pub instance_set_transform : * mut sys :: godot_method_bind , pub instance_set_use_lightmap : * mut sys :: godot_method_bind , pub instance_set_visible : * mut sys :: godot_method_bind , pub instances_cull_aabb : * mut sys :: godot_method_bind , pub instances_cull_convex : * mut sys :: godot_method_bind , pub instances_cull_ray : * mut sys :: godot_method_bind , pub is_render_loop_enabled : * mut sys :: godot_method_bind , pub light_directional_set_blend_splits : * mut sys :: godot_method_bind , pub light_directional_set_shadow_depth_range_mode : * mut sys :: godot_method_bind , pub light_directional_set_shadow_mode : * mut sys :: godot_method_bind , pub light_omni_set_shadow_detail : * mut sys :: godot_method_bind , pub light_omni_set_shadow_mode : * mut sys :: godot_method_bind , pub light_set_bake_mode : * mut sys :: godot_method_bind , pub light_set_color : * mut sys :: godot_method_bind , pub light_set_cull_mask : * mut sys :: godot_method_bind , pub light_set_negative : * mut sys :: godot_method_bind , pub light_set_param : * mut sys :: godot_method_bind , pub light_set_projector : * mut sys :: godot_method_bind , pub light_set_reverse_cull_face_mode : * mut sys :: godot_method_bind , pub light_set_shadow : * mut sys :: godot_method_bind , pub light_set_shadow_color : * mut sys :: godot_method_bind , pub light_set_use_gi : * mut sys :: godot_method_bind , pub lightmap_capture_create : * mut sys :: godot_method_bind , pub lightmap_capture_get_bounds : * mut sys :: godot_method_bind , pub lightmap_capture_get_energy : * mut sys :: godot_method_bind , pub lightmap_capture_get_octree : * mut sys :: godot_method_bind , pub lightmap_capture_get_octree_cell_subdiv : * mut sys :: godot_method_bind , pub lightmap_capture_get_octree_cell_transform : * mut sys :: godot_method_bind , pub lightmap_capture_is_interior : * mut sys :: godot_method_bind , pub lightmap_capture_set_bounds : * mut sys :: godot_method_bind , pub lightmap_capture_set_energy : * mut sys :: godot_method_bind , pub lightmap_capture_set_interior : * mut sys :: godot_method_bind , pub lightmap_capture_set_octree : * mut sys :: godot_method_bind , pub lightmap_capture_set_octree_cell_subdiv : * mut sys :: godot_method_bind , pub lightmap_capture_set_octree_cell_transform : * mut sys :: godot_method_bind , pub make_sphere_mesh : * mut sys :: godot_method_bind , pub material_create : * mut sys :: godot_method_bind , pub material_get_param : * mut sys :: godot_method_bind , pub material_get_param_default : * mut sys :: godot_method_bind , pub material_get_shader : * mut sys :: godot_method_bind , pub material_set_line_width : * mut sys :: godot_method_bind , pub material_set_next_pass : * mut sys :: godot_method_bind , pub material_set_param : * mut sys :: godot_method_bind , pub material_set_render_priority : * mut sys :: godot_method_bind , pub material_set_shader : * mut sys :: godot_method_bind , pub mesh_add_surface_from_arrays : * mut sys :: godot_method_bind , pub mesh_clear : * mut sys :: godot_method_bind , pub mesh_create : * mut sys :: godot_method_bind , pub mesh_get_blend_shape_count : * mut sys :: godot_method_bind , pub mesh_get_blend_shape_mode : * mut sys :: godot_method_bind , pub mesh_get_custom_aabb : * mut sys :: godot_method_bind , pub mesh_get_surface_count : * mut sys :: godot_method_bind , pub mesh_remove_surface : * mut sys :: godot_method_bind , pub mesh_set_blend_shape_count : * mut sys :: godot_method_bind , pub mesh_set_blend_shape_mode : * mut sys :: godot_method_bind , pub mesh_set_custom_aabb : * mut sys :: godot_method_bind , pub mesh_surface_get_aabb : * mut sys :: godot_method_bind , pub mesh_surface_get_array : * mut sys :: godot_method_bind , pub mesh_surface_get_array_index_len : * mut sys :: godot_method_bind , pub mesh_surface_get_array_len : * mut sys :: godot_method_bind , pub mesh_surface_get_arrays : * mut sys :: godot_method_bind , pub mesh_surface_get_blend_shape_arrays : * mut sys :: godot_method_bind , pub mesh_surface_get_format : * mut sys :: godot_method_bind , pub mesh_surface_get_format_offset : * mut sys :: godot_method_bind , pub mesh_surface_get_format_stride : * mut sys :: godot_method_bind , pub mesh_surface_get_index_array : * mut sys :: godot_method_bind , pub mesh_surface_get_material : * mut sys :: godot_method_bind , pub mesh_surface_get_primitive_type : * mut sys :: godot_method_bind , pub mesh_surface_get_skeleton_aabb : * mut sys :: godot_method_bind , pub mesh_surface_set_material : * mut sys :: godot_method_bind , pub mesh_surface_update_region : * mut sys :: godot_method_bind , pub multimesh_allocate : * mut sys :: godot_method_bind , pub multimesh_create : * mut sys :: godot_method_bind , pub multimesh_get_aabb : * mut sys :: godot_method_bind , pub multimesh_get_instance_count : * mut sys :: godot_method_bind , pub multimesh_get_mesh : * mut sys :: godot_method_bind , pub multimesh_get_visible_instances : * mut sys :: godot_method_bind , pub multimesh_instance_get_color : * mut sys :: godot_method_bind , pub multimesh_instance_get_custom_data : * mut sys :: godot_method_bind , pub multimesh_instance_get_transform : * mut sys :: godot_method_bind , pub multimesh_instance_get_transform_2d : * mut sys :: godot_method_bind , pub multimesh_instance_set_color : * mut sys :: godot_method_bind , pub multimesh_instance_set_custom_data : * mut sys :: godot_method_bind , pub multimesh_instance_set_transform : * mut sys :: godot_method_bind , pub multimesh_instance_set_transform_2d : * mut sys :: godot_method_bind , pub multimesh_set_as_bulk_array : * mut sys :: godot_method_bind , pub multimesh_set_mesh : * mut sys :: godot_method_bind , pub multimesh_set_visible_instances : * mut sys :: godot_method_bind , pub omni_light_create : * mut sys :: godot_method_bind , pub particles_create : * mut sys :: godot_method_bind , pub particles_get_current_aabb : * mut sys :: godot_method_bind , pub particles_get_emitting : * mut sys :: godot_method_bind , pub particles_is_inactive : * mut sys :: godot_method_bind , pub particles_request_process : * mut sys :: godot_method_bind , pub particles_restart : * mut sys :: godot_method_bind , pub particles_set_amount : * mut sys :: godot_method_bind , pub particles_set_custom_aabb : * mut sys :: godot_method_bind , pub particles_set_draw_order : * mut sys :: godot_method_bind , pub particles_set_draw_pass_mesh : * mut sys :: godot_method_bind , pub particles_set_draw_passes : * mut sys :: godot_method_bind , pub particles_set_emission_transform : * mut sys :: godot_method_bind , pub particles_set_emitting : * mut sys :: godot_method_bind , pub particles_set_explosiveness_ratio : * mut sys :: godot_method_bind , pub particles_set_fixed_fps : * mut sys :: godot_method_bind , pub particles_set_fractional_delta : * mut sys :: godot_method_bind , pub particles_set_lifetime : * mut sys :: godot_method_bind , pub particles_set_one_shot : * mut sys :: godot_method_bind , pub particles_set_pre_process_time : * mut sys :: godot_method_bind , pub particles_set_process_material : * mut sys :: godot_method_bind , pub particles_set_randomness_ratio : * mut sys :: godot_method_bind , pub particles_set_speed_scale : * mut sys :: godot_method_bind , pub particles_set_use_local_coordinates : * mut sys :: godot_method_bind , pub reflection_probe_create : * mut sys :: godot_method_bind , pub reflection_probe_set_as_interior : * mut sys :: godot_method_bind , pub reflection_probe_set_cull_mask : * mut sys :: godot_method_bind , pub reflection_probe_set_enable_box_projection : * mut sys :: godot_method_bind , pub reflection_probe_set_enable_shadows : * mut sys :: godot_method_bind , pub reflection_probe_set_extents : * mut sys :: godot_method_bind , pub reflection_probe_set_intensity : * mut sys :: godot_method_bind , pub reflection_probe_set_interior_ambient : * mut sys :: godot_method_bind , pub reflection_probe_set_interior_ambient_energy : * mut sys :: godot_method_bind , pub reflection_probe_set_interior_ambient_probe_contribution : * mut sys :: godot_method_bind , pub reflection_probe_set_max_distance : * mut sys :: godot_method_bind , pub reflection_probe_set_origin_offset : * mut sys :: godot_method_bind , pub reflection_probe_set_update_mode : * mut sys :: godot_method_bind , pub request_frame_drawn_callback : * mut sys :: godot_method_bind , pub scenario_create : * mut sys :: godot_method_bind , pub scenario_set_debug : * mut sys :: godot_method_bind , pub scenario_set_environment : * mut sys :: godot_method_bind , pub scenario_set_fallback_environment : * mut sys :: godot_method_bind , pub scenario_set_reflection_atlas_size : * mut sys :: godot_method_bind , pub set_boot_image : * mut sys :: godot_method_bind , pub set_debug_generate_wireframes : * mut sys :: godot_method_bind , pub set_default_clear_color : * mut sys :: godot_method_bind , pub set_render_loop_enabled : * mut sys :: godot_method_bind , pub set_shader_async_hidden_forbidden : * mut sys :: godot_method_bind , pub set_shader_time_scale : * mut sys :: godot_method_bind , pub set_use_occlusion_culling : * mut sys :: godot_method_bind , pub shader_create : * mut sys :: godot_method_bind , pub shader_get_code : * mut sys :: godot_method_bind , pub shader_get_default_texture_param : * mut sys :: godot_method_bind , pub shader_get_param_list : * mut sys :: godot_method_bind , pub shader_set_code : * mut sys :: godot_method_bind , pub shader_set_default_texture_param : * mut sys :: godot_method_bind , pub skeleton_allocate : * mut sys :: godot_method_bind , pub skeleton_bone_get_transform : * mut sys :: godot_method_bind , pub skeleton_bone_get_transform_2d : * mut sys :: godot_method_bind , pub skeleton_bone_set_transform : * mut sys :: godot_method_bind , pub skeleton_bone_set_transform_2d : * mut sys :: godot_method_bind , pub skeleton_create : * mut sys :: godot_method_bind , pub skeleton_get_bone_count : * mut sys :: godot_method_bind , pub sky_create : * mut sys :: godot_method_bind , pub sky_set_texture : * mut sys :: godot_method_bind , pub spot_light_create : * mut sys :: godot_method_bind , pub sync : * mut sys :: godot_method_bind , pub texture_allocate : * mut sys :: godot_method_bind , pub texture_bind : * mut sys :: godot_method_bind , pub texture_create : * mut sys :: godot_method_bind , pub texture_create_from_image : * mut sys :: godot_method_bind , pub texture_debug_usage : * mut sys :: godot_method_bind , pub texture_get_data : * mut sys :: godot_method_bind , pub texture_get_depth : * mut sys :: godot_method_bind , pub texture_get_flags : * mut sys :: godot_method_bind , pub texture_get_format : * mut sys :: godot_method_bind , pub texture_get_height : * mut sys :: godot_method_bind , pub texture_get_path : * mut sys :: godot_method_bind , pub texture_get_texid : * mut sys :: godot_method_bind , pub texture_get_type : * mut sys :: godot_method_bind , pub texture_get_width : * mut sys :: godot_method_bind , pub texture_set_data : * mut sys :: godot_method_bind , pub texture_set_data_partial : * mut sys :: godot_method_bind , pub texture_set_flags : * mut sys :: godot_method_bind , pub texture_set_path : * mut sys :: godot_method_bind , pub texture_set_proxy : * mut sys :: godot_method_bind , pub texture_set_shrink_all_x2_on_set_data : * mut sys :: godot_method_bind , pub texture_set_size_override : * mut sys :: godot_method_bind , pub textures_keep_original : * mut sys :: godot_method_bind , pub viewport_attach_camera : * mut sys :: godot_method_bind , pub viewport_attach_canvas : * mut sys :: godot_method_bind , pub viewport_attach_to_screen : * mut sys :: godot_method_bind , pub viewport_create : * mut sys :: godot_method_bind , pub viewport_detach : * mut sys :: godot_method_bind , pub viewport_get_render_info : * mut sys :: godot_method_bind , pub viewport_get_texture : * mut sys :: godot_method_bind , pub viewport_remove_canvas : * mut sys :: godot_method_bind , pub viewport_set_active : * mut sys :: godot_method_bind , pub viewport_set_canvas_stacking : * mut sys :: godot_method_bind , pub viewport_set_canvas_transform : * mut sys :: godot_method_bind , pub viewport_set_clear_mode : * mut sys :: godot_method_bind , pub viewport_set_debug_draw : * mut sys :: godot_method_bind , pub viewport_set_disable_3d : * mut sys :: godot_method_bind , pub viewport_set_disable_environment : * mut sys :: godot_method_bind , pub viewport_set_global_canvas_transform : * mut sys :: godot_method_bind , pub viewport_set_hdr : * mut sys :: godot_method_bind , pub viewport_set_hide_canvas : * mut sys :: godot_method_bind , pub viewport_set_hide_scenario : * mut sys :: godot_method_bind , pub viewport_set_msaa : * mut sys :: godot_method_bind , pub viewport_set_parent_viewport : * mut sys :: godot_method_bind , pub viewport_set_render_direct_to_screen : * mut sys :: godot_method_bind , pub viewport_set_scenario : * mut sys :: godot_method_bind , pub viewport_set_shadow_atlas_quadrant_subdivision : * mut sys :: godot_method_bind , pub viewport_set_shadow_atlas_size : * mut sys :: godot_method_bind , pub viewport_set_sharpen_intensity : * mut sys :: godot_method_bind , pub viewport_set_size : * mut sys :: godot_method_bind , pub viewport_set_transparent_background : * mut sys :: godot_method_bind , pub viewport_set_update_mode : * mut sys :: godot_method_bind , pub viewport_set_usage : * mut sys :: godot_method_bind , pub viewport_set_use_32_bpc_depth : * mut sys :: godot_method_bind , pub viewport_set_use_arvr : * mut sys :: godot_method_bind , pub viewport_set_use_debanding : * mut sys :: godot_method_bind , pub viewport_set_use_fxaa : * mut sys :: godot_method_bind , pub viewport_set_vflip : * mut sys :: godot_method_bind } impl VisualServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualServerMethodTable = VisualServerMethodTable { class_constructor : None , black_bars_set_images : 0 as * mut sys :: godot_method_bind , black_bars_set_margins : 0 as * mut sys :: godot_method_bind , camera_create : 0 as * mut sys :: godot_method_bind , camera_set_cull_mask : 0 as * mut sys :: godot_method_bind , camera_set_environment : 0 as * mut sys :: godot_method_bind , camera_set_frustum : 0 as * mut sys :: godot_method_bind , camera_set_orthogonal : 0 as * mut sys :: godot_method_bind , camera_set_perspective : 0 as * mut sys :: godot_method_bind , camera_set_transform : 0 as * mut sys :: godot_method_bind , camera_set_use_vertical_aspect : 0 as * mut sys :: godot_method_bind , canvas_create : 0 as * mut sys :: godot_method_bind , canvas_item_add_circle : 0 as * mut sys :: godot_method_bind , canvas_item_add_clip_ignore : 0 as * mut sys :: godot_method_bind , canvas_item_add_line : 0 as * mut sys :: godot_method_bind , canvas_item_add_mesh : 0 as * mut sys :: godot_method_bind , canvas_item_add_multimesh : 0 as * mut sys :: godot_method_bind , canvas_item_add_nine_patch : 0 as * mut sys :: godot_method_bind , canvas_item_add_particles : 0 as * mut sys :: godot_method_bind , canvas_item_add_polygon : 0 as * mut sys :: godot_method_bind , canvas_item_add_polyline : 0 as * mut sys :: godot_method_bind , canvas_item_add_primitive : 0 as * mut sys :: godot_method_bind , canvas_item_add_rect : 0 as * mut sys :: godot_method_bind , canvas_item_add_set_transform : 0 as * mut sys :: godot_method_bind , canvas_item_add_texture_rect : 0 as * mut sys :: godot_method_bind , canvas_item_add_texture_rect_region : 0 as * mut sys :: godot_method_bind , canvas_item_add_triangle_array : 0 as * mut sys :: godot_method_bind , canvas_item_clear : 0 as * mut sys :: godot_method_bind , canvas_item_create : 0 as * mut sys :: godot_method_bind , canvas_item_set_clip : 0 as * mut sys :: godot_method_bind , canvas_item_set_copy_to_backbuffer : 0 as * mut sys :: godot_method_bind , canvas_item_set_custom_rect : 0 as * mut sys :: godot_method_bind , canvas_item_set_distance_field_mode : 0 as * mut sys :: godot_method_bind , canvas_item_set_draw_behind_parent : 0 as * mut sys :: godot_method_bind , canvas_item_set_draw_index : 0 as * mut sys :: godot_method_bind , canvas_item_set_light_mask : 0 as * mut sys :: godot_method_bind , canvas_item_set_material : 0 as * mut sys :: godot_method_bind , canvas_item_set_modulate : 0 as * mut sys :: godot_method_bind , canvas_item_set_parent : 0 as * mut sys :: godot_method_bind , canvas_item_set_self_modulate : 0 as * mut sys :: godot_method_bind , canvas_item_set_sort_children_by_y : 0 as * mut sys :: godot_method_bind , canvas_item_set_transform : 0 as * mut sys :: godot_method_bind , canvas_item_set_use_parent_material : 0 as * mut sys :: godot_method_bind , canvas_item_set_visible : 0 as * mut sys :: godot_method_bind , canvas_item_set_z_as_relative_to_parent : 0 as * mut sys :: godot_method_bind , canvas_item_set_z_index : 0 as * mut sys :: godot_method_bind , canvas_light_attach_to_canvas : 0 as * mut sys :: godot_method_bind , canvas_light_create : 0 as * mut sys :: godot_method_bind , canvas_light_occluder_attach_to_canvas : 0 as * mut sys :: godot_method_bind , canvas_light_occluder_create : 0 as * mut sys :: godot_method_bind , canvas_light_occluder_set_enabled : 0 as * mut sys :: godot_method_bind , canvas_light_occluder_set_light_mask : 0 as * mut sys :: godot_method_bind , canvas_light_occluder_set_polygon : 0 as * mut sys :: godot_method_bind , canvas_light_occluder_set_transform : 0 as * mut sys :: godot_method_bind , canvas_light_set_color : 0 as * mut sys :: godot_method_bind , canvas_light_set_enabled : 0 as * mut sys :: godot_method_bind , canvas_light_set_energy : 0 as * mut sys :: godot_method_bind , canvas_light_set_height : 0 as * mut sys :: godot_method_bind , canvas_light_set_item_cull_mask : 0 as * mut sys :: godot_method_bind , canvas_light_set_item_shadow_cull_mask : 0 as * mut sys :: godot_method_bind , canvas_light_set_layer_range : 0 as * mut sys :: godot_method_bind , canvas_light_set_mode : 0 as * mut sys :: godot_method_bind , canvas_light_set_scale : 0 as * mut sys :: godot_method_bind , canvas_light_set_shadow_buffer_size : 0 as * mut sys :: godot_method_bind , canvas_light_set_shadow_color : 0 as * mut sys :: godot_method_bind , canvas_light_set_shadow_enabled : 0 as * mut sys :: godot_method_bind , canvas_light_set_shadow_filter : 0 as * mut sys :: godot_method_bind , canvas_light_set_shadow_gradient_length : 0 as * mut sys :: godot_method_bind , canvas_light_set_shadow_smooth : 0 as * mut sys :: godot_method_bind , canvas_light_set_texture : 0 as * mut sys :: godot_method_bind , canvas_light_set_texture_offset : 0 as * mut sys :: godot_method_bind , canvas_light_set_transform : 0 as * mut sys :: godot_method_bind , canvas_light_set_z_range : 0 as * mut sys :: godot_method_bind , canvas_occluder_polygon_create : 0 as * mut sys :: godot_method_bind , canvas_occluder_polygon_set_cull_mode : 0 as * mut sys :: godot_method_bind , canvas_occluder_polygon_set_shape : 0 as * mut sys :: godot_method_bind , canvas_occluder_polygon_set_shape_as_lines : 0 as * mut sys :: godot_method_bind , canvas_set_item_mirroring : 0 as * mut sys :: godot_method_bind , canvas_set_modulate : 0 as * mut sys :: godot_method_bind , directional_light_create : 0 as * mut sys :: godot_method_bind , draw : 0 as * mut sys :: godot_method_bind , environment_create : 0 as * mut sys :: godot_method_bind , environment_set_adjustment : 0 as * mut sys :: godot_method_bind , environment_set_ambient_light : 0 as * mut sys :: godot_method_bind , environment_set_background : 0 as * mut sys :: godot_method_bind , environment_set_bg_color : 0 as * mut sys :: godot_method_bind , environment_set_bg_energy : 0 as * mut sys :: godot_method_bind , environment_set_canvas_max_layer : 0 as * mut sys :: godot_method_bind , environment_set_dof_blur_far : 0 as * mut sys :: godot_method_bind , environment_set_dof_blur_near : 0 as * mut sys :: godot_method_bind , environment_set_fog : 0 as * mut sys :: godot_method_bind , environment_set_fog_depth : 0 as * mut sys :: godot_method_bind , environment_set_fog_height : 0 as * mut sys :: godot_method_bind , environment_set_glow : 0 as * mut sys :: godot_method_bind , environment_set_sky : 0 as * mut sys :: godot_method_bind , environment_set_sky_custom_fov : 0 as * mut sys :: godot_method_bind , environment_set_sky_orientation : 0 as * mut sys :: godot_method_bind , environment_set_ssao : 0 as * mut sys :: godot_method_bind , environment_set_ssr : 0 as * mut sys :: godot_method_bind , environment_set_tonemap : 0 as * mut sys :: godot_method_bind , finish : 0 as * mut sys :: godot_method_bind , force_draw : 0 as * mut sys :: godot_method_bind , force_sync : 0 as * mut sys :: godot_method_bind , free_rid : 0 as * mut sys :: godot_method_bind , get_render_info : 0 as * mut sys :: godot_method_bind , get_test_cube : 0 as * mut sys :: godot_method_bind , get_test_texture : 0 as * mut sys :: godot_method_bind , get_video_adapter_name : 0 as * mut sys :: godot_method_bind , get_video_adapter_vendor : 0 as * mut sys :: godot_method_bind , get_white_texture : 0 as * mut sys :: godot_method_bind , gi_probe_create : 0 as * mut sys :: godot_method_bind , gi_probe_get_bias : 0 as * mut sys :: godot_method_bind , gi_probe_get_bounds : 0 as * mut sys :: godot_method_bind , gi_probe_get_cell_size : 0 as * mut sys :: godot_method_bind , gi_probe_get_dynamic_data : 0 as * mut sys :: godot_method_bind , gi_probe_get_dynamic_range : 0 as * mut sys :: godot_method_bind , gi_probe_get_energy : 0 as * mut sys :: godot_method_bind , gi_probe_get_normal_bias : 0 as * mut sys :: godot_method_bind , gi_probe_get_propagation : 0 as * mut sys :: godot_method_bind , gi_probe_get_to_cell_xform : 0 as * mut sys :: godot_method_bind , gi_probe_is_compressed : 0 as * mut sys :: godot_method_bind , gi_probe_is_interior : 0 as * mut sys :: godot_method_bind , gi_probe_set_bias : 0 as * mut sys :: godot_method_bind , gi_probe_set_bounds : 0 as * mut sys :: godot_method_bind , gi_probe_set_cell_size : 0 as * mut sys :: godot_method_bind , gi_probe_set_compress : 0 as * mut sys :: godot_method_bind , gi_probe_set_dynamic_data : 0 as * mut sys :: godot_method_bind , gi_probe_set_dynamic_range : 0 as * mut sys :: godot_method_bind , gi_probe_set_energy : 0 as * mut sys :: godot_method_bind , gi_probe_set_interior : 0 as * mut sys :: godot_method_bind , gi_probe_set_normal_bias : 0 as * mut sys :: godot_method_bind , gi_probe_set_propagation : 0 as * mut sys :: godot_method_bind , gi_probe_set_to_cell_xform : 0 as * mut sys :: godot_method_bind , has_changed : 0 as * mut sys :: godot_method_bind , has_feature : 0 as * mut sys :: godot_method_bind , has_os_feature : 0 as * mut sys :: godot_method_bind , immediate_begin : 0 as * mut sys :: godot_method_bind , immediate_clear : 0 as * mut sys :: godot_method_bind , immediate_color : 0 as * mut sys :: godot_method_bind , immediate_create : 0 as * mut sys :: godot_method_bind , immediate_end : 0 as * mut sys :: godot_method_bind , immediate_get_material : 0 as * mut sys :: godot_method_bind , immediate_normal : 0 as * mut sys :: godot_method_bind , immediate_set_material : 0 as * mut sys :: godot_method_bind , immediate_tangent : 0 as * mut sys :: godot_method_bind , immediate_uv : 0 as * mut sys :: godot_method_bind , immediate_uv2 : 0 as * mut sys :: godot_method_bind , immediate_vertex : 0 as * mut sys :: godot_method_bind , immediate_vertex_2d : 0 as * mut sys :: godot_method_bind , init : 0 as * mut sys :: godot_method_bind , instance_attach_object_instance_id : 0 as * mut sys :: godot_method_bind , instance_attach_skeleton : 0 as * mut sys :: godot_method_bind , instance_create : 0 as * mut sys :: godot_method_bind , instance_create2 : 0 as * mut sys :: godot_method_bind , instance_geometry_set_as_instance_lod : 0 as * mut sys :: godot_method_bind , instance_geometry_set_cast_shadows_setting : 0 as * mut sys :: godot_method_bind , instance_geometry_set_draw_range : 0 as * mut sys :: godot_method_bind , instance_geometry_set_flag : 0 as * mut sys :: godot_method_bind , instance_geometry_set_material_overlay : 0 as * mut sys :: godot_method_bind , instance_geometry_set_material_override : 0 as * mut sys :: godot_method_bind , instance_set_base : 0 as * mut sys :: godot_method_bind , instance_set_blend_shape_weight : 0 as * mut sys :: godot_method_bind , instance_set_custom_aabb : 0 as * mut sys :: godot_method_bind , instance_set_exterior : 0 as * mut sys :: godot_method_bind , instance_set_extra_visibility_margin : 0 as * mut sys :: godot_method_bind , instance_set_layer_mask : 0 as * mut sys :: godot_method_bind , instance_set_scenario : 0 as * mut sys :: godot_method_bind , instance_set_surface_material : 0 as * mut sys :: godot_method_bind , instance_set_transform : 0 as * mut sys :: godot_method_bind , instance_set_use_lightmap : 0 as * mut sys :: godot_method_bind , instance_set_visible : 0 as * mut sys :: godot_method_bind , instances_cull_aabb : 0 as * mut sys :: godot_method_bind , instances_cull_convex : 0 as * mut sys :: godot_method_bind , instances_cull_ray : 0 as * mut sys :: godot_method_bind , is_render_loop_enabled : 0 as * mut sys :: godot_method_bind , light_directional_set_blend_splits : 0 as * mut sys :: godot_method_bind , light_directional_set_shadow_depth_range_mode : 0 as * mut sys :: godot_method_bind , light_directional_set_shadow_mode : 0 as * mut sys :: godot_method_bind , light_omni_set_shadow_detail : 0 as * mut sys :: godot_method_bind , light_omni_set_shadow_mode : 0 as * mut sys :: godot_method_bind , light_set_bake_mode : 0 as * mut sys :: godot_method_bind , light_set_color : 0 as * mut sys :: godot_method_bind , light_set_cull_mask : 0 as * mut sys :: godot_method_bind , light_set_negative : 0 as * mut sys :: godot_method_bind , light_set_param : 0 as * mut sys :: godot_method_bind , light_set_projector : 0 as * mut sys :: godot_method_bind , light_set_reverse_cull_face_mode : 0 as * mut sys :: godot_method_bind , light_set_shadow : 0 as * mut sys :: godot_method_bind , light_set_shadow_color : 0 as * mut sys :: godot_method_bind , light_set_use_gi : 0 as * mut sys :: godot_method_bind , lightmap_capture_create : 0 as * mut sys :: godot_method_bind , lightmap_capture_get_bounds : 0 as * mut sys :: godot_method_bind , lightmap_capture_get_energy : 0 as * mut sys :: godot_method_bind , lightmap_capture_get_octree : 0 as * mut sys :: godot_method_bind , lightmap_capture_get_octree_cell_subdiv : 0 as * mut sys :: godot_method_bind , lightmap_capture_get_octree_cell_transform : 0 as * mut sys :: godot_method_bind , lightmap_capture_is_interior : 0 as * mut sys :: godot_method_bind , lightmap_capture_set_bounds : 0 as * mut sys :: godot_method_bind , lightmap_capture_set_energy : 0 as * mut sys :: godot_method_bind , lightmap_capture_set_interior : 0 as * mut sys :: godot_method_bind , lightmap_capture_set_octree : 0 as * mut sys :: godot_method_bind , lightmap_capture_set_octree_cell_subdiv : 0 as * mut sys :: godot_method_bind , lightmap_capture_set_octree_cell_transform : 0 as * mut sys :: godot_method_bind , make_sphere_mesh : 0 as * mut sys :: godot_method_bind , material_create : 0 as * mut sys :: godot_method_bind , material_get_param : 0 as * mut sys :: godot_method_bind , material_get_param_default : 0 as * mut sys :: godot_method_bind , material_get_shader : 0 as * mut sys :: godot_method_bind , material_set_line_width : 0 as * mut sys :: godot_method_bind , material_set_next_pass : 0 as * mut sys :: godot_method_bind , material_set_param : 0 as * mut sys :: godot_method_bind , material_set_render_priority : 0 as * mut sys :: godot_method_bind , material_set_shader : 0 as * mut sys :: godot_method_bind , mesh_add_surface_from_arrays : 0 as * mut sys :: godot_method_bind , mesh_clear : 0 as * mut sys :: godot_method_bind , mesh_create : 0 as * mut sys :: godot_method_bind , mesh_get_blend_shape_count : 0 as * mut sys :: godot_method_bind , mesh_get_blend_shape_mode : 0 as * mut sys :: godot_method_bind , mesh_get_custom_aabb : 0 as * mut sys :: godot_method_bind , mesh_get_surface_count : 0 as * mut sys :: godot_method_bind , mesh_remove_surface : 0 as * mut sys :: godot_method_bind , mesh_set_blend_shape_count : 0 as * mut sys :: godot_method_bind , mesh_set_blend_shape_mode : 0 as * mut sys :: godot_method_bind , mesh_set_custom_aabb : 0 as * mut sys :: godot_method_bind , mesh_surface_get_aabb : 0 as * mut sys :: godot_method_bind , mesh_surface_get_array : 0 as * mut sys :: godot_method_bind , mesh_surface_get_array_index_len : 0 as * mut sys :: godot_method_bind , mesh_surface_get_array_len : 0 as * mut sys :: godot_method_bind , mesh_surface_get_arrays : 0 as * mut sys :: godot_method_bind , mesh_surface_get_blend_shape_arrays : 0 as * mut sys :: godot_method_bind , mesh_surface_get_format : 0 as * mut sys :: godot_method_bind , mesh_surface_get_format_offset : 0 as * mut sys :: godot_method_bind , mesh_surface_get_format_stride : 0 as * mut sys :: godot_method_bind , mesh_surface_get_index_array : 0 as * mut sys :: godot_method_bind , mesh_surface_get_material : 0 as * mut sys :: godot_method_bind , mesh_surface_get_primitive_type : 0 as * mut sys :: godot_method_bind , mesh_surface_get_skeleton_aabb : 0 as * mut sys :: godot_method_bind , mesh_surface_set_material : 0 as * mut sys :: godot_method_bind , mesh_surface_update_region : 0 as * mut sys :: godot_method_bind , multimesh_allocate : 0 as * mut sys :: godot_method_bind , multimesh_create : 0 as * mut sys :: godot_method_bind , multimesh_get_aabb : 0 as * mut sys :: godot_method_bind , multimesh_get_instance_count : 0 as * mut sys :: godot_method_bind , multimesh_get_mesh : 0 as * mut sys :: godot_method_bind , multimesh_get_visible_instances : 0 as * mut sys :: godot_method_bind , multimesh_instance_get_color : 0 as * mut sys :: godot_method_bind , multimesh_instance_get_custom_data : 0 as * mut sys :: godot_method_bind , multimesh_instance_get_transform : 0 as * mut sys :: godot_method_bind , multimesh_instance_get_transform_2d : 0 as * mut sys :: godot_method_bind , multimesh_instance_set_color : 0 as * mut sys :: godot_method_bind , multimesh_instance_set_custom_data : 0 as * mut sys :: godot_method_bind , multimesh_instance_set_transform : 0 as * mut sys :: godot_method_bind , multimesh_instance_set_transform_2d : 0 as * mut sys :: godot_method_bind , multimesh_set_as_bulk_array : 0 as * mut sys :: godot_method_bind , multimesh_set_mesh : 0 as * mut sys :: godot_method_bind , multimesh_set_visible_instances : 0 as * mut sys :: godot_method_bind , omni_light_create : 0 as * mut sys :: godot_method_bind , particles_create : 0 as * mut sys :: godot_method_bind , particles_get_current_aabb : 0 as * mut sys :: godot_method_bind , particles_get_emitting : 0 as * mut sys :: godot_method_bind , particles_is_inactive : 0 as * mut sys :: godot_method_bind , particles_request_process : 0 as * mut sys :: godot_method_bind , particles_restart : 0 as * mut sys :: godot_method_bind , particles_set_amount : 0 as * mut sys :: godot_method_bind , particles_set_custom_aabb : 0 as * mut sys :: godot_method_bind , particles_set_draw_order : 0 as * mut sys :: godot_method_bind , particles_set_draw_pass_mesh : 0 as * mut sys :: godot_method_bind , particles_set_draw_passes : 0 as * mut sys :: godot_method_bind , particles_set_emission_transform : 0 as * mut sys :: godot_method_bind , particles_set_emitting : 0 as * mut sys :: godot_method_bind , particles_set_explosiveness_ratio : 0 as * mut sys :: godot_method_bind , particles_set_fixed_fps : 0 as * mut sys :: godot_method_bind , particles_set_fractional_delta : 0 as * mut sys :: godot_method_bind , particles_set_lifetime : 0 as * mut sys :: godot_method_bind , particles_set_one_shot : 0 as * mut sys :: godot_method_bind , particles_set_pre_process_time : 0 as * mut sys :: godot_method_bind , particles_set_process_material : 0 as * mut sys :: godot_method_bind , particles_set_randomness_ratio : 0 as * mut sys :: godot_method_bind , particles_set_speed_scale : 0 as * mut sys :: godot_method_bind , particles_set_use_local_coordinates : 0 as * mut sys :: godot_method_bind , reflection_probe_create : 0 as * mut sys :: godot_method_bind , reflection_probe_set_as_interior : 0 as * mut sys :: godot_method_bind , reflection_probe_set_cull_mask : 0 as * mut sys :: godot_method_bind , reflection_probe_set_enable_box_projection : 0 as * mut sys :: godot_method_bind , reflection_probe_set_enable_shadows : 0 as * mut sys :: godot_method_bind , reflection_probe_set_extents : 0 as * mut sys :: godot_method_bind , reflection_probe_set_intensity : 0 as * mut sys :: godot_method_bind , reflection_probe_set_interior_ambient : 0 as * mut sys :: godot_method_bind , reflection_probe_set_interior_ambient_energy : 0 as * mut sys :: godot_method_bind , reflection_probe_set_interior_ambient_probe_contribution : 0 as * mut sys :: godot_method_bind , reflection_probe_set_max_distance : 0 as * mut sys :: godot_method_bind , reflection_probe_set_origin_offset : 0 as * mut sys :: godot_method_bind , reflection_probe_set_update_mode : 0 as * mut sys :: godot_method_bind , request_frame_drawn_callback : 0 as * mut sys :: godot_method_bind , scenario_create : 0 as * mut sys :: godot_method_bind , scenario_set_debug : 0 as * mut sys :: godot_method_bind , scenario_set_environment : 0 as * mut sys :: godot_method_bind , scenario_set_fallback_environment : 0 as * mut sys :: godot_method_bind , scenario_set_reflection_atlas_size : 0 as * mut sys :: godot_method_bind , set_boot_image : 0 as * mut sys :: godot_method_bind , set_debug_generate_wireframes : 0 as * mut sys :: godot_method_bind , set_default_clear_color : 0 as * mut sys :: godot_method_bind , set_render_loop_enabled : 0 as * mut sys :: godot_method_bind , set_shader_async_hidden_forbidden : 0 as * mut sys :: godot_method_bind , set_shader_time_scale : 0 as * mut sys :: godot_method_bind , set_use_occlusion_culling : 0 as * mut sys :: godot_method_bind , shader_create : 0 as * mut sys :: godot_method_bind , shader_get_code : 0 as * mut sys :: godot_method_bind , shader_get_default_texture_param : 0 as * mut sys :: godot_method_bind , shader_get_param_list : 0 as * mut sys :: godot_method_bind , shader_set_code : 0 as * mut sys :: godot_method_bind , shader_set_default_texture_param : 0 as * mut sys :: godot_method_bind , skeleton_allocate : 0 as * mut sys :: godot_method_bind , skeleton_bone_get_transform : 0 as * mut sys :: godot_method_bind , skeleton_bone_get_transform_2d : 0 as * mut sys :: godot_method_bind , skeleton_bone_set_transform : 0 as * mut sys :: godot_method_bind , skeleton_bone_set_transform_2d : 0 as * mut sys :: godot_method_bind , skeleton_create : 0 as * mut sys :: godot_method_bind , skeleton_get_bone_count : 0 as * mut sys :: godot_method_bind , sky_create : 0 as * mut sys :: godot_method_bind , sky_set_texture : 0 as * mut sys :: godot_method_bind , spot_light_create : 0 as * mut sys :: godot_method_bind , sync : 0 as * mut sys :: godot_method_bind , texture_allocate : 0 as * mut sys :: godot_method_bind , texture_bind : 0 as * mut sys :: godot_method_bind , texture_create : 0 as * mut sys :: godot_method_bind , texture_create_from_image : 0 as * mut sys :: godot_method_bind , texture_debug_usage : 0 as * mut sys :: godot_method_bind , texture_get_data : 0 as * mut sys :: godot_method_bind , texture_get_depth : 0 as * mut sys :: godot_method_bind , texture_get_flags : 0 as * mut sys :: godot_method_bind , texture_get_format : 0 as * mut sys :: godot_method_bind , texture_get_height : 0 as * mut sys :: godot_method_bind , texture_get_path : 0 as * mut sys :: godot_method_bind , texture_get_texid : 0 as * mut sys :: godot_method_bind , texture_get_type : 0 as * mut sys :: godot_method_bind , texture_get_width : 0 as * mut sys :: godot_method_bind , texture_set_data : 0 as * mut sys :: godot_method_bind , texture_set_data_partial : 0 as * mut sys :: godot_method_bind , texture_set_flags : 0 as * mut sys :: godot_method_bind , texture_set_path : 0 as * mut sys :: godot_method_bind , texture_set_proxy : 0 as * mut sys :: godot_method_bind , texture_set_shrink_all_x2_on_set_data : 0 as * mut sys :: godot_method_bind , texture_set_size_override : 0 as * mut sys :: godot_method_bind , textures_keep_original : 0 as * mut sys :: godot_method_bind , viewport_attach_camera : 0 as * mut sys :: godot_method_bind , viewport_attach_canvas : 0 as * mut sys :: godot_method_bind , viewport_attach_to_screen : 0 as * mut sys :: godot_method_bind , viewport_create : 0 as * mut sys :: godot_method_bind , viewport_detach : 0 as * mut sys :: godot_method_bind , viewport_get_render_info : 0 as * mut sys :: godot_method_bind , viewport_get_texture : 0 as * mut sys :: godot_method_bind , viewport_remove_canvas : 0 as * mut sys :: godot_method_bind , viewport_set_active : 0 as * mut sys :: godot_method_bind , viewport_set_canvas_stacking : 0 as * mut sys :: godot_method_bind , viewport_set_canvas_transform : 0 as * mut sys :: godot_method_bind , viewport_set_clear_mode : 0 as * mut sys :: godot_method_bind , viewport_set_debug_draw : 0 as * mut sys :: godot_method_bind , viewport_set_disable_3d : 0 as * mut sys :: godot_method_bind , viewport_set_disable_environment : 0 as * mut sys :: godot_method_bind , viewport_set_global_canvas_transform : 0 as * mut sys :: godot_method_bind , viewport_set_hdr : 0 as * mut sys :: godot_method_bind , viewport_set_hide_canvas : 0 as * mut sys :: godot_method_bind , viewport_set_hide_scenario : 0 as * mut sys :: godot_method_bind , viewport_set_msaa : 0 as * mut sys :: godot_method_bind , viewport_set_parent_viewport : 0 as * mut sys :: godot_method_bind , viewport_set_render_direct_to_screen : 0 as * mut sys :: godot_method_bind , viewport_set_scenario : 0 as * mut sys :: godot_method_bind , viewport_set_shadow_atlas_quadrant_subdivision : 0 as * mut sys :: godot_method_bind , viewport_set_shadow_atlas_size : 0 as * mut sys :: godot_method_bind , viewport_set_sharpen_intensity : 0 as * mut sys :: godot_method_bind , viewport_set_size : 0 as * mut sys :: godot_method_bind , viewport_set_transparent_background : 0 as * mut sys :: godot_method_bind , viewport_set_update_mode : 0 as * mut sys :: godot_method_bind , viewport_set_usage : 0 as * mut sys :: godot_method_bind , viewport_set_use_32_bpc_depth : 0 as * mut sys :: godot_method_bind , viewport_set_use_arvr : 0 as * mut sys :: godot_method_bind , viewport_set_use_debanding : 0 as * mut sys :: godot_method_bind , viewport_set_use_fxaa : 0 as * mut sys :: godot_method_bind , viewport_set_vflip : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . black_bars_set_images = (gd_api . godot_method_bind_get_method) (class_name , "black_bars_set_images\0" . as_ptr () as * const c_char) ; table . black_bars_set_margins = (gd_api . godot_method_bind_get_method) (class_name , "black_bars_set_margins\0" . as_ptr () as * const c_char) ; table . camera_create = (gd_api . godot_method_bind_get_method) (class_name , "camera_create\0" . as_ptr () as * const c_char) ; table . camera_set_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_cull_mask\0" . as_ptr () as * const c_char) ; table . camera_set_environment = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_environment\0" . as_ptr () as * const c_char) ; table . camera_set_frustum = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_frustum\0" . as_ptr () as * const c_char) ; table . camera_set_orthogonal = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_orthogonal\0" . as_ptr () as * const c_char) ; table . camera_set_perspective = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_perspective\0" . as_ptr () as * const c_char) ; table . camera_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_transform\0" . as_ptr () as * const c_char) ; table . camera_set_use_vertical_aspect = (gd_api . godot_method_bind_get_method) (class_name , "camera_set_use_vertical_aspect\0" . as_ptr () as * const c_char) ; table . canvas_create = (gd_api . godot_method_bind_get_method) (class_name , "canvas_create\0" . as_ptr () as * const c_char) ; table . canvas_item_add_circle = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_circle\0" . as_ptr () as * const c_char) ; table . canvas_item_add_clip_ignore = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_clip_ignore\0" . as_ptr () as * const c_char) ; table . canvas_item_add_line = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_line\0" . as_ptr () as * const c_char) ; table . canvas_item_add_mesh = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_mesh\0" . as_ptr () as * const c_char) ; table . canvas_item_add_multimesh = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_multimesh\0" . as_ptr () as * const c_char) ; table . canvas_item_add_nine_patch = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_nine_patch\0" . as_ptr () as * const c_char) ; table . canvas_item_add_particles = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_particles\0" . as_ptr () as * const c_char) ; table . canvas_item_add_polygon = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_polygon\0" . as_ptr () as * const c_char) ; table . canvas_item_add_polyline = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_polyline\0" . as_ptr () as * const c_char) ; table . canvas_item_add_primitive = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_primitive\0" . as_ptr () as * const c_char) ; table . canvas_item_add_rect = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_rect\0" . as_ptr () as * const c_char) ; table . canvas_item_add_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_set_transform\0" . as_ptr () as * const c_char) ; table . canvas_item_add_texture_rect = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_texture_rect\0" . as_ptr () as * const c_char) ; table . canvas_item_add_texture_rect_region = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_texture_rect_region\0" . as_ptr () as * const c_char) ; table . canvas_item_add_triangle_array = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_add_triangle_array\0" . as_ptr () as * const c_char) ; table . canvas_item_clear = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_clear\0" . as_ptr () as * const c_char) ; table . canvas_item_create = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_create\0" . as_ptr () as * const c_char) ; table . canvas_item_set_clip = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_clip\0" . as_ptr () as * const c_char) ; table . canvas_item_set_copy_to_backbuffer = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_copy_to_backbuffer\0" . as_ptr () as * const c_char) ; table . canvas_item_set_custom_rect = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_custom_rect\0" . as_ptr () as * const c_char) ; table . canvas_item_set_distance_field_mode = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_distance_field_mode\0" . as_ptr () as * const c_char) ; table . canvas_item_set_draw_behind_parent = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_draw_behind_parent\0" . as_ptr () as * const c_char) ; table . canvas_item_set_draw_index = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_draw_index\0" . as_ptr () as * const c_char) ; table . canvas_item_set_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_light_mask\0" . as_ptr () as * const c_char) ; table . canvas_item_set_material = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_material\0" . as_ptr () as * const c_char) ; table . canvas_item_set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_modulate\0" . as_ptr () as * const c_char) ; table . canvas_item_set_parent = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_parent\0" . as_ptr () as * const c_char) ; table . canvas_item_set_self_modulate = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_self_modulate\0" . as_ptr () as * const c_char) ; table . canvas_item_set_sort_children_by_y = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_sort_children_by_y\0" . as_ptr () as * const c_char) ; table . canvas_item_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_transform\0" . as_ptr () as * const c_char) ; table . canvas_item_set_use_parent_material = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_use_parent_material\0" . as_ptr () as * const c_char) ; table . canvas_item_set_visible = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_visible\0" . as_ptr () as * const c_char) ; table . canvas_item_set_z_as_relative_to_parent = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_z_as_relative_to_parent\0" . as_ptr () as * const c_char) ; table . canvas_item_set_z_index = (gd_api . godot_method_bind_get_method) (class_name , "canvas_item_set_z_index\0" . as_ptr () as * const c_char) ; table . canvas_light_attach_to_canvas = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_attach_to_canvas\0" . as_ptr () as * const c_char) ; table . canvas_light_create = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_create\0" . as_ptr () as * const c_char) ; table . canvas_light_occluder_attach_to_canvas = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_occluder_attach_to_canvas\0" . as_ptr () as * const c_char) ; table . canvas_light_occluder_create = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_occluder_create\0" . as_ptr () as * const c_char) ; table . canvas_light_occluder_set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_occluder_set_enabled\0" . as_ptr () as * const c_char) ; table . canvas_light_occluder_set_light_mask = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_occluder_set_light_mask\0" . as_ptr () as * const c_char) ; table . canvas_light_occluder_set_polygon = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_occluder_set_polygon\0" . as_ptr () as * const c_char) ; table . canvas_light_occluder_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_occluder_set_transform\0" . as_ptr () as * const c_char) ; table . canvas_light_set_color = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_color\0" . as_ptr () as * const c_char) ; table . canvas_light_set_enabled = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_enabled\0" . as_ptr () as * const c_char) ; table . canvas_light_set_energy = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_energy\0" . as_ptr () as * const c_char) ; table . canvas_light_set_height = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_height\0" . as_ptr () as * const c_char) ; table . canvas_light_set_item_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_item_cull_mask\0" . as_ptr () as * const c_char) ; table . canvas_light_set_item_shadow_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_item_shadow_cull_mask\0" . as_ptr () as * const c_char) ; table . canvas_light_set_layer_range = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_layer_range\0" . as_ptr () as * const c_char) ; table . canvas_light_set_mode = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_mode\0" . as_ptr () as * const c_char) ; table . canvas_light_set_scale = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_scale\0" . as_ptr () as * const c_char) ; table . canvas_light_set_shadow_buffer_size = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_shadow_buffer_size\0" . as_ptr () as * const c_char) ; table . canvas_light_set_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_shadow_color\0" . as_ptr () as * const c_char) ; table . canvas_light_set_shadow_enabled = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_shadow_enabled\0" . as_ptr () as * const c_char) ; table . canvas_light_set_shadow_filter = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_shadow_filter\0" . as_ptr () as * const c_char) ; table . canvas_light_set_shadow_gradient_length = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_shadow_gradient_length\0" . as_ptr () as * const c_char) ; table . canvas_light_set_shadow_smooth = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_shadow_smooth\0" . as_ptr () as * const c_char) ; table . canvas_light_set_texture = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_texture\0" . as_ptr () as * const c_char) ; table . canvas_light_set_texture_offset = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_texture_offset\0" . as_ptr () as * const c_char) ; table . canvas_light_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_transform\0" . as_ptr () as * const c_char) ; table . canvas_light_set_z_range = (gd_api . godot_method_bind_get_method) (class_name , "canvas_light_set_z_range\0" . as_ptr () as * const c_char) ; table . canvas_occluder_polygon_create = (gd_api . godot_method_bind_get_method) (class_name , "canvas_occluder_polygon_create\0" . as_ptr () as * const c_char) ; table . canvas_occluder_polygon_set_cull_mode = (gd_api . godot_method_bind_get_method) (class_name , "canvas_occluder_polygon_set_cull_mode\0" . as_ptr () as * const c_char) ; table . canvas_occluder_polygon_set_shape = (gd_api . godot_method_bind_get_method) (class_name , "canvas_occluder_polygon_set_shape\0" . as_ptr () as * const c_char) ; table . canvas_occluder_polygon_set_shape_as_lines = (gd_api . godot_method_bind_get_method) (class_name , "canvas_occluder_polygon_set_shape_as_lines\0" . as_ptr () as * const c_char) ; table . canvas_set_item_mirroring = (gd_api . godot_method_bind_get_method) (class_name , "canvas_set_item_mirroring\0" . as_ptr () as * const c_char) ; table . canvas_set_modulate = (gd_api . godot_method_bind_get_method) (class_name , "canvas_set_modulate\0" . as_ptr () as * const c_char) ; table . directional_light_create = (gd_api . godot_method_bind_get_method) (class_name , "directional_light_create\0" . as_ptr () as * const c_char) ; table . draw = (gd_api . godot_method_bind_get_method) (class_name , "draw\0" . as_ptr () as * const c_char) ; table . environment_create = (gd_api . godot_method_bind_get_method) (class_name , "environment_create\0" . as_ptr () as * const c_char) ; table . environment_set_adjustment = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_adjustment\0" . as_ptr () as * const c_char) ; table . environment_set_ambient_light = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_ambient_light\0" . as_ptr () as * const c_char) ; table . environment_set_background = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_background\0" . as_ptr () as * const c_char) ; table . environment_set_bg_color = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_bg_color\0" . as_ptr () as * const c_char) ; table . environment_set_bg_energy = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_bg_energy\0" . as_ptr () as * const c_char) ; table . environment_set_canvas_max_layer = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_canvas_max_layer\0" . as_ptr () as * const c_char) ; table . environment_set_dof_blur_far = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_dof_blur_far\0" . as_ptr () as * const c_char) ; table . environment_set_dof_blur_near = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_dof_blur_near\0" . as_ptr () as * const c_char) ; table . environment_set_fog = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_fog\0" . as_ptr () as * const c_char) ; table . environment_set_fog_depth = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_fog_depth\0" . as_ptr () as * const c_char) ; table . environment_set_fog_height = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_fog_height\0" . as_ptr () as * const c_char) ; table . environment_set_glow = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_glow\0" . as_ptr () as * const c_char) ; table . environment_set_sky = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_sky\0" . as_ptr () as * const c_char) ; table . environment_set_sky_custom_fov = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_sky_custom_fov\0" . as_ptr () as * const c_char) ; table . environment_set_sky_orientation = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_sky_orientation\0" . as_ptr () as * const c_char) ; table . environment_set_ssao = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_ssao\0" . as_ptr () as * const c_char) ; table . environment_set_ssr = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_ssr\0" . as_ptr () as * const c_char) ; table . environment_set_tonemap = (gd_api . godot_method_bind_get_method) (class_name , "environment_set_tonemap\0" . as_ptr () as * const c_char) ; table . finish = (gd_api . godot_method_bind_get_method) (class_name , "finish\0" . as_ptr () as * const c_char) ; table . force_draw = (gd_api . godot_method_bind_get_method) (class_name , "force_draw\0" . as_ptr () as * const c_char) ; table . force_sync = (gd_api . godot_method_bind_get_method) (class_name , "force_sync\0" . as_ptr () as * const c_char) ; table . free_rid = (gd_api . godot_method_bind_get_method) (class_name , "free_rid\0" . as_ptr () as * const c_char) ; table . get_render_info = (gd_api . godot_method_bind_get_method) (class_name , "get_render_info\0" . as_ptr () as * const c_char) ; table . get_test_cube = (gd_api . godot_method_bind_get_method) (class_name , "get_test_cube\0" . as_ptr () as * const c_char) ; table . get_test_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_test_texture\0" . as_ptr () as * const c_char) ; table . get_video_adapter_name = (gd_api . godot_method_bind_get_method) (class_name , "get_video_adapter_name\0" . as_ptr () as * const c_char) ; table . get_video_adapter_vendor = (gd_api . godot_method_bind_get_method) (class_name , "get_video_adapter_vendor\0" . as_ptr () as * const c_char) ; table . get_white_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_white_texture\0" . as_ptr () as * const c_char) ; table . gi_probe_create = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_create\0" . as_ptr () as * const c_char) ; table . gi_probe_get_bias = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_bias\0" . as_ptr () as * const c_char) ; table . gi_probe_get_bounds = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_bounds\0" . as_ptr () as * const c_char) ; table . gi_probe_get_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_cell_size\0" . as_ptr () as * const c_char) ; table . gi_probe_get_dynamic_data = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_dynamic_data\0" . as_ptr () as * const c_char) ; table . gi_probe_get_dynamic_range = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_dynamic_range\0" . as_ptr () as * const c_char) ; table . gi_probe_get_energy = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_energy\0" . as_ptr () as * const c_char) ; table . gi_probe_get_normal_bias = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_normal_bias\0" . as_ptr () as * const c_char) ; table . gi_probe_get_propagation = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_propagation\0" . as_ptr () as * const c_char) ; table . gi_probe_get_to_cell_xform = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_get_to_cell_xform\0" . as_ptr () as * const c_char) ; table . gi_probe_is_compressed = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_is_compressed\0" . as_ptr () as * const c_char) ; table . gi_probe_is_interior = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_is_interior\0" . as_ptr () as * const c_char) ; table . gi_probe_set_bias = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_bias\0" . as_ptr () as * const c_char) ; table . gi_probe_set_bounds = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_bounds\0" . as_ptr () as * const c_char) ; table . gi_probe_set_cell_size = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_cell_size\0" . as_ptr () as * const c_char) ; table . gi_probe_set_compress = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_compress\0" . as_ptr () as * const c_char) ; table . gi_probe_set_dynamic_data = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_dynamic_data\0" . as_ptr () as * const c_char) ; table . gi_probe_set_dynamic_range = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_dynamic_range\0" . as_ptr () as * const c_char) ; table . gi_probe_set_energy = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_energy\0" . as_ptr () as * const c_char) ; table . gi_probe_set_interior = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_interior\0" . as_ptr () as * const c_char) ; table . gi_probe_set_normal_bias = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_normal_bias\0" . as_ptr () as * const c_char) ; table . gi_probe_set_propagation = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_propagation\0" . as_ptr () as * const c_char) ; table . gi_probe_set_to_cell_xform = (gd_api . godot_method_bind_get_method) (class_name , "gi_probe_set_to_cell_xform\0" . as_ptr () as * const c_char) ; table . has_changed = (gd_api . godot_method_bind_get_method) (class_name , "has_changed\0" . as_ptr () as * const c_char) ; table . has_feature = (gd_api . godot_method_bind_get_method) (class_name , "has_feature\0" . as_ptr () as * const c_char) ; table . has_os_feature = (gd_api . godot_method_bind_get_method) (class_name , "has_os_feature\0" . as_ptr () as * const c_char) ; table . immediate_begin = (gd_api . godot_method_bind_get_method) (class_name , "immediate_begin\0" . as_ptr () as * const c_char) ; table . immediate_clear = (gd_api . godot_method_bind_get_method) (class_name , "immediate_clear\0" . as_ptr () as * const c_char) ; table . immediate_color = (gd_api . godot_method_bind_get_method) (class_name , "immediate_color\0" . as_ptr () as * const c_char) ; table . immediate_create = (gd_api . godot_method_bind_get_method) (class_name , "immediate_create\0" . as_ptr () as * const c_char) ; table . immediate_end = (gd_api . godot_method_bind_get_method) (class_name , "immediate_end\0" . as_ptr () as * const c_char) ; table . immediate_get_material = (gd_api . godot_method_bind_get_method) (class_name , "immediate_get_material\0" . as_ptr () as * const c_char) ; table . immediate_normal = (gd_api . godot_method_bind_get_method) (class_name , "immediate_normal\0" . as_ptr () as * const c_char) ; table . immediate_set_material = (gd_api . godot_method_bind_get_method) (class_name , "immediate_set_material\0" . as_ptr () as * const c_char) ; table . immediate_tangent = (gd_api . godot_method_bind_get_method) (class_name , "immediate_tangent\0" . as_ptr () as * const c_char) ; table . immediate_uv = (gd_api . godot_method_bind_get_method) (class_name , "immediate_uv\0" . as_ptr () as * const c_char) ; table . immediate_uv2 = (gd_api . godot_method_bind_get_method) (class_name , "immediate_uv2\0" . as_ptr () as * const c_char) ; table . immediate_vertex = (gd_api . godot_method_bind_get_method) (class_name , "immediate_vertex\0" . as_ptr () as * const c_char) ; table . immediate_vertex_2d = (gd_api . godot_method_bind_get_method) (class_name , "immediate_vertex_2d\0" . as_ptr () as * const c_char) ; table . init = (gd_api . godot_method_bind_get_method) (class_name , "init\0" . as_ptr () as * const c_char) ; table . instance_attach_object_instance_id = (gd_api . godot_method_bind_get_method) (class_name , "instance_attach_object_instance_id\0" . as_ptr () as * const c_char) ; table . instance_attach_skeleton = (gd_api . godot_method_bind_get_method) (class_name , "instance_attach_skeleton\0" . as_ptr () as * const c_char) ; table . instance_create = (gd_api . godot_method_bind_get_method) (class_name , "instance_create\0" . as_ptr () as * const c_char) ; table . instance_create2 = (gd_api . godot_method_bind_get_method) (class_name , "instance_create2\0" . as_ptr () as * const c_char) ; table . instance_geometry_set_as_instance_lod = (gd_api . godot_method_bind_get_method) (class_name , "instance_geometry_set_as_instance_lod\0" . as_ptr () as * const c_char) ; table . instance_geometry_set_cast_shadows_setting = (gd_api . godot_method_bind_get_method) (class_name , "instance_geometry_set_cast_shadows_setting\0" . as_ptr () as * const c_char) ; table . instance_geometry_set_draw_range = (gd_api . godot_method_bind_get_method) (class_name , "instance_geometry_set_draw_range\0" . as_ptr () as * const c_char) ; table . instance_geometry_set_flag = (gd_api . godot_method_bind_get_method) (class_name , "instance_geometry_set_flag\0" . as_ptr () as * const c_char) ; table . instance_geometry_set_material_overlay = (gd_api . godot_method_bind_get_method) (class_name , "instance_geometry_set_material_overlay\0" . as_ptr () as * const c_char) ; table . instance_geometry_set_material_override = (gd_api . godot_method_bind_get_method) (class_name , "instance_geometry_set_material_override\0" . as_ptr () as * const c_char) ; table . instance_set_base = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_base\0" . as_ptr () as * const c_char) ; table . instance_set_blend_shape_weight = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_blend_shape_weight\0" . as_ptr () as * const c_char) ; table . instance_set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_custom_aabb\0" . as_ptr () as * const c_char) ; table . instance_set_exterior = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_exterior\0" . as_ptr () as * const c_char) ; table . instance_set_extra_visibility_margin = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_extra_visibility_margin\0" . as_ptr () as * const c_char) ; table . instance_set_layer_mask = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_layer_mask\0" . as_ptr () as * const c_char) ; table . instance_set_scenario = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_scenario\0" . as_ptr () as * const c_char) ; table . instance_set_surface_material = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_surface_material\0" . as_ptr () as * const c_char) ; table . instance_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_transform\0" . as_ptr () as * const c_char) ; table . instance_set_use_lightmap = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_use_lightmap\0" . as_ptr () as * const c_char) ; table . instance_set_visible = (gd_api . godot_method_bind_get_method) (class_name , "instance_set_visible\0" . as_ptr () as * const c_char) ; table . instances_cull_aabb = (gd_api . godot_method_bind_get_method) (class_name , "instances_cull_aabb\0" . as_ptr () as * const c_char) ; table . instances_cull_convex = (gd_api . godot_method_bind_get_method) (class_name , "instances_cull_convex\0" . as_ptr () as * const c_char) ; table . instances_cull_ray = (gd_api . godot_method_bind_get_method) (class_name , "instances_cull_ray\0" . as_ptr () as * const c_char) ; table . is_render_loop_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_render_loop_enabled\0" . as_ptr () as * const c_char) ; table . light_directional_set_blend_splits = (gd_api . godot_method_bind_get_method) (class_name , "light_directional_set_blend_splits\0" . as_ptr () as * const c_char) ; table . light_directional_set_shadow_depth_range_mode = (gd_api . godot_method_bind_get_method) (class_name , "light_directional_set_shadow_depth_range_mode\0" . as_ptr () as * const c_char) ; table . light_directional_set_shadow_mode = (gd_api . godot_method_bind_get_method) (class_name , "light_directional_set_shadow_mode\0" . as_ptr () as * const c_char) ; table . light_omni_set_shadow_detail = (gd_api . godot_method_bind_get_method) (class_name , "light_omni_set_shadow_detail\0" . as_ptr () as * const c_char) ; table . light_omni_set_shadow_mode = (gd_api . godot_method_bind_get_method) (class_name , "light_omni_set_shadow_mode\0" . as_ptr () as * const c_char) ; table . light_set_bake_mode = (gd_api . godot_method_bind_get_method) (class_name , "light_set_bake_mode\0" . as_ptr () as * const c_char) ; table . light_set_color = (gd_api . godot_method_bind_get_method) (class_name , "light_set_color\0" . as_ptr () as * const c_char) ; table . light_set_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "light_set_cull_mask\0" . as_ptr () as * const c_char) ; table . light_set_negative = (gd_api . godot_method_bind_get_method) (class_name , "light_set_negative\0" . as_ptr () as * const c_char) ; table . light_set_param = (gd_api . godot_method_bind_get_method) (class_name , "light_set_param\0" . as_ptr () as * const c_char) ; table . light_set_projector = (gd_api . godot_method_bind_get_method) (class_name , "light_set_projector\0" . as_ptr () as * const c_char) ; table . light_set_reverse_cull_face_mode = (gd_api . godot_method_bind_get_method) (class_name , "light_set_reverse_cull_face_mode\0" . as_ptr () as * const c_char) ; table . light_set_shadow = (gd_api . godot_method_bind_get_method) (class_name , "light_set_shadow\0" . as_ptr () as * const c_char) ; table . light_set_shadow_color = (gd_api . godot_method_bind_get_method) (class_name , "light_set_shadow_color\0" . as_ptr () as * const c_char) ; table . light_set_use_gi = (gd_api . godot_method_bind_get_method) (class_name , "light_set_use_gi\0" . as_ptr () as * const c_char) ; table . lightmap_capture_create = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_create\0" . as_ptr () as * const c_char) ; table . lightmap_capture_get_bounds = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_get_bounds\0" . as_ptr () as * const c_char) ; table . lightmap_capture_get_energy = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_get_energy\0" . as_ptr () as * const c_char) ; table . lightmap_capture_get_octree = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_get_octree\0" . as_ptr () as * const c_char) ; table . lightmap_capture_get_octree_cell_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_get_octree_cell_subdiv\0" . as_ptr () as * const c_char) ; table . lightmap_capture_get_octree_cell_transform = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_get_octree_cell_transform\0" . as_ptr () as * const c_char) ; table . lightmap_capture_is_interior = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_is_interior\0" . as_ptr () as * const c_char) ; table . lightmap_capture_set_bounds = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_set_bounds\0" . as_ptr () as * const c_char) ; table . lightmap_capture_set_energy = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_set_energy\0" . as_ptr () as * const c_char) ; table . lightmap_capture_set_interior = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_set_interior\0" . as_ptr () as * const c_char) ; table . lightmap_capture_set_octree = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_set_octree\0" . as_ptr () as * const c_char) ; table . lightmap_capture_set_octree_cell_subdiv = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_set_octree_cell_subdiv\0" . as_ptr () as * const c_char) ; table . lightmap_capture_set_octree_cell_transform = (gd_api . godot_method_bind_get_method) (class_name , "lightmap_capture_set_octree_cell_transform\0" . as_ptr () as * const c_char) ; table . make_sphere_mesh = (gd_api . godot_method_bind_get_method) (class_name , "make_sphere_mesh\0" . as_ptr () as * const c_char) ; table . material_create = (gd_api . godot_method_bind_get_method) (class_name , "material_create\0" . as_ptr () as * const c_char) ; table . material_get_param = (gd_api . godot_method_bind_get_method) (class_name , "material_get_param\0" . as_ptr () as * const c_char) ; table . material_get_param_default = (gd_api . godot_method_bind_get_method) (class_name , "material_get_param_default\0" . as_ptr () as * const c_char) ; table . material_get_shader = (gd_api . godot_method_bind_get_method) (class_name , "material_get_shader\0" . as_ptr () as * const c_char) ; table . material_set_line_width = (gd_api . godot_method_bind_get_method) (class_name , "material_set_line_width\0" . as_ptr () as * const c_char) ; table . material_set_next_pass = (gd_api . godot_method_bind_get_method) (class_name , "material_set_next_pass\0" . as_ptr () as * const c_char) ; table . material_set_param = (gd_api . godot_method_bind_get_method) (class_name , "material_set_param\0" . as_ptr () as * const c_char) ; table . material_set_render_priority = (gd_api . godot_method_bind_get_method) (class_name , "material_set_render_priority\0" . as_ptr () as * const c_char) ; table . material_set_shader = (gd_api . godot_method_bind_get_method) (class_name , "material_set_shader\0" . as_ptr () as * const c_char) ; table . mesh_add_surface_from_arrays = (gd_api . godot_method_bind_get_method) (class_name , "mesh_add_surface_from_arrays\0" . as_ptr () as * const c_char) ; table . mesh_clear = (gd_api . godot_method_bind_get_method) (class_name , "mesh_clear\0" . as_ptr () as * const c_char) ; table . mesh_create = (gd_api . godot_method_bind_get_method) (class_name , "mesh_create\0" . as_ptr () as * const c_char) ; table . mesh_get_blend_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "mesh_get_blend_shape_count\0" . as_ptr () as * const c_char) ; table . mesh_get_blend_shape_mode = (gd_api . godot_method_bind_get_method) (class_name , "mesh_get_blend_shape_mode\0" . as_ptr () as * const c_char) ; table . mesh_get_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "mesh_get_custom_aabb\0" . as_ptr () as * const c_char) ; table . mesh_get_surface_count = (gd_api . godot_method_bind_get_method) (class_name , "mesh_get_surface_count\0" . as_ptr () as * const c_char) ; table . mesh_remove_surface = (gd_api . godot_method_bind_get_method) (class_name , "mesh_remove_surface\0" . as_ptr () as * const c_char) ; table . mesh_set_blend_shape_count = (gd_api . godot_method_bind_get_method) (class_name , "mesh_set_blend_shape_count\0" . as_ptr () as * const c_char) ; table . mesh_set_blend_shape_mode = (gd_api . godot_method_bind_get_method) (class_name , "mesh_set_blend_shape_mode\0" . as_ptr () as * const c_char) ; table . mesh_set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "mesh_set_custom_aabb\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_aabb = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_aabb\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_array = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_array\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_array_index_len = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_array_index_len\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_array_len = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_array_len\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_arrays = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_arrays\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_blend_shape_arrays = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_blend_shape_arrays\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_format = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_format\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_format_offset = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_format_offset\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_format_stride = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_format_stride\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_index_array = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_index_array\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_material = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_material\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_primitive_type = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_primitive_type\0" . as_ptr () as * const c_char) ; table . mesh_surface_get_skeleton_aabb = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_get_skeleton_aabb\0" . as_ptr () as * const c_char) ; table . mesh_surface_set_material = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_set_material\0" . as_ptr () as * const c_char) ; table . mesh_surface_update_region = (gd_api . godot_method_bind_get_method) (class_name , "mesh_surface_update_region\0" . as_ptr () as * const c_char) ; table . multimesh_allocate = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_allocate\0" . as_ptr () as * const c_char) ; table . multimesh_create = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_create\0" . as_ptr () as * const c_char) ; table . multimesh_get_aabb = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_get_aabb\0" . as_ptr () as * const c_char) ; table . multimesh_get_instance_count = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_get_instance_count\0" . as_ptr () as * const c_char) ; table . multimesh_get_mesh = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_get_mesh\0" . as_ptr () as * const c_char) ; table . multimesh_get_visible_instances = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_get_visible_instances\0" . as_ptr () as * const c_char) ; table . multimesh_instance_get_color = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_get_color\0" . as_ptr () as * const c_char) ; table . multimesh_instance_get_custom_data = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_get_custom_data\0" . as_ptr () as * const c_char) ; table . multimesh_instance_get_transform = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_get_transform\0" . as_ptr () as * const c_char) ; table . multimesh_instance_get_transform_2d = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_get_transform_2d\0" . as_ptr () as * const c_char) ; table . multimesh_instance_set_color = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_set_color\0" . as_ptr () as * const c_char) ; table . multimesh_instance_set_custom_data = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_set_custom_data\0" . as_ptr () as * const c_char) ; table . multimesh_instance_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_set_transform\0" . as_ptr () as * const c_char) ; table . multimesh_instance_set_transform_2d = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_instance_set_transform_2d\0" . as_ptr () as * const c_char) ; table . multimesh_set_as_bulk_array = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_set_as_bulk_array\0" . as_ptr () as * const c_char) ; table . multimesh_set_mesh = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_set_mesh\0" . as_ptr () as * const c_char) ; table . multimesh_set_visible_instances = (gd_api . godot_method_bind_get_method) (class_name , "multimesh_set_visible_instances\0" . as_ptr () as * const c_char) ; table . omni_light_create = (gd_api . godot_method_bind_get_method) (class_name , "omni_light_create\0" . as_ptr () as * const c_char) ; table . particles_create = (gd_api . godot_method_bind_get_method) (class_name , "particles_create\0" . as_ptr () as * const c_char) ; table . particles_get_current_aabb = (gd_api . godot_method_bind_get_method) (class_name , "particles_get_current_aabb\0" . as_ptr () as * const c_char) ; table . particles_get_emitting = (gd_api . godot_method_bind_get_method) (class_name , "particles_get_emitting\0" . as_ptr () as * const c_char) ; table . particles_is_inactive = (gd_api . godot_method_bind_get_method) (class_name , "particles_is_inactive\0" . as_ptr () as * const c_char) ; table . particles_request_process = (gd_api . godot_method_bind_get_method) (class_name , "particles_request_process\0" . as_ptr () as * const c_char) ; table . particles_restart = (gd_api . godot_method_bind_get_method) (class_name , "particles_restart\0" . as_ptr () as * const c_char) ; table . particles_set_amount = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_amount\0" . as_ptr () as * const c_char) ; table . particles_set_custom_aabb = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_custom_aabb\0" . as_ptr () as * const c_char) ; table . particles_set_draw_order = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_draw_order\0" . as_ptr () as * const c_char) ; table . particles_set_draw_pass_mesh = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_draw_pass_mesh\0" . as_ptr () as * const c_char) ; table . particles_set_draw_passes = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_draw_passes\0" . as_ptr () as * const c_char) ; table . particles_set_emission_transform = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_emission_transform\0" . as_ptr () as * const c_char) ; table . particles_set_emitting = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_emitting\0" . as_ptr () as * const c_char) ; table . particles_set_explosiveness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_explosiveness_ratio\0" . as_ptr () as * const c_char) ; table . particles_set_fixed_fps = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_fixed_fps\0" . as_ptr () as * const c_char) ; table . particles_set_fractional_delta = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_fractional_delta\0" . as_ptr () as * const c_char) ; table . particles_set_lifetime = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_lifetime\0" . as_ptr () as * const c_char) ; table . particles_set_one_shot = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_one_shot\0" . as_ptr () as * const c_char) ; table . particles_set_pre_process_time = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_pre_process_time\0" . as_ptr () as * const c_char) ; table . particles_set_process_material = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_process_material\0" . as_ptr () as * const c_char) ; table . particles_set_randomness_ratio = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_randomness_ratio\0" . as_ptr () as * const c_char) ; table . particles_set_speed_scale = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_speed_scale\0" . as_ptr () as * const c_char) ; table . particles_set_use_local_coordinates = (gd_api . godot_method_bind_get_method) (class_name , "particles_set_use_local_coordinates\0" . as_ptr () as * const c_char) ; table . reflection_probe_create = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_create\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_as_interior = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_as_interior\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_cull_mask = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_cull_mask\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_enable_box_projection = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_enable_box_projection\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_enable_shadows = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_enable_shadows\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_extents = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_extents\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_intensity = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_intensity\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_interior_ambient = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_interior_ambient\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_interior_ambient_energy = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_interior_ambient_energy\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_interior_ambient_probe_contribution = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_interior_ambient_probe_contribution\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_max_distance = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_max_distance\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_origin_offset = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_origin_offset\0" . as_ptr () as * const c_char) ; table . reflection_probe_set_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "reflection_probe_set_update_mode\0" . as_ptr () as * const c_char) ; table . request_frame_drawn_callback = (gd_api . godot_method_bind_get_method) (class_name , "request_frame_drawn_callback\0" . as_ptr () as * const c_char) ; table . scenario_create = (gd_api . godot_method_bind_get_method) (class_name , "scenario_create\0" . as_ptr () as * const c_char) ; table . scenario_set_debug = (gd_api . godot_method_bind_get_method) (class_name , "scenario_set_debug\0" . as_ptr () as * const c_char) ; table . scenario_set_environment = (gd_api . godot_method_bind_get_method) (class_name , "scenario_set_environment\0" . as_ptr () as * const c_char) ; table . scenario_set_fallback_environment = (gd_api . godot_method_bind_get_method) (class_name , "scenario_set_fallback_environment\0" . as_ptr () as * const c_char) ; table . scenario_set_reflection_atlas_size = (gd_api . godot_method_bind_get_method) (class_name , "scenario_set_reflection_atlas_size\0" . as_ptr () as * const c_char) ; table . set_boot_image = (gd_api . godot_method_bind_get_method) (class_name , "set_boot_image\0" . as_ptr () as * const c_char) ; table . set_debug_generate_wireframes = (gd_api . godot_method_bind_get_method) (class_name , "set_debug_generate_wireframes\0" . as_ptr () as * const c_char) ; table . set_default_clear_color = (gd_api . godot_method_bind_get_method) (class_name , "set_default_clear_color\0" . as_ptr () as * const c_char) ; table . set_render_loop_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_render_loop_enabled\0" . as_ptr () as * const c_char) ; table . set_shader_async_hidden_forbidden = (gd_api . godot_method_bind_get_method) (class_name , "set_shader_async_hidden_forbidden\0" . as_ptr () as * const c_char) ; table . set_shader_time_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_shader_time_scale\0" . as_ptr () as * const c_char) ; table . set_use_occlusion_culling = (gd_api . godot_method_bind_get_method) (class_name , "set_use_occlusion_culling\0" . as_ptr () as * const c_char) ; table . shader_create = (gd_api . godot_method_bind_get_method) (class_name , "shader_create\0" . as_ptr () as * const c_char) ; table . shader_get_code = (gd_api . godot_method_bind_get_method) (class_name , "shader_get_code\0" . as_ptr () as * const c_char) ; table . shader_get_default_texture_param = (gd_api . godot_method_bind_get_method) (class_name , "shader_get_default_texture_param\0" . as_ptr () as * const c_char) ; table . shader_get_param_list = (gd_api . godot_method_bind_get_method) (class_name , "shader_get_param_list\0" . as_ptr () as * const c_char) ; table . shader_set_code = (gd_api . godot_method_bind_get_method) (class_name , "shader_set_code\0" . as_ptr () as * const c_char) ; table . shader_set_default_texture_param = (gd_api . godot_method_bind_get_method) (class_name , "shader_set_default_texture_param\0" . as_ptr () as * const c_char) ; table . skeleton_allocate = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_allocate\0" . as_ptr () as * const c_char) ; table . skeleton_bone_get_transform = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_bone_get_transform\0" . as_ptr () as * const c_char) ; table . skeleton_bone_get_transform_2d = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_bone_get_transform_2d\0" . as_ptr () as * const c_char) ; table . skeleton_bone_set_transform = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_bone_set_transform\0" . as_ptr () as * const c_char) ; table . skeleton_bone_set_transform_2d = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_bone_set_transform_2d\0" . as_ptr () as * const c_char) ; table . skeleton_create = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_create\0" . as_ptr () as * const c_char) ; table . skeleton_get_bone_count = (gd_api . godot_method_bind_get_method) (class_name , "skeleton_get_bone_count\0" . as_ptr () as * const c_char) ; table . sky_create = (gd_api . godot_method_bind_get_method) (class_name , "sky_create\0" . as_ptr () as * const c_char) ; table . sky_set_texture = (gd_api . godot_method_bind_get_method) (class_name , "sky_set_texture\0" . as_ptr () as * const c_char) ; table . spot_light_create = (gd_api . godot_method_bind_get_method) (class_name , "spot_light_create\0" . as_ptr () as * const c_char) ; table . sync = (gd_api . godot_method_bind_get_method) (class_name , "sync\0" . as_ptr () as * const c_char) ; table . texture_allocate = (gd_api . godot_method_bind_get_method) (class_name , "texture_allocate\0" . as_ptr () as * const c_char) ; table . texture_bind = (gd_api . godot_method_bind_get_method) (class_name , "texture_bind\0" . as_ptr () as * const c_char) ; table . texture_create = (gd_api . godot_method_bind_get_method) (class_name , "texture_create\0" . as_ptr () as * const c_char) ; table . texture_create_from_image = (gd_api . godot_method_bind_get_method) (class_name , "texture_create_from_image\0" . as_ptr () as * const c_char) ; table . texture_debug_usage = (gd_api . godot_method_bind_get_method) (class_name , "texture_debug_usage\0" . as_ptr () as * const c_char) ; table . texture_get_data = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_data\0" . as_ptr () as * const c_char) ; table . texture_get_depth = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_depth\0" . as_ptr () as * const c_char) ; table . texture_get_flags = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_flags\0" . as_ptr () as * const c_char) ; table . texture_get_format = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_format\0" . as_ptr () as * const c_char) ; table . texture_get_height = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_height\0" . as_ptr () as * const c_char) ; table . texture_get_path = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_path\0" . as_ptr () as * const c_char) ; table . texture_get_texid = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_texid\0" . as_ptr () as * const c_char) ; table . texture_get_type = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_type\0" . as_ptr () as * const c_char) ; table . texture_get_width = (gd_api . godot_method_bind_get_method) (class_name , "texture_get_width\0" . as_ptr () as * const c_char) ; table . texture_set_data = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_data\0" . as_ptr () as * const c_char) ; table . texture_set_data_partial = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_data_partial\0" . as_ptr () as * const c_char) ; table . texture_set_flags = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_flags\0" . as_ptr () as * const c_char) ; table . texture_set_path = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_path\0" . as_ptr () as * const c_char) ; table . texture_set_proxy = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_proxy\0" . as_ptr () as * const c_char) ; table . texture_set_shrink_all_x2_on_set_data = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_shrink_all_x2_on_set_data\0" . as_ptr () as * const c_char) ; table . texture_set_size_override = (gd_api . godot_method_bind_get_method) (class_name , "texture_set_size_override\0" . as_ptr () as * const c_char) ; table . textures_keep_original = (gd_api . godot_method_bind_get_method) (class_name , "textures_keep_original\0" . as_ptr () as * const c_char) ; table . viewport_attach_camera = (gd_api . godot_method_bind_get_method) (class_name , "viewport_attach_camera\0" . as_ptr () as * const c_char) ; table . viewport_attach_canvas = (gd_api . godot_method_bind_get_method) (class_name , "viewport_attach_canvas\0" . as_ptr () as * const c_char) ; table . viewport_attach_to_screen = (gd_api . godot_method_bind_get_method) (class_name , "viewport_attach_to_screen\0" . as_ptr () as * const c_char) ; table . viewport_create = (gd_api . godot_method_bind_get_method) (class_name , "viewport_create\0" . as_ptr () as * const c_char) ; table . viewport_detach = (gd_api . godot_method_bind_get_method) (class_name , "viewport_detach\0" . as_ptr () as * const c_char) ; table . viewport_get_render_info = (gd_api . godot_method_bind_get_method) (class_name , "viewport_get_render_info\0" . as_ptr () as * const c_char) ; table . viewport_get_texture = (gd_api . godot_method_bind_get_method) (class_name , "viewport_get_texture\0" . as_ptr () as * const c_char) ; table . viewport_remove_canvas = (gd_api . godot_method_bind_get_method) (class_name , "viewport_remove_canvas\0" . as_ptr () as * const c_char) ; table . viewport_set_active = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_active\0" . as_ptr () as * const c_char) ; table . viewport_set_canvas_stacking = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_canvas_stacking\0" . as_ptr () as * const c_char) ; table . viewport_set_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_canvas_transform\0" . as_ptr () as * const c_char) ; table . viewport_set_clear_mode = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_clear_mode\0" . as_ptr () as * const c_char) ; table . viewport_set_debug_draw = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_debug_draw\0" . as_ptr () as * const c_char) ; table . viewport_set_disable_3d = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_disable_3d\0" . as_ptr () as * const c_char) ; table . viewport_set_disable_environment = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_disable_environment\0" . as_ptr () as * const c_char) ; table . viewport_set_global_canvas_transform = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_global_canvas_transform\0" . as_ptr () as * const c_char) ; table . viewport_set_hdr = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_hdr\0" . as_ptr () as * const c_char) ; table . viewport_set_hide_canvas = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_hide_canvas\0" . as_ptr () as * const c_char) ; table . viewport_set_hide_scenario = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_hide_scenario\0" . as_ptr () as * const c_char) ; table . viewport_set_msaa = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_msaa\0" . as_ptr () as * const c_char) ; table . viewport_set_parent_viewport = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_parent_viewport\0" . as_ptr () as * const c_char) ; table . viewport_set_render_direct_to_screen = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_render_direct_to_screen\0" . as_ptr () as * const c_char) ; table . viewport_set_scenario = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_scenario\0" . as_ptr () as * const c_char) ; table . viewport_set_shadow_atlas_quadrant_subdivision = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_shadow_atlas_quadrant_subdivision\0" . as_ptr () as * const c_char) ; table . viewport_set_shadow_atlas_size = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_shadow_atlas_size\0" . as_ptr () as * const c_char) ; table . viewport_set_sharpen_intensity = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_sharpen_intensity\0" . as_ptr () as * const c_char) ; table . viewport_set_size = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_size\0" . as_ptr () as * const c_char) ; table . viewport_set_transparent_background = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_transparent_background\0" . as_ptr () as * const c_char) ; table . viewport_set_update_mode = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_update_mode\0" . as_ptr () as * const c_char) ; table . viewport_set_usage = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_usage\0" . as_ptr () as * const c_char) ; table . viewport_set_use_32_bpc_depth = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_use_32_bpc_depth\0" . as_ptr () as * const c_char) ; table . viewport_set_use_arvr = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_use_arvr\0" . as_ptr () as * const c_char) ; table . viewport_set_use_debanding = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_use_debanding\0" . as_ptr () as * const c_char) ; table . viewport_set_use_fxaa = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_use_fxaa\0" . as_ptr () as * const c_char) ; table . viewport_set_vflip = (gd_api . godot_method_bind_get_method) (class_name , "viewport_set_vflip\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_server::private::VisualServer;
            
            pub mod visual_shader {
                # ! [doc = "This module contains types related to the API class [`VisualShader`][super::VisualShader]."] pub (crate) mod private { # [doc = "`core class VisualShader` inherits `Shader` (reference-counted).\n\nThis class has related types in the [`visual_shader`][super::visual_shader] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshader.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShader inherits methods from:\n - [Shader](struct.Shader.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShader { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShader ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Type (pub i64) ; impl Type { pub const VERTEX : Type = Type (0i64) ; pub const FRAGMENT : Type = Type (1i64) ; pub const LIGHT : Type = Type (2i64) ; pub const MAX : Type = Type (3i64) ; } impl From < i64 > for Type { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Type > for i64 { # [inline] fn from (v : Type) -> Self { v . 0 } } impl FromVariant for Type { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShader { pub const NODE_ID_INVALID : i64 = - 1i64 ; pub const NODE_ID_OUTPUT : i64 = 0i64 ; pub const TYPE_VERTEX : i64 = 0i64 ; pub const TYPE_FRAGMENT : i64 = 1i64 ; pub const TYPE_LIGHT : i64 = 2i64 ; pub const TYPE_MAX : i64 = 3i64 ; } impl VisualShader { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds the specified node to the shader."] # [doc = ""] # [inline] pub fn add_node (& self , type_ : i64 , node : impl AsArg < crate :: generated :: VisualShaderNode > , position : Vector2 , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . add_node ; let ret = crate :: icalls :: icallvar__i64_obj_vec2_i64 (method_bind , self . this . sys () . as_ptr () , type_ as _ , node . as_arg_ptr () , position , id as _) ; } } # [doc = "Returns `true` if the specified nodes and ports can be connected together."] # [doc = ""] # [inline] pub fn can_connect_nodes (& self , type_ : i64 , from_node : i64 , from_port : i64 , to_node : i64 , to_port : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . can_connect_nodes ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , type_ as _ , from_node as _ , from_port as _ , to_node as _ , to_port as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Connects the specified nodes and ports."] # [doc = ""] # [inline] pub fn connect_nodes (& self , type_ : i64 , from_node : i64 , from_port : i64 , to_node : i64 , to_port : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . connect_nodes ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , type_ as _ , from_node as _ , from_port as _ , to_node as _ , to_port as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Connects the specified nodes and ports, even if they can't be connected. Such connection is invalid and will not function properly."] # [doc = ""] # [inline] pub fn connect_nodes_forced (& self , type_ : i64 , from_node : i64 , from_port : i64 , to_node : i64 , to_port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . connect_nodes_forced ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , type_ as _ , from_node as _ , from_port as _ , to_node as _ , to_port as _) ; } } # [doc = "Connects the specified nodes and ports."] # [doc = ""] # [inline] pub fn disconnect_nodes (& self , type_ : i64 , from_node : i64 , from_port : i64 , to_node : i64 , to_port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . disconnect_nodes ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , type_ as _ , from_node as _ , from_port as _ , to_node as _ , to_port as _) ; } } # [doc = "The offset vector of the whole graph."] # [doc = ""] # [inline] pub fn graph_offset (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . get_graph_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the shader node instance with specified `type` and `id`."] # [doc = ""] # [inline] pub fn get_node (& self , type_ : i64 , id : i64) -> Option < Ref < crate :: generated :: VisualShaderNode , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . get_node ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , type_ as _ , id as _) ; < Option < Ref < crate :: generated :: VisualShaderNode , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the list of connected nodes with the specified type."] # [doc = ""] # [inline] pub fn get_node_connections (& self , type_ : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . get_node_connections ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the list of all nodes in the shader with the specified type."] # [doc = ""] # [inline] pub fn get_node_list (& self , type_ : i64) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . get_node_list ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position of the specified node within the shader graph."] # [doc = ""] # [inline] pub fn get_node_position (& self , type_ : i64 , id : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . get_node_position ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , type_ as _ , id as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_valid_node_id (& self , type_ : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . get_valid_node_id ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the specified node and port connection exist."] # [doc = ""] # [inline] pub fn is_node_connection (& self , type_ : i64 , from_node : i64 , from_port : i64 , to_node : i64 , to_port : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . is_node_connection ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , type_ as _ , from_node as _ , from_port as _ , to_node as _ , to_port as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes the specified node from the shader."] # [doc = ""] # [inline] pub fn remove_node (& self , type_ : i64 , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . remove_node ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , type_ as _ , id as _) ; } } # [doc = "The offset vector of the whole graph."] # [doc = ""] # [inline] pub fn set_graph_offset (& self , offset : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . set_graph_offset ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , offset) ; } } # [doc = "Sets the mode of this shader."] # [doc = ""] # [inline] pub fn set_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . set_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = "Sets the position of the specified node."] # [doc = ""] # [inline] pub fn set_node_position (& self , type_ : i64 , id : i64 , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderMethodTable :: get (get_api ()) . set_node_position ; let ret = crate :: icalls :: icallvar__i64_i64_vec2 (method_bind , self . this . sys () . as_ptr () , type_ as _ , id as _ , position) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShader { } unsafe impl GodotObject for VisualShader { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShader" } } impl std :: ops :: Deref for VisualShader { type Target = crate :: generated :: Shader ; # [inline] fn deref (& self) -> & crate :: generated :: Shader { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShader { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Shader { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Shader > for VisualShader { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShader { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShader { } unsafe impl SubClass < crate :: generated :: Object > for VisualShader { } impl Instanciable for VisualShader { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShader :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_node : * mut sys :: godot_method_bind , pub can_connect_nodes : * mut sys :: godot_method_bind , pub connect_nodes : * mut sys :: godot_method_bind , pub connect_nodes_forced : * mut sys :: godot_method_bind , pub disconnect_nodes : * mut sys :: godot_method_bind , pub get_graph_offset : * mut sys :: godot_method_bind , pub get_node : * mut sys :: godot_method_bind , pub get_node_connections : * mut sys :: godot_method_bind , pub get_node_list : * mut sys :: godot_method_bind , pub get_node_position : * mut sys :: godot_method_bind , pub get_valid_node_id : * mut sys :: godot_method_bind , pub is_node_connection : * mut sys :: godot_method_bind , pub remove_node : * mut sys :: godot_method_bind , pub set_graph_offset : * mut sys :: godot_method_bind , pub set_mode : * mut sys :: godot_method_bind , pub set_node_position : * mut sys :: godot_method_bind } impl VisualShaderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderMethodTable = VisualShaderMethodTable { class_constructor : None , add_node : 0 as * mut sys :: godot_method_bind , can_connect_nodes : 0 as * mut sys :: godot_method_bind , connect_nodes : 0 as * mut sys :: godot_method_bind , connect_nodes_forced : 0 as * mut sys :: godot_method_bind , disconnect_nodes : 0 as * mut sys :: godot_method_bind , get_graph_offset : 0 as * mut sys :: godot_method_bind , get_node : 0 as * mut sys :: godot_method_bind , get_node_connections : 0 as * mut sys :: godot_method_bind , get_node_list : 0 as * mut sys :: godot_method_bind , get_node_position : 0 as * mut sys :: godot_method_bind , get_valid_node_id : 0 as * mut sys :: godot_method_bind , is_node_connection : 0 as * mut sys :: godot_method_bind , remove_node : 0 as * mut sys :: godot_method_bind , set_graph_offset : 0 as * mut sys :: godot_method_bind , set_mode : 0 as * mut sys :: godot_method_bind , set_node_position : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShader\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_node = (gd_api . godot_method_bind_get_method) (class_name , "add_node\0" . as_ptr () as * const c_char) ; table . can_connect_nodes = (gd_api . godot_method_bind_get_method) (class_name , "can_connect_nodes\0" . as_ptr () as * const c_char) ; table . connect_nodes = (gd_api . godot_method_bind_get_method) (class_name , "connect_nodes\0" . as_ptr () as * const c_char) ; table . connect_nodes_forced = (gd_api . godot_method_bind_get_method) (class_name , "connect_nodes_forced\0" . as_ptr () as * const c_char) ; table . disconnect_nodes = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_nodes\0" . as_ptr () as * const c_char) ; table . get_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_graph_offset\0" . as_ptr () as * const c_char) ; table . get_node = (gd_api . godot_method_bind_get_method) (class_name , "get_node\0" . as_ptr () as * const c_char) ; table . get_node_connections = (gd_api . godot_method_bind_get_method) (class_name , "get_node_connections\0" . as_ptr () as * const c_char) ; table . get_node_list = (gd_api . godot_method_bind_get_method) (class_name , "get_node_list\0" . as_ptr () as * const c_char) ; table . get_node_position = (gd_api . godot_method_bind_get_method) (class_name , "get_node_position\0" . as_ptr () as * const c_char) ; table . get_valid_node_id = (gd_api . godot_method_bind_get_method) (class_name , "get_valid_node_id\0" . as_ptr () as * const c_char) ; table . is_node_connection = (gd_api . godot_method_bind_get_method) (class_name , "is_node_connection\0" . as_ptr () as * const c_char) ; table . remove_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_node\0" . as_ptr () as * const c_char) ; table . set_graph_offset = (gd_api . godot_method_bind_get_method) (class_name , "set_graph_offset\0" . as_ptr () as * const c_char) ; table . set_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_mode\0" . as_ptr () as * const c_char) ; table . set_node_position = (gd_api . godot_method_bind_get_method) (class_name , "set_node_position\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader::private::VisualShader;
            
            pub mod visual_shader_node {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNode`][super::VisualShaderNode]."] pub (crate) mod private { # [doc = "`core class VisualShaderNode` inherits `Resource` (reference-counted).\n\nThis class has related types in the [`visual_shader_node`][super::visual_shader_node] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernode.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNode inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNode { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNode ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PortType (pub i64) ; impl PortType { pub const SCALAR : PortType = PortType (0i64) ; pub const VECTOR : PortType = PortType (1i64) ; pub const BOOLEAN : PortType = PortType (2i64) ; pub const TRANSFORM : PortType = PortType (3i64) ; pub const SAMPLER : PortType = PortType (4i64) ; pub const MAX : PortType = PortType (5i64) ; } impl From < i64 > for PortType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PortType > for i64 { # [inline] fn from (v : PortType) -> Self { v . 0 } } impl FromVariant for PortType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNode { pub const PORT_TYPE_SCALAR : i64 = 0i64 ; pub const PORT_TYPE_VECTOR : i64 = 1i64 ; pub const PORT_TYPE_BOOLEAN : i64 = 2i64 ; pub const PORT_TYPE_TRANSFORM : i64 = 3i64 ; pub const PORT_TYPE_SAMPLER : i64 = 4i64 ; pub const PORT_TYPE_MAX : i64 = 5i64 ; } impl VisualShaderNode { # [doc = "Returns an [`Array`][VariantArray] containing default values for all of the input ports of the node in the form `[index0, value0, index1, value1, ...]`."] # [doc = ""] # [inline] pub fn default_input_values (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeMethodTable :: get (get_api ()) . get_default_input_values ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the default value of the input `port`."] # [doc = ""] # [inline] pub fn get_input_port_default_value (& self , port : i64) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeMethodTable :: get (get_api ()) . get_input_port_default_value ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , port as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the output port index which will be showed for preview. If set to `-1` no port will be open for preview."] # [doc = ""] # [inline] pub fn output_port_for_preview (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeMethodTable :: get (get_api ()) . get_output_port_for_preview ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Sets the default input ports values using an [`Array`][VariantArray] of the form `[index0, value0, index1, value1, ...]`. For example: `[0, Vector3(0, 0, 0), 1, Vector3(0, 0, 0)]`."] # [doc = ""] # [inline] pub fn set_default_input_values (& self , values : VariantArray) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeMethodTable :: get (get_api ()) . set_default_input_values ; let ret = crate :: icalls :: icallvar__arr (method_bind , self . this . sys () . as_ptr () , values) ; } } # [doc = "Sets the default value for the selected input `port`."] # [doc = ""] # [inline] pub fn set_input_port_default_value (& self , port : i64 , value : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeMethodTable :: get (get_api ()) . set_input_port_default_value ; let ret = crate :: icalls :: icallvar__i64_var (method_bind , self . this . sys () . as_ptr () , port as _ , value . owned_to_variant ()) ; } } # [doc = "Sets the output port index which will be showed for preview. If set to `-1` no port will be open for preview."] # [doc = ""] # [inline] pub fn set_output_port_for_preview (& self , port : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeMethodTable :: get (get_api ()) . set_output_port_for_preview ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , port as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNode { } unsafe impl GodotObject for VisualShaderNode { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNode" } } impl std :: ops :: Deref for VisualShaderNode { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNode { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNode { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNode { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNode { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_default_input_values : * mut sys :: godot_method_bind , pub get_input_port_default_value : * mut sys :: godot_method_bind , pub get_output_port_for_preview : * mut sys :: godot_method_bind , pub set_default_input_values : * mut sys :: godot_method_bind , pub set_input_port_default_value : * mut sys :: godot_method_bind , pub set_output_port_for_preview : * mut sys :: godot_method_bind } impl VisualShaderNodeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeMethodTable = VisualShaderNodeMethodTable { class_constructor : None , get_default_input_values : 0 as * mut sys :: godot_method_bind , get_input_port_default_value : 0 as * mut sys :: godot_method_bind , get_output_port_for_preview : 0 as * mut sys :: godot_method_bind , set_default_input_values : 0 as * mut sys :: godot_method_bind , set_input_port_default_value : 0 as * mut sys :: godot_method_bind , set_output_port_for_preview : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNode\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_default_input_values = (gd_api . godot_method_bind_get_method) (class_name , "get_default_input_values\0" . as_ptr () as * const c_char) ; table . get_input_port_default_value = (gd_api . godot_method_bind_get_method) (class_name , "get_input_port_default_value\0" . as_ptr () as * const c_char) ; table . get_output_port_for_preview = (gd_api . godot_method_bind_get_method) (class_name , "get_output_port_for_preview\0" . as_ptr () as * const c_char) ; table . set_default_input_values = (gd_api . godot_method_bind_get_method) (class_name , "set_default_input_values\0" . as_ptr () as * const c_char) ; table . set_input_port_default_value = (gd_api . godot_method_bind_get_method) (class_name , "set_input_port_default_value\0" . as_ptr () as * const c_char) ; table . set_output_port_for_preview = (gd_api . godot_method_bind_get_method) (class_name , "set_output_port_for_preview\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node::private::VisualShaderNode;
            
            pub(crate) mod visual_shader_node_boolean_constant {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeBooleanConstant`][super::VisualShaderNodeBooleanConstant]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeBooleanConstant` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodebooleanconstant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeBooleanConstant inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeBooleanConstant { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeBooleanConstant ; impl VisualShaderNodeBooleanConstant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeBooleanConstantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A boolean constant which represents a state of this node."] # [doc = ""] # [inline] pub fn constant (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeBooleanConstantMethodTable :: get (get_api ()) . get_constant ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "A boolean constant which represents a state of this node."] # [doc = ""] # [inline] pub fn set_constant (& self , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeBooleanConstantMethodTable :: get (get_api ()) . set_constant ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeBooleanConstant { } unsafe impl GodotObject for VisualShaderNodeBooleanConstant { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeBooleanConstant" } } impl std :: ops :: Deref for VisualShaderNodeBooleanConstant { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeBooleanConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeBooleanConstant { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeBooleanConstant { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeBooleanConstant { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeBooleanConstant { } impl Instanciable for VisualShaderNodeBooleanConstant { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeBooleanConstant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeBooleanConstantMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_constant : * mut sys :: godot_method_bind , pub set_constant : * mut sys :: godot_method_bind } impl VisualShaderNodeBooleanConstantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeBooleanConstantMethodTable = VisualShaderNodeBooleanConstantMethodTable { class_constructor : None , get_constant : 0 as * mut sys :: godot_method_bind , set_constant : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeBooleanConstantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeBooleanConstant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_constant\0" . as_ptr () as * const c_char) ; table . set_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_constant\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_boolean_constant::private::VisualShaderNodeBooleanConstant;
            
            pub(crate) mod visual_shader_node_boolean_uniform {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeBooleanUniform`][super::VisualShaderNodeBooleanUniform]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeBooleanUniform` inherits `VisualShaderNodeUniform` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodebooleanuniform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeBooleanUniform inherits methods from:\n - [VisualShaderNodeUniform](struct.VisualShaderNodeUniform.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeBooleanUniform { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeBooleanUniform ; impl VisualShaderNodeBooleanUniform { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeBooleanUniformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A default value to be assigned within the shader."] # [doc = ""] # [inline] pub fn default_value (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeBooleanUniformMethodTable :: get (get_api ()) . get_default_value ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Enables usage of the [`default_value`][Self::default_value]."] # [doc = ""] # [inline] pub fn is_default_value_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeBooleanUniformMethodTable :: get (get_api ()) . is_default_value_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "A default value to be assigned within the shader."] # [doc = ""] # [inline] pub fn set_default_value (& self , value : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeBooleanUniformMethodTable :: get (get_api ()) . set_default_value ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Enables usage of the [`default_value`][Self::default_value]."] # [doc = ""] # [inline] pub fn set_default_value_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeBooleanUniformMethodTable :: get (get_api ()) . set_default_value_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeBooleanUniform { } unsafe impl GodotObject for VisualShaderNodeBooleanUniform { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeBooleanUniform" } } impl std :: ops :: Deref for VisualShaderNodeBooleanUniform { type Target = crate :: generated :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeBooleanUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNodeUniform > for VisualShaderNodeBooleanUniform { } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeBooleanUniform { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeBooleanUniform { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeBooleanUniform { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeBooleanUniform { } impl Instanciable for VisualShaderNodeBooleanUniform { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeBooleanUniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeBooleanUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_default_value : * mut sys :: godot_method_bind , pub is_default_value_enabled : * mut sys :: godot_method_bind , pub set_default_value : * mut sys :: godot_method_bind , pub set_default_value_enabled : * mut sys :: godot_method_bind } impl VisualShaderNodeBooleanUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeBooleanUniformMethodTable = VisualShaderNodeBooleanUniformMethodTable { class_constructor : None , get_default_value : 0 as * mut sys :: godot_method_bind , is_default_value_enabled : 0 as * mut sys :: godot_method_bind , set_default_value : 0 as * mut sys :: godot_method_bind , set_default_value_enabled : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeBooleanUniformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeBooleanUniform\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_default_value = (gd_api . godot_method_bind_get_method) (class_name , "get_default_value\0" . as_ptr () as * const c_char) ; table . is_default_value_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_default_value_enabled\0" . as_ptr () as * const c_char) ; table . set_default_value = (gd_api . godot_method_bind_get_method) (class_name , "set_default_value\0" . as_ptr () as * const c_char) ; table . set_default_value_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_default_value_enabled\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_boolean_uniform::private::VisualShaderNodeBooleanUniform;
            
            pub(crate) mod visual_shader_node_color_constant {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeColorConstant`][super::VisualShaderNodeColorConstant]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeColorConstant` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodecolorconstant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeColorConstant inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeColorConstant { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeColorConstant ; impl VisualShaderNodeColorConstant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeColorConstantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A [`Color`][Color] constant which represents a state of this node."] # [doc = ""] # [inline] pub fn constant (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeColorConstantMethodTable :: get (get_api ()) . get_constant ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A [`Color`][Color] constant which represents a state of this node."] # [doc = ""] # [inline] pub fn set_constant (& self , value : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeColorConstantMethodTable :: get (get_api ()) . set_constant ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeColorConstant { } unsafe impl GodotObject for VisualShaderNodeColorConstant { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeColorConstant" } } impl std :: ops :: Deref for VisualShaderNodeColorConstant { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeColorConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeColorConstant { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeColorConstant { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeColorConstant { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeColorConstant { } impl Instanciable for VisualShaderNodeColorConstant { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeColorConstant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeColorConstantMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_constant : * mut sys :: godot_method_bind , pub set_constant : * mut sys :: godot_method_bind } impl VisualShaderNodeColorConstantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeColorConstantMethodTable = VisualShaderNodeColorConstantMethodTable { class_constructor : None , get_constant : 0 as * mut sys :: godot_method_bind , set_constant : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeColorConstantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeColorConstant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_constant\0" . as_ptr () as * const c_char) ; table . set_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_constant\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_color_constant::private::VisualShaderNodeColorConstant;
            
            pub mod visual_shader_node_color_func {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeColorFunc`][super::VisualShaderNodeColorFunc]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeColorFunc` inherits `VisualShaderNode` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_color_func`][super::visual_shader_node_color_func] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodecolorfunc.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeColorFunc inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeColorFunc { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeColorFunc ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Function (pub i64) ; impl Function { pub const GRAYSCALE : Function = Function (0i64) ; pub const SEPIA : Function = Function (1i64) ; } impl From < i64 > for Function { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Function > for i64 { # [inline] fn from (v : Function) -> Self { v . 0 } } impl FromVariant for Function { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeColorFunc { pub const FUNC_GRAYSCALE : i64 = 0i64 ; pub const FUNC_SEPIA : i64 = 1i64 ; } impl VisualShaderNodeColorFunc { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeColorFuncMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A function to be applied to the input color. See [`Function`][Function] for options."] # [doc = ""] # [inline] pub fn function (& self) -> crate :: generated :: visual_shader_node_color_func :: Function { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeColorFuncMethodTable :: get (get_api ()) . get_function ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_color_func :: Function > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A function to be applied to the input color. See [`Function`][Function] for options."] # [doc = ""] # [inline] pub fn set_function (& self , func : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeColorFuncMethodTable :: get (get_api ()) . set_function ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , func as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeColorFunc { } unsafe impl GodotObject for VisualShaderNodeColorFunc { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeColorFunc" } } impl std :: ops :: Deref for VisualShaderNodeColorFunc { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeColorFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeColorFunc { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeColorFunc { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeColorFunc { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeColorFunc { } impl Instanciable for VisualShaderNodeColorFunc { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeColorFunc :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeColorFuncMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_function : * mut sys :: godot_method_bind , pub set_function : * mut sys :: godot_method_bind } impl VisualShaderNodeColorFuncMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeColorFuncMethodTable = VisualShaderNodeColorFuncMethodTable { class_constructor : None , get_function : 0 as * mut sys :: godot_method_bind , set_function : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeColorFuncMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeColorFunc\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_color_func::private::VisualShaderNodeColorFunc;
            
            pub mod visual_shader_node_color_op {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeColorOp`][super::VisualShaderNodeColorOp]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeColorOp` inherits `VisualShaderNode` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_color_op`][super::visual_shader_node_color_op] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodecolorop.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeColorOp inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeColorOp { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeColorOp ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Operator (pub i64) ; impl Operator { pub const SCREEN : Operator = Operator (0i64) ; pub const DIFFERENCE : Operator = Operator (1i64) ; pub const DARKEN : Operator = Operator (2i64) ; pub const LIGHTEN : Operator = Operator (3i64) ; pub const OVERLAY : Operator = Operator (4i64) ; pub const DODGE : Operator = Operator (5i64) ; pub const BURN : Operator = Operator (6i64) ; pub const SOFT_LIGHT : Operator = Operator (7i64) ; pub const HARD_LIGHT : Operator = Operator (8i64) ; } impl From < i64 > for Operator { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Operator > for i64 { # [inline] fn from (v : Operator) -> Self { v . 0 } } impl FromVariant for Operator { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeColorOp { pub const OP_SCREEN : i64 = 0i64 ; pub const OP_DIFFERENCE : i64 = 1i64 ; pub const OP_DARKEN : i64 = 2i64 ; pub const OP_LIGHTEN : i64 = 3i64 ; pub const OP_OVERLAY : i64 = 4i64 ; pub const OP_DODGE : i64 = 5i64 ; pub const OP_BURN : i64 = 6i64 ; pub const OP_SOFT_LIGHT : i64 = 7i64 ; pub const OP_HARD_LIGHT : i64 = 8i64 ; } impl VisualShaderNodeColorOp { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeColorOpMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "An operator to be applied to the inputs. See [`Operator`][Operator] for options."] # [doc = ""] # [inline] pub fn operator (& self) -> crate :: generated :: visual_shader_node_color_op :: Operator { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeColorOpMethodTable :: get (get_api ()) . get_operator ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_color_op :: Operator > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "An operator to be applied to the inputs. See [`Operator`][Operator] for options."] # [doc = ""] # [inline] pub fn set_operator (& self , op : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeColorOpMethodTable :: get (get_api ()) . set_operator ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , op as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeColorOp { } unsafe impl GodotObject for VisualShaderNodeColorOp { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeColorOp" } } impl std :: ops :: Deref for VisualShaderNodeColorOp { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeColorOp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeColorOp { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeColorOp { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeColorOp { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeColorOp { } impl Instanciable for VisualShaderNodeColorOp { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeColorOp :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeColorOpMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_operator : * mut sys :: godot_method_bind , pub set_operator : * mut sys :: godot_method_bind } impl VisualShaderNodeColorOpMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeColorOpMethodTable = VisualShaderNodeColorOpMethodTable { class_constructor : None , get_operator : 0 as * mut sys :: godot_method_bind , set_operator : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeColorOpMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeColorOp\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_operator\0" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_color_op::private::VisualShaderNodeColorOp;
            
            pub(crate) mod visual_shader_node_color_uniform {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeColorUniform`][super::VisualShaderNodeColorUniform]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeColorUniform` inherits `VisualShaderNodeUniform` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodecoloruniform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeColorUniform inherits methods from:\n - [VisualShaderNodeUniform](struct.VisualShaderNodeUniform.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeColorUniform { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeColorUniform ; impl VisualShaderNodeColorUniform { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeColorUniformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A default value to be assigned within the shader."] # [doc = ""] # [inline] pub fn default_value (& self) -> Color { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeColorUniformMethodTable :: get (get_api ()) . get_default_value ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Color > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Enables usage of the [`default_value`][Self::default_value]."] # [doc = ""] # [inline] pub fn is_default_value_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeColorUniformMethodTable :: get (get_api ()) . is_default_value_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "A default value to be assigned within the shader."] # [doc = ""] # [inline] pub fn set_default_value (& self , value : Color) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeColorUniformMethodTable :: get (get_api ()) . set_default_value ; let ret = crate :: icalls :: icallvar__color (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Enables usage of the [`default_value`][Self::default_value]."] # [doc = ""] # [inline] pub fn set_default_value_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeColorUniformMethodTable :: get (get_api ()) . set_default_value_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeColorUniform { } unsafe impl GodotObject for VisualShaderNodeColorUniform { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeColorUniform" } } impl std :: ops :: Deref for VisualShaderNodeColorUniform { type Target = crate :: generated :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeColorUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNodeUniform > for VisualShaderNodeColorUniform { } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeColorUniform { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeColorUniform { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeColorUniform { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeColorUniform { } impl Instanciable for VisualShaderNodeColorUniform { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeColorUniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeColorUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_default_value : * mut sys :: godot_method_bind , pub is_default_value_enabled : * mut sys :: godot_method_bind , pub set_default_value : * mut sys :: godot_method_bind , pub set_default_value_enabled : * mut sys :: godot_method_bind } impl VisualShaderNodeColorUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeColorUniformMethodTable = VisualShaderNodeColorUniformMethodTable { class_constructor : None , get_default_value : 0 as * mut sys :: godot_method_bind , is_default_value_enabled : 0 as * mut sys :: godot_method_bind , set_default_value : 0 as * mut sys :: godot_method_bind , set_default_value_enabled : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeColorUniformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeColorUniform\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_default_value = (gd_api . godot_method_bind_get_method) (class_name , "get_default_value\0" . as_ptr () as * const c_char) ; table . is_default_value_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_default_value_enabled\0" . as_ptr () as * const c_char) ; table . set_default_value = (gd_api . godot_method_bind_get_method) (class_name , "set_default_value\0" . as_ptr () as * const c_char) ; table . set_default_value_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_default_value_enabled\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_color_uniform::private::VisualShaderNodeColorUniform;
            
            pub mod visual_shader_node_compare {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeCompare`][super::VisualShaderNodeCompare]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeCompare` inherits `VisualShaderNode` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_compare`][super::visual_shader_node_compare] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodecompare.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeCompare inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeCompare { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeCompare ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ComparisonType (pub i64) ; impl ComparisonType { pub const SCALAR : ComparisonType = ComparisonType (0i64) ; pub const VECTOR : ComparisonType = ComparisonType (1i64) ; pub const BOOLEAN : ComparisonType = ComparisonType (2i64) ; pub const TRANSFORM : ComparisonType = ComparisonType (3i64) ; } impl From < i64 > for ComparisonType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ComparisonType > for i64 { # [inline] fn from (v : ComparisonType) -> Self { v . 0 } } impl FromVariant for ComparisonType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Condition (pub i64) ; impl Condition { pub const ALL : Condition = Condition (0i64) ; pub const ANY : Condition = Condition (1i64) ; } impl From < i64 > for Condition { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Condition > for i64 { # [inline] fn from (v : Condition) -> Self { v . 0 } } impl FromVariant for Condition { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Function (pub i64) ; impl Function { pub const EQUAL : Function = Function (0i64) ; pub const NOT_EQUAL : Function = Function (1i64) ; pub const GREATER_THAN : Function = Function (2i64) ; pub const GREATER_THAN_EQUAL : Function = Function (3i64) ; pub const LESS_THAN : Function = Function (4i64) ; pub const LESS_THAN_EQUAL : Function = Function (5i64) ; } impl From < i64 > for Function { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Function > for i64 { # [inline] fn from (v : Function) -> Self { v . 0 } } impl FromVariant for Function { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeCompare { pub const COND_ALL : i64 = 0i64 ; pub const CTYPE_SCALAR : i64 = 0i64 ; pub const FUNC_EQUAL : i64 = 0i64 ; pub const COND_ANY : i64 = 1i64 ; pub const CTYPE_VECTOR : i64 = 1i64 ; pub const FUNC_NOT_EQUAL : i64 = 1i64 ; pub const CTYPE_BOOLEAN : i64 = 2i64 ; pub const FUNC_GREATER_THAN : i64 = 2i64 ; pub const CTYPE_TRANSFORM : i64 = 3i64 ; pub const FUNC_GREATER_THAN_EQUAL : i64 = 3i64 ; pub const FUNC_LESS_THAN : i64 = 4i64 ; pub const FUNC_LESS_THAN_EQUAL : i64 = 5i64 ; } impl VisualShaderNodeCompare { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeCompareMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The type to be used in the comparison. See [`ComparisonType`][ComparisonType] for options."] # [doc = ""] # [inline] pub fn comparison_type (& self) -> crate :: generated :: visual_shader_node_compare :: ComparisonType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeCompareMethodTable :: get (get_api ()) . get_comparison_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_compare :: ComparisonType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Extra condition which is applied if [`type`][Self::type] is set to [`CTYPE_VECTOR`][Self::CTYPE_VECTOR]."] # [doc = ""] # [inline] pub fn condition (& self) -> crate :: generated :: visual_shader_node_compare :: Condition { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeCompareMethodTable :: get (get_api ()) . get_condition ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_compare :: Condition > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A comparison function. See [`Function`][Function] for options."] # [doc = ""] # [inline] pub fn function (& self) -> crate :: generated :: visual_shader_node_compare :: Function { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeCompareMethodTable :: get (get_api ()) . get_function ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_compare :: Function > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The type to be used in the comparison. See [`ComparisonType`][ComparisonType] for options."] # [doc = ""] # [inline] pub fn set_comparison_type (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeCompareMethodTable :: get (get_api ()) . set_comparison_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } # [doc = "Extra condition which is applied if [`type`][Self::type] is set to [`CTYPE_VECTOR`][Self::CTYPE_VECTOR]."] # [doc = ""] # [inline] pub fn set_condition (& self , condition : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeCompareMethodTable :: get (get_api ()) . set_condition ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , condition as _) ; } } # [doc = "A comparison function. See [`Function`][Function] for options."] # [doc = ""] # [inline] pub fn set_function (& self , func : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeCompareMethodTable :: get (get_api ()) . set_function ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , func as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeCompare { } unsafe impl GodotObject for VisualShaderNodeCompare { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeCompare" } } impl std :: ops :: Deref for VisualShaderNodeCompare { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeCompare { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeCompare { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeCompare { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeCompare { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeCompare { } impl Instanciable for VisualShaderNodeCompare { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeCompare :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeCompareMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_comparison_type : * mut sys :: godot_method_bind , pub get_condition : * mut sys :: godot_method_bind , pub get_function : * mut sys :: godot_method_bind , pub set_comparison_type : * mut sys :: godot_method_bind , pub set_condition : * mut sys :: godot_method_bind , pub set_function : * mut sys :: godot_method_bind } impl VisualShaderNodeCompareMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeCompareMethodTable = VisualShaderNodeCompareMethodTable { class_constructor : None , get_comparison_type : 0 as * mut sys :: godot_method_bind , get_condition : 0 as * mut sys :: godot_method_bind , get_function : 0 as * mut sys :: godot_method_bind , set_comparison_type : 0 as * mut sys :: godot_method_bind , set_condition : 0 as * mut sys :: godot_method_bind , set_function : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeCompareMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeCompare\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_comparison_type = (gd_api . godot_method_bind_get_method) (class_name , "get_comparison_type\0" . as_ptr () as * const c_char) ; table . get_condition = (gd_api . godot_method_bind_get_method) (class_name , "get_condition\0" . as_ptr () as * const c_char) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . set_comparison_type = (gd_api . godot_method_bind_get_method) (class_name , "set_comparison_type\0" . as_ptr () as * const c_char) ; table . set_condition = (gd_api . godot_method_bind_get_method) (class_name , "set_condition\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_compare::private::VisualShaderNodeCompare;
            
            pub mod visual_shader_node_cube_map {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeCubeMap`][super::VisualShaderNodeCubeMap]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeCubeMap` inherits `VisualShaderNode` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_cube_map`][super::visual_shader_node_cube_map] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodecubemap.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeCubeMap inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeCubeMap { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeCubeMap ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Source (pub i64) ; impl Source { pub const TEXTURE : Source = Source (0i64) ; pub const PORT : Source = Source (1i64) ; } impl From < i64 > for Source { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Source > for i64 { # [inline] fn from (v : Source) -> Self { v . 0 } } impl FromVariant for Source { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TextureType (pub i64) ; impl TextureType { pub const DATA : TextureType = TextureType (0i64) ; pub const COLOR : TextureType = TextureType (1i64) ; pub const NORMALMAP : TextureType = TextureType (2i64) ; } impl From < i64 > for TextureType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TextureType > for i64 { # [inline] fn from (v : TextureType) -> Self { v . 0 } } impl FromVariant for TextureType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeCubeMap { pub const SOURCE_TEXTURE : i64 = 0i64 ; pub const TYPE_DATA : i64 = 0i64 ; pub const SOURCE_PORT : i64 = 1i64 ; pub const TYPE_COLOR : i64 = 1i64 ; pub const TYPE_NORMALMAP : i64 = 2i64 ; } impl VisualShaderNodeCubeMap { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeCubeMapMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [`CubeMap`][CubeMap] texture to sample when using [`SOURCE_TEXTURE`][Self::SOURCE_TEXTURE] as [`source`][Self::source]."] # [doc = ""] # [inline] pub fn cube_map (& self) -> Option < Ref < crate :: generated :: CubeMap , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeCubeMapMethodTable :: get (get_api ()) . get_cube_map ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: CubeMap , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Defines which source should be used for the sampling. See [`Source`][Source] for options."] # [doc = ""] # [inline] pub fn source (& self) -> crate :: generated :: visual_shader_node_cube_map :: Source { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeCubeMapMethodTable :: get (get_api ()) . get_source ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_cube_map :: Source > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Defines the type of data provided by the source texture. See [`TextureType`][TextureType] for options."] # [doc = ""] # [inline] pub fn texture_type (& self) -> crate :: generated :: visual_shader_node_cube_map :: TextureType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeCubeMapMethodTable :: get (get_api ()) . get_texture_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_cube_map :: TextureType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`CubeMap`][CubeMap] texture to sample when using [`SOURCE_TEXTURE`][Self::SOURCE_TEXTURE] as [`source`][Self::source]."] # [doc = ""] # [inline] pub fn set_cube_map (& self , value : impl AsArg < crate :: generated :: CubeMap >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeCubeMapMethodTable :: get (get_api ()) . set_cube_map ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , value . as_arg_ptr ()) ; } } # [doc = "Defines which source should be used for the sampling. See [`Source`][Source] for options."] # [doc = ""] # [inline] pub fn set_source (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeCubeMapMethodTable :: get (get_api ()) . set_source ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Defines the type of data provided by the source texture. See [`TextureType`][TextureType] for options."] # [doc = ""] # [inline] pub fn set_texture_type (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeCubeMapMethodTable :: get (get_api ()) . set_texture_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeCubeMap { } unsafe impl GodotObject for VisualShaderNodeCubeMap { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeCubeMap" } } impl std :: ops :: Deref for VisualShaderNodeCubeMap { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeCubeMap { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeCubeMap { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeCubeMap { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeCubeMap { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeCubeMap { } impl Instanciable for VisualShaderNodeCubeMap { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeCubeMap :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeCubeMapMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_cube_map : * mut sys :: godot_method_bind , pub get_source : * mut sys :: godot_method_bind , pub get_texture_type : * mut sys :: godot_method_bind , pub set_cube_map : * mut sys :: godot_method_bind , pub set_source : * mut sys :: godot_method_bind , pub set_texture_type : * mut sys :: godot_method_bind } impl VisualShaderNodeCubeMapMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeCubeMapMethodTable = VisualShaderNodeCubeMapMethodTable { class_constructor : None , get_cube_map : 0 as * mut sys :: godot_method_bind , get_source : 0 as * mut sys :: godot_method_bind , get_texture_type : 0 as * mut sys :: godot_method_bind , set_cube_map : 0 as * mut sys :: godot_method_bind , set_source : 0 as * mut sys :: godot_method_bind , set_texture_type : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeCubeMapMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeCubeMap\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_cube_map = (gd_api . godot_method_bind_get_method) (class_name , "get_cube_map\0" . as_ptr () as * const c_char) ; table . get_source = (gd_api . godot_method_bind_get_method) (class_name , "get_source\0" . as_ptr () as * const c_char) ; table . get_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_type\0" . as_ptr () as * const c_char) ; table . set_cube_map = (gd_api . godot_method_bind_get_method) (class_name , "set_cube_map\0" . as_ptr () as * const c_char) ; table . set_source = (gd_api . godot_method_bind_get_method) (class_name , "set_source\0" . as_ptr () as * const c_char) ; table . set_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_type\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_cube_map::private::VisualShaderNodeCubeMap;
            
            pub(crate) mod visual_shader_node_cube_map_uniform {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeCubeMapUniform`][super::VisualShaderNodeCubeMapUniform]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeCubeMapUniform` inherits `VisualShaderNodeTextureUniform` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodecubemapuniform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeCubeMapUniform inherits methods from:\n - [VisualShaderNodeTextureUniform](struct.VisualShaderNodeTextureUniform.html)\n - [VisualShaderNodeUniform](struct.VisualShaderNodeUniform.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeCubeMapUniform { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeCubeMapUniform ; impl VisualShaderNodeCubeMapUniform { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeCubeMapUniformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeCubeMapUniform { } unsafe impl GodotObject for VisualShaderNodeCubeMapUniform { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeCubeMapUniform" } } impl std :: ops :: Deref for VisualShaderNodeCubeMapUniform { type Target = crate :: generated :: VisualShaderNodeTextureUniform ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNodeTextureUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeCubeMapUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNodeTextureUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNodeTextureUniform > for VisualShaderNodeCubeMapUniform { } unsafe impl SubClass < crate :: generated :: VisualShaderNodeUniform > for VisualShaderNodeCubeMapUniform { } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeCubeMapUniform { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeCubeMapUniform { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeCubeMapUniform { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeCubeMapUniform { } impl Instanciable for VisualShaderNodeCubeMapUniform { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeCubeMapUniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeCubeMapUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeCubeMapUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeCubeMapUniformMethodTable = VisualShaderNodeCubeMapUniformMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeCubeMapUniformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeCubeMapUniform\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_cube_map_uniform::private::VisualShaderNodeCubeMapUniform;
            
            pub(crate) mod visual_shader_node_custom {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeCustom`][super::VisualShaderNodeCustom]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeCustom` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodecustom.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeCustom inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeCustom { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeCustom ; impl VisualShaderNodeCustom { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeCustomMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeCustom { } unsafe impl GodotObject for VisualShaderNodeCustom { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeCustom" } } impl std :: ops :: Deref for VisualShaderNodeCustom { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeCustom { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeCustom { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeCustom { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeCustom { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeCustom { } impl Instanciable for VisualShaderNodeCustom { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeCustom :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeCustomMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeCustomMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeCustomMethodTable = VisualShaderNodeCustomMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeCustomMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeCustom\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_custom::private::VisualShaderNodeCustom;
            
            pub(crate) mod visual_shader_node_determinant {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeDeterminant`][super::VisualShaderNodeDeterminant]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeDeterminant` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodedeterminant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeDeterminant inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeDeterminant { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeDeterminant ; impl VisualShaderNodeDeterminant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeDeterminantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeDeterminant { } unsafe impl GodotObject for VisualShaderNodeDeterminant { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeDeterminant" } } impl std :: ops :: Deref for VisualShaderNodeDeterminant { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeDeterminant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeDeterminant { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeDeterminant { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeDeterminant { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeDeterminant { } impl Instanciable for VisualShaderNodeDeterminant { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeDeterminant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeDeterminantMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeDeterminantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeDeterminantMethodTable = VisualShaderNodeDeterminantMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeDeterminantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeDeterminant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_determinant::private::VisualShaderNodeDeterminant;
            
            pub(crate) mod visual_shader_node_dot_product {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeDotProduct`][super::VisualShaderNodeDotProduct]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeDotProduct` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodedotproduct.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeDotProduct inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeDotProduct { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeDotProduct ; impl VisualShaderNodeDotProduct { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeDotProductMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeDotProduct { } unsafe impl GodotObject for VisualShaderNodeDotProduct { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeDotProduct" } } impl std :: ops :: Deref for VisualShaderNodeDotProduct { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeDotProduct { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeDotProduct { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeDotProduct { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeDotProduct { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeDotProduct { } impl Instanciable for VisualShaderNodeDotProduct { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeDotProduct :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeDotProductMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeDotProductMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeDotProductMethodTable = VisualShaderNodeDotProductMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeDotProductMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeDotProduct\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_dot_product::private::VisualShaderNodeDotProduct;
            
            pub(crate) mod visual_shader_node_expression {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeExpression`][super::VisualShaderNodeExpression]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeExpression` inherits `VisualShaderNodeGroupBase` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodeexpression.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeExpression inherits methods from:\n - [VisualShaderNodeGroupBase](struct.VisualShaderNodeGroupBase.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeExpression { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeExpression ; impl VisualShaderNodeExpression { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeExpressionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "An expression in Godot Shading Language, which will be injected at the start of the graph's matching shader function (`vertex`, `fragment`, or `light`), and thus cannot be used to declare functions, varyings, uniforms, or global constants."] # [doc = ""] # [inline] pub fn expression (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeExpressionMethodTable :: get (get_api ()) . get_expression ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "An expression in Godot Shading Language, which will be injected at the start of the graph's matching shader function (`vertex`, `fragment`, or `light`), and thus cannot be used to declare functions, varyings, uniforms, or global constants."] # [doc = ""] # [inline] pub fn set_expression (& self , expression : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeExpressionMethodTable :: get (get_api ()) . set_expression ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , expression . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeExpression { } unsafe impl GodotObject for VisualShaderNodeExpression { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeExpression" } } impl std :: ops :: Deref for VisualShaderNodeExpression { type Target = crate :: generated :: VisualShaderNodeGroupBase ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNodeGroupBase { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeExpression { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNodeGroupBase { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNodeGroupBase > for VisualShaderNodeExpression { } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeExpression { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeExpression { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeExpression { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeExpression { } impl Instanciable for VisualShaderNodeExpression { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeExpression :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeExpressionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_expression : * mut sys :: godot_method_bind , pub set_expression : * mut sys :: godot_method_bind } impl VisualShaderNodeExpressionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeExpressionMethodTable = VisualShaderNodeExpressionMethodTable { class_constructor : None , get_expression : 0 as * mut sys :: godot_method_bind , set_expression : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeExpressionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeExpression\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_expression = (gd_api . godot_method_bind_get_method) (class_name , "get_expression\0" . as_ptr () as * const c_char) ; table . set_expression = (gd_api . godot_method_bind_get_method) (class_name , "set_expression\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_expression::private::VisualShaderNodeExpression;
            
            pub(crate) mod visual_shader_node_face_forward {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeFaceForward`][super::VisualShaderNodeFaceForward]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeFaceForward` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodefaceforward.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeFaceForward inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeFaceForward { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeFaceForward ; impl VisualShaderNodeFaceForward { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeFaceForwardMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeFaceForward { } unsafe impl GodotObject for VisualShaderNodeFaceForward { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeFaceForward" } } impl std :: ops :: Deref for VisualShaderNodeFaceForward { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeFaceForward { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeFaceForward { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeFaceForward { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeFaceForward { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeFaceForward { } impl Instanciable for VisualShaderNodeFaceForward { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeFaceForward :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeFaceForwardMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeFaceForwardMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeFaceForwardMethodTable = VisualShaderNodeFaceForwardMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeFaceForwardMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeFaceForward\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_face_forward::private::VisualShaderNodeFaceForward;
            
            pub(crate) mod visual_shader_node_fresnel {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeFresnel`][super::VisualShaderNodeFresnel]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeFresnel` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodefresnel.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeFresnel inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeFresnel { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeFresnel ; impl VisualShaderNodeFresnel { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeFresnelMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeFresnel { } unsafe impl GodotObject for VisualShaderNodeFresnel { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeFresnel" } } impl std :: ops :: Deref for VisualShaderNodeFresnel { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeFresnel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeFresnel { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeFresnel { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeFresnel { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeFresnel { } impl Instanciable for VisualShaderNodeFresnel { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeFresnel :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeFresnelMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeFresnelMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeFresnelMethodTable = VisualShaderNodeFresnelMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeFresnelMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeFresnel\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_fresnel::private::VisualShaderNodeFresnel;
            
            pub(crate) mod visual_shader_node_global_expression {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeGlobalExpression`][super::VisualShaderNodeGlobalExpression]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeGlobalExpression` inherits `VisualShaderNodeExpression` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodeglobalexpression.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeGlobalExpression inherits methods from:\n - [VisualShaderNodeExpression](struct.VisualShaderNodeExpression.html)\n - [VisualShaderNodeGroupBase](struct.VisualShaderNodeGroupBase.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeGlobalExpression { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeGlobalExpression ; impl VisualShaderNodeGlobalExpression { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeGlobalExpressionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeGlobalExpression { } unsafe impl GodotObject for VisualShaderNodeGlobalExpression { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeGlobalExpression" } } impl std :: ops :: Deref for VisualShaderNodeGlobalExpression { type Target = crate :: generated :: VisualShaderNodeExpression ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNodeExpression { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeGlobalExpression { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNodeExpression { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNodeExpression > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: VisualShaderNodeGroupBase > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeGlobalExpression { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeGlobalExpression { } impl Instanciable for VisualShaderNodeGlobalExpression { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeGlobalExpression :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeGlobalExpressionMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeGlobalExpressionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeGlobalExpressionMethodTable = VisualShaderNodeGlobalExpressionMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeGlobalExpressionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeGlobalExpression\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_global_expression::private::VisualShaderNodeGlobalExpression;
            
            pub(crate) mod visual_shader_node_group_base {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeGroupBase`][super::VisualShaderNodeGroupBase]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeGroupBase` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodegroupbase.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeGroupBase inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeGroupBase { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeGroupBase ; impl VisualShaderNodeGroupBase { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeGroupBaseMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Adds an input port with the specified `type` (see [enum VisualShaderNode.PortType]) and `name`."] # [doc = ""] # [inline] pub fn add_input_port (& self , id : i64 , type_ : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . add_input_port ; let ret = crate :: icalls :: icallvar__i64_i64_str (method_bind , self . this . sys () . as_ptr () , id as _ , type_ as _ , name . into ()) ; } } # [doc = "Adds an output port with the specified `type` (see [enum VisualShaderNode.PortType]) and `name`."] # [doc = ""] # [inline] pub fn add_output_port (& self , id : i64 , type_ : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . add_output_port ; let ret = crate :: icalls :: icallvar__i64_i64_str (method_bind , self . this . sys () . as_ptr () , id as _ , type_ as _ , name . into ()) ; } } # [doc = "Removes all previously specified input ports."] # [doc = ""] # [inline] pub fn clear_input_ports (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . clear_input_ports ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Removes all previously specified output ports."] # [doc = ""] # [inline] pub fn clear_output_ports (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . clear_output_ports ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns a free input port ID which can be used in [`add_input_port`][Self::add_input_port]."] # [doc = ""] # [inline] pub fn get_free_input_port_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . get_free_input_port_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a free output port ID which can be used in [`add_output_port`][Self::add_output_port]."] # [doc = ""] # [inline] pub fn get_free_output_port_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . get_free_output_port_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of input ports in use. Alternative for [`get_free_input_port_id`][Self::get_free_input_port_id]."] # [doc = ""] # [inline] pub fn get_input_port_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . get_input_port_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a [`String`][GodotString] description of the input ports as a colon-separated list using the format `id,type,name;` (see [`add_input_port`][Self::add_input_port])."] # [doc = ""] # [inline] pub fn get_inputs (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . get_inputs ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of output ports in use. Alternative for [`get_free_output_port_id`][Self::get_free_output_port_id]."] # [doc = ""] # [inline] pub fn get_output_port_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . get_output_port_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a [`String`][GodotString] description of the output ports as a colon-separated list using the format `id,type,name;` (see [`add_output_port`][Self::add_output_port])."] # [doc = ""] # [inline] pub fn get_outputs (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . get_outputs ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The size of the node in the visual shader graph."] # [doc = ""] # [inline] pub fn size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . get_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the specified input port exists."] # [doc = ""] # [inline] pub fn has_input_port (& self , id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . has_input_port ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the specified output port exists."] # [doc = ""] # [inline] pub fn has_output_port (& self , id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . has_output_port ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the specified port name does not override an existed port name and is valid within the shader."] # [doc = ""] # [inline] pub fn is_valid_port_name (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . is_valid_port_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Removes the specified input port."] # [doc = ""] # [inline] pub fn remove_input_port (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . remove_input_port ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; } } # [doc = "Removes the specified output port."] # [doc = ""] # [inline] pub fn remove_output_port (& self , id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . remove_output_port ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; } } # [doc = "Renames the specified input port."] # [doc = ""] # [inline] pub fn set_input_port_name (& self , id : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . set_input_port_name ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , id as _ , name . into ()) ; } } # [doc = "Sets the specified input port's type (see [enum VisualShaderNode.PortType])."] # [doc = ""] # [inline] pub fn set_input_port_type (& self , id : i64 , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . set_input_port_type ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , id as _ , type_ as _) ; } } # [doc = "Defines all input ports using a [`String`][GodotString] formatted as a colon-separated list: `id,type,name;` (see [`add_input_port`][Self::add_input_port])."] # [doc = ""] # [inline] pub fn set_inputs (& self , inputs : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . set_inputs ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , inputs . into ()) ; } } # [doc = "Renames the specified output port."] # [doc = ""] # [inline] pub fn set_output_port_name (& self , id : i64 , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . set_output_port_name ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , id as _ , name . into ()) ; } } # [doc = "Sets the specified output port's type (see [enum VisualShaderNode.PortType])."] # [doc = ""] # [inline] pub fn set_output_port_type (& self , id : i64 , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . set_output_port_type ; let ret = crate :: icalls :: icallvar__i64_i64 (method_bind , self . this . sys () . as_ptr () , id as _ , type_ as _) ; } } # [doc = "Defines all output ports using a [`String`][GodotString] formatted as a colon-separated list: `id,type,name;` (see [`add_output_port`][Self::add_output_port])."] # [doc = ""] # [inline] pub fn set_outputs (& self , outputs : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . set_outputs ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , outputs . into ()) ; } } # [doc = "The size of the node in the visual shader graph."] # [doc = ""] # [inline] pub fn set_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeGroupBaseMethodTable :: get (get_api ()) . set_size ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeGroupBase { } unsafe impl GodotObject for VisualShaderNodeGroupBase { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeGroupBase" } } impl std :: ops :: Deref for VisualShaderNodeGroupBase { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeGroupBase { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeGroupBase { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeGroupBase { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeGroupBase { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeGroupBase { } impl Instanciable for VisualShaderNodeGroupBase { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeGroupBase :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeGroupBaseMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_input_port : * mut sys :: godot_method_bind , pub add_output_port : * mut sys :: godot_method_bind , pub clear_input_ports : * mut sys :: godot_method_bind , pub clear_output_ports : * mut sys :: godot_method_bind , pub get_free_input_port_id : * mut sys :: godot_method_bind , pub get_free_output_port_id : * mut sys :: godot_method_bind , pub get_input_port_count : * mut sys :: godot_method_bind , pub get_inputs : * mut sys :: godot_method_bind , pub get_output_port_count : * mut sys :: godot_method_bind , pub get_outputs : * mut sys :: godot_method_bind , pub get_size : * mut sys :: godot_method_bind , pub has_input_port : * mut sys :: godot_method_bind , pub has_output_port : * mut sys :: godot_method_bind , pub is_valid_port_name : * mut sys :: godot_method_bind , pub remove_input_port : * mut sys :: godot_method_bind , pub remove_output_port : * mut sys :: godot_method_bind , pub set_input_port_name : * mut sys :: godot_method_bind , pub set_input_port_type : * mut sys :: godot_method_bind , pub set_inputs : * mut sys :: godot_method_bind , pub set_output_port_name : * mut sys :: godot_method_bind , pub set_output_port_type : * mut sys :: godot_method_bind , pub set_outputs : * mut sys :: godot_method_bind , pub set_size : * mut sys :: godot_method_bind } impl VisualShaderNodeGroupBaseMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeGroupBaseMethodTable = VisualShaderNodeGroupBaseMethodTable { class_constructor : None , add_input_port : 0 as * mut sys :: godot_method_bind , add_output_port : 0 as * mut sys :: godot_method_bind , clear_input_ports : 0 as * mut sys :: godot_method_bind , clear_output_ports : 0 as * mut sys :: godot_method_bind , get_free_input_port_id : 0 as * mut sys :: godot_method_bind , get_free_output_port_id : 0 as * mut sys :: godot_method_bind , get_input_port_count : 0 as * mut sys :: godot_method_bind , get_inputs : 0 as * mut sys :: godot_method_bind , get_output_port_count : 0 as * mut sys :: godot_method_bind , get_outputs : 0 as * mut sys :: godot_method_bind , get_size : 0 as * mut sys :: godot_method_bind , has_input_port : 0 as * mut sys :: godot_method_bind , has_output_port : 0 as * mut sys :: godot_method_bind , is_valid_port_name : 0 as * mut sys :: godot_method_bind , remove_input_port : 0 as * mut sys :: godot_method_bind , remove_output_port : 0 as * mut sys :: godot_method_bind , set_input_port_name : 0 as * mut sys :: godot_method_bind , set_input_port_type : 0 as * mut sys :: godot_method_bind , set_inputs : 0 as * mut sys :: godot_method_bind , set_output_port_name : 0 as * mut sys :: godot_method_bind , set_output_port_type : 0 as * mut sys :: godot_method_bind , set_outputs : 0 as * mut sys :: godot_method_bind , set_size : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeGroupBaseMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeGroupBase\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_input_port = (gd_api . godot_method_bind_get_method) (class_name , "add_input_port\0" . as_ptr () as * const c_char) ; table . add_output_port = (gd_api . godot_method_bind_get_method) (class_name , "add_output_port\0" . as_ptr () as * const c_char) ; table . clear_input_ports = (gd_api . godot_method_bind_get_method) (class_name , "clear_input_ports\0" . as_ptr () as * const c_char) ; table . clear_output_ports = (gd_api . godot_method_bind_get_method) (class_name , "clear_output_ports\0" . as_ptr () as * const c_char) ; table . get_free_input_port_id = (gd_api . godot_method_bind_get_method) (class_name , "get_free_input_port_id\0" . as_ptr () as * const c_char) ; table . get_free_output_port_id = (gd_api . godot_method_bind_get_method) (class_name , "get_free_output_port_id\0" . as_ptr () as * const c_char) ; table . get_input_port_count = (gd_api . godot_method_bind_get_method) (class_name , "get_input_port_count\0" . as_ptr () as * const c_char) ; table . get_inputs = (gd_api . godot_method_bind_get_method) (class_name , "get_inputs\0" . as_ptr () as * const c_char) ; table . get_output_port_count = (gd_api . godot_method_bind_get_method) (class_name , "get_output_port_count\0" . as_ptr () as * const c_char) ; table . get_outputs = (gd_api . godot_method_bind_get_method) (class_name , "get_outputs\0" . as_ptr () as * const c_char) ; table . get_size = (gd_api . godot_method_bind_get_method) (class_name , "get_size\0" . as_ptr () as * const c_char) ; table . has_input_port = (gd_api . godot_method_bind_get_method) (class_name , "has_input_port\0" . as_ptr () as * const c_char) ; table . has_output_port = (gd_api . godot_method_bind_get_method) (class_name , "has_output_port\0" . as_ptr () as * const c_char) ; table . is_valid_port_name = (gd_api . godot_method_bind_get_method) (class_name , "is_valid_port_name\0" . as_ptr () as * const c_char) ; table . remove_input_port = (gd_api . godot_method_bind_get_method) (class_name , "remove_input_port\0" . as_ptr () as * const c_char) ; table . remove_output_port = (gd_api . godot_method_bind_get_method) (class_name , "remove_output_port\0" . as_ptr () as * const c_char) ; table . set_input_port_name = (gd_api . godot_method_bind_get_method) (class_name , "set_input_port_name\0" . as_ptr () as * const c_char) ; table . set_input_port_type = (gd_api . godot_method_bind_get_method) (class_name , "set_input_port_type\0" . as_ptr () as * const c_char) ; table . set_inputs = (gd_api . godot_method_bind_get_method) (class_name , "set_inputs\0" . as_ptr () as * const c_char) ; table . set_output_port_name = (gd_api . godot_method_bind_get_method) (class_name , "set_output_port_name\0" . as_ptr () as * const c_char) ; table . set_output_port_type = (gd_api . godot_method_bind_get_method) (class_name , "set_output_port_type\0" . as_ptr () as * const c_char) ; table . set_outputs = (gd_api . godot_method_bind_get_method) (class_name , "set_outputs\0" . as_ptr () as * const c_char) ; table . set_size = (gd_api . godot_method_bind_get_method) (class_name , "set_size\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_group_base::private::VisualShaderNodeGroupBase;
            
            pub(crate) mod visual_shader_node_if {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeIf`][super::VisualShaderNodeIf]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeIf` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodeif.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeIf inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeIf { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeIf ; impl VisualShaderNodeIf { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeIfMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeIf { } unsafe impl GodotObject for VisualShaderNodeIf { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeIf" } } impl std :: ops :: Deref for VisualShaderNodeIf { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeIf { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeIf { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeIf { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeIf { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeIf { } impl Instanciable for VisualShaderNodeIf { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeIf :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeIfMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeIfMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeIfMethodTable = VisualShaderNodeIfMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeIfMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeIf\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_if::private::VisualShaderNodeIf;
            
            pub(crate) mod visual_shader_node_input {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeInput`][super::VisualShaderNodeInput]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeInput` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodeinput.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeInput inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeInput { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeInput ; impl VisualShaderNodeInput { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeInputMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "One of the several input constants in lower-case style like: \"vertex\"(`VERTEX`) or \"point_size\"(`POINT_SIZE`)."] # [doc = ""] # [inline] pub fn input_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeInputMethodTable :: get (get_api ()) . get_input_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_input_real_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeInputMethodTable :: get (get_api ()) . get_input_real_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "One of the several input constants in lower-case style like: \"vertex\"(`VERTEX`) or \"point_size\"(`POINT_SIZE`)."] # [doc = ""] # [inline] pub fn set_input_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeInputMethodTable :: get (get_api ()) . set_input_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeInput { } unsafe impl GodotObject for VisualShaderNodeInput { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeInput" } } impl std :: ops :: Deref for VisualShaderNodeInput { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeInput { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeInput { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeInput { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeInput { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeInput { } impl Instanciable for VisualShaderNodeInput { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeInput :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeInputMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_input_name : * mut sys :: godot_method_bind , pub get_input_real_name : * mut sys :: godot_method_bind , pub set_input_name : * mut sys :: godot_method_bind } impl VisualShaderNodeInputMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeInputMethodTable = VisualShaderNodeInputMethodTable { class_constructor : None , get_input_name : 0 as * mut sys :: godot_method_bind , get_input_real_name : 0 as * mut sys :: godot_method_bind , set_input_name : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeInputMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeInput\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_input_name = (gd_api . godot_method_bind_get_method) (class_name , "get_input_name\0" . as_ptr () as * const c_char) ; table . get_input_real_name = (gd_api . godot_method_bind_get_method) (class_name , "get_input_real_name\0" . as_ptr () as * const c_char) ; table . set_input_name = (gd_api . godot_method_bind_get_method) (class_name , "set_input_name\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_input::private::VisualShaderNodeInput;
            
            pub mod visual_shader_node_is {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeIs`][super::VisualShaderNodeIs]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeIs` inherits `VisualShaderNode` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_is`][super::visual_shader_node_is] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodeis.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeIs inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeIs { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeIs ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Function (pub i64) ; impl Function { pub const INF : Function = Function (0i64) ; pub const NAN : Function = Function (1i64) ; } impl From < i64 > for Function { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Function > for i64 { # [inline] fn from (v : Function) -> Self { v . 0 } } impl FromVariant for Function { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeIs { pub const FUNC_IS_INF : i64 = 0i64 ; pub const FUNC_IS_NAN : i64 = 1i64 ; } impl VisualShaderNodeIs { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeIsMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The comparison function. See [`Function`][Function] for options."] # [doc = ""] # [inline] pub fn function (& self) -> crate :: generated :: visual_shader_node_is :: Function { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeIsMethodTable :: get (get_api ()) . get_function ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_is :: Function > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The comparison function. See [`Function`][Function] for options."] # [doc = ""] # [inline] pub fn set_function (& self , func : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeIsMethodTable :: get (get_api ()) . set_function ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , func as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeIs { } unsafe impl GodotObject for VisualShaderNodeIs { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeIs" } } impl std :: ops :: Deref for VisualShaderNodeIs { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeIs { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeIs { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeIs { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeIs { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeIs { } impl Instanciable for VisualShaderNodeIs { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeIs :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeIsMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_function : * mut sys :: godot_method_bind , pub set_function : * mut sys :: godot_method_bind } impl VisualShaderNodeIsMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeIsMethodTable = VisualShaderNodeIsMethodTable { class_constructor : None , get_function : 0 as * mut sys :: godot_method_bind , set_function : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeIsMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeIs\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_is::private::VisualShaderNodeIs;
            
            pub(crate) mod visual_shader_node_outer_product {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeOuterProduct`][super::VisualShaderNodeOuterProduct]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeOuterProduct` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodeouterproduct.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeOuterProduct inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeOuterProduct { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeOuterProduct ; impl VisualShaderNodeOuterProduct { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeOuterProductMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeOuterProduct { } unsafe impl GodotObject for VisualShaderNodeOuterProduct { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeOuterProduct" } } impl std :: ops :: Deref for VisualShaderNodeOuterProduct { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeOuterProduct { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeOuterProduct { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeOuterProduct { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeOuterProduct { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeOuterProduct { } impl Instanciable for VisualShaderNodeOuterProduct { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeOuterProduct :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeOuterProductMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeOuterProductMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeOuterProductMethodTable = VisualShaderNodeOuterProductMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeOuterProductMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeOuterProduct\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_outer_product::private::VisualShaderNodeOuterProduct;
            
            pub(crate) mod visual_shader_node_output {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeOutput`][super::VisualShaderNodeOutput]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeOutput` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodeoutput.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeOutput inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeOutput { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeOutput ; impl VisualShaderNodeOutput { } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeOutput { } unsafe impl GodotObject for VisualShaderNodeOutput { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeOutput" } } impl std :: ops :: Deref for VisualShaderNodeOutput { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeOutput { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeOutput { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeOutput { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeOutput { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeOutput { }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_output::private::VisualShaderNodeOutput;
            
            pub(crate) mod visual_shader_node_scalar_clamp {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeScalarClamp`][super::VisualShaderNodeScalarClamp]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeScalarClamp` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodescalarclamp.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarClamp inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarClamp { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeScalarClamp ; impl VisualShaderNodeScalarClamp { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarClampMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarClamp { } unsafe impl GodotObject for VisualShaderNodeScalarClamp { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarClamp" } } impl std :: ops :: Deref for VisualShaderNodeScalarClamp { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarClamp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeScalarClamp { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeScalarClamp { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeScalarClamp { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeScalarClamp { } impl Instanciable for VisualShaderNodeScalarClamp { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeScalarClamp :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarClampMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeScalarClampMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarClampMethodTable = VisualShaderNodeScalarClampMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeScalarClampMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarClamp\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_scalar_clamp::private::VisualShaderNodeScalarClamp;
            
            pub(crate) mod visual_shader_node_scalar_constant {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeScalarConstant`][super::VisualShaderNodeScalarConstant]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeScalarConstant` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodescalarconstant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarConstant inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarConstant { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeScalarConstant ; impl VisualShaderNodeScalarConstant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarConstantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn constant (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarConstantMethodTable :: get (get_api ()) . get_constant ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_constant (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarConstantMethodTable :: get (get_api ()) . set_constant ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarConstant { } unsafe impl GodotObject for VisualShaderNodeScalarConstant { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarConstant" } } impl std :: ops :: Deref for VisualShaderNodeScalarConstant { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeScalarConstant { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeScalarConstant { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeScalarConstant { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeScalarConstant { } impl Instanciable for VisualShaderNodeScalarConstant { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeScalarConstant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarConstantMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_constant : * mut sys :: godot_method_bind , pub set_constant : * mut sys :: godot_method_bind } impl VisualShaderNodeScalarConstantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarConstantMethodTable = VisualShaderNodeScalarConstantMethodTable { class_constructor : None , get_constant : 0 as * mut sys :: godot_method_bind , set_constant : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeScalarConstantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarConstant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_constant\0" . as_ptr () as * const c_char) ; table . set_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_constant\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_scalar_constant::private::VisualShaderNodeScalarConstant;
            
            pub mod visual_shader_node_scalar_derivative_func {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeScalarDerivativeFunc`][super::VisualShaderNodeScalarDerivativeFunc]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeScalarDerivativeFunc` inherits `VisualShaderNode` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_scalar_derivative_func`][super::visual_shader_node_scalar_derivative_func] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodescalarderivativefunc.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarDerivativeFunc inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarDerivativeFunc { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeScalarDerivativeFunc ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Function (pub i64) ; impl Function { pub const SUM : Function = Function (0i64) ; pub const X : Function = Function (1i64) ; pub const Y : Function = Function (2i64) ; } impl From < i64 > for Function { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Function > for i64 { # [inline] fn from (v : Function) -> Self { v . 0 } } impl FromVariant for Function { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeScalarDerivativeFunc { pub const FUNC_SUM : i64 = 0i64 ; pub const FUNC_X : i64 = 1i64 ; pub const FUNC_Y : i64 = 2i64 ; } impl VisualShaderNodeScalarDerivativeFunc { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarDerivativeFuncMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The derivative type. See [`Function`][Function] for options."] # [doc = ""] # [inline] pub fn function (& self) -> crate :: generated :: visual_shader_node_scalar_derivative_func :: Function { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarDerivativeFuncMethodTable :: get (get_api ()) . get_function ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_scalar_derivative_func :: Function > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The derivative type. See [`Function`][Function] for options."] # [doc = ""] # [inline] pub fn set_function (& self , func : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarDerivativeFuncMethodTable :: get (get_api ()) . set_function ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , func as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarDerivativeFunc { } unsafe impl GodotObject for VisualShaderNodeScalarDerivativeFunc { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarDerivativeFunc" } } impl std :: ops :: Deref for VisualShaderNodeScalarDerivativeFunc { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarDerivativeFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeScalarDerivativeFunc { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeScalarDerivativeFunc { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeScalarDerivativeFunc { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeScalarDerivativeFunc { } impl Instanciable for VisualShaderNodeScalarDerivativeFunc { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeScalarDerivativeFunc :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarDerivativeFuncMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_function : * mut sys :: godot_method_bind , pub set_function : * mut sys :: godot_method_bind } impl VisualShaderNodeScalarDerivativeFuncMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarDerivativeFuncMethodTable = VisualShaderNodeScalarDerivativeFuncMethodTable { class_constructor : None , get_function : 0 as * mut sys :: godot_method_bind , set_function : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeScalarDerivativeFuncMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarDerivativeFunc\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_scalar_derivative_func::private::VisualShaderNodeScalarDerivativeFunc;
            
            pub mod visual_shader_node_scalar_func {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeScalarFunc`][super::VisualShaderNodeScalarFunc]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeScalarFunc` inherits `VisualShaderNode` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_scalar_func`][super::visual_shader_node_scalar_func] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodescalarfunc.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarFunc inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarFunc { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeScalarFunc ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Function (pub i64) ; impl Function { pub const SIN : Function = Function (0i64) ; pub const COS : Function = Function (1i64) ; pub const TAN : Function = Function (2i64) ; pub const ASIN : Function = Function (3i64) ; pub const ACOS : Function = Function (4i64) ; pub const ATAN : Function = Function (5i64) ; pub const SINH : Function = Function (6i64) ; pub const COSH : Function = Function (7i64) ; pub const TANH : Function = Function (8i64) ; pub const LOG : Function = Function (9i64) ; pub const EXP : Function = Function (10i64) ; pub const SQRT : Function = Function (11i64) ; pub const ABS : Function = Function (12i64) ; pub const SIGN : Function = Function (13i64) ; pub const FLOOR : Function = Function (14i64) ; pub const ROUND : Function = Function (15i64) ; pub const CEIL : Function = Function (16i64) ; pub const FRAC : Function = Function (17i64) ; pub const SATURATE : Function = Function (18i64) ; pub const NEGATE : Function = Function (19i64) ; pub const ACOSH : Function = Function (20i64) ; pub const ASINH : Function = Function (21i64) ; pub const ATANH : Function = Function (22i64) ; pub const DEGREES : Function = Function (23i64) ; pub const EXP2 : Function = Function (24i64) ; pub const INVERSE_SQRT : Function = Function (25i64) ; pub const LOG2 : Function = Function (26i64) ; pub const RADIANS : Function = Function (27i64) ; pub const RECIPROCAL : Function = Function (28i64) ; pub const ROUNDEVEN : Function = Function (29i64) ; pub const TRUNC : Function = Function (30i64) ; pub const ONEMINUS : Function = Function (31i64) ; } impl From < i64 > for Function { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Function > for i64 { # [inline] fn from (v : Function) -> Self { v . 0 } } impl FromVariant for Function { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeScalarFunc { pub const FUNC_SIN : i64 = 0i64 ; pub const FUNC_COS : i64 = 1i64 ; pub const FUNC_TAN : i64 = 2i64 ; pub const FUNC_ASIN : i64 = 3i64 ; pub const FUNC_ACOS : i64 = 4i64 ; pub const FUNC_ATAN : i64 = 5i64 ; pub const FUNC_SINH : i64 = 6i64 ; pub const FUNC_COSH : i64 = 7i64 ; pub const FUNC_TANH : i64 = 8i64 ; pub const FUNC_LOG : i64 = 9i64 ; pub const FUNC_EXP : i64 = 10i64 ; pub const FUNC_SQRT : i64 = 11i64 ; pub const FUNC_ABS : i64 = 12i64 ; pub const FUNC_SIGN : i64 = 13i64 ; pub const FUNC_FLOOR : i64 = 14i64 ; pub const FUNC_ROUND : i64 = 15i64 ; pub const FUNC_CEIL : i64 = 16i64 ; pub const FUNC_FRAC : i64 = 17i64 ; pub const FUNC_SATURATE : i64 = 18i64 ; pub const FUNC_NEGATE : i64 = 19i64 ; pub const FUNC_ACOSH : i64 = 20i64 ; pub const FUNC_ASINH : i64 = 21i64 ; pub const FUNC_ATANH : i64 = 22i64 ; pub const FUNC_DEGREES : i64 = 23i64 ; pub const FUNC_EXP2 : i64 = 24i64 ; pub const FUNC_INVERSE_SQRT : i64 = 25i64 ; pub const FUNC_LOG2 : i64 = 26i64 ; pub const FUNC_RADIANS : i64 = 27i64 ; pub const FUNC_RECIPROCAL : i64 = 28i64 ; pub const FUNC_ROUNDEVEN : i64 = 29i64 ; pub const FUNC_TRUNC : i64 = 30i64 ; pub const FUNC_ONEMINUS : i64 = 31i64 ; } impl VisualShaderNodeScalarFunc { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarFuncMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn function (& self) -> crate :: generated :: visual_shader_node_scalar_func :: Function { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarFuncMethodTable :: get (get_api ()) . get_function ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_scalar_func :: Function > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_function (& self , func : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarFuncMethodTable :: get (get_api ()) . set_function ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , func as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarFunc { } unsafe impl GodotObject for VisualShaderNodeScalarFunc { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarFunc" } } impl std :: ops :: Deref for VisualShaderNodeScalarFunc { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeScalarFunc { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeScalarFunc { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeScalarFunc { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeScalarFunc { } impl Instanciable for VisualShaderNodeScalarFunc { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeScalarFunc :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarFuncMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_function : * mut sys :: godot_method_bind , pub set_function : * mut sys :: godot_method_bind } impl VisualShaderNodeScalarFuncMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarFuncMethodTable = VisualShaderNodeScalarFuncMethodTable { class_constructor : None , get_function : 0 as * mut sys :: godot_method_bind , set_function : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeScalarFuncMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarFunc\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_scalar_func::private::VisualShaderNodeScalarFunc;
            
            pub(crate) mod visual_shader_node_scalar_interp {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeScalarInterp`][super::VisualShaderNodeScalarInterp]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeScalarInterp` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodescalarinterp.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarInterp inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarInterp { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeScalarInterp ; impl VisualShaderNodeScalarInterp { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarInterpMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarInterp { } unsafe impl GodotObject for VisualShaderNodeScalarInterp { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarInterp" } } impl std :: ops :: Deref for VisualShaderNodeScalarInterp { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarInterp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeScalarInterp { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeScalarInterp { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeScalarInterp { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeScalarInterp { } impl Instanciable for VisualShaderNodeScalarInterp { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeScalarInterp :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarInterpMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeScalarInterpMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarInterpMethodTable = VisualShaderNodeScalarInterpMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeScalarInterpMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarInterp\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_scalar_interp::private::VisualShaderNodeScalarInterp;
            
            pub mod visual_shader_node_scalar_op {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeScalarOp`][super::VisualShaderNodeScalarOp]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeScalarOp` inherits `VisualShaderNode` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_scalar_op`][super::visual_shader_node_scalar_op] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodescalarop.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarOp inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarOp { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeScalarOp ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Operator (pub i64) ; impl Operator { pub const ADD : Operator = Operator (0i64) ; pub const SUB : Operator = Operator (1i64) ; pub const MUL : Operator = Operator (2i64) ; pub const DIV : Operator = Operator (3i64) ; pub const MOD : Operator = Operator (4i64) ; pub const POW : Operator = Operator (5i64) ; pub const MAX : Operator = Operator (6i64) ; pub const MIN : Operator = Operator (7i64) ; pub const ATAN2 : Operator = Operator (8i64) ; pub const STEP : Operator = Operator (9i64) ; } impl From < i64 > for Operator { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Operator > for i64 { # [inline] fn from (v : Operator) -> Self { v . 0 } } impl FromVariant for Operator { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeScalarOp { pub const OP_ADD : i64 = 0i64 ; pub const OP_SUB : i64 = 1i64 ; pub const OP_MUL : i64 = 2i64 ; pub const OP_DIV : i64 = 3i64 ; pub const OP_MOD : i64 = 4i64 ; pub const OP_POW : i64 = 5i64 ; pub const OP_MAX : i64 = 6i64 ; pub const OP_MIN : i64 = 7i64 ; pub const OP_ATAN2 : i64 = 8i64 ; pub const OP_STEP : i64 = 9i64 ; } impl VisualShaderNodeScalarOp { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarOpMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn operator (& self) -> crate :: generated :: visual_shader_node_scalar_op :: Operator { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarOpMethodTable :: get (get_api ()) . get_operator ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_scalar_op :: Operator > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_operator (& self , op : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarOpMethodTable :: get (get_api ()) . set_operator ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , op as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarOp { } unsafe impl GodotObject for VisualShaderNodeScalarOp { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarOp" } } impl std :: ops :: Deref for VisualShaderNodeScalarOp { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarOp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeScalarOp { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeScalarOp { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeScalarOp { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeScalarOp { } impl Instanciable for VisualShaderNodeScalarOp { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeScalarOp :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarOpMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_operator : * mut sys :: godot_method_bind , pub set_operator : * mut sys :: godot_method_bind } impl VisualShaderNodeScalarOpMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarOpMethodTable = VisualShaderNodeScalarOpMethodTable { class_constructor : None , get_operator : 0 as * mut sys :: godot_method_bind , set_operator : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeScalarOpMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarOp\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_operator\0" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_scalar_op::private::VisualShaderNodeScalarOp;
            
            pub(crate) mod visual_shader_node_scalar_smooth_step {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeScalarSmoothStep`][super::VisualShaderNodeScalarSmoothStep]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeScalarSmoothStep` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodescalarsmoothstep.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarSmoothStep inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarSmoothStep { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeScalarSmoothStep ; impl VisualShaderNodeScalarSmoothStep { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarSmoothStepMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarSmoothStep { } unsafe impl GodotObject for VisualShaderNodeScalarSmoothStep { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarSmoothStep" } } impl std :: ops :: Deref for VisualShaderNodeScalarSmoothStep { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarSmoothStep { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeScalarSmoothStep { } impl Instanciable for VisualShaderNodeScalarSmoothStep { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeScalarSmoothStep :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarSmoothStepMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeScalarSmoothStepMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarSmoothStepMethodTable = VisualShaderNodeScalarSmoothStepMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeScalarSmoothStepMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarSmoothStep\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_scalar_smooth_step::private::VisualShaderNodeScalarSmoothStep;
            
            pub(crate) mod visual_shader_node_scalar_switch {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeScalarSwitch`][super::VisualShaderNodeScalarSwitch]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeScalarSwitch` inherits `VisualShaderNodeSwitch` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodescalarswitch.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarSwitch inherits methods from:\n - [VisualShaderNodeSwitch](struct.VisualShaderNodeSwitch.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarSwitch { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeScalarSwitch ; impl VisualShaderNodeScalarSwitch { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarSwitchMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarSwitch { } unsafe impl GodotObject for VisualShaderNodeScalarSwitch { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarSwitch" } } impl std :: ops :: Deref for VisualShaderNodeScalarSwitch { type Target = crate :: generated :: VisualShaderNodeSwitch ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNodeSwitch { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarSwitch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNodeSwitch { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNodeSwitch > for VisualShaderNodeScalarSwitch { } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeScalarSwitch { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeScalarSwitch { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeScalarSwitch { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeScalarSwitch { } impl Instanciable for VisualShaderNodeScalarSwitch { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeScalarSwitch :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarSwitchMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeScalarSwitchMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarSwitchMethodTable = VisualShaderNodeScalarSwitchMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeScalarSwitchMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarSwitch\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_scalar_switch::private::VisualShaderNodeScalarSwitch;
            
            pub mod visual_shader_node_scalar_uniform {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeScalarUniform`][super::VisualShaderNodeScalarUniform]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeScalarUniform` inherits `VisualShaderNodeUniform` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_scalar_uniform`][super::visual_shader_node_scalar_uniform] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodescalaruniform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeScalarUniform inherits methods from:\n - [VisualShaderNodeUniform](struct.VisualShaderNodeUniform.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeScalarUniform { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeScalarUniform ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Hint (pub i64) ; impl Hint { pub const NONE : Hint = Hint (0i64) ; pub const RANGE : Hint = Hint (1i64) ; pub const RANGE_STEP : Hint = Hint (2i64) ; pub const MAX : Hint = Hint (3i64) ; } impl From < i64 > for Hint { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Hint > for i64 { # [inline] fn from (v : Hint) -> Self { v . 0 } } impl FromVariant for Hint { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeScalarUniform { pub const HINT_NONE : i64 = 0i64 ; pub const HINT_RANGE : i64 = 1i64 ; pub const HINT_RANGE_STEP : i64 = 2i64 ; pub const HINT_MAX : i64 = 3i64 ; } impl VisualShaderNodeScalarUniform { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeScalarUniformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A default value to be assigned within the shader."] # [doc = ""] # [inline] pub fn default_value (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarUniformMethodTable :: get (get_api ()) . get_default_value ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "A hint applied to the uniform, which controls the values it can take when set through the inspector."] # [doc = ""] # [inline] pub fn hint (& self) -> crate :: generated :: visual_shader_node_scalar_uniform :: Hint { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarUniformMethodTable :: get (get_api ()) . get_hint ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_scalar_uniform :: Hint > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Minimum value for range hints. Used if [`hint`][Self::hint] is set to [`HINT_RANGE`][Self::HINT_RANGE] or [`HINT_RANGE_STEP`][Self::HINT_RANGE_STEP]."] # [doc = ""] # [inline] pub fn max (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarUniformMethodTable :: get (get_api ()) . get_max ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Maximum value for range hints. Used if [`hint`][Self::hint] is set to [`HINT_RANGE`][Self::HINT_RANGE] or [`HINT_RANGE_STEP`][Self::HINT_RANGE_STEP]."] # [doc = ""] # [inline] pub fn min (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarUniformMethodTable :: get (get_api ()) . get_min ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Step (increment) value for the range hint with step. Used if [`hint`][Self::hint] is set to [`HINT_RANGE_STEP`][Self::HINT_RANGE_STEP]."] # [doc = ""] # [inline] pub fn step (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarUniformMethodTable :: get (get_api ()) . get_step ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Enables usage of the [`default_value`][Self::default_value]."] # [doc = ""] # [inline] pub fn is_default_value_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarUniformMethodTable :: get (get_api ()) . is_default_value_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "A default value to be assigned within the shader."] # [doc = ""] # [inline] pub fn set_default_value (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarUniformMethodTable :: get (get_api ()) . set_default_value ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Enables usage of the [`default_value`][Self::default_value]."] # [doc = ""] # [inline] pub fn set_default_value_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarUniformMethodTable :: get (get_api ()) . set_default_value_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "A hint applied to the uniform, which controls the values it can take when set through the inspector."] # [doc = ""] # [inline] pub fn set_hint (& self , hint : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarUniformMethodTable :: get (get_api ()) . set_hint ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , hint as _) ; } } # [doc = "Minimum value for range hints. Used if [`hint`][Self::hint] is set to [`HINT_RANGE`][Self::HINT_RANGE] or [`HINT_RANGE_STEP`][Self::HINT_RANGE_STEP]."] # [doc = ""] # [inline] pub fn set_max (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarUniformMethodTable :: get (get_api ()) . set_max ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Maximum value for range hints. Used if [`hint`][Self::hint] is set to [`HINT_RANGE`][Self::HINT_RANGE] or [`HINT_RANGE_STEP`][Self::HINT_RANGE_STEP]."] # [doc = ""] # [inline] pub fn set_min (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarUniformMethodTable :: get (get_api ()) . set_min ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Step (increment) value for the range hint with step. Used if [`hint`][Self::hint] is set to [`HINT_RANGE_STEP`][Self::HINT_RANGE_STEP]."] # [doc = ""] # [inline] pub fn set_step (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeScalarUniformMethodTable :: get (get_api ()) . set_step ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeScalarUniform { } unsafe impl GodotObject for VisualShaderNodeScalarUniform { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeScalarUniform" } } impl std :: ops :: Deref for VisualShaderNodeScalarUniform { type Target = crate :: generated :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeScalarUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNodeUniform > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeScalarUniform { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeScalarUniform { } impl Instanciable for VisualShaderNodeScalarUniform { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeScalarUniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeScalarUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_default_value : * mut sys :: godot_method_bind , pub get_hint : * mut sys :: godot_method_bind , pub get_max : * mut sys :: godot_method_bind , pub get_min : * mut sys :: godot_method_bind , pub get_step : * mut sys :: godot_method_bind , pub is_default_value_enabled : * mut sys :: godot_method_bind , pub set_default_value : * mut sys :: godot_method_bind , pub set_default_value_enabled : * mut sys :: godot_method_bind , pub set_hint : * mut sys :: godot_method_bind , pub set_max : * mut sys :: godot_method_bind , pub set_min : * mut sys :: godot_method_bind , pub set_step : * mut sys :: godot_method_bind } impl VisualShaderNodeScalarUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeScalarUniformMethodTable = VisualShaderNodeScalarUniformMethodTable { class_constructor : None , get_default_value : 0 as * mut sys :: godot_method_bind , get_hint : 0 as * mut sys :: godot_method_bind , get_max : 0 as * mut sys :: godot_method_bind , get_min : 0 as * mut sys :: godot_method_bind , get_step : 0 as * mut sys :: godot_method_bind , is_default_value_enabled : 0 as * mut sys :: godot_method_bind , set_default_value : 0 as * mut sys :: godot_method_bind , set_default_value_enabled : 0 as * mut sys :: godot_method_bind , set_hint : 0 as * mut sys :: godot_method_bind , set_max : 0 as * mut sys :: godot_method_bind , set_min : 0 as * mut sys :: godot_method_bind , set_step : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeScalarUniformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeScalarUniform\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_default_value = (gd_api . godot_method_bind_get_method) (class_name , "get_default_value\0" . as_ptr () as * const c_char) ; table . get_hint = (gd_api . godot_method_bind_get_method) (class_name , "get_hint\0" . as_ptr () as * const c_char) ; table . get_max = (gd_api . godot_method_bind_get_method) (class_name , "get_max\0" . as_ptr () as * const c_char) ; table . get_min = (gd_api . godot_method_bind_get_method) (class_name , "get_min\0" . as_ptr () as * const c_char) ; table . get_step = (gd_api . godot_method_bind_get_method) (class_name , "get_step\0" . as_ptr () as * const c_char) ; table . is_default_value_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_default_value_enabled\0" . as_ptr () as * const c_char) ; table . set_default_value = (gd_api . godot_method_bind_get_method) (class_name , "set_default_value\0" . as_ptr () as * const c_char) ; table . set_default_value_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_default_value_enabled\0" . as_ptr () as * const c_char) ; table . set_hint = (gd_api . godot_method_bind_get_method) (class_name , "set_hint\0" . as_ptr () as * const c_char) ; table . set_max = (gd_api . godot_method_bind_get_method) (class_name , "set_max\0" . as_ptr () as * const c_char) ; table . set_min = (gd_api . godot_method_bind_get_method) (class_name , "set_min\0" . as_ptr () as * const c_char) ; table . set_step = (gd_api . godot_method_bind_get_method) (class_name , "set_step\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_scalar_uniform::private::VisualShaderNodeScalarUniform;
            
            pub(crate) mod visual_shader_node_switch {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeSwitch`][super::VisualShaderNodeSwitch]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeSwitch` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodeswitch.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeSwitch inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeSwitch { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeSwitch ; impl VisualShaderNodeSwitch { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeSwitchMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeSwitch { } unsafe impl GodotObject for VisualShaderNodeSwitch { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeSwitch" } } impl std :: ops :: Deref for VisualShaderNodeSwitch { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeSwitch { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeSwitch { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeSwitch { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeSwitch { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeSwitch { } impl Instanciable for VisualShaderNodeSwitch { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeSwitch :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeSwitchMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeSwitchMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeSwitchMethodTable = VisualShaderNodeSwitchMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeSwitchMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeSwitch\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_switch::private::VisualShaderNodeSwitch;
            
            pub mod visual_shader_node_texture {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeTexture`][super::VisualShaderNodeTexture]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeTexture` inherits `VisualShaderNode` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_texture`][super::visual_shader_node_texture] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodetexture.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTexture inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTexture { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeTexture ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Source (pub i64) ; impl Source { pub const TEXTURE : Source = Source (0i64) ; pub const SCREEN : Source = Source (1i64) ; pub const _2D_TEXTURE : Source = Source (2i64) ; pub const _2D_NORMAL : Source = Source (3i64) ; pub const DEPTH : Source = Source (4i64) ; pub const PORT : Source = Source (5i64) ; } impl From < i64 > for Source { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Source > for i64 { # [inline] fn from (v : Source) -> Self { v . 0 } } impl FromVariant for Source { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TextureType (pub i64) ; impl TextureType { pub const DATA : TextureType = TextureType (0i64) ; pub const COLOR : TextureType = TextureType (1i64) ; pub const NORMALMAP : TextureType = TextureType (2i64) ; } impl From < i64 > for TextureType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TextureType > for i64 { # [inline] fn from (v : TextureType) -> Self { v . 0 } } impl FromVariant for TextureType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeTexture { pub const SOURCE_TEXTURE : i64 = 0i64 ; pub const TYPE_DATA : i64 = 0i64 ; pub const SOURCE_SCREEN : i64 = 1i64 ; pub const TYPE_COLOR : i64 = 1i64 ; pub const SOURCE_2D_TEXTURE : i64 = 2i64 ; pub const TYPE_NORMALMAP : i64 = 2i64 ; pub const SOURCE_2D_NORMAL : i64 = 3i64 ; pub const SOURCE_DEPTH : i64 = 4i64 ; pub const SOURCE_PORT : i64 = 5i64 ; } impl VisualShaderNodeTexture { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTextureMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Determines the source for the lookup. See [`Source`][Source] for options."] # [doc = ""] # [inline] pub fn source (& self) -> crate :: generated :: visual_shader_node_texture :: Source { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureMethodTable :: get (get_api ()) . get_source ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_texture :: Source > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The source texture, if needed for the selected [`source`][Self::source]."] # [doc = ""] # [inline] pub fn texture (& self) -> Option < Ref < crate :: generated :: Texture , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureMethodTable :: get (get_api ()) . get_texture ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Texture , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Specifies the type of the texture if [`source`][Self::source] is set to [`SOURCE_TEXTURE`][Self::SOURCE_TEXTURE]. See [`TextureType`][TextureType] for options."] # [doc = ""] # [inline] pub fn texture_type (& self) -> crate :: generated :: visual_shader_node_texture :: TextureType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureMethodTable :: get (get_api ()) . get_texture_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_texture :: TextureType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Determines the source for the lookup. See [`Source`][Source] for options."] # [doc = ""] # [inline] pub fn set_source (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureMethodTable :: get (get_api ()) . set_source ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "The source texture, if needed for the selected [`source`][Self::source]."] # [doc = ""] # [inline] pub fn set_texture (& self , value : impl AsArg < crate :: generated :: Texture >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureMethodTable :: get (get_api ()) . set_texture ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , value . as_arg_ptr ()) ; } } # [doc = "Specifies the type of the texture if [`source`][Self::source] is set to [`SOURCE_TEXTURE`][Self::SOURCE_TEXTURE]. See [`TextureType`][TextureType] for options."] # [doc = ""] # [inline] pub fn set_texture_type (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureMethodTable :: get (get_api ()) . set_texture_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTexture { } unsafe impl GodotObject for VisualShaderNodeTexture { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTexture" } } impl std :: ops :: Deref for VisualShaderNodeTexture { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTexture { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeTexture { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeTexture { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeTexture { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeTexture { } impl Instanciable for VisualShaderNodeTexture { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeTexture :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTextureMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_source : * mut sys :: godot_method_bind , pub get_texture : * mut sys :: godot_method_bind , pub get_texture_type : * mut sys :: godot_method_bind , pub set_source : * mut sys :: godot_method_bind , pub set_texture : * mut sys :: godot_method_bind , pub set_texture_type : * mut sys :: godot_method_bind } impl VisualShaderNodeTextureMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTextureMethodTable = VisualShaderNodeTextureMethodTable { class_constructor : None , get_source : 0 as * mut sys :: godot_method_bind , get_texture : 0 as * mut sys :: godot_method_bind , get_texture_type : 0 as * mut sys :: godot_method_bind , set_source : 0 as * mut sys :: godot_method_bind , set_texture : 0 as * mut sys :: godot_method_bind , set_texture_type : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeTextureMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTexture\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_source = (gd_api . godot_method_bind_get_method) (class_name , "get_source\0" . as_ptr () as * const c_char) ; table . get_texture = (gd_api . godot_method_bind_get_method) (class_name , "get_texture\0" . as_ptr () as * const c_char) ; table . get_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_type\0" . as_ptr () as * const c_char) ; table . set_source = (gd_api . godot_method_bind_get_method) (class_name , "set_source\0" . as_ptr () as * const c_char) ; table . set_texture = (gd_api . godot_method_bind_get_method) (class_name , "set_texture\0" . as_ptr () as * const c_char) ; table . set_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_type\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_texture::private::VisualShaderNodeTexture;
            
            pub mod visual_shader_node_texture_uniform {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeTextureUniform`][super::VisualShaderNodeTextureUniform]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeTextureUniform` inherits `VisualShaderNodeUniform` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_texture_uniform`][super::visual_shader_node_texture_uniform] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodetextureuniform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTextureUniform inherits methods from:\n - [VisualShaderNodeUniform](struct.VisualShaderNodeUniform.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTextureUniform { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeTextureUniform ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ColorDefault (pub i64) ; impl ColorDefault { pub const WHITE : ColorDefault = ColorDefault (0i64) ; pub const BLACK : ColorDefault = ColorDefault (1i64) ; } impl From < i64 > for ColorDefault { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ColorDefault > for i64 { # [inline] fn from (v : ColorDefault) -> Self { v . 0 } } impl FromVariant for ColorDefault { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TextureType (pub i64) ; impl TextureType { pub const DATA : TextureType = TextureType (0i64) ; pub const COLOR : TextureType = TextureType (1i64) ; pub const NORMALMAP : TextureType = TextureType (2i64) ; pub const ANISO : TextureType = TextureType (3i64) ; } impl From < i64 > for TextureType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TextureType > for i64 { # [inline] fn from (v : TextureType) -> Self { v . 0 } } impl FromVariant for TextureType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeTextureUniform { pub const COLOR_DEFAULT_WHITE : i64 = 0i64 ; pub const TYPE_DATA : i64 = 0i64 ; pub const COLOR_DEFAULT_BLACK : i64 = 1i64 ; pub const TYPE_COLOR : i64 = 1i64 ; pub const TYPE_NORMALMAP : i64 = 2i64 ; pub const TYPE_ANISO : i64 = 3i64 ; } impl VisualShaderNodeTextureUniform { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTextureUniformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Sets the default color if no texture is assigned to the uniform."] # [doc = ""] # [inline] pub fn color_default (& self) -> crate :: generated :: visual_shader_node_texture_uniform :: ColorDefault { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureUniformMethodTable :: get (get_api ()) . get_color_default ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_texture_uniform :: ColorDefault > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Defines the type of data provided by the source texture. See [`TextureType`][TextureType] for options."] # [doc = ""] # [inline] pub fn texture_type (& self) -> crate :: generated :: visual_shader_node_texture_uniform :: TextureType { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureUniformMethodTable :: get (get_api ()) . get_texture_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_texture_uniform :: TextureType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Sets the default color if no texture is assigned to the uniform."] # [doc = ""] # [inline] pub fn set_color_default (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureUniformMethodTable :: get (get_api ()) . set_color_default ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } # [doc = "Defines the type of data provided by the source texture. See [`TextureType`][TextureType] for options."] # [doc = ""] # [inline] pub fn set_texture_type (& self , type_ : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTextureUniformMethodTable :: get (get_api ()) . set_texture_type ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , type_ as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTextureUniform { } unsafe impl GodotObject for VisualShaderNodeTextureUniform { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTextureUniform" } } impl std :: ops :: Deref for VisualShaderNodeTextureUniform { type Target = crate :: generated :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTextureUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNodeUniform > for VisualShaderNodeTextureUniform { } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeTextureUniform { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeTextureUniform { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeTextureUniform { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeTextureUniform { } impl Instanciable for VisualShaderNodeTextureUniform { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeTextureUniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTextureUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_color_default : * mut sys :: godot_method_bind , pub get_texture_type : * mut sys :: godot_method_bind , pub set_color_default : * mut sys :: godot_method_bind , pub set_texture_type : * mut sys :: godot_method_bind } impl VisualShaderNodeTextureUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTextureUniformMethodTable = VisualShaderNodeTextureUniformMethodTable { class_constructor : None , get_color_default : 0 as * mut sys :: godot_method_bind , get_texture_type : 0 as * mut sys :: godot_method_bind , set_color_default : 0 as * mut sys :: godot_method_bind , set_texture_type : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeTextureUniformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTextureUniform\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_color_default = (gd_api . godot_method_bind_get_method) (class_name , "get_color_default\0" . as_ptr () as * const c_char) ; table . get_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "get_texture_type\0" . as_ptr () as * const c_char) ; table . set_color_default = (gd_api . godot_method_bind_get_method) (class_name , "set_color_default\0" . as_ptr () as * const c_char) ; table . set_texture_type = (gd_api . godot_method_bind_get_method) (class_name , "set_texture_type\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_texture_uniform::private::VisualShaderNodeTextureUniform;
            
            pub(crate) mod visual_shader_node_texture_uniform_triplanar {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeTextureUniformTriplanar`][super::VisualShaderNodeTextureUniformTriplanar]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeTextureUniformTriplanar` inherits `VisualShaderNodeTextureUniform` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodetextureuniformtriplanar.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTextureUniformTriplanar inherits methods from:\n - [VisualShaderNodeTextureUniform](struct.VisualShaderNodeTextureUniform.html)\n - [VisualShaderNodeUniform](struct.VisualShaderNodeUniform.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTextureUniformTriplanar { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeTextureUniformTriplanar ; impl VisualShaderNodeTextureUniformTriplanar { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTextureUniformTriplanarMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTextureUniformTriplanar { } unsafe impl GodotObject for VisualShaderNodeTextureUniformTriplanar { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTextureUniformTriplanar" } } impl std :: ops :: Deref for VisualShaderNodeTextureUniformTriplanar { type Target = crate :: generated :: VisualShaderNodeTextureUniform ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNodeTextureUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTextureUniformTriplanar { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNodeTextureUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNodeTextureUniform > for VisualShaderNodeTextureUniformTriplanar { } unsafe impl SubClass < crate :: generated :: VisualShaderNodeUniform > for VisualShaderNodeTextureUniformTriplanar { } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeTextureUniformTriplanar { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeTextureUniformTriplanar { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeTextureUniformTriplanar { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeTextureUniformTriplanar { } impl Instanciable for VisualShaderNodeTextureUniformTriplanar { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeTextureUniformTriplanar :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTextureUniformTriplanarMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeTextureUniformTriplanarMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTextureUniformTriplanarMethodTable = VisualShaderNodeTextureUniformTriplanarMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeTextureUniformTriplanarMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTextureUniformTriplanar\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_texture_uniform_triplanar::private::VisualShaderNodeTextureUniformTriplanar;
            
            pub(crate) mod visual_shader_node_transform_compose {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeTransformCompose`][super::VisualShaderNodeTransformCompose]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeTransformCompose` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodetransformcompose.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTransformCompose inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformCompose { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeTransformCompose ; impl VisualShaderNodeTransformCompose { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTransformComposeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformCompose { } unsafe impl GodotObject for VisualShaderNodeTransformCompose { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformCompose" } } impl std :: ops :: Deref for VisualShaderNodeTransformCompose { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformCompose { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeTransformCompose { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeTransformCompose { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeTransformCompose { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeTransformCompose { } impl Instanciable for VisualShaderNodeTransformCompose { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeTransformCompose :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTransformComposeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeTransformComposeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTransformComposeMethodTable = VisualShaderNodeTransformComposeMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeTransformComposeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTransformCompose\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_transform_compose::private::VisualShaderNodeTransformCompose;
            
            pub(crate) mod visual_shader_node_transform_constant {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeTransformConstant`][super::VisualShaderNodeTransformConstant]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeTransformConstant` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodetransformconstant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTransformConstant inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformConstant { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeTransformConstant ; impl VisualShaderNodeTransformConstant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTransformConstantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A [`Transform`][Transform] constant which represents the state of this node."] # [doc = ""] # [inline] pub fn constant (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformConstantMethodTable :: get (get_api ()) . get_constant ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A [`Transform`][Transform] constant which represents the state of this node."] # [doc = ""] # [inline] pub fn set_constant (& self , value : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformConstantMethodTable :: get (get_api ()) . set_constant ; let ret = crate :: icalls :: icallvar__trans (method_bind , self . this . sys () . as_ptr () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformConstant { } unsafe impl GodotObject for VisualShaderNodeTransformConstant { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformConstant" } } impl std :: ops :: Deref for VisualShaderNodeTransformConstant { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformConstant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeTransformConstant { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeTransformConstant { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeTransformConstant { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeTransformConstant { } impl Instanciable for VisualShaderNodeTransformConstant { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeTransformConstant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTransformConstantMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_constant : * mut sys :: godot_method_bind , pub set_constant : * mut sys :: godot_method_bind } impl VisualShaderNodeTransformConstantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTransformConstantMethodTable = VisualShaderNodeTransformConstantMethodTable { class_constructor : None , get_constant : 0 as * mut sys :: godot_method_bind , set_constant : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeTransformConstantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTransformConstant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_constant\0" . as_ptr () as * const c_char) ; table . set_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_constant\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_transform_constant::private::VisualShaderNodeTransformConstant;
            
            pub(crate) mod visual_shader_node_transform_decompose {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeTransformDecompose`][super::VisualShaderNodeTransformDecompose]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeTransformDecompose` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodetransformdecompose.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTransformDecompose inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformDecompose { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeTransformDecompose ; impl VisualShaderNodeTransformDecompose { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTransformDecomposeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformDecompose { } unsafe impl GodotObject for VisualShaderNodeTransformDecompose { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformDecompose" } } impl std :: ops :: Deref for VisualShaderNodeTransformDecompose { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformDecompose { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeTransformDecompose { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeTransformDecompose { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeTransformDecompose { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeTransformDecompose { } impl Instanciable for VisualShaderNodeTransformDecompose { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeTransformDecompose :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTransformDecomposeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeTransformDecomposeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTransformDecomposeMethodTable = VisualShaderNodeTransformDecomposeMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeTransformDecomposeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTransformDecompose\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_transform_decompose::private::VisualShaderNodeTransformDecompose;
            
            pub mod visual_shader_node_transform_func {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeTransformFunc`][super::VisualShaderNodeTransformFunc]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeTransformFunc` inherits `VisualShaderNode` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_transform_func`][super::visual_shader_node_transform_func] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodetransformfunc.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTransformFunc inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformFunc { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeTransformFunc ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Function (pub i64) ; impl Function { pub const INVERSE : Function = Function (0i64) ; pub const TRANSPOSE : Function = Function (1i64) ; } impl From < i64 > for Function { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Function > for i64 { # [inline] fn from (v : Function) -> Self { v . 0 } } impl FromVariant for Function { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeTransformFunc { pub const FUNC_INVERSE : i64 = 0i64 ; pub const FUNC_TRANSPOSE : i64 = 1i64 ; } impl VisualShaderNodeTransformFunc { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTransformFuncMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The function to be computed. See [`Function`][Function] for options."] # [doc = ""] # [inline] pub fn function (& self) -> crate :: generated :: visual_shader_node_transform_func :: Function { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformFuncMethodTable :: get (get_api ()) . get_function ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_transform_func :: Function > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The function to be computed. See [`Function`][Function] for options."] # [doc = ""] # [inline] pub fn set_function (& self , func : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformFuncMethodTable :: get (get_api ()) . set_function ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , func as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformFunc { } unsafe impl GodotObject for VisualShaderNodeTransformFunc { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformFunc" } } impl std :: ops :: Deref for VisualShaderNodeTransformFunc { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeTransformFunc { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeTransformFunc { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeTransformFunc { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeTransformFunc { } impl Instanciable for VisualShaderNodeTransformFunc { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeTransformFunc :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTransformFuncMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_function : * mut sys :: godot_method_bind , pub set_function : * mut sys :: godot_method_bind } impl VisualShaderNodeTransformFuncMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTransformFuncMethodTable = VisualShaderNodeTransformFuncMethodTable { class_constructor : None , get_function : 0 as * mut sys :: godot_method_bind , set_function : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeTransformFuncMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTransformFunc\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_transform_func::private::VisualShaderNodeTransformFunc;
            
            pub mod visual_shader_node_transform_mult {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeTransformMult`][super::VisualShaderNodeTransformMult]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeTransformMult` inherits `VisualShaderNode` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_transform_mult`][super::visual_shader_node_transform_mult] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodetransformmult.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTransformMult inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformMult { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeTransformMult ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Operator (pub i64) ; impl Operator { pub const AXB : Operator = Operator (0i64) ; pub const BXA : Operator = Operator (1i64) ; pub const AXB_COMP : Operator = Operator (2i64) ; pub const BXA_COMP : Operator = Operator (3i64) ; } impl From < i64 > for Operator { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Operator > for i64 { # [inline] fn from (v : Operator) -> Self { v . 0 } } impl FromVariant for Operator { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeTransformMult { pub const OP_AxB : i64 = 0i64 ; pub const OP_BxA : i64 = 1i64 ; pub const OP_AxB_COMP : i64 = 2i64 ; pub const OP_BxA_COMP : i64 = 3i64 ; } impl VisualShaderNodeTransformMult { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTransformMultMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The multiplication type to be performed on the transforms. See [`Operator`][Operator] for options."] # [doc = ""] # [inline] pub fn operator (& self) -> crate :: generated :: visual_shader_node_transform_mult :: Operator { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformMultMethodTable :: get (get_api ()) . get_operator ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_transform_mult :: Operator > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The multiplication type to be performed on the transforms. See [`Operator`][Operator] for options."] # [doc = ""] # [inline] pub fn set_operator (& self , op : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformMultMethodTable :: get (get_api ()) . set_operator ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , op as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformMult { } unsafe impl GodotObject for VisualShaderNodeTransformMult { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformMult" } } impl std :: ops :: Deref for VisualShaderNodeTransformMult { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformMult { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeTransformMult { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeTransformMult { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeTransformMult { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeTransformMult { } impl Instanciable for VisualShaderNodeTransformMult { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeTransformMult :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTransformMultMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_operator : * mut sys :: godot_method_bind , pub set_operator : * mut sys :: godot_method_bind } impl VisualShaderNodeTransformMultMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTransformMultMethodTable = VisualShaderNodeTransformMultMethodTable { class_constructor : None , get_operator : 0 as * mut sys :: godot_method_bind , set_operator : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeTransformMultMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTransformMult\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_operator\0" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_transform_mult::private::VisualShaderNodeTransformMult;
            
            pub(crate) mod visual_shader_node_transform_uniform {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeTransformUniform`][super::VisualShaderNodeTransformUniform]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeTransformUniform` inherits `VisualShaderNodeUniform` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodetransformuniform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTransformUniform inherits methods from:\n - [VisualShaderNodeUniform](struct.VisualShaderNodeUniform.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformUniform { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeTransformUniform ; impl VisualShaderNodeTransformUniform { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTransformUniformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A default value to be assigned within the shader."] # [doc = ""] # [inline] pub fn default_value (& self) -> Transform { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformUniformMethodTable :: get (get_api ()) . get_default_value ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Transform > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Enables usage of the [`default_value`][Self::default_value]."] # [doc = ""] # [inline] pub fn is_default_value_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformUniformMethodTable :: get (get_api ()) . is_default_value_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "A default value to be assigned within the shader."] # [doc = ""] # [inline] pub fn set_default_value (& self , value : Transform) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformUniformMethodTable :: get (get_api ()) . set_default_value ; let ret = crate :: icalls :: icallvar__trans (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Enables usage of the [`default_value`][Self::default_value]."] # [doc = ""] # [inline] pub fn set_default_value_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformUniformMethodTable :: get (get_api ()) . set_default_value_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformUniform { } unsafe impl GodotObject for VisualShaderNodeTransformUniform { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformUniform" } } impl std :: ops :: Deref for VisualShaderNodeTransformUniform { type Target = crate :: generated :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNodeUniform > for VisualShaderNodeTransformUniform { } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeTransformUniform { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeTransformUniform { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeTransformUniform { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeTransformUniform { } impl Instanciable for VisualShaderNodeTransformUniform { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeTransformUniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTransformUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_default_value : * mut sys :: godot_method_bind , pub is_default_value_enabled : * mut sys :: godot_method_bind , pub set_default_value : * mut sys :: godot_method_bind , pub set_default_value_enabled : * mut sys :: godot_method_bind } impl VisualShaderNodeTransformUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTransformUniformMethodTable = VisualShaderNodeTransformUniformMethodTable { class_constructor : None , get_default_value : 0 as * mut sys :: godot_method_bind , is_default_value_enabled : 0 as * mut sys :: godot_method_bind , set_default_value : 0 as * mut sys :: godot_method_bind , set_default_value_enabled : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeTransformUniformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTransformUniform\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_default_value = (gd_api . godot_method_bind_get_method) (class_name , "get_default_value\0" . as_ptr () as * const c_char) ; table . is_default_value_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_default_value_enabled\0" . as_ptr () as * const c_char) ; table . set_default_value = (gd_api . godot_method_bind_get_method) (class_name , "set_default_value\0" . as_ptr () as * const c_char) ; table . set_default_value_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_default_value_enabled\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_transform_uniform::private::VisualShaderNodeTransformUniform;
            
            pub mod visual_shader_node_transform_vec_mult {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeTransformVecMult`][super::VisualShaderNodeTransformVecMult]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeTransformVecMult` inherits `VisualShaderNode` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_transform_vec_mult`][super::visual_shader_node_transform_vec_mult] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodetransformvecmult.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeTransformVecMult inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeTransformVecMult { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeTransformVecMult ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Operator (pub i64) ; impl Operator { pub const AXB : Operator = Operator (0i64) ; pub const BXA : Operator = Operator (1i64) ; pub const _3X3_AXB : Operator = Operator (2i64) ; pub const _3X3_BXA : Operator = Operator (3i64) ; } impl From < i64 > for Operator { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Operator > for i64 { # [inline] fn from (v : Operator) -> Self { v . 0 } } impl FromVariant for Operator { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeTransformVecMult { pub const OP_AxB : i64 = 0i64 ; pub const OP_BxA : i64 = 1i64 ; pub const OP_3x3_AxB : i64 = 2i64 ; pub const OP_3x3_BxA : i64 = 3i64 ; } impl VisualShaderNodeTransformVecMult { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeTransformVecMultMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The multiplication type to be performed. See [`Operator`][Operator] for options."] # [doc = ""] # [inline] pub fn operator (& self) -> crate :: generated :: visual_shader_node_transform_vec_mult :: Operator { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformVecMultMethodTable :: get (get_api ()) . get_operator ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_transform_vec_mult :: Operator > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The multiplication type to be performed. See [`Operator`][Operator] for options."] # [doc = ""] # [inline] pub fn set_operator (& self , op : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeTransformVecMultMethodTable :: get (get_api ()) . set_operator ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , op as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeTransformVecMult { } unsafe impl GodotObject for VisualShaderNodeTransformVecMult { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeTransformVecMult" } } impl std :: ops :: Deref for VisualShaderNodeTransformVecMult { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeTransformVecMult { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeTransformVecMult { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeTransformVecMult { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeTransformVecMult { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeTransformVecMult { } impl Instanciable for VisualShaderNodeTransformVecMult { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeTransformVecMult :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeTransformVecMultMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_operator : * mut sys :: godot_method_bind , pub set_operator : * mut sys :: godot_method_bind } impl VisualShaderNodeTransformVecMultMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeTransformVecMultMethodTable = VisualShaderNodeTransformVecMultMethodTable { class_constructor : None , get_operator : 0 as * mut sys :: godot_method_bind , set_operator : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeTransformVecMultMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeTransformVecMult\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_operator\0" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_transform_vec_mult::private::VisualShaderNodeTransformVecMult;
            
            pub(crate) mod visual_shader_node_uniform {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeUniform`][super::VisualShaderNodeUniform]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeUniform` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodeuniform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeUniform inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeUniform { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeUniform ; impl VisualShaderNodeUniform { # [doc = "Name of the uniform, by which it can be accessed through the [`ShaderMaterial`][ShaderMaterial] properties."] # [doc = ""] # [inline] pub fn uniform_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeUniformMethodTable :: get (get_api ()) . get_uniform_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Name of the uniform, by which it can be accessed through the [`ShaderMaterial`][ShaderMaterial] properties."] # [doc = ""] # [inline] pub fn set_uniform_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeUniformMethodTable :: get (get_api ()) . set_uniform_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeUniform { } unsafe impl GodotObject for VisualShaderNodeUniform { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeUniform" } } impl std :: ops :: Deref for VisualShaderNodeUniform { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeUniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeUniform { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeUniform { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeUniform { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeUniform { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeUniformMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_uniform_name : * mut sys :: godot_method_bind , pub set_uniform_name : * mut sys :: godot_method_bind } impl VisualShaderNodeUniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeUniformMethodTable = VisualShaderNodeUniformMethodTable { class_constructor : None , get_uniform_name : 0 as * mut sys :: godot_method_bind , set_uniform_name : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeUniformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeUniform\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_uniform_name = (gd_api . godot_method_bind_get_method) (class_name , "get_uniform_name\0" . as_ptr () as * const c_char) ; table . set_uniform_name = (gd_api . godot_method_bind_get_method) (class_name , "set_uniform_name\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_uniform::private::VisualShaderNodeUniform;
            
            pub(crate) mod visual_shader_node_uniform_ref {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeUniformRef`][super::VisualShaderNodeUniformRef]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeUniformRef` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodeuniformref.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeUniformRef inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeUniformRef { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeUniformRef ; impl VisualShaderNodeUniformRef { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeUniformRefMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The name of the uniform which this reference points to."] # [doc = ""] # [inline] pub fn uniform_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeUniformRefMethodTable :: get (get_api ()) . get_uniform_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The name of the uniform which this reference points to."] # [doc = ""] # [inline] pub fn set_uniform_name (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeUniformRefMethodTable :: get (get_api ()) . set_uniform_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeUniformRef { } unsafe impl GodotObject for VisualShaderNodeUniformRef { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeUniformRef" } } impl std :: ops :: Deref for VisualShaderNodeUniformRef { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeUniformRef { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeUniformRef { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeUniformRef { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeUniformRef { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeUniformRef { } impl Instanciable for VisualShaderNodeUniformRef { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeUniformRef :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeUniformRefMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_uniform_name : * mut sys :: godot_method_bind , pub set_uniform_name : * mut sys :: godot_method_bind } impl VisualShaderNodeUniformRefMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeUniformRefMethodTable = VisualShaderNodeUniformRefMethodTable { class_constructor : None , get_uniform_name : 0 as * mut sys :: godot_method_bind , set_uniform_name : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeUniformRefMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeUniformRef\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_uniform_name = (gd_api . godot_method_bind_get_method) (class_name , "get_uniform_name\0" . as_ptr () as * const c_char) ; table . set_uniform_name = (gd_api . godot_method_bind_get_method) (class_name , "set_uniform_name\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_uniform_ref::private::VisualShaderNodeUniformRef;
            
            pub(crate) mod visual_shader_node_vec3_constant {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVec3Constant`][super::VisualShaderNodeVec3Constant]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVec3Constant` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevec3constant.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVec3Constant inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVec3Constant { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVec3Constant ; impl VisualShaderNodeVec3Constant { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVec3ConstantMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A [`Vector3`][Vector3] constant which represents the state of this node."] # [doc = ""] # [inline] pub fn constant (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVec3ConstantMethodTable :: get (get_api ()) . get_constant ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A [`Vector3`][Vector3] constant which represents the state of this node."] # [doc = ""] # [inline] pub fn set_constant (& self , value : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVec3ConstantMethodTable :: get (get_api ()) . set_constant ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , value) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVec3Constant { } unsafe impl GodotObject for VisualShaderNodeVec3Constant { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVec3Constant" } } impl std :: ops :: Deref for VisualShaderNodeVec3Constant { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVec3Constant { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVec3Constant { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVec3Constant { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVec3Constant { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVec3Constant { } impl Instanciable for VisualShaderNodeVec3Constant { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVec3Constant :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVec3ConstantMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_constant : * mut sys :: godot_method_bind , pub set_constant : * mut sys :: godot_method_bind } impl VisualShaderNodeVec3ConstantMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVec3ConstantMethodTable = VisualShaderNodeVec3ConstantMethodTable { class_constructor : None , get_constant : 0 as * mut sys :: godot_method_bind , set_constant : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVec3ConstantMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVec3Constant\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_constant = (gd_api . godot_method_bind_get_method) (class_name , "get_constant\0" . as_ptr () as * const c_char) ; table . set_constant = (gd_api . godot_method_bind_get_method) (class_name , "set_constant\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vec3_constant::private::VisualShaderNodeVec3Constant;
            
            pub(crate) mod visual_shader_node_vec3_uniform {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVec3Uniform`][super::VisualShaderNodeVec3Uniform]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVec3Uniform` inherits `VisualShaderNodeUniform` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevec3uniform.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVec3Uniform inherits methods from:\n - [VisualShaderNodeUniform](struct.VisualShaderNodeUniform.html)\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVec3Uniform { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVec3Uniform ; impl VisualShaderNodeVec3Uniform { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVec3UniformMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A default value to be assigned within the shader."] # [doc = ""] # [inline] pub fn default_value (& self) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVec3UniformMethodTable :: get (get_api ()) . get_default_value ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Enables usage of the [`default_value`][Self::default_value]."] # [doc = ""] # [inline] pub fn is_default_value_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVec3UniformMethodTable :: get (get_api ()) . is_default_value_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "A default value to be assigned within the shader."] # [doc = ""] # [inline] pub fn set_default_value (& self , value : Vector3) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVec3UniformMethodTable :: get (get_api ()) . set_default_value ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , value) ; } } # [doc = "Enables usage of the [`default_value`][Self::default_value]."] # [doc = ""] # [inline] pub fn set_default_value_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVec3UniformMethodTable :: get (get_api ()) . set_default_value_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVec3Uniform { } unsafe impl GodotObject for VisualShaderNodeVec3Uniform { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVec3Uniform" } } impl std :: ops :: Deref for VisualShaderNodeVec3Uniform { type Target = crate :: generated :: VisualShaderNodeUniform ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVec3Uniform { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNodeUniform { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNodeUniform > for VisualShaderNodeVec3Uniform { } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVec3Uniform { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVec3Uniform { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVec3Uniform { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVec3Uniform { } impl Instanciable for VisualShaderNodeVec3Uniform { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVec3Uniform :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVec3UniformMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_default_value : * mut sys :: godot_method_bind , pub is_default_value_enabled : * mut sys :: godot_method_bind , pub set_default_value : * mut sys :: godot_method_bind , pub set_default_value_enabled : * mut sys :: godot_method_bind } impl VisualShaderNodeVec3UniformMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVec3UniformMethodTable = VisualShaderNodeVec3UniformMethodTable { class_constructor : None , get_default_value : 0 as * mut sys :: godot_method_bind , is_default_value_enabled : 0 as * mut sys :: godot_method_bind , set_default_value : 0 as * mut sys :: godot_method_bind , set_default_value_enabled : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVec3UniformMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVec3Uniform\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_default_value = (gd_api . godot_method_bind_get_method) (class_name , "get_default_value\0" . as_ptr () as * const c_char) ; table . is_default_value_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_default_value_enabled\0" . as_ptr () as * const c_char) ; table . set_default_value = (gd_api . godot_method_bind_get_method) (class_name , "set_default_value\0" . as_ptr () as * const c_char) ; table . set_default_value_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_default_value_enabled\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vec3_uniform::private::VisualShaderNodeVec3Uniform;
            
            pub(crate) mod visual_shader_node_vector_clamp {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVectorClamp`][super::VisualShaderNodeVectorClamp]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVectorClamp` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevectorclamp.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorClamp inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorClamp { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVectorClamp ; impl VisualShaderNodeVectorClamp { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorClampMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorClamp { } unsafe impl GodotObject for VisualShaderNodeVectorClamp { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorClamp" } } impl std :: ops :: Deref for VisualShaderNodeVectorClamp { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorClamp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVectorClamp { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVectorClamp { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVectorClamp { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVectorClamp { } impl Instanciable for VisualShaderNodeVectorClamp { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVectorClamp :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorClampMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorClampMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorClampMethodTable = VisualShaderNodeVectorClampMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorClampMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorClamp\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vector_clamp::private::VisualShaderNodeVectorClamp;
            
            pub(crate) mod visual_shader_node_vector_compose {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVectorCompose`][super::VisualShaderNodeVectorCompose]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVectorCompose` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevectorcompose.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorCompose inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorCompose { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVectorCompose ; impl VisualShaderNodeVectorCompose { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorComposeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorCompose { } unsafe impl GodotObject for VisualShaderNodeVectorCompose { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorCompose" } } impl std :: ops :: Deref for VisualShaderNodeVectorCompose { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorCompose { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVectorCompose { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVectorCompose { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVectorCompose { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVectorCompose { } impl Instanciable for VisualShaderNodeVectorCompose { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVectorCompose :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorComposeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorComposeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorComposeMethodTable = VisualShaderNodeVectorComposeMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorComposeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorCompose\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vector_compose::private::VisualShaderNodeVectorCompose;
            
            pub(crate) mod visual_shader_node_vector_decompose {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVectorDecompose`][super::VisualShaderNodeVectorDecompose]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVectorDecompose` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevectordecompose.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorDecompose inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorDecompose { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVectorDecompose ; impl VisualShaderNodeVectorDecompose { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorDecomposeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorDecompose { } unsafe impl GodotObject for VisualShaderNodeVectorDecompose { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorDecompose" } } impl std :: ops :: Deref for VisualShaderNodeVectorDecompose { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorDecompose { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVectorDecompose { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVectorDecompose { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVectorDecompose { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVectorDecompose { } impl Instanciable for VisualShaderNodeVectorDecompose { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVectorDecompose :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorDecomposeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorDecomposeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorDecomposeMethodTable = VisualShaderNodeVectorDecomposeMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorDecomposeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorDecompose\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vector_decompose::private::VisualShaderNodeVectorDecompose;
            
            pub mod visual_shader_node_vector_derivative_func {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVectorDerivativeFunc`][super::VisualShaderNodeVectorDerivativeFunc]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVectorDerivativeFunc` inherits `VisualShaderNode` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_vector_derivative_func`][super::visual_shader_node_vector_derivative_func] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevectorderivativefunc.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorDerivativeFunc inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorDerivativeFunc { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVectorDerivativeFunc ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Function (pub i64) ; impl Function { pub const SUM : Function = Function (0i64) ; pub const X : Function = Function (1i64) ; pub const Y : Function = Function (2i64) ; } impl From < i64 > for Function { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Function > for i64 { # [inline] fn from (v : Function) -> Self { v . 0 } } impl FromVariant for Function { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeVectorDerivativeFunc { pub const FUNC_SUM : i64 = 0i64 ; pub const FUNC_X : i64 = 1i64 ; pub const FUNC_Y : i64 = 2i64 ; } impl VisualShaderNodeVectorDerivativeFunc { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorDerivativeFuncMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "A derivative type. See [`Function`][Function] for options."] # [doc = ""] # [inline] pub fn function (& self) -> crate :: generated :: visual_shader_node_vector_derivative_func :: Function { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVectorDerivativeFuncMethodTable :: get (get_api ()) . get_function ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_vector_derivative_func :: Function > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "A derivative type. See [`Function`][Function] for options."] # [doc = ""] # [inline] pub fn set_function (& self , func : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVectorDerivativeFuncMethodTable :: get (get_api ()) . set_function ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , func as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorDerivativeFunc { } unsafe impl GodotObject for VisualShaderNodeVectorDerivativeFunc { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorDerivativeFunc" } } impl std :: ops :: Deref for VisualShaderNodeVectorDerivativeFunc { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorDerivativeFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVectorDerivativeFunc { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVectorDerivativeFunc { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVectorDerivativeFunc { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVectorDerivativeFunc { } impl Instanciable for VisualShaderNodeVectorDerivativeFunc { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVectorDerivativeFunc :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorDerivativeFuncMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_function : * mut sys :: godot_method_bind , pub set_function : * mut sys :: godot_method_bind } impl VisualShaderNodeVectorDerivativeFuncMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorDerivativeFuncMethodTable = VisualShaderNodeVectorDerivativeFuncMethodTable { class_constructor : None , get_function : 0 as * mut sys :: godot_method_bind , set_function : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorDerivativeFuncMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorDerivativeFunc\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vector_derivative_func::private::VisualShaderNodeVectorDerivativeFunc;
            
            pub(crate) mod visual_shader_node_vector_distance {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVectorDistance`][super::VisualShaderNodeVectorDistance]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVectorDistance` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevectordistance.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorDistance inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorDistance { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVectorDistance ; impl VisualShaderNodeVectorDistance { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorDistanceMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorDistance { } unsafe impl GodotObject for VisualShaderNodeVectorDistance { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorDistance" } } impl std :: ops :: Deref for VisualShaderNodeVectorDistance { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorDistance { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVectorDistance { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVectorDistance { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVectorDistance { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVectorDistance { } impl Instanciable for VisualShaderNodeVectorDistance { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVectorDistance :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorDistanceMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorDistanceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorDistanceMethodTable = VisualShaderNodeVectorDistanceMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorDistanceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorDistance\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vector_distance::private::VisualShaderNodeVectorDistance;
            
            pub mod visual_shader_node_vector_func {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVectorFunc`][super::VisualShaderNodeVectorFunc]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVectorFunc` inherits `VisualShaderNode` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_vector_func`][super::visual_shader_node_vector_func] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevectorfunc.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorFunc inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorFunc { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVectorFunc ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Function (pub i64) ; impl Function { pub const NORMALIZE : Function = Function (0i64) ; pub const SATURATE : Function = Function (1i64) ; pub const NEGATE : Function = Function (2i64) ; pub const RECIPROCAL : Function = Function (3i64) ; pub const RGB2HSV : Function = Function (4i64) ; pub const HSV2RGB : Function = Function (5i64) ; pub const ABS : Function = Function (6i64) ; pub const ACOS : Function = Function (7i64) ; pub const ACOSH : Function = Function (8i64) ; pub const ASIN : Function = Function (9i64) ; pub const ASINH : Function = Function (10i64) ; pub const ATAN : Function = Function (11i64) ; pub const ATANH : Function = Function (12i64) ; pub const CEIL : Function = Function (13i64) ; pub const COS : Function = Function (14i64) ; pub const COSH : Function = Function (15i64) ; pub const DEGREES : Function = Function (16i64) ; pub const EXP : Function = Function (17i64) ; pub const EXP2 : Function = Function (18i64) ; pub const FLOOR : Function = Function (19i64) ; pub const FRAC : Function = Function (20i64) ; pub const INVERSE_SQRT : Function = Function (21i64) ; pub const LOG : Function = Function (22i64) ; pub const LOG2 : Function = Function (23i64) ; pub const RADIANS : Function = Function (24i64) ; pub const ROUND : Function = Function (25i64) ; pub const ROUNDEVEN : Function = Function (26i64) ; pub const SIGN : Function = Function (27i64) ; pub const SIN : Function = Function (28i64) ; pub const SINH : Function = Function (29i64) ; pub const SQRT : Function = Function (30i64) ; pub const TAN : Function = Function (31i64) ; pub const TANH : Function = Function (32i64) ; pub const TRUNC : Function = Function (33i64) ; pub const ONEMINUS : Function = Function (34i64) ; } impl From < i64 > for Function { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Function > for i64 { # [inline] fn from (v : Function) -> Self { v . 0 } } impl FromVariant for Function { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeVectorFunc { pub const FUNC_NORMALIZE : i64 = 0i64 ; pub const FUNC_SATURATE : i64 = 1i64 ; pub const FUNC_NEGATE : i64 = 2i64 ; pub const FUNC_RECIPROCAL : i64 = 3i64 ; pub const FUNC_RGB2HSV : i64 = 4i64 ; pub const FUNC_HSV2RGB : i64 = 5i64 ; pub const FUNC_ABS : i64 = 6i64 ; pub const FUNC_ACOS : i64 = 7i64 ; pub const FUNC_ACOSH : i64 = 8i64 ; pub const FUNC_ASIN : i64 = 9i64 ; pub const FUNC_ASINH : i64 = 10i64 ; pub const FUNC_ATAN : i64 = 11i64 ; pub const FUNC_ATANH : i64 = 12i64 ; pub const FUNC_CEIL : i64 = 13i64 ; pub const FUNC_COS : i64 = 14i64 ; pub const FUNC_COSH : i64 = 15i64 ; pub const FUNC_DEGREES : i64 = 16i64 ; pub const FUNC_EXP : i64 = 17i64 ; pub const FUNC_EXP2 : i64 = 18i64 ; pub const FUNC_FLOOR : i64 = 19i64 ; pub const FUNC_FRAC : i64 = 20i64 ; pub const FUNC_INVERSE_SQRT : i64 = 21i64 ; pub const FUNC_LOG : i64 = 22i64 ; pub const FUNC_LOG2 : i64 = 23i64 ; pub const FUNC_RADIANS : i64 = 24i64 ; pub const FUNC_ROUND : i64 = 25i64 ; pub const FUNC_ROUNDEVEN : i64 = 26i64 ; pub const FUNC_SIGN : i64 = 27i64 ; pub const FUNC_SIN : i64 = 28i64 ; pub const FUNC_SINH : i64 = 29i64 ; pub const FUNC_SQRT : i64 = 30i64 ; pub const FUNC_TAN : i64 = 31i64 ; pub const FUNC_TANH : i64 = 32i64 ; pub const FUNC_TRUNC : i64 = 33i64 ; pub const FUNC_ONEMINUS : i64 = 34i64 ; } impl VisualShaderNodeVectorFunc { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorFuncMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The function to be performed. See [`Function`][Function] for options."] # [doc = ""] # [inline] pub fn function (& self) -> crate :: generated :: visual_shader_node_vector_func :: Function { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVectorFuncMethodTable :: get (get_api ()) . get_function ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_vector_func :: Function > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The function to be performed. See [`Function`][Function] for options."] # [doc = ""] # [inline] pub fn set_function (& self , func : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVectorFuncMethodTable :: get (get_api ()) . set_function ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , func as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorFunc { } unsafe impl GodotObject for VisualShaderNodeVectorFunc { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorFunc" } } impl std :: ops :: Deref for VisualShaderNodeVectorFunc { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorFunc { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVectorFunc { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVectorFunc { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVectorFunc { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVectorFunc { } impl Instanciable for VisualShaderNodeVectorFunc { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVectorFunc :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorFuncMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_function : * mut sys :: godot_method_bind , pub set_function : * mut sys :: godot_method_bind } impl VisualShaderNodeVectorFuncMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorFuncMethodTable = VisualShaderNodeVectorFuncMethodTable { class_constructor : None , get_function : 0 as * mut sys :: godot_method_bind , set_function : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorFuncMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorFunc\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_function = (gd_api . godot_method_bind_get_method) (class_name , "get_function\0" . as_ptr () as * const c_char) ; table . set_function = (gd_api . godot_method_bind_get_method) (class_name , "set_function\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vector_func::private::VisualShaderNodeVectorFunc;
            
            pub(crate) mod visual_shader_node_vector_interp {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVectorInterp`][super::VisualShaderNodeVectorInterp]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVectorInterp` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevectorinterp.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorInterp inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorInterp { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVectorInterp ; impl VisualShaderNodeVectorInterp { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorInterpMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorInterp { } unsafe impl GodotObject for VisualShaderNodeVectorInterp { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorInterp" } } impl std :: ops :: Deref for VisualShaderNodeVectorInterp { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorInterp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVectorInterp { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVectorInterp { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVectorInterp { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVectorInterp { } impl Instanciable for VisualShaderNodeVectorInterp { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVectorInterp :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorInterpMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorInterpMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorInterpMethodTable = VisualShaderNodeVectorInterpMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorInterpMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorInterp\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vector_interp::private::VisualShaderNodeVectorInterp;
            
            pub(crate) mod visual_shader_node_vector_len {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVectorLen`][super::VisualShaderNodeVectorLen]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVectorLen` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevectorlen.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorLen inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorLen { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVectorLen ; impl VisualShaderNodeVectorLen { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorLenMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorLen { } unsafe impl GodotObject for VisualShaderNodeVectorLen { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorLen" } } impl std :: ops :: Deref for VisualShaderNodeVectorLen { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorLen { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVectorLen { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVectorLen { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVectorLen { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVectorLen { } impl Instanciable for VisualShaderNodeVectorLen { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVectorLen :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorLenMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorLenMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorLenMethodTable = VisualShaderNodeVectorLenMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorLenMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorLen\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vector_len::private::VisualShaderNodeVectorLen;
            
            pub mod visual_shader_node_vector_op {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVectorOp`][super::VisualShaderNodeVectorOp]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVectorOp` inherits `VisualShaderNode` (reference-counted).\n\nThis class has related types in the [`visual_shader_node_vector_op`][super::visual_shader_node_vector_op] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevectorop.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorOp inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorOp { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVectorOp ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Operator (pub i64) ; impl Operator { pub const ADD : Operator = Operator (0i64) ; pub const SUB : Operator = Operator (1i64) ; pub const MUL : Operator = Operator (2i64) ; pub const DIV : Operator = Operator (3i64) ; pub const MOD : Operator = Operator (4i64) ; pub const POW : Operator = Operator (5i64) ; pub const MAX : Operator = Operator (6i64) ; pub const MIN : Operator = Operator (7i64) ; pub const CROSS : Operator = Operator (8i64) ; pub const ATAN2 : Operator = Operator (9i64) ; pub const REFLECT : Operator = Operator (10i64) ; pub const STEP : Operator = Operator (11i64) ; } impl From < i64 > for Operator { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Operator > for i64 { # [inline] fn from (v : Operator) -> Self { v . 0 } } impl FromVariant for Operator { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl VisualShaderNodeVectorOp { pub const OP_ADD : i64 = 0i64 ; pub const OP_SUB : i64 = 1i64 ; pub const OP_MUL : i64 = 2i64 ; pub const OP_DIV : i64 = 3i64 ; pub const OP_MOD : i64 = 4i64 ; pub const OP_POW : i64 = 5i64 ; pub const OP_MAX : i64 = 6i64 ; pub const OP_MIN : i64 = 7i64 ; pub const OP_CROSS : i64 = 8i64 ; pub const OP_ATAN2 : i64 = 9i64 ; pub const OP_REFLECT : i64 = 10i64 ; pub const OP_STEP : i64 = 11i64 ; } impl VisualShaderNodeVectorOp { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorOpMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The operator to be used. See [`Operator`][Operator] for options."] # [doc = ""] # [inline] pub fn operator (& self) -> crate :: generated :: visual_shader_node_vector_op :: Operator { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVectorOpMethodTable :: get (get_api ()) . get_operator ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: visual_shader_node_vector_op :: Operator > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The operator to be used. See [`Operator`][Operator] for options."] # [doc = ""] # [inline] pub fn set_operator (& self , op : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualShaderNodeVectorOpMethodTable :: get (get_api ()) . set_operator ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , op as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorOp { } unsafe impl GodotObject for VisualShaderNodeVectorOp { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorOp" } } impl std :: ops :: Deref for VisualShaderNodeVectorOp { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorOp { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVectorOp { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVectorOp { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVectorOp { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVectorOp { } impl Instanciable for VisualShaderNodeVectorOp { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVectorOp :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorOpMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_operator : * mut sys :: godot_method_bind , pub set_operator : * mut sys :: godot_method_bind } impl VisualShaderNodeVectorOpMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorOpMethodTable = VisualShaderNodeVectorOpMethodTable { class_constructor : None , get_operator : 0 as * mut sys :: godot_method_bind , set_operator : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorOpMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorOp\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_operator = (gd_api . godot_method_bind_get_method) (class_name , "get_operator\0" . as_ptr () as * const c_char) ; table . set_operator = (gd_api . godot_method_bind_get_method) (class_name , "set_operator\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vector_op::private::VisualShaderNodeVectorOp;
            
            pub(crate) mod visual_shader_node_vector_refract {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVectorRefract`][super::VisualShaderNodeVectorRefract]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVectorRefract` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevectorrefract.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorRefract inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorRefract { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVectorRefract ; impl VisualShaderNodeVectorRefract { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorRefractMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorRefract { } unsafe impl GodotObject for VisualShaderNodeVectorRefract { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorRefract" } } impl std :: ops :: Deref for VisualShaderNodeVectorRefract { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorRefract { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVectorRefract { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVectorRefract { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVectorRefract { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVectorRefract { } impl Instanciable for VisualShaderNodeVectorRefract { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVectorRefract :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorRefractMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorRefractMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorRefractMethodTable = VisualShaderNodeVectorRefractMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorRefractMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorRefract\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vector_refract::private::VisualShaderNodeVectorRefract;
            
            pub(crate) mod visual_shader_node_vector_scalar_mix {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVectorScalarMix`][super::VisualShaderNodeVectorScalarMix]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVectorScalarMix` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevectorscalarmix.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorScalarMix inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorScalarMix { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVectorScalarMix ; impl VisualShaderNodeVectorScalarMix { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorScalarMixMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorScalarMix { } unsafe impl GodotObject for VisualShaderNodeVectorScalarMix { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorScalarMix" } } impl std :: ops :: Deref for VisualShaderNodeVectorScalarMix { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorScalarMix { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVectorScalarMix { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVectorScalarMix { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVectorScalarMix { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVectorScalarMix { } impl Instanciable for VisualShaderNodeVectorScalarMix { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVectorScalarMix :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorScalarMixMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorScalarMixMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorScalarMixMethodTable = VisualShaderNodeVectorScalarMixMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorScalarMixMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorScalarMix\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vector_scalar_mix::private::VisualShaderNodeVectorScalarMix;
            
            pub(crate) mod visual_shader_node_vector_scalar_smooth_step {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVectorScalarSmoothStep`][super::VisualShaderNodeVectorScalarSmoothStep]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVectorScalarSmoothStep` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevectorscalarsmoothstep.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorScalarSmoothStep inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorScalarSmoothStep { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVectorScalarSmoothStep ; impl VisualShaderNodeVectorScalarSmoothStep { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorScalarSmoothStepMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl GodotObject for VisualShaderNodeVectorScalarSmoothStep { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorScalarSmoothStep" } } impl std :: ops :: Deref for VisualShaderNodeVectorScalarSmoothStep { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorScalarSmoothStep { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVectorScalarSmoothStep { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVectorScalarSmoothStep { } impl Instanciable for VisualShaderNodeVectorScalarSmoothStep { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVectorScalarSmoothStep :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorScalarSmoothStepMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorScalarSmoothStepMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorScalarSmoothStepMethodTable = VisualShaderNodeVectorScalarSmoothStepMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorScalarSmoothStepMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorScalarSmoothStep\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vector_scalar_smooth_step::private::VisualShaderNodeVectorScalarSmoothStep;
            
            pub(crate) mod visual_shader_node_vector_scalar_step {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVectorScalarStep`][super::VisualShaderNodeVectorScalarStep]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVectorScalarStep` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevectorscalarstep.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorScalarStep inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorScalarStep { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVectorScalarStep ; impl VisualShaderNodeVectorScalarStep { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorScalarStepMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorScalarStep { } unsafe impl GodotObject for VisualShaderNodeVectorScalarStep { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorScalarStep" } } impl std :: ops :: Deref for VisualShaderNodeVectorScalarStep { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorScalarStep { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVectorScalarStep { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVectorScalarStep { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVectorScalarStep { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVectorScalarStep { } impl Instanciable for VisualShaderNodeVectorScalarStep { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVectorScalarStep :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorScalarStepMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorScalarStepMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorScalarStepMethodTable = VisualShaderNodeVectorScalarStepMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorScalarStepMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorScalarStep\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vector_scalar_step::private::VisualShaderNodeVectorScalarStep;
            
            pub(crate) mod visual_shader_node_vector_smooth_step {
                # ! [doc = "This module contains types related to the API class [`VisualShaderNodeVectorSmoothStep`][super::VisualShaderNodeVectorSmoothStep]."] pub (crate) mod private { # [doc = "`core class VisualShaderNodeVectorSmoothStep` inherits `VisualShaderNode` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualshadernodevectorsmoothstep.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nVisualShaderNodeVectorSmoothStep inherits methods from:\n - [VisualShaderNode](struct.VisualShaderNode.html)\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualShaderNodeVectorSmoothStep { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualShaderNodeVectorSmoothStep ; impl VisualShaderNodeVectorSmoothStep { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = VisualShaderNodeVectorSmoothStepMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualShaderNodeVectorSmoothStep { } unsafe impl GodotObject for VisualShaderNodeVectorSmoothStep { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "VisualShaderNodeVectorSmoothStep" } } impl std :: ops :: Deref for VisualShaderNodeVectorSmoothStep { type Target = crate :: generated :: VisualShaderNode ; # [inline] fn deref (& self) -> & crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualShaderNodeVectorSmoothStep { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: VisualShaderNode { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: VisualShaderNode > for VisualShaderNodeVectorSmoothStep { } unsafe impl SubClass < crate :: generated :: Resource > for VisualShaderNodeVectorSmoothStep { } unsafe impl SubClass < crate :: generated :: Reference > for VisualShaderNodeVectorSmoothStep { } unsafe impl SubClass < crate :: generated :: Object > for VisualShaderNodeVectorSmoothStep { } impl Instanciable for VisualShaderNodeVectorSmoothStep { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { VisualShaderNodeVectorSmoothStep :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualShaderNodeVectorSmoothStepMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl VisualShaderNodeVectorSmoothStepMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualShaderNodeVectorSmoothStepMethodTable = VisualShaderNodeVectorSmoothStepMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualShaderNodeVectorSmoothStepMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "VisualShaderNodeVectorSmoothStep\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_shader_node_vector_smooth_step::private::VisualShaderNodeVectorSmoothStep;
            
            pub(crate) mod weak_ref {
                # ! [doc = "This module contains types related to the API class [`WeakRef`][super::WeakRef]."] pub (crate) mod private { # [doc = "`core class WeakRef` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_weakref.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWeakRef inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WeakRef { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: WeakRef ; impl WeakRef { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WeakRefMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the [`Object`][Object] this weakref is referring to. Returns `null` if that object no longer exists."] # [doc = ""] # [inline] pub fn get_ref (& self) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = WeakRefMethodTable :: get (get_api ()) . get_ref ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for WeakRef { } unsafe impl GodotObject for WeakRef { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WeakRef" } } impl std :: ops :: Deref for WeakRef { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WeakRef { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for WeakRef { } unsafe impl SubClass < crate :: generated :: Object > for WeakRef { } impl Instanciable for WeakRef { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { WeakRef :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WeakRefMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_ref : * mut sys :: godot_method_bind } impl WeakRefMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WeakRefMethodTable = WeakRefMethodTable { class_constructor : None , get_ref : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { WeakRefMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WeakRef\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_ref = (gd_api . godot_method_bind_get_method) (class_name , "get_ref\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::weak_ref::private::WeakRef;
            
            pub mod web_rtc_data_channel {
                # ! [doc = "This module contains types related to the API class [`WebRTCDataChannel`][super::WebRTCDataChannel]."] pub (crate) mod private { # [doc = "`core class WebRTCDataChannel` inherits `PacketPeer` (reference-counted).\n\nThis class has related types in the [`web_rtc_data_channel`][super::web_rtc_data_channel] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_webrtcdatachannel.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebRTCDataChannel inherits methods from:\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebRTCDataChannel { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: WebRTCDataChannel ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ChannelState (pub i64) ; impl ChannelState { pub const CONNECTING : ChannelState = ChannelState (0i64) ; pub const OPEN : ChannelState = ChannelState (1i64) ; pub const CLOSING : ChannelState = ChannelState (2i64) ; pub const CLOSED : ChannelState = ChannelState (3i64) ; } impl From < i64 > for ChannelState { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ChannelState > for i64 { # [inline] fn from (v : ChannelState) -> Self { v . 0 } } impl FromVariant for ChannelState { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct WriteMode (pub i64) ; impl WriteMode { pub const TEXT : WriteMode = WriteMode (0i64) ; pub const BINARY : WriteMode = WriteMode (1i64) ; } impl From < i64 > for WriteMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < WriteMode > for i64 { # [inline] fn from (v : WriteMode) -> Self { v . 0 } } impl FromVariant for WriteMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl WebRTCDataChannel { pub const STATE_CONNECTING : i64 = 0i64 ; pub const WRITE_MODE_TEXT : i64 = 0i64 ; pub const STATE_OPEN : i64 = 1i64 ; pub const WRITE_MODE_BINARY : i64 = 1i64 ; pub const STATE_CLOSING : i64 = 2i64 ; pub const STATE_CLOSED : i64 = 3i64 ; } impl WebRTCDataChannel { # [doc = ""] # [doc = ""] # [inline] pub fn close (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . close ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_buffered_amount (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_buffered_amount ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_label (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_label ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_max_packet_life_time (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_max_packet_life_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_max_retransmits (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_max_retransmits ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_protocol (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_protocol ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_ready_state (& self) -> crate :: generated :: web_rtc_data_channel :: ChannelState { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_ready_state ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: web_rtc_data_channel :: ChannelState > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn write_mode (& self) -> crate :: generated :: web_rtc_data_channel :: WriteMode { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . get_write_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: web_rtc_data_channel :: WriteMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn is_negotiated (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . is_negotiated ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_ordered (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . is_ordered ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn poll (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_write_mode (& self , write_mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . set_write_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , write_mode as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn was_string_packet (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCDataChannelMethodTable :: get (get_api ()) . was_string_packet ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for WebRTCDataChannel { } unsafe impl GodotObject for WebRTCDataChannel { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebRTCDataChannel" } } impl std :: ops :: Deref for WebRTCDataChannel { type Target = crate :: generated :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebRTCDataChannel { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PacketPeer > for WebRTCDataChannel { } unsafe impl SubClass < crate :: generated :: Reference > for WebRTCDataChannel { } unsafe impl SubClass < crate :: generated :: Object > for WebRTCDataChannel { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebRTCDataChannelMethodTable { pub class_constructor : sys :: godot_class_constructor , pub close : * mut sys :: godot_method_bind , pub get_buffered_amount : * mut sys :: godot_method_bind , pub get_id : * mut sys :: godot_method_bind , pub get_label : * mut sys :: godot_method_bind , pub get_max_packet_life_time : * mut sys :: godot_method_bind , pub get_max_retransmits : * mut sys :: godot_method_bind , pub get_protocol : * mut sys :: godot_method_bind , pub get_ready_state : * mut sys :: godot_method_bind , pub get_write_mode : * mut sys :: godot_method_bind , pub is_negotiated : * mut sys :: godot_method_bind , pub is_ordered : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind , pub set_write_mode : * mut sys :: godot_method_bind , pub was_string_packet : * mut sys :: godot_method_bind } impl WebRTCDataChannelMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebRTCDataChannelMethodTable = WebRTCDataChannelMethodTable { class_constructor : None , close : 0 as * mut sys :: godot_method_bind , get_buffered_amount : 0 as * mut sys :: godot_method_bind , get_id : 0 as * mut sys :: godot_method_bind , get_label : 0 as * mut sys :: godot_method_bind , get_max_packet_life_time : 0 as * mut sys :: godot_method_bind , get_max_retransmits : 0 as * mut sys :: godot_method_bind , get_protocol : 0 as * mut sys :: godot_method_bind , get_ready_state : 0 as * mut sys :: godot_method_bind , get_write_mode : 0 as * mut sys :: godot_method_bind , is_negotiated : 0 as * mut sys :: godot_method_bind , is_ordered : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind , set_write_mode : 0 as * mut sys :: godot_method_bind , was_string_packet : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { WebRTCDataChannelMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebRTCDataChannel\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\0" . as_ptr () as * const c_char) ; table . get_buffered_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_buffered_amount\0" . as_ptr () as * const c_char) ; table . get_id = (gd_api . godot_method_bind_get_method) (class_name , "get_id\0" . as_ptr () as * const c_char) ; table . get_label = (gd_api . godot_method_bind_get_method) (class_name , "get_label\0" . as_ptr () as * const c_char) ; table . get_max_packet_life_time = (gd_api . godot_method_bind_get_method) (class_name , "get_max_packet_life_time\0" . as_ptr () as * const c_char) ; table . get_max_retransmits = (gd_api . godot_method_bind_get_method) (class_name , "get_max_retransmits\0" . as_ptr () as * const c_char) ; table . get_protocol = (gd_api . godot_method_bind_get_method) (class_name , "get_protocol\0" . as_ptr () as * const c_char) ; table . get_ready_state = (gd_api . godot_method_bind_get_method) (class_name , "get_ready_state\0" . as_ptr () as * const c_char) ; table . get_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_write_mode\0" . as_ptr () as * const c_char) ; table . is_negotiated = (gd_api . godot_method_bind_get_method) (class_name , "is_negotiated\0" . as_ptr () as * const c_char) ; table . is_ordered = (gd_api . godot_method_bind_get_method) (class_name , "is_ordered\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . set_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_write_mode\0" . as_ptr () as * const c_char) ; table . was_string_packet = (gd_api . godot_method_bind_get_method) (class_name , "was_string_packet\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::web_rtc_data_channel::private::WebRTCDataChannel;
            
            pub(crate) mod web_rtc_data_channel_gdnative {
                # ! [doc = "This module contains types related to the API class [`WebRTCDataChannelGDNative`][super::WebRTCDataChannelGDNative]."] pub (crate) mod private { # [doc = "`core class WebRTCDataChannelGDNative` inherits `WebRTCDataChannel` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_webrtcdatachannelgdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebRTCDataChannelGDNative inherits methods from:\n - [WebRTCDataChannel](struct.WebRTCDataChannel.html)\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebRTCDataChannelGDNative { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: WebRTCDataChannelGDNative ; impl WebRTCDataChannelGDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WebRTCDataChannelGDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for WebRTCDataChannelGDNative { } unsafe impl GodotObject for WebRTCDataChannelGDNative { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebRTCDataChannelGDNative" } } impl std :: ops :: Deref for WebRTCDataChannelGDNative { type Target = crate :: generated :: WebRTCDataChannel ; # [inline] fn deref (& self) -> & crate :: generated :: WebRTCDataChannel { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebRTCDataChannelGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: WebRTCDataChannel { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: WebRTCDataChannel > for WebRTCDataChannelGDNative { } unsafe impl SubClass < crate :: generated :: PacketPeer > for WebRTCDataChannelGDNative { } unsafe impl SubClass < crate :: generated :: Reference > for WebRTCDataChannelGDNative { } unsafe impl SubClass < crate :: generated :: Object > for WebRTCDataChannelGDNative { } impl Instanciable for WebRTCDataChannelGDNative { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { WebRTCDataChannelGDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebRTCDataChannelGDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl WebRTCDataChannelGDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebRTCDataChannelGDNativeMethodTable = WebRTCDataChannelGDNativeMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { WebRTCDataChannelGDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebRTCDataChannelGDNative\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::web_rtc_data_channel_gdnative::private::WebRTCDataChannelGDNative;
            
            pub(crate) mod web_rtc_multiplayer {
                # ! [doc = "This module contains types related to the API class [`WebRTCMultiplayer`][super::WebRTCMultiplayer]."] pub (crate) mod private { # [doc = "`core class WebRTCMultiplayer` inherits `NetworkedMultiplayerPeer` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_webrtcmultiplayer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebRTCMultiplayer inherits methods from:\n - [NetworkedMultiplayerPeer](struct.NetworkedMultiplayerPeer.html)\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebRTCMultiplayer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: WebRTCMultiplayer ; impl WebRTCMultiplayer { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WebRTCMultiplayerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_peer (& self , peer : impl AsArg < crate :: generated :: WebRTCPeerConnection > , peer_id : i64 , unreliable_lifetime : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCMultiplayerMethodTable :: get (get_api ()) . add_peer ; let ret = crate :: icalls :: icallvar__obj_i64_i64 (method_bind , self . this . sys () . as_ptr () , peer . as_arg_ptr () , peer_id as _ , unreliable_lifetime as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn close (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCMultiplayerMethodTable :: get (get_api ()) . close ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_peer (& self , peer_id : i64) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCMultiplayerMethodTable :: get (get_api ()) . get_peer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , peer_id as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_peers (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCMultiplayerMethodTable :: get (get_api ()) . get_peers ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn has_peer (& self , peer_id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCMultiplayerMethodTable :: get (get_api ()) . has_peer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , peer_id as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn initialize (& self , peer_id : i64 , server_compatibility : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCMultiplayerMethodTable :: get (get_api ()) . initialize ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , peer_id as _ , server_compatibility as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_peer (& self , peer_id : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCMultiplayerMethodTable :: get (get_api ()) . remove_peer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , peer_id as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for WebRTCMultiplayer { } unsafe impl GodotObject for WebRTCMultiplayer { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebRTCMultiplayer" } } impl std :: ops :: Deref for WebRTCMultiplayer { type Target = crate :: generated :: NetworkedMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebRTCMultiplayer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: NetworkedMultiplayerPeer > for WebRTCMultiplayer { } unsafe impl SubClass < crate :: generated :: PacketPeer > for WebRTCMultiplayer { } unsafe impl SubClass < crate :: generated :: Reference > for WebRTCMultiplayer { } unsafe impl SubClass < crate :: generated :: Object > for WebRTCMultiplayer { } impl Instanciable for WebRTCMultiplayer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { WebRTCMultiplayer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebRTCMultiplayerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_peer : * mut sys :: godot_method_bind , pub close : * mut sys :: godot_method_bind , pub get_peer : * mut sys :: godot_method_bind , pub get_peers : * mut sys :: godot_method_bind , pub has_peer : * mut sys :: godot_method_bind , pub initialize : * mut sys :: godot_method_bind , pub remove_peer : * mut sys :: godot_method_bind } impl WebRTCMultiplayerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebRTCMultiplayerMethodTable = WebRTCMultiplayerMethodTable { class_constructor : None , add_peer : 0 as * mut sys :: godot_method_bind , close : 0 as * mut sys :: godot_method_bind , get_peer : 0 as * mut sys :: godot_method_bind , get_peers : 0 as * mut sys :: godot_method_bind , has_peer : 0 as * mut sys :: godot_method_bind , initialize : 0 as * mut sys :: godot_method_bind , remove_peer : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { WebRTCMultiplayerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebRTCMultiplayer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_peer = (gd_api . godot_method_bind_get_method) (class_name , "add_peer\0" . as_ptr () as * const c_char) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\0" . as_ptr () as * const c_char) ; table . get_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_peer\0" . as_ptr () as * const c_char) ; table . get_peers = (gd_api . godot_method_bind_get_method) (class_name , "get_peers\0" . as_ptr () as * const c_char) ; table . has_peer = (gd_api . godot_method_bind_get_method) (class_name , "has_peer\0" . as_ptr () as * const c_char) ; table . initialize = (gd_api . godot_method_bind_get_method) (class_name , "initialize\0" . as_ptr () as * const c_char) ; table . remove_peer = (gd_api . godot_method_bind_get_method) (class_name , "remove_peer\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::web_rtc_multiplayer::private::WebRTCMultiplayer;
            
            pub mod web_rtc_peer_connection {
                # ! [doc = "This module contains types related to the API class [`WebRTCPeerConnection`][super::WebRTCPeerConnection]."] pub (crate) mod private { # [doc = "`core class WebRTCPeerConnection` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`web_rtc_peer_connection`][super::web_rtc_peer_connection] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_webrtcpeerconnection.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebRTCPeerConnection inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebRTCPeerConnection { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: WebRTCPeerConnection ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ConnectionState (pub i64) ; impl ConnectionState { pub const NEW : ConnectionState = ConnectionState (0i64) ; pub const CONNECTING : ConnectionState = ConnectionState (1i64) ; pub const CONNECTED : ConnectionState = ConnectionState (2i64) ; pub const DISCONNECTED : ConnectionState = ConnectionState (3i64) ; pub const FAILED : ConnectionState = ConnectionState (4i64) ; pub const CLOSED : ConnectionState = ConnectionState (5i64) ; } impl From < i64 > for ConnectionState { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ConnectionState > for i64 { # [inline] fn from (v : ConnectionState) -> Self { v . 0 } } impl FromVariant for ConnectionState { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl WebRTCPeerConnection { pub const STATE_NEW : i64 = 0i64 ; pub const STATE_CONNECTING : i64 = 1i64 ; pub const STATE_CONNECTED : i64 = 2i64 ; pub const STATE_DISCONNECTED : i64 = 3i64 ; pub const STATE_FAILED : i64 = 4i64 ; pub const STATE_CLOSED : i64 = 5i64 ; } impl WebRTCPeerConnection { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WebRTCPeerConnectionMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_ice_candidate (& self , media : impl Into < GodotString > , index : i64 , name : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCPeerConnectionMethodTable :: get (get_api ()) . add_ice_candidate ; let ret = crate :: icalls :: icallvar__str_i64_str (method_bind , self . this . sys () . as_ptr () , media . into () , index as _ , name . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn close (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCPeerConnectionMethodTable :: get (get_api ()) . close ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn create_data_channel (& self , label : impl Into < GodotString > , options : Dictionary) -> Option < Ref < crate :: generated :: WebRTCDataChannel , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCPeerConnectionMethodTable :: get (get_api ()) . create_data_channel ; let ret = crate :: icalls :: icallvar__str_dict (method_bind , self . this . sys () . as_ptr () , label . into () , options) ; < Option < Ref < crate :: generated :: WebRTCDataChannel , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn create_offer (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCPeerConnectionMethodTable :: get (get_api ()) . create_offer ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_connection_state (& self) -> crate :: generated :: web_rtc_peer_connection :: ConnectionState { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCPeerConnectionMethodTable :: get (get_api ()) . get_connection_state ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: web_rtc_peer_connection :: ConnectionState > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn initialize (& self , configuration : Dictionary) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCPeerConnectionMethodTable :: get (get_api ()) . initialize ; let ret = crate :: icalls :: icallvar__dict (method_bind , self . this . sys () . as_ptr () , configuration) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn poll (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCPeerConnectionMethodTable :: get (get_api ()) . poll ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_local_description (& self , type_ : impl Into < GodotString > , sdp : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCPeerConnectionMethodTable :: get (get_api ()) . set_local_description ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , type_ . into () , sdp . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_remote_description (& self , type_ : impl Into < GodotString > , sdp : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebRTCPeerConnectionMethodTable :: get (get_api ()) . set_remote_description ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , type_ . into () , sdp . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } } impl gdnative_core :: private :: godot_object :: Sealed for WebRTCPeerConnection { } unsafe impl GodotObject for WebRTCPeerConnection { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebRTCPeerConnection" } } impl std :: ops :: Deref for WebRTCPeerConnection { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebRTCPeerConnection { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for WebRTCPeerConnection { } unsafe impl SubClass < crate :: generated :: Object > for WebRTCPeerConnection { } impl Instanciable for WebRTCPeerConnection { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { WebRTCPeerConnection :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebRTCPeerConnectionMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_ice_candidate : * mut sys :: godot_method_bind , pub close : * mut sys :: godot_method_bind , pub create_data_channel : * mut sys :: godot_method_bind , pub create_offer : * mut sys :: godot_method_bind , pub get_connection_state : * mut sys :: godot_method_bind , pub initialize : * mut sys :: godot_method_bind , pub poll : * mut sys :: godot_method_bind , pub set_local_description : * mut sys :: godot_method_bind , pub set_remote_description : * mut sys :: godot_method_bind } impl WebRTCPeerConnectionMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebRTCPeerConnectionMethodTable = WebRTCPeerConnectionMethodTable { class_constructor : None , add_ice_candidate : 0 as * mut sys :: godot_method_bind , close : 0 as * mut sys :: godot_method_bind , create_data_channel : 0 as * mut sys :: godot_method_bind , create_offer : 0 as * mut sys :: godot_method_bind , get_connection_state : 0 as * mut sys :: godot_method_bind , initialize : 0 as * mut sys :: godot_method_bind , poll : 0 as * mut sys :: godot_method_bind , set_local_description : 0 as * mut sys :: godot_method_bind , set_remote_description : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { WebRTCPeerConnectionMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebRTCPeerConnection\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_ice_candidate = (gd_api . godot_method_bind_get_method) (class_name , "add_ice_candidate\0" . as_ptr () as * const c_char) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\0" . as_ptr () as * const c_char) ; table . create_data_channel = (gd_api . godot_method_bind_get_method) (class_name , "create_data_channel\0" . as_ptr () as * const c_char) ; table . create_offer = (gd_api . godot_method_bind_get_method) (class_name , "create_offer\0" . as_ptr () as * const c_char) ; table . get_connection_state = (gd_api . godot_method_bind_get_method) (class_name , "get_connection_state\0" . as_ptr () as * const c_char) ; table . initialize = (gd_api . godot_method_bind_get_method) (class_name , "initialize\0" . as_ptr () as * const c_char) ; table . poll = (gd_api . godot_method_bind_get_method) (class_name , "poll\0" . as_ptr () as * const c_char) ; table . set_local_description = (gd_api . godot_method_bind_get_method) (class_name , "set_local_description\0" . as_ptr () as * const c_char) ; table . set_remote_description = (gd_api . godot_method_bind_get_method) (class_name , "set_remote_description\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::web_rtc_peer_connection::private::WebRTCPeerConnection;
            
            pub(crate) mod web_rtc_peer_connection_gdnative {
                # ! [doc = "This module contains types related to the API class [`WebRTCPeerConnectionGDNative`][super::WebRTCPeerConnectionGDNative]."] pub (crate) mod private { # [doc = "`core class WebRTCPeerConnectionGDNative` inherits `WebRTCPeerConnection` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_webrtcpeerconnectiongdnative.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebRTCPeerConnectionGDNative inherits methods from:\n - [WebRTCPeerConnection](struct.WebRTCPeerConnection.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebRTCPeerConnectionGDNative { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: WebRTCPeerConnectionGDNative ; impl WebRTCPeerConnectionGDNative { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WebRTCPeerConnectionGDNativeMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } } impl gdnative_core :: private :: godot_object :: Sealed for WebRTCPeerConnectionGDNative { } unsafe impl GodotObject for WebRTCPeerConnectionGDNative { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebRTCPeerConnectionGDNative" } } impl std :: ops :: Deref for WebRTCPeerConnectionGDNative { type Target = crate :: generated :: WebRTCPeerConnection ; # [inline] fn deref (& self) -> & crate :: generated :: WebRTCPeerConnection { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebRTCPeerConnectionGDNative { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: WebRTCPeerConnection { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: WebRTCPeerConnection > for WebRTCPeerConnectionGDNative { } unsafe impl SubClass < crate :: generated :: Reference > for WebRTCPeerConnectionGDNative { } unsafe impl SubClass < crate :: generated :: Object > for WebRTCPeerConnectionGDNative { } impl Instanciable for WebRTCPeerConnectionGDNative { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { WebRTCPeerConnectionGDNative :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebRTCPeerConnectionGDNativeMethodTable { pub class_constructor : sys :: godot_class_constructor , } impl WebRTCPeerConnectionGDNativeMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebRTCPeerConnectionGDNativeMethodTable = WebRTCPeerConnectionGDNativeMethodTable { class_constructor : None , } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { WebRTCPeerConnectionGDNativeMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebRTCPeerConnectionGDNative\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; } } }
                use super::*;
            }
            pub use crate::generated::web_rtc_peer_connection_gdnative::private::WebRTCPeerConnectionGDNative;
            
            pub(crate) mod web_socket_client {
                # ! [doc = "This module contains types related to the API class [`WebSocketClient`][super::WebSocketClient]."] pub (crate) mod private { # [doc = "`core class WebSocketClient` inherits `WebSocketMultiplayerPeer` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_websocketclient.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebSocketClient inherits methods from:\n - [WebSocketMultiplayerPeer](struct.WebSocketMultiplayerPeer.html)\n - [NetworkedMultiplayerPeer](struct.NetworkedMultiplayerPeer.html)\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebSocketClient { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: WebSocketClient ; impl WebSocketClient { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WebSocketClientMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn connect_to_url (& self , url : impl Into < GodotString > , protocols : PoolArray < GodotString > , gd_mp_api : bool , custom_headers : PoolArray < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . connect_to_url ; let ret = crate :: icalls :: icallvar__str_strarr_bool_strarr (method_bind , self . this . sys () . as_ptr () , url . into () , protocols , gd_mp_api as _ , custom_headers) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn disconnect_from_host (& self , code : i64 , reason : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . disconnect_from_host ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , code as _ , reason . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_connected_host (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . get_connected_host ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_connected_port (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . get_connected_port ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn trusted_ssl_certificate (& self) -> Option < Ref < crate :: generated :: X509Certificate , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . get_trusted_ssl_certificate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: X509Certificate , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn is_verify_ssl_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . is_verify_ssl_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_trusted_ssl_certificate (& self , certificate : impl AsArg < crate :: generated :: X509Certificate >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . set_trusted_ssl_certificate ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , certificate . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_verify_ssl_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketClientMethodTable :: get (get_api ()) . set_verify_ssl_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for WebSocketClient { } unsafe impl GodotObject for WebSocketClient { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebSocketClient" } } impl std :: ops :: Deref for WebSocketClient { type Target = crate :: generated :: WebSocketMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: WebSocketMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebSocketClient { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: WebSocketMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: WebSocketMultiplayerPeer > for WebSocketClient { } unsafe impl SubClass < crate :: generated :: NetworkedMultiplayerPeer > for WebSocketClient { } unsafe impl SubClass < crate :: generated :: PacketPeer > for WebSocketClient { } unsafe impl SubClass < crate :: generated :: Reference > for WebSocketClient { } unsafe impl SubClass < crate :: generated :: Object > for WebSocketClient { } impl Instanciable for WebSocketClient { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { WebSocketClient :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebSocketClientMethodTable { pub class_constructor : sys :: godot_class_constructor , pub connect_to_url : * mut sys :: godot_method_bind , pub disconnect_from_host : * mut sys :: godot_method_bind , pub get_connected_host : * mut sys :: godot_method_bind , pub get_connected_port : * mut sys :: godot_method_bind , pub get_trusted_ssl_certificate : * mut sys :: godot_method_bind , pub is_verify_ssl_enabled : * mut sys :: godot_method_bind , pub set_trusted_ssl_certificate : * mut sys :: godot_method_bind , pub set_verify_ssl_enabled : * mut sys :: godot_method_bind } impl WebSocketClientMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebSocketClientMethodTable = WebSocketClientMethodTable { class_constructor : None , connect_to_url : 0 as * mut sys :: godot_method_bind , disconnect_from_host : 0 as * mut sys :: godot_method_bind , get_connected_host : 0 as * mut sys :: godot_method_bind , get_connected_port : 0 as * mut sys :: godot_method_bind , get_trusted_ssl_certificate : 0 as * mut sys :: godot_method_bind , is_verify_ssl_enabled : 0 as * mut sys :: godot_method_bind , set_trusted_ssl_certificate : 0 as * mut sys :: godot_method_bind , set_verify_ssl_enabled : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { WebSocketClientMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebSocketClient\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . connect_to_url = (gd_api . godot_method_bind_get_method) (class_name , "connect_to_url\0" . as_ptr () as * const c_char) ; table . disconnect_from_host = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_from_host\0" . as_ptr () as * const c_char) ; table . get_connected_host = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_host\0" . as_ptr () as * const c_char) ; table . get_connected_port = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_port\0" . as_ptr () as * const c_char) ; table . get_trusted_ssl_certificate = (gd_api . godot_method_bind_get_method) (class_name , "get_trusted_ssl_certificate\0" . as_ptr () as * const c_char) ; table . is_verify_ssl_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_verify_ssl_enabled\0" . as_ptr () as * const c_char) ; table . set_trusted_ssl_certificate = (gd_api . godot_method_bind_get_method) (class_name , "set_trusted_ssl_certificate\0" . as_ptr () as * const c_char) ; table . set_verify_ssl_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_verify_ssl_enabled\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::web_socket_client::private::WebSocketClient;
            
            pub(crate) mod web_socket_multiplayer_peer {
                # ! [doc = "This module contains types related to the API class [`WebSocketMultiplayerPeer`][super::WebSocketMultiplayerPeer]."] pub (crate) mod private { # [doc = "`core class WebSocketMultiplayerPeer` inherits `NetworkedMultiplayerPeer` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_websocketmultiplayerpeer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebSocketMultiplayerPeer inherits methods from:\n - [NetworkedMultiplayerPeer](struct.NetworkedMultiplayerPeer.html)\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebSocketMultiplayerPeer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: WebSocketMultiplayerPeer ; impl WebSocketMultiplayerPeer { # [doc = ""] # [doc = ""] # [inline] pub fn get_peer (& self , peer_id : i64) -> Option < Ref < crate :: generated :: WebSocketPeer , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketMultiplayerPeerMethodTable :: get (get_api ()) . get_peer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , peer_id as _) ; < Option < Ref < crate :: generated :: WebSocketPeer , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn set_buffers (& self , input_buffer_size_kb : i64 , input_max_packets : i64 , output_buffer_size_kb : i64 , output_max_packets : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketMultiplayerPeerMethodTable :: get (get_api ()) . set_buffers ; let ret = crate :: icalls :: icallvar__i64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , input_buffer_size_kb as _ , input_max_packets as _ , output_buffer_size_kb as _ , output_max_packets as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } } impl gdnative_core :: private :: godot_object :: Sealed for WebSocketMultiplayerPeer { } unsafe impl GodotObject for WebSocketMultiplayerPeer { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebSocketMultiplayerPeer" } } impl std :: ops :: Deref for WebSocketMultiplayerPeer { type Target = crate :: generated :: NetworkedMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebSocketMultiplayerPeer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: NetworkedMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: NetworkedMultiplayerPeer > for WebSocketMultiplayerPeer { } unsafe impl SubClass < crate :: generated :: PacketPeer > for WebSocketMultiplayerPeer { } unsafe impl SubClass < crate :: generated :: Reference > for WebSocketMultiplayerPeer { } unsafe impl SubClass < crate :: generated :: Object > for WebSocketMultiplayerPeer { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebSocketMultiplayerPeerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_peer : * mut sys :: godot_method_bind , pub set_buffers : * mut sys :: godot_method_bind } impl WebSocketMultiplayerPeerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebSocketMultiplayerPeerMethodTable = WebSocketMultiplayerPeerMethodTable { class_constructor : None , get_peer : 0 as * mut sys :: godot_method_bind , set_buffers : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { WebSocketMultiplayerPeerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebSocketMultiplayerPeer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_peer = (gd_api . godot_method_bind_get_method) (class_name , "get_peer\0" . as_ptr () as * const c_char) ; table . set_buffers = (gd_api . godot_method_bind_get_method) (class_name , "set_buffers\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::web_socket_multiplayer_peer::private::WebSocketMultiplayerPeer;
            
            pub mod web_socket_peer {
                # ! [doc = "This module contains types related to the API class [`WebSocketPeer`][super::WebSocketPeer]."] pub (crate) mod private { # [doc = "`core class WebSocketPeer` inherits `PacketPeer` (reference-counted).\n\nThis class has related types in the [`web_socket_peer`][super::web_socket_peer] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_websocketpeer.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebSocketPeer inherits methods from:\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebSocketPeer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: WebSocketPeer ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct WriteMode (pub i64) ; impl WriteMode { pub const TEXT : WriteMode = WriteMode (0i64) ; pub const BINARY : WriteMode = WriteMode (1i64) ; } impl From < i64 > for WriteMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < WriteMode > for i64 { # [inline] fn from (v : WriteMode) -> Self { v . 0 } } impl FromVariant for WriteMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl WebSocketPeer { pub const WRITE_MODE_TEXT : i64 = 0i64 ; pub const WRITE_MODE_BINARY : i64 = 1i64 ; } impl WebSocketPeer { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WebSocketPeerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn close (& self , code : i64 , reason : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . close ; let ret = crate :: icalls :: icallvar__i64_str (method_bind , self . this . sys () . as_ptr () , code as _ , reason . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn get_connected_host (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . get_connected_host ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_connected_port (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . get_connected_port ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_current_outbound_buffered_amount (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . get_current_outbound_buffered_amount ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_write_mode (& self) -> crate :: generated :: web_socket_peer :: WriteMode { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . get_write_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: web_socket_peer :: WriteMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn is_connected_to_host (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . is_connected_to_host ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_no_delay (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . set_no_delay ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_write_mode (& self , mode : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . set_write_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , mode as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn was_string_packet (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketPeerMethodTable :: get (get_api ()) . was_string_packet ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for WebSocketPeer { } unsafe impl GodotObject for WebSocketPeer { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebSocketPeer" } } impl std :: ops :: Deref for WebSocketPeer { type Target = crate :: generated :: PacketPeer ; # [inline] fn deref (& self) -> & crate :: generated :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebSocketPeer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: PacketPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: PacketPeer > for WebSocketPeer { } unsafe impl SubClass < crate :: generated :: Reference > for WebSocketPeer { } unsafe impl SubClass < crate :: generated :: Object > for WebSocketPeer { } impl Instanciable for WebSocketPeer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { WebSocketPeer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebSocketPeerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub close : * mut sys :: godot_method_bind , pub get_connected_host : * mut sys :: godot_method_bind , pub get_connected_port : * mut sys :: godot_method_bind , pub get_current_outbound_buffered_amount : * mut sys :: godot_method_bind , pub get_write_mode : * mut sys :: godot_method_bind , pub is_connected_to_host : * mut sys :: godot_method_bind , pub set_no_delay : * mut sys :: godot_method_bind , pub set_write_mode : * mut sys :: godot_method_bind , pub was_string_packet : * mut sys :: godot_method_bind } impl WebSocketPeerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebSocketPeerMethodTable = WebSocketPeerMethodTable { class_constructor : None , close : 0 as * mut sys :: godot_method_bind , get_connected_host : 0 as * mut sys :: godot_method_bind , get_connected_port : 0 as * mut sys :: godot_method_bind , get_current_outbound_buffered_amount : 0 as * mut sys :: godot_method_bind , get_write_mode : 0 as * mut sys :: godot_method_bind , is_connected_to_host : 0 as * mut sys :: godot_method_bind , set_no_delay : 0 as * mut sys :: godot_method_bind , set_write_mode : 0 as * mut sys :: godot_method_bind , was_string_packet : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { WebSocketPeerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebSocketPeer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\0" . as_ptr () as * const c_char) ; table . get_connected_host = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_host\0" . as_ptr () as * const c_char) ; table . get_connected_port = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_port\0" . as_ptr () as * const c_char) ; table . get_current_outbound_buffered_amount = (gd_api . godot_method_bind_get_method) (class_name , "get_current_outbound_buffered_amount\0" . as_ptr () as * const c_char) ; table . get_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_write_mode\0" . as_ptr () as * const c_char) ; table . is_connected_to_host = (gd_api . godot_method_bind_get_method) (class_name , "is_connected_to_host\0" . as_ptr () as * const c_char) ; table . set_no_delay = (gd_api . godot_method_bind_get_method) (class_name , "set_no_delay\0" . as_ptr () as * const c_char) ; table . set_write_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_write_mode\0" . as_ptr () as * const c_char) ; table . was_string_packet = (gd_api . godot_method_bind_get_method) (class_name , "was_string_packet\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::web_socket_peer::private::WebSocketPeer;
            
            pub(crate) mod web_socket_server {
                # ! [doc = "This module contains types related to the API class [`WebSocketServer`][super::WebSocketServer]."] pub (crate) mod private { # [doc = "`core class WebSocketServer` inherits `WebSocketMultiplayerPeer` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_websocketserver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebSocketServer inherits methods from:\n - [WebSocketMultiplayerPeer](struct.WebSocketMultiplayerPeer.html)\n - [NetworkedMultiplayerPeer](struct.NetworkedMultiplayerPeer.html)\n - [PacketPeer](struct.PacketPeer.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebSocketServer { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: WebSocketServer ; impl WebSocketServer { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WebSocketServerMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = ""] # [doc = ""] # [inline] pub fn disconnect_peer (& self , id : i64 , code : i64 , reason : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . disconnect_peer ; let ret = crate :: icalls :: icallvar__i64_i64_str (method_bind , self . this . sys () . as_ptr () , id as _ , code as _ , reason . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn bind_ip (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_bind_ip ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn ca_chain (& self) -> Option < Ref < crate :: generated :: X509Certificate , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_ca_chain ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: X509Certificate , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn handshake_timeout (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_handshake_timeout ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn get_peer_address (& self , id : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_peer_address ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_peer_port (& self , id : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_peer_port ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn private_key (& self) -> Option < Ref < crate :: generated :: CryptoKey , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_private_key ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: CryptoKey , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn ssl_certificate (& self) -> Option < Ref < crate :: generated :: X509Certificate , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . get_ssl_certificate ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: X509Certificate , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn has_peer (& self , id : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . has_peer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , id as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_listening (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . is_listening ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn listen (& self , port : i64 , protocols : PoolArray < GodotString > , gd_mp_api : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . listen ; let ret = crate :: icalls :: icallvar__i64_strarr_bool (method_bind , self . this . sys () . as_ptr () , port as _ , protocols , gd_mp_api as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = ""] # [doc = ""] # [inline] pub fn set_bind_ip (& self , ip : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . set_bind_ip ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , ip . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_ca_chain (& self , ca_chain : impl AsArg < crate :: generated :: X509Certificate >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . set_ca_chain ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , ca_chain . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_extra_headers (& self , headers : PoolArray < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . set_extra_headers ; let ret = crate :: icalls :: icallvar__strarr (method_bind , self . this . sys () . as_ptr () , headers) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_handshake_timeout (& self , timeout : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . set_handshake_timeout ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , timeout as _) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_private_key (& self , key : impl AsArg < crate :: generated :: CryptoKey >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . set_private_key ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , key . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_ssl_certificate (& self , certificate : impl AsArg < crate :: generated :: X509Certificate >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . set_ssl_certificate ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , certificate . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebSocketServerMethodTable :: get (get_api ()) . stop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for WebSocketServer { } unsafe impl GodotObject for WebSocketServer { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebSocketServer" } } impl std :: ops :: Deref for WebSocketServer { type Target = crate :: generated :: WebSocketMultiplayerPeer ; # [inline] fn deref (& self) -> & crate :: generated :: WebSocketMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebSocketServer { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: WebSocketMultiplayerPeer { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: WebSocketMultiplayerPeer > for WebSocketServer { } unsafe impl SubClass < crate :: generated :: NetworkedMultiplayerPeer > for WebSocketServer { } unsafe impl SubClass < crate :: generated :: PacketPeer > for WebSocketServer { } unsafe impl SubClass < crate :: generated :: Reference > for WebSocketServer { } unsafe impl SubClass < crate :: generated :: Object > for WebSocketServer { } impl Instanciable for WebSocketServer { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { WebSocketServer :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebSocketServerMethodTable { pub class_constructor : sys :: godot_class_constructor , pub disconnect_peer : * mut sys :: godot_method_bind , pub get_bind_ip : * mut sys :: godot_method_bind , pub get_ca_chain : * mut sys :: godot_method_bind , pub get_handshake_timeout : * mut sys :: godot_method_bind , pub get_peer_address : * mut sys :: godot_method_bind , pub get_peer_port : * mut sys :: godot_method_bind , pub get_private_key : * mut sys :: godot_method_bind , pub get_ssl_certificate : * mut sys :: godot_method_bind , pub has_peer : * mut sys :: godot_method_bind , pub is_listening : * mut sys :: godot_method_bind , pub listen : * mut sys :: godot_method_bind , pub set_bind_ip : * mut sys :: godot_method_bind , pub set_ca_chain : * mut sys :: godot_method_bind , pub set_extra_headers : * mut sys :: godot_method_bind , pub set_handshake_timeout : * mut sys :: godot_method_bind , pub set_private_key : * mut sys :: godot_method_bind , pub set_ssl_certificate : * mut sys :: godot_method_bind , pub stop : * mut sys :: godot_method_bind } impl WebSocketServerMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebSocketServerMethodTable = WebSocketServerMethodTable { class_constructor : None , disconnect_peer : 0 as * mut sys :: godot_method_bind , get_bind_ip : 0 as * mut sys :: godot_method_bind , get_ca_chain : 0 as * mut sys :: godot_method_bind , get_handshake_timeout : 0 as * mut sys :: godot_method_bind , get_peer_address : 0 as * mut sys :: godot_method_bind , get_peer_port : 0 as * mut sys :: godot_method_bind , get_private_key : 0 as * mut sys :: godot_method_bind , get_ssl_certificate : 0 as * mut sys :: godot_method_bind , has_peer : 0 as * mut sys :: godot_method_bind , is_listening : 0 as * mut sys :: godot_method_bind , listen : 0 as * mut sys :: godot_method_bind , set_bind_ip : 0 as * mut sys :: godot_method_bind , set_ca_chain : 0 as * mut sys :: godot_method_bind , set_extra_headers : 0 as * mut sys :: godot_method_bind , set_handshake_timeout : 0 as * mut sys :: godot_method_bind , set_private_key : 0 as * mut sys :: godot_method_bind , set_ssl_certificate : 0 as * mut sys :: godot_method_bind , stop : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { WebSocketServerMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebSocketServer\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . disconnect_peer = (gd_api . godot_method_bind_get_method) (class_name , "disconnect_peer\0" . as_ptr () as * const c_char) ; table . get_bind_ip = (gd_api . godot_method_bind_get_method) (class_name , "get_bind_ip\0" . as_ptr () as * const c_char) ; table . get_ca_chain = (gd_api . godot_method_bind_get_method) (class_name , "get_ca_chain\0" . as_ptr () as * const c_char) ; table . get_handshake_timeout = (gd_api . godot_method_bind_get_method) (class_name , "get_handshake_timeout\0" . as_ptr () as * const c_char) ; table . get_peer_address = (gd_api . godot_method_bind_get_method) (class_name , "get_peer_address\0" . as_ptr () as * const c_char) ; table . get_peer_port = (gd_api . godot_method_bind_get_method) (class_name , "get_peer_port\0" . as_ptr () as * const c_char) ; table . get_private_key = (gd_api . godot_method_bind_get_method) (class_name , "get_private_key\0" . as_ptr () as * const c_char) ; table . get_ssl_certificate = (gd_api . godot_method_bind_get_method) (class_name , "get_ssl_certificate\0" . as_ptr () as * const c_char) ; table . has_peer = (gd_api . godot_method_bind_get_method) (class_name , "has_peer\0" . as_ptr () as * const c_char) ; table . is_listening = (gd_api . godot_method_bind_get_method) (class_name , "is_listening\0" . as_ptr () as * const c_char) ; table . listen = (gd_api . godot_method_bind_get_method) (class_name , "listen\0" . as_ptr () as * const c_char) ; table . set_bind_ip = (gd_api . godot_method_bind_get_method) (class_name , "set_bind_ip\0" . as_ptr () as * const c_char) ; table . set_ca_chain = (gd_api . godot_method_bind_get_method) (class_name , "set_ca_chain\0" . as_ptr () as * const c_char) ; table . set_extra_headers = (gd_api . godot_method_bind_get_method) (class_name , "set_extra_headers\0" . as_ptr () as * const c_char) ; table . set_handshake_timeout = (gd_api . godot_method_bind_get_method) (class_name , "set_handshake_timeout\0" . as_ptr () as * const c_char) ; table . set_private_key = (gd_api . godot_method_bind_get_method) (class_name , "set_private_key\0" . as_ptr () as * const c_char) ; table . set_ssl_certificate = (gd_api . godot_method_bind_get_method) (class_name , "set_ssl_certificate\0" . as_ptr () as * const c_char) ; table . stop = (gd_api . godot_method_bind_get_method) (class_name , "stop\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::web_socket_server::private::WebSocketServer;
            
            pub mod web_xr_interface {
                # ! [doc = "This module contains types related to the API class [`WebXRInterface`][super::WebXRInterface]."] pub (crate) mod private { # [doc = "`core class WebXRInterface` inherits `ARVRInterface` (reference-counted).\n\nThis class has related types in the [`web_xr_interface`][super::web_xr_interface] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_webxrinterface.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWebXRInterface inherits methods from:\n - [ARVRInterface](struct.ARVRInterface.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WebXRInterface { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: WebXRInterface ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct TargetRayMode (pub i64) ; impl TargetRayMode { pub const UNKNOWN : TargetRayMode = TargetRayMode (0i64) ; pub const GAZE : TargetRayMode = TargetRayMode (1i64) ; pub const TRACKED_POINTER : TargetRayMode = TargetRayMode (2i64) ; pub const SCREEN : TargetRayMode = TargetRayMode (3i64) ; } impl From < i64 > for TargetRayMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < TargetRayMode > for i64 { # [inline] fn from (v : TargetRayMode) -> Self { v . 0 } } impl FromVariant for TargetRayMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl WebXRInterface { pub const TARGET_RAY_MODE_UNKNOWN : i64 = 0i64 ; pub const TARGET_RAY_MODE_GAZE : i64 = 1i64 ; pub const TARGET_RAY_MODE_TRACKED_POINTER : i64 = 2i64 ; pub const TARGET_RAY_MODE_SCREEN : i64 = 3i64 ; } impl WebXRInterface { # [doc = ""] # [doc = ""] # [inline] pub fn bounds_geometry (& self) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_bounds_geometry ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_controller (& self , controller_id : i64) -> Option < Ref < crate :: generated :: ARVRPositionalTracker , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_controller ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , controller_id as _) ; < Option < Ref < crate :: generated :: ARVRPositionalTracker , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn get_controller_target_ray_mode (& self , controller_id : i64) -> crate :: generated :: web_xr_interface :: TargetRayMode { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_controller_target_ray_mode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , controller_id as _) ; < crate :: generated :: web_xr_interface :: TargetRayMode > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn optional_features (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_optional_features ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn reference_space_type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_reference_space_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn requested_reference_space_types (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_requested_reference_space_types ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn required_features (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_required_features ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn session_mode (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_session_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn visibility_state (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_visibility_state ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = ""] # [doc = ""] # [inline] pub fn xr_standard_mapping (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . get_xr_standard_mapping ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = ""] # [doc = ""] # [inline] pub fn is_session_supported (& self , session_mode : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . is_session_supported ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , session_mode . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_optional_features (& self , optional_features : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . set_optional_features ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , optional_features . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_requested_reference_space_types (& self , requested_reference_space_types : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . set_requested_reference_space_types ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , requested_reference_space_types . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_required_features (& self , required_features : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . set_required_features ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , required_features . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_session_mode (& self , session_mode : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . set_session_mode ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , session_mode . into ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn set_xr_standard_mapping (& self , arg0 : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WebXRInterfaceMethodTable :: get (get_api ()) . set_xr_standard_mapping ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , arg0 as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for WebXRInterface { } unsafe impl GodotObject for WebXRInterface { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "WebXRInterface" } } impl std :: ops :: Deref for WebXRInterface { type Target = crate :: generated :: ARVRInterface ; # [inline] fn deref (& self) -> & crate :: generated :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WebXRInterface { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: ARVRInterface { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: ARVRInterface > for WebXRInterface { } unsafe impl SubClass < crate :: generated :: Reference > for WebXRInterface { } unsafe impl SubClass < crate :: generated :: Object > for WebXRInterface { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WebXRInterfaceMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_bounds_geometry : * mut sys :: godot_method_bind , pub get_controller : * mut sys :: godot_method_bind , pub get_controller_target_ray_mode : * mut sys :: godot_method_bind , pub get_optional_features : * mut sys :: godot_method_bind , pub get_reference_space_type : * mut sys :: godot_method_bind , pub get_requested_reference_space_types : * mut sys :: godot_method_bind , pub get_required_features : * mut sys :: godot_method_bind , pub get_session_mode : * mut sys :: godot_method_bind , pub get_visibility_state : * mut sys :: godot_method_bind , pub get_xr_standard_mapping : * mut sys :: godot_method_bind , pub is_session_supported : * mut sys :: godot_method_bind , pub set_optional_features : * mut sys :: godot_method_bind , pub set_requested_reference_space_types : * mut sys :: godot_method_bind , pub set_required_features : * mut sys :: godot_method_bind , pub set_session_mode : * mut sys :: godot_method_bind , pub set_xr_standard_mapping : * mut sys :: godot_method_bind } impl WebXRInterfaceMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WebXRInterfaceMethodTable = WebXRInterfaceMethodTable { class_constructor : None , get_bounds_geometry : 0 as * mut sys :: godot_method_bind , get_controller : 0 as * mut sys :: godot_method_bind , get_controller_target_ray_mode : 0 as * mut sys :: godot_method_bind , get_optional_features : 0 as * mut sys :: godot_method_bind , get_reference_space_type : 0 as * mut sys :: godot_method_bind , get_requested_reference_space_types : 0 as * mut sys :: godot_method_bind , get_required_features : 0 as * mut sys :: godot_method_bind , get_session_mode : 0 as * mut sys :: godot_method_bind , get_visibility_state : 0 as * mut sys :: godot_method_bind , get_xr_standard_mapping : 0 as * mut sys :: godot_method_bind , is_session_supported : 0 as * mut sys :: godot_method_bind , set_optional_features : 0 as * mut sys :: godot_method_bind , set_requested_reference_space_types : 0 as * mut sys :: godot_method_bind , set_required_features : 0 as * mut sys :: godot_method_bind , set_session_mode : 0 as * mut sys :: godot_method_bind , set_xr_standard_mapping : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { WebXRInterfaceMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WebXRInterface\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_bounds_geometry = (gd_api . godot_method_bind_get_method) (class_name , "get_bounds_geometry\0" . as_ptr () as * const c_char) ; table . get_controller = (gd_api . godot_method_bind_get_method) (class_name , "get_controller\0" . as_ptr () as * const c_char) ; table . get_controller_target_ray_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_controller_target_ray_mode\0" . as_ptr () as * const c_char) ; table . get_optional_features = (gd_api . godot_method_bind_get_method) (class_name , "get_optional_features\0" . as_ptr () as * const c_char) ; table . get_reference_space_type = (gd_api . godot_method_bind_get_method) (class_name , "get_reference_space_type\0" . as_ptr () as * const c_char) ; table . get_requested_reference_space_types = (gd_api . godot_method_bind_get_method) (class_name , "get_requested_reference_space_types\0" . as_ptr () as * const c_char) ; table . get_required_features = (gd_api . godot_method_bind_get_method) (class_name , "get_required_features\0" . as_ptr () as * const c_char) ; table . get_session_mode = (gd_api . godot_method_bind_get_method) (class_name , "get_session_mode\0" . as_ptr () as * const c_char) ; table . get_visibility_state = (gd_api . godot_method_bind_get_method) (class_name , "get_visibility_state\0" . as_ptr () as * const c_char) ; table . get_xr_standard_mapping = (gd_api . godot_method_bind_get_method) (class_name , "get_xr_standard_mapping\0" . as_ptr () as * const c_char) ; table . is_session_supported = (gd_api . godot_method_bind_get_method) (class_name , "is_session_supported\0" . as_ptr () as * const c_char) ; table . set_optional_features = (gd_api . godot_method_bind_get_method) (class_name , "set_optional_features\0" . as_ptr () as * const c_char) ; table . set_requested_reference_space_types = (gd_api . godot_method_bind_get_method) (class_name , "set_requested_reference_space_types\0" . as_ptr () as * const c_char) ; table . set_required_features = (gd_api . godot_method_bind_get_method) (class_name , "set_required_features\0" . as_ptr () as * const c_char) ; table . set_session_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_session_mode\0" . as_ptr () as * const c_char) ; table . set_xr_standard_mapping = (gd_api . godot_method_bind_get_method) (class_name , "set_xr_standard_mapping\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::web_xr_interface::private::WebXRInterface;
            
            pub(crate) mod window_dialog {
                # ! [doc = "This module contains types related to the API class [`WindowDialog`][super::WindowDialog]."] pub (crate) mod private { # [doc = "`core class WindowDialog` inherits `Popup` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_windowdialog.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`WindowDialog` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<WindowDialog>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nWindowDialog inherits methods from:\n - [Popup](struct.Popup.html)\n - [Control](struct.Control.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WindowDialog { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: WindowDialog ; impl WindowDialog { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WindowDialogMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the close [`TextureButton`][TextureButton].\n**Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [`CanvasItem.visible`][CanvasItem::visible] property."] # [doc = ""] # [inline] pub fn get_close_button (& self) -> Option < Ref < crate :: generated :: TextureButton , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WindowDialogMethodTable :: get (get_api ()) . get_close_button ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: TextureButton , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the user can resize the window."] # [doc = ""] # [inline] pub fn resizable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = WindowDialogMethodTable :: get (get_api ()) . get_resizable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The text displayed in the window's title bar."] # [doc = ""] # [inline] pub fn title (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = WindowDialogMethodTable :: get (get_api ()) . get_title ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, the user can resize the window."] # [doc = ""] # [inline] pub fn set_resizable (& self , resizable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WindowDialogMethodTable :: get (get_api ()) . set_resizable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , resizable as _) ; } } # [doc = "The text displayed in the window's title bar."] # [doc = ""] # [inline] pub fn set_title (& self , title : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WindowDialogMethodTable :: get (get_api ()) . set_title ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , title . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for WindowDialog { } unsafe impl GodotObject for WindowDialog { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "WindowDialog" } } impl QueueFree for WindowDialog { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for WindowDialog { type Target = crate :: generated :: Popup ; # [inline] fn deref (& self) -> & crate :: generated :: Popup { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WindowDialog { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Popup { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Popup > for WindowDialog { } unsafe impl SubClass < crate :: generated :: Control > for WindowDialog { } unsafe impl SubClass < crate :: generated :: CanvasItem > for WindowDialog { } unsafe impl SubClass < crate :: generated :: Node > for WindowDialog { } unsafe impl SubClass < crate :: generated :: Object > for WindowDialog { } impl Instanciable for WindowDialog { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { WindowDialog :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WindowDialogMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_close_button : * mut sys :: godot_method_bind , pub get_resizable : * mut sys :: godot_method_bind , pub get_title : * mut sys :: godot_method_bind , pub set_resizable : * mut sys :: godot_method_bind , pub set_title : * mut sys :: godot_method_bind } impl WindowDialogMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WindowDialogMethodTable = WindowDialogMethodTable { class_constructor : None , get_close_button : 0 as * mut sys :: godot_method_bind , get_resizable : 0 as * mut sys :: godot_method_bind , get_title : 0 as * mut sys :: godot_method_bind , set_resizable : 0 as * mut sys :: godot_method_bind , set_title : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { WindowDialogMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WindowDialog\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_close_button = (gd_api . godot_method_bind_get_method) (class_name , "get_close_button\0" . as_ptr () as * const c_char) ; table . get_resizable = (gd_api . godot_method_bind_get_method) (class_name , "get_resizable\0" . as_ptr () as * const c_char) ; table . get_title = (gd_api . godot_method_bind_get_method) (class_name , "get_title\0" . as_ptr () as * const c_char) ; table . set_resizable = (gd_api . godot_method_bind_get_method) (class_name , "set_resizable\0" . as_ptr () as * const c_char) ; table . set_title = (gd_api . godot_method_bind_get_method) (class_name , "set_title\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::window_dialog::private::WindowDialog;
            
            pub(crate) mod world {
                # ! [doc = "This module contains types related to the API class [`World`][super::World]."] pub (crate) mod private { # [doc = "`core class World` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_world.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWorld inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct World { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: World ; impl World { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WorldMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Direct access to the world's physics 3D space state. Used for querying current and potential collisions."] # [doc = ""] # [inline] pub fn direct_space_state (& self) -> Option < Ref < crate :: generated :: PhysicsDirectSpaceState , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . get_direct_space_state ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: PhysicsDirectSpaceState , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The World's [`Environment`][Environment]."] # [doc = ""] # [inline] pub fn environment (& self) -> Option < Ref < crate :: generated :: Environment , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . get_environment ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Environment , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The World's fallback environment will be used if [`environment`][Self::environment] fails or is missing."] # [doc = ""] # [inline] pub fn fallback_environment (& self) -> Option < Ref < crate :: generated :: Environment , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . get_fallback_environment ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Environment , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`RID`][Rid] of this world's navigation map. Used by the [`NavigationServer`][NavigationServer]."] # [doc = ""] # [inline] pub fn navigation_map (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . get_navigation_map ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The World's visual scenario."] # [doc = ""] # [inline] pub fn scenario (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . get_scenario ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The World's physics space."] # [doc = ""] # [inline] pub fn space (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . get_space ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The World's [`Environment`][Environment]."] # [doc = ""] # [inline] pub fn set_environment (& self , env : impl AsArg < crate :: generated :: Environment >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . set_environment ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , env . as_arg_ptr ()) ; } } # [doc = "The World's fallback environment will be used if [`environment`][Self::environment] fails or is missing."] # [doc = ""] # [inline] pub fn set_fallback_environment (& self , env : impl AsArg < crate :: generated :: Environment >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldMethodTable :: get (get_api ()) . set_fallback_environment ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , env . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for World { } unsafe impl GodotObject for World { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "World" } } impl std :: ops :: Deref for World { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for World { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for World { } unsafe impl SubClass < crate :: generated :: Reference > for World { } unsafe impl SubClass < crate :: generated :: Object > for World { } impl Instanciable for World { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { World :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WorldMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_direct_space_state : * mut sys :: godot_method_bind , pub get_environment : * mut sys :: godot_method_bind , pub get_fallback_environment : * mut sys :: godot_method_bind , pub get_navigation_map : * mut sys :: godot_method_bind , pub get_scenario : * mut sys :: godot_method_bind , pub get_space : * mut sys :: godot_method_bind , pub set_environment : * mut sys :: godot_method_bind , pub set_fallback_environment : * mut sys :: godot_method_bind } impl WorldMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WorldMethodTable = WorldMethodTable { class_constructor : None , get_direct_space_state : 0 as * mut sys :: godot_method_bind , get_environment : 0 as * mut sys :: godot_method_bind , get_fallback_environment : 0 as * mut sys :: godot_method_bind , get_navigation_map : 0 as * mut sys :: godot_method_bind , get_scenario : 0 as * mut sys :: godot_method_bind , get_space : 0 as * mut sys :: godot_method_bind , set_environment : 0 as * mut sys :: godot_method_bind , set_fallback_environment : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { WorldMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "World\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_direct_space_state = (gd_api . godot_method_bind_get_method) (class_name , "get_direct_space_state\0" . as_ptr () as * const c_char) ; table . get_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_environment\0" . as_ptr () as * const c_char) ; table . get_fallback_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_fallback_environment\0" . as_ptr () as * const c_char) ; table . get_navigation_map = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_map\0" . as_ptr () as * const c_char) ; table . get_scenario = (gd_api . godot_method_bind_get_method) (class_name , "get_scenario\0" . as_ptr () as * const c_char) ; table . get_space = (gd_api . godot_method_bind_get_method) (class_name , "get_space\0" . as_ptr () as * const c_char) ; table . set_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_environment\0" . as_ptr () as * const c_char) ; table . set_fallback_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_fallback_environment\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::world::private::World;
            
            pub(crate) mod world_2d {
                # ! [doc = "This module contains types related to the API class [`World2D`][super::World2D]."] pub (crate) mod private { # [doc = "`core class World2D` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_world2d.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nWorld2D inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct World2D { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: World2D ; impl World2D { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = World2DMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [`RID`][Rid] of this world's canvas resource. Used by the [`VisualServer`][VisualServer] for 2D drawing."] # [doc = ""] # [inline] pub fn canvas (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = World2DMethodTable :: get (get_api ()) . get_canvas ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Direct access to the world's physics 2D space state. Used for querying current and potential collisions. When using multi-threaded physics, access is limited to `_physics_process(delta)` in the main thread."] # [doc = ""] # [inline] pub fn direct_space_state (& self) -> Option < Ref < crate :: generated :: Physics2DDirectSpaceState , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = World2DMethodTable :: get (get_api ()) . get_direct_space_state ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Physics2DDirectSpaceState , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`RID`][Rid] of this world's navigation map. Used by the [`Navigation2DServer`][Navigation2DServer]."] # [doc = ""] # [inline] pub fn navigation_map (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = World2DMethodTable :: get (get_api ()) . get_navigation_map ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`RID`][Rid] of this world's physics space resource. Used by the [`Physics2DServer`][Physics2DServer] for 2D physics, treating it as both a space and an area."] # [doc = ""] # [inline] pub fn space (& self) -> Rid { unsafe { let method_bind : * mut sys :: godot_method_bind = World2DMethodTable :: get (get_api ()) . get_space ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rid > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for World2D { } unsafe impl GodotObject for World2D { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "World2D" } } impl std :: ops :: Deref for World2D { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for World2D { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for World2D { } unsafe impl SubClass < crate :: generated :: Reference > for World2D { } unsafe impl SubClass < crate :: generated :: Object > for World2D { } impl Instanciable for World2D { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { World2D :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct World2DMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_canvas : * mut sys :: godot_method_bind , pub get_direct_space_state : * mut sys :: godot_method_bind , pub get_navigation_map : * mut sys :: godot_method_bind , pub get_space : * mut sys :: godot_method_bind } impl World2DMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : World2DMethodTable = World2DMethodTable { class_constructor : None , get_canvas : 0 as * mut sys :: godot_method_bind , get_direct_space_state : 0 as * mut sys :: godot_method_bind , get_navigation_map : 0 as * mut sys :: godot_method_bind , get_space : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { World2DMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "World2D\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_canvas = (gd_api . godot_method_bind_get_method) (class_name , "get_canvas\0" . as_ptr () as * const c_char) ; table . get_direct_space_state = (gd_api . godot_method_bind_get_method) (class_name , "get_direct_space_state\0" . as_ptr () as * const c_char) ; table . get_navigation_map = (gd_api . godot_method_bind_get_method) (class_name , "get_navigation_map\0" . as_ptr () as * const c_char) ; table . get_space = (gd_api . godot_method_bind_get_method) (class_name , "get_space\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::world_2d::private::World2D;
            
            pub(crate) mod world_environment {
                # ! [doc = "This module contains types related to the API class [`WorldEnvironment`][super::WorldEnvironment]."] pub (crate) mod private { # [doc = "`core class WorldEnvironment` inherits `Node` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_worldenvironment.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`WorldEnvironment` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<WorldEnvironment>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nWorldEnvironment inherits methods from:\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct WorldEnvironment { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: WorldEnvironment ; impl WorldEnvironment { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = WorldEnvironmentMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "The [`Environment`][Environment] resource used by this [`WorldEnvironment`][WorldEnvironment], defining the default properties."] # [doc = ""] # [inline] pub fn environment (& self) -> Option < Ref < crate :: generated :: Environment , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldEnvironmentMethodTable :: get (get_api ()) . get_environment ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: Environment , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The [`Environment`][Environment] resource used by this [`WorldEnvironment`][WorldEnvironment], defining the default properties."] # [doc = ""] # [inline] pub fn set_environment (& self , env : impl AsArg < crate :: generated :: Environment >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = WorldEnvironmentMethodTable :: get (get_api ()) . set_environment ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , env . as_arg_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for WorldEnvironment { } unsafe impl GodotObject for WorldEnvironment { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "WorldEnvironment" } } impl QueueFree for WorldEnvironment { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for WorldEnvironment { type Target = crate :: generated :: Node ; # [inline] fn deref (& self) -> & crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for WorldEnvironment { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node > for WorldEnvironment { } unsafe impl SubClass < crate :: generated :: Object > for WorldEnvironment { } impl Instanciable for WorldEnvironment { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { WorldEnvironment :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct WorldEnvironmentMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_environment : * mut sys :: godot_method_bind , pub set_environment : * mut sys :: godot_method_bind } impl WorldEnvironmentMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : WorldEnvironmentMethodTable = WorldEnvironmentMethodTable { class_constructor : None , get_environment : 0 as * mut sys :: godot_method_bind , set_environment : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { WorldEnvironmentMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "WorldEnvironment\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_environment\0" . as_ptr () as * const c_char) ; table . set_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_environment\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::world_environment::private::WorldEnvironment;
            
            pub(crate) mod x509_certificate {
                # ! [doc = "This module contains types related to the API class [`X509Certificate`][super::X509Certificate]."] pub (crate) mod private { # [doc = "`core class X509Certificate` inherits `Resource` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_x509certificate.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nX509Certificate inherits methods from:\n - [Resource](struct.Resource.html)\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct X509Certificate { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: X509Certificate ; impl X509Certificate { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = X509CertificateMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Loads a certificate from `path` (\"*.crt\" file)."] # [doc = ""] # [inline] pub fn load (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = X509CertificateMethodTable :: get (get_api ()) . load ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Saves a certificate to the given `path` (should be a \"*.crt\" file)."] # [doc = ""] # [inline] pub fn save (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = X509CertificateMethodTable :: get (get_api ()) . save ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } } impl gdnative_core :: private :: godot_object :: Sealed for X509Certificate { } unsafe impl GodotObject for X509Certificate { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "X509Certificate" } } impl std :: ops :: Deref for X509Certificate { type Target = crate :: generated :: Resource ; # [inline] fn deref (& self) -> & crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for X509Certificate { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Resource { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Resource > for X509Certificate { } unsafe impl SubClass < crate :: generated :: Reference > for X509Certificate { } unsafe impl SubClass < crate :: generated :: Object > for X509Certificate { } impl Instanciable for X509Certificate { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { X509Certificate :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct X509CertificateMethodTable { pub class_constructor : sys :: godot_class_constructor , pub load : * mut sys :: godot_method_bind , pub save : * mut sys :: godot_method_bind } impl X509CertificateMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : X509CertificateMethodTable = X509CertificateMethodTable { class_constructor : None , load : 0 as * mut sys :: godot_method_bind , save : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { X509CertificateMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "X509Certificate\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\0" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::x509_certificate::private::X509Certificate;
            
            pub mod xml_parser {
                # ! [doc = "This module contains types related to the API class [`XMLParser`][super::XMLParser]."] pub (crate) mod private { # [doc = "`core class XMLParser` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`xml_parser`][super::xml_parser] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_xmlparser.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nXMLParser inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct XMLParser { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: XMLParser ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct NodeType (pub i64) ; impl NodeType { pub const NONE : NodeType = NodeType (0i64) ; pub const ELEMENT : NodeType = NodeType (1i64) ; pub const ELEMENT_END : NodeType = NodeType (2i64) ; pub const TEXT : NodeType = NodeType (3i64) ; pub const COMMENT : NodeType = NodeType (4i64) ; pub const CDATA : NodeType = NodeType (5i64) ; pub const UNKNOWN : NodeType = NodeType (6i64) ; } impl From < i64 > for NodeType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < NodeType > for i64 { # [inline] fn from (v : NodeType) -> Self { v . 0 } } impl FromVariant for NodeType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl XMLParser { pub const NODE_NONE : i64 = 0i64 ; pub const NODE_ELEMENT : i64 = 1i64 ; pub const NODE_ELEMENT_END : i64 = 2i64 ; pub const NODE_TEXT : i64 = 3i64 ; pub const NODE_COMMENT : i64 = 4i64 ; pub const NODE_CDATA : i64 = 5i64 ; pub const NODE_UNKNOWN : i64 = 6i64 ; } impl XMLParser { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = XMLParserMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Gets the amount of attributes in the current element."] # [doc = ""] # [inline] pub fn get_attribute_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . get_attribute_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets the name of the attribute specified by the index in `idx` argument."] # [doc = ""] # [inline] pub fn get_attribute_name (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . get_attribute_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the value of the attribute specified by the index in `idx` argument."] # [doc = ""] # [inline] pub fn get_attribute_value (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . get_attribute_value ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the current line in the parsed file (currently not implemented)."] # [doc = ""] # [inline] pub fn get_current_line (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . get_current_line ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets the value of a certain attribute of the current element by name. This will raise an error if the element has no such attribute."] # [doc = ""] # [inline] pub fn get_named_attribute_value (& self , name : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . get_named_attribute_value ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the value of a certain attribute of the current element by name. This will return an empty [`String`][GodotString] if the attribute is not found."] # [doc = ""] # [inline] pub fn get_named_attribute_value_safe (& self , name : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . get_named_attribute_value_safe ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the contents of a text node. This will raise an error in any other type of node."] # [doc = ""] # [inline] pub fn get_node_data (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . get_node_data ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the name of the current element node. This will raise an error if the current node type is neither [`NODE_ELEMENT`][Self::NODE_ELEMENT] nor [`NODE_ELEMENT_END`][Self::NODE_ELEMENT_END]."] # [doc = ""] # [inline] pub fn get_node_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . get_node_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Gets the byte offset of the current node since the beginning of the file or buffer."] # [doc = ""] # [inline] pub fn get_node_offset (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . get_node_offset ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets the type of the current node. Compare with [`NodeType`][NodeType] constants."] # [doc = ""] # [inline] pub fn get_node_type (& self) -> crate :: generated :: xml_parser :: NodeType { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . get_node_type ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: xml_parser :: NodeType > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Check whether the current element has a certain attribute."] # [doc = ""] # [inline] pub fn has_attribute (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . has_attribute ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Check whether the current element is empty (this only works for completely empty tags, e.g. `<element \\>`)."] # [doc = ""] # [inline] pub fn is_empty (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . is_empty ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Opens an XML file for parsing. This returns an error code."] # [doc = ""] # [inline] pub fn open (& self , file : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . open ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Opens an XML raw buffer for parsing. This returns an error code."] # [doc = ""] # [inline] pub fn open_buffer (& self , buffer : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . open_buffer ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Reads the next node of the file. This returns an error code."] # [doc = ""] # [inline] pub fn read (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . read ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Moves the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code."] # [doc = ""] # [inline] pub fn seek (& self , position : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . seek ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , position as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Skips the current section. If the node contains other elements, they will be ignored and the cursor will go to the closing of the current element."] # [doc = ""] # [inline] pub fn skip_section (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = XMLParserMethodTable :: get (get_api ()) . skip_section ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for XMLParser { } unsafe impl GodotObject for XMLParser { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "XMLParser" } } impl std :: ops :: Deref for XMLParser { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for XMLParser { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for XMLParser { } unsafe impl SubClass < crate :: generated :: Object > for XMLParser { } impl Instanciable for XMLParser { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { XMLParser :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct XMLParserMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_attribute_count : * mut sys :: godot_method_bind , pub get_attribute_name : * mut sys :: godot_method_bind , pub get_attribute_value : * mut sys :: godot_method_bind , pub get_current_line : * mut sys :: godot_method_bind , pub get_named_attribute_value : * mut sys :: godot_method_bind , pub get_named_attribute_value_safe : * mut sys :: godot_method_bind , pub get_node_data : * mut sys :: godot_method_bind , pub get_node_name : * mut sys :: godot_method_bind , pub get_node_offset : * mut sys :: godot_method_bind , pub get_node_type : * mut sys :: godot_method_bind , pub has_attribute : * mut sys :: godot_method_bind , pub is_empty : * mut sys :: godot_method_bind , pub open : * mut sys :: godot_method_bind , pub open_buffer : * mut sys :: godot_method_bind , pub read : * mut sys :: godot_method_bind , pub seek : * mut sys :: godot_method_bind , pub skip_section : * mut sys :: godot_method_bind } impl XMLParserMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : XMLParserMethodTable = XMLParserMethodTable { class_constructor : None , get_attribute_count : 0 as * mut sys :: godot_method_bind , get_attribute_name : 0 as * mut sys :: godot_method_bind , get_attribute_value : 0 as * mut sys :: godot_method_bind , get_current_line : 0 as * mut sys :: godot_method_bind , get_named_attribute_value : 0 as * mut sys :: godot_method_bind , get_named_attribute_value_safe : 0 as * mut sys :: godot_method_bind , get_node_data : 0 as * mut sys :: godot_method_bind , get_node_name : 0 as * mut sys :: godot_method_bind , get_node_offset : 0 as * mut sys :: godot_method_bind , get_node_type : 0 as * mut sys :: godot_method_bind , has_attribute : 0 as * mut sys :: godot_method_bind , is_empty : 0 as * mut sys :: godot_method_bind , open : 0 as * mut sys :: godot_method_bind , open_buffer : 0 as * mut sys :: godot_method_bind , read : 0 as * mut sys :: godot_method_bind , seek : 0 as * mut sys :: godot_method_bind , skip_section : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { XMLParserMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "XMLParser\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_attribute_count = (gd_api . godot_method_bind_get_method) (class_name , "get_attribute_count\0" . as_ptr () as * const c_char) ; table . get_attribute_name = (gd_api . godot_method_bind_get_method) (class_name , "get_attribute_name\0" . as_ptr () as * const c_char) ; table . get_attribute_value = (gd_api . godot_method_bind_get_method) (class_name , "get_attribute_value\0" . as_ptr () as * const c_char) ; table . get_current_line = (gd_api . godot_method_bind_get_method) (class_name , "get_current_line\0" . as_ptr () as * const c_char) ; table . get_named_attribute_value = (gd_api . godot_method_bind_get_method) (class_name , "get_named_attribute_value\0" . as_ptr () as * const c_char) ; table . get_named_attribute_value_safe = (gd_api . godot_method_bind_get_method) (class_name , "get_named_attribute_value_safe\0" . as_ptr () as * const c_char) ; table . get_node_data = (gd_api . godot_method_bind_get_method) (class_name , "get_node_data\0" . as_ptr () as * const c_char) ; table . get_node_name = (gd_api . godot_method_bind_get_method) (class_name , "get_node_name\0" . as_ptr () as * const c_char) ; table . get_node_offset = (gd_api . godot_method_bind_get_method) (class_name , "get_node_offset\0" . as_ptr () as * const c_char) ; table . get_node_type = (gd_api . godot_method_bind_get_method) (class_name , "get_node_type\0" . as_ptr () as * const c_char) ; table . has_attribute = (gd_api . godot_method_bind_get_method) (class_name , "has_attribute\0" . as_ptr () as * const c_char) ; table . is_empty = (gd_api . godot_method_bind_get_method) (class_name , "is_empty\0" . as_ptr () as * const c_char) ; table . open = (gd_api . godot_method_bind_get_method) (class_name , "open\0" . as_ptr () as * const c_char) ; table . open_buffer = (gd_api . godot_method_bind_get_method) (class_name , "open_buffer\0" . as_ptr () as * const c_char) ; table . read = (gd_api . godot_method_bind_get_method) (class_name , "read\0" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\0" . as_ptr () as * const c_char) ; table . skip_section = (gd_api . godot_method_bind_get_method) (class_name , "skip_section\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::xml_parser::private::XMLParser;
            
            pub(crate) mod ysort {
                # ! [doc = "This module contains types related to the API class [`YSort`][super::YSort]."] pub (crate) mod private { # [doc = "`core class YSort` inherits `Node2D` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_ysort.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nNon-reference-counted objects, such as the ones of this type, are usually owned by the engine.\n\n`YSort` is a reference-only type. Persistent references can\nonly exist in the unsafe `Ref<YSort>` form.\n\nIn the cases where Rust code owns an object of this type, for example if the object was just\ncreated on the Rust side and not passed to the engine yet, ownership should be either given\nto the engine or the object must be manually destroyed using `Ref::free`, or `Ref::queue_free`\nif it is a `Node`."] # [doc = "\n## Class hierarchy\n\nYSort inherits methods from:\n - [Node2D](struct.Node2D.html)\n - [CanvasItem](struct.CanvasItem.html)\n - [Node](struct.Node.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct YSort { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: YSort ; impl YSort { # [doc = "Creates a new instance of this object.\n\nBecause this type is not reference counted, the lifetime of the returned object\nis *not* automatically managed.\n\nImmediately after creation, the object is owned by the caller, and can be\npassed to the engine (in which case the engine will be responsible for\ndestroying the object) or destroyed manually using `Ref::free`, or preferably\n`Ref::queue_free` if it is a `Node`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = YSortMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "If `true`, child nodes are sorted, otherwise sorting is disabled."] # [doc = ""] # [inline] pub fn is_sort_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = YSortMethodTable :: get (get_api ()) . is_sort_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, child nodes are sorted, otherwise sorting is disabled."] # [doc = ""] # [inline] pub fn set_sort_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = YSortMethodTable :: get (get_api ()) . set_sort_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for YSort { } unsafe impl GodotObject for YSort { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "YSort" } } impl QueueFree for YSort { # [inline] unsafe fn godot_queue_free (obj : * mut sys :: godot_object) { let method_bind : * mut sys :: godot_method_bind = crate :: generated :: node :: NodeMethodTable :: get (get_api ()) . queue_free ; crate :: icalls :: icallvar_ (method_bind , obj) ; } } impl std :: ops :: Deref for YSort { type Target = crate :: generated :: Node2D ; # [inline] fn deref (& self) -> & crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for YSort { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Node2D { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Node2D > for YSort { } unsafe impl SubClass < crate :: generated :: CanvasItem > for YSort { } unsafe impl SubClass < crate :: generated :: Node > for YSort { } unsafe impl SubClass < crate :: generated :: Object > for YSort { } impl Instanciable for YSort { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { YSort :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct YSortMethodTable { pub class_constructor : sys :: godot_class_constructor , pub is_sort_enabled : * mut sys :: godot_method_bind , pub set_sort_enabled : * mut sys :: godot_method_bind } impl YSortMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : YSortMethodTable = YSortMethodTable { class_constructor : None , is_sort_enabled : 0 as * mut sys :: godot_method_bind , set_sort_enabled : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { YSortMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "YSort\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . is_sort_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_sort_enabled\0" . as_ptr () as * const c_char) ; table . set_sort_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_sort_enabled\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::ysort::private::YSort;
            
            pub(crate) mod class_db {
                # ! [doc = "This module contains types related to the API class [`ClassDB`][super::ClassDB]."] pub (crate) mod private { # [doc = "`core singleton class ClassDB` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_classdb.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nClassDB inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ClassDB { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ClassDB ; impl ClassDB { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("ClassDB\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Returns `true` if you can instance objects from the specified `class`, `false` in other case."] # [doc = ""] # [inline] pub fn can_instance (& self , class : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . can_instance ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether the specified `class` is available or not."] # [doc = ""] # [inline] pub fn class_exists (& self , class : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_exists ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns a category associated with the class for use in documentation and the Asset Library. Debug mode required."] # [doc = ""] # [inline] pub fn class_get_category (& self , class : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_category ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array with all the keys in `enum` of `class` or its ancestry.\n# Default Arguments\n* `no_inheritance` - `false`"] # [doc = ""] # [inline] pub fn class_get_enum_constants (& self , class : impl Into < GodotString > , enum_ : impl Into < GodotString > , no_inheritance : bool) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_enum_constants ; let ret = crate :: icalls :: icallvar__str_str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , enum_ . into () , no_inheritance as _) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array with all the enums of `class` or its ancestry.\n# Default Arguments\n* `no_inheritance` - `false`"] # [doc = ""] # [inline] pub fn class_get_enum_list (& self , class : impl Into < GodotString > , no_inheritance : bool) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_enum_list ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , no_inheritance as _) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the value of the integer constant `name` of `class` or its ancestry. Always returns 0 when the constant could not be found."] # [doc = ""] # [inline] pub fn class_get_integer_constant (& self , class : impl Into < GodotString > , name : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_integer_constant ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , class . into () , name . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns which enum the integer constant `name` of `class` or its ancestry belongs to.\n# Default Arguments\n* `no_inheritance` - `false`"] # [doc = ""] # [inline] pub fn class_get_integer_constant_enum (& self , class : impl Into < GodotString > , name : impl Into < GodotString > , no_inheritance : bool) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_integer_constant_enum ; let ret = crate :: icalls :: icallvar__str_str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , name . into () , no_inheritance as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array with the names all the integer constants of `class` or its ancestry.\n# Default Arguments\n* `no_inheritance` - `false`"] # [doc = ""] # [inline] pub fn class_get_integer_constant_list (& self , class : impl Into < GodotString > , no_inheritance : bool) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_integer_constant_list ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , no_inheritance as _) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array with all the methods of `class` or its ancestry if `no_inheritance` is `false`. Every element of the array is a [`Dictionary`][Dictionary] with the following keys: `args`, `default_args`, `flags`, `id`, `name`, `return: (class_name, hint, hint_string, name, type, usage)`.\n**Note:** In exported release builds the debug info is not available, so the returned dictionaries will contain only method names.\n# Default Arguments\n* `no_inheritance` - `false`"] # [doc = ""] # [inline] pub fn class_get_method_list (& self , class : impl Into < GodotString > , no_inheritance : bool) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_method_list ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , no_inheritance as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the value of `property` of `class` or its ancestry."] # [doc = ""] # [inline] pub fn class_get_property (& self , object : impl AsArg < crate :: generated :: Object > , property : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_property ; let ret = crate :: icalls :: icallvar__obj_str (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array with all the properties of `class` or its ancestry if `no_inheritance` is `false`.\n# Default Arguments\n* `no_inheritance` - `false`"] # [doc = ""] # [inline] pub fn class_get_property_list (& self , class : impl Into < GodotString > , no_inheritance : bool) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_property_list ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , no_inheritance as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the `signal` data of `class` or its ancestry. The returned value is a [`Dictionary`][Dictionary] with the following keys: `args`, `default_args`, `flags`, `id`, `name`, `return: (class_name, hint, hint_string, name, type, usage)`."] # [doc = ""] # [inline] pub fn class_get_signal (& self , class : impl Into < GodotString > , signal : impl Into < GodotString >) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_signal ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , class . into () , signal . into ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array with all the signals of `class` or its ancestry if `no_inheritance` is `false`. Every element of the array is a [`Dictionary`][Dictionary] as described in [`class_get_signal`][Self::class_get_signal].\n# Default Arguments\n* `no_inheritance` - `false`"] # [doc = ""] # [inline] pub fn class_get_signal_list (& self , class : impl Into < GodotString > , no_inheritance : bool) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_get_signal_list ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , no_inheritance as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns whether `class` or its ancestry has an enum called `name` or not.\n# Default Arguments\n* `no_inheritance` - `false`"] # [doc = ""] # [inline] pub fn class_has_enum (& self , class : impl Into < GodotString > , name : impl Into < GodotString > , no_inheritance : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_has_enum ; let ret = crate :: icalls :: icallvar__str_str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , name . into () , no_inheritance as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether `class` or its ancestry has an integer constant called `name` or not."] # [doc = ""] # [inline] pub fn class_has_integer_constant (& self , class : impl Into < GodotString > , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_has_integer_constant ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , class . into () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether `class` (or its ancestry if `no_inheritance` is `false`) has a method called `method` or not.\n# Default Arguments\n* `no_inheritance` - `false`"] # [doc = ""] # [inline] pub fn class_has_method (& self , class : impl Into < GodotString > , method : impl Into < GodotString > , no_inheritance : bool) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_has_method ; let ret = crate :: icalls :: icallvar__str_str_bool (method_bind , self . this . sys () . as_ptr () , class . into () , method . into () , no_inheritance as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether `class` or its ancestry has a signal called `signal` or not."] # [doc = ""] # [inline] pub fn class_has_signal (& self , class : impl Into < GodotString > , signal : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_has_signal ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , class . into () , signal . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Sets `property` value of `class` to `value`."] # [doc = ""] # [inline] pub fn class_set_property (& self , object : impl AsArg < crate :: generated :: Object > , property : impl Into < GodotString > , value : impl OwnedToVariant) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . class_set_property ; let ret = crate :: icalls :: icallvar__obj_str_var (method_bind , self . this . sys () . as_ptr () , object . as_arg_ptr () , property . into () , value . owned_to_variant ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Returns the names of all the classes available."] # [doc = ""] # [inline] pub fn get_class_list (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . get_class_list ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the names of all the classes that directly or indirectly inherit from `class`."] # [doc = ""] # [inline] pub fn get_inheriters_from_class (& self , class : impl Into < GodotString >) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . get_inheriters_from_class ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the parent class of `class`."] # [doc = ""] # [inline] pub fn get_parent_class (& self , class : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . get_parent_class ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Creates an instance of `class`."] # [doc = ""] # [inline] pub fn instance (& self , class : impl Into < GodotString >) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . instance ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns whether this `class` is enabled or not."] # [doc = ""] # [inline] pub fn is_class_enabled (& self , class : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . is_class_enabled ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , class . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether `inherits` is an ancestor of `class` or not."] # [doc = ""] # [inline] pub fn is_parent_class (& self , class : impl Into < GodotString > , inherits : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ClassDBMethodTable :: get (get_api ()) . is_parent_class ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , class . into () , inherits . into ()) ; < bool > :: coerce_from_variant (& ret) } } } impl gdnative_core :: private :: godot_object :: Sealed for ClassDB { } unsafe impl GodotObject for ClassDB { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ClassDB" } } impl std :: ops :: Deref for ClassDB { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ClassDB { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for ClassDB { } unsafe impl Send for ClassDB { } unsafe impl Sync for ClassDB { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ClassDBMethodTable { pub class_constructor : sys :: godot_class_constructor , pub can_instance : * mut sys :: godot_method_bind , pub class_exists : * mut sys :: godot_method_bind , pub class_get_category : * mut sys :: godot_method_bind , pub class_get_enum_constants : * mut sys :: godot_method_bind , pub class_get_enum_list : * mut sys :: godot_method_bind , pub class_get_integer_constant : * mut sys :: godot_method_bind , pub class_get_integer_constant_enum : * mut sys :: godot_method_bind , pub class_get_integer_constant_list : * mut sys :: godot_method_bind , pub class_get_method_list : * mut sys :: godot_method_bind , pub class_get_property : * mut sys :: godot_method_bind , pub class_get_property_list : * mut sys :: godot_method_bind , pub class_get_signal : * mut sys :: godot_method_bind , pub class_get_signal_list : * mut sys :: godot_method_bind , pub class_has_enum : * mut sys :: godot_method_bind , pub class_has_integer_constant : * mut sys :: godot_method_bind , pub class_has_method : * mut sys :: godot_method_bind , pub class_has_signal : * mut sys :: godot_method_bind , pub class_set_property : * mut sys :: godot_method_bind , pub get_class_list : * mut sys :: godot_method_bind , pub get_inheriters_from_class : * mut sys :: godot_method_bind , pub get_parent_class : * mut sys :: godot_method_bind , pub instance : * mut sys :: godot_method_bind , pub is_class_enabled : * mut sys :: godot_method_bind , pub is_parent_class : * mut sys :: godot_method_bind } impl ClassDBMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ClassDBMethodTable = ClassDBMethodTable { class_constructor : None , can_instance : 0 as * mut sys :: godot_method_bind , class_exists : 0 as * mut sys :: godot_method_bind , class_get_category : 0 as * mut sys :: godot_method_bind , class_get_enum_constants : 0 as * mut sys :: godot_method_bind , class_get_enum_list : 0 as * mut sys :: godot_method_bind , class_get_integer_constant : 0 as * mut sys :: godot_method_bind , class_get_integer_constant_enum : 0 as * mut sys :: godot_method_bind , class_get_integer_constant_list : 0 as * mut sys :: godot_method_bind , class_get_method_list : 0 as * mut sys :: godot_method_bind , class_get_property : 0 as * mut sys :: godot_method_bind , class_get_property_list : 0 as * mut sys :: godot_method_bind , class_get_signal : 0 as * mut sys :: godot_method_bind , class_get_signal_list : 0 as * mut sys :: godot_method_bind , class_has_enum : 0 as * mut sys :: godot_method_bind , class_has_integer_constant : 0 as * mut sys :: godot_method_bind , class_has_method : 0 as * mut sys :: godot_method_bind , class_has_signal : 0 as * mut sys :: godot_method_bind , class_set_property : 0 as * mut sys :: godot_method_bind , get_class_list : 0 as * mut sys :: godot_method_bind , get_inheriters_from_class : 0 as * mut sys :: godot_method_bind , get_parent_class : 0 as * mut sys :: godot_method_bind , instance : 0 as * mut sys :: godot_method_bind , is_class_enabled : 0 as * mut sys :: godot_method_bind , is_parent_class : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ClassDBMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_ClassDB\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . can_instance = (gd_api . godot_method_bind_get_method) (class_name , "can_instance\0" . as_ptr () as * const c_char) ; table . class_exists = (gd_api . godot_method_bind_get_method) (class_name , "class_exists\0" . as_ptr () as * const c_char) ; table . class_get_category = (gd_api . godot_method_bind_get_method) (class_name , "class_get_category\0" . as_ptr () as * const c_char) ; table . class_get_enum_constants = (gd_api . godot_method_bind_get_method) (class_name , "class_get_enum_constants\0" . as_ptr () as * const c_char) ; table . class_get_enum_list = (gd_api . godot_method_bind_get_method) (class_name , "class_get_enum_list\0" . as_ptr () as * const c_char) ; table . class_get_integer_constant = (gd_api . godot_method_bind_get_method) (class_name , "class_get_integer_constant\0" . as_ptr () as * const c_char) ; table . class_get_integer_constant_enum = (gd_api . godot_method_bind_get_method) (class_name , "class_get_integer_constant_enum\0" . as_ptr () as * const c_char) ; table . class_get_integer_constant_list = (gd_api . godot_method_bind_get_method) (class_name , "class_get_integer_constant_list\0" . as_ptr () as * const c_char) ; table . class_get_method_list = (gd_api . godot_method_bind_get_method) (class_name , "class_get_method_list\0" . as_ptr () as * const c_char) ; table . class_get_property = (gd_api . godot_method_bind_get_method) (class_name , "class_get_property\0" . as_ptr () as * const c_char) ; table . class_get_property_list = (gd_api . godot_method_bind_get_method) (class_name , "class_get_property_list\0" . as_ptr () as * const c_char) ; table . class_get_signal = (gd_api . godot_method_bind_get_method) (class_name , "class_get_signal\0" . as_ptr () as * const c_char) ; table . class_get_signal_list = (gd_api . godot_method_bind_get_method) (class_name , "class_get_signal_list\0" . as_ptr () as * const c_char) ; table . class_has_enum = (gd_api . godot_method_bind_get_method) (class_name , "class_has_enum\0" . as_ptr () as * const c_char) ; table . class_has_integer_constant = (gd_api . godot_method_bind_get_method) (class_name , "class_has_integer_constant\0" . as_ptr () as * const c_char) ; table . class_has_method = (gd_api . godot_method_bind_get_method) (class_name , "class_has_method\0" . as_ptr () as * const c_char) ; table . class_has_signal = (gd_api . godot_method_bind_get_method) (class_name , "class_has_signal\0" . as_ptr () as * const c_char) ; table . class_set_property = (gd_api . godot_method_bind_get_method) (class_name , "class_set_property\0" . as_ptr () as * const c_char) ; table . get_class_list = (gd_api . godot_method_bind_get_method) (class_name , "get_class_list\0" . as_ptr () as * const c_char) ; table . get_inheriters_from_class = (gd_api . godot_method_bind_get_method) (class_name , "get_inheriters_from_class\0" . as_ptr () as * const c_char) ; table . get_parent_class = (gd_api . godot_method_bind_get_method) (class_name , "get_parent_class\0" . as_ptr () as * const c_char) ; table . instance = (gd_api . godot_method_bind_get_method) (class_name , "instance\0" . as_ptr () as * const c_char) ; table . is_class_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_class_enabled\0" . as_ptr () as * const c_char) ; table . is_parent_class = (gd_api . godot_method_bind_get_method) (class_name , "is_parent_class\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::class_db::private::ClassDB;
            
            pub(crate) mod directory {
                # ! [doc = "This module contains types related to the API class [`Directory`][super::Directory]."] pub (crate) mod private { # [doc = "`core class Directory` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_directory.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nDirectory inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Directory { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Directory ; impl Directory { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = DirectoryMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. `newdir` or `../newdir`), or an absolute path (e.g. `/tmp/newdir` or `res://somedir/newdir`).\nReturns one of the [`Error`][GodotError] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn change_dir (& self , todir : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . change_dir ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , todir . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Copies the `from` file to the `to` destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten.\nReturns one of the [`Error`][GodotError] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn copy (& self , from : impl Into < GodotString > , to : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . copy ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , from . into () , to . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Returns whether the current item processed with the last [`get_next`][Self::get_next] call is a directory (`.` and `..` are considered directories)."] # [doc = ""] # [inline] pub fn current_is_dir (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . current_is_dir ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether the target directory exists. The argument can be relative to the current directory, or an absolute path."] # [doc = ""] # [inline] pub fn dir_exists (& self , path : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . dir_exists ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether the target file exists. The argument can be relative to the current directory, or an absolute path."] # [doc = ""] # [inline] pub fn file_exists (& self , path : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . file_exists ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the absolute path to the currently opened directory (e.g. `res://folder` or `C:\\tmp\\folder`)."] # [doc = ""] # [inline] pub fn get_current_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_current_dir ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the currently opened directory's drive index. See [`get_drive`][Self::get_drive] to convert returned index to the name of the drive."] # [doc = ""] # [inline] pub fn get_current_drive (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_current_drive ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "On Windows, returns the name of the drive (partition) passed as an argument (e.g. `C:`).\nOn macOS, returns the path to the mounted volume passed as an argument.\nOn Linux, returns the path to the mounted volume or GTK 3 bookmark passed as an argument.\nOn other platforms, or if the requested drive does not exist, the method returns an empty String."] # [doc = ""] # [inline] pub fn get_drive (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_drive ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "On Windows, returns the number of drives (partitions) mounted on the current filesystem.\nOn macOS, returns the number of mounted volumes.\nOn Linux, returns the number of mounted volumes and GTK 3 bookmarks.\nOn other platforms, the method returns 0."] # [doc = ""] # [inline] pub fn get_drive_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_drive_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the next element (file or directory) in the current directory (including `.` and `..`, unless `skip_navigational` was given to [`list_dir_begin`][Self::list_dir_begin]).\nThe name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty String and closes the stream automatically (i.e. [`list_dir_end`][Self::list_dir_end] would not be mandatory in such a case)."] # [doc = ""] # [inline] pub fn get_next (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_next ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "On UNIX desktop systems, returns the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1."] # [doc = ""] # [inline] pub fn get_space_left (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . get_space_left ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Initializes the stream used to list all files and directories using the [`get_next`][Self::get_next] function, closing the currently opened stream if needed. Once the stream has been processed, it should typically be closed with [`list_dir_end`][Self::list_dir_end].\nIf `skip_navigational` is `true`, `.` and `..` are filtered out.\nIf `skip_hidden` is `true`, hidden files are filtered out.\n# Default Arguments\n* `skip_navigational` - `false`\n* `skip_hidden` - `false`"] # [doc = ""] # [inline] pub fn list_dir_begin (& self , skip_navigational : bool , skip_hidden : bool) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . list_dir_begin ; let ret = crate :: icalls :: icallvar__bool_bool (method_bind , self . this . sys () . as_ptr () , skip_navigational as _ , skip_hidden as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Closes the current stream opened with [`list_dir_begin`][Self::list_dir_begin] (whether it has been fully processed with [`get_next`][Self::get_next] does not matter)."] # [doc = ""] # [inline] pub fn list_dir_end (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . list_dir_end ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [`make_dir_recursive`][Self::make_dir_recursive]).\nReturns one of the [`Error`][GodotError] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn make_dir (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . make_dir ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Creates a target directory and all necessary intermediate directories in its path, by calling [`make_dir`][Self::make_dir] recursively. The argument can be relative to the current directory, or an absolute path.\nReturns one of the [`Error`][GodotError] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn make_dir_recursive (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . make_dir_recursive ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Opens an existing directory of the filesystem. The `path` argument can be within the project tree (`res://folder`), the user directory (`user://folder`) or an absolute path of the user filesystem (e.g. `/tmp/folder` or `C:\\tmp\\folder`).\nReturns one of the [`Error`][GodotError] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn open (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . open ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Permanently deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail.\nIf you don't want to delete the file/directory permanently, use [`OS.move_to_trash`][OS::move_to_trash] instead.\nReturns one of the [`Error`][GodotError] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn remove (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . remove ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Renames (move) the `from` file or directory to the `to` destination. Both arguments should be paths to files or directories, either relative or absolute. If the destination file or directory exists and is not access-protected, it will be overwritten.\nReturns one of the [`Error`][GodotError] code constants (`OK` on success)."] # [doc = ""] # [inline] pub fn rename (& self , from : impl Into < GodotString > , to : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = DirectoryMethodTable :: get (get_api ()) . rename ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , from . into () , to . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } } impl gdnative_core :: private :: godot_object :: Sealed for Directory { } unsafe impl GodotObject for Directory { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Directory" } } impl std :: ops :: Deref for Directory { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Directory { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for Directory { } unsafe impl SubClass < crate :: generated :: Object > for Directory { } impl Instanciable for Directory { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Directory :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct DirectoryMethodTable { pub class_constructor : sys :: godot_class_constructor , pub change_dir : * mut sys :: godot_method_bind , pub copy : * mut sys :: godot_method_bind , pub current_is_dir : * mut sys :: godot_method_bind , pub dir_exists : * mut sys :: godot_method_bind , pub file_exists : * mut sys :: godot_method_bind , pub get_current_dir : * mut sys :: godot_method_bind , pub get_current_drive : * mut sys :: godot_method_bind , pub get_drive : * mut sys :: godot_method_bind , pub get_drive_count : * mut sys :: godot_method_bind , pub get_next : * mut sys :: godot_method_bind , pub get_space_left : * mut sys :: godot_method_bind , pub list_dir_begin : * mut sys :: godot_method_bind , pub list_dir_end : * mut sys :: godot_method_bind , pub make_dir : * mut sys :: godot_method_bind , pub make_dir_recursive : * mut sys :: godot_method_bind , pub open : * mut sys :: godot_method_bind , pub remove : * mut sys :: godot_method_bind , pub rename : * mut sys :: godot_method_bind } impl DirectoryMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : DirectoryMethodTable = DirectoryMethodTable { class_constructor : None , change_dir : 0 as * mut sys :: godot_method_bind , copy : 0 as * mut sys :: godot_method_bind , current_is_dir : 0 as * mut sys :: godot_method_bind , dir_exists : 0 as * mut sys :: godot_method_bind , file_exists : 0 as * mut sys :: godot_method_bind , get_current_dir : 0 as * mut sys :: godot_method_bind , get_current_drive : 0 as * mut sys :: godot_method_bind , get_drive : 0 as * mut sys :: godot_method_bind , get_drive_count : 0 as * mut sys :: godot_method_bind , get_next : 0 as * mut sys :: godot_method_bind , get_space_left : 0 as * mut sys :: godot_method_bind , list_dir_begin : 0 as * mut sys :: godot_method_bind , list_dir_end : 0 as * mut sys :: godot_method_bind , make_dir : 0 as * mut sys :: godot_method_bind , make_dir_recursive : 0 as * mut sys :: godot_method_bind , open : 0 as * mut sys :: godot_method_bind , remove : 0 as * mut sys :: godot_method_bind , rename : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { DirectoryMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_Directory\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . change_dir = (gd_api . godot_method_bind_get_method) (class_name , "change_dir\0" . as_ptr () as * const c_char) ; table . copy = (gd_api . godot_method_bind_get_method) (class_name , "copy\0" . as_ptr () as * const c_char) ; table . current_is_dir = (gd_api . godot_method_bind_get_method) (class_name , "current_is_dir\0" . as_ptr () as * const c_char) ; table . dir_exists = (gd_api . godot_method_bind_get_method) (class_name , "dir_exists\0" . as_ptr () as * const c_char) ; table . file_exists = (gd_api . godot_method_bind_get_method) (class_name , "file_exists\0" . as_ptr () as * const c_char) ; table . get_current_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_current_dir\0" . as_ptr () as * const c_char) ; table . get_current_drive = (gd_api . godot_method_bind_get_method) (class_name , "get_current_drive\0" . as_ptr () as * const c_char) ; table . get_drive = (gd_api . godot_method_bind_get_method) (class_name , "get_drive\0" . as_ptr () as * const c_char) ; table . get_drive_count = (gd_api . godot_method_bind_get_method) (class_name , "get_drive_count\0" . as_ptr () as * const c_char) ; table . get_next = (gd_api . godot_method_bind_get_method) (class_name , "get_next\0" . as_ptr () as * const c_char) ; table . get_space_left = (gd_api . godot_method_bind_get_method) (class_name , "get_space_left\0" . as_ptr () as * const c_char) ; table . list_dir_begin = (gd_api . godot_method_bind_get_method) (class_name , "list_dir_begin\0" . as_ptr () as * const c_char) ; table . list_dir_end = (gd_api . godot_method_bind_get_method) (class_name , "list_dir_end\0" . as_ptr () as * const c_char) ; table . make_dir = (gd_api . godot_method_bind_get_method) (class_name , "make_dir\0" . as_ptr () as * const c_char) ; table . make_dir_recursive = (gd_api . godot_method_bind_get_method) (class_name , "make_dir_recursive\0" . as_ptr () as * const c_char) ; table . open = (gd_api . godot_method_bind_get_method) (class_name , "open\0" . as_ptr () as * const c_char) ; table . remove = (gd_api . godot_method_bind_get_method) (class_name , "remove\0" . as_ptr () as * const c_char) ; table . rename = (gd_api . godot_method_bind_get_method) (class_name , "rename\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::directory::private::Directory;
            
            pub(crate) mod engine {
                # ! [doc = "This module contains types related to the API class [`Engine`][super::Engine]."] pub (crate) mod private { # [doc = "`core singleton class Engine` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_engine.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nEngine inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Engine { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Engine ; impl Engine { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("Engine\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Returns engine author information in a Dictionary.\n`lead_developers`    - Array of Strings, lead developer names\n`founders`           - Array of Strings, founder names\n`project_managers`   - Array of Strings, project manager names\n`developers`         - Array of Strings, developer names"] # [doc = ""] # [inline] pub fn get_author_info (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_author_info ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an Array of copyright information Dictionaries.\n`name`    - String, component name\n`parts`   - Array of Dictionaries {`files`, `copyright`, `license`} describing subsections of the component"] # [doc = ""] # [inline] pub fn get_copyright_info (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_copyright_info ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a Dictionary of Arrays of donor names.\n{`platinum_sponsors`, `gold_sponsors`, `silver_sponsors`, `bronze_sponsors`, `mini_sponsors`, `gold_donors`, `silver_donors`, `bronze_donors`}"] # [doc = ""] # [inline] pub fn get_donor_info (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_donor_info ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the total number of frames drawn. On headless platforms, or if the render loop is disabled with `--disable-render-loop` via command line, [`get_frames_drawn`][Self::get_frames_drawn] always returns `0`. See [`get_idle_frames`][Self::get_idle_frames]."] # [doc = ""] # [inline] pub fn get_frames_drawn (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_frames_drawn ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the frames per second of the running game."] # [doc = ""] # [inline] pub fn get_frames_per_second (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_frames_per_second ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the total number of frames passed since engine initialization which is advanced on each **idle frame**, regardless of whether the render loop is enabled. See also [`get_frames_drawn`][Self::get_frames_drawn] and [`get_physics_frames`][Self::get_physics_frames].\n[`get_idle_frames`][Self::get_idle_frames] can be used to run expensive logic less often without relying on a [`Timer`][Timer]:\n```gdscript\nfunc _process(_delta):\n    if Engine.get_idle_frames() % 2 == 0:\n        pass  # Run expensive logic only once every 2 idle (render) frames here.\n```"] # [doc = ""] # [inline] pub fn get_idle_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_idle_frames ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The number of fixed iterations per second. This controls how often physics simulation and [`Node._physics_process`][Node::_physics_process] methods are run. This value should generally always be set to `60` or above, as Godot doesn't interpolate the physics step. As a result, values lower than `60` will look stuttery. This value can be increased to make input more reactive or work around collision tunneling issues, but keep in mind doing so will increase CPU usage. See also [`target_fps`][Self::target_fps] and [member ProjectSettings.physics/common/physics_fps].\n**Note:** Only 8 physics ticks may be simulated per rendered frame at most. If more than 8 physics ticks have to be simulated per rendered frame to keep up with rendering, the game will appear to slow down (even if `delta` is used consistently in physics calculations). Therefore, it is recommended not to increase [`Engine.iterations_per_second`][Engine::iterations_per_second] above 240. Otherwise, the game will slow down when the rendering framerate goes below 30 FPS."] # [doc = ""] # [inline] pub fn iterations_per_second (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_iterations_per_second ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns Dictionary of licenses used by Godot and included third party components."] # [doc = ""] # [inline] pub fn get_license_info (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_license_info ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns Godot license text."] # [doc = ""] # [inline] pub fn get_license_text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_license_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the main loop object (see [`MainLoop`][MainLoop] and [`SceneTree`][SceneTree])."] # [doc = ""] # [inline] pub fn get_main_loop (& self) -> Option < Ref < crate :: generated :: MainLoop , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_main_loop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Option < Ref < crate :: generated :: MainLoop , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the total number of frames passed since engine initialization which is advanced on each **physics frame**. See also [`get_idle_frames`][Self::get_idle_frames].\n[`get_physics_frames`][Self::get_physics_frames] can be used to run expensive logic less often without relying on a [`Timer`][Timer]:\n```gdscript\nfunc _physics_process(_delta):\n    if Engine.get_physics_frames() % 2 == 0:\n        pass  # Run expensive logic only once every 2 physics frames here.\n```"] # [doc = ""] # [inline] pub fn get_physics_frames (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_physics_frames ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the fraction through the current physics tick we are at the time of rendering the frame. This can be used to implement fixed timestep interpolation."] # [doc = ""] # [inline] pub fn get_physics_interpolation_fraction (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_physics_interpolation_fraction ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of the in-game clock and real clock but smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended.\n**Note:** For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [`physics_jitter_fix`][Self::physics_jitter_fix] to `0`."] # [doc = ""] # [inline] pub fn physics_jitter_fix (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_physics_jitter_fix ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a global singleton with given `name`. Often used for plugins, e.g. `GodotPayment` on Android."] # [doc = ""] # [inline] pub fn get_singleton (& self , name : impl Into < GodotString >) -> Option < Ref < crate :: generated :: Object , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_singleton ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < Option < Ref < crate :: generated :: Object , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit."] # [doc = ""] # [inline] pub fn target_fps (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_target_fps ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed."] # [doc = ""] # [inline] pub fn time_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_time_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the current engine version information in a Dictionary.\n`major`    - Holds the major version number as an int\n`minor`    - Holds the minor version number as an int\n`patch`    - Holds the patch version number as an int\n`hex`      - Holds the full version number encoded as a hexadecimal int with one byte (2 places) per number (see example below)\n`status`   - Holds the status (e.g. \"beta\", \"rc1\", \"rc2\", ... \"stable\") as a String\n`build`    - Holds the build name (e.g. \"custom_build\") as a String\n`hash`     - Holds the full Git commit hash as a String\n`year`     - Holds the year the version was released in as an int\n`string`   - `major` + `minor` + `patch` + `status` + `build` in a single String\nThe `hex` value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, \"3.1.12\" would be `0x03010C`. **Note:** It's still an int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for easy version comparisons from code:\n```gdscript\nif Engine.get_version_info().hex >= 0x030200:\n    # Do things specific to version 3.2 or later\nelse:\n    # Do things specific to versions before 3.2\n```"] # [doc = ""] # [inline] pub fn get_version_info (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . get_version_info ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if a singleton with given `name` exists in global scope."] # [doc = ""] # [inline] pub fn has_singleton (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . has_singleton ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nIf `true`, the script is currently running inside the editor. This is useful for `tool` scripts to conditionally draw editor helpers, or prevent accidentally running \"game\" code that would affect the scene state while in the editor:\n```gdscript\nif Engine.editor_hint:\n    draw_gizmos()\nelse:\n    simulate_physics()\n```\nSee [Running code in the editor](https://docs.godotengine.org/en/3.5.1/tutorials/plugins/running_code_in_the_editor.html) in the documentation for more information.\n**Note:** To detect whether the script is run from an editor _build_ (e.g. when pressing `F5`), use [`OS.has_feature`][OS::has_feature] with the `\"editor\"` argument instead. `OS.has_feature(\"editor\")` will evaluate to `true` both when the code is running in the editor and when running the project from the editor, but it will evaluate to `false` when the code is run from an exported project."] # [doc = ""] # [inline] pub fn is_editor_hint (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . is_editor_hint ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the game is inside the fixed process and physics phase of the game loop."] # [doc = ""] # [inline] pub fn is_in_physics_frame (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . is_in_physics_frame ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `false`, stops printing error and warning messages to the console and editor Output log. This can be used to hide error and warning messages during unit test suite runs. This property is equivalent to the [member ProjectSettings.application/run/disable_stderr] project setting.\n**Warning:** If you set this to `false` anywhere in the project, important error messages may be hidden even if they are emitted from other scripts. If this is set to `false` in a `tool` script, this will also impact the editor itself. Do _not_ report bugs before ensuring error messages are enabled (as they are by default).\n**Note:** This property does not impact the editor's Errors tab when running a project from the editor."] # [doc = ""] # [inline] pub fn is_printing_error_messages (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . is_printing_error_messages ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nIf `true`, the script is currently running inside the editor. This is useful for `tool` scripts to conditionally draw editor helpers, or prevent accidentally running \"game\" code that would affect the scene state while in the editor:\n```gdscript\nif Engine.editor_hint:\n    draw_gizmos()\nelse:\n    simulate_physics()\n```\nSee [Running code in the editor](https://docs.godotengine.org/en/3.5.1/tutorials/plugins/running_code_in_the_editor.html) in the documentation for more information.\n**Note:** To detect whether the script is run from an editor _build_ (e.g. when pressing `F5`), use [`OS.has_feature`][OS::has_feature] with the `\"editor\"` argument instead. `OS.has_feature(\"editor\")` will evaluate to `true` both when the code is running in the editor and when running the project from the editor, but it will evaluate to `false` when the code is run from an exported project."] # [doc = ""] # [inline] pub fn set_editor_hint (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . set_editor_hint ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The number of fixed iterations per second. This controls how often physics simulation and [`Node._physics_process`][Node::_physics_process] methods are run. This value should generally always be set to `60` or above, as Godot doesn't interpolate the physics step. As a result, values lower than `60` will look stuttery. This value can be increased to make input more reactive or work around collision tunneling issues, but keep in mind doing so will increase CPU usage. See also [`target_fps`][Self::target_fps] and [member ProjectSettings.physics/common/physics_fps].\n**Note:** Only 8 physics ticks may be simulated per rendered frame at most. If more than 8 physics ticks have to be simulated per rendered frame to keep up with rendering, the game will appear to slow down (even if `delta` is used consistently in physics calculations). Therefore, it is recommended not to increase [`Engine.iterations_per_second`][Engine::iterations_per_second] above 240. Otherwise, the game will slow down when the rendering framerate goes below 30 FPS."] # [doc = ""] # [inline] pub fn set_iterations_per_second (& self , iterations_per_second : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . set_iterations_per_second ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , iterations_per_second as _) ; } } # [doc = "Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of the in-game clock and real clock but smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended.\n**Note:** For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [`physics_jitter_fix`][Self::physics_jitter_fix] to `0`."] # [doc = ""] # [inline] pub fn set_physics_jitter_fix (& self , physics_jitter_fix : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . set_physics_jitter_fix ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , physics_jitter_fix as _) ; } } # [doc = "If `false`, stops printing error and warning messages to the console and editor Output log. This can be used to hide error and warning messages during unit test suite runs. This property is equivalent to the [member ProjectSettings.application/run/disable_stderr] project setting.\n**Warning:** If you set this to `false` anywhere in the project, important error messages may be hidden even if they are emitted from other scripts. If this is set to `false` in a `tool` script, this will also impact the editor itself. Do _not_ report bugs before ensuring error messages are enabled (as they are by default).\n**Note:** This property does not impact the editor's Errors tab when running a project from the editor."] # [doc = ""] # [inline] pub fn set_print_error_messages (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . set_print_error_messages ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit."] # [doc = ""] # [inline] pub fn set_target_fps (& self , target_fps : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . set_target_fps ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , target_fps as _) ; } } # [doc = "Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed."] # [doc = ""] # [inline] pub fn set_time_scale (& self , time_scale : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = EngineMethodTable :: get (get_api ()) . set_time_scale ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , time_scale as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Engine { } unsafe impl GodotObject for Engine { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Engine" } } impl std :: ops :: Deref for Engine { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Engine { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for Engine { } unsafe impl Send for Engine { } unsafe impl Sync for Engine { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct EngineMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_author_info : * mut sys :: godot_method_bind , pub get_copyright_info : * mut sys :: godot_method_bind , pub get_donor_info : * mut sys :: godot_method_bind , pub get_frames_drawn : * mut sys :: godot_method_bind , pub get_frames_per_second : * mut sys :: godot_method_bind , pub get_idle_frames : * mut sys :: godot_method_bind , pub get_iterations_per_second : * mut sys :: godot_method_bind , pub get_license_info : * mut sys :: godot_method_bind , pub get_license_text : * mut sys :: godot_method_bind , pub get_main_loop : * mut sys :: godot_method_bind , pub get_physics_frames : * mut sys :: godot_method_bind , pub get_physics_interpolation_fraction : * mut sys :: godot_method_bind , pub get_physics_jitter_fix : * mut sys :: godot_method_bind , pub get_singleton : * mut sys :: godot_method_bind , pub get_target_fps : * mut sys :: godot_method_bind , pub get_time_scale : * mut sys :: godot_method_bind , pub get_version_info : * mut sys :: godot_method_bind , pub has_singleton : * mut sys :: godot_method_bind , pub is_editor_hint : * mut sys :: godot_method_bind , pub is_in_physics_frame : * mut sys :: godot_method_bind , pub is_printing_error_messages : * mut sys :: godot_method_bind , pub set_editor_hint : * mut sys :: godot_method_bind , pub set_iterations_per_second : * mut sys :: godot_method_bind , pub set_physics_jitter_fix : * mut sys :: godot_method_bind , pub set_print_error_messages : * mut sys :: godot_method_bind , pub set_target_fps : * mut sys :: godot_method_bind , pub set_time_scale : * mut sys :: godot_method_bind } impl EngineMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : EngineMethodTable = EngineMethodTable { class_constructor : None , get_author_info : 0 as * mut sys :: godot_method_bind , get_copyright_info : 0 as * mut sys :: godot_method_bind , get_donor_info : 0 as * mut sys :: godot_method_bind , get_frames_drawn : 0 as * mut sys :: godot_method_bind , get_frames_per_second : 0 as * mut sys :: godot_method_bind , get_idle_frames : 0 as * mut sys :: godot_method_bind , get_iterations_per_second : 0 as * mut sys :: godot_method_bind , get_license_info : 0 as * mut sys :: godot_method_bind , get_license_text : 0 as * mut sys :: godot_method_bind , get_main_loop : 0 as * mut sys :: godot_method_bind , get_physics_frames : 0 as * mut sys :: godot_method_bind , get_physics_interpolation_fraction : 0 as * mut sys :: godot_method_bind , get_physics_jitter_fix : 0 as * mut sys :: godot_method_bind , get_singleton : 0 as * mut sys :: godot_method_bind , get_target_fps : 0 as * mut sys :: godot_method_bind , get_time_scale : 0 as * mut sys :: godot_method_bind , get_version_info : 0 as * mut sys :: godot_method_bind , has_singleton : 0 as * mut sys :: godot_method_bind , is_editor_hint : 0 as * mut sys :: godot_method_bind , is_in_physics_frame : 0 as * mut sys :: godot_method_bind , is_printing_error_messages : 0 as * mut sys :: godot_method_bind , set_editor_hint : 0 as * mut sys :: godot_method_bind , set_iterations_per_second : 0 as * mut sys :: godot_method_bind , set_physics_jitter_fix : 0 as * mut sys :: godot_method_bind , set_print_error_messages : 0 as * mut sys :: godot_method_bind , set_target_fps : 0 as * mut sys :: godot_method_bind , set_time_scale : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { EngineMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_Engine\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_author_info = (gd_api . godot_method_bind_get_method) (class_name , "get_author_info\0" . as_ptr () as * const c_char) ; table . get_copyright_info = (gd_api . godot_method_bind_get_method) (class_name , "get_copyright_info\0" . as_ptr () as * const c_char) ; table . get_donor_info = (gd_api . godot_method_bind_get_method) (class_name , "get_donor_info\0" . as_ptr () as * const c_char) ; table . get_frames_drawn = (gd_api . godot_method_bind_get_method) (class_name , "get_frames_drawn\0" . as_ptr () as * const c_char) ; table . get_frames_per_second = (gd_api . godot_method_bind_get_method) (class_name , "get_frames_per_second\0" . as_ptr () as * const c_char) ; table . get_idle_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_idle_frames\0" . as_ptr () as * const c_char) ; table . get_iterations_per_second = (gd_api . godot_method_bind_get_method) (class_name , "get_iterations_per_second\0" . as_ptr () as * const c_char) ; table . get_license_info = (gd_api . godot_method_bind_get_method) (class_name , "get_license_info\0" . as_ptr () as * const c_char) ; table . get_license_text = (gd_api . godot_method_bind_get_method) (class_name , "get_license_text\0" . as_ptr () as * const c_char) ; table . get_main_loop = (gd_api . godot_method_bind_get_method) (class_name , "get_main_loop\0" . as_ptr () as * const c_char) ; table . get_physics_frames = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_frames\0" . as_ptr () as * const c_char) ; table . get_physics_interpolation_fraction = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_interpolation_fraction\0" . as_ptr () as * const c_char) ; table . get_physics_jitter_fix = (gd_api . godot_method_bind_get_method) (class_name , "get_physics_jitter_fix\0" . as_ptr () as * const c_char) ; table . get_singleton = (gd_api . godot_method_bind_get_method) (class_name , "get_singleton\0" . as_ptr () as * const c_char) ; table . get_target_fps = (gd_api . godot_method_bind_get_method) (class_name , "get_target_fps\0" . as_ptr () as * const c_char) ; table . get_time_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_time_scale\0" . as_ptr () as * const c_char) ; table . get_version_info = (gd_api . godot_method_bind_get_method) (class_name , "get_version_info\0" . as_ptr () as * const c_char) ; table . has_singleton = (gd_api . godot_method_bind_get_method) (class_name , "has_singleton\0" . as_ptr () as * const c_char) ; table . is_editor_hint = (gd_api . godot_method_bind_get_method) (class_name , "is_editor_hint\0" . as_ptr () as * const c_char) ; table . is_in_physics_frame = (gd_api . godot_method_bind_get_method) (class_name , "is_in_physics_frame\0" . as_ptr () as * const c_char) ; table . is_printing_error_messages = (gd_api . godot_method_bind_get_method) (class_name , "is_printing_error_messages\0" . as_ptr () as * const c_char) ; table . set_editor_hint = (gd_api . godot_method_bind_get_method) (class_name , "set_editor_hint\0" . as_ptr () as * const c_char) ; table . set_iterations_per_second = (gd_api . godot_method_bind_get_method) (class_name , "set_iterations_per_second\0" . as_ptr () as * const c_char) ; table . set_physics_jitter_fix = (gd_api . godot_method_bind_get_method) (class_name , "set_physics_jitter_fix\0" . as_ptr () as * const c_char) ; table . set_print_error_messages = (gd_api . godot_method_bind_get_method) (class_name , "set_print_error_messages\0" . as_ptr () as * const c_char) ; table . set_target_fps = (gd_api . godot_method_bind_get_method) (class_name , "set_target_fps\0" . as_ptr () as * const c_char) ; table . set_time_scale = (gd_api . godot_method_bind_get_method) (class_name , "set_time_scale\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::engine::private::Engine;
            
            pub mod file {
                # ! [doc = "This module contains types related to the API class [`File`][super::File]."] pub (crate) mod private { # [doc = "`core class File` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`file`][super::file] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_file.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nFile inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct File { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: File ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct CompressionMode (pub i64) ; impl CompressionMode { pub const FASTLZ : CompressionMode = CompressionMode (0i64) ; pub const DEFLATE : CompressionMode = CompressionMode (1i64) ; pub const ZSTD : CompressionMode = CompressionMode (2i64) ; pub const GZIP : CompressionMode = CompressionMode (3i64) ; } impl From < i64 > for CompressionMode { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < CompressionMode > for i64 { # [inline] fn from (v : CompressionMode) -> Self { v . 0 } } impl FromVariant for CompressionMode { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ModeFlags (pub i64) ; impl ModeFlags { pub const READ : ModeFlags = ModeFlags (1i64) ; pub const WRITE : ModeFlags = ModeFlags (2i64) ; pub const READ_WRITE : ModeFlags = ModeFlags (3i64) ; pub const WRITE_READ : ModeFlags = ModeFlags (7i64) ; } impl From < i64 > for ModeFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ModeFlags > for i64 { # [inline] fn from (v : ModeFlags) -> Self { v . 0 } } impl FromVariant for ModeFlags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl File { pub const COMPRESSION_FASTLZ : i64 = 0i64 ; pub const COMPRESSION_DEFLATE : i64 = 1i64 ; pub const READ : i64 = 1i64 ; pub const COMPRESSION_ZSTD : i64 = 2i64 ; pub const WRITE : i64 = 2i64 ; pub const COMPRESSION_GZIP : i64 = 3i64 ; pub const READ_WRITE : i64 = 3i64 ; pub const WRITE_READ : i64 = 7i64 ; } impl File { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = FileMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Closes the currently opened file and prevents subsequent read/write operations. Use [`flush`][Self::flush] to persist the data to disk without closing the file."] # [doc = ""] # [inline] pub fn close (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . close ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns `true` if the file cursor has already read past the end of the file.\n**Note:** `eof_reached() == false` cannot be used to check whether there is more data available. To loop while there is more data available, use:\n```gdscript\nwhile file.get_position() < file.get_len():\n    # Read data\n```"] # [doc = ""] # [inline] pub fn eof_reached (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . eof_reached ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the file exists in the given path.\n**Note:** Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See [`ResourceLoader.exists`][ResourceLoader::exists] for an alternative approach that takes resource remapping into account."] # [doc = ""] # [inline] pub fn file_exists (& self , path : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . file_exists ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Writes the file's buffer to disk. Flushing is automatically performed when the file is closed. This means you don't need to call [`flush`][Self::flush] manually before closing a file using [`close`][Self::close]. Still, calling [`flush`][Self::flush] can be used to ensure the data is safe even if the project crashes instead of being closed gracefully.\n**Note:** Only call [`flush`][Self::flush] when you actually need it. Otherwise, it will decrease performance due to constant disk writes."] # [doc = ""] # [inline] pub fn flush (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . flush ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns the next 16 bits from the file as an integer. See [`store_16`][Self::store_16] for details on what values can be stored and retrieved this way."] # [doc = ""] # [inline] pub fn get_16 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_16 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the next 32 bits from the file as an integer. See [`store_32`][Self::store_32] for details on what values can be stored and retrieved this way."] # [doc = ""] # [inline] pub fn get_32 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_32 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the next 64 bits from the file as an integer. See [`store_64`][Self::store_64] for details on what values can be stored and retrieved this way."] # [doc = ""] # [inline] pub fn get_64 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_64 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the next 8 bits from the file as an integer. See [`store_8`][Self::store_8] for details on what values can be stored and retrieved this way."] # [doc = ""] # [inline] pub fn get_8 (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_8 ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the whole file as a [`String`][GodotString]. Text is interpreted as being UTF-8 encoded.\nIf `skip_cr` is `true`, carriage return characters (`\\r`, CR) will be ignored when parsing the UTF-8, so that only line feed characters (`\\n`, LF) represent a new line (Unix convention).\n# Default Arguments\n* `skip_cr` - `true`"] # [doc = ""] # [inline] pub fn get_as_text (& self , skip_cr : bool) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_as_text ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , skip_cr as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns next `len` bytes of the file as a [`PoolByteArray`][PoolArray<u8>]."] # [doc = ""] # [inline] pub fn get_buffer (& self , len : i64) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_buffer ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , len as _) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter `delim` to use other than the default `\",\"` (comma). This delimiter must be one-character long, and cannot be a double quotation mark.\nText is interpreted as being UTF-8 encoded. Text values must be enclosed in double quotes if they include the delimiter character. Double quotes within a text value can be escaped by doubling their occurrence.\nFor example, the following CSV lines are valid and will be properly parsed as two strings each:\n```gdscript\nAlice,\"Hello, Bob!\"\nBob,Alice! What a surprise!\nAlice,\"I thought you'd reply with \"\"Hello, world\"\".\"\n```\nNote how the second line can omit the enclosing quotes as it does not include the delimiter. However it _could_ very well use quotes, it was only written without for demonstration purposes. The third line must use `\"\"` for each quotation mark that needs to be interpreted as such instead of the end of a text value.\n# Default Arguments\n* `delim` - `\",\"`"] # [doc = ""] # [inline] pub fn get_csv_line (& self , delim : impl Into < GodotString >) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_csv_line ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , delim . into ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the next 64 bits from the file as a floating-point number."] # [doc = ""] # [inline] pub fn get_double (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_double ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the file is read with big-endian [`endianness`][endianness](https://en.wikipedia.org/wiki/Endianness). If `false`, the file is read with little-endian endianness. If in doubt, leave this to `false` as most files are written with little-endian endianness.\n**Note:** [`endian_swap`][Self::endian_swap] is only about the file format, not the CPU type. The CPU endianness doesn't affect the default endianness for files written.\n**Note:** This is always reset to `false` whenever you open the file. Therefore, you must set [`endian_swap`][Self::endian_swap] _after_ opening the file, not before."] # [doc = ""] # [inline] pub fn endian_swap (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_endian_swap ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the last error that happened when trying to perform operations. Compare with the `ERR_FILE_*` constants from [`Error`][GodotError]."] # [doc = ""] # [inline] pub fn get_error (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_error ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Returns the next 32 bits from the file as a floating-point number."] # [doc = ""] # [inline] pub fn get_float (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_float ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the size of the file in bytes."] # [doc = ""] # [inline] pub fn get_len (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_len ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the next line of the file as a [`String`][GodotString].\nText is interpreted as being UTF-8 encoded."] # [doc = ""] # [inline] pub fn get_line (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_line ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an MD5 String representing the file at the given path or an empty [`String`][GodotString] on failure."] # [doc = ""] # [inline] pub fn get_md5 (& self , path : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_md5 ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the last time the `file` was modified in unix timestamp format or returns a [`String`][GodotString] \"ERROR IN `file`\". This unix timestamp can be converted to datetime by using [`OS.get_datetime_from_unix_time`][OS::get_datetime_from_unix_time]."] # [doc = ""] # [inline] pub fn get_modified_time (& self , file : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_modified_time ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a [`String`][GodotString] saved in Pascal format from the file.\nText is interpreted as being UTF-8 encoded."] # [doc = ""] # [inline] pub fn get_pascal_string (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_pascal_string ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the path as a [`String`][GodotString] for the current open file."] # [doc = ""] # [inline] pub fn get_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the absolute path as a [`String`][GodotString] for the current open file."] # [doc = ""] # [inline] pub fn get_path_absolute (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_path_absolute ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the file cursor's position."] # [doc = ""] # [inline] pub fn get_position (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the next bits from the file as a floating-point number."] # [doc = ""] # [inline] pub fn get_real (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_real ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns a SHA-256 [`String`][GodotString] representing the file at the given path or an empty [`String`][GodotString] on failure."] # [doc = ""] # [inline] pub fn get_sha256 (& self , path : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_sha256 ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the next [`Variant`][Variant] value from the file. If `allow_objects` is `true`, decoding objects is allowed.\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.\n# Default Arguments\n* `allow_objects` - `false`"] # [doc = ""] # [inline] pub fn get_var (& self , allow_objects : bool) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . get_var ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , allow_objects as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if the file is currently opened."] # [doc = ""] # [inline] pub fn is_open (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . is_open ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Opens the file for writing or reading, depending on the flags."] # [doc = ""] # [inline] pub fn open (& self , path : impl Into < GodotString > , flags : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . open ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , path . into () , flags as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Opens a compressed file for reading or writing.\n**Note:** [`open_compressed`][Self::open_compressed] can only read files that were saved by Godot, not third-party compression formats. See [GitHub issue #28999](https://github.com/godotengine/godot/issues/28999) for a workaround.\n# Default Arguments\n* `compression_mode` - `0`"] # [doc = ""] # [inline] pub fn open_compressed (& self , path : impl Into < GodotString > , mode_flags : i64 , compression_mode : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . open_compressed ; let ret = crate :: icalls :: icallvar__str_i64_i64 (method_bind , self . this . sys () . as_ptr () , path . into () , mode_flags as _ , compression_mode as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it.\n**Note:** The provided key must be 32 bytes long."] # [doc = ""] # [inline] pub fn open_encrypted (& self , path : impl Into < GodotString > , mode_flags : i64 , key : PoolArray < u8 >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . open_encrypted ; let ret = crate :: icalls :: icallvar__str_i64_bytearr (method_bind , self . this . sys () . as_ptr () , path . into () , mode_flags as _ , key) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Opens an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it."] # [doc = ""] # [inline] pub fn open_encrypted_with_pass (& self , path : impl Into < GodotString > , mode_flags : i64 , pass : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . open_encrypted_with_pass ; let ret = crate :: icalls :: icallvar__str_i64_str (method_bind , self . this . sys () . as_ptr () , path . into () , mode_flags as _ , pass . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Changes the file reading/writing cursor to the specified position (in bytes from the beginning of the file)."] # [doc = ""] # [inline] pub fn seek (& self , position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . seek ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , position as _) ; } } # [doc = "Changes the file reading/writing cursor to the specified position (in bytes from the end of the file).\n**Note:** This is an offset, so you should use negative numbers or the cursor will be at the end of the file.\n# Default Arguments\n* `position` - `0`"] # [doc = ""] # [inline] pub fn seek_end (& self , position : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . seek_end ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , position as _) ; } } # [doc = "If `true`, the file is read with big-endian [`endianness`][endianness](https://en.wikipedia.org/wiki/Endianness). If `false`, the file is read with little-endian endianness. If in doubt, leave this to `false` as most files are written with little-endian endianness.\n**Note:** [`endian_swap`][Self::endian_swap] is only about the file format, not the CPU type. The CPU endianness doesn't affect the default endianness for files written.\n**Note:** This is always reset to `false` whenever you open the file. Therefore, you must set [`endian_swap`][Self::endian_swap] _after_ opening the file, not before."] # [doc = ""] # [inline] pub fn set_endian_swap (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . set_endian_swap ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nStores an integer as 16 bits in the file.\n**Note:** The `value` should lie in the interval `[0, 2^16 - 1]`. Any other value will overflow and wrap around.\nTo store a signed integer, use [`store_64`][Self::store_64] or store a signed integer from the interval `[-2^15, 2^15 - 1]` (i.e. keeping one bit for the signedness) and compute its sign manually when reading. For example:\n```gdscript\nconst MAX_15B = 1 << 15\nconst MAX_16B = 1 << 16\n\nfunc unsigned16_to_signed(unsigned):\n    return (unsigned + MAX_15B) % MAX_16B - MAX_15B\n\nfunc _ready():\n    var f = File.new()\n    f.open(\"user://file.dat\", File.WRITE_READ)\n    f.store_16(-42) # This wraps around and stores 65494 (2^16 - 42).\n    f.store_16(121) # In bounds, will store 121.\n    f.seek(0) # Go back to start to read the stored value.\n    var read1 = f.get_16() # 65494\n    var read2 = f.get_16() # 121\n    var converted1 = unsigned16_to_signed(read1) # -42\n    var converted2 = unsigned16_to_signed(read2) # 121\n```"] # [doc = ""] # [inline] pub fn store_16 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . store_16 ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Stores an integer as 32 bits in the file.\n**Note:** The `value` should lie in the interval `[0, 2^32 - 1]`. Any other value will overflow and wrap around.\nTo store a signed integer, use [`store_64`][Self::store_64], or convert it manually (see [`store_16`][Self::store_16] for an example)."] # [doc = ""] # [inline] pub fn store_32 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . store_32 ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Stores an integer as 64 bits in the file.\n**Note:** The `value` must lie in the interval `[-2^63, 2^63 - 1]` (i.e. be a valid [`int`][int] value)."] # [doc = ""] # [inline] pub fn store_64 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . store_64 ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Stores an integer as 8 bits in the file.\n**Note:** The `value` should lie in the interval `[0, 255]`. Any other value will overflow and wrap around.\nTo store a signed integer, use [`store_64`][Self::store_64], or convert it manually (see [`store_16`][Self::store_16] for an example)."] # [doc = ""] # [inline] pub fn store_8 (& self , value : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . store_8 ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Stores the given array of bytes in the file."] # [doc = ""] # [inline] pub fn store_buffer (& self , buffer : PoolArray < u8 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . store_buffer ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , buffer) ; } } # [doc = "Store the given [`PoolStringArray`][PoolArray<GodotString>] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter `delim` to use other than the default `\",\"` (comma). This delimiter must be one-character long.\nText will be encoded as UTF-8.\n# Default Arguments\n* `delim` - `\",\"`"] # [doc = ""] # [inline] pub fn store_csv_line (& self , values : PoolArray < GodotString > , delim : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . store_csv_line ; let ret = crate :: icalls :: icallvar__strarr_str (method_bind , self . this . sys () . as_ptr () , values , delim . into ()) ; } } # [doc = "Stores a floating-point number as 64 bits in the file."] # [doc = ""] # [inline] pub fn store_double (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . store_double ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Stores a floating-point number as 32 bits in the file."] # [doc = ""] # [inline] pub fn store_float (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . store_float ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Appends `line` to the file followed by a line return character (`\\n`), encoding the text as UTF-8."] # [doc = ""] # [inline] pub fn store_line (& self , line : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . store_line ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , line . into ()) ; } } # [doc = "Stores the given [`String`][GodotString] as a line in the file in Pascal format (i.e. also store the length of the string).\nText will be encoded as UTF-8."] # [doc = ""] # [inline] pub fn store_pascal_string (& self , string : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . store_pascal_string ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , string . into ()) ; } } # [doc = "Stores a floating-point number in the file."] # [doc = ""] # [inline] pub fn store_real (& self , value : f64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . store_real ; let ret = crate :: icalls :: icallvar__f64 (method_bind , self . this . sys () . as_ptr () , value as _) ; } } # [doc = "Appends `string` to the file without a line return, encoding the text as UTF-8.\n**Note:** This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using [`store_pascal_string`][Self::store_pascal_string] instead. For retrieving strings from a text file, you can use `get_buffer(length).get_string_from_utf8()` (if you know the length) or [`get_as_text`][Self::get_as_text]."] # [doc = ""] # [inline] pub fn store_string (& self , string : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . store_string ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , string . into ()) ; } } # [doc = "Stores any Variant value in the file. If `full_objects` is `true`, encoding objects is allowed (and can potentially include code).\n**Note:** Not all properties are included. Only properties that are configured with the [`PROPERTY_USAGE_STORAGE`][Self::PROPERTY_USAGE_STORAGE] flag set will be serialized. You can add a new usage flag to a property by overriding the [`Object._get_property_list`][Object::_get_property_list] method in your class. You can also check how property usage is configured by calling [`Object._get_property_list`][Object::_get_property_list]. See [`PropertyUsageFlags`][PropertyUsageFlags] for the possible usage flags.\n# Default Arguments\n* `full_objects` - `false`"] # [doc = ""] # [inline] pub fn store_var (& self , value : impl OwnedToVariant , full_objects : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = FileMethodTable :: get (get_api ()) . store_var ; let ret = crate :: icalls :: icallvar__var_bool (method_bind , self . this . sys () . as_ptr () , value . owned_to_variant () , full_objects as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for File { } unsafe impl GodotObject for File { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "File" } } impl std :: ops :: Deref for File { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for File { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for File { } unsafe impl SubClass < crate :: generated :: Object > for File { } impl Instanciable for File { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { File :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct FileMethodTable { pub class_constructor : sys :: godot_class_constructor , pub close : * mut sys :: godot_method_bind , pub eof_reached : * mut sys :: godot_method_bind , pub file_exists : * mut sys :: godot_method_bind , pub flush : * mut sys :: godot_method_bind , pub get_16 : * mut sys :: godot_method_bind , pub get_32 : * mut sys :: godot_method_bind , pub get_64 : * mut sys :: godot_method_bind , pub get_8 : * mut sys :: godot_method_bind , pub get_as_text : * mut sys :: godot_method_bind , pub get_buffer : * mut sys :: godot_method_bind , pub get_csv_line : * mut sys :: godot_method_bind , pub get_double : * mut sys :: godot_method_bind , pub get_endian_swap : * mut sys :: godot_method_bind , pub get_error : * mut sys :: godot_method_bind , pub get_float : * mut sys :: godot_method_bind , pub get_len : * mut sys :: godot_method_bind , pub get_line : * mut sys :: godot_method_bind , pub get_md5 : * mut sys :: godot_method_bind , pub get_modified_time : * mut sys :: godot_method_bind , pub get_pascal_string : * mut sys :: godot_method_bind , pub get_path : * mut sys :: godot_method_bind , pub get_path_absolute : * mut sys :: godot_method_bind , pub get_position : * mut sys :: godot_method_bind , pub get_real : * mut sys :: godot_method_bind , pub get_sha256 : * mut sys :: godot_method_bind , pub get_var : * mut sys :: godot_method_bind , pub is_open : * mut sys :: godot_method_bind , pub open : * mut sys :: godot_method_bind , pub open_compressed : * mut sys :: godot_method_bind , pub open_encrypted : * mut sys :: godot_method_bind , pub open_encrypted_with_pass : * mut sys :: godot_method_bind , pub seek : * mut sys :: godot_method_bind , pub seek_end : * mut sys :: godot_method_bind , pub set_endian_swap : * mut sys :: godot_method_bind , pub store_16 : * mut sys :: godot_method_bind , pub store_32 : * mut sys :: godot_method_bind , pub store_64 : * mut sys :: godot_method_bind , pub store_8 : * mut sys :: godot_method_bind , pub store_buffer : * mut sys :: godot_method_bind , pub store_csv_line : * mut sys :: godot_method_bind , pub store_double : * mut sys :: godot_method_bind , pub store_float : * mut sys :: godot_method_bind , pub store_line : * mut sys :: godot_method_bind , pub store_pascal_string : * mut sys :: godot_method_bind , pub store_real : * mut sys :: godot_method_bind , pub store_string : * mut sys :: godot_method_bind , pub store_var : * mut sys :: godot_method_bind } impl FileMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : FileMethodTable = FileMethodTable { class_constructor : None , close : 0 as * mut sys :: godot_method_bind , eof_reached : 0 as * mut sys :: godot_method_bind , file_exists : 0 as * mut sys :: godot_method_bind , flush : 0 as * mut sys :: godot_method_bind , get_16 : 0 as * mut sys :: godot_method_bind , get_32 : 0 as * mut sys :: godot_method_bind , get_64 : 0 as * mut sys :: godot_method_bind , get_8 : 0 as * mut sys :: godot_method_bind , get_as_text : 0 as * mut sys :: godot_method_bind , get_buffer : 0 as * mut sys :: godot_method_bind , get_csv_line : 0 as * mut sys :: godot_method_bind , get_double : 0 as * mut sys :: godot_method_bind , get_endian_swap : 0 as * mut sys :: godot_method_bind , get_error : 0 as * mut sys :: godot_method_bind , get_float : 0 as * mut sys :: godot_method_bind , get_len : 0 as * mut sys :: godot_method_bind , get_line : 0 as * mut sys :: godot_method_bind , get_md5 : 0 as * mut sys :: godot_method_bind , get_modified_time : 0 as * mut sys :: godot_method_bind , get_pascal_string : 0 as * mut sys :: godot_method_bind , get_path : 0 as * mut sys :: godot_method_bind , get_path_absolute : 0 as * mut sys :: godot_method_bind , get_position : 0 as * mut sys :: godot_method_bind , get_real : 0 as * mut sys :: godot_method_bind , get_sha256 : 0 as * mut sys :: godot_method_bind , get_var : 0 as * mut sys :: godot_method_bind , is_open : 0 as * mut sys :: godot_method_bind , open : 0 as * mut sys :: godot_method_bind , open_compressed : 0 as * mut sys :: godot_method_bind , open_encrypted : 0 as * mut sys :: godot_method_bind , open_encrypted_with_pass : 0 as * mut sys :: godot_method_bind , seek : 0 as * mut sys :: godot_method_bind , seek_end : 0 as * mut sys :: godot_method_bind , set_endian_swap : 0 as * mut sys :: godot_method_bind , store_16 : 0 as * mut sys :: godot_method_bind , store_32 : 0 as * mut sys :: godot_method_bind , store_64 : 0 as * mut sys :: godot_method_bind , store_8 : 0 as * mut sys :: godot_method_bind , store_buffer : 0 as * mut sys :: godot_method_bind , store_csv_line : 0 as * mut sys :: godot_method_bind , store_double : 0 as * mut sys :: godot_method_bind , store_float : 0 as * mut sys :: godot_method_bind , store_line : 0 as * mut sys :: godot_method_bind , store_pascal_string : 0 as * mut sys :: godot_method_bind , store_real : 0 as * mut sys :: godot_method_bind , store_string : 0 as * mut sys :: godot_method_bind , store_var : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { FileMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_File\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . close = (gd_api . godot_method_bind_get_method) (class_name , "close\0" . as_ptr () as * const c_char) ; table . eof_reached = (gd_api . godot_method_bind_get_method) (class_name , "eof_reached\0" . as_ptr () as * const c_char) ; table . file_exists = (gd_api . godot_method_bind_get_method) (class_name , "file_exists\0" . as_ptr () as * const c_char) ; table . flush = (gd_api . godot_method_bind_get_method) (class_name , "flush\0" . as_ptr () as * const c_char) ; table . get_16 = (gd_api . godot_method_bind_get_method) (class_name , "get_16\0" . as_ptr () as * const c_char) ; table . get_32 = (gd_api . godot_method_bind_get_method) (class_name , "get_32\0" . as_ptr () as * const c_char) ; table . get_64 = (gd_api . godot_method_bind_get_method) (class_name , "get_64\0" . as_ptr () as * const c_char) ; table . get_8 = (gd_api . godot_method_bind_get_method) (class_name , "get_8\0" . as_ptr () as * const c_char) ; table . get_as_text = (gd_api . godot_method_bind_get_method) (class_name , "get_as_text\0" . as_ptr () as * const c_char) ; table . get_buffer = (gd_api . godot_method_bind_get_method) (class_name , "get_buffer\0" . as_ptr () as * const c_char) ; table . get_csv_line = (gd_api . godot_method_bind_get_method) (class_name , "get_csv_line\0" . as_ptr () as * const c_char) ; table . get_double = (gd_api . godot_method_bind_get_method) (class_name , "get_double\0" . as_ptr () as * const c_char) ; table . get_endian_swap = (gd_api . godot_method_bind_get_method) (class_name , "get_endian_swap\0" . as_ptr () as * const c_char) ; table . get_error = (gd_api . godot_method_bind_get_method) (class_name , "get_error\0" . as_ptr () as * const c_char) ; table . get_float = (gd_api . godot_method_bind_get_method) (class_name , "get_float\0" . as_ptr () as * const c_char) ; table . get_len = (gd_api . godot_method_bind_get_method) (class_name , "get_len\0" . as_ptr () as * const c_char) ; table . get_line = (gd_api . godot_method_bind_get_method) (class_name , "get_line\0" . as_ptr () as * const c_char) ; table . get_md5 = (gd_api . godot_method_bind_get_method) (class_name , "get_md5\0" . as_ptr () as * const c_char) ; table . get_modified_time = (gd_api . godot_method_bind_get_method) (class_name , "get_modified_time\0" . as_ptr () as * const c_char) ; table . get_pascal_string = (gd_api . godot_method_bind_get_method) (class_name , "get_pascal_string\0" . as_ptr () as * const c_char) ; table . get_path = (gd_api . godot_method_bind_get_method) (class_name , "get_path\0" . as_ptr () as * const c_char) ; table . get_path_absolute = (gd_api . godot_method_bind_get_method) (class_name , "get_path_absolute\0" . as_ptr () as * const c_char) ; table . get_position = (gd_api . godot_method_bind_get_method) (class_name , "get_position\0" . as_ptr () as * const c_char) ; table . get_real = (gd_api . godot_method_bind_get_method) (class_name , "get_real\0" . as_ptr () as * const c_char) ; table . get_sha256 = (gd_api . godot_method_bind_get_method) (class_name , "get_sha256\0" . as_ptr () as * const c_char) ; table . get_var = (gd_api . godot_method_bind_get_method) (class_name , "get_var\0" . as_ptr () as * const c_char) ; table . is_open = (gd_api . godot_method_bind_get_method) (class_name , "is_open\0" . as_ptr () as * const c_char) ; table . open = (gd_api . godot_method_bind_get_method) (class_name , "open\0" . as_ptr () as * const c_char) ; table . open_compressed = (gd_api . godot_method_bind_get_method) (class_name , "open_compressed\0" . as_ptr () as * const c_char) ; table . open_encrypted = (gd_api . godot_method_bind_get_method) (class_name , "open_encrypted\0" . as_ptr () as * const c_char) ; table . open_encrypted_with_pass = (gd_api . godot_method_bind_get_method) (class_name , "open_encrypted_with_pass\0" . as_ptr () as * const c_char) ; table . seek = (gd_api . godot_method_bind_get_method) (class_name , "seek\0" . as_ptr () as * const c_char) ; table . seek_end = (gd_api . godot_method_bind_get_method) (class_name , "seek_end\0" . as_ptr () as * const c_char) ; table . set_endian_swap = (gd_api . godot_method_bind_get_method) (class_name , "set_endian_swap\0" . as_ptr () as * const c_char) ; table . store_16 = (gd_api . godot_method_bind_get_method) (class_name , "store_16\0" . as_ptr () as * const c_char) ; table . store_32 = (gd_api . godot_method_bind_get_method) (class_name , "store_32\0" . as_ptr () as * const c_char) ; table . store_64 = (gd_api . godot_method_bind_get_method) (class_name , "store_64\0" . as_ptr () as * const c_char) ; table . store_8 = (gd_api . godot_method_bind_get_method) (class_name , "store_8\0" . as_ptr () as * const c_char) ; table . store_buffer = (gd_api . godot_method_bind_get_method) (class_name , "store_buffer\0" . as_ptr () as * const c_char) ; table . store_csv_line = (gd_api . godot_method_bind_get_method) (class_name , "store_csv_line\0" . as_ptr () as * const c_char) ; table . store_double = (gd_api . godot_method_bind_get_method) (class_name , "store_double\0" . as_ptr () as * const c_char) ; table . store_float = (gd_api . godot_method_bind_get_method) (class_name , "store_float\0" . as_ptr () as * const c_char) ; table . store_line = (gd_api . godot_method_bind_get_method) (class_name , "store_line\0" . as_ptr () as * const c_char) ; table . store_pascal_string = (gd_api . godot_method_bind_get_method) (class_name , "store_pascal_string\0" . as_ptr () as * const c_char) ; table . store_real = (gd_api . godot_method_bind_get_method) (class_name , "store_real\0" . as_ptr () as * const c_char) ; table . store_string = (gd_api . godot_method_bind_get_method) (class_name , "store_string\0" . as_ptr () as * const c_char) ; table . store_var = (gd_api . godot_method_bind_get_method) (class_name , "store_var\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::file::private::File;
            
            pub mod geometry {
                # ! [doc = "This module contains types related to the API class [`Geometry`][super::Geometry]."] pub (crate) mod private { # [doc = "`core singleton class Geometry` inherits `Object` (manually managed).\n\nThis class has related types in the [`geometry`][super::geometry] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_geometry.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nGeometry inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Geometry { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Geometry ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PolyBooleanOperation (pub i64) ; impl PolyBooleanOperation { pub const UNION : PolyBooleanOperation = PolyBooleanOperation (0i64) ; pub const DIFFERENCE : PolyBooleanOperation = PolyBooleanOperation (1i64) ; pub const INTERSECTION : PolyBooleanOperation = PolyBooleanOperation (2i64) ; pub const XOR : PolyBooleanOperation = PolyBooleanOperation (3i64) ; } impl From < i64 > for PolyBooleanOperation { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PolyBooleanOperation > for i64 { # [inline] fn from (v : PolyBooleanOperation) -> Self { v . 0 } } impl FromVariant for PolyBooleanOperation { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PolyEndType (pub i64) ; impl PolyEndType { pub const POLYGON : PolyEndType = PolyEndType (0i64) ; pub const JOINED : PolyEndType = PolyEndType (1i64) ; pub const BUTT : PolyEndType = PolyEndType (2i64) ; pub const SQUARE : PolyEndType = PolyEndType (3i64) ; pub const ROUND : PolyEndType = PolyEndType (4i64) ; } impl From < i64 > for PolyEndType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PolyEndType > for i64 { # [inline] fn from (v : PolyEndType) -> Self { v . 0 } } impl FromVariant for PolyEndType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PolyJoinType (pub i64) ; impl PolyJoinType { pub const SQUARE : PolyJoinType = PolyJoinType (0i64) ; pub const ROUND : PolyJoinType = PolyJoinType (1i64) ; pub const MITER : PolyJoinType = PolyJoinType (2i64) ; } impl From < i64 > for PolyJoinType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PolyJoinType > for i64 { # [inline] fn from (v : PolyJoinType) -> Self { v . 0 } } impl FromVariant for PolyJoinType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Geometry { pub const END_POLYGON : i64 = 0i64 ; pub const JOIN_SQUARE : i64 = 0i64 ; pub const OPERATION_UNION : i64 = 0i64 ; pub const END_JOINED : i64 = 1i64 ; pub const JOIN_ROUND : i64 = 1i64 ; pub const OPERATION_DIFFERENCE : i64 = 1i64 ; pub const END_BUTT : i64 = 2i64 ; pub const JOIN_MITER : i64 = 2i64 ; pub const OPERATION_INTERSECTION : i64 = 2i64 ; pub const END_SQUARE : i64 = 3i64 ; pub const OPERATION_XOR : i64 = 3i64 ; pub const END_ROUND : i64 = 4i64 ; } impl Geometry { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("Geometry\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Returns an array with 6 [`Plane`][Plane]s that describe the sides of a box centered at the origin. The box size is defined by `extents`, which represents one (positive) corner of the box (i.e. half its actual size)."] # [doc = ""] # [inline] pub fn build_box_planes (& self , extents : Vector3) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . build_box_planes ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , extents) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array of [`Plane`][Plane]s closely bounding a faceted capsule centered at the origin with radius `radius` and height `height`. The parameter `sides` defines how many planes will be generated for the side part of the capsule, whereas `lats` gives the number of latitudinal steps at the bottom and top of the capsule. The parameter `axis` describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z).\n# Default Arguments\n* `axis` - `2`"] # [doc = ""] # [inline] pub fn build_capsule_planes (& self , radius : f64 , height : f64 , sides : i64 , lats : i64 , axis : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . build_capsule_planes ; let ret = crate :: icalls :: icallvar__f64_f64_i64_i64_i64 (method_bind , self . this . sys () . as_ptr () , radius as _ , height as _ , sides as _ , lats as _ , axis as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array of [`Plane`][Plane]s closely bounding a faceted cylinder centered at the origin with radius `radius` and height `height`. The parameter `sides` defines how many planes will be generated for the round part of the cylinder. The parameter `axis` describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z).\n# Default Arguments\n* `axis` - `2`"] # [doc = ""] # [inline] pub fn build_cylinder_planes (& self , radius : f64 , height : f64 , sides : i64 , axis : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . build_cylinder_planes ; let ret = crate :: icalls :: icallvar__f64_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , radius as _ , height as _ , sides as _ , axis as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Clips the polygon defined by the points in `points` against the `plane` and returns the points of the clipped polygon."] # [doc = ""] # [inline] pub fn clip_polygon (& self , points : PoolArray < Vector3 > , plane : Plane) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . clip_polygon ; let ret = crate :: icalls :: icallvar__vec3arr_plane (method_bind , self . this . sys () . as_ptr () , points , plane) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Clips `polygon_a` against `polygon_b` and returns an array of clipped polygons. This performs [`OPERATION_DIFFERENCE`][Self::OPERATION_DIFFERENCE] between polygons. Returns an empty array if `polygon_b` completely overlaps `polygon_a`.\nIf `polygon_b` is enclosed by `polygon_a`, returns an outer polygon (boundary) and inner polygon (hole) which could be distinguished by calling [`is_polygon_clockwise`][Self::is_polygon_clockwise]."] # [doc = ""] # [inline] pub fn clip_polygons_2d (& self , polygon_a : PoolArray < Vector2 > , polygon_b : PoolArray < Vector2 >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . clip_polygons_2d ; let ret = crate :: icalls :: icallvar__vec2arr_vec2arr (method_bind , self . this . sys () . as_ptr () , polygon_a , polygon_b) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Clips `polyline` against `polygon` and returns an array of clipped polylines. This performs [`OPERATION_DIFFERENCE`][Self::OPERATION_DIFFERENCE] between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape."] # [doc = ""] # [inline] pub fn clip_polyline_with_polygon_2d (& self , polyline : PoolArray < Vector2 > , polygon : PoolArray < Vector2 >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . clip_polyline_with_polygon_2d ; let ret = crate :: icalls :: icallvar__vec2arr_vec2arr (method_bind , self . this . sys () . as_ptr () , polyline , polygon) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Given an array of [`Vector2`][Vector2]s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one."] # [doc = ""] # [inline] pub fn convex_hull_2d (& self , points : PoolArray < Vector2 >) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . convex_hull_2d ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , points) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Mutually excludes common area defined by intersection of `polygon_a` and `polygon_b` (see [`intersect_polygons_2d`][Self::intersect_polygons_2d]) and returns an array of excluded polygons. This performs [`OPERATION_XOR`][Self::OPERATION_XOR] between polygons. In other words, returns all but common area between polygons.\nThe operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [`is_polygon_clockwise`][Self::is_polygon_clockwise]."] # [doc = ""] # [inline] pub fn exclude_polygons_2d (& self , polygon_a : PoolArray < Vector2 > , polygon_b : PoolArray < Vector2 >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . exclude_polygons_2d ; let ret = crate :: icalls :: icallvar__vec2arr_vec2arr (method_bind , self . this . sys () . as_ptr () , polygon_a , polygon_b) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the 3D point on the 3D segment (`s1`, `s2`) that is closest to `point`. The returned point will always be inside the specified segment."] # [doc = ""] # [inline] pub fn get_closest_point_to_segment (& self , point : Vector3 , s1 : Vector3 , s2 : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . get_closest_point_to_segment ; let ret = crate :: icalls :: icallvar__vec3_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , point , s1 , s2) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the 2D point on the 2D segment (`s1`, `s2`) that is closest to `point`. The returned point will always be inside the specified segment."] # [doc = ""] # [inline] pub fn get_closest_point_to_segment_2d (& self , point : Vector2 , s1 : Vector2 , s2 : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . get_closest_point_to_segment_2d ; let ret = crate :: icalls :: icallvar__vec2_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , point , s1 , s2) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the 3D point on the 3D line defined by (`s1`, `s2`) that is closest to `point`. The returned point can be inside the segment (`s1`, `s2`) or outside of it, i.e. somewhere on the line extending from the segment."] # [doc = ""] # [inline] pub fn get_closest_point_to_segment_uncapped (& self , point : Vector3 , s1 : Vector3 , s2 : Vector3) -> Vector3 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . get_closest_point_to_segment_uncapped ; let ret = crate :: icalls :: icallvar__vec3_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , point , s1 , s2) ; < Vector3 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the 2D point on the 2D line defined by (`s1`, `s2`) that is closest to `point`. The returned point can be inside the segment (`s1`, `s2`) or outside of it, i.e. somewhere on the line extending from the segment."] # [doc = ""] # [inline] pub fn get_closest_point_to_segment_uncapped_2d (& self , point : Vector2 , s1 : Vector2 , s2 : Vector2) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . get_closest_point_to_segment_uncapped_2d ; let ret = crate :: icalls :: icallvar__vec2_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , point , s1 , s2) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Given the two 3D segments (`p1`, `p2`) and (`q1`, `q2`), finds those two points on the two segments that are closest to each other. Returns a [`PoolVector3Array`][PoolArray<Vector3>] that contains this point on (`p1`, `p2`) as well the accompanying point on (`q1`, `q2`)."] # [doc = ""] # [inline] pub fn get_closest_points_between_segments (& self , p1 : Vector3 , p2 : Vector3 , q1 : Vector3 , q2 : Vector3) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . get_closest_points_between_segments ; let ret = crate :: icalls :: icallvar__vec3_vec3_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , p1 , p2 , q1 , q2) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Given the two 2D segments (`p1`, `q1`) and (`p2`, `q2`), finds those two points on the two segments that are closest to each other. Returns a [`PoolVector2Array`][PoolArray<Vector2>] that contains this point on (`p1`, `q1`) as well the accompanying point on (`p2`, `q2`)."] # [doc = ""] # [inline] pub fn get_closest_points_between_segments_2d (& self , p1 : Vector2 , q1 : Vector2 , p2 : Vector2 , q2 : Vector2) -> PoolArray < Vector2 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . get_closest_points_between_segments_2d ; let ret = crate :: icalls :: icallvar__vec2_vec2_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , p1 , q1 , p2 , q2) ; < PoolArray < Vector2 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Used internally by the engine."] # [doc = ""] # [inline] pub fn get_uv84_normal_bit (& self , normal : Vector3) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . get_uv84_normal_bit ; let ret = crate :: icalls :: icallvar__vec3 (method_bind , self . this . sys () . as_ptr () , normal) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Intersects `polygon_a` with `polygon_b` and returns an array of intersected polygons. This performs [`OPERATION_INTERSECTION`][Self::OPERATION_INTERSECTION] between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs.\nThe operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [`is_polygon_clockwise`][Self::is_polygon_clockwise]."] # [doc = ""] # [inline] pub fn intersect_polygons_2d (& self , polygon_a : PoolArray < Vector2 > , polygon_b : PoolArray < Vector2 >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . intersect_polygons_2d ; let ret = crate :: icalls :: icallvar__vec2arr_vec2arr (method_bind , self . this . sys () . as_ptr () , polygon_a , polygon_b) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Intersects `polyline` with `polygon` and returns an array of intersected polylines. This performs [`OPERATION_INTERSECTION`][Self::OPERATION_INTERSECTION] between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape."] # [doc = ""] # [inline] pub fn intersect_polyline_with_polygon_2d (& self , polyline : PoolArray < Vector2 > , polygon : PoolArray < Vector2 >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . intersect_polyline_with_polygon_2d ; let ret = crate :: icalls :: icallvar__vec2arr_vec2arr (method_bind , self . this . sys () . as_ptr () , polyline , polygon) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if `point` is inside the circle or if it's located exactly _on_ the circle's boundary, otherwise returns `false`."] # [doc = ""] # [inline] pub fn is_point_in_circle (& self , point : Vector2 , circle_position : Vector2 , circle_radius : f64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . is_point_in_circle ; let ret = crate :: icalls :: icallvar__vec2_vec2_f64 (method_bind , self . this . sys () . as_ptr () , point , circle_position , circle_radius as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if `point` is inside `polygon` or if it's located exactly _on_ polygon's boundary, otherwise returns `false`."] # [doc = ""] # [inline] pub fn is_point_in_polygon (& self , point : Vector2 , polygon : PoolArray < Vector2 >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . is_point_in_polygon ; let ret = crate :: icalls :: icallvar__vec2_vec2arr (method_bind , self . this . sys () . as_ptr () , point , polygon) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if `polygon`'s vertices are ordered in clockwise order, otherwise returns `false`."] # [doc = ""] # [inline] pub fn is_polygon_clockwise (& self , polygon : PoolArray < Vector2 >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . is_polygon_clockwise ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Checks if the two lines (`from_a`, `dir_a`) and (`from_b`, `dir_b`) intersect. If yes, return the point of intersection as [`Vector2`][Vector2]. If no intersection takes place, returns `null`.\n**Note:** The lines are specified using direction vectors, not end points."] # [doc = ""] # [inline] pub fn line_intersects_line_2d (& self , from_a : Vector2 , dir_a : Vector2 , from_b : Vector2 , dir_b : Vector2) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . line_intersects_line_2d ; let ret = crate :: icalls :: icallvar__vec2_vec2_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , from_a , dir_a , from_b , dir_b) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Given an array of [`Vector2`][Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: `points` is an array of [`Vector2`][Vector2] that specifies the positions of each tile, `size` contains the overall size of the whole atlas as [`Vector2`][Vector2]."] # [doc = ""] # [inline] pub fn make_atlas (& self , sizes : PoolArray < Vector2 >) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . make_atlas ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , sizes) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Merges (combines) `polygon_a` and `polygon_b` and returns an array of merged polygons. This performs [`OPERATION_UNION`][Self::OPERATION_UNION] between polygons.\nThe operation may result in an outer polygon (boundary) and multiple inner polygons (holes) produced which could be distinguished by calling [`is_polygon_clockwise`][Self::is_polygon_clockwise]."] # [doc = ""] # [inline] pub fn merge_polygons_2d (& self , polygon_a : PoolArray < Vector2 > , polygon_b : PoolArray < Vector2 >) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . merge_polygons_2d ; let ret = crate :: icalls :: icallvar__vec2arr_vec2arr (method_bind , self . this . sys () . as_ptr () , polygon_a , polygon_b) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nInflates or deflates `polygon` by `delta` units (pixels). If `delta` is positive, makes the polygon grow outward. If `delta` is negative, shrinks the polygon inward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. Returns an empty array if `delta` is negative and the absolute value of it approximately exceeds the minimum bounding rectangle dimensions of the polygon.\nEach polygon's vertices will be rounded as determined by `join_type`, see [`PolyJoinType`][PolyJoinType].\nThe operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [`is_polygon_clockwise`][Self::is_polygon_clockwise].\n**Note:** To translate the polygon's vertices specifically, use the [`Transform2D.xform`][Transform2D::xform] method:\n```gdscript\nvar polygon = PoolVector2Array([Vector2(0, 0), Vector2(100, 0), Vector2(100, 100), Vector2(0, 100)])\nvar offset = Vector2(50, 50)\npolygon = Transform2D(0, offset).xform(polygon)\nprint(polygon) # prints [Vector2(50, 50), Vector2(150, 50), Vector2(150, 150), Vector2(50, 150)]\n```\n# Default Arguments\n* `join_type` - `0`"] # [doc = ""] # [inline] pub fn offset_polygon_2d (& self , polygon : PoolArray < Vector2 > , delta : f64 , join_type : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . offset_polygon_2d ; let ret = crate :: icalls :: icallvar__vec2arr_f64_i64 (method_bind , self . this . sys () . as_ptr () , polygon , delta as _ , join_type as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Inflates or deflates `polyline` by `delta` units (pixels), producing polygons. If `delta` is positive, makes the polyline grow outward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. If `delta` is negative, returns an empty array.\nEach polygon's vertices will be rounded as determined by `join_type`, see [`PolyJoinType`][PolyJoinType].\nEach polygon's endpoints will be rounded as determined by `end_type`, see [`PolyEndType`][PolyEndType].\nThe operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [`is_polygon_clockwise`][Self::is_polygon_clockwise].\n# Default Arguments\n* `join_type` - `0`\n* `end_type` - `3`"] # [doc = ""] # [inline] pub fn offset_polyline_2d (& self , polyline : PoolArray < Vector2 > , delta : f64 , join_type : i64 , end_type : i64) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . offset_polyline_2d ; let ret = crate :: icalls :: icallvar__vec2arr_f64_i64_i64 (method_bind , self . this . sys () . as_ptr () , polyline , delta as _ , join_type as _ , end_type as _) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns if `point` is inside the triangle specified by `a`, `b` and `c`."] # [doc = ""] # [inline] pub fn point_is_inside_triangle (& self , point : Vector2 , a : Vector2 , b : Vector2 , c : Vector2) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . point_is_inside_triangle ; let ret = crate :: icalls :: icallvar__vec2_vec2_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , point , a , b , c) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Tests if the 3D ray starting at `from` with the direction of `dir` intersects the triangle specified by `a`, `b` and `c`. If yes, returns the point of intersection as [`Vector3`][Vector3]. If no intersection takes place, an empty [`Variant`][Variant] is returned."] # [doc = ""] # [inline] pub fn ray_intersects_triangle (& self , from : Vector3 , dir : Vector3 , a : Vector3 , b : Vector3 , c : Vector3) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . ray_intersects_triangle ; let ret = crate :: icalls :: icallvar__vec3_vec3_vec3_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , from , dir , a , b , c) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Given the 2D segment (`segment_from`, `segment_to`), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position `circle_position` and has radius `circle_radius`. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not)."] # [doc = ""] # [inline] pub fn segment_intersects_circle (& self , segment_from : Vector2 , segment_to : Vector2 , circle_position : Vector2 , circle_radius : f64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . segment_intersects_circle ; let ret = crate :: icalls :: icallvar__vec2_vec2_vec2_f64 (method_bind , self . this . sys () . as_ptr () , segment_from , segment_to , circle_position , circle_radius as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Given a convex hull defined though the [`Plane`][Plane]s in the array `planes`, tests if the segment (`from`, `to`) intersects with that hull. If an intersection is found, returns a [`PoolVector3Array`][PoolArray<Vector3>] containing the point the intersection and the hull's normal. If no intersecion is found, an the returned array is empty."] # [doc = ""] # [inline] pub fn segment_intersects_convex (& self , from : Vector3 , to : Vector3 , planes : VariantArray) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . segment_intersects_convex ; let ret = crate :: icalls :: icallvar__vec3_vec3_arr (method_bind , self . this . sys () . as_ptr () , from , to , planes) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks if the segment (`from`, `to`) intersects the cylinder with height `height` that is centered at the origin and has radius `radius`. If no, returns an empty [`PoolVector3Array`][PoolArray<Vector3>]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection."] # [doc = ""] # [inline] pub fn segment_intersects_cylinder (& self , from : Vector3 , to : Vector3 , height : f64 , radius : f64) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . segment_intersects_cylinder ; let ret = crate :: icalls :: icallvar__vec3_vec3_f64_f64 (method_bind , self . this . sys () . as_ptr () , from , to , height as _ , radius as _) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks if the two segments (`from_a`, `to_a`) and (`from_b`, `to_b`) intersect. If yes, return the point of intersection as [`Vector2`][Vector2]. If no intersection takes place, returns `null`."] # [doc = ""] # [inline] pub fn segment_intersects_segment_2d (& self , from_a : Vector2 , to_a : Vector2 , from_b : Vector2 , to_b : Vector2) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . segment_intersects_segment_2d ; let ret = crate :: icalls :: icallvar__vec2_vec2_vec2_vec2 (method_bind , self . this . sys () . as_ptr () , from_a , to_a , from_b , to_b) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Checks if the segment (`from`, `to`) intersects the sphere that is located at `sphere_position` and has radius `sphere_radius`. If no, returns an empty [`PoolVector3Array`][PoolArray<Vector3>]. If yes, returns a [`PoolVector3Array`][PoolArray<Vector3>] containing the point of intersection and the sphere's normal at the point of intersection."] # [doc = ""] # [inline] pub fn segment_intersects_sphere (& self , from : Vector3 , to : Vector3 , sphere_position : Vector3 , sphere_radius : f64) -> PoolArray < Vector3 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . segment_intersects_sphere ; let ret = crate :: icalls :: icallvar__vec3_vec3_vec3_f64 (method_bind , self . this . sys () . as_ptr () , from , to , sphere_position , sphere_radius as _) ; < PoolArray < Vector3 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Tests if the segment (`from`, `to`) intersects the triangle `a`, `b`, `c`. If yes, returns the point of intersection as [`Vector3`][Vector3]. If no intersection takes place, an empty [`Variant`][Variant] is returned."] # [doc = ""] # [inline] pub fn segment_intersects_triangle (& self , from : Vector3 , to : Vector3 , a : Vector3 , b : Vector3 , c : Vector3) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . segment_intersects_triangle ; let ret = crate :: icalls :: icallvar__vec3_vec3_vec3_vec3_vec3 (method_bind , self . this . sys () . as_ptr () , from , to , a , b , c) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Triangulates the area specified by discrete set of `points` such that no point is inside the circumcircle of any resulting triangle. Returns a [`PoolIntArray`][PoolArray<i32>] where each triangle consists of three consecutive point indices into `points` (i.e. the returned array will have `n * 3` elements, with `n` being the number of found triangles). If the triangulation did not succeed, an empty [`PoolIntArray`][PoolArray<i32>] is returned."] # [doc = ""] # [inline] pub fn triangulate_delaunay_2d (& self , points : PoolArray < Vector2 >) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . triangulate_delaunay_2d ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , points) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Triangulates the polygon specified by the points in `polygon`. Returns a [`PoolIntArray`][PoolArray<i32>] where each triangle consists of three consecutive point indices into `polygon` (i.e. the returned array will have `n * 3` elements, with `n` being the number of found triangles). Output triangles will always be counter clockwise, and the contour will be flipped if it's clockwise. If the triangulation did not succeed, an empty [`PoolIntArray`][PoolArray<i32>] is returned."] # [doc = ""] # [inline] pub fn triangulate_polygon (& self , polygon : PoolArray < Vector2 >) -> PoolArray < i32 > { unsafe { let method_bind : * mut sys :: godot_method_bind = GeometryMethodTable :: get (get_api ()) . triangulate_polygon ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , polygon) ; < PoolArray < i32 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for Geometry { } unsafe impl GodotObject for Geometry { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Geometry" } } impl std :: ops :: Deref for Geometry { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Geometry { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for Geometry { } unsafe impl Send for Geometry { } unsafe impl Sync for Geometry { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct GeometryMethodTable { pub class_constructor : sys :: godot_class_constructor , pub build_box_planes : * mut sys :: godot_method_bind , pub build_capsule_planes : * mut sys :: godot_method_bind , pub build_cylinder_planes : * mut sys :: godot_method_bind , pub clip_polygon : * mut sys :: godot_method_bind , pub clip_polygons_2d : * mut sys :: godot_method_bind , pub clip_polyline_with_polygon_2d : * mut sys :: godot_method_bind , pub convex_hull_2d : * mut sys :: godot_method_bind , pub exclude_polygons_2d : * mut sys :: godot_method_bind , pub get_closest_point_to_segment : * mut sys :: godot_method_bind , pub get_closest_point_to_segment_2d : * mut sys :: godot_method_bind , pub get_closest_point_to_segment_uncapped : * mut sys :: godot_method_bind , pub get_closest_point_to_segment_uncapped_2d : * mut sys :: godot_method_bind , pub get_closest_points_between_segments : * mut sys :: godot_method_bind , pub get_closest_points_between_segments_2d : * mut sys :: godot_method_bind , pub get_uv84_normal_bit : * mut sys :: godot_method_bind , pub intersect_polygons_2d : * mut sys :: godot_method_bind , pub intersect_polyline_with_polygon_2d : * mut sys :: godot_method_bind , pub is_point_in_circle : * mut sys :: godot_method_bind , pub is_point_in_polygon : * mut sys :: godot_method_bind , pub is_polygon_clockwise : * mut sys :: godot_method_bind , pub line_intersects_line_2d : * mut sys :: godot_method_bind , pub make_atlas : * mut sys :: godot_method_bind , pub merge_polygons_2d : * mut sys :: godot_method_bind , pub offset_polygon_2d : * mut sys :: godot_method_bind , pub offset_polyline_2d : * mut sys :: godot_method_bind , pub point_is_inside_triangle : * mut sys :: godot_method_bind , pub ray_intersects_triangle : * mut sys :: godot_method_bind , pub segment_intersects_circle : * mut sys :: godot_method_bind , pub segment_intersects_convex : * mut sys :: godot_method_bind , pub segment_intersects_cylinder : * mut sys :: godot_method_bind , pub segment_intersects_segment_2d : * mut sys :: godot_method_bind , pub segment_intersects_sphere : * mut sys :: godot_method_bind , pub segment_intersects_triangle : * mut sys :: godot_method_bind , pub triangulate_delaunay_2d : * mut sys :: godot_method_bind , pub triangulate_polygon : * mut sys :: godot_method_bind } impl GeometryMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : GeometryMethodTable = GeometryMethodTable { class_constructor : None , build_box_planes : 0 as * mut sys :: godot_method_bind , build_capsule_planes : 0 as * mut sys :: godot_method_bind , build_cylinder_planes : 0 as * mut sys :: godot_method_bind , clip_polygon : 0 as * mut sys :: godot_method_bind , clip_polygons_2d : 0 as * mut sys :: godot_method_bind , clip_polyline_with_polygon_2d : 0 as * mut sys :: godot_method_bind , convex_hull_2d : 0 as * mut sys :: godot_method_bind , exclude_polygons_2d : 0 as * mut sys :: godot_method_bind , get_closest_point_to_segment : 0 as * mut sys :: godot_method_bind , get_closest_point_to_segment_2d : 0 as * mut sys :: godot_method_bind , get_closest_point_to_segment_uncapped : 0 as * mut sys :: godot_method_bind , get_closest_point_to_segment_uncapped_2d : 0 as * mut sys :: godot_method_bind , get_closest_points_between_segments : 0 as * mut sys :: godot_method_bind , get_closest_points_between_segments_2d : 0 as * mut sys :: godot_method_bind , get_uv84_normal_bit : 0 as * mut sys :: godot_method_bind , intersect_polygons_2d : 0 as * mut sys :: godot_method_bind , intersect_polyline_with_polygon_2d : 0 as * mut sys :: godot_method_bind , is_point_in_circle : 0 as * mut sys :: godot_method_bind , is_point_in_polygon : 0 as * mut sys :: godot_method_bind , is_polygon_clockwise : 0 as * mut sys :: godot_method_bind , line_intersects_line_2d : 0 as * mut sys :: godot_method_bind , make_atlas : 0 as * mut sys :: godot_method_bind , merge_polygons_2d : 0 as * mut sys :: godot_method_bind , offset_polygon_2d : 0 as * mut sys :: godot_method_bind , offset_polyline_2d : 0 as * mut sys :: godot_method_bind , point_is_inside_triangle : 0 as * mut sys :: godot_method_bind , ray_intersects_triangle : 0 as * mut sys :: godot_method_bind , segment_intersects_circle : 0 as * mut sys :: godot_method_bind , segment_intersects_convex : 0 as * mut sys :: godot_method_bind , segment_intersects_cylinder : 0 as * mut sys :: godot_method_bind , segment_intersects_segment_2d : 0 as * mut sys :: godot_method_bind , segment_intersects_sphere : 0 as * mut sys :: godot_method_bind , segment_intersects_triangle : 0 as * mut sys :: godot_method_bind , triangulate_delaunay_2d : 0 as * mut sys :: godot_method_bind , triangulate_polygon : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { GeometryMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_Geometry\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . build_box_planes = (gd_api . godot_method_bind_get_method) (class_name , "build_box_planes\0" . as_ptr () as * const c_char) ; table . build_capsule_planes = (gd_api . godot_method_bind_get_method) (class_name , "build_capsule_planes\0" . as_ptr () as * const c_char) ; table . build_cylinder_planes = (gd_api . godot_method_bind_get_method) (class_name , "build_cylinder_planes\0" . as_ptr () as * const c_char) ; table . clip_polygon = (gd_api . godot_method_bind_get_method) (class_name , "clip_polygon\0" . as_ptr () as * const c_char) ; table . clip_polygons_2d = (gd_api . godot_method_bind_get_method) (class_name , "clip_polygons_2d\0" . as_ptr () as * const c_char) ; table . clip_polyline_with_polygon_2d = (gd_api . godot_method_bind_get_method) (class_name , "clip_polyline_with_polygon_2d\0" . as_ptr () as * const c_char) ; table . convex_hull_2d = (gd_api . godot_method_bind_get_method) (class_name , "convex_hull_2d\0" . as_ptr () as * const c_char) ; table . exclude_polygons_2d = (gd_api . godot_method_bind_get_method) (class_name , "exclude_polygons_2d\0" . as_ptr () as * const c_char) ; table . get_closest_point_to_segment = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_to_segment\0" . as_ptr () as * const c_char) ; table . get_closest_point_to_segment_2d = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_to_segment_2d\0" . as_ptr () as * const c_char) ; table . get_closest_point_to_segment_uncapped = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_to_segment_uncapped\0" . as_ptr () as * const c_char) ; table . get_closest_point_to_segment_uncapped_2d = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_point_to_segment_uncapped_2d\0" . as_ptr () as * const c_char) ; table . get_closest_points_between_segments = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_points_between_segments\0" . as_ptr () as * const c_char) ; table . get_closest_points_between_segments_2d = (gd_api . godot_method_bind_get_method) (class_name , "get_closest_points_between_segments_2d\0" . as_ptr () as * const c_char) ; table . get_uv84_normal_bit = (gd_api . godot_method_bind_get_method) (class_name , "get_uv84_normal_bit\0" . as_ptr () as * const c_char) ; table . intersect_polygons_2d = (gd_api . godot_method_bind_get_method) (class_name , "intersect_polygons_2d\0" . as_ptr () as * const c_char) ; table . intersect_polyline_with_polygon_2d = (gd_api . godot_method_bind_get_method) (class_name , "intersect_polyline_with_polygon_2d\0" . as_ptr () as * const c_char) ; table . is_point_in_circle = (gd_api . godot_method_bind_get_method) (class_name , "is_point_in_circle\0" . as_ptr () as * const c_char) ; table . is_point_in_polygon = (gd_api . godot_method_bind_get_method) (class_name , "is_point_in_polygon\0" . as_ptr () as * const c_char) ; table . is_polygon_clockwise = (gd_api . godot_method_bind_get_method) (class_name , "is_polygon_clockwise\0" . as_ptr () as * const c_char) ; table . line_intersects_line_2d = (gd_api . godot_method_bind_get_method) (class_name , "line_intersects_line_2d\0" . as_ptr () as * const c_char) ; table . make_atlas = (gd_api . godot_method_bind_get_method) (class_name , "make_atlas\0" . as_ptr () as * const c_char) ; table . merge_polygons_2d = (gd_api . godot_method_bind_get_method) (class_name , "merge_polygons_2d\0" . as_ptr () as * const c_char) ; table . offset_polygon_2d = (gd_api . godot_method_bind_get_method) (class_name , "offset_polygon_2d\0" . as_ptr () as * const c_char) ; table . offset_polyline_2d = (gd_api . godot_method_bind_get_method) (class_name , "offset_polyline_2d\0" . as_ptr () as * const c_char) ; table . point_is_inside_triangle = (gd_api . godot_method_bind_get_method) (class_name , "point_is_inside_triangle\0" . as_ptr () as * const c_char) ; table . ray_intersects_triangle = (gd_api . godot_method_bind_get_method) (class_name , "ray_intersects_triangle\0" . as_ptr () as * const c_char) ; table . segment_intersects_circle = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_circle\0" . as_ptr () as * const c_char) ; table . segment_intersects_convex = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_convex\0" . as_ptr () as * const c_char) ; table . segment_intersects_cylinder = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_cylinder\0" . as_ptr () as * const c_char) ; table . segment_intersects_segment_2d = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_segment_2d\0" . as_ptr () as * const c_char) ; table . segment_intersects_sphere = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_sphere\0" . as_ptr () as * const c_char) ; table . segment_intersects_triangle = (gd_api . godot_method_bind_get_method) (class_name , "segment_intersects_triangle\0" . as_ptr () as * const c_char) ; table . triangulate_delaunay_2d = (gd_api . godot_method_bind_get_method) (class_name , "triangulate_delaunay_2d\0" . as_ptr () as * const c_char) ; table . triangulate_polygon = (gd_api . godot_method_bind_get_method) (class_name , "triangulate_polygon\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::geometry::private::Geometry;
            
            pub(crate) mod json {
                # ! [doc = "This module contains types related to the API class [`JSON`][super::JSON]."] pub (crate) mod private { # [doc = "`core singleton class JSON` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_json.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nJSON inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct JSON { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: JSON ; impl JSON { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("JSON\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Parses a JSON-encoded string and returns a [`JSONParseResult`][JSONParseResult] containing the result."] # [doc = ""] # [inline] pub fn parse (& self , json : impl Into < GodotString >) -> Option < Ref < crate :: generated :: JSONParseResult , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONMethodTable :: get (get_api ()) . parse ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , json . into ()) ; < Option < Ref < crate :: generated :: JSONParseResult , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nConverts a [`Variant`][Variant] var to JSON text and returns the result. Useful for serializing data to store or send over the network.\n**Note:** The JSON specification does not define integer or float types, but only a _number_ type. Therefore, converting a Variant to JSON text will convert all numerical values to [`float`][float] types.\nThe `indent` parameter controls if and how something is indented, the string used for this parameter will be used where there should be an indent in the output, even spaces like `\"   \"` will work. `\\t` and `\\n` can also be used for a tab indent, or to make a newline for each indent respectively.\n**Example output:**\n```gdscript\n## JSON.print(my_dictionary)\n{\"name\":\"my_dictionary\",\"version\":\"1.0.0\",\"entities\":[{\"name\":\"entity_0\",\"value\":\"value_0\"},{\"name\":\"entity_1\",\"value\":\"value_1\"}]}\n\n## JSON.print(my_dictionary, \"\\t\")\n{\n    \"name\": \"my_dictionary\",\n    \"version\": \"1.0.0\",\n    \"entities\": [\n        {\n            \"name\": \"entity_0\",\n            \"value\": \"value_0\"\n        },\n        {\n            \"name\": \"entity_1\",\n            \"value\": \"value_1\"\n        }\n    ]\n}\n\n## JSON.print(my_dictionary, \"...\")\n{\n...\"name\": \"my_dictionary\",\n...\"version\": \"1.0.0\",\n...\"entities\": [\n......{\n.........\"name\": \"entity_0\",\n.........\"value\": \"value_0\"\n......},\n......{\n.........\"name\": \"entity_1\",\n.........\"value\": \"value_1\"\n......}\n...]\n}\n```\n# Default Arguments\n* `indent` - `\"\"`\n* `sort_keys` - `false`"] # [doc = ""] # [inline] pub fn print (& self , value : impl OwnedToVariant , indent : impl Into < GodotString > , sort_keys : bool) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = JSONMethodTable :: get (get_api ()) . print ; let ret = crate :: icalls :: icallvar__var_str_bool (method_bind , self . this . sys () . as_ptr () , value . owned_to_variant () , indent . into () , sort_keys as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for JSON { } unsafe impl GodotObject for JSON { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "JSON" } } impl std :: ops :: Deref for JSON { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for JSON { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for JSON { } unsafe impl Send for JSON { } unsafe impl Sync for JSON { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct JSONMethodTable { pub class_constructor : sys :: godot_class_constructor , pub parse : * mut sys :: godot_method_bind , pub print : * mut sys :: godot_method_bind } impl JSONMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : JSONMethodTable = JSONMethodTable { class_constructor : None , parse : 0 as * mut sys :: godot_method_bind , print : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { JSONMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_JSON\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . parse = (gd_api . godot_method_bind_get_method) (class_name , "parse\0" . as_ptr () as * const c_char) ; table . print = (gd_api . godot_method_bind_get_method) (class_name , "print\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::json::private::JSON;
            
            pub(crate) mod marshalls {
                # ! [doc = "This module contains types related to the API class [`Marshalls`][super::Marshalls]."] pub (crate) mod private { # [doc = "`core singleton class Marshalls` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_marshalls.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nMarshalls inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Marshalls { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Marshalls ; impl Marshalls { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("Marshalls\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Returns a decoded [`PoolByteArray`][PoolArray<u8>] corresponding to the Base64-encoded string `base64_str`."] # [doc = ""] # [inline] pub fn base64_to_raw (& self , base64_str : impl Into < GodotString >) -> PoolArray < u8 > { unsafe { let method_bind : * mut sys :: godot_method_bind = MarshallsMethodTable :: get (get_api ()) . base64_to_raw ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , base64_str . into ()) ; < PoolArray < u8 > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a decoded string corresponding to the Base64-encoded string `base64_str`."] # [doc = ""] # [inline] pub fn base64_to_utf8 (& self , base64_str : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = MarshallsMethodTable :: get (get_api ()) . base64_to_utf8 ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , base64_str . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a decoded [`Variant`][Variant] corresponding to the Base64-encoded string `base64_str`. If `allow_objects` is `true`, decoding objects is allowed.\n**Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution.\n# Default Arguments\n* `allow_objects` - `false`"] # [doc = ""] # [inline] pub fn base64_to_variant (& self , base64_str : impl Into < GodotString > , allow_objects : bool) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = MarshallsMethodTable :: get (get_api ()) . base64_to_variant ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , base64_str . into () , allow_objects as _) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a Base64-encoded string of a given [`PoolByteArray`][PoolArray<u8>]."] # [doc = ""] # [inline] pub fn raw_to_base64 (& self , array : PoolArray < u8 >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = MarshallsMethodTable :: get (get_api ()) . raw_to_base64 ; let ret = crate :: icalls :: icallvar__bytearr (method_bind , self . this . sys () . as_ptr () , array) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a Base64-encoded string of the UTF-8 string `utf8_str`."] # [doc = ""] # [inline] pub fn utf8_to_base64 (& self , utf8_str : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = MarshallsMethodTable :: get (get_api ()) . utf8_to_base64 ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , utf8_str . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a Base64-encoded string of the [`Variant`][Variant] `variant`. If `full_objects` is `true`, encoding objects is allowed (and can potentially include code).\n# Default Arguments\n* `full_objects` - `false`"] # [doc = ""] # [inline] pub fn variant_to_base64 (& self , variant : impl OwnedToVariant , full_objects : bool) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = MarshallsMethodTable :: get (get_api ()) . variant_to_base64 ; let ret = crate :: icalls :: icallvar__var_bool (method_bind , self . this . sys () . as_ptr () , variant . owned_to_variant () , full_objects as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for Marshalls { } unsafe impl GodotObject for Marshalls { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "Marshalls" } } impl std :: ops :: Deref for Marshalls { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Marshalls { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for Marshalls { } unsafe impl Send for Marshalls { } unsafe impl Sync for Marshalls { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MarshallsMethodTable { pub class_constructor : sys :: godot_class_constructor , pub base64_to_raw : * mut sys :: godot_method_bind , pub base64_to_utf8 : * mut sys :: godot_method_bind , pub base64_to_variant : * mut sys :: godot_method_bind , pub raw_to_base64 : * mut sys :: godot_method_bind , pub utf8_to_base64 : * mut sys :: godot_method_bind , pub variant_to_base64 : * mut sys :: godot_method_bind } impl MarshallsMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MarshallsMethodTable = MarshallsMethodTable { class_constructor : None , base64_to_raw : 0 as * mut sys :: godot_method_bind , base64_to_utf8 : 0 as * mut sys :: godot_method_bind , base64_to_variant : 0 as * mut sys :: godot_method_bind , raw_to_base64 : 0 as * mut sys :: godot_method_bind , utf8_to_base64 : 0 as * mut sys :: godot_method_bind , variant_to_base64 : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MarshallsMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_Marshalls\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . base64_to_raw = (gd_api . godot_method_bind_get_method) (class_name , "base64_to_raw\0" . as_ptr () as * const c_char) ; table . base64_to_utf8 = (gd_api . godot_method_bind_get_method) (class_name , "base64_to_utf8\0" . as_ptr () as * const c_char) ; table . base64_to_variant = (gd_api . godot_method_bind_get_method) (class_name , "base64_to_variant\0" . as_ptr () as * const c_char) ; table . raw_to_base64 = (gd_api . godot_method_bind_get_method) (class_name , "raw_to_base64\0" . as_ptr () as * const c_char) ; table . utf8_to_base64 = (gd_api . godot_method_bind_get_method) (class_name , "utf8_to_base64\0" . as_ptr () as * const c_char) ; table . variant_to_base64 = (gd_api . godot_method_bind_get_method) (class_name , "variant_to_base64\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::marshalls::private::Marshalls;
            
            pub(crate) mod mutex {
                # ! [doc = "This module contains types related to the API class [`Mutex`][super::Mutex]."] pub (crate) mod private { # [doc = "`core class Mutex` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_mutex.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nMutex inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Mutex { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Mutex ; impl Mutex { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = MutexMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Locks this [`Mutex`][Mutex], blocks until it is unlocked by the current owner.\n**Note:** This function returns without blocking if the thread already has ownership of the mutex."] # [doc = ""] # [inline] pub fn lock (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MutexMethodTable :: get (get_api ()) . lock ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Tries locking this [`Mutex`][Mutex], but does not block. Returns [`OK`][Self::OK] on success, [`ERR_BUSY`][Self::ERR_BUSY] otherwise.\n**Note:** This function returns [`OK`][Self::OK] if the thread already has ownership of the mutex."] # [doc = ""] # [inline] pub fn try_lock (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = MutexMethodTable :: get (get_api ()) . try_lock ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Unlocks this [`Mutex`][Mutex], leaving it to other threads.\n**Note:** If a thread called [`lock`][Self::lock] or [`try_lock`][Self::try_lock] multiple times while already having ownership of the mutex, it must also call [`unlock`][Self::unlock] the same number of times in order to unlock it correctly."] # [doc = ""] # [inline] pub fn unlock (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = MutexMethodTable :: get (get_api ()) . unlock ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for Mutex { } unsafe impl GodotObject for Mutex { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Mutex" } } impl std :: ops :: Deref for Mutex { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Mutex { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for Mutex { } unsafe impl SubClass < crate :: generated :: Object > for Mutex { } impl Instanciable for Mutex { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Mutex :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct MutexMethodTable { pub class_constructor : sys :: godot_class_constructor , pub lock : * mut sys :: godot_method_bind , pub try_lock : * mut sys :: godot_method_bind , pub unlock : * mut sys :: godot_method_bind } impl MutexMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : MutexMethodTable = MutexMethodTable { class_constructor : None , lock : 0 as * mut sys :: godot_method_bind , try_lock : 0 as * mut sys :: godot_method_bind , unlock : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { MutexMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_Mutex\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . lock = (gd_api . godot_method_bind_get_method) (class_name , "lock\0" . as_ptr () as * const c_char) ; table . try_lock = (gd_api . godot_method_bind_get_method) (class_name , "try_lock\0" . as_ptr () as * const c_char) ; table . unlock = (gd_api . godot_method_bind_get_method) (class_name , "unlock\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::mutex::private::Mutex;
            
            pub mod os {
                # ! [doc = "This module contains types related to the API class [`OS`][super::OS]."] pub (crate) mod private { # [doc = "`core singleton class OS` inherits `Object` (manually managed).\n\nThis class has related types in the [`os`][super::os] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_os.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nOS inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct OS { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: OS ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct HandleType (pub i64) ; impl HandleType { pub const APPLICATION_HANDLE : HandleType = HandleType (0i64) ; pub const DISPLAY_HANDLE : HandleType = HandleType (1i64) ; pub const WINDOW_HANDLE : HandleType = HandleType (2i64) ; pub const WINDOW_VIEW : HandleType = HandleType (3i64) ; pub const OPENGL_CONTEXT : HandleType = HandleType (4i64) ; } impl From < i64 > for HandleType { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < HandleType > for i64 { # [inline] fn from (v : HandleType) -> Self { v . 0 } } impl FromVariant for HandleType { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Month (pub i64) ; impl Month { pub const JANUARY : Month = Month (1i64) ; pub const FEBRUARY : Month = Month (2i64) ; pub const MARCH : Month = Month (3i64) ; pub const APRIL : Month = Month (4i64) ; pub const MAY : Month = Month (5i64) ; pub const JUNE : Month = Month (6i64) ; pub const JULY : Month = Month (7i64) ; pub const AUGUST : Month = Month (8i64) ; pub const SEPTEMBER : Month = Month (9i64) ; pub const OCTOBER : Month = Month (10i64) ; pub const NOVEMBER : Month = Month (11i64) ; pub const DECEMBER : Month = Month (12i64) ; } impl From < i64 > for Month { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Month > for i64 { # [inline] fn from (v : Month) -> Self { v . 0 } } impl FromVariant for Month { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct PowerState (pub i64) ; impl PowerState { pub const UNKNOWN : PowerState = PowerState (0i64) ; pub const ON_BATTERY : PowerState = PowerState (1i64) ; pub const NO_BATTERY : PowerState = PowerState (2i64) ; pub const CHARGING : PowerState = PowerState (3i64) ; pub const CHARGED : PowerState = PowerState (4i64) ; } impl From < i64 > for PowerState { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < PowerState > for i64 { # [inline] fn from (v : PowerState) -> Self { v . 0 } } impl FromVariant for PowerState { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct ScreenOrientation (pub i64) ; impl ScreenOrientation { pub const LANDSCAPE : ScreenOrientation = ScreenOrientation (0i64) ; pub const PORTRAIT : ScreenOrientation = ScreenOrientation (1i64) ; pub const REVERSE_LANDSCAPE : ScreenOrientation = ScreenOrientation (2i64) ; pub const REVERSE_PORTRAIT : ScreenOrientation = ScreenOrientation (3i64) ; pub const SENSOR_LANDSCAPE : ScreenOrientation = ScreenOrientation (4i64) ; pub const SENSOR_PORTRAIT : ScreenOrientation = ScreenOrientation (5i64) ; pub const SENSOR : ScreenOrientation = ScreenOrientation (6i64) ; } impl From < i64 > for ScreenOrientation { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < ScreenOrientation > for i64 { # [inline] fn from (v : ScreenOrientation) -> Self { v . 0 } } impl FromVariant for ScreenOrientation { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SystemDir (pub i64) ; impl SystemDir { pub const DESKTOP : SystemDir = SystemDir (0i64) ; pub const DCIM : SystemDir = SystemDir (1i64) ; pub const DOCUMENTS : SystemDir = SystemDir (2i64) ; pub const DOWNLOADS : SystemDir = SystemDir (3i64) ; pub const MOVIES : SystemDir = SystemDir (4i64) ; pub const MUSIC : SystemDir = SystemDir (5i64) ; pub const PICTURES : SystemDir = SystemDir (6i64) ; pub const RINGTONES : SystemDir = SystemDir (7i64) ; } impl From < i64 > for SystemDir { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SystemDir > for i64 { # [inline] fn from (v : SystemDir) -> Self { v . 0 } } impl FromVariant for SystemDir { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct VideoDriver (pub i64) ; impl VideoDriver { pub const GLES3 : VideoDriver = VideoDriver (0i64) ; pub const GLES2 : VideoDriver = VideoDriver (1i64) ; } impl From < i64 > for VideoDriver { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < VideoDriver > for i64 { # [inline] fn from (v : VideoDriver) -> Self { v . 0 } } impl FromVariant for VideoDriver { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Weekday (pub i64) ; impl Weekday { pub const SUNDAY : Weekday = Weekday (0i64) ; pub const MONDAY : Weekday = Weekday (1i64) ; pub const TUESDAY : Weekday = Weekday (2i64) ; pub const WEDNESDAY : Weekday = Weekday (3i64) ; pub const THURSDAY : Weekday = Weekday (4i64) ; pub const FRIDAY : Weekday = Weekday (5i64) ; pub const SATURDAY : Weekday = Weekday (6i64) ; } impl From < i64 > for Weekday { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Weekday > for i64 { # [inline] fn from (v : Weekday) -> Self { v . 0 } } impl FromVariant for Weekday { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl OS { pub const APPLICATION_HANDLE : i64 = 0i64 ; pub const DAY_SUNDAY : i64 = 0i64 ; pub const POWERSTATE_UNKNOWN : i64 = 0i64 ; pub const SCREEN_ORIENTATION_LANDSCAPE : i64 = 0i64 ; pub const SYSTEM_DIR_DESKTOP : i64 = 0i64 ; pub const VIDEO_DRIVER_GLES3 : i64 = 0i64 ; pub const DAY_MONDAY : i64 = 1i64 ; pub const DISPLAY_HANDLE : i64 = 1i64 ; pub const MONTH_JANUARY : i64 = 1i64 ; pub const POWERSTATE_ON_BATTERY : i64 = 1i64 ; pub const SCREEN_ORIENTATION_PORTRAIT : i64 = 1i64 ; pub const SYSTEM_DIR_DCIM : i64 = 1i64 ; pub const VIDEO_DRIVER_GLES2 : i64 = 1i64 ; pub const DAY_TUESDAY : i64 = 2i64 ; pub const MONTH_FEBRUARY : i64 = 2i64 ; pub const POWERSTATE_NO_BATTERY : i64 = 2i64 ; pub const SCREEN_ORIENTATION_REVERSE_LANDSCAPE : i64 = 2i64 ; pub const SYSTEM_DIR_DOCUMENTS : i64 = 2i64 ; pub const WINDOW_HANDLE : i64 = 2i64 ; pub const DAY_WEDNESDAY : i64 = 3i64 ; pub const MONTH_MARCH : i64 = 3i64 ; pub const POWERSTATE_CHARGING : i64 = 3i64 ; pub const SCREEN_ORIENTATION_REVERSE_PORTRAIT : i64 = 3i64 ; pub const SYSTEM_DIR_DOWNLOADS : i64 = 3i64 ; pub const WINDOW_VIEW : i64 = 3i64 ; pub const DAY_THURSDAY : i64 = 4i64 ; pub const MONTH_APRIL : i64 = 4i64 ; pub const OPENGL_CONTEXT : i64 = 4i64 ; pub const POWERSTATE_CHARGED : i64 = 4i64 ; pub const SCREEN_ORIENTATION_SENSOR_LANDSCAPE : i64 = 4i64 ; pub const SYSTEM_DIR_MOVIES : i64 = 4i64 ; pub const DAY_FRIDAY : i64 = 5i64 ; pub const MONTH_MAY : i64 = 5i64 ; pub const SCREEN_ORIENTATION_SENSOR_PORTRAIT : i64 = 5i64 ; pub const SYSTEM_DIR_MUSIC : i64 = 5i64 ; pub const DAY_SATURDAY : i64 = 6i64 ; pub const MONTH_JUNE : i64 = 6i64 ; pub const SCREEN_ORIENTATION_SENSOR : i64 = 6i64 ; pub const SYSTEM_DIR_PICTURES : i64 = 6i64 ; pub const MONTH_JULY : i64 = 7i64 ; pub const SYSTEM_DIR_RINGTONES : i64 = 7i64 ; pub const MONTH_AUGUST : i64 = 8i64 ; pub const MONTH_SEPTEMBER : i64 = 9i64 ; pub const MONTH_OCTOBER : i64 = 10i64 ; pub const MONTH_NOVEMBER : i64 = 11i64 ; pub const MONTH_DECEMBER : i64 = 12i64 ; } impl OS { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("OS\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Displays a modal dialog box using the host OS' facilities. Execution is blocked until the dialog is closed.\n# Default Arguments\n* `title` - `\"Alert!\"`"] # [doc = ""] # [inline] pub fn alert (& self , text : impl Into < GodotString > , title : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . alert ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , text . into () , title . into ()) ; } } # [doc = "Returns `true` if the host OS allows drawing."] # [doc = ""] # [inline] pub fn can_draw (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . can_draw ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the current host platform is using multiple threads."] # [doc = ""] # [inline] pub fn can_use_threads (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . can_use_threads ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Centers the window on the screen if in windowed mode."] # [doc = ""] # [inline] pub fn center_window (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . center_window ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Shuts down system MIDI driver.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn close_midi_inputs (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . close_midi_inputs ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Crashes the engine (or the editor if called within a `tool` script). This should _only_ be used for testing the system's crash handler, not for any other purpose. For general error reporting, use (in order of preference) [method @GDScript.assert], [method @GDScript.push_error] or [`alert`][Self::alert]. See also [`kill`][Self::kill]."] # [doc = ""] # [inline] pub fn crash (& self , message : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . crash ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , message . into ()) ; } } # [doc = "Delays execution of the current thread by `msec` milliseconds. `msec` must be greater than or equal to `0`. Otherwise, [`delay_msec`][Self::delay_msec] will do nothing and will print an error message.\n**Note:** [`delay_msec`][Self::delay_msec] is a _blocking_ way to delay code execution. To delay code execution in a non-blocking way, see [`SceneTree.create_timer`][SceneTree::create_timer]. Yielding with [`SceneTree.create_timer`][SceneTree::create_timer] will delay the execution of code placed below the `yield` without affecting the rest of the project (or editor, for [`EditorPlugin`][EditorPlugin]s and [`EditorScript`][EditorScript]s).\n**Note:** When [`delay_msec`][Self::delay_msec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [`delay_msec`][Self::delay_msec] as part of an [`EditorPlugin`][EditorPlugin] or [`EditorScript`][EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process)."] # [doc = ""] # [inline] pub fn delay_msec (& self , msec : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . delay_msec ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , msec as _) ; } } # [doc = "Delays execution of the current thread by `usec` microseconds. `usec` must be greater than or equal to `0`. Otherwise, [`delay_usec`][Self::delay_usec] will do nothing and will print an error message.\n**Note:** [`delay_usec`][Self::delay_usec] is a _blocking_ way to delay code execution. To delay code execution in a non-blocking way, see [`SceneTree.create_timer`][SceneTree::create_timer]. Yielding with [`SceneTree.create_timer`][SceneTree::create_timer] will delay the execution of code placed below the `yield` without affecting the rest of the project (or editor, for [`EditorPlugin`][EditorPlugin]s and [`EditorScript`][EditorScript]s).\n**Note:** When [`delay_usec`][Self::delay_usec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [`delay_usec`][Self::delay_usec] as part of an [`EditorPlugin`][EditorPlugin] or [`EditorScript`][EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process)."] # [doc = ""] # [inline] pub fn delay_usec (& self , usec : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . delay_usec ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , usec as _) ; } } # [doc = "Dumps the memory allocation ringlist to a file (only works in debug).\nEntry format per line: \"Address - Size - Description\"."] # [doc = ""] # [inline] pub fn dump_memory_to_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . dump_memory_to_file ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } # [doc = "Dumps all used resources to file (only works in debug).\nEntry format per line: \"Resource Type : Resource Location\".\nAt the end of the file is a statistic of all used Resource Types."] # [doc = ""] # [inline] pub fn dump_resources_to_file (& self , file : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . dump_resources_to_file ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , file . into ()) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nExecute the file at the given path with the arguments passed as an array of strings. Platform path resolution will take place. The resolved file must exist and be executable.\nThe arguments are used in the given order and separated by a space, so `OS.execute(\"ping\", [\"-w\", \"3\", \"godotengine.org\"], false)` will resolve to `ping -w 3 godotengine.org` in the system's shell.\nThis method has slightly different behavior based on whether the `blocking` mode is enabled.\nIf `blocking` is `true`, the Godot thread will pause its execution while waiting for the process to terminate. The shell output of the process will be written to the `output` array as a single string. When the process terminates, the Godot thread will resume execution.\nIf `blocking` is `false`, the Godot thread will continue while the new process runs. It is not possible to retrieve the shell output in non-blocking mode, so `output` will be empty.\nOn Windows, if `open_console` is `true` and process is console app, new terminal window will be opened, it's ignored on other platforms.\nThe return value also depends on the blocking mode. When blocking, the method will return an exit code of the process. When non-blocking, the method returns a process ID, which you can use to monitor the process (and potentially terminate it with [`kill`][Self::kill]). If the process forking (non-blocking) or opening (blocking) fails, the method will return `-1` or another exit code.\nExample of blocking mode and retrieving the shell output:\n```gdscript\nvar output = []\nvar exit_code = OS.execute(\"ls\", [\"-l\", \"/tmp\"], true, output)\n```\nExample of non-blocking mode, running another instance of the project and storing its process ID:\n```gdscript\nvar pid = OS.execute(OS.get_executable_path(), [], false)\n```\nIf you wish to access a shell built-in or perform a composite command, a platform-specific shell can be invoked. For example:\n```gdscript\nOS.execute(\"CMD.exe\", [\"/C\", \"cd %TEMP% && dir\"], true, output)\n```\n**Note:** This method is implemented on Android, iOS, Linux, macOS and Windows.\n**Note:** To execute a Windows command interpreter built-in command, specify `cmd.exe` in `path`, `/c` as the first argument, and the desired command as the second argument.\n**Note:** To execute a PowerShell built-in command, specify `powershell.exe` in `path`, `-Command` as the first argument, and the desired command as the second argument.\n**Note:** To execute a Unix shell built-in command, specify shell executable name in `path`, `-c` as the first argument, and the desired command as the second argument.\n# Default Arguments\n* `blocking` - `true`\n* `output` - `[  ]`\n* `read_stderr` - `false`\n* `open_console` - `false`"] # [doc = ""] # [inline] pub fn execute (& self , path : impl Into < GodotString > , arguments : PoolArray < GodotString > , blocking : bool , output : VariantArray , read_stderr : bool , open_console : bool) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . execute ; let ret = crate :: icalls :: icallvar__str_strarr_bool_arr_bool_bool (method_bind , self . this . sys () . as_ptr () , path . into () , arguments , blocking as _ , output , read_stderr as _ , open_console as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the scancode of the given string (e.g. \"Escape\")."] # [doc = ""] # [inline] pub fn find_scancode_from_string (& self , string : impl Into < GodotString >) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . find_scancode_from_string ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , string . into ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the total number of available audio drivers."] # [doc = ""] # [inline] pub fn get_audio_driver_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_audio_driver_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the audio driver name for the given index."] # [doc = ""] # [inline] pub fn get_audio_driver_name (& self , driver : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_audio_driver_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , driver as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "If `true`, removes the window frame.\n**Note:** Setting `window_borderless` to `false` disables per-pixel transparency."] # [doc = ""] # [inline] pub fn borderless_window (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_borderless_window ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the _global_ cache data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the `XDG_CACHE_HOME` environment variable before starting the project. See [File paths in Godot projects](https://docs.godotengine.org/en/3.5.1/tutorials/io/data_paths.html) in the documentation for more information. See also [`get_config_dir`][Self::get_config_dir] and [`get_data_dir`][Self::get_data_dir].\nNot to be confused with [`get_user_data_dir`][Self::get_user_data_dir], which returns the _project-specific_ user data path."] # [doc = ""] # [inline] pub fn get_cache_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_cache_dir ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The clipboard from the host OS. Might be unavailable on some platforms."] # [doc = ""] # [inline] pub fn clipboard (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_clipboard ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the command-line arguments passed to the engine.\nCommand-line arguments can be written in any form, including both `--key value` and `--key=value` forms so they can be properly parsed, as long as custom command-line arguments do not conflict with engine arguments.\nYou can also incorporate environment variables using the [`get_environment`][Self::get_environment] method.\nYou can set [member ProjectSettings.editor/main_run_args] to define command-line arguments to be passed by the editor when running the project.\nHere's a minimal example on how to parse command-line arguments into a dictionary using the `--key=value` form for arguments:\n```gdscript\nvar arguments = {}\nfor argument in OS.get_cmdline_args():\n    if argument.find(\"=\") > -1:\n        var key_value = argument.split(\"=\")\n        arguments[key_value[`0`][0].lstrip(\"--\")] = key_value[`1`][1]\n    else:\n        # Options without an argument will be present in the dictionary,\n        # with the value set to an empty string.\n        arguments[argument.lstrip(\"--\")] = \"\"\n```"] # [doc = ""] # [inline] pub fn get_cmdline_args (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_cmdline_args ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the _global_ user configuration directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the `XDG_CONFIG_HOME` environment variable before starting the project. See [File paths in Godot projects](https://docs.godotengine.org/en/3.5.1/tutorials/io/data_paths.html) in the documentation for more information. See also [`get_cache_dir`][Self::get_cache_dir] and [`get_data_dir`][Self::get_data_dir].\nNot to be confused with [`get_user_data_dir`][Self::get_user_data_dir], which returns the _project-specific_ user data path."] # [doc = ""] # [inline] pub fn get_config_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_config_dir ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an array of MIDI device names.\nThe returned array will be empty if the system MIDI driver has not previously been initialised with [`open_midi_inputs`][Self::open_midi_inputs].\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn get_connected_midi_inputs (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_connected_midi_inputs ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The current screen index (starting from 0)."] # [doc = ""] # [inline] pub fn current_screen (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_current_screen ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The current tablet driver in use."] # [doc = ""] # [inline] pub fn current_tablet_driver (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_current_tablet_driver ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the currently used video driver, using one of the values from [`VideoDriver`][VideoDriver]."] # [doc = ""] # [inline] pub fn get_current_video_driver (& self) -> crate :: generated :: os :: VideoDriver { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_current_video_driver ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: os :: VideoDriver > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the _global_ user data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the `XDG_DATA_HOME` environment variable before starting the project. See [File paths in Godot projects](https://docs.godotengine.org/en/3.5.1/tutorials/io/data_paths.html) in the documentation for more information. See also [`get_cache_dir`][Self::get_cache_dir] and [`get_config_dir`][Self::get_config_dir].\nNot to be confused with [`get_user_data_dir`][Self::get_user_data_dir], which returns the _project-specific_ user data path."] # [doc = ""] # [inline] pub fn get_data_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_data_dir ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Deprecated, use [`Time.get_date_dict_from_system`][Time::get_date_dict_from_system] instead.\nReturns current date as a dictionary of keys: `year`, `month`, `day`, `weekday`, `dst` (Daylight Savings Time).\n# Default Arguments\n* `utc` - `false`"] # [doc = ""] # [inline] pub fn get_date (& self , utc : bool) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_date ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , utc as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Deprecated, use [`Time.get_datetime_dict_from_system`][Time::get_datetime_dict_from_system] instead.\nReturns current datetime as a dictionary of keys: `year`, `month`, `day`, `weekday`, `dst` (Daylight Savings Time), `hour`, `minute`, `second`.\n# Default Arguments\n* `utc` - `false`"] # [doc = ""] # [inline] pub fn get_datetime (& self , utc : bool) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_datetime ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , utc as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Deprecated, use [`Time.get_datetime_dict_from_unix_time`][Time::get_datetime_dict_from_unix_time] instead.\nGets a dictionary of time values corresponding to the given UNIX epoch time (in seconds).\nThe returned Dictionary's values will be the same as [`get_datetime`][Self::get_datetime], with the exception of Daylight Savings Time as it cannot be determined from the epoch."] # [doc = ""] # [inline] pub fn get_datetime_from_unix_time (& self , unix_time_val : i64) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_datetime_from_unix_time ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , unix_time_val as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns an [`Array`][VariantArray] of [`Rect2`][Rect2], each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also [`get_window_safe_area`][Self::get_window_safe_area].\n**Note:** Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches."] # [doc = ""] # [inline] pub fn get_display_cutouts (& self) -> VariantArray { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_display_cutouts ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < VariantArray > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the total amount of dynamic memory used (only works in debug)."] # [doc = ""] # [inline] pub fn get_dynamic_memory_usage (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_dynamic_memory_usage ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the value of an environment variable. Returns an empty string if the environment variable doesn't exist.\n**Note:** Double-check the casing of `variable`. Environment variable names are case-sensitive on all platforms except Windows."] # [doc = ""] # [inline] pub fn get_environment (& self , variable : impl Into < GodotString >) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_environment ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , variable . into ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the path to the current engine executable."] # [doc = ""] # [inline] pub fn get_executable_path (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_executable_path ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The exit code passed to the OS when the main loop exits. By convention, an exit code of `0` indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive).\n**Note:** This value will be ignored if using [`SceneTree.quit`][SceneTree::quit] with an `exit_code` argument passed."] # [doc = ""] # [inline] pub fn exit_code (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_exit_code ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "With this function, you can get the list of dangerous permissions that have been granted to the Android application.\n**Note:** This method is implemented on Android."] # [doc = ""] # [inline] pub fn get_granted_permissions (& self) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_granted_permissions ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the IME cursor position (the currently-edited portion of the string) relative to the characters in the composition string.\n[`MainLoop.NOTIFICATION_OS_IME_UPDATE`][MainLoop::NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME cursor position.\n**Note:** This method is implemented on macOS."] # [doc = ""] # [inline] pub fn get_ime_selection (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_ime_selection ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the IME intermediate composition string.\n[`MainLoop.NOTIFICATION_OS_IME_UPDATE`][MainLoop::NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME composition string.\n**Note:** This method is implemented on macOS."] # [doc = ""] # [inline] pub fn get_ime_text (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_ime_text ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current latin keyboard variant as a String.\nPossible return values are: `\"QWERTY\"`, `\"AZERTY\"`, `\"QZERTY\"`, `\"DVORAK\"`, `\"NEO\"`, `\"COLEMAK\"` or `\"ERROR\"`.\n**Note:** This method is implemented on Linux, macOS and Windows. Returns `\"QWERTY\"` on unsupported platforms."] # [doc = ""] # [inline] pub fn get_latin_keyboard_variant (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_latin_keyboard_variant ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the host OS locale as a string of the form `language_Script_COUNTRY_VARIANT@extra`. If you want only the language code and not the fully specified locale from the OS, you can use [`get_locale_language`][Self::get_locale_language].\n`language` - 2 or 3-letter [language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), in lower case.\n`Script` - optional, 4-letter [script code](https://en.wikipedia.org/wiki/ISO_15924), in title case.\n`COUNTRY` - optional, 2 or 3-letter [country code](https://en.wikipedia.org/wiki/ISO_3166-1), in upper case.\n`VARIANT` - optional, language variant, region and sort order. Variant can have any number of underscored keywords.\n`extra` - optional, semicolon separated list of additional key words. Currency, calendar, sort order and numbering system information."] # [doc = ""] # [inline] pub fn get_locale (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_locale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the host OS locale's 2 or 3-letter [language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) as a string which should be consistent on all platforms. This is equivalent to extracting the `language` part of the [`get_locale`][Self::get_locale] string.\nThis can be used to narrow down fully specified locale strings to only the \"common\" language code, when you don't need the additional information about country code or variants. For example, for a French Canadian user with `fr_CA` locale, this would return `fr`."] # [doc = ""] # [inline] pub fn get_locale_language (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_locale_language ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage."] # [doc = ""] # [inline] pub fn low_processor_usage_mode_sleep_usec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_low_processor_usage_mode_sleep_usec ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the ID of the main thread. See [`get_thread_caller_id`][Self::get_thread_caller_id].\n**Note:** Thread IDs are not deterministic and may be reused across application restarts."] # [doc = ""] # [inline] pub fn get_main_thread_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_main_thread_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "The maximum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to `(0, 0)` to reset to the system default value."] # [doc = ""] # [inline] pub fn max_window_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_max_window_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The minimum size of the window in pixels (without counting window manager decorations). Does not affect fullscreen mode. Set to `(0, 0)` to reset to the system's default value.\n**Note:** By default, the project window has a minimum size of `Vector2(64, 64)`. This prevents issues that can arise when the window is resized to a near-zero size."] # [doc = ""] # [inline] pub fn min_window_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_min_window_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the model name of the current device.\n**Note:** This method is implemented on Android and iOS. Returns `\"GenericDevice\"` on unsupported platforms."] # [doc = ""] # [inline] pub fn get_model_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_model_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the name of the host OS. Possible values are: `\"Android\"`, `\"iOS\"`, `\"HTML5\"`, `\"OSX\"`, `\"Server\"`, `\"Windows\"`, `\"UWP\"`, `\"X11\"`."] # [doc = ""] # [inline] pub fn get_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns internal structure pointers for use in GDNative plugins.\n**Note:** This method is implemented on Linux and Windows (other OSs will soon be supported)."] # [doc = ""] # [inline] pub fn get_native_handle (& self , handle_type : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_native_handle ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , handle_type as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the amount of battery left in the device as a percentage. Returns `-1` if power state is unknown.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn get_power_percent_left (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_power_percent_left ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns an estimate of the time left in seconds before the device runs out of battery. Returns `-1` if power state is unknown.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn get_power_seconds_left (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_power_seconds_left ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the current state of the device regarding battery and power. See [`PowerState`][PowerState] constants.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn get_power_state (& self) -> crate :: generated :: os :: PowerState { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_power_state ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: os :: PowerState > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the project's process ID.\n**Note:** This method is implemented on Android, iOS, Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn get_process_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_process_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of _logical_ CPU cores available on the host machine. On CPUs with HyperThreading enabled, this number will be greater than the number of _physical_ CPU cores."] # [doc = ""] # [inline] pub fn get_processor_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_processor_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the name of the CPU model on the host machine (e.g. \"Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz\").\n**Note:** This method is only implemented on Windows, macOS, Linux and iOS. On Android, HTML5 and UWP, [`get_processor_name`][Self::get_processor_name] returns an empty string."] # [doc = ""] # [inline] pub fn get_processor_name (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_processor_name ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the window size including decorations like window borders."] # [doc = ""] # [inline] pub fn get_real_window_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_real_window_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the given scancode as a string (e.g. Return values: `\"Escape\"`, `\"Shift+Escape\"`).\nSee also [`InputEventKey.scancode`][InputEventKey::scancode] and [`InputEventKey.get_scancode_with_modifiers`][InputEventKey::get_scancode_with_modifiers]."] # [doc = ""] # [inline] pub fn get_scancode_string (& self , code : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_scancode_string ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , code as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of displays attached to the host machine."] # [doc = ""] # [inline] pub fn get_screen_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_screen_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the dots per inch density of the specified screen. If `screen` is `-1` (the default value), the current screen will be used.\n**Note:** On macOS, returned value is inaccurate if fractional display scaling mode is used.\n**Note:** On Android devices, the actual screen densities are grouped into six generalized densities:\n```gdscript\n   ldpi - 120 dpi\n   mdpi - 160 dpi\n   hdpi - 240 dpi\n  xhdpi - 320 dpi\n xxhdpi - 480 dpi\nxxxhdpi - 640 dpi\n```\n**Note:** This method is implemented on Android, Linux, macOS and Windows. Returns `72` on unsupported platforms.\n# Default Arguments\n* `screen` - `-1`"] # [doc = ""] # [inline] pub fn get_screen_dpi (& self , screen : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_screen_dpi ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , screen as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Return the greatest scale factor of all screens.\n**Note:** On macOS returned value is `2.0` if there is at least one hiDPI (Retina) screen in the system, and `1.0` in all other cases.\n**Note:** This method is implemented on macOS."] # [doc = ""] # [inline] pub fn get_screen_max_scale (& self) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_screen_max_scale ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "The current screen orientation."] # [doc = ""] # [inline] pub fn screen_orientation (& self) -> crate :: generated :: os :: ScreenOrientation { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_screen_orientation ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < crate :: generated :: os :: ScreenOrientation > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the position of the specified screen by index. If `screen` is `-1` (the default value), the current screen will be used.\n# Default Arguments\n* `screen` - `-1`"] # [doc = ""] # [inline] pub fn get_screen_position (& self , screen : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_screen_position ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , screen as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nReturns the current refresh rate of the specified screen. If `screen` is `-1` (the default value), the current screen will be used.\n**Note:** Returns `-1.0` if Godot fails to find the refresh rate for the specified screen. On HTML5, [`get_screen_refresh_rate`][Self::get_screen_refresh_rate] will always return `-1.0` as there is no way to retrieve the refresh rate on that platform.\nTo fallback to a default refresh rate if the method fails, try:\n```gdscript\nvar refresh_rate = OS.get_screen_refresh_rate()\nif refresh_rate < 0:\n    refresh_rate = 60.0\n```\n# Default Arguments\n* `screen` - `-1`"] # [doc = ""] # [inline] pub fn get_screen_refresh_rate (& self , screen : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_screen_refresh_rate ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , screen as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Return the scale factor of the specified screen by index. If `screen` is `-1` (the default value), the current screen will be used.\n**Note:** On macOS returned value is `2.0` for hiDPI (Retina) screen, and `1.0` for all other cases.\n**Note:** This method is implemented on macOS.\n# Default Arguments\n* `screen` - `-1`"] # [doc = ""] # [inline] pub fn get_screen_scale (& self , screen : i64) -> f64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_screen_scale ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , screen as _) ; < f64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the dimensions in pixels of the specified screen. If `screen` is `-1` (the default value), the current screen will be used.\n# Default Arguments\n* `screen` - `-1`"] # [doc = ""] # [inline] pub fn get_screen_size (& self , screen : i64) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_screen_size ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , screen as _) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the amount of time in milliseconds it took for the boot logo to appear."] # [doc = ""] # [inline] pub fn get_splash_tick_msec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_splash_tick_msec ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the maximum amount of static memory used (only works in debug)."] # [doc = ""] # [inline] pub fn get_static_memory_peak_usage (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_static_memory_peak_usage ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the amount of static memory being used by the program in bytes (only works in debug)."] # [doc = ""] # [inline] pub fn get_static_memory_usage (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_static_memory_usage ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the actual path to commonly used folders across different platforms. Available locations are specified in [`SystemDir`][SystemDir].\n**Note:** This method is implemented on Android, Linux, macOS and Windows.\n**Note:** Shared storage is implemented on Android and allows to differentiate between app specific and shared directories. Shared directories have additional restrictions on Android.\n# Default Arguments\n* `shared_storage` - `true`"] # [doc = ""] # [inline] pub fn get_system_dir (& self , dir : i64 , shared_storage : bool) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_system_dir ; let ret = crate :: icalls :: icallvar__i64_bool (method_bind , self . this . sys () . as_ptr () , dir as _ , shared_storage as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the epoch time of the operating system in milliseconds."] # [doc = ""] # [inline] pub fn get_system_time_msecs (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_system_time_msecs ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the epoch time of the operating system in seconds."] # [doc = ""] # [inline] pub fn get_system_time_secs (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_system_time_secs ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the total number of available tablet drivers.\n**Note:** This method is implemented on Windows."] # [doc = ""] # [inline] pub fn get_tablet_driver_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_tablet_driver_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the tablet driver name for the given index.\n**Note:** This method is implemented on Windows."] # [doc = ""] # [inline] pub fn get_tablet_driver_name (& self , idx : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_tablet_driver_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , idx as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the ID of the current thread. This can be used in logs to ease debugging of multi-threaded applications.\n**Note:** Thread IDs are not deterministic and may be reused across application restarts."] # [doc = ""] # [inline] pub fn get_thread_caller_id (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_thread_caller_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Deprecated, use [`Time.get_ticks_msec`][Time::get_ticks_msec] instead.\nReturns the amount of time passed in milliseconds since the engine started."] # [doc = ""] # [inline] pub fn get_ticks_msec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_ticks_msec ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Deprecated, use [`Time.get_ticks_usec`][Time::get_ticks_usec] instead.\nReturns the amount of time passed in microseconds since the engine started."] # [doc = ""] # [inline] pub fn get_ticks_usec (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_ticks_usec ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Deprecated, use [`Time.get_time_dict_from_system`][Time::get_time_dict_from_system] instead.\nReturns current time as a dictionary of keys: hour, minute, second.\n# Default Arguments\n* `utc` - `false`"] # [doc = ""] # [inline] pub fn get_time (& self , utc : bool) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_time ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , utc as _) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current time zone as a dictionary with the keys: bias and name."] # [doc = ""] # [inline] pub fn get_time_zone_info (& self) -> Dictionary { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_time_zone_info ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Dictionary > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns a string that is unique to the device.\n**Note:** This string may change without notice if the user reinstalls/upgrades their operating system or changes their hardware. This means it should generally not be used to encrypt persistent data as the data saved before an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by [`get_unique_id`][Self::get_unique_id] for security purposes.\n**Note:** Returns an empty string on HTML5 and UWP, as this method isn't implemented on those platforms yet."] # [doc = ""] # [inline] pub fn get_unique_id (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_unique_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the current UNIX epoch timestamp in seconds.\n**Important:** This is the system clock that the user can manually set. **Never use** this method for precise time calculation since its results are also subject to automatic adjustments by the operating system. **Always use** [`get_ticks_usec`][Self::get_ticks_usec] or [`get_ticks_msec`][Self::get_ticks_msec] for precise time calculation instead, since they are guaranteed to be monotonic (i.e. never decrease).\n**Note:** To get a floating point timestamp with sub-second precision, use [`Time.get_unix_time_from_system`][Time::get_unix_time_from_system]."] # [doc = ""] # [inline] pub fn get_unix_time (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_unix_time ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Gets an epoch time value from a dictionary of time values.\n`datetime` must be populated with the following keys: `year`, `month`, `day`, `hour`, `minute`, `second`.\nIf the dictionary is empty `0` is returned. If some keys are omitted, they default to the equivalent values for the UNIX epoch timestamp 0 (1970-01-01 at 00:00:00 UTC).\nYou can pass the output from [`get_datetime_from_unix_time`][Self::get_datetime_from_unix_time] directly into this function. Daylight Savings Time (`dst`), if present, is ignored."] # [doc = ""] # [inline] pub fn get_unix_time_from_datetime (& self , datetime : Dictionary) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_unix_time_from_datetime ; let ret = crate :: icalls :: icallvar__dict (method_bind , self . this . sys () . as_ptr () , datetime) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the absolute directory path where user data is written (`user://`).\nOn Linux, this is `~/.local/share/godot/app_userdata/[`project_name`][project_name]`, or `~/.local/share/[`custom_name`][custom_name]` if `use_custom_user_dir` is set.\nOn macOS, this is `~/Library/Application Support/Godot/app_userdata/[`project_name`][project_name]`, or `~/Library/Application Support/[`custom_name`][custom_name]` if `use_custom_user_dir` is set.\nOn Windows, this is `%APPDATA%\\Godot\\app_userdata\\[`project_name`][project_name]`, or `%APPDATA%\\[`custom_name`][custom_name]` if `use_custom_user_dir` is set. `%APPDATA%` expands to `%USERPROFILE%\\AppData\\Roaming`.\nIf the project name is empty, `user://` falls back to `res://`.\nNot to be confused with [`get_data_dir`][Self::get_data_dir], which returns the _global_ (non-project-specific) user data directory."] # [doc = ""] # [inline] pub fn get_user_data_dir (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_user_data_dir ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the number of video drivers supported on the current platform."] # [doc = ""] # [inline] pub fn get_video_driver_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_video_driver_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the name of the video driver matching the given `driver` index. This index is a value from [`VideoDriver`][VideoDriver], and you can use [`get_current_video_driver`][Self::get_current_video_driver] to get the current backend's index."] # [doc = ""] # [inline] pub fn get_video_driver_name (& self , driver : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_video_driver_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , driver as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden."] # [doc = ""] # [inline] pub fn get_virtual_keyboard_height (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_virtual_keyboard_height ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the window background is transparent and the window frame is removed.\nUse `get_tree().get_root().set_transparent_background(true)` to disable main viewport background rendering.\n**Note:** This property has no effect if [member ProjectSettings.display/window/per_pixel_transparency/allowed] setting is disabled.\n**Note:** This property is implemented on HTML5, Linux, macOS, Windows, and Android. It can't be changed at runtime for Android. Use [member ProjectSettings.display/window/per_pixel_transparency/enabled] to set it at startup instead."] # [doc = ""] # [inline] pub fn window_per_pixel_transparency_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_window_per_pixel_transparency_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right."] # [doc = ""] # [inline] pub fn window_position (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_window_position ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns unobscured area of the window where interactive controls should be rendered."] # [doc = ""] # [inline] pub fn get_window_safe_area (& self) -> Rect2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_window_safe_area ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Rect2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "The size of the window (without counting window manager decorations)."] # [doc = ""] # [inline] pub fn window_size (& self) -> Vector2 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . get_window_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Vector2 > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Add a new item with text \"label\" to global menu. Use \"_dock\" menu to add item to the macOS dock icon menu.\n**Note:** This method is implemented on macOS."] # [doc = ""] # [inline] pub fn global_menu_add_item (& self , menu : impl Into < GodotString > , label : impl Into < GodotString > , id : impl OwnedToVariant , meta : impl OwnedToVariant) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . global_menu_add_item ; let ret = crate :: icalls :: icallvar__str_str_var_var (method_bind , self . this . sys () . as_ptr () , menu . into () , label . into () , id . owned_to_variant () , meta . owned_to_variant ()) ; } } # [doc = "Add a separator between items. Separators also occupy an index.\n**Note:** This method is implemented on macOS."] # [doc = ""] # [inline] pub fn global_menu_add_separator (& self , menu : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . global_menu_add_separator ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , menu . into ()) ; } } # [doc = "Clear the global menu, in effect removing all items.\n**Note:** This method is implemented on macOS."] # [doc = ""] # [inline] pub fn global_menu_clear (& self , menu : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . global_menu_clear ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , menu . into ()) ; } } # [doc = "Removes the item at index \"idx\" from the global menu. Note that the indexes of items after the removed item are going to be shifted by one.\n**Note:** This method is implemented on macOS."] # [doc = ""] # [inline] pub fn global_menu_remove_item (& self , menu : impl Into < GodotString > , idx : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . global_menu_remove_item ; let ret = crate :: icalls :: icallvar__str_i64 (method_bind , self . this . sys () . as_ptr () , menu . into () , idx as _) ; } } # [doc = "Returns `true` if there is content on the clipboard."] # [doc = ""] # [inline] pub fn has_clipboard (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . has_clipboard ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the environment variable with the name `variable` exists.\n**Note:** Double-check the casing of `variable`. Environment variable names are case-sensitive on all platforms except Windows."] # [doc = ""] # [inline] pub fn has_environment (& self , variable : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . has_environment ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , variable . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the feature for the given feature tag is supported in the currently running instance, depending on the platform, build etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [Feature Tags](https://docs.godotengine.org/en/3.5.1/tutorials/export/feature_tags.html) documentation for more details.\n**Note:** Tag names are case-sensitive."] # [doc = ""] # [inline] pub fn has_feature (& self , tag_name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . has_feature ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , tag_name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the device has a touchscreen or emulates one."] # [doc = ""] # [inline] pub fn has_touchscreen_ui_hint (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . has_touchscreen_ui_hint ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the platform has a virtual keyboard, `false` otherwise."] # [doc = ""] # [inline] pub fn has_virtual_keyboard (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . has_virtual_keyboard ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Hides the virtual keyboard if it is shown, does nothing otherwise."] # [doc = ""] # [inline] pub fn hide_virtual_keyboard (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . hide_virtual_keyboard ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns `true` if the Godot binary used to run the project is a _debug_ export template, or when running in the editor.\nReturns `false` if the Godot binary used to run the project is a _release_ export template.\nTo check whether the Godot binary used to run the project is an export template (debug or release), use `OS.has_feature(\"standalone\")` instead."] # [doc = ""] # [inline] pub fn is_debug_build (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_debug_build ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the engine filters the time delta measured between each frame, and attempts to compensate for random variation. This will only operate on systems where V-Sync is active."] # [doc = ""] # [inline] pub fn is_delta_smoothing_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_delta_smoothing_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile."] # [doc = ""] # [inline] pub fn is_in_low_processor_usage_mode (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_in_low_processor_usage_mode ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the engine tries to keep the screen on while the game is running. Useful on mobile."] # [doc = ""] # [inline] pub fn is_keep_screen_on (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_keep_screen_on ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the **OK** button should appear on the left and **Cancel** on the right."] # [doc = ""] # [inline] pub fn is_ok_left_and_cancel_right (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_ok_left_and_cancel_right ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the child process ID (`pid`) is still running or `false` if it has terminated.\nMust be a valid ID generated from [`execute`][Self::execute].\n**Note:** This method is implemented on Android, iOS, Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn is_process_running (& self , pid : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_process_running ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , pid as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the input scancode corresponds to a Unicode character."] # [doc = ""] # [inline] pub fn is_scancode_unicode (& self , code : i64) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_scancode_unicode ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , code as _) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the engine was executed with `-v` (verbose stdout)."] # [doc = ""] # [inline] pub fn is_stdout_verbose (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_stdout_verbose ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the `user://` file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the HTML5 platform, where this persistence may be unavailable."] # [doc = ""] # [inline] pub fn is_userfs_persistent (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_userfs_persistent ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, vertical synchronization (Vsync) is enabled."] # [doc = ""] # [inline] pub fn is_vsync_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_vsync_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true` and `vsync_enabled` is true, the operating system's window compositor will be used for vsync when the compositor is enabled and the game is in windowed mode.\n**Note:** This option is experimental and meant to alleviate stutter experienced by some users. However, some users have experienced a Vsync framerate halving (e.g. from 60 FPS to 30 FPS) when using it.\n**Note:** This property is only implemented on Windows."] # [doc = ""] # [inline] pub fn is_vsync_via_compositor_enabled (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_vsync_via_compositor_enabled ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the window should always be on top of other windows."] # [doc = ""] # [inline] pub fn is_window_always_on_top (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_window_always_on_top ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if the window is currently focused.\n**Note:** Only implemented on desktop platforms. On other platforms, it will always return `true`."] # [doc = ""] # [inline] pub fn is_window_focused (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_window_focused ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the window is fullscreen."] # [doc = ""] # [inline] pub fn is_window_fullscreen (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_window_fullscreen ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the window is maximized."] # [doc = ""] # [inline] pub fn is_window_maximized (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_window_maximized ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the window is minimized."] # [doc = ""] # [inline] pub fn is_window_minimized (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_window_minimized ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, the window is resizable by the user."] # [doc = ""] # [inline] pub fn is_window_resizable (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . is_window_resizable ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns active keyboard layout index.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn keyboard_get_current_layout (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . keyboard_get_current_layout ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the number of keyboard layouts.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn keyboard_get_layout_count (& self) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . keyboard_get_layout_count ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Returns the ISO-639/BCP-47 language code of the keyboard layout at position `index`.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn keyboard_get_layout_language (& self , index : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . keyboard_get_layout_language ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the localized name of the keyboard layout at position `index`.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn keyboard_get_layout_name (& self , index : i64) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . keyboard_get_layout_name ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Converts a physical (US QWERTY) `scancode` to one in the active keyboard layout.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn keyboard_get_scancode_from_physical (& self , scancode : i64) -> i64 { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . keyboard_get_scancode_from_physical ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , scancode as _) ; < i64 > :: coerce_from_variant (& ret) } } # [doc = "Sets active keyboard layout.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn keyboard_set_current_layout (& self , index : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . keyboard_set_current_layout ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , index as _) ; } } # [doc = "Kill (terminate) the process identified by the given process ID (`pid`), e.g. the one returned by [`execute`][Self::execute] in non-blocking mode. See also [`crash`][Self::crash].\n**Note:** This method can also be used to kill processes that were not spawned by the game.\n**Note:** This method is implemented on Android, iOS, Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn kill (& self , pid : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . kill ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , pid as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nMoves the file or directory to the system's recycle bin. See also [`Directory.remove`][Directory::remove].\nThe method takes only global paths, so you may need to use [`ProjectSettings.globalize_path`][ProjectSettings::globalize_path]. Do not use it for files in `res://` as it will not work in exported project.\n**Note:** If the user has disabled the recycle bin on their system, the file will be permanently deleted instead.\n```gdscript\nvar file_to_remove = \"user://slot1.sav\"\nOS.move_to_trash(ProjectSettings.globalize_path(file_to_remove))\n```"] # [doc = ""] # [inline] pub fn move_to_trash (& self , path : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . move_to_trash ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Moves the window to the front.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn move_window_to_foreground (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . move_window_to_foreground ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Returns `true` if native video is playing.\n**Note:** This method is only implemented on iOS."] # [doc = ""] # [inline] pub fn native_video_is_playing (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . native_video_is_playing ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Pauses native video playback.\n**Note:** This method is only implemented on iOS."] # [doc = ""] # [inline] pub fn native_video_pause (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . native_video_pause ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Plays native video from the specified path, at the given volume and with audio and subtitle tracks.\n**Note:** This method is only implemented on iOS."] # [doc = ""] # [inline] pub fn native_video_play (& self , path : impl Into < GodotString > , volume : f64 , audio_track : impl Into < GodotString > , subtitle_track : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . native_video_play ; let ret = crate :: icalls :: icallvar__str_f64_str_str (method_bind , self . this . sys () . as_ptr () , path . into () , volume as _ , audio_track . into () , subtitle_track . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Stops native video playback.\n**Note:** This method is implemented on iOS."] # [doc = ""] # [inline] pub fn native_video_stop (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . native_video_stop ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Resumes native video playback.\n**Note:** This method is implemented on iOS."] # [doc = ""] # [inline] pub fn native_video_unpause (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . native_video_unpause ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Initialises the singleton for the system MIDI driver.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn open_midi_inputs (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . open_midi_inputs ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Shows all resources in the game. Optionally, the list can be written to a file by specifying a file path in `tofile`.\n# Default Arguments\n* `tofile` - `\"\"`"] # [doc = ""] # [inline] pub fn print_all_resources (& self , tofile : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . print_all_resources ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , tofile . into ()) ; } } # [doc = "Shows the list of loaded textures sorted by size in memory."] # [doc = ""] # [inline] pub fn print_all_textures_by_size (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . print_all_textures_by_size ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "Shows the number of resources loaded by the game of the given types."] # [doc = ""] # [inline] pub fn print_resources_by_type (& self , types : PoolArray < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . print_resources_by_type ; let ret = crate :: icalls :: icallvar__strarr (method_bind , self . this . sys () . as_ptr () , types) ; } } # [doc = "Shows all resources currently used by the game.\n# Default Arguments\n* `short` - `false`"] # [doc = ""] # [inline] pub fn print_resources_in_use (& self , short : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . print_resources_in_use ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , short as _) ; } } # [doc = "Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn request_attention (& self) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . request_attention ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; } } # [doc = "At the moment this function is only used by `AudioDriverOpenSL` to request permission for `RECORD_AUDIO` on Android."] # [doc = ""] # [inline] pub fn request_permission (& self , name : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . request_permission ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "With this function, you can request dangerous permissions since normal permissions are automatically granted at install time in Android applications.\n**Note:** This method is implemented on Android."] # [doc = ""] # [inline] pub fn request_permissions (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . request_permissions ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "If `true`, removes the window frame.\n**Note:** Setting `window_borderless` to `false` disables per-pixel transparency."] # [doc = ""] # [inline] pub fn set_borderless_window (& self , borderless : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_borderless_window ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , borderless as _) ; } } # [doc = "The clipboard from the host OS. Might be unavailable on some platforms."] # [doc = ""] # [inline] pub fn set_clipboard (& self , clipboard : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_clipboard ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , clipboard . into ()) ; } } # [doc = "The current screen index (starting from 0)."] # [doc = ""] # [inline] pub fn set_current_screen (& self , screen : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_current_screen ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , screen as _) ; } } # [doc = "The current tablet driver in use."] # [doc = ""] # [inline] pub fn set_current_tablet_driver (& self , name : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_current_tablet_driver ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; } } # [doc = "If `true`, the engine filters the time delta measured between each frame, and attempts to compensate for random variation. This will only operate on systems where V-Sync is active."] # [doc = ""] # [inline] pub fn set_delta_smoothing (& self , delta_smoothing_enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_delta_smoothing ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , delta_smoothing_enabled as _) ; } } # [doc = "Sets the value of the environment variable `variable` to `value`. The environment variable will be set for the Godot process and any process executed with [`execute`][Self::execute] after running [`set_environment`][Self::set_environment]. The environment variable will _not_ persist to processes run after the Godot process was terminated.\n**Note:** Double-check the casing of `variable`. Environment variable names are case-sensitive on all platforms except Windows."] # [doc = ""] # [inline] pub fn set_environment (& self , variable : impl Into < GodotString > , value : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_environment ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , variable . into () , value . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "The exit code passed to the OS when the main loop exits. By convention, an exit code of `0` indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive).\n**Note:** This value will be ignored if using [`SceneTree.quit`][SceneTree::quit] with an `exit_code` argument passed."] # [doc = ""] # [inline] pub fn set_exit_code (& self , code : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_exit_code ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , code as _) ; } } # [doc = "Sets the game's icon using an [`Image`][Image] resource.\nThe same image is used for window caption, taskbar/dock and window selection dialog. Image is scaled as needed.\n**Note:** This method is implemented on HTML5, Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn set_icon (& self , icon : impl AsArg < crate :: generated :: Image >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_icon ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , icon . as_arg_ptr ()) ; } } # [doc = "Sets whether IME input mode should be enabled.\nIf active IME handles key events before the application and creates an composition string and suggestion list.\nApplication can retrieve the composition status by using [`get_ime_selection`][Self::get_ime_selection] and [`get_ime_text`][Self::get_ime_text] functions.\nCompleted composition string is committed when input is finished.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn set_ime_active (& self , active : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_ime_active ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , active as _) ; } } # [doc = "Sets position of IME suggestion list popup (in window coordinates).\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn set_ime_position (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_ime_position ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "If `true`, the engine tries to keep the screen on while the game is running. Useful on mobile."] # [doc = ""] # [inline] pub fn set_keep_screen_on (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_keep_screen_on ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile."] # [doc = ""] # [inline] pub fn set_low_processor_usage_mode (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_low_processor_usage_mode ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage."] # [doc = ""] # [inline] pub fn set_low_processor_usage_mode_sleep_usec (& self , usec : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_low_processor_usage_mode_sleep_usec ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , usec as _) ; } } # [doc = "The maximum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to `(0, 0)` to reset to the system default value."] # [doc = ""] # [inline] pub fn set_max_window_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_max_window_size ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "The minimum size of the window in pixels (without counting window manager decorations). Does not affect fullscreen mode. Set to `(0, 0)` to reset to the system's default value.\n**Note:** By default, the project window has a minimum size of `Vector2(64, 64)`. This prevents issues that can arise when the window is resized to a near-zero size."] # [doc = ""] # [inline] pub fn set_min_window_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_min_window_size ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Sets the game's icon using a multi-size platform-specific icon file (`*.ico` on Windows and `*.icns` on macOS).\nAppropriate size sub-icons are used for window caption, taskbar/dock and window selection dialog.\n**Note:** This method is implemented on macOS and Windows."] # [doc = ""] # [inline] pub fn set_native_icon (& self , filename : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_native_icon ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , filename . into ()) ; } } # [doc = "The current screen orientation."] # [doc = ""] # [inline] pub fn set_screen_orientation (& self , orientation : i64) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_screen_orientation ; let ret = crate :: icalls :: icallvar__i64 (method_bind , self . this . sys () . as_ptr () , orientation as _) ; } } # [doc = "Sets the name of the current thread."] # [doc = ""] # [inline] pub fn set_thread_name (& self , name : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_thread_name ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , name . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Enables backup saves if `enabled` is `true`."] # [doc = ""] # [inline] pub fn set_use_file_access_save_and_swap (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_use_file_access_save_and_swap ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, vertical synchronization (Vsync) is enabled."] # [doc = ""] # [inline] pub fn set_use_vsync (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_use_vsync ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "If `true` and `vsync_enabled` is true, the operating system's window compositor will be used for vsync when the compositor is enabled and the game is in windowed mode.\n**Note:** This option is experimental and meant to alleviate stutter experienced by some users. However, some users have experienced a Vsync framerate halving (e.g. from 60 FPS to 30 FPS) when using it.\n**Note:** This property is only implemented on Windows."] # [doc = ""] # [inline] pub fn set_vsync_via_compositor (& self , enable : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_vsync_via_compositor ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enable as _) ; } } # [doc = "Sets whether the window should always be on top.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn set_window_always_on_top (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_always_on_top ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, the window is fullscreen."] # [doc = ""] # [inline] pub fn set_window_fullscreen (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_fullscreen ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, the window is maximized."] # [doc = ""] # [inline] pub fn set_window_maximized (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_maximized ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "If `true`, the window is minimized."] # [doc = ""] # [inline] pub fn set_window_minimized (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_minimized ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "_Sample code is GDScript unless otherwise noted._\n\nSets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through.\nPassing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior).\n```gdscript\n# Set region, using Path2D node.\nOS.set_window_mouse_passthrough($Path2D.curve.get_baked_points())\n\n# Set region, using Polygon2D node.\nOS.set_window_mouse_passthrough($Polygon2D.polygon)\n\n# Reset region to default.\nOS.set_window_mouse_passthrough([])\n```\n**Note:** On Windows, the portion of a window that lies outside the region is not drawn, while on Linux and macOS it is.\n**Note:** This method is implemented on Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn set_window_mouse_passthrough (& self , region : PoolArray < Vector2 >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_mouse_passthrough ; let ret = crate :: icalls :: icallvar__vec2arr (method_bind , self . this . sys () . as_ptr () , region) ; } } # [doc = "If `true`, the window background is transparent and the window frame is removed.\nUse `get_tree().get_root().set_transparent_background(true)` to disable main viewport background rendering.\n**Note:** This property has no effect if [member ProjectSettings.display/window/per_pixel_transparency/allowed] setting is disabled.\n**Note:** This property is implemented on HTML5, Linux, macOS, Windows, and Android. It can't be changed at runtime for Android. Use [member ProjectSettings.display/window/per_pixel_transparency/enabled] to set it at startup instead."] # [doc = ""] # [inline] pub fn set_window_per_pixel_transparency_enabled (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_per_pixel_transparency_enabled ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right."] # [doc = ""] # [inline] pub fn set_window_position (& self , position : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_position ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , position) ; } } # [doc = "If `true`, the window is resizable by the user."] # [doc = ""] # [inline] pub fn set_window_resizable (& self , enabled : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_resizable ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , enabled as _) ; } } # [doc = "The size of the window (without counting window manager decorations)."] # [doc = ""] # [inline] pub fn set_window_size (& self , size : Vector2) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_size ; let ret = crate :: icalls :: icallvar__vec2 (method_bind , self . this . sys () . as_ptr () , size) ; } } # [doc = "Sets the window title to the specified string.\n**Note:** This should be used sporadically. Don't set this every frame, as that will negatively affect performance on some window managers.\n**Note:** This method is implemented on HTML5, Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn set_window_title (& self , title : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . set_window_title ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , title . into ()) ; } } # [doc = "Requests the OS to open a resource with the most appropriate program. For example:\n- `OS.shell_open(\"C:\\\\Users\\name\\Downloads\")` on Windows opens the file explorer at the user's Downloads folder.\n- `OS.shell_open(\"https://godotengine.org\")` opens the default web browser on the official Godot website.\n- `OS.shell_open(\"mailto:example@example.com\")` opens the default email client with the \"To\" field set to `example@example.com`. See [RFC 2368 - The `mailto` URL scheme](https://datatracker.ietf.org/doc/html/rfc2368) for a list of fields that can be added.\nUse [`ProjectSettings.globalize_path`][ProjectSettings::globalize_path] to convert a `res://` or `user://` path into a system path for use with this method.\n**Note:** This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows."] # [doc = ""] # [inline] pub fn shell_open (& self , uri : impl Into < GodotString >) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . shell_open ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , uri . into ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Shows the virtual keyboard if the platform has one.\nThe `existing_text` parameter is useful for implementing your own [`LineEdit`][LineEdit] or [`TextEdit`][TextEdit], as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions).\nThe `multiline` parameter needs to be set to `true` to be able to enter multiple lines of text, as in [`TextEdit`][TextEdit].\n**Note:** This method is implemented on Android, iOS and UWP.\n# Default Arguments\n* `existing_text` - `\"\"`\n* `multiline` - `false`"] # [doc = ""] # [inline] pub fn show_virtual_keyboard (& self , existing_text : impl Into < GodotString > , multiline : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = OSMethodTable :: get (get_api ()) . show_virtual_keyboard ; let ret = crate :: icalls :: icallvar__str_bool (method_bind , self . this . sys () . as_ptr () , existing_text . into () , multiline as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for OS { } unsafe impl GodotObject for OS { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "OS" } } impl std :: ops :: Deref for OS { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for OS { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for OS { } unsafe impl Send for OS { } unsafe impl Sync for OS { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct OSMethodTable { pub class_constructor : sys :: godot_class_constructor , pub alert : * mut sys :: godot_method_bind , pub can_draw : * mut sys :: godot_method_bind , pub can_use_threads : * mut sys :: godot_method_bind , pub center_window : * mut sys :: godot_method_bind , pub close_midi_inputs : * mut sys :: godot_method_bind , pub crash : * mut sys :: godot_method_bind , pub delay_msec : * mut sys :: godot_method_bind , pub delay_usec : * mut sys :: godot_method_bind , pub dump_memory_to_file : * mut sys :: godot_method_bind , pub dump_resources_to_file : * mut sys :: godot_method_bind , pub execute : * mut sys :: godot_method_bind , pub find_scancode_from_string : * mut sys :: godot_method_bind , pub get_audio_driver_count : * mut sys :: godot_method_bind , pub get_audio_driver_name : * mut sys :: godot_method_bind , pub get_borderless_window : * mut sys :: godot_method_bind , pub get_cache_dir : * mut sys :: godot_method_bind , pub get_clipboard : * mut sys :: godot_method_bind , pub get_cmdline_args : * mut sys :: godot_method_bind , pub get_config_dir : * mut sys :: godot_method_bind , pub get_connected_midi_inputs : * mut sys :: godot_method_bind , pub get_current_screen : * mut sys :: godot_method_bind , pub get_current_tablet_driver : * mut sys :: godot_method_bind , pub get_current_video_driver : * mut sys :: godot_method_bind , pub get_data_dir : * mut sys :: godot_method_bind , pub get_date : * mut sys :: godot_method_bind , pub get_datetime : * mut sys :: godot_method_bind , pub get_datetime_from_unix_time : * mut sys :: godot_method_bind , pub get_display_cutouts : * mut sys :: godot_method_bind , pub get_dynamic_memory_usage : * mut sys :: godot_method_bind , pub get_environment : * mut sys :: godot_method_bind , pub get_executable_path : * mut sys :: godot_method_bind , pub get_exit_code : * mut sys :: godot_method_bind , pub get_granted_permissions : * mut sys :: godot_method_bind , pub get_ime_selection : * mut sys :: godot_method_bind , pub get_ime_text : * mut sys :: godot_method_bind , pub get_latin_keyboard_variant : * mut sys :: godot_method_bind , pub get_locale : * mut sys :: godot_method_bind , pub get_locale_language : * mut sys :: godot_method_bind , pub get_low_processor_usage_mode_sleep_usec : * mut sys :: godot_method_bind , pub get_main_thread_id : * mut sys :: godot_method_bind , pub get_max_window_size : * mut sys :: godot_method_bind , pub get_min_window_size : * mut sys :: godot_method_bind , pub get_model_name : * mut sys :: godot_method_bind , pub get_name : * mut sys :: godot_method_bind , pub get_native_handle : * mut sys :: godot_method_bind , pub get_power_percent_left : * mut sys :: godot_method_bind , pub get_power_seconds_left : * mut sys :: godot_method_bind , pub get_power_state : * mut sys :: godot_method_bind , pub get_process_id : * mut sys :: godot_method_bind , pub get_processor_count : * mut sys :: godot_method_bind , pub get_processor_name : * mut sys :: godot_method_bind , pub get_real_window_size : * mut sys :: godot_method_bind , pub get_scancode_string : * mut sys :: godot_method_bind , pub get_screen_count : * mut sys :: godot_method_bind , pub get_screen_dpi : * mut sys :: godot_method_bind , pub get_screen_max_scale : * mut sys :: godot_method_bind , pub get_screen_orientation : * mut sys :: godot_method_bind , pub get_screen_position : * mut sys :: godot_method_bind , pub get_screen_refresh_rate : * mut sys :: godot_method_bind , pub get_screen_scale : * mut sys :: godot_method_bind , pub get_screen_size : * mut sys :: godot_method_bind , pub get_splash_tick_msec : * mut sys :: godot_method_bind , pub get_static_memory_peak_usage : * mut sys :: godot_method_bind , pub get_static_memory_usage : * mut sys :: godot_method_bind , pub get_system_dir : * mut sys :: godot_method_bind , pub get_system_time_msecs : * mut sys :: godot_method_bind , pub get_system_time_secs : * mut sys :: godot_method_bind , pub get_tablet_driver_count : * mut sys :: godot_method_bind , pub get_tablet_driver_name : * mut sys :: godot_method_bind , pub get_thread_caller_id : * mut sys :: godot_method_bind , pub get_ticks_msec : * mut sys :: godot_method_bind , pub get_ticks_usec : * mut sys :: godot_method_bind , pub get_time : * mut sys :: godot_method_bind , pub get_time_zone_info : * mut sys :: godot_method_bind , pub get_unique_id : * mut sys :: godot_method_bind , pub get_unix_time : * mut sys :: godot_method_bind , pub get_unix_time_from_datetime : * mut sys :: godot_method_bind , pub get_user_data_dir : * mut sys :: godot_method_bind , pub get_video_driver_count : * mut sys :: godot_method_bind , pub get_video_driver_name : * mut sys :: godot_method_bind , pub get_virtual_keyboard_height : * mut sys :: godot_method_bind , pub get_window_per_pixel_transparency_enabled : * mut sys :: godot_method_bind , pub get_window_position : * mut sys :: godot_method_bind , pub get_window_safe_area : * mut sys :: godot_method_bind , pub get_window_size : * mut sys :: godot_method_bind , pub global_menu_add_item : * mut sys :: godot_method_bind , pub global_menu_add_separator : * mut sys :: godot_method_bind , pub global_menu_clear : * mut sys :: godot_method_bind , pub global_menu_remove_item : * mut sys :: godot_method_bind , pub has_clipboard : * mut sys :: godot_method_bind , pub has_environment : * mut sys :: godot_method_bind , pub has_feature : * mut sys :: godot_method_bind , pub has_touchscreen_ui_hint : * mut sys :: godot_method_bind , pub has_virtual_keyboard : * mut sys :: godot_method_bind , pub hide_virtual_keyboard : * mut sys :: godot_method_bind , pub is_debug_build : * mut sys :: godot_method_bind , pub is_delta_smoothing_enabled : * mut sys :: godot_method_bind , pub is_in_low_processor_usage_mode : * mut sys :: godot_method_bind , pub is_keep_screen_on : * mut sys :: godot_method_bind , pub is_ok_left_and_cancel_right : * mut sys :: godot_method_bind , pub is_process_running : * mut sys :: godot_method_bind , pub is_scancode_unicode : * mut sys :: godot_method_bind , pub is_stdout_verbose : * mut sys :: godot_method_bind , pub is_userfs_persistent : * mut sys :: godot_method_bind , pub is_vsync_enabled : * mut sys :: godot_method_bind , pub is_vsync_via_compositor_enabled : * mut sys :: godot_method_bind , pub is_window_always_on_top : * mut sys :: godot_method_bind , pub is_window_focused : * mut sys :: godot_method_bind , pub is_window_fullscreen : * mut sys :: godot_method_bind , pub is_window_maximized : * mut sys :: godot_method_bind , pub is_window_minimized : * mut sys :: godot_method_bind , pub is_window_resizable : * mut sys :: godot_method_bind , pub keyboard_get_current_layout : * mut sys :: godot_method_bind , pub keyboard_get_layout_count : * mut sys :: godot_method_bind , pub keyboard_get_layout_language : * mut sys :: godot_method_bind , pub keyboard_get_layout_name : * mut sys :: godot_method_bind , pub keyboard_get_scancode_from_physical : * mut sys :: godot_method_bind , pub keyboard_set_current_layout : * mut sys :: godot_method_bind , pub kill : * mut sys :: godot_method_bind , pub move_to_trash : * mut sys :: godot_method_bind , pub move_window_to_foreground : * mut sys :: godot_method_bind , pub native_video_is_playing : * mut sys :: godot_method_bind , pub native_video_pause : * mut sys :: godot_method_bind , pub native_video_play : * mut sys :: godot_method_bind , pub native_video_stop : * mut sys :: godot_method_bind , pub native_video_unpause : * mut sys :: godot_method_bind , pub open_midi_inputs : * mut sys :: godot_method_bind , pub print_all_resources : * mut sys :: godot_method_bind , pub print_all_textures_by_size : * mut sys :: godot_method_bind , pub print_resources_by_type : * mut sys :: godot_method_bind , pub print_resources_in_use : * mut sys :: godot_method_bind , pub request_attention : * mut sys :: godot_method_bind , pub request_permission : * mut sys :: godot_method_bind , pub request_permissions : * mut sys :: godot_method_bind , pub set_borderless_window : * mut sys :: godot_method_bind , pub set_clipboard : * mut sys :: godot_method_bind , pub set_current_screen : * mut sys :: godot_method_bind , pub set_current_tablet_driver : * mut sys :: godot_method_bind , pub set_delta_smoothing : * mut sys :: godot_method_bind , pub set_environment : * mut sys :: godot_method_bind , pub set_exit_code : * mut sys :: godot_method_bind , pub set_icon : * mut sys :: godot_method_bind , pub set_ime_active : * mut sys :: godot_method_bind , pub set_ime_position : * mut sys :: godot_method_bind , pub set_keep_screen_on : * mut sys :: godot_method_bind , pub set_low_processor_usage_mode : * mut sys :: godot_method_bind , pub set_low_processor_usage_mode_sleep_usec : * mut sys :: godot_method_bind , pub set_max_window_size : * mut sys :: godot_method_bind , pub set_min_window_size : * mut sys :: godot_method_bind , pub set_native_icon : * mut sys :: godot_method_bind , pub set_screen_orientation : * mut sys :: godot_method_bind , pub set_thread_name : * mut sys :: godot_method_bind , pub set_use_file_access_save_and_swap : * mut sys :: godot_method_bind , pub set_use_vsync : * mut sys :: godot_method_bind , pub set_vsync_via_compositor : * mut sys :: godot_method_bind , pub set_window_always_on_top : * mut sys :: godot_method_bind , pub set_window_fullscreen : * mut sys :: godot_method_bind , pub set_window_maximized : * mut sys :: godot_method_bind , pub set_window_minimized : * mut sys :: godot_method_bind , pub set_window_mouse_passthrough : * mut sys :: godot_method_bind , pub set_window_per_pixel_transparency_enabled : * mut sys :: godot_method_bind , pub set_window_position : * mut sys :: godot_method_bind , pub set_window_resizable : * mut sys :: godot_method_bind , pub set_window_size : * mut sys :: godot_method_bind , pub set_window_title : * mut sys :: godot_method_bind , pub shell_open : * mut sys :: godot_method_bind , pub show_virtual_keyboard : * mut sys :: godot_method_bind } impl OSMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : OSMethodTable = OSMethodTable { class_constructor : None , alert : 0 as * mut sys :: godot_method_bind , can_draw : 0 as * mut sys :: godot_method_bind , can_use_threads : 0 as * mut sys :: godot_method_bind , center_window : 0 as * mut sys :: godot_method_bind , close_midi_inputs : 0 as * mut sys :: godot_method_bind , crash : 0 as * mut sys :: godot_method_bind , delay_msec : 0 as * mut sys :: godot_method_bind , delay_usec : 0 as * mut sys :: godot_method_bind , dump_memory_to_file : 0 as * mut sys :: godot_method_bind , dump_resources_to_file : 0 as * mut sys :: godot_method_bind , execute : 0 as * mut sys :: godot_method_bind , find_scancode_from_string : 0 as * mut sys :: godot_method_bind , get_audio_driver_count : 0 as * mut sys :: godot_method_bind , get_audio_driver_name : 0 as * mut sys :: godot_method_bind , get_borderless_window : 0 as * mut sys :: godot_method_bind , get_cache_dir : 0 as * mut sys :: godot_method_bind , get_clipboard : 0 as * mut sys :: godot_method_bind , get_cmdline_args : 0 as * mut sys :: godot_method_bind , get_config_dir : 0 as * mut sys :: godot_method_bind , get_connected_midi_inputs : 0 as * mut sys :: godot_method_bind , get_current_screen : 0 as * mut sys :: godot_method_bind , get_current_tablet_driver : 0 as * mut sys :: godot_method_bind , get_current_video_driver : 0 as * mut sys :: godot_method_bind , get_data_dir : 0 as * mut sys :: godot_method_bind , get_date : 0 as * mut sys :: godot_method_bind , get_datetime : 0 as * mut sys :: godot_method_bind , get_datetime_from_unix_time : 0 as * mut sys :: godot_method_bind , get_display_cutouts : 0 as * mut sys :: godot_method_bind , get_dynamic_memory_usage : 0 as * mut sys :: godot_method_bind , get_environment : 0 as * mut sys :: godot_method_bind , get_executable_path : 0 as * mut sys :: godot_method_bind , get_exit_code : 0 as * mut sys :: godot_method_bind , get_granted_permissions : 0 as * mut sys :: godot_method_bind , get_ime_selection : 0 as * mut sys :: godot_method_bind , get_ime_text : 0 as * mut sys :: godot_method_bind , get_latin_keyboard_variant : 0 as * mut sys :: godot_method_bind , get_locale : 0 as * mut sys :: godot_method_bind , get_locale_language : 0 as * mut sys :: godot_method_bind , get_low_processor_usage_mode_sleep_usec : 0 as * mut sys :: godot_method_bind , get_main_thread_id : 0 as * mut sys :: godot_method_bind , get_max_window_size : 0 as * mut sys :: godot_method_bind , get_min_window_size : 0 as * mut sys :: godot_method_bind , get_model_name : 0 as * mut sys :: godot_method_bind , get_name : 0 as * mut sys :: godot_method_bind , get_native_handle : 0 as * mut sys :: godot_method_bind , get_power_percent_left : 0 as * mut sys :: godot_method_bind , get_power_seconds_left : 0 as * mut sys :: godot_method_bind , get_power_state : 0 as * mut sys :: godot_method_bind , get_process_id : 0 as * mut sys :: godot_method_bind , get_processor_count : 0 as * mut sys :: godot_method_bind , get_processor_name : 0 as * mut sys :: godot_method_bind , get_real_window_size : 0 as * mut sys :: godot_method_bind , get_scancode_string : 0 as * mut sys :: godot_method_bind , get_screen_count : 0 as * mut sys :: godot_method_bind , get_screen_dpi : 0 as * mut sys :: godot_method_bind , get_screen_max_scale : 0 as * mut sys :: godot_method_bind , get_screen_orientation : 0 as * mut sys :: godot_method_bind , get_screen_position : 0 as * mut sys :: godot_method_bind , get_screen_refresh_rate : 0 as * mut sys :: godot_method_bind , get_screen_scale : 0 as * mut sys :: godot_method_bind , get_screen_size : 0 as * mut sys :: godot_method_bind , get_splash_tick_msec : 0 as * mut sys :: godot_method_bind , get_static_memory_peak_usage : 0 as * mut sys :: godot_method_bind , get_static_memory_usage : 0 as * mut sys :: godot_method_bind , get_system_dir : 0 as * mut sys :: godot_method_bind , get_system_time_msecs : 0 as * mut sys :: godot_method_bind , get_system_time_secs : 0 as * mut sys :: godot_method_bind , get_tablet_driver_count : 0 as * mut sys :: godot_method_bind , get_tablet_driver_name : 0 as * mut sys :: godot_method_bind , get_thread_caller_id : 0 as * mut sys :: godot_method_bind , get_ticks_msec : 0 as * mut sys :: godot_method_bind , get_ticks_usec : 0 as * mut sys :: godot_method_bind , get_time : 0 as * mut sys :: godot_method_bind , get_time_zone_info : 0 as * mut sys :: godot_method_bind , get_unique_id : 0 as * mut sys :: godot_method_bind , get_unix_time : 0 as * mut sys :: godot_method_bind , get_unix_time_from_datetime : 0 as * mut sys :: godot_method_bind , get_user_data_dir : 0 as * mut sys :: godot_method_bind , get_video_driver_count : 0 as * mut sys :: godot_method_bind , get_video_driver_name : 0 as * mut sys :: godot_method_bind , get_virtual_keyboard_height : 0 as * mut sys :: godot_method_bind , get_window_per_pixel_transparency_enabled : 0 as * mut sys :: godot_method_bind , get_window_position : 0 as * mut sys :: godot_method_bind , get_window_safe_area : 0 as * mut sys :: godot_method_bind , get_window_size : 0 as * mut sys :: godot_method_bind , global_menu_add_item : 0 as * mut sys :: godot_method_bind , global_menu_add_separator : 0 as * mut sys :: godot_method_bind , global_menu_clear : 0 as * mut sys :: godot_method_bind , global_menu_remove_item : 0 as * mut sys :: godot_method_bind , has_clipboard : 0 as * mut sys :: godot_method_bind , has_environment : 0 as * mut sys :: godot_method_bind , has_feature : 0 as * mut sys :: godot_method_bind , has_touchscreen_ui_hint : 0 as * mut sys :: godot_method_bind , has_virtual_keyboard : 0 as * mut sys :: godot_method_bind , hide_virtual_keyboard : 0 as * mut sys :: godot_method_bind , is_debug_build : 0 as * mut sys :: godot_method_bind , is_delta_smoothing_enabled : 0 as * mut sys :: godot_method_bind , is_in_low_processor_usage_mode : 0 as * mut sys :: godot_method_bind , is_keep_screen_on : 0 as * mut sys :: godot_method_bind , is_ok_left_and_cancel_right : 0 as * mut sys :: godot_method_bind , is_process_running : 0 as * mut sys :: godot_method_bind , is_scancode_unicode : 0 as * mut sys :: godot_method_bind , is_stdout_verbose : 0 as * mut sys :: godot_method_bind , is_userfs_persistent : 0 as * mut sys :: godot_method_bind , is_vsync_enabled : 0 as * mut sys :: godot_method_bind , is_vsync_via_compositor_enabled : 0 as * mut sys :: godot_method_bind , is_window_always_on_top : 0 as * mut sys :: godot_method_bind , is_window_focused : 0 as * mut sys :: godot_method_bind , is_window_fullscreen : 0 as * mut sys :: godot_method_bind , is_window_maximized : 0 as * mut sys :: godot_method_bind , is_window_minimized : 0 as * mut sys :: godot_method_bind , is_window_resizable : 0 as * mut sys :: godot_method_bind , keyboard_get_current_layout : 0 as * mut sys :: godot_method_bind , keyboard_get_layout_count : 0 as * mut sys :: godot_method_bind , keyboard_get_layout_language : 0 as * mut sys :: godot_method_bind , keyboard_get_layout_name : 0 as * mut sys :: godot_method_bind , keyboard_get_scancode_from_physical : 0 as * mut sys :: godot_method_bind , keyboard_set_current_layout : 0 as * mut sys :: godot_method_bind , kill : 0 as * mut sys :: godot_method_bind , move_to_trash : 0 as * mut sys :: godot_method_bind , move_window_to_foreground : 0 as * mut sys :: godot_method_bind , native_video_is_playing : 0 as * mut sys :: godot_method_bind , native_video_pause : 0 as * mut sys :: godot_method_bind , native_video_play : 0 as * mut sys :: godot_method_bind , native_video_stop : 0 as * mut sys :: godot_method_bind , native_video_unpause : 0 as * mut sys :: godot_method_bind , open_midi_inputs : 0 as * mut sys :: godot_method_bind , print_all_resources : 0 as * mut sys :: godot_method_bind , print_all_textures_by_size : 0 as * mut sys :: godot_method_bind , print_resources_by_type : 0 as * mut sys :: godot_method_bind , print_resources_in_use : 0 as * mut sys :: godot_method_bind , request_attention : 0 as * mut sys :: godot_method_bind , request_permission : 0 as * mut sys :: godot_method_bind , request_permissions : 0 as * mut sys :: godot_method_bind , set_borderless_window : 0 as * mut sys :: godot_method_bind , set_clipboard : 0 as * mut sys :: godot_method_bind , set_current_screen : 0 as * mut sys :: godot_method_bind , set_current_tablet_driver : 0 as * mut sys :: godot_method_bind , set_delta_smoothing : 0 as * mut sys :: godot_method_bind , set_environment : 0 as * mut sys :: godot_method_bind , set_exit_code : 0 as * mut sys :: godot_method_bind , set_icon : 0 as * mut sys :: godot_method_bind , set_ime_active : 0 as * mut sys :: godot_method_bind , set_ime_position : 0 as * mut sys :: godot_method_bind , set_keep_screen_on : 0 as * mut sys :: godot_method_bind , set_low_processor_usage_mode : 0 as * mut sys :: godot_method_bind , set_low_processor_usage_mode_sleep_usec : 0 as * mut sys :: godot_method_bind , set_max_window_size : 0 as * mut sys :: godot_method_bind , set_min_window_size : 0 as * mut sys :: godot_method_bind , set_native_icon : 0 as * mut sys :: godot_method_bind , set_screen_orientation : 0 as * mut sys :: godot_method_bind , set_thread_name : 0 as * mut sys :: godot_method_bind , set_use_file_access_save_and_swap : 0 as * mut sys :: godot_method_bind , set_use_vsync : 0 as * mut sys :: godot_method_bind , set_vsync_via_compositor : 0 as * mut sys :: godot_method_bind , set_window_always_on_top : 0 as * mut sys :: godot_method_bind , set_window_fullscreen : 0 as * mut sys :: godot_method_bind , set_window_maximized : 0 as * mut sys :: godot_method_bind , set_window_minimized : 0 as * mut sys :: godot_method_bind , set_window_mouse_passthrough : 0 as * mut sys :: godot_method_bind , set_window_per_pixel_transparency_enabled : 0 as * mut sys :: godot_method_bind , set_window_position : 0 as * mut sys :: godot_method_bind , set_window_resizable : 0 as * mut sys :: godot_method_bind , set_window_size : 0 as * mut sys :: godot_method_bind , set_window_title : 0 as * mut sys :: godot_method_bind , shell_open : 0 as * mut sys :: godot_method_bind , show_virtual_keyboard : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { OSMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_OS\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . alert = (gd_api . godot_method_bind_get_method) (class_name , "alert\0" . as_ptr () as * const c_char) ; table . can_draw = (gd_api . godot_method_bind_get_method) (class_name , "can_draw\0" . as_ptr () as * const c_char) ; table . can_use_threads = (gd_api . godot_method_bind_get_method) (class_name , "can_use_threads\0" . as_ptr () as * const c_char) ; table . center_window = (gd_api . godot_method_bind_get_method) (class_name , "center_window\0" . as_ptr () as * const c_char) ; table . close_midi_inputs = (gd_api . godot_method_bind_get_method) (class_name , "close_midi_inputs\0" . as_ptr () as * const c_char) ; table . crash = (gd_api . godot_method_bind_get_method) (class_name , "crash\0" . as_ptr () as * const c_char) ; table . delay_msec = (gd_api . godot_method_bind_get_method) (class_name , "delay_msec\0" . as_ptr () as * const c_char) ; table . delay_usec = (gd_api . godot_method_bind_get_method) (class_name , "delay_usec\0" . as_ptr () as * const c_char) ; table . dump_memory_to_file = (gd_api . godot_method_bind_get_method) (class_name , "dump_memory_to_file\0" . as_ptr () as * const c_char) ; table . dump_resources_to_file = (gd_api . godot_method_bind_get_method) (class_name , "dump_resources_to_file\0" . as_ptr () as * const c_char) ; table . execute = (gd_api . godot_method_bind_get_method) (class_name , "execute\0" . as_ptr () as * const c_char) ; table . find_scancode_from_string = (gd_api . godot_method_bind_get_method) (class_name , "find_scancode_from_string\0" . as_ptr () as * const c_char) ; table . get_audio_driver_count = (gd_api . godot_method_bind_get_method) (class_name , "get_audio_driver_count\0" . as_ptr () as * const c_char) ; table . get_audio_driver_name = (gd_api . godot_method_bind_get_method) (class_name , "get_audio_driver_name\0" . as_ptr () as * const c_char) ; table . get_borderless_window = (gd_api . godot_method_bind_get_method) (class_name , "get_borderless_window\0" . as_ptr () as * const c_char) ; table . get_cache_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_cache_dir\0" . as_ptr () as * const c_char) ; table . get_clipboard = (gd_api . godot_method_bind_get_method) (class_name , "get_clipboard\0" . as_ptr () as * const c_char) ; table . get_cmdline_args = (gd_api . godot_method_bind_get_method) (class_name , "get_cmdline_args\0" . as_ptr () as * const c_char) ; table . get_config_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_config_dir\0" . as_ptr () as * const c_char) ; table . get_connected_midi_inputs = (gd_api . godot_method_bind_get_method) (class_name , "get_connected_midi_inputs\0" . as_ptr () as * const c_char) ; table . get_current_screen = (gd_api . godot_method_bind_get_method) (class_name , "get_current_screen\0" . as_ptr () as * const c_char) ; table . get_current_tablet_driver = (gd_api . godot_method_bind_get_method) (class_name , "get_current_tablet_driver\0" . as_ptr () as * const c_char) ; table . get_current_video_driver = (gd_api . godot_method_bind_get_method) (class_name , "get_current_video_driver\0" . as_ptr () as * const c_char) ; table . get_data_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_data_dir\0" . as_ptr () as * const c_char) ; table . get_date = (gd_api . godot_method_bind_get_method) (class_name , "get_date\0" . as_ptr () as * const c_char) ; table . get_datetime = (gd_api . godot_method_bind_get_method) (class_name , "get_datetime\0" . as_ptr () as * const c_char) ; table . get_datetime_from_unix_time = (gd_api . godot_method_bind_get_method) (class_name , "get_datetime_from_unix_time\0" . as_ptr () as * const c_char) ; table . get_display_cutouts = (gd_api . godot_method_bind_get_method) (class_name , "get_display_cutouts\0" . as_ptr () as * const c_char) ; table . get_dynamic_memory_usage = (gd_api . godot_method_bind_get_method) (class_name , "get_dynamic_memory_usage\0" . as_ptr () as * const c_char) ; table . get_environment = (gd_api . godot_method_bind_get_method) (class_name , "get_environment\0" . as_ptr () as * const c_char) ; table . get_executable_path = (gd_api . godot_method_bind_get_method) (class_name , "get_executable_path\0" . as_ptr () as * const c_char) ; table . get_exit_code = (gd_api . godot_method_bind_get_method) (class_name , "get_exit_code\0" . as_ptr () as * const c_char) ; table . get_granted_permissions = (gd_api . godot_method_bind_get_method) (class_name , "get_granted_permissions\0" . as_ptr () as * const c_char) ; table . get_ime_selection = (gd_api . godot_method_bind_get_method) (class_name , "get_ime_selection\0" . as_ptr () as * const c_char) ; table . get_ime_text = (gd_api . godot_method_bind_get_method) (class_name , "get_ime_text\0" . as_ptr () as * const c_char) ; table . get_latin_keyboard_variant = (gd_api . godot_method_bind_get_method) (class_name , "get_latin_keyboard_variant\0" . as_ptr () as * const c_char) ; table . get_locale = (gd_api . godot_method_bind_get_method) (class_name , "get_locale\0" . as_ptr () as * const c_char) ; table . get_locale_language = (gd_api . godot_method_bind_get_method) (class_name , "get_locale_language\0" . as_ptr () as * const c_char) ; table . get_low_processor_usage_mode_sleep_usec = (gd_api . godot_method_bind_get_method) (class_name , "get_low_processor_usage_mode_sleep_usec\0" . as_ptr () as * const c_char) ; table . get_main_thread_id = (gd_api . godot_method_bind_get_method) (class_name , "get_main_thread_id\0" . as_ptr () as * const c_char) ; table . get_max_window_size = (gd_api . godot_method_bind_get_method) (class_name , "get_max_window_size\0" . as_ptr () as * const c_char) ; table . get_min_window_size = (gd_api . godot_method_bind_get_method) (class_name , "get_min_window_size\0" . as_ptr () as * const c_char) ; table . get_model_name = (gd_api . godot_method_bind_get_method) (class_name , "get_model_name\0" . as_ptr () as * const c_char) ; table . get_name = (gd_api . godot_method_bind_get_method) (class_name , "get_name\0" . as_ptr () as * const c_char) ; table . get_native_handle = (gd_api . godot_method_bind_get_method) (class_name , "get_native_handle\0" . as_ptr () as * const c_char) ; table . get_power_percent_left = (gd_api . godot_method_bind_get_method) (class_name , "get_power_percent_left\0" . as_ptr () as * const c_char) ; table . get_power_seconds_left = (gd_api . godot_method_bind_get_method) (class_name , "get_power_seconds_left\0" . as_ptr () as * const c_char) ; table . get_power_state = (gd_api . godot_method_bind_get_method) (class_name , "get_power_state\0" . as_ptr () as * const c_char) ; table . get_process_id = (gd_api . godot_method_bind_get_method) (class_name , "get_process_id\0" . as_ptr () as * const c_char) ; table . get_processor_count = (gd_api . godot_method_bind_get_method) (class_name , "get_processor_count\0" . as_ptr () as * const c_char) ; table . get_processor_name = (gd_api . godot_method_bind_get_method) (class_name , "get_processor_name\0" . as_ptr () as * const c_char) ; table . get_real_window_size = (gd_api . godot_method_bind_get_method) (class_name , "get_real_window_size\0" . as_ptr () as * const c_char) ; table . get_scancode_string = (gd_api . godot_method_bind_get_method) (class_name , "get_scancode_string\0" . as_ptr () as * const c_char) ; table . get_screen_count = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_count\0" . as_ptr () as * const c_char) ; table . get_screen_dpi = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_dpi\0" . as_ptr () as * const c_char) ; table . get_screen_max_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_max_scale\0" . as_ptr () as * const c_char) ; table . get_screen_orientation = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_orientation\0" . as_ptr () as * const c_char) ; table . get_screen_position = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_position\0" . as_ptr () as * const c_char) ; table . get_screen_refresh_rate = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_refresh_rate\0" . as_ptr () as * const c_char) ; table . get_screen_scale = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_scale\0" . as_ptr () as * const c_char) ; table . get_screen_size = (gd_api . godot_method_bind_get_method) (class_name , "get_screen_size\0" . as_ptr () as * const c_char) ; table . get_splash_tick_msec = (gd_api . godot_method_bind_get_method) (class_name , "get_splash_tick_msec\0" . as_ptr () as * const c_char) ; table . get_static_memory_peak_usage = (gd_api . godot_method_bind_get_method) (class_name , "get_static_memory_peak_usage\0" . as_ptr () as * const c_char) ; table . get_static_memory_usage = (gd_api . godot_method_bind_get_method) (class_name , "get_static_memory_usage\0" . as_ptr () as * const c_char) ; table . get_system_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_system_dir\0" . as_ptr () as * const c_char) ; table . get_system_time_msecs = (gd_api . godot_method_bind_get_method) (class_name , "get_system_time_msecs\0" . as_ptr () as * const c_char) ; table . get_system_time_secs = (gd_api . godot_method_bind_get_method) (class_name , "get_system_time_secs\0" . as_ptr () as * const c_char) ; table . get_tablet_driver_count = (gd_api . godot_method_bind_get_method) (class_name , "get_tablet_driver_count\0" . as_ptr () as * const c_char) ; table . get_tablet_driver_name = (gd_api . godot_method_bind_get_method) (class_name , "get_tablet_driver_name\0" . as_ptr () as * const c_char) ; table . get_thread_caller_id = (gd_api . godot_method_bind_get_method) (class_name , "get_thread_caller_id\0" . as_ptr () as * const c_char) ; table . get_ticks_msec = (gd_api . godot_method_bind_get_method) (class_name , "get_ticks_msec\0" . as_ptr () as * const c_char) ; table . get_ticks_usec = (gd_api . godot_method_bind_get_method) (class_name , "get_ticks_usec\0" . as_ptr () as * const c_char) ; table . get_time = (gd_api . godot_method_bind_get_method) (class_name , "get_time\0" . as_ptr () as * const c_char) ; table . get_time_zone_info = (gd_api . godot_method_bind_get_method) (class_name , "get_time_zone_info\0" . as_ptr () as * const c_char) ; table . get_unique_id = (gd_api . godot_method_bind_get_method) (class_name , "get_unique_id\0" . as_ptr () as * const c_char) ; table . get_unix_time = (gd_api . godot_method_bind_get_method) (class_name , "get_unix_time\0" . as_ptr () as * const c_char) ; table . get_unix_time_from_datetime = (gd_api . godot_method_bind_get_method) (class_name , "get_unix_time_from_datetime\0" . as_ptr () as * const c_char) ; table . get_user_data_dir = (gd_api . godot_method_bind_get_method) (class_name , "get_user_data_dir\0" . as_ptr () as * const c_char) ; table . get_video_driver_count = (gd_api . godot_method_bind_get_method) (class_name , "get_video_driver_count\0" . as_ptr () as * const c_char) ; table . get_video_driver_name = (gd_api . godot_method_bind_get_method) (class_name , "get_video_driver_name\0" . as_ptr () as * const c_char) ; table . get_virtual_keyboard_height = (gd_api . godot_method_bind_get_method) (class_name , "get_virtual_keyboard_height\0" . as_ptr () as * const c_char) ; table . get_window_per_pixel_transparency_enabled = (gd_api . godot_method_bind_get_method) (class_name , "get_window_per_pixel_transparency_enabled\0" . as_ptr () as * const c_char) ; table . get_window_position = (gd_api . godot_method_bind_get_method) (class_name , "get_window_position\0" . as_ptr () as * const c_char) ; table . get_window_safe_area = (gd_api . godot_method_bind_get_method) (class_name , "get_window_safe_area\0" . as_ptr () as * const c_char) ; table . get_window_size = (gd_api . godot_method_bind_get_method) (class_name , "get_window_size\0" . as_ptr () as * const c_char) ; table . global_menu_add_item = (gd_api . godot_method_bind_get_method) (class_name , "global_menu_add_item\0" . as_ptr () as * const c_char) ; table . global_menu_add_separator = (gd_api . godot_method_bind_get_method) (class_name , "global_menu_add_separator\0" . as_ptr () as * const c_char) ; table . global_menu_clear = (gd_api . godot_method_bind_get_method) (class_name , "global_menu_clear\0" . as_ptr () as * const c_char) ; table . global_menu_remove_item = (gd_api . godot_method_bind_get_method) (class_name , "global_menu_remove_item\0" . as_ptr () as * const c_char) ; table . has_clipboard = (gd_api . godot_method_bind_get_method) (class_name , "has_clipboard\0" . as_ptr () as * const c_char) ; table . has_environment = (gd_api . godot_method_bind_get_method) (class_name , "has_environment\0" . as_ptr () as * const c_char) ; table . has_feature = (gd_api . godot_method_bind_get_method) (class_name , "has_feature\0" . as_ptr () as * const c_char) ; table . has_touchscreen_ui_hint = (gd_api . godot_method_bind_get_method) (class_name , "has_touchscreen_ui_hint\0" . as_ptr () as * const c_char) ; table . has_virtual_keyboard = (gd_api . godot_method_bind_get_method) (class_name , "has_virtual_keyboard\0" . as_ptr () as * const c_char) ; table . hide_virtual_keyboard = (gd_api . godot_method_bind_get_method) (class_name , "hide_virtual_keyboard\0" . as_ptr () as * const c_char) ; table . is_debug_build = (gd_api . godot_method_bind_get_method) (class_name , "is_debug_build\0" . as_ptr () as * const c_char) ; table . is_delta_smoothing_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_delta_smoothing_enabled\0" . as_ptr () as * const c_char) ; table . is_in_low_processor_usage_mode = (gd_api . godot_method_bind_get_method) (class_name , "is_in_low_processor_usage_mode\0" . as_ptr () as * const c_char) ; table . is_keep_screen_on = (gd_api . godot_method_bind_get_method) (class_name , "is_keep_screen_on\0" . as_ptr () as * const c_char) ; table . is_ok_left_and_cancel_right = (gd_api . godot_method_bind_get_method) (class_name , "is_ok_left_and_cancel_right\0" . as_ptr () as * const c_char) ; table . is_process_running = (gd_api . godot_method_bind_get_method) (class_name , "is_process_running\0" . as_ptr () as * const c_char) ; table . is_scancode_unicode = (gd_api . godot_method_bind_get_method) (class_name , "is_scancode_unicode\0" . as_ptr () as * const c_char) ; table . is_stdout_verbose = (gd_api . godot_method_bind_get_method) (class_name , "is_stdout_verbose\0" . as_ptr () as * const c_char) ; table . is_userfs_persistent = (gd_api . godot_method_bind_get_method) (class_name , "is_userfs_persistent\0" . as_ptr () as * const c_char) ; table . is_vsync_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_vsync_enabled\0" . as_ptr () as * const c_char) ; table . is_vsync_via_compositor_enabled = (gd_api . godot_method_bind_get_method) (class_name , "is_vsync_via_compositor_enabled\0" . as_ptr () as * const c_char) ; table . is_window_always_on_top = (gd_api . godot_method_bind_get_method) (class_name , "is_window_always_on_top\0" . as_ptr () as * const c_char) ; table . is_window_focused = (gd_api . godot_method_bind_get_method) (class_name , "is_window_focused\0" . as_ptr () as * const c_char) ; table . is_window_fullscreen = (gd_api . godot_method_bind_get_method) (class_name , "is_window_fullscreen\0" . as_ptr () as * const c_char) ; table . is_window_maximized = (gd_api . godot_method_bind_get_method) (class_name , "is_window_maximized\0" . as_ptr () as * const c_char) ; table . is_window_minimized = (gd_api . godot_method_bind_get_method) (class_name , "is_window_minimized\0" . as_ptr () as * const c_char) ; table . is_window_resizable = (gd_api . godot_method_bind_get_method) (class_name , "is_window_resizable\0" . as_ptr () as * const c_char) ; table . keyboard_get_current_layout = (gd_api . godot_method_bind_get_method) (class_name , "keyboard_get_current_layout\0" . as_ptr () as * const c_char) ; table . keyboard_get_layout_count = (gd_api . godot_method_bind_get_method) (class_name , "keyboard_get_layout_count\0" . as_ptr () as * const c_char) ; table . keyboard_get_layout_language = (gd_api . godot_method_bind_get_method) (class_name , "keyboard_get_layout_language\0" . as_ptr () as * const c_char) ; table . keyboard_get_layout_name = (gd_api . godot_method_bind_get_method) (class_name , "keyboard_get_layout_name\0" . as_ptr () as * const c_char) ; table . keyboard_get_scancode_from_physical = (gd_api . godot_method_bind_get_method) (class_name , "keyboard_get_scancode_from_physical\0" . as_ptr () as * const c_char) ; table . keyboard_set_current_layout = (gd_api . godot_method_bind_get_method) (class_name , "keyboard_set_current_layout\0" . as_ptr () as * const c_char) ; table . kill = (gd_api . godot_method_bind_get_method) (class_name , "kill\0" . as_ptr () as * const c_char) ; table . move_to_trash = (gd_api . godot_method_bind_get_method) (class_name , "move_to_trash\0" . as_ptr () as * const c_char) ; table . move_window_to_foreground = (gd_api . godot_method_bind_get_method) (class_name , "move_window_to_foreground\0" . as_ptr () as * const c_char) ; table . native_video_is_playing = (gd_api . godot_method_bind_get_method) (class_name , "native_video_is_playing\0" . as_ptr () as * const c_char) ; table . native_video_pause = (gd_api . godot_method_bind_get_method) (class_name , "native_video_pause\0" . as_ptr () as * const c_char) ; table . native_video_play = (gd_api . godot_method_bind_get_method) (class_name , "native_video_play\0" . as_ptr () as * const c_char) ; table . native_video_stop = (gd_api . godot_method_bind_get_method) (class_name , "native_video_stop\0" . as_ptr () as * const c_char) ; table . native_video_unpause = (gd_api . godot_method_bind_get_method) (class_name , "native_video_unpause\0" . as_ptr () as * const c_char) ; table . open_midi_inputs = (gd_api . godot_method_bind_get_method) (class_name , "open_midi_inputs\0" . as_ptr () as * const c_char) ; table . print_all_resources = (gd_api . godot_method_bind_get_method) (class_name , "print_all_resources\0" . as_ptr () as * const c_char) ; table . print_all_textures_by_size = (gd_api . godot_method_bind_get_method) (class_name , "print_all_textures_by_size\0" . as_ptr () as * const c_char) ; table . print_resources_by_type = (gd_api . godot_method_bind_get_method) (class_name , "print_resources_by_type\0" . as_ptr () as * const c_char) ; table . print_resources_in_use = (gd_api . godot_method_bind_get_method) (class_name , "print_resources_in_use\0" . as_ptr () as * const c_char) ; table . request_attention = (gd_api . godot_method_bind_get_method) (class_name , "request_attention\0" . as_ptr () as * const c_char) ; table . request_permission = (gd_api . godot_method_bind_get_method) (class_name , "request_permission\0" . as_ptr () as * const c_char) ; table . request_permissions = (gd_api . godot_method_bind_get_method) (class_name , "request_permissions\0" . as_ptr () as * const c_char) ; table . set_borderless_window = (gd_api . godot_method_bind_get_method) (class_name , "set_borderless_window\0" . as_ptr () as * const c_char) ; table . set_clipboard = (gd_api . godot_method_bind_get_method) (class_name , "set_clipboard\0" . as_ptr () as * const c_char) ; table . set_current_screen = (gd_api . godot_method_bind_get_method) (class_name , "set_current_screen\0" . as_ptr () as * const c_char) ; table . set_current_tablet_driver = (gd_api . godot_method_bind_get_method) (class_name , "set_current_tablet_driver\0" . as_ptr () as * const c_char) ; table . set_delta_smoothing = (gd_api . godot_method_bind_get_method) (class_name , "set_delta_smoothing\0" . as_ptr () as * const c_char) ; table . set_environment = (gd_api . godot_method_bind_get_method) (class_name , "set_environment\0" . as_ptr () as * const c_char) ; table . set_exit_code = (gd_api . godot_method_bind_get_method) (class_name , "set_exit_code\0" . as_ptr () as * const c_char) ; table . set_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_icon\0" . as_ptr () as * const c_char) ; table . set_ime_active = (gd_api . godot_method_bind_get_method) (class_name , "set_ime_active\0" . as_ptr () as * const c_char) ; table . set_ime_position = (gd_api . godot_method_bind_get_method) (class_name , "set_ime_position\0" . as_ptr () as * const c_char) ; table . set_keep_screen_on = (gd_api . godot_method_bind_get_method) (class_name , "set_keep_screen_on\0" . as_ptr () as * const c_char) ; table . set_low_processor_usage_mode = (gd_api . godot_method_bind_get_method) (class_name , "set_low_processor_usage_mode\0" . as_ptr () as * const c_char) ; table . set_low_processor_usage_mode_sleep_usec = (gd_api . godot_method_bind_get_method) (class_name , "set_low_processor_usage_mode_sleep_usec\0" . as_ptr () as * const c_char) ; table . set_max_window_size = (gd_api . godot_method_bind_get_method) (class_name , "set_max_window_size\0" . as_ptr () as * const c_char) ; table . set_min_window_size = (gd_api . godot_method_bind_get_method) (class_name , "set_min_window_size\0" . as_ptr () as * const c_char) ; table . set_native_icon = (gd_api . godot_method_bind_get_method) (class_name , "set_native_icon\0" . as_ptr () as * const c_char) ; table . set_screen_orientation = (gd_api . godot_method_bind_get_method) (class_name , "set_screen_orientation\0" . as_ptr () as * const c_char) ; table . set_thread_name = (gd_api . godot_method_bind_get_method) (class_name , "set_thread_name\0" . as_ptr () as * const c_char) ; table . set_use_file_access_save_and_swap = (gd_api . godot_method_bind_get_method) (class_name , "set_use_file_access_save_and_swap\0" . as_ptr () as * const c_char) ; table . set_use_vsync = (gd_api . godot_method_bind_get_method) (class_name , "set_use_vsync\0" . as_ptr () as * const c_char) ; table . set_vsync_via_compositor = (gd_api . godot_method_bind_get_method) (class_name , "set_vsync_via_compositor\0" . as_ptr () as * const c_char) ; table . set_window_always_on_top = (gd_api . godot_method_bind_get_method) (class_name , "set_window_always_on_top\0" . as_ptr () as * const c_char) ; table . set_window_fullscreen = (gd_api . godot_method_bind_get_method) (class_name , "set_window_fullscreen\0" . as_ptr () as * const c_char) ; table . set_window_maximized = (gd_api . godot_method_bind_get_method) (class_name , "set_window_maximized\0" . as_ptr () as * const c_char) ; table . set_window_minimized = (gd_api . godot_method_bind_get_method) (class_name , "set_window_minimized\0" . as_ptr () as * const c_char) ; table . set_window_mouse_passthrough = (gd_api . godot_method_bind_get_method) (class_name , "set_window_mouse_passthrough\0" . as_ptr () as * const c_char) ; table . set_window_per_pixel_transparency_enabled = (gd_api . godot_method_bind_get_method) (class_name , "set_window_per_pixel_transparency_enabled\0" . as_ptr () as * const c_char) ; table . set_window_position = (gd_api . godot_method_bind_get_method) (class_name , "set_window_position\0" . as_ptr () as * const c_char) ; table . set_window_resizable = (gd_api . godot_method_bind_get_method) (class_name , "set_window_resizable\0" . as_ptr () as * const c_char) ; table . set_window_size = (gd_api . godot_method_bind_get_method) (class_name , "set_window_size\0" . as_ptr () as * const c_char) ; table . set_window_title = (gd_api . godot_method_bind_get_method) (class_name , "set_window_title\0" . as_ptr () as * const c_char) ; table . shell_open = (gd_api . godot_method_bind_get_method) (class_name , "shell_open\0" . as_ptr () as * const c_char) ; table . show_virtual_keyboard = (gd_api . godot_method_bind_get_method) (class_name , "show_virtual_keyboard\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::os::private::OS;
            
            pub(crate) mod resource_loader {
                # ! [doc = "This module contains types related to the API class [`ResourceLoader`][super::ResourceLoader]."] pub (crate) mod private { # [doc = "`core singleton class ResourceLoader` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_resourceloader.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nResourceLoader inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ResourceLoader { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ResourceLoader ; impl ResourceLoader { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("ResourceLoader\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Returns whether a recognized resource exists for the given `path`.\nAn optional `type_hint` can be used to further specify the [`Resource`][Resource] type that should be handled by the [`ResourceFormatLoader`][ResourceFormatLoader].\n# Default Arguments\n* `type_hint` - `\"\"`"] # [doc = ""] # [inline] pub fn exists (& self , path : impl Into < GodotString > , type_hint : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceLoaderMethodTable :: get (get_api ()) . exists ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , path . into () , type_hint . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns the dependencies for the resource at the given `path`."] # [doc = ""] # [inline] pub fn get_dependencies (& self , path : impl Into < GodotString >) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceLoaderMethodTable :: get (get_api ()) . get_dependencies ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns the list of recognized extensions for a resource type."] # [doc = ""] # [inline] pub fn get_recognized_extensions_for_type (& self , type_ : impl Into < GodotString >) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceLoaderMethodTable :: get (get_api ()) . get_recognized_extensions_for_type ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , type_ . into ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "_Deprecated method._ Use [`has_cached`][Self::has_cached] or [`exists`][Self::exists] instead."] # [doc = ""] # [inline] pub fn has (& self , path : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceLoaderMethodTable :: get (get_api ()) . has ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns whether a cached resource is available for the given `path`.\nOnce a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the [`load`][Self::load] or [`load_interactive`][Self::load_interactive] methods will use the cached version. The cached resource can be overridden by using [`Resource.take_over_path`][Resource::take_over_path] on a new resource for that same path."] # [doc = ""] # [inline] pub fn has_cached (& self , path : impl Into < GodotString >) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceLoaderMethodTable :: get (get_api ()) . has_cached ; let ret = crate :: icalls :: icallvar__str (method_bind , self . this . sys () . as_ptr () , path . into ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Loads a resource at the given `path`, caching the result for further access.\nThe registered [`ResourceFormatLoader`][ResourceFormatLoader]s are queried sequentially to find the first one which can handle the file's extension, and then attempt loading. If loading fails, the remaining ResourceFormatLoaders are also attempted.\nAn optional `type_hint` can be used to further specify the [`Resource`][Resource] type that should be handled by the [`ResourceFormatLoader`][ResourceFormatLoader]. Anything that inherits from [`Resource`][Resource] can be used as a type hint, for example [`Image`][Image].\nIf `no_cache` is `true`, the resource cache will be bypassed and the resource will be loaded anew. Otherwise, the cached resource will be returned if it exists.\nReturns an empty resource if no [`ResourceFormatLoader`][ResourceFormatLoader] could handle the file.\nGDScript has a simplified [method @GDScript.load] built-in method which can be used in most situations, leaving the use of [`ResourceLoader`][ResourceLoader] for more advanced scenarios.\n# Default Arguments\n* `type_hint` - `\"\"`\n* `no_cache` - `false`"] # [doc = ""] # [inline] pub fn load (& self , path : impl Into < GodotString > , type_hint : impl Into < GodotString > , no_cache : bool) -> Option < Ref < crate :: generated :: Resource , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceLoaderMethodTable :: get (get_api ()) . load ; let ret = crate :: icalls :: icallvar__str_str_bool (method_bind , self . this . sys () . as_ptr () , path . into () , type_hint . into () , no_cache as _) ; < Option < Ref < crate :: generated :: Resource , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Starts loading a resource interactively. The returned [`ResourceInteractiveLoader`][ResourceInteractiveLoader] object allows to load with high granularity, calling its [`ResourceInteractiveLoader.poll`][ResourceInteractiveLoader::poll] method successively to load chunks.\nAn optional `type_hint` can be used to further specify the [`Resource`][Resource] type that should be handled by the [`ResourceFormatLoader`][ResourceFormatLoader]. Anything that inherits from [`Resource`][Resource] can be used as a type hint, for example [`Image`][Image].\n# Default Arguments\n* `type_hint` - `\"\"`"] # [doc = ""] # [inline] pub fn load_interactive (& self , path : impl Into < GodotString > , type_hint : impl Into < GodotString >) -> Option < Ref < crate :: generated :: ResourceInteractiveLoader , ownership :: Shared > > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceLoaderMethodTable :: get (get_api ()) . load_interactive ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , path . into () , type_hint . into ()) ; < Option < Ref < crate :: generated :: ResourceInteractiveLoader , ownership :: Shared > > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Changes the behavior on missing sub-resources. The default behavior is to abort loading."] # [doc = ""] # [inline] pub fn set_abort_on_missing_resources (& self , abort : bool) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceLoaderMethodTable :: get (get_api ()) . set_abort_on_missing_resources ; let ret = crate :: icalls :: icallvar__bool (method_bind , self . this . sys () . as_ptr () , abort as _) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for ResourceLoader { } unsafe impl GodotObject for ResourceLoader { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ResourceLoader" } } impl std :: ops :: Deref for ResourceLoader { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourceLoader { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for ResourceLoader { } unsafe impl Send for ResourceLoader { } unsafe impl Sync for ResourceLoader { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ResourceLoaderMethodTable { pub class_constructor : sys :: godot_class_constructor , pub exists : * mut sys :: godot_method_bind , pub get_dependencies : * mut sys :: godot_method_bind , pub get_recognized_extensions_for_type : * mut sys :: godot_method_bind , pub has : * mut sys :: godot_method_bind , pub has_cached : * mut sys :: godot_method_bind , pub load : * mut sys :: godot_method_bind , pub load_interactive : * mut sys :: godot_method_bind , pub set_abort_on_missing_resources : * mut sys :: godot_method_bind } impl ResourceLoaderMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ResourceLoaderMethodTable = ResourceLoaderMethodTable { class_constructor : None , exists : 0 as * mut sys :: godot_method_bind , get_dependencies : 0 as * mut sys :: godot_method_bind , get_recognized_extensions_for_type : 0 as * mut sys :: godot_method_bind , has : 0 as * mut sys :: godot_method_bind , has_cached : 0 as * mut sys :: godot_method_bind , load : 0 as * mut sys :: godot_method_bind , load_interactive : 0 as * mut sys :: godot_method_bind , set_abort_on_missing_resources : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ResourceLoaderMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_ResourceLoader\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . exists = (gd_api . godot_method_bind_get_method) (class_name , "exists\0" . as_ptr () as * const c_char) ; table . get_dependencies = (gd_api . godot_method_bind_get_method) (class_name , "get_dependencies\0" . as_ptr () as * const c_char) ; table . get_recognized_extensions_for_type = (gd_api . godot_method_bind_get_method) (class_name , "get_recognized_extensions_for_type\0" . as_ptr () as * const c_char) ; table . has = (gd_api . godot_method_bind_get_method) (class_name , "has\0" . as_ptr () as * const c_char) ; table . has_cached = (gd_api . godot_method_bind_get_method) (class_name , "has_cached\0" . as_ptr () as * const c_char) ; table . load = (gd_api . godot_method_bind_get_method) (class_name , "load\0" . as_ptr () as * const c_char) ; table . load_interactive = (gd_api . godot_method_bind_get_method) (class_name , "load_interactive\0" . as_ptr () as * const c_char) ; table . set_abort_on_missing_resources = (gd_api . godot_method_bind_get_method) (class_name , "set_abort_on_missing_resources\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::resource_loader::private::ResourceLoader;
            
            pub mod resource_saver {
                # ! [doc = "This module contains types related to the API class [`ResourceSaver`][super::ResourceSaver]."] pub (crate) mod private { # [doc = "`core singleton class ResourceSaver` inherits `Object` (manually managed).\n\nThis class has related types in the [`resource_saver`][super::resource_saver] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_resourcesaver.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nResourceSaver inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct ResourceSaver { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: ResourceSaver ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct SaverFlags (pub i64) ; impl SaverFlags { pub const RELATIVE_PATHS : SaverFlags = SaverFlags (1i64) ; pub const BUNDLE_RESOURCES : SaverFlags = SaverFlags (2i64) ; pub const CHANGE_PATH : SaverFlags = SaverFlags (4i64) ; pub const OMIT_EDITOR_PROPERTIES : SaverFlags = SaverFlags (8i64) ; pub const SAVE_BIG_ENDIAN : SaverFlags = SaverFlags (16i64) ; pub const COMPRESS : SaverFlags = SaverFlags (32i64) ; pub const REPLACE_SUBRESOURCE_PATHS : SaverFlags = SaverFlags (64i64) ; } impl From < i64 > for SaverFlags { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < SaverFlags > for i64 { # [inline] fn from (v : SaverFlags) -> Self { v . 0 } } impl FromVariant for SaverFlags { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl ResourceSaver { pub const FLAG_RELATIVE_PATHS : i64 = 1i64 ; pub const FLAG_BUNDLE_RESOURCES : i64 = 2i64 ; pub const FLAG_CHANGE_PATH : i64 = 4i64 ; pub const FLAG_OMIT_EDITOR_PROPERTIES : i64 = 8i64 ; pub const FLAG_SAVE_BIG_ENDIAN : i64 = 16i64 ; pub const FLAG_COMPRESS : i64 = 32i64 ; pub const FLAG_REPLACE_SUBRESOURCE_PATHS : i64 = 64i64 ; } impl ResourceSaver { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("ResourceSaver\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = "Returns the list of extensions available for saving a resource of a given type."] # [doc = ""] # [inline] pub fn get_recognized_extensions (& self , type_ : impl AsArg < crate :: generated :: Resource >) -> PoolArray < GodotString > { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceSaverMethodTable :: get (get_api ()) . get_recognized_extensions ; let ret = crate :: icalls :: icallvar__obj (method_bind , self . this . sys () . as_ptr () , type_ . as_arg_ptr ()) ; < PoolArray < GodotString > > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Saves a resource to disk to the given path, using a [`ResourceFormatSaver`][ResourceFormatSaver] that recognizes the resource object.\nThe `flags` bitmask can be specified to customize the save behavior.\nReturns [`OK`][Self::OK] on success.\n# Default Arguments\n* `flags` - `0`"] # [doc = ""] # [inline] pub fn save (& self , path : impl Into < GodotString > , resource : impl AsArg < crate :: generated :: Resource > , flags : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ResourceSaverMethodTable :: get (get_api ()) . save ; let ret = crate :: icalls :: icallvar__str_obj_i64 (method_bind , self . this . sys () . as_ptr () , path . into () , resource . as_arg_ptr () , flags as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } } impl gdnative_core :: private :: godot_object :: Sealed for ResourceSaver { } unsafe impl GodotObject for ResourceSaver { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "ResourceSaver" } } impl std :: ops :: Deref for ResourceSaver { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for ResourceSaver { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for ResourceSaver { } unsafe impl Send for ResourceSaver { } unsafe impl Sync for ResourceSaver { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ResourceSaverMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_recognized_extensions : * mut sys :: godot_method_bind , pub save : * mut sys :: godot_method_bind } impl ResourceSaverMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ResourceSaverMethodTable = ResourceSaverMethodTable { class_constructor : None , get_recognized_extensions : 0 as * mut sys :: godot_method_bind , save : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ResourceSaverMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_ResourceSaver\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_recognized_extensions = (gd_api . godot_method_bind_get_method) (class_name , "get_recognized_extensions\0" . as_ptr () as * const c_char) ; table . save = (gd_api . godot_method_bind_get_method) (class_name , "save\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::resource_saver::private::ResourceSaver;
            
            pub(crate) mod semaphore {
                # ! [doc = "This module contains types related to the API class [`Semaphore`][super::Semaphore]."] pub (crate) mod private { # [doc = "`core class Semaphore` inherits `Reference` (reference-counted)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_semaphore.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nSemaphore inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Semaphore { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Semaphore ; impl Semaphore { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = SemaphoreMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Lowers the [`Semaphore`][Semaphore], allowing one more thread in.\n**Note:** This method internals' can't possibly fail, but an error code is returned for backwards compatibility, which will always be [`OK`][Self::OK]."] # [doc = ""] # [inline] pub fn post (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = SemaphoreMethodTable :: get (get_api ()) . post ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Like [`wait`][Self::wait], but won't block, so if the value is zero, fails immediately and returns [`ERR_BUSY`][Self::ERR_BUSY]. If non-zero, it returns [`OK`][Self::OK] to report success."] # [doc = ""] # [inline] pub fn try_wait (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = SemaphoreMethodTable :: get (get_api ()) . try_wait ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Waits for the [`Semaphore`][Semaphore], if its value is zero, blocks until non-zero.\n**Note:** This method internals' can't possibly fail, but an error code is returned for backwards compatibility, which will always be [`OK`][Self::OK]."] # [doc = ""] # [inline] pub fn wait (& self) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = SemaphoreMethodTable :: get (get_api ()) . wait ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } } impl gdnative_core :: private :: godot_object :: Sealed for Semaphore { } unsafe impl GodotObject for Semaphore { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Semaphore" } } impl std :: ops :: Deref for Semaphore { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Semaphore { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for Semaphore { } unsafe impl SubClass < crate :: generated :: Object > for Semaphore { } impl Instanciable for Semaphore { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Semaphore :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct SemaphoreMethodTable { pub class_constructor : sys :: godot_class_constructor , pub post : * mut sys :: godot_method_bind , pub try_wait : * mut sys :: godot_method_bind , pub wait : * mut sys :: godot_method_bind } impl SemaphoreMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : SemaphoreMethodTable = SemaphoreMethodTable { class_constructor : None , post : 0 as * mut sys :: godot_method_bind , try_wait : 0 as * mut sys :: godot_method_bind , wait : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { SemaphoreMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_Semaphore\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . post = (gd_api . godot_method_bind_get_method) (class_name , "post\0" . as_ptr () as * const c_char) ; table . try_wait = (gd_api . godot_method_bind_get_method) (class_name , "try_wait\0" . as_ptr () as * const c_char) ; table . wait = (gd_api . godot_method_bind_get_method) (class_name , "wait\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::semaphore::private::Semaphore;
            
            pub mod thread {
                # ! [doc = "This module contains types related to the API class [`Thread`][super::Thread]."] pub (crate) mod private { # [doc = "`core class Thread` inherits `Reference` (reference-counted).\n\nThis class has related types in the [`thread`][super::thread] module."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_thread.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = "## Memory management\n\nThe lifetime of this object is automatically managed through reference counting."] # [doc = "\n## Class hierarchy\n\nThread inherits methods from:\n - [Reference](struct.Reference.html)\n - [Object](struct.Object.html)\n"] # [doc = ""] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct Thread { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: Thread ; # [derive (Copy , Clone , Debug , PartialEq , Eq , PartialOrd , Ord , Hash)] pub struct Priority (pub i64) ; impl Priority { pub const LOW : Priority = Priority (0i64) ; pub const NORMAL : Priority = Priority (1i64) ; pub const HIGH : Priority = Priority (2i64) ; } impl From < i64 > for Priority { # [inline] fn from (v : i64) -> Self { Self (v) } } impl From < Priority > for i64 { # [inline] fn from (v : Priority) -> Self { v . 0 } } impl FromVariant for Priority { # [inline] fn from_variant (v : & Variant) -> Result < Self , FromVariantError > { i64 :: from_variant (v) . map (Self :: from) } } # [doc = "Constants"] # [allow (non_upper_case_globals)] impl Thread { pub const PRIORITY_LOW : i64 = 0i64 ; pub const PRIORITY_NORMAL : i64 = 1i64 ; pub const PRIORITY_HIGH : i64 = 2i64 ; } impl Thread { # [doc = "Creates a new instance of this object.\n\nThis is a reference-counted type. The returned object is automatically managed\nby `Ref`."] # [inline] pub fn new () -> Ref < Self , ownership :: Unique > { unsafe { let gd_api = get_api () ; let ctor = ThreadMethodTable :: get (gd_api) . class_constructor . unwrap () ; let obj = ptr :: NonNull :: new (ctor ()) . expect ("constructor should not return null") ; Ref :: init_from_sys (obj) } } # [doc = "Returns the current [`Thread`][Thread]'s ID, uniquely identifying it among all threads. If the [`Thread`][Thread] is not running this returns an empty string."] # [doc = ""] # [inline] pub fn get_id (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bind = ThreadMethodTable :: get (get_api ()) . get_id ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < GodotString > :: from_variant (& ret) . expect ("Unexpected variant type") } } # [doc = "Returns `true` if this [`Thread`][Thread] has been started. Once started, this will return `true` until it is joined using [`wait_to_finish`][Self::wait_to_finish]. For checking if a [`Thread`][Thread] is still executing its task, use [`is_alive`][Self::is_alive]."] # [doc = ""] # [inline] pub fn is_active (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThreadMethodTable :: get (get_api ()) . is_active ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Returns `true` if this [`Thread`][Thread] is currently running. This is useful for determining if [`wait_to_finish`][Self::wait_to_finish] can be called without blocking the calling thread.\nTo check if a [`Thread`][Thread] is joinable, use [`is_active`][Self::is_active]."] # [doc = ""] # [inline] pub fn is_alive (& self) -> bool { unsafe { let method_bind : * mut sys :: godot_method_bind = ThreadMethodTable :: get (get_api ()) . is_alive ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < bool > :: coerce_from_variant (& ret) } } # [doc = "Starts a new [`Thread`][Thread] that runs `method` on object `instance` with `userdata` passed as an argument. Even if no userdata is passed, `method` must accept one argument and it will be null. The `priority` of the [`Thread`][Thread] can be changed by passing a value from the [`Priority`][Priority] enum.\nReturns [`OK`][Self::OK] on success, or [`ERR_CANT_CREATE`][Self::ERR_CANT_CREATE] on failure.\n# Default Arguments\n* `userdata` - `null`\n* `priority` - `1`"] # [doc = ""] # [inline] pub fn start (& self , instance : impl AsArg < crate :: generated :: Object > , method : impl Into < GodotString > , userdata : impl OwnedToVariant , priority : i64) -> GodotResult { unsafe { let method_bind : * mut sys :: godot_method_bind = ThreadMethodTable :: get (get_api ()) . start ; let ret = crate :: icalls :: icallvar__obj_str_var_i64 (method_bind , self . this . sys () . as_ptr () , instance . as_arg_ptr () , method . into () , userdata . owned_to_variant () , priority as _) ; GodotError :: result_from_sys (sys :: godot_error :: from_variant (& ret) . expect ("Unexpected variant type")) } } # [doc = "Joins the [`Thread`][Thread] and waits for it to finish. Returns the output of the method passed to [`start`][Self::start].\nShould either be used when you want to retrieve the value returned from the method called by the [`Thread`][Thread] or before freeing the instance that contains the [`Thread`][Thread].\nTo determine if this can be called without blocking the calling thread, check if [`is_alive`][Self::is_alive] is `false`.\n**Note:** After the [`Thread`][Thread] finishes joining it will be disposed. If you want to use it again you will have to create a new instance of it."] # [doc = ""] # [inline] pub fn wait_to_finish (& self) -> Variant { unsafe { let method_bind : * mut sys :: godot_method_bind = ThreadMethodTable :: get (get_api ()) . wait_to_finish ; let ret = crate :: icalls :: icallvar_ (method_bind , self . this . sys () . as_ptr ()) ; < Variant > :: from_variant (& ret) . expect ("Unexpected variant type") } } } impl gdnative_core :: private :: godot_object :: Sealed for Thread { } unsafe impl GodotObject for Thread { type Memory = memory :: RefCounted ; # [inline] fn class_name () -> & 'static str { "Thread" } } impl std :: ops :: Deref for Thread { type Target = crate :: generated :: Reference ; # [inline] fn deref (& self) -> & crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for Thread { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Reference { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Reference > for Thread { } unsafe impl SubClass < crate :: generated :: Object > for Thread { } impl Instanciable for Thread { # [inline] fn construct () -> Ref < Self , ownership :: Unique > { Thread :: new () } } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct ThreadMethodTable { pub class_constructor : sys :: godot_class_constructor , pub get_id : * mut sys :: godot_method_bind , pub is_active : * mut sys :: godot_method_bind , pub is_alive : * mut sys :: godot_method_bind , pub start : * mut sys :: godot_method_bind , pub wait_to_finish : * mut sys :: godot_method_bind } impl ThreadMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : ThreadMethodTable = ThreadMethodTable { class_constructor : None , get_id : 0 as * mut sys :: godot_method_bind , is_active : 0 as * mut sys :: godot_method_bind , is_alive : 0 as * mut sys :: godot_method_bind , start : 0 as * mut sys :: godot_method_bind , wait_to_finish : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { ThreadMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_Thread\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . get_id = (gd_api . godot_method_bind_get_method) (class_name , "get_id\0" . as_ptr () as * const c_char) ; table . is_active = (gd_api . godot_method_bind_get_method) (class_name , "is_active\0" . as_ptr () as * const c_char) ; table . is_alive = (gd_api . godot_method_bind_get_method) (class_name , "is_alive\0" . as_ptr () as * const c_char) ; table . start = (gd_api . godot_method_bind_get_method) (class_name , "start\0" . as_ptr () as * const c_char) ; table . wait_to_finish = (gd_api . godot_method_bind_get_method) (class_name , "wait_to_finish\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::thread::private::Thread;
            
            pub(crate) mod visual_script_editor {
                # ! [doc = "This module contains types related to the API class [`VisualScriptEditor`][super::VisualScriptEditor]."] pub (crate) mod private { # [doc = "`tools singleton class VisualScriptEditor` inherits `Object` (manually managed)."] # [doc = "## Official documentation\n\nSee the [documentation of this class](https://godot.readthedocs.io/en/stable/classes/class_visualscripteditor.html) in the Godot engine's official documentation.\nThe method descriptions are generated from it and typically contain code samples in GDScript, not Rust."] # [doc = ""] # [doc = "\n## Class hierarchy\n\nVisualScriptEditor inherits methods from:\n - [Object](struct.Object.html)\n"] # [doc = "\n## Tool\n\nThis class is used to interact with Godot's editor."] # [doc = "\n## Safety\n\nAll types in the Godot API have _interior mutability_ in Rust parlance.\nTo enforce that the official [thread-safety guidelines][thread-safety] are\nfollowed, the typestate pattern is used in the `Ref` and `TRef` smart pointers,\nand the `Instance` API. The typestate `Ownership` in these types tracks whether\nownership is unique, shared, or exclusive to the current thread. For more information,\nsee the type-level documentation on `Ref`.\n\n[thread-safety]: https://docs.godotengine.org/en/stable/tutorials/threads/thread_safe_apis.html"] # [allow (non_camel_case_types)] # [derive (Debug)] pub struct VisualScriptEditor { # [allow (dead_code)] pub (crate) this : super :: RawObject < Self > , } } use private :: VisualScriptEditor ; impl VisualScriptEditor { # [doc = "Returns a reference to the singleton instance."] # [inline] pub fn godot_singleton () -> & 'static Self { unsafe { let this = (get_api () . godot_global_get_singleton) ("VisualScriptEditor\0" . as_ptr () as * mut _) ; let this = ptr :: NonNull :: new (this) . expect ("singleton should not be null") ; let this = RawObject :: from_sys_ref_unchecked :: < 'static > (this) ; Self :: cast_ref (this) } } # [doc = ""] # [doc = ""] # [inline] pub fn add_custom_node (& self , name : impl Into < GodotString > , category : impl Into < GodotString > , script : impl AsArg < crate :: generated :: Script >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptEditorMethodTable :: get (get_api ()) . add_custom_node ; let ret = crate :: icalls :: icallvar__str_str_obj (method_bind , self . this . sys () . as_ptr () , name . into () , category . into () , script . as_arg_ptr ()) ; } } # [doc = ""] # [doc = ""] # [inline] pub fn remove_custom_node (& self , name : impl Into < GodotString > , category : impl Into < GodotString >) -> () { unsafe { let method_bind : * mut sys :: godot_method_bind = VisualScriptEditorMethodTable :: get (get_api ()) . remove_custom_node ; let ret = crate :: icalls :: icallvar__str_str (method_bind , self . this . sys () . as_ptr () , name . into () , category . into ()) ; } } } impl gdnative_core :: private :: godot_object :: Sealed for VisualScriptEditor { } unsafe impl GodotObject for VisualScriptEditor { type Memory = memory :: ManuallyManaged ; # [inline] fn class_name () -> & 'static str { "VisualScriptEditor" } } impl std :: ops :: Deref for VisualScriptEditor { type Target = crate :: generated :: Object ; # [inline] fn deref (& self) -> & crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } impl std :: ops :: DerefMut for VisualScriptEditor { # [inline] fn deref_mut (& mut self) -> & mut crate :: generated :: Object { unsafe { std :: mem :: transmute (self) } } } unsafe impl SubClass < crate :: generated :: Object > for VisualScriptEditor { } unsafe impl Send for VisualScriptEditor { } unsafe impl Sync for VisualScriptEditor { } # [doc (hidden)] # [allow (non_camel_case_types , dead_code)] pub (crate) struct VisualScriptEditorMethodTable { pub class_constructor : sys :: godot_class_constructor , pub add_custom_node : * mut sys :: godot_method_bind , pub remove_custom_node : * mut sys :: godot_method_bind } impl VisualScriptEditorMethodTable { unsafe fn get_mut () -> & 'static mut Self { static mut TABLE : VisualScriptEditorMethodTable = VisualScriptEditorMethodTable { class_constructor : None , add_custom_node : 0 as * mut sys :: godot_method_bind , remove_custom_node : 0 as * mut sys :: godot_method_bind } ; & mut TABLE } # [inline] # [allow (dead_code)] pub fn get (gd_api : & GodotApi) -> & 'static Self { unsafe { let table = Self :: get_mut () ; static INIT : std :: sync :: Once = std :: sync :: Once :: new () ; INIT . call_once (|| { VisualScriptEditorMethodTable :: init (table , gd_api) ; }) ; table } } # [inline (never)] # [allow (dead_code)] fn init (table : & mut Self , gd_api : & GodotApi) { unsafe { let class_name = "_VisualScriptEditor\0" . as_ptr () as * const c_char ; table . class_constructor = (gd_api . godot_get_class_constructor) (class_name) ; table . add_custom_node = (gd_api . godot_method_bind_get_method) (class_name , "add_custom_node\0" . as_ptr () as * const c_char) ; table . remove_custom_node = (gd_api . godot_method_bind_get_method) (class_name , "remove_custom_node\0" . as_ptr () as * const c_char) ; } } }
                use super::*;
            }
            pub use crate::generated::visual_script_editor::private::VisualScriptEditor;